@elastic/eui 101.0.0 → 101.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.
@@ -11,6 +11,7 @@ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.fre
11
11
  import { css, keyframes } from '@emotion/react';
12
12
  import { euiShadow } from '@elastic/eui-theme-common';
13
13
  import { euiCanAnimate, logicalCSS, mathWithUnits } from '../../global_styling';
14
+ import { cssSupportsHasWithNextSibling } from '../../global_styling/functions/supports';
14
15
  import { euiTableVariables } from './table.styles';
15
16
  export var euiTableRowStyles = function euiTableRowStyles(euiThemeContext) {
16
17
  var euiTheme = euiThemeContext.euiTheme;
@@ -34,7 +35,7 @@ export var euiTableRowStyles = function euiTableRowStyles(euiThemeContext) {
34
35
  mobile: {
35
36
  mobile: /*#__PURE__*/css("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", logicalCSS('margin-bottom', cellContentPadding), euiShadow(euiThemeContext, 's', {
36
37
  borderAllInHighContrastMode: true
37
- }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";&:has(+ .euiTableRow-isExpandedRow){", logicalCSS('border-bottom-left-radius', 0), " ", logicalCSS('border-bottom-right-radius', 0), ";};label:mobile;"),
38
+ }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";", cssSupportsHasWithNextSibling("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat(logicalCSS('border-bottom-left-radius', 0), "\n ").concat(logicalCSS('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
38
39
  selected: /*#__PURE__*/css("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.color, ";};label:selected;"),
39
40
  /**
40
41
  * Left column offset (no border)
@@ -0,0 +1,18 @@
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 cssSupportsSelector = function cssSupportsSelector(selector, value) {
10
+ return "\n @supports selector(".concat(selector, ") {").concat(value, "}\n ");
11
+ };
12
+
13
+ /**
14
+ * Util to check if the "previous sibling" selector :has(+) is supported
15
+ */
16
+ export var cssSupportsHasWithNextSibling = function cssSupportsHasWithNextSibling(value) {
17
+ return cssSupportsSelector(':has(+ *)', value);
18
+ };
package/eui.d.ts CHANGED
@@ -5422,6 +5422,14 @@ declare module '@elastic/eui/src/components/table/mobile/table_sort_mobile' {
5422
5422
  }
5423
5423
  export {};
5424
5424
 
5425
+ }
5426
+ declare module '@elastic/eui/src/global_styling/functions/supports' {
5427
+ export const cssSupportsSelector: (selector: string, value: string) => string;
5428
+ /**
5429
+ * Util to check if the "previous sibling" selector :has(+) is supported
5430
+ */
5431
+ export const cssSupportsHasWithNextSibling: (value: string) => string;
5432
+
5425
5433
  }
5426
5434
  declare module '@elastic/eui/src/components/table/table_row.styles' {
5427
5435
  import { UseEuiTheme } from '@elastic/eui/src/services';
@@ -7,6 +7,7 @@ exports.euiTableRowStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _euiThemeCommon = require("@elastic/eui-theme-common");
9
9
  var _global_styling = require("../../global_styling");
10
+ var _supports = require("../../global_styling/functions/supports");
10
11
  var _table = require("./table.styles");
11
12
  var _templateObject;
12
13
  /*
@@ -39,7 +40,7 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
39
40
  mobile: {
40
41
  mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), (0, _euiThemeCommon.euiShadow)(euiThemeContext, 's', {
41
42
  borderAllInHighContrastMode: true
42
- }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";&:has(+ .euiTableRow-isExpandedRow){", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), ";};label:mobile;"),
43
+ }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";", (0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
43
44
  selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.color, ";};label:selected;"),
44
45
  /**
45
46
  * Left column offset (no border)
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.cssSupportsSelector = exports.cssSupportsHasWithNextSibling = void 0;
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
+
15
+ var cssSupportsSelector = exports.cssSupportsSelector = function cssSupportsSelector(selector, value) {
16
+ return "\n @supports selector(".concat(selector, ") {").concat(value, "}\n ");
17
+ };
18
+
19
+ /**
20
+ * Util to check if the "previous sibling" selector :has(+) is supported
21
+ */
22
+ var cssSupportsHasWithNextSibling = exports.cssSupportsHasWithNextSibling = function cssSupportsHasWithNextSibling(value) {
23
+ return cssSupportsSelector(':has(+ *)', value);
24
+ };
@@ -11,6 +11,7 @@ var _templateObject;
11
11
  import { css, keyframes } from '@emotion/react';
12
12
  import { euiShadow } from '@elastic/eui-theme-common';
13
13
  import { euiCanAnimate, logicalCSS, mathWithUnits } from '../../global_styling';
14
+ import { cssSupportsHasWithNextSibling } from '../../global_styling/functions/supports';
14
15
  import { euiTableVariables } from './table.styles';
15
16
  export var euiTableRowStyles = function euiTableRowStyles(euiThemeContext) {
16
17
  var euiTheme = euiThemeContext.euiTheme;
@@ -34,7 +35,7 @@ export var euiTableRowStyles = function euiTableRowStyles(euiThemeContext) {
34
35
  mobile: {
35
36
  mobile: /*#__PURE__*/css("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", logicalCSS('margin-bottom', cellContentPadding), euiShadow(euiThemeContext, 's', {
36
37
  borderAllInHighContrastMode: true
37
- }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";&:has(+ .euiTableRow-isExpandedRow){", logicalCSS('border-bottom-left-radius', 0), " ", logicalCSS('border-bottom-right-radius', 0), ";};label:mobile;"),
38
+ }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";", cssSupportsHasWithNextSibling("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat(logicalCSS('border-bottom-left-radius', 0), "\n ").concat(logicalCSS('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
38
39
  selected: /*#__PURE__*/css("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.color, ";};label:selected;"),
39
40
  /**
40
41
  * Left column offset (no border)
@@ -0,0 +1,18 @@
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 cssSupportsSelector = function cssSupportsSelector(selector, value) {
10
+ return "\n @supports selector(".concat(selector, ") {").concat(value, "}\n ");
11
+ };
12
+
13
+ /**
14
+ * Util to check if the "previous sibling" selector :has(+) is supported
15
+ */
16
+ export var cssSupportsHasWithNextSibling = function cssSupportsHasWithNextSibling(value) {
17
+ return cssSupportsSelector(':has(+ *)', value);
18
+ };
@@ -9,6 +9,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _euiThemeCommon = require("@elastic/eui-theme-common");
11
11
  var _global_styling = require("../../global_styling");
12
+ var _supports = require("../../global_styling/functions/supports");
12
13
  var _table = require("./table.styles");
13
14
  var _templateObject;
14
15
  /*
@@ -40,7 +41,7 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
40
41
  mobile: {
41
42
  mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), (0, _euiThemeCommon.euiShadow)(euiThemeContext, 's', {
42
43
  borderAllInHighContrastMode: true
43
- }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";&:has(+ .euiTableRow-isExpandedRow){", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), ";};label:mobile;"),
44
+ }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";", (0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
44
45
  selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.color, ";};label:selected;"),
45
46
  /**
46
47
  * Left column offset (no border)
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.cssSupportsSelector = exports.cssSupportsHasWithNextSibling = void 0;
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
+
15
+ var cssSupportsSelector = exports.cssSupportsSelector = function cssSupportsSelector(selector, value) {
16
+ return "\n @supports selector(".concat(selector, ") {").concat(value, "}\n ");
17
+ };
18
+
19
+ /**
20
+ * Util to check if the "previous sibling" selector :has(+) is supported
21
+ */
22
+ var cssSupportsHasWithNextSibling = exports.cssSupportsHasWithNextSibling = function cssSupportsHasWithNextSibling(value) {
23
+ return cssSupportsSelector(':has(+ *)', value);
24
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "101.0.0",
4
+ "version": "101.1.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -52,7 +52,7 @@
52
52
  "url": "https://github.com/elastic/eui.git"
53
53
  },
54
54
  "dependencies": {
55
- "@elastic/eui-theme-common": "0.0.11",
55
+ "@elastic/eui-theme-common": "0.1.0",
56
56
  "@elastic/prismjs-esql": "^1.0.0",
57
57
  "@hello-pangea/dnd": "^16.6.0",
58
58
  "@types/lodash": "^4.14.202",
@@ -106,7 +106,7 @@
106
106
  "@cypress/webpack-dev-server": "^1.7.0",
107
107
  "@elastic/charts": "^64.1.0",
108
108
  "@elastic/datemath": "^5.0.3",
109
- "@elastic/eui-theme-borealis": "0.0.11",
109
+ "@elastic/eui-theme-borealis": "0.1.0",
110
110
  "@emotion/babel-preset-css-prop": "^11.11.0",
111
111
  "@emotion/cache": "^11.11.0",
112
112
  "@emotion/css": "^11.11.0",
@@ -259,7 +259,7 @@
259
259
  },
260
260
  "peerDependencies": {
261
261
  "@elastic/datemath": "^5.0.2",
262
- "@elastic/eui-theme-borealis": "0.0.11",
262
+ "@elastic/eui-theme-borealis": "0.1.0",
263
263
  "@emotion/css": "11.x",
264
264
  "@emotion/react": "11.x",
265
265
  "@types/react": "^16.9 || ^17.0 || ^18.0",
@@ -9,6 +9,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _euiThemeCommon = require("@elastic/eui-theme-common");
11
11
  var _global_styling = require("../../global_styling");
12
+ var _supports = require("../../global_styling/functions/supports");
12
13
  var _table = require("./table.styles");
13
14
  var _templateObject;
14
15
  /*
@@ -40,7 +41,7 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
40
41
  mobile: {
41
42
  mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), (0, _euiThemeCommon.euiShadow)(euiThemeContext, 's', {
42
43
  borderAllInHighContrastMode: true
43
- }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";&:has(+ .euiTableRow-isExpandedRow){", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), ";};label:mobile;"),
44
+ }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";", (0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
44
45
  selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.color, ";};label:selected;"),
45
46
  /**
46
47
  * Left column offset (no border)
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.cssSupportsSelector = exports.cssSupportsHasWithNextSibling = void 0;
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
+
15
+ var cssSupportsSelector = exports.cssSupportsSelector = function cssSupportsSelector(selector, value) {
16
+ return "\n @supports selector(".concat(selector, ") {").concat(value, "}\n ");
17
+ };
18
+
19
+ /**
20
+ * Util to check if the "previous sibling" selector :has(+) is supported
21
+ */
22
+ var cssSupportsHasWithNextSibling = exports.cssSupportsHasWithNextSibling = function cssSupportsHasWithNextSibling(value) {
23
+ return cssSupportsSelector(':has(+ *)', value);
24
+ };