@elastic/eui 94.5.0 → 94.5.2
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/NOTICE.txt +1 -1
- package/es/components/badge/badge.js +12 -4
- package/es/components/badge/badge.styles.js +13 -10
- package/es/components/date_picker/date_picker.js +4 -1
- package/es/components/date_picker/react-datepicker/src/calendar.js +6 -2
- package/es/components/date_picker/react-datepicker/src/index.js +7 -2
- package/es/components/date_picker/react-datepicker/src/time.js +5 -4
- package/es/components/drag_and_drop/drag_drop_context.js +0 -2
- package/es/components/flex/flex_group.js +4 -3
- package/es/components/flex/flex_item.js +4 -3
- package/es/components/form/range/dual_range.js +2 -2
- package/es/components/selectable/selectable_list/selectable_list.js +6 -6
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/table/table_header_cell_checkbox.js +2 -1
- package/es/components/table/table_header_cell_shared.js +9 -0
- package/eui.d.ts +29 -24
- package/i18ntokens.json +8 -8
- package/lib/components/badge/badge.js +12 -4
- package/lib/components/badge/badge.styles.js +13 -10
- package/lib/components/date_picker/date_picker.js +4 -1
- package/lib/components/date_picker/react-datepicker/src/calendar.js +6 -2
- package/lib/components/date_picker/react-datepicker/src/index.js +7 -2
- package/lib/components/date_picker/react-datepicker/src/time.js +5 -4
- package/lib/components/drag_and_drop/drag_drop_context.js +0 -1
- package/lib/components/flex/flex_group.js +4 -3
- package/lib/components/flex/flex_item.js +4 -3
- package/lib/components/form/range/dual_range.js +2 -2
- package/lib/components/selectable/selectable_list/selectable_list.js +6 -6
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/table/table_header_cell_checkbox.js +2 -1
- package/lib/components/table/table_header_cell_shared.js +16 -0
- package/optimize/es/components/badge/badge.js +7 -4
- package/optimize/es/components/badge/badge.styles.js +13 -10
- package/optimize/es/components/date_picker/date_picker.js +4 -1
- package/optimize/es/components/date_picker/react-datepicker/src/calendar.js +6 -2
- package/optimize/es/components/date_picker/react-datepicker/src/index.js +7 -2
- package/optimize/es/components/date_picker/react-datepicker/src/time.js +5 -4
- package/optimize/es/components/drag_and_drop/drag_drop_context.js +0 -2
- package/optimize/es/components/flex/flex_group.js +4 -3
- package/optimize/es/components/flex/flex_item.js +4 -3
- package/optimize/es/components/form/range/dual_range.js +2 -2
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +6 -6
- package/optimize/es/components/table/table_header_cell_checkbox.js +1 -0
- package/optimize/es/components/table/table_header_cell_shared.js +9 -0
- package/optimize/lib/components/badge/badge.js +7 -4
- package/optimize/lib/components/badge/badge.styles.js +13 -10
- package/optimize/lib/components/date_picker/date_picker.js +4 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/calendar.js +6 -2
- package/optimize/lib/components/date_picker/react-datepicker/src/index.js +7 -2
- package/optimize/lib/components/date_picker/react-datepicker/src/time.js +5 -4
- package/optimize/lib/components/drag_and_drop/drag_drop_context.js +0 -1
- package/optimize/lib/components/flex/flex_group.js +4 -3
- package/optimize/lib/components/flex/flex_item.js +4 -3
- package/optimize/lib/components/form/range/dual_range.js +2 -2
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +6 -6
- package/optimize/lib/components/table/table_header_cell_checkbox.js +1 -0
- package/optimize/lib/components/table/table_header_cell_shared.js +16 -0
- package/package.json +1 -1
- package/test-env/components/badge/badge.js +7 -4
- package/test-env/components/badge/badge.styles.js +13 -10
- package/test-env/components/date_picker/date_picker.js +4 -1
- package/test-env/components/date_picker/react-datepicker/src/calendar.js +6 -2
- package/test-env/components/date_picker/react-datepicker/src/index.js +7 -2
- package/test-env/components/date_picker/react-datepicker/src/time.js +5 -4
- package/test-env/components/drag_and_drop/drag_drop_context.js +0 -1
- package/test-env/components/flex/flex_group.js +4 -3
- package/test-env/components/flex/flex_item.js +4 -3
- package/test-env/components/form/range/dual_range.js +2 -2
- package/test-env/components/selectable/selectable_list/selectable_list.js +6 -6
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/table/table_header_cell_checkbox.js +2 -1
- package/test-env/components/table/table_header_cell_shared.js +16 -0
package/NOTICE.txt
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
var _excluded = ["children", "color", "iconType", "iconSide", "className", "isDisabled", "onClick", "iconOnClick", "onClickAriaLabel", "iconOnClickAriaLabel", "closeButtonProps", "href", "rel", "target", "style"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
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."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
4
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -52,6 +58,8 @@ export var EuiBadge = function EuiBadge(_ref) {
|
|
|
52
58
|
var isNamedColor = COLORS.includes(color);
|
|
53
59
|
var euiTheme = useEuiTheme();
|
|
54
60
|
var customColorStyles = useMemo(function () {
|
|
61
|
+
// Disabled badges should not have custom colors
|
|
62
|
+
if (isDisabled) return style;
|
|
55
63
|
// Named colors set their styles via Emotion CSS and not inline styles
|
|
56
64
|
if (isNamedColor) return style;
|
|
57
65
|
|
|
@@ -66,17 +74,17 @@ export var EuiBadge = function EuiBadge(_ref) {
|
|
|
66
74
|
console.warn("Warning: ".concat(color, " badge has a low contrast of ").concat(contrastRatio.toFixed(2), ". Should be above ").concat(wcagContrastMin, "."));
|
|
67
75
|
}
|
|
68
76
|
return _objectSpread({
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
'--euiBadgeBackgroundColor': color,
|
|
78
|
+
'--euiBadgeTextColor': textColor
|
|
71
79
|
}, style);
|
|
72
80
|
} catch (err) {
|
|
73
81
|
if (!getIsValidColor(color)) {
|
|
74
82
|
console.warn('EuiBadge expects a valid color. This can either be a three or six ' + "character hex value, rgb(a) value, hsv value, hollow, or one of the following: ".concat(COLORS, ". ") + "Instead got ".concat(color, "."));
|
|
75
83
|
}
|
|
76
84
|
}
|
|
77
|
-
}, [color, isNamedColor, style, euiTheme]);
|
|
85
|
+
}, [color, isNamedColor, isDisabled, style, euiTheme]);
|
|
78
86
|
var styles = useEuiMemoizedStyles(euiBadgeStyles);
|
|
79
|
-
var cssStyles = [styles.euiBadge
|
|
87
|
+
var cssStyles = [styles.euiBadge].concat(_toConsumableArray(isDisabled ? [styles.disabled] : [isNamedColor && styles[color], !iconOnClick && (onClick || href) && styles.clickable]));
|
|
80
88
|
var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
|
|
81
89
|
var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
|
|
82
90
|
var iconButtonCssStyles = [styles.iconButton.euiBadge__iconButton, styles.iconButton[iconSide]];
|
|
@@ -22,24 +22,27 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
22
22
|
export var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
|
|
23
23
|
var euiTheme = euiThemeContext.euiTheme;
|
|
24
24
|
var badgeColors = euiBadgeColors(euiThemeContext);
|
|
25
|
+
var setBadgeColorVars = function setBadgeColorVars(colors) {
|
|
26
|
+
return "\n --euiBadgeTextColor: ".concat(colors.color, ";\n --euiBadgeBackgroundColor: ").concat(colors.backgroundColor, ";\n ");
|
|
27
|
+
};
|
|
25
28
|
return {
|
|
26
29
|
euiBadge: /*#__PURE__*/css("display:inline-block;vertical-align:middle;", logicalShorthandCSS('padding', "0 ".concat(euiTheme.size.s)), " ", logicalCSS('max-width', '100%'), " font-size:", euiFontSize(euiThemeContext, 'xs').fontSize, ";line-height:", mathWithUnits(
|
|
27
30
|
// Account for the border
|
|
28
31
|
[euiTheme.size.base, euiTheme.border.width.thin], function (x, y) {
|
|
29
32
|
return x + y * 2;
|
|
30
|
-
}), ";font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;
|
|
33
|
+
}), ";font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;border:", euiTheme.border.width.thin, " solid transparent;border-radius:", mathWithUnits(euiTheme.border.radius.medium, function (x) {
|
|
31
34
|
return x / 2;
|
|
32
|
-
}), ";", logicalTextAlignCSS('left'), " &:focus-within{", euiFocusRing(euiThemeContext), ";}&+.euiBadge{", logicalCSS('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
|
|
35
|
+
}), ";", logicalTextAlignCSS('left'), "color:var(--euiBadgeTextColor, ", badgeColors.default.color, ");background-color:var(\n --euiBadgeBackgroundColor,\n ", badgeColors.default.backgroundColor, "\n );*::selection{color:var(\n --euiBadgeBackgroundColor,\n ", badgeColors.default.backgroundColor, "\n );background-color:var(\n --euiBadgeTextColor,\n ", badgeColors.default.color, "\n );}&:focus-within{", euiFocusRing(euiThemeContext), ";}&+.euiBadge{", logicalCSS('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
|
|
33
36
|
clickable: /*#__PURE__*/css("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", euiFocusRing(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
|
|
34
37
|
// Colors
|
|
35
|
-
default: /*#__PURE__*/css(badgeColors.default, ";label:default;"),
|
|
36
|
-
hollow: /*#__PURE__*/css(
|
|
37
|
-
primary: /*#__PURE__*/css(badgeColors.primary, ";label:primary;"),
|
|
38
|
-
accent: /*#__PURE__*/css(badgeColors.accent, ";label:accent;"),
|
|
39
|
-
warning: /*#__PURE__*/css(badgeColors.warning, ";label:warning;"),
|
|
40
|
-
danger: /*#__PURE__*/css(badgeColors.danger, ";label:danger;"),
|
|
41
|
-
success: /*#__PURE__*/css(badgeColors.success, ";label:success;"),
|
|
42
|
-
disabled: /*#__PURE__*/css(
|
|
38
|
+
default: /*#__PURE__*/css(setBadgeColorVars(badgeColors.default), ";label:default;"),
|
|
39
|
+
hollow: /*#__PURE__*/css(setBadgeColorVars(badgeColors.hollow), " border-color:", badgeColors.hollow.borderColor, ";;label:hollow;"),
|
|
40
|
+
primary: /*#__PURE__*/css(setBadgeColorVars(badgeColors.primary), ";label:primary;"),
|
|
41
|
+
accent: /*#__PURE__*/css(setBadgeColorVars(badgeColors.accent), ";label:accent;"),
|
|
42
|
+
warning: /*#__PURE__*/css(setBadgeColorVars(badgeColors.warning), ";label:warning;"),
|
|
43
|
+
danger: /*#__PURE__*/css(setBadgeColorVars(badgeColors.danger), ";label:danger;"),
|
|
44
|
+
success: /*#__PURE__*/css(setBadgeColorVars(badgeColors.success), ";label:success;"),
|
|
45
|
+
disabled: /*#__PURE__*/css(setBadgeColorVars(badgeColors.disabled), "*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
|
|
43
46
|
// Content wrapper
|
|
44
47
|
euiBadge__content: /*#__PURE__*/css(logicalCSS(
|
|
45
48
|
// Ensure proper height in case of just displaying an icon
|
|
@@ -76,7 +76,7 @@ export var EuiDatePicker = function EuiDatePicker(_ref) {
|
|
|
76
76
|
injectTimes = _ref.injectTimes,
|
|
77
77
|
inline = _ref.inline,
|
|
78
78
|
inputRef = _ref.inputRef,
|
|
79
|
-
|
|
79
|
+
_isInvalid = _ref.isInvalid,
|
|
80
80
|
isLoading = _ref.isLoading,
|
|
81
81
|
locale = _ref.locale,
|
|
82
82
|
maxDate = _ref.maxDate,
|
|
@@ -109,6 +109,9 @@ export var EuiDatePicker = function EuiDatePicker(_ref) {
|
|
|
109
109
|
'euiDatePicker--inline': inline,
|
|
110
110
|
'euiDatePicker--shadow': inline && shadow
|
|
111
111
|
});
|
|
112
|
+
|
|
113
|
+
// Check for whether the passed `selected` moment date is valid
|
|
114
|
+
var isInvalid = _isInvalid || ((selected === null || selected === void 0 ? void 0 : selected.isValid()) === false ? true : undefined);
|
|
112
115
|
var numIconsClass = controlOnly ? false : getFormControlClassNameForIconCount({
|
|
113
116
|
isInvalid: isInvalid,
|
|
114
117
|
isLoading: isLoading
|
|
@@ -49,8 +49,9 @@ import React from "react";
|
|
|
49
49
|
import PropTypes from "prop-types";
|
|
50
50
|
import classnames from "classnames";
|
|
51
51
|
import CalendarContainer from "./calendar_container";
|
|
52
|
-
import { now, setMonth, getMonth, addMonths, subtractMonths, getStartOfWeek, getStartOfDate, getStartOfMonth, addDays, cloneDate, formatDate, localizeDate, setYear, getYear, isBefore, isAfter, getLocaleData, getFormattedWeekdayInLocale, getWeekdayShortInLocale, getWeekdayMinInLocale, isSameDay, allDaysDisabledBefore, allDaysDisabledAfter, getEffectiveMinDate, getEffectiveMaxDate } from "./date_utils";
|
|
53
52
|
import { EuiFocusTrap } from '../../../focus_trap';
|
|
53
|
+
import { EuiScreenReaderOnly } from '../../../accessibility/screen_reader_only';
|
|
54
|
+
import { now, setMonth, getMonth, addMonths, subtractMonths, getStartOfWeek, getStartOfDate, getStartOfMonth, addDays, cloneDate, formatDate, localizeDate, setYear, getYear, isBefore, isAfter, getLocaleData, getFormattedWeekdayInLocale, getWeekdayShortInLocale, getWeekdayMinInLocale, isSameDay, allDaysDisabledBefore, allDaysDisabledAfter, getEffectiveMinDate, getEffectiveMaxDate } from "./date_utils";
|
|
54
55
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
55
56
|
var FocusTrapContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
56
57
|
return ___EmotionJSX("div", _extends({
|
|
@@ -217,10 +218,13 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
217
218
|
var day = addDays(cloneDate(startOfWeek), offset);
|
|
218
219
|
var localeData = getLocaleData(day);
|
|
219
220
|
var weekDayName = _this.formatWeekday(localeData, day);
|
|
221
|
+
var weekDayNameLong = localeData.weekdays(day);
|
|
220
222
|
return ___EmotionJSX("div", {
|
|
221
223
|
key: offset,
|
|
222
224
|
className: "react-datepicker__day-name"
|
|
223
|
-
},
|
|
225
|
+
}, ___EmotionJSX("span", {
|
|
226
|
+
"aria-hidden": "true"
|
|
227
|
+
}, weekDayName), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, weekDayNameLong)));
|
|
224
228
|
}));
|
|
225
229
|
});
|
|
226
230
|
_defineProperty(_assertThisInitialized(_this), "formatWeekday", function (localeData, day) {
|
|
@@ -57,6 +57,9 @@ function hasPreSelectionChanged(date1, date2) {
|
|
|
57
57
|
}
|
|
58
58
|
function hasSelectionChanged(date1, date2) {
|
|
59
59
|
if (date1 && date2) {
|
|
60
|
+
if (date1._isValid === false && date2._isValid === false) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
60
63
|
return !equals(date1, date2);
|
|
61
64
|
}
|
|
62
65
|
return false;
|
|
@@ -77,6 +80,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
77
80
|
return _this.props.openToDate ? newDate(_this.props.openToDate) : _this.props.selectsEnd && _this.props.startDate ? newDate(_this.props.startDate) : _this.props.selectsStart && _this.props.endDate ? newDate(_this.props.endDate) : now(_this.props.utcOffset);
|
|
78
81
|
});
|
|
79
82
|
_defineProperty(_assertThisInitialized(_this), "calcInitialState", function () {
|
|
83
|
+
var _this$props$selected;
|
|
80
84
|
var defaultPreSelection = _this.getPreSelection();
|
|
81
85
|
var minDate = getEffectiveMinDate(_this.props);
|
|
82
86
|
var maxDate = getEffectiveMaxDate(_this.props);
|
|
@@ -84,7 +88,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
84
88
|
return {
|
|
85
89
|
open: _this.props.startOpen || false,
|
|
86
90
|
preventFocus: false,
|
|
87
|
-
preSelection: _this.props.selected ? newDate(_this.props.selected) : boundedPreSelection,
|
|
91
|
+
preSelection: (_this$props$selected = _this.props.selected) !== null && _this$props$selected !== void 0 && _this$props$selected._isValid ? newDate(_this.props.selected) : boundedPreSelection,
|
|
88
92
|
// transforming highlighted days (perhaps nested array)
|
|
89
93
|
// to flat Map for faster access in day.jsx
|
|
90
94
|
highlightDates: getHightLightDaysMap(_this.props.highlightDates),
|
|
@@ -436,6 +440,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
436
440
|
_this.onClearClick();
|
|
437
441
|
});
|
|
438
442
|
_defineProperty(_assertThisInitialized(_this), "renderCalendar", function () {
|
|
443
|
+
var _this$props$selected2;
|
|
439
444
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
440
445
|
return null;
|
|
441
446
|
}
|
|
@@ -451,7 +456,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
451
456
|
useWeekdaysShort: _this.props.useWeekdaysShort,
|
|
452
457
|
formatWeekDay: _this.props.formatWeekDay,
|
|
453
458
|
dropdownMode: _this.props.dropdownMode,
|
|
454
|
-
selected: _this.props.selected,
|
|
459
|
+
selected: (_this$props$selected2 = _this.props.selected) !== null && _this$props$selected2 !== void 0 && _this$props$selected2._isValid ? _this.props.selected : undefined,
|
|
455
460
|
preSelection: _this.state.preSelection,
|
|
456
461
|
onSelect: _this.handleSelect,
|
|
457
462
|
onWeekSelect: _this.props.onWeekSelect,
|
|
@@ -252,9 +252,7 @@ var Time = /*#__PURE__*/function (_React$Component) {
|
|
|
252
252
|
});
|
|
253
253
|
var screenReaderInstructions;
|
|
254
254
|
if (this.state.readInstructions) {
|
|
255
|
-
screenReaderInstructions = ___EmotionJSX("p",
|
|
256
|
-
"aria-live": true
|
|
257
|
-
}, "You are a in a time selector. Use the up and down keys to select from other common times then press enter to confirm.", this.state.preSelection ? "".concat(formatDate(this.state.preSelection, this.timeFormat), " is currently\n focused.") : "No time is currently focused.");
|
|
255
|
+
screenReaderInstructions = ___EmotionJSX(React.Fragment, null, ___EmotionJSX("p", null, "You are a in a time selector. Use the up and down keys to select from other common times then press enter to confirm."), ___EmotionJSX("p", null, this.state.preSelection ? "".concat(formatDate(this.state.preSelection, this.timeFormat), " is currently\n focused.") : "No time is currently focused."));
|
|
258
256
|
}
|
|
259
257
|
return ___EmotionJSX("div", {
|
|
260
258
|
className: classNames
|
|
@@ -265,7 +263,10 @@ var Time = /*#__PURE__*/function (_React$Component) {
|
|
|
265
263
|
}
|
|
266
264
|
}, ___EmotionJSX("div", {
|
|
267
265
|
className: "react-datepicker-time__header"
|
|
268
|
-
}, this.props.timeCaption), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span",
|
|
266
|
+
}, this.props.timeCaption), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", {
|
|
267
|
+
"aria-live": "polite",
|
|
268
|
+
"aria-atomic": "false"
|
|
269
|
+
}, screenReaderInstructions))), ___EmotionJSX("div", {
|
|
269
270
|
className: "react-datepicker__time"
|
|
270
271
|
}, ___EmotionJSX("div", {
|
|
271
272
|
className: timeBoxClassNames,
|
|
@@ -18,8 +18,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
18
18
|
|
|
19
19
|
import React, { useState, createContext } from 'react';
|
|
20
20
|
import { DragDropContext } from '@hello-pangea/dnd';
|
|
21
|
-
|
|
22
|
-
// export interface EuiDragDropContextProps extends DragDropContextProps {}
|
|
23
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
22
|
export var EuiDragDropContextContext = /*#__PURE__*/createContext({
|
|
25
23
|
isDraggingType: null
|
|
@@ -40,9 +40,10 @@ var EuiFlexGroupInternal = function EuiFlexGroupInternal(_ref, ref) {
|
|
|
40
40
|
var cssStyles = [styles.euiFlexGroup, responsive && !direction.includes('column') && styles.responsive, wrap && styles.wrap, styles.gutterSizes[gutterSize], styles.justifyContent[justifyContent], styles.alignItems[alignItems], styles.direction[direction]];
|
|
41
41
|
var classes = classNames('euiFlexGroup', className);
|
|
42
42
|
|
|
43
|
-
// Cast
|
|
44
|
-
//
|
|
45
|
-
//
|
|
43
|
+
// Cast `component` to FunctionComponent to simplify its type.
|
|
44
|
+
// Note that FunctionComponent type is used here for purely typing
|
|
45
|
+
// convenience since we specify the return type above, and function
|
|
46
|
+
// components don't support `ref`s, but that doesn't matter in this case.
|
|
46
47
|
var Component = component;
|
|
47
48
|
return ___EmotionJSX(Component, _extends({}, rest, {
|
|
48
49
|
ref: ref,
|
|
@@ -31,9 +31,10 @@ var EuiFlexItemInternal = function EuiFlexItemInternal(_ref, ref) {
|
|
|
31
31
|
var cssStyles = [styles.euiFlexItem, !grow ? styles.growZero : styles.grow, grow && (typeof grow === 'number' ? styles.growSizes[grow] : styles.growSizes['1'])];
|
|
32
32
|
var classes = classNames('euiFlexItem', className);
|
|
33
33
|
|
|
34
|
-
// Cast
|
|
35
|
-
//
|
|
36
|
-
//
|
|
34
|
+
// Cast `component` to FunctionComponent to simplify its type.
|
|
35
|
+
// Note that FunctionComponent type is used here for purely typing
|
|
36
|
+
// convenience since we specify the return type above, and function
|
|
37
|
+
// components don't support `ref`s, but that doesn't matter in this case.
|
|
37
38
|
var Component = component;
|
|
38
39
|
return ___EmotionJSX(Component, _extends({}, rest, {
|
|
39
40
|
ref: ref,
|
|
@@ -386,7 +386,7 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
|
|
|
386
386
|
// Non-overridable props
|
|
387
387
|
side: "min",
|
|
388
388
|
min: min,
|
|
389
|
-
max: Number(this.upperValue),
|
|
389
|
+
max: this.upperValue === '' ? max : Number(this.upperValue),
|
|
390
390
|
step: step,
|
|
391
391
|
compressed: compressed,
|
|
392
392
|
autoSize: !showInputOnly,
|
|
@@ -441,7 +441,7 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
|
|
|
441
441
|
}, maxInputProps, {
|
|
442
442
|
// Non-overridable props
|
|
443
443
|
side: "max",
|
|
444
|
-
min: Number(this.lowerValue),
|
|
444
|
+
min: this.lowerValue === '' ? min : Number(this.lowerValue),
|
|
445
445
|
max: max,
|
|
446
446
|
step: step,
|
|
447
447
|
compressed: compressed,
|
|
@@ -491,18 +491,18 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
+
var optionArray = visibleOptions || options;
|
|
494
495
|
if (prevProps.visibleOptions !== visibleOptions || prevProps.options !== options) {
|
|
495
|
-
var optionArray = visibleOptions || options;
|
|
496
496
|
this.setState(_objectSpread({
|
|
497
497
|
optionArray: optionArray,
|
|
498
498
|
itemData: _objectSpread({}, optionArray)
|
|
499
499
|
}, this.calculateAriaSetAttrs(optionArray)));
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
// ensure that ListRow updates based on item props
|
|
503
|
-
if (isVirtualized) {
|
|
500
|
+
} else if (isVirtualized) {
|
|
501
|
+
// ensure that ListRow updates based on item props
|
|
504
502
|
if (prevProps.allowExclusions !== allowExclusions || prevProps.showIcons !== showIcons || prevProps.paddingSize !== paddingSize || prevProps.textWrap !== textWrap || prevProps.onFocusBadge !== onFocusBadge || prevProps.searchable !== searchable) {
|
|
505
|
-
this.
|
|
503
|
+
this.setState({
|
|
504
|
+
itemData: _objectSpread({}, optionArray)
|
|
505
|
+
});
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
}
|
|
@@ -130,7 +130,7 @@ EuiTableHeaderCell.propTypes = {
|
|
|
130
130
|
isSorted: PropTypes.bool,
|
|
131
131
|
mobileOptions: PropTypes.any,
|
|
132
132
|
onSort: PropTypes.func,
|
|
133
|
-
scope: PropTypes.
|
|
133
|
+
scope: PropTypes.any,
|
|
134
134
|
width: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.number.isRequired]),
|
|
135
135
|
description: PropTypes.string,
|
|
136
136
|
/**
|
|
@@ -28,6 +28,7 @@ export var EuiTableHeaderCellCheckbox = function EuiTableHeaderCellCheckbox(_ref
|
|
|
28
28
|
var classes = classNames('euiTableHeaderCellCheckbox', className);
|
|
29
29
|
var styles = useEuiMemoizedStyles(euiTableCellCheckboxStyles);
|
|
30
30
|
var inlineStyles = resolveWidthAsStyle(style, width);
|
|
31
|
+
console.log('inlineStyles', inlineStyles);
|
|
31
32
|
return ___EmotionJSX("th", _extends({
|
|
32
33
|
css: styles.euiTableHeaderCellCheckbox,
|
|
33
34
|
className: classes,
|
|
@@ -43,5 +44,5 @@ EuiTableHeaderCellCheckbox.propTypes = {
|
|
|
43
44
|
"data-test-subj": PropTypes.string,
|
|
44
45
|
css: PropTypes.any,
|
|
45
46
|
width: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.number.isRequired]),
|
|
46
|
-
scope: PropTypes.
|
|
47
|
+
scope: PropTypes.any
|
|
47
48
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
|
|
9
|
+
export var HEADER_CELL_SCOPE = ['col', 'row', 'colgroup', 'rowgroup'];
|