@elastic/eui-theme-borealis 3.5.0 → 4.0.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.
@@ -0,0 +1,438 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shadows = exports.shadowPrimitives = void 0;
7
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
8
+ var _semantic_colors = require("./colors/_semantic_colors");
9
+ var _primitive_colors = require("./colors/_primitive_colors");
10
+ 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); }
11
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
16
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
17
+ * or more contributor license agreements. Licensed under the Elastic License
18
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
19
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
20
+ * Side Public License, v 1.
21
+ */
22
+ /**
23
+ * This structure holds "primitives" (or actual design tokens as they
24
+ * would be stored in a design token repository).
25
+ * Not exposing them in the theme object is intentional.
26
+ */
27
+ var shadowPrimitives = exports.shadowPrimitives = {
28
+ xs: {
29
+ light: [{
30
+ opacity: 0.16,
31
+ x: 0,
32
+ y: 0,
33
+ blur: 2,
34
+ spread: 0
35
+ }, {
36
+ opacity: 0.06,
37
+ x: 0,
38
+ y: 1,
39
+ blur: 4,
40
+ spread: 0
41
+ }, {
42
+ opacity: 0.04,
43
+ x: 0,
44
+ y: 2,
45
+ blur: 8,
46
+ spread: 0
47
+ }],
48
+ dark: [{
49
+ opacity: 1,
50
+ x: 0,
51
+ y: 0,
52
+ blur: 0,
53
+ spread: 1
54
+ }, {
55
+ opacity: 0.4,
56
+ x: 0,
57
+ y: 1,
58
+ blur: 4,
59
+ spread: 0
60
+ }, {
61
+ opacity: 0.24,
62
+ x: 0,
63
+ y: 2,
64
+ blur: 8,
65
+ spread: 0
66
+ }]
67
+ },
68
+ s: {
69
+ light: [{
70
+ opacity: 0.16,
71
+ x: 0,
72
+ y: 0,
73
+ blur: 2,
74
+ spread: 0
75
+ }, {
76
+ opacity: 0.08,
77
+ x: 0,
78
+ y: 2,
79
+ blur: 7,
80
+ spread: 0
81
+ }, {
82
+ opacity: 0.05,
83
+ x: 0,
84
+ y: 4,
85
+ blur: 11,
86
+ spread: 0
87
+ }],
88
+ dark: [{
89
+ opacity: 1,
90
+ x: 0,
91
+ y: 0,
92
+ blur: 0,
93
+ spread: 1
94
+ }, {
95
+ opacity: 0.46,
96
+ x: 0,
97
+ y: 2,
98
+ blur: 7,
99
+ spread: 0
100
+ }, {
101
+ opacity: 0.26,
102
+ x: 0,
103
+ y: 4,
104
+ blur: 11,
105
+ spread: 0
106
+ }]
107
+ },
108
+ m: {
109
+ light: [{
110
+ opacity: 0.16,
111
+ x: 0,
112
+ y: 0,
113
+ blur: 2,
114
+ spread: 0
115
+ }, {
116
+ opacity: 0.1,
117
+ x: 0,
118
+ y: 3,
119
+ blur: 10,
120
+ spread: 0
121
+ }, {
122
+ opacity: 0.06,
123
+ x: 0,
124
+ y: 6,
125
+ blur: 14,
126
+ spread: 0
127
+ }],
128
+ dark: [{
129
+ opacity: 1,
130
+ x: 0,
131
+ y: 0,
132
+ blur: 0,
133
+ spread: 1
134
+ }, {
135
+ opacity: 0.52,
136
+ x: 0,
137
+ y: 3,
138
+ blur: 10,
139
+ spread: 0
140
+ }, {
141
+ opacity: 0.28,
142
+ x: 0,
143
+ y: 6,
144
+ blur: 14,
145
+ spread: 0
146
+ }]
147
+ },
148
+ l: {
149
+ light: [{
150
+ opacity: 0.16,
151
+ x: 0,
152
+ y: 0,
153
+ blur: 2,
154
+ spread: 0
155
+ }, {
156
+ opacity: 0.12,
157
+ x: 0,
158
+ y: 4,
159
+ blur: 13,
160
+ spread: 0
161
+ }, {
162
+ opacity: 0.07,
163
+ x: 0,
164
+ y: 8,
165
+ blur: 17,
166
+ spread: 0
167
+ }],
168
+ dark: [{
169
+ opacity: 1,
170
+ x: 0,
171
+ y: 0,
172
+ blur: 0,
173
+ spread: 1
174
+ }, {
175
+ opacity: 0.58,
176
+ x: 0,
177
+ y: 4,
178
+ blur: 13,
179
+ spread: 0
180
+ }, {
181
+ opacity: 0.3,
182
+ x: 0,
183
+ y: 8,
184
+ blur: 17,
185
+ spread: 0
186
+ }]
187
+ },
188
+ xl: {
189
+ light: [{
190
+ opacity: 0.16,
191
+ x: 0,
192
+ y: 0,
193
+ blur: 2,
194
+ spread: 0
195
+ }, {
196
+ opacity: 0.14,
197
+ x: 0,
198
+ y: 5,
199
+ blur: 16,
200
+ spread: 0
201
+ }, {
202
+ opacity: 0.08,
203
+ x: 0,
204
+ y: 10,
205
+ blur: 20,
206
+ spread: 0
207
+ }],
208
+ dark: [{
209
+ opacity: 1,
210
+ x: 0,
211
+ y: 0,
212
+ blur: 0,
213
+ spread: 1
214
+ }, {
215
+ opacity: 0.64,
216
+ x: 0,
217
+ y: 5,
218
+ blur: 16,
219
+ spread: 0
220
+ }, {
221
+ opacity: 0.32,
222
+ x: 0,
223
+ y: 10,
224
+ blur: 20,
225
+ spread: 0
226
+ }]
227
+ },
228
+ xxl: {
229
+ light: [{
230
+ opacity: 0.16,
231
+ x: 0,
232
+ y: 0,
233
+ blur: 2,
234
+ spread: 0
235
+ }, {
236
+ opacity: 0.16,
237
+ x: 0,
238
+ y: 6,
239
+ blur: 19,
240
+ spread: 0
241
+ }, {
242
+ opacity: 0.09,
243
+ x: 0,
244
+ y: 12,
245
+ blur: 23,
246
+ spread: 0
247
+ }],
248
+ dark: [{
249
+ opacity: 1,
250
+ x: 0,
251
+ y: 0,
252
+ blur: 0,
253
+ spread: 1
254
+ }, {
255
+ opacity: 0.7,
256
+ x: 0,
257
+ y: 6,
258
+ blur: 19,
259
+ spread: 0
260
+ }, {
261
+ opacity: 0.34,
262
+ x: 0,
263
+ y: 12,
264
+ blur: 23,
265
+ spread: 0
266
+ }]
267
+ },
268
+ flat: {
269
+ light: [],
270
+ dark: []
271
+ }
272
+ };
273
+ var shadowColorsLight = {
274
+ colors: {
275
+ base: _semantic_colors.SEMANTIC_COLORS.shade120
276
+ }
277
+ };
278
+ var shadowsLight = _objectSpread(_objectSpread({}, shadowColorsLight), {}, {
279
+ xs: {
280
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.light, {
281
+ color: shadowColorsLight.colors.base
282
+ }),
283
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.light, {
284
+ direction: 'up',
285
+ color: shadowColorsLight.colors.base
286
+ })
287
+ },
288
+ s: {
289
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.light, {
290
+ color: shadowColorsLight.colors.base
291
+ }),
292
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.light, {
293
+ direction: 'up',
294
+ color: shadowColorsLight.colors.base
295
+ })
296
+ },
297
+ m: {
298
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.m.light, {
299
+ color: shadowColorsLight.colors.base
300
+ }),
301
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.m.light, {
302
+ direction: 'up',
303
+ color: shadowColorsLight.colors.base
304
+ })
305
+ },
306
+ l: {
307
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.l.light, {
308
+ color: shadowColorsLight.colors.base
309
+ }),
310
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.l.light, {
311
+ direction: 'up',
312
+ color: shadowColorsLight.colors.base
313
+ })
314
+ },
315
+ xl: {
316
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xl.light, {
317
+ color: shadowColorsLight.colors.base
318
+ }),
319
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xl.light, {
320
+ direction: 'up',
321
+ color: shadowColorsLight.colors.base
322
+ })
323
+ },
324
+ hover: {
325
+ base: {
326
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.light, {
327
+ color: shadowColorsLight.colors.base
328
+ }),
329
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.light, {
330
+ direction: 'up',
331
+ color: shadowColorsLight.colors.base
332
+ })
333
+ },
334
+ xl: {
335
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xxl.light, {
336
+ color: shadowColorsLight.colors.base
337
+ }),
338
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xxl.light, {
339
+ direction: 'up',
340
+ color: shadowColorsLight.colors.base
341
+ })
342
+ }
343
+ },
344
+ flat: {
345
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.light, {
346
+ color: shadowColorsLight.colors.base
347
+ }),
348
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.light, {
349
+ direction: 'up',
350
+ color: shadowColorsLight.colors.base
351
+ })
352
+ }
353
+ });
354
+ var shadowColorsDark = {
355
+ colors: {
356
+ base: _primitive_colors.PRIMITIVE_COLORS.black
357
+ }
358
+ };
359
+ var shadowsDark = _objectSpread(_objectSpread({}, shadowColorsDark), {}, {
360
+ xs: {
361
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.dark.slice(1), {
362
+ color: shadowColorsDark.colors.base
363
+ }),
364
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.dark.slice(1), {
365
+ direction: 'up',
366
+ color: shadowColorsDark.colors.base
367
+ })
368
+ },
369
+ s: {
370
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.dark.slice(1), {
371
+ color: shadowColorsDark.colors.base
372
+ }),
373
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.dark.slice(1), {
374
+ direction: 'up',
375
+ color: shadowColorsDark.colors.base
376
+ })
377
+ },
378
+ m: {
379
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.m.dark.slice(1), {
380
+ color: shadowColorsDark.colors.base
381
+ }),
382
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.m.dark.slice(1), {
383
+ direction: 'up',
384
+ color: shadowColorsDark.colors.base
385
+ })
386
+ },
387
+ l: {
388
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.l.dark.slice(1), {
389
+ color: shadowColorsDark.colors.base
390
+ }),
391
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.l.dark.slice(1), {
392
+ direction: 'up',
393
+ color: shadowColorsDark.colors.base
394
+ })
395
+ },
396
+ xl: {
397
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xl.dark.slice(1), {
398
+ color: shadowColorsDark.colors.base
399
+ }),
400
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xl.dark.slice(1), {
401
+ direction: 'up',
402
+ color: shadowColorsDark.colors.base
403
+ })
404
+ },
405
+ hover: {
406
+ base: {
407
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.dark.slice(1), {
408
+ color: shadowColorsDark.colors.base
409
+ }),
410
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.s.dark.slice(1), {
411
+ direction: 'up',
412
+ color: shadowColorsDark.colors.base
413
+ })
414
+ },
415
+ xl: {
416
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xxl.dark.slice(1), {
417
+ color: shadowColorsDark.colors.base
418
+ }),
419
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xxl.dark.slice(1), {
420
+ direction: 'up',
421
+ color: shadowColorsDark.colors.base
422
+ })
423
+ }
424
+ },
425
+ flat: {
426
+ down: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.dark.slice(1), {
427
+ color: shadowColorsDark.colors.base
428
+ }),
429
+ up: (0, _euiThemeCommon.formatMultipleBoxShadow)(shadowPrimitives.xs.dark.slice(1), {
430
+ direction: 'up',
431
+ color: shadowColorsDark.colors.base
432
+ })
433
+ }
434
+ });
435
+ var shadows = exports.shadows = {
436
+ LIGHT: shadowsLight,
437
+ DARK: shadowsDark
438
+ };
package/lib/esm/index.js CHANGED
@@ -13,6 +13,7 @@ import { base, size } from './variables/_size';
13
13
  import { border } from './variables/_borders';
14
14
  import { levels } from './variables/_levels';
15
15
  import { font } from './variables/_typography';
16
+ import { shadows } from './variables/_shadows';
16
17
  import { focus } from './variables/_states';
17
18
  import { components } from './variables/_components';
18
19
  import { overrides } from './variables/_overrides';
@@ -29,13 +30,11 @@ export const euiThemeBorealis = {
29
30
  animation,
30
31
  breakpoint,
31
32
  levels,
33
+ shadows,
32
34
  focus,
33
35
  components,
34
36
  flags: {
35
- hasGlobalFocusColor: true,
36
- hasVisColorAdjustment: false,
37
- buttonVariant: 'refresh',
38
- formVariant: 'refresh',
37
+ shadowVariant: 'refresh',
39
38
  },
40
39
  overrides,
41
40
  };
@@ -5,17 +5,8 @@
5
5
  * in compliance with, at your election, the Elastic License 2.0 or the Server
6
6
  * Side Public License, v 1.
7
7
  */
8
- import { computed, } from '@elastic/eui-theme-common';
8
+ import { computed } from '@elastic/eui-theme-common';
9
9
  import { SEMANTIC_COLORS } from './colors/_semantic_colors';
10
- const getTokenByVariant = (buttonVariant, tokens) => {
11
- switch (buttonVariant) {
12
- case 'refresh':
13
- return tokens.refresh;
14
- default: {
15
- return tokens.classic;
16
- }
17
- }
18
- };
19
10
  const _buttons = {
20
11
  backgroundPrimary: computed(([backgroundLightPrimary]) => backgroundLightPrimary, ['colors.backgroundLightPrimary']),
21
12
  backgroundAccent: computed(([backgroundLightAccent]) => backgroundLightAccent, ['colors.backgroundLightAccent']),
@@ -25,16 +16,7 @@ const _buttons = {
25
16
  backgroundWarning: computed(([backgroundLightWarning]) => backgroundLightWarning, ['colors.backgroundLightWarning']),
26
17
  backgroundRisk: computed(([backgroundLightRisk]) => backgroundLightRisk, ['colors.backgroundLightRisk']),
27
18
  backgroundDanger: computed(([backgroundLightDanger]) => backgroundLightDanger, ['colors.backgroundLightDanger']),
28
- backgroundText: computed(([buttonVariant, backgroundBasePlain, backgroundLightText]) => {
29
- return getTokenByVariant(buttonVariant, {
30
- refresh: backgroundBasePlain,
31
- classic: backgroundLightText,
32
- });
33
- }, [
34
- 'flags.buttonVariant',
35
- 'colors.backgroundBasePlain',
36
- 'colors.backgroundLightText',
37
- ]),
19
+ backgroundText: computed(([backgroundBasePlain]) => backgroundBasePlain, ['colors.backgroundBasePlain']),
38
20
  backgroundDisabled: computed(([backgroundBaseDisabled]) => backgroundBaseDisabled, ['colors.backgroundBaseDisabled']),
39
21
  backgroundPrimaryHover: SEMANTIC_COLORS.primary70Alpha12,
40
22
  backgroundAccentHover: SEMANTIC_COLORS.accent70Alpha12,
@@ -77,7 +77,6 @@ const component_colors = {
77
77
  headerDarkBackground: dark_background_colors.backgroundBasePlain,
78
78
  headerDarkSearchBorderColor: dark_border_colors.borderBasePlain,
79
79
  headerDarkSectionItemBackgroundFocus: dark_background_colors.backgroundBasePrimary,
80
- keyPadMenuItemBackgroundDisabledSelect: computed(([backgroundBaseDisabled]) => backgroundBaseDisabled, ['colors.backgroundBaseDisabled']),
81
80
  listGroupItemBackgroundPrimaryActive: computed(([backgroundBaseInteractiveSelect]) => backgroundBaseInteractiveSelect, ['colors.backgroundBaseInteractiveSelect']),
82
81
  listGroupItemBackgroundSubduedActive: computed(([backgroundBaseInteractiveSelect]) => backgroundBaseInteractiveSelect, ['colors.backgroundBaseInteractiveSelect']),
83
82
  listGroupItemBackgroundHover: computed(([backgroundBaseInteractiveHover]) => backgroundBaseInteractiveHover, ['colors.backgroundBaseInteractiveHover']),
@@ -0,0 +1,8 @@
1
+ import { type _EuiThemeShadows, type _EuiThemeShadowPrimitives } from '@elastic/eui-theme-common';
2
+ /**
3
+ * This structure holds "primitives" (or actual design tokens as they
4
+ * would be stored in a design token repository).
5
+ * Not exposing them in the theme object is intentional.
6
+ */
7
+ export declare const shadowPrimitives: _EuiThemeShadowPrimitives;
8
+ export declare const shadows: _EuiThemeShadows;