@elastic/eui-theme-common 7.2.0 → 8.0.0-snapshot.1771331649954

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 (46) hide show
  1. package/lib/cjs/global_styling/functions/math.d.ts +4 -2
  2. package/lib/cjs/global_styling/functions/size.d.ts +1 -1
  3. package/lib/cjs/global_styling/mixins/borders.d.ts +1 -1
  4. package/lib/cjs/global_styling/mixins/shadow.d.ts +9 -9
  5. package/lib/cjs/global_styling/variables/animations.d.ts +5 -5
  6. package/lib/cjs/global_styling/variables/borders.d.ts +1 -1
  7. package/lib/cjs/global_styling/variables/breakpoint.d.ts +2 -2
  8. package/lib/cjs/global_styling/variables/buttons.d.ts +2 -2
  9. package/lib/cjs/global_styling/variables/colors.d.ts +15 -15
  10. package/lib/cjs/global_styling/variables/components.d.ts +4 -3
  11. package/lib/cjs/global_styling/variables/flags.d.ts +2 -2
  12. package/lib/cjs/global_styling/variables/forms.d.ts +2 -2
  13. package/lib/cjs/global_styling/variables/levels.d.ts +2 -2
  14. package/lib/cjs/global_styling/variables/overrides.d.ts +1 -1
  15. package/lib/cjs/global_styling/variables/shadow.d.ts +7 -7
  16. package/lib/cjs/global_styling/variables/size.d.ts +3 -3
  17. package/lib/cjs/global_styling/variables/typography.d.ts +10 -10
  18. package/lib/cjs/services/theme/types.d.ts +14 -14
  19. package/lib/cjs/services/vis_color_store.d.ts +3 -3
  20. package/lib/cjs/types.d.ts +3 -3
  21. package/lib/cjs/utils.d.ts +7 -9
  22. package/lib/esm/global_styling/functions/math.d.ts +4 -2
  23. package/lib/esm/global_styling/functions/size.d.ts +1 -1
  24. package/lib/esm/global_styling/mixins/borders.d.ts +1 -1
  25. package/lib/esm/global_styling/mixins/shadow.d.ts +9 -9
  26. package/lib/esm/global_styling/variables/animations.d.ts +5 -5
  27. package/lib/esm/global_styling/variables/borders.d.ts +1 -1
  28. package/lib/esm/global_styling/variables/breakpoint.d.ts +2 -2
  29. package/lib/esm/global_styling/variables/buttons.d.ts +2 -2
  30. package/lib/esm/global_styling/variables/colors.d.ts +15 -15
  31. package/lib/esm/global_styling/variables/components.d.ts +4 -3
  32. package/lib/esm/global_styling/variables/flags.d.ts +2 -2
  33. package/lib/esm/global_styling/variables/forms.d.ts +2 -2
  34. package/lib/esm/global_styling/variables/levels.d.ts +2 -2
  35. package/lib/esm/global_styling/variables/overrides.d.ts +1 -1
  36. package/lib/esm/global_styling/variables/shadow.d.ts +7 -7
  37. package/lib/esm/global_styling/variables/size.d.ts +3 -3
  38. package/lib/esm/global_styling/variables/typography.d.ts +10 -10
  39. package/lib/esm/services/theme/types.d.ts +14 -14
  40. package/lib/esm/services/vis_color_store.d.ts +3 -3
  41. package/lib/esm/types.d.ts +3 -3
  42. package/lib/esm/utils.d.ts +7 -9
  43. package/package.json +6 -5
  44. package/src/global_styling/functions/_colors.scss +3 -3
  45. package/src/global_styling/mixins/_tool_tip.scss +2 -2
  46. package/src/global_styling/variables/_buttons.scss +1 -1
@@ -7,6 +7,8 @@
7
7
  * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
8
8
  * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
9
9
  */
10
- declare type ValueTypes = string | number | undefined;
11
- export declare const mathWithUnits: (values: ValueTypes | ValueTypes[], callback: (...args: number[]) => number, unit?: string) => string;
10
+ type ValueTypes = string | number | undefined;
11
+ export declare const mathWithUnits: (values: ValueTypes | ValueTypes[], // Can accept a single input or array of inputs
12
+ callback: (...args: number[]) => number, // Can be multiplication, division, addition, etc.
13
+ unit?: string) => string;
12
14
  export {};
@@ -7,6 +7,6 @@
7
7
  * @returns string - Rem unit aligned to baseline
8
8
  */
9
9
  export declare const sizeToPixel: (scale?: number) => (themeOrBase: number | {
10
- [key: string]: any;
11
10
  base: number;
11
+ [key: string]: any;
12
12
  }) => string;
@@ -1,6 +1,6 @@
1
1
  import { UseEuiTheme } from '../../services/theme/types';
2
2
  export declare const getBorderSide: (side: BorderSides) => string;
3
- export declare type BorderSides = 'left' | 'right' | 'top' | 'bottom' | 'horizontal' | 'vertical' | 'all';
3
+ export type BorderSides = 'left' | 'right' | 'top' | 'bottom' | 'horizontal' | 'vertical' | 'all';
4
4
  /**
5
5
  * Defines styles for floating boarders applied in DARK mode via EUI shadow utils
6
6
  */
@@ -16,38 +16,38 @@ export interface EuiShadowOptions {
16
16
  /**
17
17
  * x-small shadow
18
18
  */
19
- export declare const euiShadowXSmall: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions | undefined) => string;
19
+ export declare const euiShadowXSmall: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions) => string;
20
20
  /**
21
21
  * small shadow
22
22
  */
23
- export declare const euiShadowSmall: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions | undefined) => string;
23
+ export declare const euiShadowSmall: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions) => string;
24
24
  /**
25
25
  * medium shadow
26
26
  */
27
- export declare const euiShadowMedium: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions | undefined) => string;
27
+ export declare const euiShadowMedium: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions) => string;
28
28
  /**
29
29
  * large shadow
30
30
  */
31
- export declare const euiShadowLarge: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions | undefined) => string;
31
+ export declare const euiShadowLarge: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions) => string;
32
32
  /**
33
33
  * x-large shadow
34
34
  */
35
35
  export interface EuiShadowXLarge extends EuiShadowOptions {
36
36
  reverse?: boolean;
37
37
  }
38
- export declare const euiShadowXLarge: (euiThemeContext: UseEuiTheme, options?: EuiShadowXLarge | undefined) => string;
38
+ export declare const euiShadowXLarge: (euiThemeContext: UseEuiTheme, options?: EuiShadowXLarge) => string;
39
39
  /**
40
40
  * flat shadow
41
41
  * @deprecated - use euiShadowHover instead
42
42
  */
43
- export declare const euiSlightShadowHover: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions | undefined) => string;
43
+ export declare const euiSlightShadowHover: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions) => string;
44
44
  /**
45
45
  * @deprecated - use euiShadowXSmall instead
46
46
  *
47
47
  * Similar to shadow medium but without the bottom depth.
48
48
  * Useful for popovers that drop UP rather than DOWN.
49
49
  */
50
- export declare const euiShadowFlat: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions | undefined) => string;
51
- export declare const euiShadow: (euiThemeContext: UseEuiTheme, size?: _EuiThemeShadowSize, options?: EuiShadowOptions | undefined) => string;
50
+ export declare const euiShadowFlat: (euiThemeContext: UseEuiTheme, options?: EuiShadowOptions) => string;
51
+ export declare const euiShadow: (euiThemeContext: UseEuiTheme, size?: _EuiThemeShadowSize, options?: EuiShadowOptions) => string;
52
52
  /** Hover shadows */
53
- export declare const euiShadowHover: (euiThemeContext: UseEuiTheme, size?: _EuiThemeShadowSize | 'base', options?: EuiShadowOptions | undefined) => string;
53
+ export declare const euiShadowHover: (euiThemeContext: UseEuiTheme, size?: _EuiThemeShadowSize | "base", options?: EuiShadowOptions) => string;
@@ -13,8 +13,8 @@ export declare const euiCantAnimate = "@media screen and (prefers-reduced-motion
13
13
  * Speeds / Durations / Delays
14
14
  */
15
15
  export declare const EuiThemeAnimationSpeeds: readonly ["extraFast", "fast", "normal", "slow", "extraSlow"];
16
- export declare type _EuiThemeAnimationSpeed = (typeof EuiThemeAnimationSpeeds)[number];
17
- export declare type _EuiThemeAnimationSpeeds = {
16
+ export type _EuiThemeAnimationSpeed = (typeof EuiThemeAnimationSpeeds)[number];
17
+ export type _EuiThemeAnimationSpeeds = {
18
18
  /** - Default value: 90ms */
19
19
  extraFast: CSSProperties['animationDuration'];
20
20
  /** - Default value: 150ms */
@@ -30,6 +30,6 @@ export declare type _EuiThemeAnimationSpeeds = {
30
30
  * Easings / Timing functions
31
31
  */
32
32
  export declare const EuiThemeAnimationEasings: readonly ["bounce", "resistance"];
33
- export declare type _EuiThemeAnimationEasing = (typeof EuiThemeAnimationEasings)[number];
34
- export declare type _EuiThemeAnimationEasings = Record<_EuiThemeAnimationEasing, CSSProperties['animationTimingFunction']>;
35
- export declare type _EuiThemeAnimation = _EuiThemeAnimationEasings & _EuiThemeAnimationSpeeds;
33
+ export type _EuiThemeAnimationEasing = (typeof EuiThemeAnimationEasings)[number];
34
+ export type _EuiThemeAnimationEasings = Record<_EuiThemeAnimationEasing, CSSProperties['animationTimingFunction']>;
35
+ export type _EuiThemeAnimation = _EuiThemeAnimationEasings & _EuiThemeAnimationSpeeds;
@@ -58,4 +58,4 @@ export interface _EuiThemeBorderTypes {
58
58
  */
59
59
  editable: CSSProperties['border'];
60
60
  }
61
- export declare type _EuiThemeBorder = _EuiThemeBorderValues & _EuiThemeBorderTypes;
61
+ export type _EuiThemeBorder = _EuiThemeBorderValues & _EuiThemeBorderTypes;
@@ -1,6 +1,6 @@
1
1
  export declare const EuiThemeBreakpoints: readonly ["xs", "s", "m", "l", "xl"];
2
- export declare type _EuiThemeBreakpoint = string;
3
- export declare type _EuiThemeBreakpoints = Record<_EuiThemeBreakpoint, number> & {
2
+ export type _EuiThemeBreakpoint = string;
3
+ export type _EuiThemeBreakpoints = Record<_EuiThemeBreakpoint, number> & {
4
4
  /** - Default value: 0 */
5
5
  xs: number;
6
6
  /** - Default value: 575 */
@@ -1,5 +1,5 @@
1
1
  import { ColorModeSwitch, StrictColorModeSwitch } from '../../services/theme/types';
2
- export declare type _EuiThemeButtonColors = {
2
+ export type _EuiThemeButtonColors = {
3
3
  backgroundPrimary: ColorModeSwitch;
4
4
  backgroundAccent: ColorModeSwitch;
5
5
  backgroundAccentSecondary: ColorModeSwitch;
@@ -95,4 +95,4 @@ export declare type _EuiThemeButtonColors = {
95
95
  textColorFilledText: ColorModeSwitch;
96
96
  textColorFilledDisabled: ColorModeSwitch;
97
97
  };
98
- export declare type _EuiThemeButton = StrictColorModeSwitch<_EuiThemeButtonColors> & {};
98
+ export type _EuiThemeButton = StrictColorModeSwitch<_EuiThemeButtonColors> & {};
@@ -2,7 +2,7 @@ import { ColorModeSwitch, StrictColorModeSwitch } from '../../services/theme/typ
2
2
  /**
3
3
  * Top 5 colors
4
4
  */
5
- export declare type _EuiThemeBrandColors = {
5
+ export type _EuiThemeBrandColors = {
6
6
  /**
7
7
  * Main brand color and used for most **call to actions** like buttons and links.
8
8
  */
@@ -31,7 +31,7 @@ export declare type _EuiThemeBrandColors = {
31
31
  /**
32
32
  * Every brand color must have a contrast computed text equivelant
33
33
  */
34
- export declare type _EuiThemeBrandTextColors = {
34
+ export type _EuiThemeBrandTextColors = {
35
35
  /**
36
36
  * Typically computed against `colors.primary`
37
37
  * @deprecated - use `textPrimary` instead
@@ -66,7 +66,7 @@ export declare type _EuiThemeBrandTextColors = {
66
66
  textRisk: ColorModeSwitch;
67
67
  textDanger: ColorModeSwitch;
68
68
  };
69
- export declare type _EuiThemeShadeColors = {
69
+ export type _EuiThemeShadeColors = {
70
70
  /**
71
71
  * Used as the background color of primary **page content and panels** including modals and flyouts.
72
72
  * @deprecated - use specific semantic color tokens instead
@@ -103,7 +103,7 @@ export declare type _EuiThemeShadeColors = {
103
103
  */
104
104
  fullShade: ColorModeSwitch;
105
105
  };
106
- export declare type _EuiThemeTextColors = {
106
+ export type _EuiThemeTextColors = {
107
107
  /**
108
108
  * Computed against `colors.darkestShade`
109
109
  * @deprecated - use `textParagraph` instead
@@ -128,8 +128,10 @@ export declare type _EuiThemeTextColors = {
128
128
  textSubdued: ColorModeSwitch;
129
129
  textDisabled: ColorModeSwitch;
130
130
  textInverse: ColorModeSwitch;
131
+ textInk: ColorModeSwitch;
132
+ textGhost: ColorModeSwitch;
131
133
  };
132
- export declare type _EuiThemeSpecialColors = {
134
+ export type _EuiThemeSpecialColors = {
133
135
  /**
134
136
  * The background color for the **whole window (body)** and is a computed value of `colors.lightestShade`.
135
137
  * Provides denominator (background) value for **contrast calculations**.
@@ -156,7 +158,7 @@ export declare type _EuiThemeSpecialColors = {
156
158
  */
157
159
  shadow: ColorModeSwitch;
158
160
  };
159
- export declare type _EuiThemeBackgroundColors = {
161
+ export type _EuiThemeBackgroundColors = {
160
162
  backgroundBasePrimary: ColorModeSwitch;
161
163
  backgroundBaseAccent: ColorModeSwitch;
162
164
  backgroundBaseAccentSecondary: ColorModeSwitch;
@@ -197,7 +199,7 @@ export declare type _EuiThemeBackgroundColors = {
197
199
  backgroundFilledText: ColorModeSwitch;
198
200
  };
199
201
  /** TODO: remove once usages are re-mapped */
200
- export declare type _EuiThemeTransparentBackgroundColors = {
202
+ export type _EuiThemeTransparentBackgroundColors = {
201
203
  /** @deprecated - temp. token, was never in use */
202
204
  backgroundTransparent: string;
203
205
  /** @deprecated - temp. token, was never in use */
@@ -223,7 +225,7 @@ export declare type _EuiThemeTransparentBackgroundColors = {
223
225
  /** @deprecated - temp. token, was never in use */
224
226
  backgroundTransparentPlain: ColorModeSwitch;
225
227
  };
226
- export declare type _EuiThemeBorderColors = {
228
+ export type _EuiThemeBorderColors = {
227
229
  borderBasePrimary: ColorModeSwitch;
228
230
  borderBaseAccent: ColorModeSwitch;
229
231
  borderBaseAccentSecondary: ColorModeSwitch;
@@ -255,7 +257,7 @@ export declare type _EuiThemeBorderColors = {
255
257
  borderStrongDanger: ColorModeSwitch;
256
258
  borderStrongText: ColorModeSwitch;
257
259
  };
258
- export declare type _EuiThemeVisColors = {
260
+ export type _EuiThemeVisColors = {
259
261
  euiColorVis0: string;
260
262
  euiColorVis1: string;
261
263
  euiColorVis2: string;
@@ -320,7 +322,7 @@ export declare type _EuiThemeVisColors = {
320
322
  euiColorVisComplementary0: string;
321
323
  euiColorVisComplementary1: string;
322
324
  };
323
- export declare type _EuiThemeSeverityColors = {
325
+ export type _EuiThemeSeverityColors = {
324
326
  unknown: string;
325
327
  success: string;
326
328
  neutral: string;
@@ -328,14 +330,12 @@ export declare type _EuiThemeSeverityColors = {
328
330
  risk: string;
329
331
  danger: string;
330
332
  };
331
- export declare type _EuiThemeConstantColors = {
332
- ghost: string;
333
- ink: string;
333
+ export type _EuiThemeConstantColors = {
334
334
  plainLight: string;
335
335
  plainDark: string;
336
336
  };
337
- export declare type _EuiThemeColorsMode = _EuiThemeBrandColors & _EuiThemeBrandTextColors & _EuiThemeShadeColors & _EuiThemeSpecialColors & _EuiThemeTextColors & _EuiThemeBackgroundColors & _EuiThemeTransparentBackgroundColors & _EuiThemeBorderColors;
338
- export declare type _EuiThemeColors = StrictColorModeSwitch<_EuiThemeColorsMode & {
337
+ export type _EuiThemeColorsMode = _EuiThemeBrandColors & _EuiThemeBrandTextColors & _EuiThemeShadeColors & _EuiThemeSpecialColors & _EuiThemeTextColors & _EuiThemeBackgroundColors & _EuiThemeTransparentBackgroundColors & _EuiThemeBorderColors;
338
+ export type _EuiThemeColors = StrictColorModeSwitch<_EuiThemeColorsMode & {
339
339
  vis: _EuiThemeVisColors;
340
340
  severity: _EuiThemeSeverityColors;
341
341
  }> & _EuiThemeConstantColors;
@@ -1,7 +1,7 @@
1
1
  import { ColorModeSwitch, StrictColorModeSwitch } from '../../services/theme/types';
2
2
  import { _EuiThemeButton } from './buttons';
3
3
  import { _EuiThemeForm, _EuiThemeFormColors } from './forms';
4
- export declare type _EuiThemeComponentColors = {
4
+ export type _EuiThemeComponentColors = {
5
5
  badgeBackground: ColorModeSwitch;
6
6
  badgeBackgroundSubdued: ColorModeSwitch;
7
7
  badgeBorderColorHollow: ColorModeSwitch;
@@ -87,7 +87,6 @@ export declare type _EuiThemeComponentColors = {
87
87
  sideNavItemEmphasizedBackground: ColorModeSwitch;
88
88
  selectableListItemBorderColor: ColorModeSwitch;
89
89
  skeletonBackgroundSkeletonMiddleHighContrast: ColorModeSwitch;
90
- superDatePickerBackgroundSuccees: ColorModeSwitch;
91
90
  switchBackgroundOn: ColorModeSwitch;
92
91
  switchBackgroundOff: ColorModeSwitch;
93
92
  switchUncompressedBackgroundDisabled: ColorModeSwitch;
@@ -110,9 +109,11 @@ export declare type _EuiThemeComponentColors = {
110
109
  tooltipBorder: ColorModeSwitch;
111
110
  tooltipBorderFloating: ColorModeSwitch;
112
111
  tourFooterBackground: ColorModeSwitch;
112
+ tourStepIndicatorInactiveColor: ColorModeSwitch;
113
+ tourStepIndicatorActiveColor: ColorModeSwitch;
113
114
  treeViewItemBackgroundHover: ColorModeSwitch;
114
115
  };
115
- export declare type _EuiThemeComponents = {
116
+ export type _EuiThemeComponents = {
116
117
  buttons: _EuiThemeButton;
117
118
  forms: _EuiThemeForm & StrictColorModeSwitch<_EuiThemeFormColors>;
118
119
  /**
@@ -1,7 +1,7 @@
1
- export declare type EuiThemeVariantFlags = {
1
+ export type EuiThemeVariantFlags = {
2
2
  shadowVariant: 'classic' | 'refresh';
3
3
  };
4
4
  /**
5
5
  * Theme specific setting flags
6
6
  */
7
- export declare type _EuiThemeFlags = EuiThemeVariantFlags;
7
+ export type _EuiThemeFlags = EuiThemeVariantFlags;
@@ -1,8 +1,8 @@
1
1
  import { ColorModeSwitch } from '../../services/theme/types';
2
- export declare type _EuiThemeForm = {
2
+ export type _EuiThemeForm = {
3
3
  maxWidth: string;
4
4
  };
5
- export declare type _EuiThemeFormColors = {
5
+ export type _EuiThemeFormColors = {
6
6
  background: ColorModeSwitch;
7
7
  backgroundDisabled: ColorModeSwitch;
8
8
  backgroundReadOnly: ColorModeSwitch;
@@ -15,8 +15,8 @@ import { CSSProperties } from 'react';
15
15
  * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
16
16
  */
17
17
  export declare const EuiThemeLevels: readonly ["toast", "modal", "mask", "navigation", "menu", "header", "flyout", "maskBelowHeader", "content"];
18
- export declare type _EuiThemeLevel = (typeof EuiThemeLevels)[number];
19
- export declare type _EuiThemeLevels = {
18
+ export type _EuiThemeLevel = (typeof EuiThemeLevels)[number];
19
+ export type _EuiThemeLevels = {
20
20
  /** - Default value: 9000 */
21
21
  toast: NonNullable<CSSProperties['zIndex']>;
22
22
  /** - Default value: 8000 */
@@ -3,6 +3,6 @@ import { EUI_THEME_HIGH_CONTRAST_MODE_KEY, type EuiThemeShapeBase } from '../../
3
3
  /**
4
4
  * Theme specific conditional overrides, e.g. for high contrast mode
5
5
  */
6
- export declare type _EuiThemeOverrides = {
6
+ export type _EuiThemeOverrides = {
7
7
  [EUI_THEME_HIGH_CONTRAST_MODE_KEY]: RecursivePartial<EuiThemeShapeBase>;
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { ColorModeSwitch } from '../../services/theme/types';
3
3
  export declare const EuiThemeShadowSizes: readonly ["xs", "s", "m", "l", "xl"];
4
- export declare type _EuiThemeShadowSize = (typeof EuiThemeShadowSizes)[number];
4
+ export type _EuiThemeShadowSize = (typeof EuiThemeShadowSizes)[number];
5
5
  export declare const EuiThemeShadowHoverSizes: readonly ["s", "m", "l", "xl", "xxl"];
6
- export declare type _EuiThemeShadowHoverSize = (typeof EuiThemeShadowHoverSizes)[number];
6
+ export type _EuiThemeShadowHoverSize = (typeof EuiThemeShadowHoverSizes)[number];
7
7
  /**
8
8
  * Shadow t-shirt sizes descriptions
9
9
  */
@@ -13,13 +13,13 @@ export interface _EuiThemeShadowCustomColor {
13
13
  property?: 'box-shadow' | 'filter';
14
14
  borderAllInHighContrastMode?: boolean;
15
15
  }
16
- export declare type _EuiThemeShadow = {
16
+ export type _EuiThemeShadow = {
17
17
  /** Default direction of the shadow */
18
18
  down: CSSProperties['boxShadow'];
19
19
  /** Reverse direction */
20
20
  up: CSSProperties['boxShadow'];
21
21
  };
22
- export declare type _EuiThemeShadows = ColorModeSwitch<{
22
+ export type _EuiThemeShadows = ColorModeSwitch<{
23
23
  colors: {
24
24
  base: string;
25
25
  };
@@ -41,18 +41,18 @@ export declare type _EuiThemeShadows = ColorModeSwitch<{
41
41
  * Represents a single shadow
42
42
  * @see https://tr.designtokens.org/format/#shadow
43
43
  */
44
- export declare type _EuiThemeShadowLayer = {
44
+ export type _EuiThemeShadowLayer = {
45
45
  opacity: number;
46
46
  x: number;
47
47
  y: number;
48
48
  blur: number;
49
49
  spread: number;
50
50
  };
51
- export declare type _EuiThemeShadowPrimitive = {
51
+ export type _EuiThemeShadowPrimitive = {
52
52
  light: _EuiThemeShadowLayer[];
53
53
  dark: _EuiThemeShadowLayer[];
54
54
  };
55
- export declare type _EuiThemeShadowPrimitives = {
55
+ export type _EuiThemeShadowPrimitives = {
56
56
  xs: _EuiThemeShadowPrimitive;
57
57
  s: _EuiThemeShadowPrimitive;
58
58
  m: _EuiThemeShadowPrimitive;
@@ -1,7 +1,7 @@
1
- export declare type _EuiThemeBase = number;
1
+ export type _EuiThemeBase = number;
2
2
  export declare const EuiThemeSizes: readonly ["xxs", "xs", "s", "m", "base", "l", "xl", "xxl", "xxxl", "xxxxl"];
3
- export declare type _EuiThemeSize = (typeof EuiThemeSizes)[number];
4
- export declare type _EuiThemeSizes = {
3
+ export type _EuiThemeSize = (typeof EuiThemeSizes)[number];
4
+ export type _EuiThemeSizes = {
5
5
  /** - Default value: 2px */
6
6
  xxs: string;
7
7
  /** - Default value: 4px */
@@ -3,11 +3,11 @@ import { CSSProperties } from 'react';
3
3
  * Font units of measure
4
4
  */
5
5
  export declare const EuiThemeFontUnits: readonly ["rem", "px", "em"];
6
- export declare type _EuiThemeFontUnit = (typeof EuiThemeFontUnits)[number];
6
+ export type _EuiThemeFontUnit = (typeof EuiThemeFontUnits)[number];
7
7
  export declare const EuiThemeFontScales: readonly ["xxxs", "xxs", "xs", "s", "m", "l", "xl", "xxl"];
8
- export declare type _EuiThemeFontScale = (typeof EuiThemeFontScales)[number];
9
- export declare type _EuiThemeFontScales = Record<_EuiThemeFontScale, number>;
10
- export declare type _EuiThemeFontBase = {
8
+ export type _EuiThemeFontScale = (typeof EuiThemeFontScales)[number];
9
+ export type _EuiThemeFontScales = Record<_EuiThemeFontScale, number>;
10
+ export type _EuiThemeFontBase = {
11
11
  /**
12
12
  * The whole font family stack for all parts of the UI.
13
13
  * We encourage only customizing the first font in the stack.
@@ -46,17 +46,17 @@ export declare type _EuiThemeFontBase = {
46
46
  lineHeightMultiplier: number;
47
47
  };
48
48
  export declare const EuiThemeFontWeights: readonly ["light", "regular", "medium", "semiBold", "bold"];
49
- export declare type _EuiThemeFontWeight = (typeof EuiThemeFontWeights)[number];
50
- export declare type _EuiThemeFontWeights = {
49
+ export type _EuiThemeFontWeight = (typeof EuiThemeFontWeights)[number];
50
+ export type _EuiThemeFontWeights = {
51
51
  /** - Default value: 300 */
52
52
  light: CSSProperties['fontWeight'];
53
53
  /** - Default value: 400 */
54
54
  regular: CSSProperties['fontWeight'];
55
- /** - Default value: 500 */
55
+ /** - Default value: 450 */
56
56
  medium: CSSProperties['fontWeight'];
57
- /** - Default value: 600 */
57
+ /** - Default value: 500 */
58
58
  semiBold: CSSProperties['fontWeight'];
59
- /** - Default value: 700 */
59
+ /** - Default value: 600 */
60
60
  bold: CSSProperties['fontWeight'];
61
61
  };
62
62
  /**
@@ -81,7 +81,7 @@ export interface _EuiThemeTitle {
81
81
  */
82
82
  weight: keyof _EuiThemeFontWeights;
83
83
  }
84
- export declare type _EuiThemeFont = _EuiThemeFontBase & {
84
+ export type _EuiThemeFont = _EuiThemeFontBase & {
85
85
  scale: _EuiThemeFontScales;
86
86
  /**
87
87
  * See {@link https://eui.elastic.co/docs/getting-started/theming/tokens/typography/font-weight/ | Reference} for more information
@@ -17,20 +17,20 @@ export declare const COLOR_MODES_STANDARD: {
17
17
  readonly dark: "DARK";
18
18
  };
19
19
  export declare const COLOR_MODES_INVERSE: "INVERSE";
20
- export declare type EuiThemeColorModeInverse = typeof COLOR_MODES_INVERSE;
21
- export declare type EuiThemeColorModeStandard = ValueOf<typeof COLOR_MODES_STANDARD>;
22
- export declare type EuiThemeColorMode = 'light' | 'dark' | EuiThemeColorModeStandard | 'inverse' | EuiThemeColorModeInverse;
23
- export declare type ColorModeSwitch<T = string> = {
20
+ export type EuiThemeColorModeInverse = typeof COLOR_MODES_INVERSE;
21
+ export type EuiThemeColorModeStandard = ValueOf<typeof COLOR_MODES_STANDARD>;
22
+ export type EuiThemeColorMode = 'light' | 'dark' | EuiThemeColorModeStandard | 'inverse' | EuiThemeColorModeInverse;
23
+ export type ColorModeSwitch<T = string> = {
24
24
  [key in EuiThemeColorModeStandard]: T;
25
25
  } | T;
26
- export declare type StrictColorModeSwitch<T = string> = {
26
+ export type StrictColorModeSwitch<T = string> = {
27
27
  [key in EuiThemeColorModeStandard]: T;
28
28
  };
29
- export declare type EuiThemeHighContrastModeProp = boolean;
30
- export declare type EuiThemeHighContrastMode = 'forced' | 'preferred' | false;
29
+ export type EuiThemeHighContrastModeProp = boolean;
30
+ export type EuiThemeHighContrastMode = 'forced' | 'preferred' | false;
31
31
  export declare const EUI_THEME_HIGH_CONTRAST_MODE_KEY: "HCM";
32
32
  export declare const EUI_THEME_OVERRIDES_KEY: "overrides";
33
- export declare type EuiThemeShapeBase = {
33
+ export type EuiThemeShapeBase = {
34
34
  colors: _EuiThemeColors;
35
35
  /** - Default value: 16 */
36
36
  base: _EuiThemeBase;
@@ -48,24 +48,24 @@ export declare type EuiThemeShapeBase = {
48
48
  components: _EuiThemeComponents;
49
49
  flags: _EuiThemeFlags;
50
50
  };
51
- export declare type EuiThemeShape = EuiThemeShapeBase & {
51
+ export type EuiThemeShape = EuiThemeShapeBase & {
52
52
  overrides?: _EuiThemeOverrides;
53
53
  };
54
- export declare type EuiThemeSystem<T = {}> = {
54
+ export type EuiThemeSystem<T = {}> = {
55
55
  root: EuiThemeShape & T;
56
56
  model: EuiThemeShape & T;
57
57
  key: string;
58
58
  };
59
- export declare type EuiThemeModifications<T = {}> = RecursivePartial<EuiThemeShape & T>;
60
- export declare type ComputedThemeShape<T, P = string | number | bigint | boolean | null | undefined> = T extends P | ColorModeSwitch<infer X> ? T extends ColorModeSwitch<X> ? X extends P ? X : {
59
+ export type EuiThemeModifications<T = {}> = RecursivePartial<EuiThemeShape & T>;
60
+ export type ComputedThemeShape<T, P = string | number | bigint | boolean | null | undefined> = T extends P | ColorModeSwitch<infer X> ? T extends ColorModeSwitch<X> ? X extends P ? X : {
61
61
  [K in keyof (X & Exclude<T, keyof X | keyof StrictColorModeSwitch>)]: ComputedThemeShape<(X & Exclude<T, keyof X | keyof StrictColorModeSwitch>)[K], P>;
62
62
  } : T : {
63
63
  [K in keyof T]: ComputedThemeShape<T[K], P>;
64
64
  };
65
- export declare type EuiThemeComputed<T = {}> = ComputedThemeShape<EuiThemeShape & T> & {
65
+ export type EuiThemeComputed<T = {}> = ComputedThemeShape<EuiThemeShape & T> & {
66
66
  themeName: string;
67
67
  };
68
- export declare type EuiThemeNested = {
68
+ export type EuiThemeNested = {
69
69
  isGlobalTheme: boolean;
70
70
  hasDifferentColorFromGlobalTheme: boolean;
71
71
  bodyColor: string;
@@ -2,9 +2,9 @@ import { _EuiThemeVisColors } from '../global_styling';
2
2
  export declare const VIS_COLOR_STORE_EVENTS: {
3
3
  readonly UPDATE: "UPDATE";
4
4
  };
5
- export declare type VisColorStoreEvents = keyof typeof VIS_COLOR_STORE_EVENTS;
6
- declare type EventId = string;
7
- export declare type _EuiVisColorStore = {
5
+ export type VisColorStoreEvents = keyof typeof VIS_COLOR_STORE_EVENTS;
6
+ type EventId = string;
7
+ export type _EuiVisColorStore = {
8
8
  visColors: _EuiThemeVisColors;
9
9
  setVisColors: (colors: _EuiThemeVisColors) => void;
10
10
  subscribe: (eventName: VisColorStoreEvents, callback: any) => EventId;
@@ -3,7 +3,7 @@
3
3
  * ValueOf<typeof {key1: 'value1', key2: 'value2'}>
4
4
  * Results in `'value1' | 'value2'`
5
5
  */
6
- export declare type ValueOf<T> = T[keyof T];
6
+ export type ValueOf<T> = T[keyof T];
7
7
  /**
8
8
  * Replaces all properties on any type as optional, includes nested types
9
9
  *
@@ -25,8 +25,8 @@ export declare type ValueOf<T> = T[keyof T];
25
25
  * }
26
26
  * ```
27
27
  */
28
- export declare type RecursivePartial<T> = {
28
+ export type RecursivePartial<T> = {
29
29
  [P in keyof T]?: T[P] extends NonAny[] ? T[P] : T[P] extends readonly NonAny[] ? T[P] : T[P] extends Array<infer U> ? Array<RecursivePartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> : T[P] extends Set<infer V> ? Set<RecursivePartial<V>> : T[P] extends Map<infer K, infer V> ? Map<K, RecursivePartial<V>> : T[P] extends NonAny ? T[P] : RecursivePartial<T[P]>;
30
30
  };
31
- declare type NonAny = number | boolean | string | symbol | null;
31
+ type NonAny = number | boolean | string | symbol | null;
32
32
  export {};
@@ -1,10 +1,10 @@
1
- import { EuiThemeColorMode, EuiThemeColorModeStandard, EuiThemeSystem, EuiThemeShape, EuiThemeComputed, _EuiThemeShadowLayer, EuiThemeHighContrastMode } from './global_styling';
1
+ import { EuiThemeColorMode, EuiThemeColorModeInverse, EuiThemeColorModeStandard, EuiThemeModifications, EuiThemeSystem, EuiThemeShape, EuiThemeComputed, _EuiThemeShadowLayer, EuiThemeHighContrastMode } from './global_styling';
2
2
  export declare const DEFAULT_COLOR_MODE: "LIGHT";
3
3
  /**
4
4
  * Returns whether the provided color mode is `inverse`
5
5
  * @param {string} colorMode - `light`, `dark`, or `inverse`
6
6
  */
7
- export declare const isInverseColorMode: (colorMode?: string | undefined) => colorMode is "INVERSE";
7
+ export declare const isInverseColorMode: (colorMode?: string) => colorMode is EuiThemeColorModeInverse;
8
8
  /**
9
9
  * Returns the color mode configured in the current EuiThemeProvider.
10
10
  * Returns the parent color mode if none is explicity set.
@@ -12,7 +12,7 @@ export declare const isInverseColorMode: (colorMode?: string | undefined) => col
12
12
  * @param {string} parentColorMode - `LIGHT` or `DARK`; used as the fallback
13
13
  * @param {boolean} isForced
14
14
  */
15
- export declare const getColorMode: (colorMode?: EuiThemeColorMode | undefined, parentColorMode?: EuiThemeColorModeStandard | undefined, isForced?: boolean | undefined) => EuiThemeColorModeStandard;
15
+ export declare const getColorMode: (colorMode?: EuiThemeColorMode, parentColorMode?: EuiThemeColorModeStandard, isForced?: boolean) => EuiThemeColorModeStandard;
16
16
  /**
17
17
  * Returns a value at a given path on an object.
18
18
  * If `colorMode` is provided, will scope the value to the appropriate color mode key (LIGHT\DARK)
@@ -22,7 +22,7 @@ export declare const getColorMode: (colorMode?: EuiThemeColorMode | undefined, p
22
22
  */
23
23
  export declare const getOn: (model: {
24
24
  [key: string]: any;
25
- }, _path: string, colorMode?: EuiThemeColorModeStandard | undefined) => {
25
+ }, _path: string, colorMode?: EuiThemeColorModeStandard) => {
26
26
  [key: string]: any;
27
27
  } | undefined;
28
28
  /**
@@ -53,9 +53,7 @@ export declare class Computed<T> {
53
53
  * @param {object} working - Partially computed theme
54
54
  * @param {string} colorMode - `light` or `dark`
55
55
  */
56
- getValue(base: EuiThemeSystem | EuiThemeShape | null, modifications: import("./types").RecursivePartial<import("./global_styling").EuiThemeShapeBase & {
57
- overrides?: import("./global_styling")._EuiThemeOverrides | undefined;
58
- }> | undefined, working: Partial<EuiThemeComputed>, colorMode?: EuiThemeColorModeStandard): T;
56
+ getValue(base: EuiThemeSystem | EuiThemeShape | null, modifications: EuiThemeModifications | undefined, working: Partial<EuiThemeComputed>, colorMode?: EuiThemeColorModeStandard): T;
59
57
  }
60
58
  /**
61
59
  * Returns a Class (`Computed`) that stores the arbitrary computer method
@@ -75,7 +73,7 @@ export declare function computed<T>(computer: (value: any) => T, dependencies: s
75
73
  * @param {Proxy | object} over - Unique identifier or name
76
74
  * @param {string} colorMode - `light` or `dark`
77
75
  */
78
- export declare const getComputed: <T = EuiThemeShape>(base: EuiThemeSystem<T>, over: Partial<EuiThemeSystem<T>>, colorMode: EuiThemeColorModeStandard, highContrastMode?: EuiThemeHighContrastMode | undefined) => EuiThemeComputed<T>;
76
+ export declare const getComputed: <T = EuiThemeShape>(base: EuiThemeSystem<T>, over: Partial<EuiThemeSystem<T>>, colorMode: EuiThemeColorModeStandard, highContrastMode?: EuiThemeHighContrastMode) => EuiThemeComputed<T>;
79
77
  /**
80
78
  * Builds a Proxy with a custom `handler` designed to self-reference values
81
79
  * and prevent arbitrary value overrides.
@@ -103,7 +101,7 @@ export declare const mergeDeep: (_target: {
103
101
  * Returns token name string based on passed dynamic variants
104
102
  * and additional prefix/suffix
105
103
  */
106
- export declare const getTokenName: (prefix: string, variant?: string | undefined, suffix?: string | undefined) => string;
104
+ export declare const getTokenName: (prefix: string, variant?: string, suffix?: string) => string;
107
105
  /**
108
106
  * Format an array of shadow "objects" into a string for CSS.
109
107
  * The "up" direction is built by making the y offset from layers
@@ -7,6 +7,8 @@
7
7
  * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
8
8
  * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
9
9
  */
10
- declare type ValueTypes = string | number | undefined;
11
- export declare const mathWithUnits: (values: ValueTypes | ValueTypes[], callback: (...args: number[]) => number, unit?: string) => string;
10
+ type ValueTypes = string | number | undefined;
11
+ export declare const mathWithUnits: (values: ValueTypes | ValueTypes[], // Can accept a single input or array of inputs
12
+ callback: (...args: number[]) => number, // Can be multiplication, division, addition, etc.
13
+ unit?: string) => string;
12
14
  export {};
@@ -7,6 +7,6 @@
7
7
  * @returns string - Rem unit aligned to baseline
8
8
  */
9
9
  export declare const sizeToPixel: (scale?: number) => (themeOrBase: number | {
10
- [key: string]: any;
11
10
  base: number;
11
+ [key: string]: any;
12
12
  }) => string;
@@ -1,6 +1,6 @@
1
1
  import { UseEuiTheme } from '../../services/theme/types';
2
2
  export declare const getBorderSide: (side: BorderSides) => string;
3
- export declare type BorderSides = 'left' | 'right' | 'top' | 'bottom' | 'horizontal' | 'vertical' | 'all';
3
+ export type BorderSides = 'left' | 'right' | 'top' | 'bottom' | 'horizontal' | 'vertical' | 'all';
4
4
  /**
5
5
  * Defines styles for floating boarders applied in DARK mode via EUI shadow utils
6
6
  */