@elastic/eui-theme-common 0.0.4 → 0.0.6

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.
Files changed (32) hide show
  1. package/lib/cjs/global_styling/functions/index.d.ts +1 -0
  2. package/lib/cjs/global_styling/functions/index.d.ts.map +1 -1
  3. package/lib/cjs/global_styling/functions/index.js +11 -0
  4. package/lib/cjs/global_styling/functions/index.js.map +1 -1
  5. package/lib/cjs/global_styling/functions/math.d.ts +13 -0
  6. package/lib/cjs/global_styling/functions/math.d.ts.map +1 -0
  7. package/lib/cjs/global_styling/functions/math.js +64 -0
  8. package/lib/cjs/global_styling/functions/math.js.map +1 -0
  9. package/lib/cjs/global_styling/functions/math.test.js +110 -0
  10. package/lib/cjs/global_styling/functions/math.test.js.map +1 -0
  11. package/lib/cjs/global_styling/variables/colors.d.ts +22 -2
  12. package/lib/cjs/global_styling/variables/colors.d.ts.map +1 -1
  13. package/lib/cjs/global_styling/variables/colors.js.map +1 -1
  14. package/lib/cjs/global_styling/variables/components.d.ts +6 -2
  15. package/lib/cjs/global_styling/variables/components.d.ts.map +1 -1
  16. package/lib/cjs/global_styling/variables/components.js.map +1 -1
  17. package/lib/cjs/global_styling/variables/forms.d.ts +3 -0
  18. package/lib/cjs/global_styling/variables/forms.d.ts.map +1 -1
  19. package/lib/cjs/global_styling/variables/forms.js.map +1 -1
  20. package/lib/esm/global_styling/functions/index.d.ts +1 -0
  21. package/lib/esm/global_styling/functions/index.js +1 -0
  22. package/lib/esm/global_styling/functions/index.js.map +1 -1
  23. package/lib/esm/global_styling/functions/math.d.ts +12 -0
  24. package/lib/esm/global_styling/functions/math.js +45 -0
  25. package/lib/esm/global_styling/functions/math.js.map +1 -0
  26. package/lib/esm/global_styling/functions/math.test.d.ts +1 -0
  27. package/lib/esm/global_styling/functions/math.test.js +67 -0
  28. package/lib/esm/global_styling/functions/math.test.js.map +1 -0
  29. package/lib/esm/global_styling/variables/colors.d.ts +22 -2
  30. package/lib/esm/global_styling/variables/components.d.ts +6 -2
  31. package/lib/esm/global_styling/variables/forms.d.ts +3 -0
  32. package/package.json +1 -1
@@ -1,2 +1,3 @@
1
1
  export * from './size';
2
+ export * from './math';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/functions/index.ts"],"names":[],"mappings":"AAQA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/functions/index.ts"],"names":[],"mappings":"AAQA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
@@ -14,4 +14,15 @@ Object.keys(_size).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
+ var _math = require("./math");
18
+ Object.keys(_math).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _math[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _math[key];
25
+ }
26
+ });
27
+ });
17
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_size","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/global_styling/functions/index.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nexport * from './size';\n"],"mappings":";;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_size","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_math"],"sources":["../../../../src/global_styling/functions/index.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nexport * from './size';\nexport * from './math';\n"],"mappings":";;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Utility for performing math callbacks on a string with CSS units
3
+ * and returning a string with its unit preserved.
4
+ *
5
+ * Example usage:
6
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
7
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
8
+ * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
9
+ */
10
+ declare type ValueTypes = string | number | undefined;
11
+ export declare const mathWithUnits: (values: ValueTypes | ValueTypes[], callback: (...args: number[]) => number, unit?: string) => string;
12
+ export {};
13
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/functions/math.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,aAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9C,eAAO,MAAM,aAAa,WAChB,UAAU,GAAG,UAAU,EAAE,sBACb,MAAM,EAAE,KAAK,MAAM,SACjC,MAAM,WAqCb,CAAC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.mathWithUnits = void 0;
8
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
9
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
10
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
11
+ /*
12
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
13
+ * or more contributor license agreements. Licensed under the Elastic License
14
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
15
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
16
+ * Side Public License, v 1.
17
+ */
18
+
19
+ /**
20
+ * Utility for performing math callbacks on a string with CSS units
21
+ * and returning a string with its unit preserved.
22
+ *
23
+ * Example usage:
24
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
25
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
26
+ * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
27
+ */
28
+ // Unfortunately, this is the CSSProperties[] type used for several euiTheme vars
29
+
30
+ var mathWithUnits = exports.mathWithUnits = function mathWithUnits(values, callback) {
31
+ var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
32
+ if (!Array.isArray(values)) values = [values];
33
+ var foundNumericValues = [];
34
+ var foundUnit = '';
35
+ values.forEach(function (value) {
36
+ if (typeof value === 'string') {
37
+ var _matches$groups, _matches$groups2;
38
+ var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\d.]+)(%|[a-zA-Z]*)/, {
39
+ value: 1,
40
+ unit: 2
41
+ });
42
+ var matches = regex.exec(value);
43
+ var numericValue = Number(matches === null || matches === void 0 || (_matches$groups = matches.groups) === null || _matches$groups === void 0 ? void 0 : _matches$groups.value);
44
+ if (!isNaN(numericValue)) {
45
+ foundNumericValues.push(numericValue);
46
+ } else {
47
+ throw new Error('No valid numeric value found');
48
+ }
49
+ if (!unit && matches !== null && matches !== void 0 && (_matches$groups2 = matches.groups) !== null && _matches$groups2 !== void 0 && _matches$groups2.unit) {
50
+ if (!foundUnit) {
51
+ foundUnit = matches.groups.unit;
52
+ } else if (foundUnit !== matches.groups.unit) {
53
+ throw new Error('Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead');
54
+ }
55
+ }
56
+ } else if (typeof value === 'number') {
57
+ foundNumericValues.push(value);
58
+ } else {
59
+ throw new Error('Invalid value type - pass a string or number');
60
+ }
61
+ });
62
+ return "".concat(callback.apply(void 0, foundNumericValues)).concat(unit || foundUnit);
63
+ };
64
+ //# sourceMappingURL=math.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.js","names":["mathWithUnits","exports","values","callback","unit","arguments","length","undefined","Array","isArray","foundNumericValues","foundUnit","forEach","value","_matches$groups","_matches$groups2","regex","_wrapRegExp","matches","exec","numericValue","Number","groups","isNaN","push","Error","concat","apply"],"sources":["../../../../src/global_styling/functions/math.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\n/**\n * Utility for performing math callbacks on a string with CSS units\n * and returning a string with its unit preserved.\n *\n * Example usage:\n * mathWithUnits('4px', (x) => x / 2) = '2px';\n * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';\n * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';\n */\ntype ValueTypes = string | number | undefined; // Unfortunately, this is the CSSProperties[] type used for several euiTheme vars\n\nexport const mathWithUnits = (\n values: ValueTypes | ValueTypes[], // Can accept a single input or array of inputs\n callback: (...args: number[]) => number, // Can be multiplication, division, addition, etc.\n unit: string = '' // Optional: allow specifying an override unit to return\n) => {\n if (!Array.isArray(values)) values = [values];\n\n const foundNumericValues: number[] = [];\n let foundUnit = '';\n\n values.forEach((value) => {\n if (typeof value === 'string') {\n const regex = /(?<value>-?[\\d.]+)(?<unit>%|[a-zA-Z]*)/;\n const matches = regex.exec(value);\n\n const numericValue = Number(matches?.groups?.value);\n\n if (!isNaN(numericValue)) {\n foundNumericValues.push(numericValue);\n } else {\n throw new Error('No valid numeric value found');\n }\n\n if (!unit && matches?.groups?.unit) {\n if (!foundUnit) {\n foundUnit = matches.groups.unit;\n } else if (foundUnit !== matches.groups.unit) {\n throw new Error(\n 'Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead'\n );\n }\n }\n } else if (typeof value === 'number') {\n foundNumericValues.push(value);\n } else {\n throw new Error('Invalid value type - pass a string or number');\n }\n });\n\n return `${callback(...foundNumericValues)}${unit || foundUnit}`;\n};\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+C;;AAExC,IAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,S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CAAC;QACH;MACF;IACF,CAAC,MAAM,IAAI,OAAOZ,KAAK,KAAK,QAAQ,EAAE;MACpCH,kBAAkB,CAACc,IAAI,CAACX,KAAK,CAAC;IAChC,CAAC,MAAM;MACL,MAAM,IAAIY,KAAK,CAAC,8CAA8C,CAAC;IACjE;EACF,CAAC,CAAC;EAEF,UAAAC,MAAA,CAAUvB,QAAQ,CAAAwB,KAAA,SAAIjB,kBAAkB,CAAC,EAAAgB,MAAA,CAAGtB,IAAI,IAAIO,SAAS;AAC/D,CAAC","ignoreList":[]}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ var _math = require("./math");
4
+ /*
5
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
+ * or more contributor license agreements. Licensed under the Elastic License
7
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
8
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
9
+ * Side Public License, v 1.
10
+ */
11
+
12
+ describe('mathWithUnits', function () {
13
+ describe('extracts numerical values from CSS strings with units, performs math callbacks, and returns units as is', function () {
14
+ test('px and multiplication', function () {
15
+ expect((0, _math.mathWithUnits)('10px', function (x) {
16
+ return x * 10;
17
+ })).toEqual('100px');
18
+ });
19
+ test('em and division', function () {
20
+ expect((0, _math.mathWithUnits)('40%', function (x) {
21
+ return x / 2;
22
+ })).toEqual('20%');
23
+ });
24
+ test('rem and addition', function () {
25
+ expect((0, _math.mathWithUnits)('1rem', function (x) {
26
+ return x + 2;
27
+ })).toEqual('3rem');
28
+ });
29
+ test('unitless and negative values', function () {
30
+ expect((0, _math.mathWithUnits)('-5.5', function (x) {
31
+ return x - 1.2;
32
+ })).toEqual('-6.7');
33
+ });
34
+ test('allows passing an optional unit if none is passed', function () {
35
+ expect((0, _math.mathWithUnits)('0', function (x) {
36
+ return x;
37
+ }, 'vh')).toEqual('0vh');
38
+ });
39
+ });
40
+ describe('handles numeric input types', function () {
41
+ test('unitless', function () {
42
+ expect((0, _math.mathWithUnits)(6, function (x) {
43
+ return Math.pow(x, 2);
44
+ })).toEqual('36');
45
+ });
46
+ test('allows passing an optional unit', function () {
47
+ expect((0, _math.mathWithUnits)(3.5, function (x) {
48
+ return x % 1.5;
49
+ }, 'px')).toEqual('0.5px');
50
+ });
51
+ });
52
+ describe('multiple inputs', function () {
53
+ it('accepts an array of inputs, parses each input, and returns them as a separate arg to the callback', function () {
54
+ expect((0, _math.mathWithUnits)(['3px', '4px', '5px'], function (x, y, z) {
55
+ return x + y + z;
56
+ })).toEqual('12px');
57
+ });
58
+ it('allows mixing strings and numbers', function () {
59
+ expect((0, _math.mathWithUnits)(['6px', 3], function (x, y) {
60
+ return x / y;
61
+ })).toEqual('2px');
62
+ });
63
+ it('throws on multiple different unit types', function () {
64
+ expect(function () {
65
+ return (0, _math.mathWithUnits)(['1px', '1em'], function (x, y) {
66
+ return x + y;
67
+ });
68
+ }).toThrow('Multiple units found');
69
+ });
70
+ it('allows different unit types if an override unit is passed', function () {
71
+ expect((0, _math.mathWithUnits)(['50%', '5rem'], function (x, y) {
72
+ return x / y;
73
+ }, 'px')).toEqual('10px');
74
+ });
75
+ });
76
+ describe('weird edge cases', function () {
77
+ it('throws on undefined', function () {
78
+ expect(function () {
79
+ return (0, _math.mathWithUnits)(undefined, function (x) {
80
+ return x * 3;
81
+ });
82
+ }).toThrow('Invalid value type');
83
+ });
84
+ it('throws on strings that do not contain numbers', function () {
85
+ expect(function () {
86
+ return (0, _math.mathWithUnits)('no number', function (x) {
87
+ return x * 3;
88
+ });
89
+ }).toThrow('No valid numeric value found');
90
+ });
91
+ it('throws on strings with numbers that are actually NaNs', function () {
92
+ expect(function () {
93
+ return (0, _math.mathWithUnits)('34.23.12', function (x) {
94
+ return x * 3;
95
+ });
96
+ }).toThrow('No valid numeric value found');
97
+ });
98
+ it('ignores multiple values/units, only using the first match', function () {
99
+ expect((0, _math.mathWithUnits)('10px 20px', function (x) {
100
+ return x;
101
+ })).toEqual('10px');
102
+ });
103
+ it('ignores multiple percentage signs', function () {
104
+ expect((0, _math.mathWithUnits)('100%%%', function (x) {
105
+ return x;
106
+ })).toEqual('100%');
107
+ });
108
+ });
109
+ });
110
+ //# sourceMappingURL=math.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.test.js","names":["_math","require","describe","test","expect","mathWithUnits","x","toEqual","Math","pow","it","y","z","toThrow","undefined"],"sources":["../../../../src/global_styling/functions/math.test.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { mathWithUnits } from './math';\n\ndescribe('mathWithUnits', () => {\n describe('extracts numerical values from CSS strings with units, performs math callbacks, and returns units as is', () => {\n test('px and multiplication', () => {\n expect(mathWithUnits('10px', (x) => x * 10)).toEqual('100px');\n });\n test('em and division', () => {\n expect(mathWithUnits('40%', (x) => x / 2)).toEqual('20%');\n });\n test('rem and addition', () => {\n expect(mathWithUnits('1rem', (x) => x + 2)).toEqual('3rem');\n });\n test('unitless and negative values', () => {\n expect(mathWithUnits('-5.5', (x) => x - 1.2)).toEqual('-6.7');\n });\n test('allows passing an optional unit if none is passed', () => {\n expect(mathWithUnits('0', (x) => x, 'vh')).toEqual('0vh');\n });\n });\n\n describe('handles numeric input types', () => {\n test('unitless', () => {\n expect(mathWithUnits(6, (x) => Math.pow(x, 2))).toEqual('36');\n });\n test('allows passing an optional unit', () => {\n expect(mathWithUnits(3.5, (x) => x % 1.5, 'px')).toEqual('0.5px');\n });\n });\n\n describe('multiple inputs', () => {\n it('accepts an array of inputs, parses each input, and returns them as a separate arg to the callback', () => {\n expect(\n mathWithUnits(['3px', '4px', '5px'], (x, y, z) => x + y + z)\n ).toEqual('12px');\n });\n it('allows mixing strings and numbers', () => {\n expect(mathWithUnits(['6px', 3], (x, y) => x / y)).toEqual('2px');\n });\n it('throws on multiple different unit types', () => {\n expect(() => mathWithUnits(['1px', '1em'], (x, y) => x + y)).toThrow(\n 'Multiple units found'\n );\n });\n it('allows different unit types if an override unit is passed', () => {\n expect(mathWithUnits(['50%', '5rem'], (x, y) => x / y, 'px')).toEqual(\n '10px'\n );\n });\n });\n\n describe('weird edge cases', () => {\n it('throws on undefined', () => {\n expect(() => mathWithUnits(undefined, (x) => x * 3)).toThrow(\n 'Invalid value type'\n );\n });\n it('throws on strings that do not contain numbers', () => {\n expect(() => mathWithUnits('no number', (x) => x * 3)).toThrow(\n 'No valid numeric value found'\n );\n });\n it('throws on strings with numbers that are actually NaNs', () => {\n expect(() => mathWithUnits('34.23.12', (x) => x * 3)).toThrow(\n 'No valid numeric value found'\n );\n });\n it('ignores multiple values/units, only using the first match', () => {\n expect(mathWithUnits('10px 20px', (x) => x)).toEqual('10px');\n });\n it('ignores multiple percentage signs', () => {\n expect(mathWithUnits('100%%%', (x) => x)).toEqual('100%');\n });\n });\n});\n"],"mappings":";;AAQA,IAAAA,KAAA,GAAAC,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIAC,QAAQ,CAAC,eAAe,EAAE,YAAM;EAC9BA,QAAQ,CAAC,yGAAyG,EAAE,YAAM;IACxHC,IAAI,CAAC,uBAAuB,EAAE,YAAM;MAClCC,MAAM,CAAC,IAAAC,mBAAa,EAAC,MAAM,EAAE,UAACC,CAAC;QAAA,OAAKA,CAAC,GAAG,EAAE;MAAA,EAAC,CAAC,CAACC,OAAO,CAAC,OAAO,CAAC;IAC/D,CAAC,CAAC;IACFJ,IAAI,CAAC,iBAAiB,EAAE,YAAM;MAC5BC,MAAM,CAAC,IAAAC,mBAAa,EAAC,KAAK,EAAE,UAACC,CAAC;QAAA,OAAKA,CAAC,GAAG,CAAC;MAAA,EAAC,CAAC,CAACC,OAAO,CAAC,KAAK,CAAC;IAC3D,CAAC,CAAC;IACFJ,IAAI,CAAC,kBAAkB,EAAE,YAAM;MAC7BC,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AAM;MACxDN,MAAM,CAAC;QAAA,OAAM,IAAAC,mBAAa,EAAC,WAAW,EAAE,UAACC,CAAC;UAAA,OAAKA,CAAC,GAAG,CAAC;QAAA,EAAC;MAAA,EAAC,CAACO,OAAO,CAC5D,8BACF,CAAC;IACH,CAAC,CAAC;IACFH,EAAE,CAAC,uDAAuD,EAAE,YAAM;MAChEN,MAAM,CAAC;QAAA,OAAM,IAAAC,mBAAa,EAAC,UAAU,EAAE,UAACC,CAAC;UAAA,OAAKA,CAAC,GAAG,CAAC;QAAA,EAAC;MAAA,EAAC,CAACO,OAAO,CAC3D,8BACF,CAAC;IACH,CAAC,CAAC;IACFH,EAAE,CAAC,2DAA2D,EAAE,YAAM;MACpEN,MAAM,CAAC,IAAAC,mBAAa,EAAC,WAAW,EAAE,UAACC,CAAC;QAAA,OAAKA,CAAC;MAAA,EAAC,CAAC,CAACC,OAAO,CAAC,MAAM,CAAC;IAC9D,CAAC,CAAC;IACFG,EAAE,CAAC,mCAAmC,EAAE,YAAM;MAC5CN,MAAM,CAAC,IAAAC,mBAAa,EAAC,QAAQ,EAAE,UAACC,CAAC;QAAA,OAAKA,CAAC;MAAA,EAAC,CAAC,CAACC,OAAO,CAAC,MAAM,CAAC;IAC3D,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -67,7 +67,7 @@ export declare type _EuiThemeBrandTextColors = {
67
67
  export declare type _EuiThemeShadeColors = {
68
68
  /**
69
69
  * Used as the background color of primary **page content and panels** including modals and flyouts.
70
- * @deprecated - use `white`
70
+ * @deprecated - use specific semantic color tokens instead
71
71
  */
72
72
  emptyShade: ColorModeSwitch;
73
73
  /**
@@ -97,7 +97,7 @@ export declare type _EuiThemeShadeColors = {
97
97
  darkestShade: ColorModeSwitch;
98
98
  /**
99
99
  * The opposite of `emptyShade`
100
- * @deprecated - use`black`
100
+ * @deprecated - use specific semantic color tokens instead
101
101
  */
102
102
  fullShade: ColorModeSwitch;
103
103
  };
@@ -165,6 +165,7 @@ export declare type _EuiThemeBackgroundColors = {
165
165
  backgroundBaseSubdued: ColorModeSwitch;
166
166
  backgroundBasePlain: ColorModeSwitch;
167
167
  backgroundBaseDisabled: ColorModeSwitch;
168
+ backgroundBaseHighlighted: ColorModeSwitch;
168
169
  backgroundBaseFormsPrepend: ColorModeSwitch;
169
170
  backgroundBaseFormsControlDisabled: ColorModeSwitch;
170
171
  backgroundBaseInteractiveHover: ColorModeSwitch;
@@ -206,6 +207,8 @@ export declare type _EuiThemeTransparentBackgroundColors = {
206
207
  /** @deprecated */
207
208
  backgroundTransparentSubdued: ColorModeSwitch;
208
209
  /** @deprecated */
210
+ backgroundTransparentHighlighted: ColorModeSwitch;
211
+ /** @deprecated */
209
212
  backgroundTransparentPlain: ColorModeSwitch;
210
213
  };
211
214
  export declare type _EuiThemeBorderColors = {
@@ -259,6 +262,21 @@ export declare type _EuiThemeVisColors = {
259
262
  euiColorVisDanger0: string;
260
263
  euiColorVisDanger1: string;
261
264
  euiColorVisNeutral0: string;
265
+ euiColorSeverity0: string;
266
+ euiColorSeverity1: string;
267
+ euiColorSeverity2: string;
268
+ euiColorSeverity3: string;
269
+ euiColorSeverity4: string;
270
+ euiColorSeverity5: string;
271
+ euiColorSeverity6: string;
272
+ euiColorSeverity7: string;
273
+ euiColorSeverity8: string;
274
+ euiColorSeverity9: string;
275
+ euiColorSeverity10: string;
276
+ euiColorSeverity11: string;
277
+ euiColorSeverity12: string;
278
+ euiColorSeverity13: string;
279
+ euiColorSeverity14: string;
262
280
  euiColorVisGrey0: string;
263
281
  euiColorVisGrey1: string;
264
282
  euiColorVisGrey2: string;
@@ -283,6 +301,8 @@ export declare type _EuiThemeConstantColors = {
283
301
  * @deprecated
284
302
  */
285
303
  ink: string;
304
+ plainLight: string;
305
+ plainDark: string;
286
306
  vis: _EuiThemeVisColors;
287
307
  };
288
308
  export declare type _EuiThemeColorsMode = _EuiThemeBrandColors & _EuiThemeBrandTextColors & _EuiThemeShadeColors & _EuiThemeSpecialColors & _EuiThemeTextColors & _EuiThemeBackgroundColors & _EuiThemeTransparentBackgroundColors & _EuiThemeBorderColors;
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/variables/colors.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAElE;;GAEG;AACH,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IACjC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,oBAAY,wBAAwB,GAAG;IACrC;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B;;;OAGG;IACH,UAAU,EAAE,eAAe,CAAC;IAC5B;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B;;;OAGG;IACH,UAAU,EAAE,eAAe,CAAC;IAE5B,WAAW,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,eAAe,CAAC;IAC5B,mBAAmB,EAAE,eAAe,CAAC;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC;;;OAGG;IACH,UAAU,EAAE,eAAe,CAAC;IAC5B;;;OAGG;IACH,aAAa,EAAE,eAAe,CAAC;IAC/B;;;OAGG;IACH,UAAU,EAAE,eAAe,CAAC;IAC5B;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B;;;OA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E/B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,mBAAmB,EAAE,MAAM,CAAC;IAE5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,kBAAkB,CAAC;CACzB,CAAC;AAEF,oBAAY,mBAAmB,GAAG,oBAAoB,GACpD,wBAAwB,GACxB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,yBAAyB,GACzB,oCAAoC,GACpC,qBAAqB,CAAC;AAExB,oBAAY,eAAe,GAAG,qBAAqB,CAAC,mBAAmB,CAAC,GACtE,uBAAuB,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/variables/colors.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAElE;;GAEG;AACH,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,MAAM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qB,CAAC,mBAAmB,CAAC,GACtE,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","names":[],"sources":["../../../../src/global_styling/variables/colors.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { ColorModeSwitch, StrictColorModeSwitch } from '../types';\n\n/**\n * Top 5 colors\n */\nexport type _EuiThemeBrandColors = {\n /**\n * Main brand color and used for most **call to actions** like buttons and links.\n */\n primary: ColorModeSwitch;\n /**\n * Pulls attention to key indicators like **notifications** or number of selections.\n */\n accent: ColorModeSwitch;\n /**\n * Secondary attention indicator with lower priority.\n */\n accentSecondary: ColorModeSwitch;\n /**\n * Used for **positive** messages/graphics and additive actions.\n */\n success: ColorModeSwitch;\n /**\n * Used for **warnings** and actions that have a potential to be destructive.\n */\n warning: ColorModeSwitch;\n /**\n * Used for **negative** messages/graphics like errors and destructive actions.\n */\n danger: ColorModeSwitch;\n};\n\n/**\n * Every brand color must have a contrast computed text equivelant\n */\nexport type _EuiThemeBrandTextColors = {\n /**\n * Typically computed against `colors.primary`\n * @deprecated - use `textPrimary` instead\n */\n primaryText: ColorModeSwitch;\n /**\n * Typically computed against `colors.accent`\n * @deprecated - use `textAccent` instead\n */\n accentText: ColorModeSwitch;\n /**\n * Typically computed against `colors.success`\n * @deprecated - use `textSuccess` instead\n */\n successText: ColorModeSwitch;\n /**\n * Typically computed against `colors.warning`\n * @deprecated - use `textWarning` instead\n */\n warningText: ColorModeSwitch;\n /**\n * Typically computed against `colors.danger`\n * @deprecated - use `textDanger` instead\n */\n dangerText: ColorModeSwitch;\n\n textPrimary: ColorModeSwitch;\n textAccent: ColorModeSwitch;\n textAccentSecondary: ColorModeSwitch;\n textSuccess: ColorModeSwitch;\n textWarning: ColorModeSwitch;\n textDanger: ColorModeSwitch;\n};\n\nexport type _EuiThemeShadeColors = {\n /**\n * Used as the background color of primary **page content and panels** including modals and flyouts.\n * @deprecated - use `white`\n */\n emptyShade: ColorModeSwitch;\n /**\n * Used to lightly shade areas that contain **secondary content** or contain panel-like components.\n * @deprecated - use specific semantic color tokens instead\n */\n lightestShade: ColorModeSwitch;\n /**\n * Used for most **borders** and dividers (horizontal rules).\n * @deprecated - use specific semantic color tokens instead\n */\n lightShade: ColorModeSwitch;\n /**\n * The middle gray for all themes; this is the base for `colors.subdued`.\n * @deprecated - use specific semantic color tokens instead\n */\n mediumShade: ColorModeSwitch;\n /**\n * Slightly subtle graphic color\n * @deprecated - use specific semantic color tokens instead\n */\n darkShade: ColorModeSwitch;\n /**\n * Used as the **text** color and the background color for **inverted components** like tooltips and the control bar.\n * @deprecated - use specific semantic color tokens instead\n */\n darkestShade: ColorModeSwitch;\n /**\n * The opposite of `emptyShade`\n * @deprecated - use`black`\n */\n fullShade: ColorModeSwitch;\n};\n\nexport type _EuiThemeTextColors = {\n /**\n * Computed against `colors.darkestShade`\n * @deprecated - use `textParagraph` instead\n */\n text: ColorModeSwitch;\n /**\n * Computed against `colors.text`\n * @deprecated - use `textHeading` instead\n */\n title: ColorModeSwitch;\n /**\n * Computed against `colors.mediumShade`\n * @deprecated - use `textSubdued` instead\n */\n subduedText: ColorModeSwitch;\n /**\n * Computed against `colors.primaryText`\n */\n link: ColorModeSwitch;\n\n textParagraph: ColorModeSwitch;\n textHeading: ColorModeSwitch;\n textSubdued: ColorModeSwitch;\n textDisabled: ColorModeSwitch;\n textInverse: ColorModeSwitch;\n};\n\nexport type _EuiThemeSpecialColors = {\n /**\n * The background color for the **whole window (body)** and is a computed value of `colors.lightestShade`.\n * Provides denominator (background) value for **contrast calculations**.\n * @deprecated - use backgroundPage instead\n */\n body: ColorModeSwitch;\n /**\n * Used to **highlight text** when matching against search strings\n */\n highlight: ColorModeSwitch;\n /**\n * Computed against `colors.darkestShade`\n * @deprecated - use specific semantic tokens instead (e.g. backgroundDisabled, borderDisabled etc)\n */\n disabled: ColorModeSwitch;\n /**\n * Computed against `colors.disabled`\n * @deprecated - use textDisabled instead\n */\n disabledText: ColorModeSwitch;\n /**\n * The base color for shadows that gets `transparentized`\n * at a value based on the `colorMode` and then layered.\n * @deprecated - use specific shadow tokens instead\n */\n shadow: ColorModeSwitch;\n};\n\nexport type _EuiThemeBackgroundColors = {\n backgroundBasePrimary: ColorModeSwitch;\n backgroundBaseAccent: ColorModeSwitch;\n backgroundBaseAccentSecondary: ColorModeSwitch;\n backgroundBaseSuccess: ColorModeSwitch;\n backgroundBaseWarning: ColorModeSwitch;\n backgroundBaseDanger: ColorModeSwitch;\n backgroundBaseSubdued: ColorModeSwitch;\n backgroundBasePlain: ColorModeSwitch;\n backgroundBaseDisabled: ColorModeSwitch;\n backgroundBaseFormsPrepend: ColorModeSwitch;\n backgroundBaseFormsControlDisabled: ColorModeSwitch;\n backgroundBaseInteractiveHover: ColorModeSwitch;\n backgroundBaseInteractiveSelect: ColorModeSwitch;\n backgroundBaseInteractiveOverlay: ColorModeSwitch;\n backgroundBaseSkeletonEdge: ColorModeSwitch;\n backgroundBaseSkeletonMiddle: ColorModeSwitch;\n\n backgroundLightPrimary: ColorModeSwitch;\n backgroundLightAccent: ColorModeSwitch;\n backgroundLightAccentSecondary: ColorModeSwitch;\n backgroundLightSuccess: ColorModeSwitch;\n backgroundLightWarning: ColorModeSwitch;\n backgroundLightDanger: ColorModeSwitch;\n backgroundLightText: ColorModeSwitch;\n\n backgroundFilledPrimary: ColorModeSwitch;\n backgroundFilledAccent: ColorModeSwitch;\n backgroundFilledAccentSecondary: ColorModeSwitch;\n backgroundFilledSuccess: ColorModeSwitch;\n backgroundFilledWarning: ColorModeSwitch;\n backgroundFilledDanger: ColorModeSwitch;\n backgroundFilledText: ColorModeSwitch;\n};\n\n/** TODO: remove once usages are re-mapped */\nexport type _EuiThemeTransparentBackgroundColors = {\n /** @deprecated */\n backgroundTransparent: string;\n /** @deprecated */\n backgroundTransparentPrimary: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentAccent: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentAccentSecondary: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentSuccess: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentWarning: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentDanger: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentSubdued: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentPlain: ColorModeSwitch;\n};\n\nexport type _EuiThemeBorderColors = {\n borderBasePrimary: ColorModeSwitch;\n borderBaseAccent: ColorModeSwitch;\n borderBaseAccentSecondary: ColorModeSwitch;\n borderBaseSuccess: ColorModeSwitch;\n borderBaseWarning: ColorModeSwitch;\n borderBaseDanger: ColorModeSwitch;\n\n borderBasePlain: ColorModeSwitch;\n borderBaseSubdued: ColorModeSwitch;\n borderBaseDisabled: ColorModeSwitch;\n borderBaseFloating: ColorModeSwitch;\n\n borderBaseFormsColorSwatch: ColorModeSwitch;\n borderBaseFormsControl: ColorModeSwitch;\n\n borderStrongPrimary: ColorModeSwitch;\n borderStrongAccent: ColorModeSwitch;\n borderStrongAccentSecondary: ColorModeSwitch;\n borderStrongSuccess: ColorModeSwitch;\n borderStrongWarning: ColorModeSwitch;\n borderStrongDanger: ColorModeSwitch;\n};\n\nexport type _EuiThemeVisColors = {\n euiColorVis0: string;\n euiColorVis1: string;\n euiColorVis2: string;\n euiColorVis3: string;\n euiColorVis4: string;\n euiColorVis5: string;\n euiColorVis6: string;\n euiColorVis7: string;\n euiColorVis8: string;\n euiColorVis9: string;\n\n euiColorVisAsTextLight0: string;\n euiColorVisAsTextLight1: string;\n euiColorVisAsTextLight2: string;\n euiColorVisAsTextLight3: string;\n euiColorVisAsTextLight4: string;\n euiColorVisAsTextLight5: string;\n euiColorVisAsTextLight6: string;\n\n euiColorVisAsTextDark0: string;\n euiColorVisAsTextDark1: string;\n euiColorVisAsTextDark2: string;\n euiColorVisAsTextDark3: string;\n euiColorVisAsTextDark4: string;\n euiColorVisAsTextDark5: string;\n euiColorVisAsTextDark6: string;\n\n euiColorVisSuccess0: string;\n euiColorVisSuccess1: string;\n euiColorVisWarning0: string;\n euiColorVisDanger0: string;\n euiColorVisDanger1: string;\n\n euiColorVisNeutral0: string;\n\n euiColorVisGrey0: string;\n euiColorVisGrey1: string;\n euiColorVisGrey2: string;\n euiColorVisGrey3: string;\n\n euiColorVisWarm0: string;\n euiColorVisWarm1: string;\n euiColorVisWarm2: string;\n\n euiColorVisCool0: string;\n euiColorVisCool1: string;\n euiColorVisCool2: string;\n\n euiColorVisComplementary0: string;\n euiColorVisComplementary1: string;\n};\n\nexport type _EuiThemeConstantColors = {\n /**\n * Purest **white**\n * @deprecated\n */\n ghost: string;\n /**\n * Purest **black**\n * @deprecated\n */\n ink: string;\n vis: _EuiThemeVisColors;\n};\n\nexport type _EuiThemeColorsMode = _EuiThemeBrandColors &\n _EuiThemeBrandTextColors &\n _EuiThemeShadeColors &\n _EuiThemeSpecialColors &\n _EuiThemeTextColors &\n _EuiThemeBackgroundColors &\n _EuiThemeTransparentBackgroundColors &\n _EuiThemeBorderColors;\n\nexport type _EuiThemeColors = StrictColorModeSwitch<_EuiThemeColorsMode> &\n _EuiThemeConstantColors;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"colors.js","names":[],"sources":["../../../../src/global_styling/variables/colors.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { ColorModeSwitch, StrictColorModeSwitch } from '../types';\n\n/**\n * Top 5 colors\n */\nexport type _EuiThemeBrandColors = {\n /**\n * Main brand color and used for most **call to actions** like buttons and links.\n */\n primary: ColorModeSwitch;\n /**\n * Pulls attention to key indicators like **notifications** or number of selections.\n */\n accent: ColorModeSwitch;\n /**\n * Secondary attention indicator with lower priority.\n */\n accentSecondary: ColorModeSwitch;\n /**\n * Used for **positive** messages/graphics and additive actions.\n */\n success: ColorModeSwitch;\n /**\n * Used for **warnings** and actions that have a potential to be destructive.\n */\n warning: ColorModeSwitch;\n /**\n * Used for **negative** messages/graphics like errors and destructive actions.\n */\n danger: ColorModeSwitch;\n};\n\n/**\n * Every brand color must have a contrast computed text equivelant\n */\nexport type _EuiThemeBrandTextColors = {\n /**\n * Typically computed against `colors.primary`\n * @deprecated - use `textPrimary` instead\n */\n primaryText: ColorModeSwitch;\n /**\n * Typically computed against `colors.accent`\n * @deprecated - use `textAccent` instead\n */\n accentText: ColorModeSwitch;\n /**\n * Typically computed against `colors.success`\n * @deprecated - use `textSuccess` instead\n */\n successText: ColorModeSwitch;\n /**\n * Typically computed against `colors.warning`\n * @deprecated - use `textWarning` instead\n */\n warningText: ColorModeSwitch;\n /**\n * Typically computed against `colors.danger`\n * @deprecated - use `textDanger` instead\n */\n dangerText: ColorModeSwitch;\n\n textPrimary: ColorModeSwitch;\n textAccent: ColorModeSwitch;\n textAccentSecondary: ColorModeSwitch;\n textSuccess: ColorModeSwitch;\n textWarning: ColorModeSwitch;\n textDanger: ColorModeSwitch;\n};\n\nexport type _EuiThemeShadeColors = {\n /**\n * Used as the background color of primary **page content and panels** including modals and flyouts.\n * @deprecated - use specific semantic color tokens instead\n */\n emptyShade: ColorModeSwitch;\n /**\n * Used to lightly shade areas that contain **secondary content** or contain panel-like components.\n * @deprecated - use specific semantic color tokens instead\n */\n lightestShade: ColorModeSwitch;\n /**\n * Used for most **borders** and dividers (horizontal rules).\n * @deprecated - use specific semantic color tokens instead\n */\n lightShade: ColorModeSwitch;\n /**\n * The middle gray for all themes; this is the base for `colors.subdued`.\n * @deprecated - use specific semantic color tokens instead\n */\n mediumShade: ColorModeSwitch;\n /**\n * Slightly subtle graphic color\n * @deprecated - use specific semantic color tokens instead\n */\n darkShade: ColorModeSwitch;\n /**\n * Used as the **text** color and the background color for **inverted components** like tooltips and the control bar.\n * @deprecated - use specific semantic color tokens instead\n */\n darkestShade: ColorModeSwitch;\n /**\n * The opposite of `emptyShade`\n * @deprecated - use specific semantic color tokens instead\n */\n fullShade: ColorModeSwitch;\n};\n\nexport type _EuiThemeTextColors = {\n /**\n * Computed against `colors.darkestShade`\n * @deprecated - use `textParagraph` instead\n */\n text: ColorModeSwitch;\n /**\n * Computed against `colors.text`\n * @deprecated - use `textHeading` instead\n */\n title: ColorModeSwitch;\n /**\n * Computed against `colors.mediumShade`\n * @deprecated - use `textSubdued` instead\n */\n subduedText: ColorModeSwitch;\n /**\n * Computed against `colors.primaryText`\n */\n link: ColorModeSwitch;\n\n textParagraph: ColorModeSwitch;\n textHeading: ColorModeSwitch;\n textSubdued: ColorModeSwitch;\n textDisabled: ColorModeSwitch;\n textInverse: ColorModeSwitch;\n};\n\nexport type _EuiThemeSpecialColors = {\n /**\n * The background color for the **whole window (body)** and is a computed value of `colors.lightestShade`.\n * Provides denominator (background) value for **contrast calculations**.\n * @deprecated - use backgroundPage instead\n */\n body: ColorModeSwitch;\n /**\n * Used to **highlight text** when matching against search strings\n */\n highlight: ColorModeSwitch;\n /**\n * Computed against `colors.darkestShade`\n * @deprecated - use specific semantic tokens instead (e.g. backgroundDisabled, borderDisabled etc)\n */\n disabled: ColorModeSwitch;\n /**\n * Computed against `colors.disabled`\n * @deprecated - use textDisabled instead\n */\n disabledText: ColorModeSwitch;\n /**\n * The base color for shadows that gets `transparentized`\n * at a value based on the `colorMode` and then layered.\n * @deprecated - use specific shadow tokens instead\n */\n shadow: ColorModeSwitch;\n};\n\nexport type _EuiThemeBackgroundColors = {\n backgroundBasePrimary: ColorModeSwitch;\n backgroundBaseAccent: ColorModeSwitch;\n backgroundBaseAccentSecondary: ColorModeSwitch;\n backgroundBaseSuccess: ColorModeSwitch;\n backgroundBaseWarning: ColorModeSwitch;\n backgroundBaseDanger: ColorModeSwitch;\n backgroundBaseSubdued: ColorModeSwitch;\n backgroundBasePlain: ColorModeSwitch;\n backgroundBaseDisabled: ColorModeSwitch;\n backgroundBaseHighlighted: ColorModeSwitch;\n backgroundBaseFormsPrepend: ColorModeSwitch;\n backgroundBaseFormsControlDisabled: ColorModeSwitch;\n backgroundBaseInteractiveHover: ColorModeSwitch;\n backgroundBaseInteractiveSelect: ColorModeSwitch;\n backgroundBaseInteractiveOverlay: ColorModeSwitch;\n backgroundBaseSkeletonEdge: ColorModeSwitch;\n backgroundBaseSkeletonMiddle: ColorModeSwitch;\n\n backgroundLightPrimary: ColorModeSwitch;\n backgroundLightAccent: ColorModeSwitch;\n backgroundLightAccentSecondary: ColorModeSwitch;\n backgroundLightSuccess: ColorModeSwitch;\n backgroundLightWarning: ColorModeSwitch;\n backgroundLightDanger: ColorModeSwitch;\n backgroundLightText: ColorModeSwitch;\n\n backgroundFilledPrimary: ColorModeSwitch;\n backgroundFilledAccent: ColorModeSwitch;\n backgroundFilledAccentSecondary: ColorModeSwitch;\n backgroundFilledSuccess: ColorModeSwitch;\n backgroundFilledWarning: ColorModeSwitch;\n backgroundFilledDanger: ColorModeSwitch;\n backgroundFilledText: ColorModeSwitch;\n};\n\n/** TODO: remove once usages are re-mapped */\nexport type _EuiThemeTransparentBackgroundColors = {\n /** @deprecated */\n backgroundTransparent: string;\n /** @deprecated */\n backgroundTransparentPrimary: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentAccent: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentAccentSecondary: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentSuccess: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentWarning: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentDanger: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentSubdued: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentHighlighted: ColorModeSwitch;\n /** @deprecated */\n backgroundTransparentPlain: ColorModeSwitch;\n};\n\nexport type _EuiThemeBorderColors = {\n borderBasePrimary: ColorModeSwitch;\n borderBaseAccent: ColorModeSwitch;\n borderBaseAccentSecondary: ColorModeSwitch;\n borderBaseSuccess: ColorModeSwitch;\n borderBaseWarning: ColorModeSwitch;\n borderBaseDanger: ColorModeSwitch;\n\n borderBasePlain: ColorModeSwitch;\n borderBaseSubdued: ColorModeSwitch;\n borderBaseDisabled: ColorModeSwitch;\n borderBaseFloating: ColorModeSwitch;\n\n borderBaseFormsColorSwatch: ColorModeSwitch;\n borderBaseFormsControl: ColorModeSwitch;\n\n borderStrongPrimary: ColorModeSwitch;\n borderStrongAccent: ColorModeSwitch;\n borderStrongAccentSecondary: ColorModeSwitch;\n borderStrongSuccess: ColorModeSwitch;\n borderStrongWarning: ColorModeSwitch;\n borderStrongDanger: ColorModeSwitch;\n};\n\nexport type _EuiThemeVisColors = {\n euiColorVis0: string;\n euiColorVis1: string;\n euiColorVis2: string;\n euiColorVis3: string;\n euiColorVis4: string;\n euiColorVis5: string;\n euiColorVis6: string;\n euiColorVis7: string;\n euiColorVis8: string;\n euiColorVis9: string;\n\n euiColorVisAsTextLight0: string;\n euiColorVisAsTextLight1: string;\n euiColorVisAsTextLight2: string;\n euiColorVisAsTextLight3: string;\n euiColorVisAsTextLight4: string;\n euiColorVisAsTextLight5: string;\n euiColorVisAsTextLight6: string;\n\n euiColorVisAsTextDark0: string;\n euiColorVisAsTextDark1: string;\n euiColorVisAsTextDark2: string;\n euiColorVisAsTextDark3: string;\n euiColorVisAsTextDark4: string;\n euiColorVisAsTextDark5: string;\n euiColorVisAsTextDark6: string;\n\n euiColorVisSuccess0: string;\n euiColorVisSuccess1: string;\n euiColorVisWarning0: string;\n euiColorVisDanger0: string;\n euiColorVisDanger1: string;\n\n euiColorVisNeutral0: string;\n\n euiColorSeverity0: string;\n euiColorSeverity1: string;\n euiColorSeverity2: string;\n euiColorSeverity3: string;\n euiColorSeverity4: string;\n euiColorSeverity5: string;\n euiColorSeverity6: string;\n euiColorSeverity7: string;\n euiColorSeverity8: string;\n euiColorSeverity9: string;\n euiColorSeverity10: string;\n euiColorSeverity11: string;\n euiColorSeverity12: string;\n euiColorSeverity13: string;\n euiColorSeverity14: string;\n\n euiColorVisGrey0: string;\n euiColorVisGrey1: string;\n euiColorVisGrey2: string;\n euiColorVisGrey3: string;\n\n euiColorVisWarm0: string;\n euiColorVisWarm1: string;\n euiColorVisWarm2: string;\n\n euiColorVisCool0: string;\n euiColorVisCool1: string;\n euiColorVisCool2: string;\n\n euiColorVisComplementary0: string;\n euiColorVisComplementary1: string;\n};\n\nexport type _EuiThemeConstantColors = {\n /**\n * Purest **white**\n * @deprecated\n */\n ghost: string;\n /**\n * Purest **black**\n * @deprecated\n */\n ink: string;\n\n plainLight: string;\n plainDark: string;\n\n vis: _EuiThemeVisColors;\n};\n\nexport type _EuiThemeColorsMode = _EuiThemeBrandColors &\n _EuiThemeBrandTextColors &\n _EuiThemeShadeColors &\n _EuiThemeSpecialColors &\n _EuiThemeTextColors &\n _EuiThemeBackgroundColors &\n _EuiThemeTransparentBackgroundColors &\n _EuiThemeBorderColors;\n\nexport type _EuiThemeColors = StrictColorModeSwitch<_EuiThemeColorsMode> &\n _EuiThemeConstantColors;\n"],"mappings":"","ignoreList":[]}
@@ -1,10 +1,11 @@
1
1
  import { ColorModeSwitch, StrictColorModeSwitch } from '../types';
2
2
  import { _EuiThemeButtonColors } from './buttons';
3
- import { _EuiThemeFormColors } from './forms';
3
+ import { _EuiThemeForm, _EuiThemeFormColors } from './forms';
4
4
  export declare type _EuiThemeComponentColors = {
5
5
  buttonGroupBorderColor: ColorModeSwitch;
6
6
  buttonGroupBorderColorSelected: ColorModeSwitch;
7
7
  buttonGroupFocusColor: ColorModeSwitch;
8
+ badgeBackground: ColorModeSwitch;
8
9
  badgeBackgroundSubdued: ColorModeSwitch;
9
10
  badgeBorderColorHollow: ColorModeSwitch;
10
11
  badgeIconButtonBackgroundHover: ColorModeSwitch;
@@ -36,9 +37,11 @@ export declare type _EuiThemeComponentColors = {
36
37
  codeSelectorIdColor: ColorModeSwitch;
37
38
  collapsibleNavGroupBackground: ColorModeSwitch;
38
39
  collapsibleNavGroupBackgroundDark: ColorModeSwitch;
40
+ dataGridBorderColor: ColorModeSwitch;
39
41
  dataGridVerticalLineBorderColor: ColorModeSwitch;
40
42
  dataGridRowBackgroundStriped: ColorModeSwitch;
41
43
  dataGridRowBackgroundHover: ColorModeSwitch;
44
+ dataGridRowBackgroundSelect: ColorModeSwitch;
42
45
  dragDropDraggingBackground: ColorModeSwitch;
43
46
  dragDropDraggingOverBackground: ColorModeSwitch;
44
47
  headerBackground: ColorModeSwitch;
@@ -46,6 +49,7 @@ export declare type _EuiThemeComponentColors = {
46
49
  headerDarkSearchBorderColor: ColorModeSwitch;
47
50
  headerDarkSectionItemBackgroundFocus: ColorModeSwitch;
48
51
  filterSelectItemBackgroundFocusDisabled: ColorModeSwitch;
52
+ flyoutFooterBackground: ColorModeSwitch;
49
53
  flyoutCloseButtonInsideBackground: ColorModeSwitch;
50
54
  keyPadMenuItemBackgroundDisabledSelect: ColorModeSwitch;
51
55
  listGroupItemBackgroundPrimaryActive: ColorModeSwitch;
@@ -87,7 +91,7 @@ export declare type _EuiThemeComponentColors = {
87
91
  };
88
92
  export declare type _EuiThemeComponents = {
89
93
  buttons: StrictColorModeSwitch<_EuiThemeButtonColors>;
90
- forms: StrictColorModeSwitch<_EuiThemeFormColors>;
94
+ forms: _EuiThemeForm & StrictColorModeSwitch<_EuiThemeFormColors>;
91
95
  /**
92
96
  * internal-only key that holds temporary tokens used while migrating themes
93
97
  */
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/variables/components.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,mBAAmB,EA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jD,kCAAkC,EAAE,eAAe,CAAC;IACpD,kCAAkC,EAAE,eAAe,CAAC;IACpD,0BAA0B,EAAE,eAAe,CAAC;IAE5C,iBAAiB,EAAE,eAAe,CAAC;IACnC,aAAa,EAAE,eAAe,CAAC;IAC/B,qBAAqB,EAAE,eAAe,CAAC;IAEvC,oBAAoB,EAAE,eAAe,CAAC;IAEtC,2BAA2B,EAAE,eAAe,CAAC;CAC9C,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,OAAO,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;IACtD,KAAK,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;IAClD;;OAEG;IACH,KAAK,EAAE,wBAAwB,CAAC;IAChC,IAAI,EAAE,wBAAwB,CAAC;CAChC,CAAC"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/variables/components.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE7D,oBAAY,wBAAwB,GAAG;IACrC,sBAAsB,EAAE,eAAe,CAAC;IACxC,8BAA8B,EAAE,eAAe,CAAC;IAChD,qBAAqB,EAAE,eAAe,CAAC;IAEvC,eAAe,EAAE,eAAe,CAAC;IACjC,sBAAsB,EAAE,eAAe,CAAC;IACxC,sBAAsB,EAAE,eAAe,CAAC;IACxC,8BAA8B,EAAE,eAAe,CAAC;IAEhD,mBAAmB,EAAE,eAAe,CAAC;IAErC,gCAAgC,EAAE,eAAe,CAAC;IAClD,2BAA2B,EAAE,eAAe,CAAC;IAE7C,cAAc,EAAE,eAAe,CAAC;IAChC,sBAAsB,EAAE,eAAe,CAAC;IACxC,SAAS,EAAE,eAAe,CAAC;IAC3B,eAAe,EAAE,eAAe,CAAC;I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AAa,GAAG,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;IAClE;;OAEG;IACH,KAAK,EAAE,wBAAwB,CAAC;IAChC,IAAI,EAAE,wBAAwB,CAAC;CAChC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","names":[],"sources":["../../../../src/global_styling/variables/components.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { ColorModeSwitch, StrictColorModeSwitch } from '../types';\nimport { _EuiThemeButtonColors } from './buttons';\nimport { _EuiThemeFormColors } from './forms';\n\nexport type _EuiThemeComponentColors = {\n buttonGroupBorderColor: ColorModeSwitch;\n buttonGroupBorderColorSelected: ColorModeSwitch;\n buttonGroupFocusColor: ColorModeSwitch;\n\n badgeBackgroundSubdued: ColorModeSwitch;\n badgeBorderColorHollow: ColorModeSwitch;\n badgeIconButtonBackgroundHover: ColorModeSwitch;\n\n bottomBarBackground: ColorModeSwitch;\n\n breadcrumbsApplicationBackground: ColorModeSwitch;\n breadcrumbsApplicationColor: ColorModeSwitch;\n\n codeBackground: ColorModeSwitch;\n codeBackgroundSelected: ColorModeSwitch;\n codeColor: ColorModeSwitch;\n codeInlineColor: ColorModeSwitch;\n codeCommentColor: ColorModeSwitch;\n codeSelectorColor: ColorModeSwitch;\n codeStringColor: ColorModeSwitch;\n codeTagColor: ColorModeSwitch;\n codeNameColor: ColorModeSwitch;\n codeNumberColor: ColorModeSwitch;\n codeKeywordColor: ColorModeSwitch;\n codeFunctionTitleColor: ColorModeSwitch;\n codeTypeColor: ColorModeSwitch;\n codeAttributeColor: ColorModeSwitch;\n codeSymbolColor: ColorModeSwitch;\n codeParamsColor: ColorModeSwitch;\n codeMetaColor: ColorModeSwitch;\n codeTitleColor: ColorModeSwitch;\n codeSectionColor: ColorModeSwitch;\n codeAdditionColor: ColorModeSwitch;\n codeDeletionColor: ColorModeSwitch;\n codeSelectorClassColor: ColorModeSwitch;\n codeSelectorIdColor: ColorModeSwitch;\n\n collapsibleNavGroupBackground: ColorModeSwitch;\n collapsibleNavGroupBackgroundDark: ColorModeSwitch;\n\n dataGridVerticalLineBorderColor: ColorModeSwitch;\n dataGridRowBackgroundStriped: ColorModeSwitch;\n dataGridRowBackgroundHover: ColorModeSwitch;\n\n dragDropDraggingBackground: ColorModeSwitch;\n dragDropDraggingOverBackground: ColorModeSwitch;\n\n headerBackground: ColorModeSwitch;\n headerDarkBackground: ColorModeSwitch;\n headerDarkSearchBorderColor: ColorModeSwitch;\n headerDarkSectionItemBackgroundFocus: ColorModeSwitch;\n\n filterSelectItemBackgroundFocusDisabled: ColorModeSwitch;\n\n flyoutCloseButtonInsideBackground: ColorModeSwitch;\n\n keyPadMenuItemBackgroundDisabledSelect: ColorModeSwitch;\n\n listGroupItemBackgroundPrimaryActive: ColorModeSwitch;\n listGroupItemBackgroundSubduedActive: ColorModeSwitch;\n listGroupItemBackgroundHover: ColorModeSwitch;\n listGroupItemBackgroundPrimaryHover: ColorModeSwitch;\n\n loadingChartMonoBackground0: ColorModeSwitch;\n loadingChartMonoBackground1: ColorModeSwitch;\n loadingChartMonoBackground2: ColorModeSwitch;\n loadingChartMonoBackground3: ColorModeSwitch;\n\n markBackground: ColorModeSwitch;\n\n markdownFormatTableBorderColor: ColorModeSwitch;\n\n popoverPanelBackground: ColorModeSwitch;\n popoverFooterBorderColor: ColorModeSwitch;\n\n scrollbarTrackColor: ColorModeSwitch;\n\n sideNavItemEmphasizedBackground: ColorModeSwitch;\n\n selectableListItemBorderColor: ColorModeSwitch;\n\n superDatePickerBackgroundSuccees: ColorModeSwitch;\n\n switchBackgroundOn: ColorModeSwitch;\n switchBackgroundOff: ColorModeSwitch;\n switchUncompressedBackgroundDisabled: ColorModeSwitch;\n switchCompressedBackgroundDisabled: ColorModeSwitch;\n switchMiniBackgroundDisabled: ColorModeSwitch;\n switchThumbBackgroundDisabled: ColorModeSwitch;\n switchThumbBorderOn: ColorModeSwitch;\n switchThumbBorderOff: ColorModeSwitch;\n switchIconDisabled: ColorModeSwitch;\n\n tableRowBackgroundHover: ColorModeSwitch;\n tableRowBackgroundSelected: ColorModeSwitch;\n tableRowBackgroundSelectedHover: ColorModeSwitch;\n tableRowInteractiveBackgroundHover: ColorModeSwitch;\n tableRowInteractiveBackgroundFocus: ColorModeSwitch;\n tableCellSortableIconColor: ColorModeSwitch;\n\n tooltipBackground: ColorModeSwitch;\n tooltipBorder: ColorModeSwitch;\n tooltipBorderFloating: ColorModeSwitch;\n\n tourFooterBackground: ColorModeSwitch;\n\n treeViewItemBackgroundHover: ColorModeSwitch;\n};\n\nexport type _EuiThemeComponents = {\n buttons: StrictColorModeSwitch<_EuiThemeButtonColors>;\n forms: StrictColorModeSwitch<_EuiThemeFormColors>;\n /**\n * internal-only key that holds temporary tokens used while migrating themes\n */\n LIGHT: _EuiThemeComponentColors;\n DARK: _EuiThemeComponentColors;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"components.js","names":[],"sources":["../../../../src/global_styling/variables/components.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { ColorModeSwitch, StrictColorModeSwitch } from '../types';\nimport { _EuiThemeButtonColors } from './buttons';\nimport { _EuiThemeForm, _EuiThemeFormColors } from './forms';\n\nexport type _EuiThemeComponentColors = {\n buttonGroupBorderColor: ColorModeSwitch;\n buttonGroupBorderColorSelected: ColorModeSwitch;\n buttonGroupFocusColor: ColorModeSwitch;\n\n badgeBackground: ColorModeSwitch;\n badgeBackgroundSubdued: ColorModeSwitch;\n badgeBorderColorHollow: ColorModeSwitch;\n badgeIconButtonBackgroundHover: ColorModeSwitch;\n\n bottomBarBackground: ColorModeSwitch;\n\n breadcrumbsApplicationBackground: ColorModeSwitch;\n breadcrumbsApplicationColor: ColorModeSwitch;\n\n codeBackground: ColorModeSwitch;\n codeBackgroundSelected: ColorModeSwitch;\n codeColor: ColorModeSwitch;\n codeInlineColor: ColorModeSwitch;\n codeCommentColor: ColorModeSwitch;\n codeSelectorColor: ColorModeSwitch;\n codeStringColor: ColorModeSwitch;\n codeTagColor: ColorModeSwitch;\n codeNameColor: ColorModeSwitch;\n codeNumberColor: ColorModeSwitch;\n codeKeywordColor: ColorModeSwitch;\n codeFunctionTitleColor: ColorModeSwitch;\n codeTypeColor: ColorModeSwitch;\n codeAttributeColor: ColorModeSwitch;\n codeSymbolColor: ColorModeSwitch;\n codeParamsColor: ColorModeSwitch;\n codeMetaColor: ColorModeSwitch;\n codeTitleColor: ColorModeSwitch;\n codeSectionColor: ColorModeSwitch;\n codeAdditionColor: ColorModeSwitch;\n codeDeletionColor: ColorModeSwitch;\n codeSelectorClassColor: ColorModeSwitch;\n codeSelectorIdColor: ColorModeSwitch;\n\n collapsibleNavGroupBackground: ColorModeSwitch;\n collapsibleNavGroupBackgroundDark: ColorModeSwitch;\n\n dataGridBorderColor: ColorModeSwitch;\n dataGridVerticalLineBorderColor: ColorModeSwitch;\n dataGridRowBackgroundStriped: ColorModeSwitch;\n dataGridRowBackgroundHover: ColorModeSwitch;\n dataGridRowBackgroundSelect: ColorModeSwitch;\n\n dragDropDraggingBackground: ColorModeSwitch;\n dragDropDraggingOverBackground: ColorModeSwitch;\n\n headerBackground: ColorModeSwitch;\n headerDarkBackground: ColorModeSwitch;\n headerDarkSearchBorderColor: ColorModeSwitch;\n headerDarkSectionItemBackgroundFocus: ColorModeSwitch;\n\n filterSelectItemBackgroundFocusDisabled: ColorModeSwitch;\n\n flyoutFooterBackground: ColorModeSwitch;\n flyoutCloseButtonInsideBackground: ColorModeSwitch;\n\n keyPadMenuItemBackgroundDisabledSelect: ColorModeSwitch;\n\n listGroupItemBackgroundPrimaryActive: ColorModeSwitch;\n listGroupItemBackgroundSubduedActive: ColorModeSwitch;\n listGroupItemBackgroundHover: ColorModeSwitch;\n listGroupItemBackgroundPrimaryHover: ColorModeSwitch;\n\n loadingChartMonoBackground0: ColorModeSwitch;\n loadingChartMonoBackground1: ColorModeSwitch;\n loadingChartMonoBackground2: ColorModeSwitch;\n loadingChartMonoBackground3: ColorModeSwitch;\n\n markBackground: ColorModeSwitch;\n\n markdownFormatTableBorderColor: ColorModeSwitch;\n\n popoverPanelBackground: ColorModeSwitch;\n popoverFooterBorderColor: ColorModeSwitch;\n\n scrollbarTrackColor: ColorModeSwitch;\n\n sideNavItemEmphasizedBackground: ColorModeSwitch;\n\n selectableListItemBorderColor: ColorModeSwitch;\n\n superDatePickerBackgroundSuccees: ColorModeSwitch;\n\n switchBackgroundOn: ColorModeSwitch;\n switchBackgroundOff: ColorModeSwitch;\n switchUncompressedBackgroundDisabled: ColorModeSwitch;\n switchCompressedBackgroundDisabled: ColorModeSwitch;\n switchMiniBackgroundDisabled: ColorModeSwitch;\n switchThumbBackgroundDisabled: ColorModeSwitch;\n switchThumbBorderOn: ColorModeSwitch;\n switchThumbBorderOff: ColorModeSwitch;\n switchIconDisabled: ColorModeSwitch;\n\n tableRowBackgroundHover: ColorModeSwitch;\n tableRowBackgroundSelected: ColorModeSwitch;\n tableRowBackgroundSelectedHover: ColorModeSwitch;\n tableRowInteractiveBackgroundHover: ColorModeSwitch;\n tableRowInteractiveBackgroundFocus: ColorModeSwitch;\n tableCellSortableIconColor: ColorModeSwitch;\n\n tooltipBackground: ColorModeSwitch;\n tooltipBorder: ColorModeSwitch;\n tooltipBorderFloating: ColorModeSwitch;\n\n tourFooterBackground: ColorModeSwitch;\n\n treeViewItemBackgroundHover: ColorModeSwitch;\n};\n\nexport type _EuiThemeComponents = {\n buttons: StrictColorModeSwitch<_EuiThemeButtonColors>;\n forms: _EuiThemeForm & StrictColorModeSwitch<_EuiThemeFormColors>;\n /**\n * internal-only key that holds temporary tokens used while migrating themes\n */\n LIGHT: _EuiThemeComponentColors;\n DARK: _EuiThemeComponentColors;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,7 @@
1
1
  import { ColorModeSwitch } from '../types';
2
+ export declare type _EuiThemeForm = {
3
+ maxWidth: string;
4
+ };
2
5
  export declare type _EuiThemeFormColors = {
3
6
  background: ColorModeSwitch;
4
7
  backgroundDisabled: ColorModeSwitch;
@@ -1 +1 @@
1
- {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/variables/forms.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,oBAAY,mBAAmB,GAAG;IAChC,UAAU,EAAE,eAAe,CAAC;IAC5B,kBAAkB,EAAE,eAAe,CAAC;IACpC,kBAAkB,EAAE,eAAe,CAAC;IACpC,iBAAiB,EAAE,eAAe,CAAC;IACnC,oBAAoB,EAAE,eAAe,CAAC;IACtC,iBAAiB,EAAE,eAAe,CAAC;IACnC,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,eAAe,CAAC;IAClC,aAAa,EAAE,eAAe,CAAC;IAC/B,qBAAqB,EAAE,eAAe,CAAC;IACvC,qBAAqB,EAAE,eAAe,CAAC;IACvC,2BAA2B,EAAE,eAAe,CAAC;IAC7C,yBAAyB,EAAE,eAAe,CAAC;IAC3C,mBAAmB,EAAE,eAAe,CAAC;IACrC,aAAa,EAAE,eAAe,CAAC;IAC/B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../src/global_styling/variables/forms.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,UAAU,EAAE,eAAe,CAAC;IAC5B,kBAAkB,EAAE,eAAe,CAAC;IACpC,kBAAkB,EAAE,eAAe,CAAC;IACpC,iBAAiB,EAAE,eAAe,CAAC;IACnC,oBAAoB,EAAE,eAAe,CAAC;IACtC,iBAAiB,EAAE,eAAe,CAAC;IACnC,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,eAAe,CAAC;IAClC,aAAa,EAAE,eAAe,CAAC;IAC/B,qBAAqB,EAAE,eAAe,CAAC;IACvC,qBAAqB,EAAE,eAAe,CAAC;IACvC,2BAA2B,EAAE,eAAe,CAAC;IAC7C,yBAAyB,EAAE,eAAe,CAAC;IAC3C,mBAAmB,EAAE,eAAe,CAAC;IACrC,aAAa,EAAE,eAAe,CAAC;IAC/B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"forms.js","names":[],"sources":["../../../../src/global_styling/variables/forms.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { ColorModeSwitch } from '../types';\n\nexport type _EuiThemeFormColors = {\n background: ColorModeSwitch;\n backgroundDisabled: ColorModeSwitch;\n backgroundReadOnly: ColorModeSwitch;\n backgroundFocused: ColorModeSwitch;\n backgroundAutofilled: ColorModeSwitch;\n prependBackground: ColorModeSwitch;\n border: ColorModeSwitch;\n borderAutofilled: ColorModeSwitch;\n controlBorder: ColorModeSwitch;\n controlBorderSelected: ColorModeSwitch;\n controlBorderDisabled: ColorModeSwitch;\n controlBackgroundUnselected: ColorModeSwitch;\n controlBackgroundDisabled: ColorModeSwitch;\n colorHasPlaceholder: ColorModeSwitch;\n colorDisabled: ColorModeSwitch;\n iconDisabled: ColorModeSwitch;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"forms.js","names":[],"sources":["../../../../src/global_styling/variables/forms.ts"],"sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { ColorModeSwitch } from '../types';\n\nexport type _EuiThemeForm = {\n maxWidth: string;\n};\n\nexport type _EuiThemeFormColors = {\n background: ColorModeSwitch;\n backgroundDisabled: ColorModeSwitch;\n backgroundReadOnly: ColorModeSwitch;\n backgroundFocused: ColorModeSwitch;\n backgroundAutofilled: ColorModeSwitch;\n prependBackground: ColorModeSwitch;\n border: ColorModeSwitch;\n borderAutofilled: ColorModeSwitch;\n controlBorder: ColorModeSwitch;\n controlBorderSelected: ColorModeSwitch;\n controlBorderDisabled: ColorModeSwitch;\n controlBackgroundUnselected: ColorModeSwitch;\n controlBackgroundDisabled: ColorModeSwitch;\n colorHasPlaceholder: ColorModeSwitch;\n colorDisabled: ColorModeSwitch;\n iconDisabled: ColorModeSwitch;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1,2 @@
1
1
  export * from './size';
2
+ export * from './math';
@@ -6,4 +6,5 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  export * from './size';
9
+ export * from './math';
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/global_styling/functions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/global_styling/functions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Utility for performing math callbacks on a string with CSS units
3
+ * and returning a string with its unit preserved.
4
+ *
5
+ * Example usage:
6
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
7
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
8
+ * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
9
+ */
10
+ declare type ValueTypes = string | number | undefined;
11
+ export declare const mathWithUnits: (values: ValueTypes | ValueTypes[], callback: (...args: number[]) => number, unit?: string) => string;
12
+ export {};
@@ -0,0 +1,45 @@
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 const mathWithUnits = (values, // Can accept a single input or array of inputs
9
+ callback, // Can be multiplication, division, addition, etc.
10
+ unit = '' // Optional: allow specifying an override unit to return
11
+ ) => {
12
+ if (!Array.isArray(values))
13
+ values = [values];
14
+ const foundNumericValues = [];
15
+ let foundUnit = '';
16
+ values.forEach((value) => {
17
+ if (typeof value === 'string') {
18
+ const regex = /(?<value>-?[\d.]+)(?<unit>%|[a-zA-Z]*)/;
19
+ const matches = regex.exec(value);
20
+ const numericValue = Number(matches?.groups?.value);
21
+ if (!isNaN(numericValue)) {
22
+ foundNumericValues.push(numericValue);
23
+ }
24
+ else {
25
+ throw new Error('No valid numeric value found');
26
+ }
27
+ if (!unit && matches?.groups?.unit) {
28
+ if (!foundUnit) {
29
+ foundUnit = matches.groups.unit;
30
+ }
31
+ else if (foundUnit !== matches.groups.unit) {
32
+ throw new Error('Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead');
33
+ }
34
+ }
35
+ }
36
+ else if (typeof value === 'number') {
37
+ foundNumericValues.push(value);
38
+ }
39
+ else {
40
+ throw new Error('Invalid value type - pass a string or number');
41
+ }
42
+ });
43
+ return `${callback(...foundNumericValues)}${unit || foundUnit}`;
44
+ };
45
+ //# sourceMappingURL=math.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../src/global_styling/functions/math.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAiC,EAAE,+CAA+C;AAClF,QAAuC,EAAE,kDAAkD;AAC3F,OAAe,EAAE,CAAC,wDAAwD;EAC1E,EAAE;IACF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;IAE9C,MAAM,kBAAkB,GAAa,EAAE,CAAC;IACxC,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,KAAK,GAAG,wCAAwC,CAAC;YACvD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAElC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;YAEpD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;gBACxB,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;aACvC;iBAAM;gBACL,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;aACjD;YAED,IAAI,CAAC,IAAI,IAAI,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;gBAClC,IAAI,CAAC,SAAS,EAAE;oBACd,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;iBACjC;qBAAM,IAAI,SAAS,KAAK,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE;oBAC5C,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAC;iBACH;aACF;SACF;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACpC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAChC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;SACjE;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,QAAQ,CAAC,GAAG,kBAAkB,CAAC,GAAG,IAAI,IAAI,SAAS,EAAE,CAAC;AAClE,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,67 @@
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 { mathWithUnits } from './math';
9
+ describe('mathWithUnits', () => {
10
+ describe('extracts numerical values from CSS strings with units, performs math callbacks, and returns units as is', () => {
11
+ test('px and multiplication', () => {
12
+ expect(mathWithUnits('10px', (x) => x * 10)).toEqual('100px');
13
+ });
14
+ test('em and division', () => {
15
+ expect(mathWithUnits('40%', (x) => x / 2)).toEqual('20%');
16
+ });
17
+ test('rem and addition', () => {
18
+ expect(mathWithUnits('1rem', (x) => x + 2)).toEqual('3rem');
19
+ });
20
+ test('unitless and negative values', () => {
21
+ expect(mathWithUnits('-5.5', (x) => x - 1.2)).toEqual('-6.7');
22
+ });
23
+ test('allows passing an optional unit if none is passed', () => {
24
+ expect(mathWithUnits('0', (x) => x, 'vh')).toEqual('0vh');
25
+ });
26
+ });
27
+ describe('handles numeric input types', () => {
28
+ test('unitless', () => {
29
+ expect(mathWithUnits(6, (x) => Math.pow(x, 2))).toEqual('36');
30
+ });
31
+ test('allows passing an optional unit', () => {
32
+ expect(mathWithUnits(3.5, (x) => x % 1.5, 'px')).toEqual('0.5px');
33
+ });
34
+ });
35
+ describe('multiple inputs', () => {
36
+ it('accepts an array of inputs, parses each input, and returns them as a separate arg to the callback', () => {
37
+ expect(mathWithUnits(['3px', '4px', '5px'], (x, y, z) => x + y + z)).toEqual('12px');
38
+ });
39
+ it('allows mixing strings and numbers', () => {
40
+ expect(mathWithUnits(['6px', 3], (x, y) => x / y)).toEqual('2px');
41
+ });
42
+ it('throws on multiple different unit types', () => {
43
+ expect(() => mathWithUnits(['1px', '1em'], (x, y) => x + y)).toThrow('Multiple units found');
44
+ });
45
+ it('allows different unit types if an override unit is passed', () => {
46
+ expect(mathWithUnits(['50%', '5rem'], (x, y) => x / y, 'px')).toEqual('10px');
47
+ });
48
+ });
49
+ describe('weird edge cases', () => {
50
+ it('throws on undefined', () => {
51
+ expect(() => mathWithUnits(undefined, (x) => x * 3)).toThrow('Invalid value type');
52
+ });
53
+ it('throws on strings that do not contain numbers', () => {
54
+ expect(() => mathWithUnits('no number', (x) => x * 3)).toThrow('No valid numeric value found');
55
+ });
56
+ it('throws on strings with numbers that are actually NaNs', () => {
57
+ expect(() => mathWithUnits('34.23.12', (x) => x * 3)).toThrow('No valid numeric value found');
58
+ });
59
+ it('ignores multiple values/units, only using the first match', () => {
60
+ expect(mathWithUnits('10px 20px', (x) => x)).toEqual('10px');
61
+ });
62
+ it('ignores multiple percentage signs', () => {
63
+ expect(mathWithUnits('100%%%', (x) => x)).toEqual('100%');
64
+ });
65
+ });
66
+ });
67
+ //# sourceMappingURL=math.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.test.js","sourceRoot":"","sources":["../../../../src/global_styling/functions/math.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,yGAAyG,EAAE,GAAG,EAAE;QACvH,IAAI,CAAC,uBAAuB,EAAE,GAAG,EAAE;YACjC,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,C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AC;QAC5D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -67,7 +67,7 @@ export declare type _EuiThemeBrandTextColors = {
67
67
  export declare type _EuiThemeShadeColors = {
68
68
  /**
69
69
  * Used as the background color of primary **page content and panels** including modals and flyouts.
70
- * @deprecated - use `white`
70
+ * @deprecated - use specific semantic color tokens instead
71
71
  */
72
72
  emptyShade: ColorModeSwitch;
73
73
  /**
@@ -97,7 +97,7 @@ export declare type _EuiThemeShadeColors = {
97
97
  darkestShade: ColorModeSwitch;
98
98
  /**
99
99
  * The opposite of `emptyShade`
100
- * @deprecated - use`black`
100
+ * @deprecated - use specific semantic color tokens instead
101
101
  */
102
102
  fullShade: ColorModeSwitch;
103
103
  };
@@ -165,6 +165,7 @@ export declare type _EuiThemeBackgroundColors = {
165
165
  backgroundBaseSubdued: ColorModeSwitch;
166
166
  backgroundBasePlain: ColorModeSwitch;
167
167
  backgroundBaseDisabled: ColorModeSwitch;
168
+ backgroundBaseHighlighted: ColorModeSwitch;
168
169
  backgroundBaseFormsPrepend: ColorModeSwitch;
169
170
  backgroundBaseFormsControlDisabled: ColorModeSwitch;
170
171
  backgroundBaseInteractiveHover: ColorModeSwitch;
@@ -206,6 +207,8 @@ export declare type _EuiThemeTransparentBackgroundColors = {
206
207
  /** @deprecated */
207
208
  backgroundTransparentSubdued: ColorModeSwitch;
208
209
  /** @deprecated */
210
+ backgroundTransparentHighlighted: ColorModeSwitch;
211
+ /** @deprecated */
209
212
  backgroundTransparentPlain: ColorModeSwitch;
210
213
  };
211
214
  export declare type _EuiThemeBorderColors = {
@@ -259,6 +262,21 @@ export declare type _EuiThemeVisColors = {
259
262
  euiColorVisDanger0: string;
260
263
  euiColorVisDanger1: string;
261
264
  euiColorVisNeutral0: string;
265
+ euiColorSeverity0: string;
266
+ euiColorSeverity1: string;
267
+ euiColorSeverity2: string;
268
+ euiColorSeverity3: string;
269
+ euiColorSeverity4: string;
270
+ euiColorSeverity5: string;
271
+ euiColorSeverity6: string;
272
+ euiColorSeverity7: string;
273
+ euiColorSeverity8: string;
274
+ euiColorSeverity9: string;
275
+ euiColorSeverity10: string;
276
+ euiColorSeverity11: string;
277
+ euiColorSeverity12: string;
278
+ euiColorSeverity13: string;
279
+ euiColorSeverity14: string;
262
280
  euiColorVisGrey0: string;
263
281
  euiColorVisGrey1: string;
264
282
  euiColorVisGrey2: string;
@@ -283,6 +301,8 @@ export declare type _EuiThemeConstantColors = {
283
301
  * @deprecated
284
302
  */
285
303
  ink: string;
304
+ plainLight: string;
305
+ plainDark: string;
286
306
  vis: _EuiThemeVisColors;
287
307
  };
288
308
  export declare type _EuiThemeColorsMode = _EuiThemeBrandColors & _EuiThemeBrandTextColors & _EuiThemeShadeColors & _EuiThemeSpecialColors & _EuiThemeTextColors & _EuiThemeBackgroundColors & _EuiThemeTransparentBackgroundColors & _EuiThemeBorderColors;
@@ -1,10 +1,11 @@
1
1
  import { ColorModeSwitch, StrictColorModeSwitch } from '../types';
2
2
  import { _EuiThemeButtonColors } from './buttons';
3
- import { _EuiThemeFormColors } from './forms';
3
+ import { _EuiThemeForm, _EuiThemeFormColors } from './forms';
4
4
  export declare type _EuiThemeComponentColors = {
5
5
  buttonGroupBorderColor: ColorModeSwitch;
6
6
  buttonGroupBorderColorSelected: ColorModeSwitch;
7
7
  buttonGroupFocusColor: ColorModeSwitch;
8
+ badgeBackground: ColorModeSwitch;
8
9
  badgeBackgroundSubdued: ColorModeSwitch;
9
10
  badgeBorderColorHollow: ColorModeSwitch;
10
11
  badgeIconButtonBackgroundHover: ColorModeSwitch;
@@ -36,9 +37,11 @@ export declare type _EuiThemeComponentColors = {
36
37
  codeSelectorIdColor: ColorModeSwitch;
37
38
  collapsibleNavGroupBackground: ColorModeSwitch;
38
39
  collapsibleNavGroupBackgroundDark: ColorModeSwitch;
40
+ dataGridBorderColor: ColorModeSwitch;
39
41
  dataGridVerticalLineBorderColor: ColorModeSwitch;
40
42
  dataGridRowBackgroundStriped: ColorModeSwitch;
41
43
  dataGridRowBackgroundHover: ColorModeSwitch;
44
+ dataGridRowBackgroundSelect: ColorModeSwitch;
42
45
  dragDropDraggingBackground: ColorModeSwitch;
43
46
  dragDropDraggingOverBackground: ColorModeSwitch;
44
47
  headerBackground: ColorModeSwitch;
@@ -46,6 +49,7 @@ export declare type _EuiThemeComponentColors = {
46
49
  headerDarkSearchBorderColor: ColorModeSwitch;
47
50
  headerDarkSectionItemBackgroundFocus: ColorModeSwitch;
48
51
  filterSelectItemBackgroundFocusDisabled: ColorModeSwitch;
52
+ flyoutFooterBackground: ColorModeSwitch;
49
53
  flyoutCloseButtonInsideBackground: ColorModeSwitch;
50
54
  keyPadMenuItemBackgroundDisabledSelect: ColorModeSwitch;
51
55
  listGroupItemBackgroundPrimaryActive: ColorModeSwitch;
@@ -87,7 +91,7 @@ export declare type _EuiThemeComponentColors = {
87
91
  };
88
92
  export declare type _EuiThemeComponents = {
89
93
  buttons: StrictColorModeSwitch<_EuiThemeButtonColors>;
90
- forms: StrictColorModeSwitch<_EuiThemeFormColors>;
94
+ forms: _EuiThemeForm & StrictColorModeSwitch<_EuiThemeFormColors>;
91
95
  /**
92
96
  * internal-only key that holds temporary tokens used while migrating themes
93
97
  */
@@ -1,4 +1,7 @@
1
1
  import { ColorModeSwitch } from '../types';
2
+ export declare type _EuiThemeForm = {
3
+ maxWidth: string;
4
+ };
2
5
  export declare type _EuiThemeFormColors = {
3
6
  background: ColorModeSwitch;
4
7
  backgroundDisabled: ColorModeSwitch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elastic/eui-theme-common",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "EUI theme common",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "scripts": {