@elastic/eui 58.0.0 → 58.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/eui_theme_dark.css +10 -160
  2. package/dist/eui_theme_dark.json +1 -8
  3. package/dist/eui_theme_dark.json.d.ts +0 -7
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +10 -160
  6. package/dist/eui_theme_light.json +1 -8
  7. package/dist/eui_theme_light.json.d.ts +0 -7
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/accessibility/index.js +1 -1
  10. package/es/components/accessibility/screen_reader_only/index.js +1 -1
  11. package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +6 -15
  12. package/es/components/accordion/accordion.js +48 -20
  13. package/es/components/accordion/accordion.styles.js +115 -0
  14. package/es/components/call_out/call_out.styles.js +8 -8
  15. package/es/components/datagrid/controls/column_sorting_draggable.js +6 -3
  16. package/es/components/empty_prompt/empty_prompt.js +2 -2
  17. package/es/components/mark/mark.styles.js +2 -1
  18. package/es/components/page/page_content/page_content.js +0 -2
  19. package/es/components/page/page_template.js +0 -2
  20. package/es/components/panel/index.js +1 -1
  21. package/es/components/panel/panel.js +23 -36
  22. package/es/components/panel/panel.style.js +49 -0
  23. package/es/components/popover/popover.js +1 -1
  24. package/es/components/resizable_container/resizable_panel.js +8 -2
  25. package/es/global_styling/mixins/_color.js +9 -8
  26. package/es/global_styling/mixins/_padding.js +6 -5
  27. package/eui.d.ts +285 -107
  28. package/i18ntokens.json +30 -14
  29. package/lib/components/accessibility/index.js +2 -2
  30. package/lib/components/accessibility/screen_reader_only/index.js +2 -2
  31. package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +15 -17
  32. package/lib/components/accordion/accordion.js +52 -21
  33. package/lib/components/accordion/accordion.styles.js +132 -0
  34. package/lib/components/call_out/call_out.styles.js +8 -8
  35. package/lib/components/datagrid/controls/column_sorting_draggable.js +5 -2
  36. package/lib/components/empty_prompt/empty_prompt.js +2 -2
  37. package/lib/components/mark/mark.styles.js +3 -1
  38. package/lib/components/page/page_content/page_content.js +0 -2
  39. package/lib/components/page/page_template.js +0 -2
  40. package/lib/components/panel/index.js +0 -6
  41. package/lib/components/panel/panel.js +27 -39
  42. package/lib/components/panel/panel.style.js +53 -0
  43. package/lib/components/popover/popover.js +1 -1
  44. package/lib/components/resizable_container/resizable_panel.js +9 -4
  45. package/lib/global_styling/mixins/_color.js +10 -8
  46. package/lib/global_styling/mixins/_padding.js +7 -5
  47. package/optimize/es/components/accessibility/index.js +1 -1
  48. package/optimize/es/components/accessibility/screen_reader_only/index.js +1 -1
  49. package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +6 -15
  50. package/optimize/es/components/accordion/accordion.js +47 -18
  51. package/optimize/es/components/accordion/accordion.styles.js +115 -0
  52. package/optimize/es/components/call_out/call_out.styles.js +8 -8
  53. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +6 -3
  54. package/optimize/es/components/empty_prompt/empty_prompt.js +2 -1
  55. package/optimize/es/components/mark/mark.styles.js +2 -1
  56. package/optimize/es/components/panel/index.js +1 -1
  57. package/optimize/es/components/panel/panel.js +23 -34
  58. package/optimize/es/components/panel/panel.style.js +49 -0
  59. package/optimize/es/components/popover/popover.js +1 -1
  60. package/optimize/es/components/resizable_container/resizable_panel.js +8 -1
  61. package/optimize/es/global_styling/mixins/_color.js +9 -8
  62. package/optimize/es/global_styling/mixins/_padding.js +6 -5
  63. package/optimize/lib/components/accessibility/index.js +2 -2
  64. package/optimize/lib/components/accessibility/screen_reader_only/index.js +2 -2
  65. package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +15 -17
  66. package/optimize/lib/components/accordion/accordion.js +50 -19
  67. package/optimize/lib/components/accordion/accordion.styles.js +132 -0
  68. package/optimize/lib/components/call_out/call_out.styles.js +8 -8
  69. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +5 -2
  70. package/optimize/lib/components/empty_prompt/empty_prompt.js +2 -1
  71. package/optimize/lib/components/mark/mark.styles.js +3 -1
  72. package/optimize/lib/components/panel/index.js +0 -6
  73. package/optimize/lib/components/panel/panel.js +27 -37
  74. package/optimize/lib/components/panel/panel.style.js +53 -0
  75. package/optimize/lib/components/popover/popover.js +1 -1
  76. package/optimize/lib/components/resizable_container/resizable_panel.js +9 -3
  77. package/optimize/lib/global_styling/mixins/_color.js +10 -8
  78. package/optimize/lib/global_styling/mixins/_padding.js +7 -5
  79. package/package.json +2 -2
  80. package/src/components/accordion/_index.scss +0 -1
  81. package/src/components/panel/_index.scss +0 -1
  82. package/src/components/panel/split_panel/_split_panel.scss +1 -25
  83. package/src/components/table/_table.scss +2 -4
  84. package/src/global_styling/mixins/_panel.scss +8 -11
  85. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -1
  86. package/test-env/components/accessibility/index.js +2 -2
  87. package/test-env/components/accessibility/screen_reader_only/index.js +2 -2
  88. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +15 -17
  89. package/test-env/components/accordion/accordion.js +52 -21
  90. package/test-env/components/accordion/accordion.styles.js +132 -0
  91. package/test-env/components/call_out/call_out.styles.js +8 -8
  92. package/test-env/components/datagrid/controls/column_sorting_draggable.js +5 -2
  93. package/test-env/components/empty_prompt/empty_prompt.js +2 -2
  94. package/test-env/components/mark/mark.styles.js +3 -1
  95. package/test-env/components/page/page_content/page_content.js +0 -2
  96. package/test-env/components/page/page_template.js +0 -2
  97. package/test-env/components/panel/index.js +0 -6
  98. package/test-env/components/panel/panel.js +27 -39
  99. package/test-env/components/panel/panel.style.js +53 -0
  100. package/test-env/components/popover/popover.js +1 -1
  101. package/test-env/components/resizable_container/resizable_panel.js +9 -4
  102. package/test-env/global_styling/mixins/_color.js +10 -8
  103. package/test-env/global_styling/mixins/_padding.js +7 -5
  104. package/src/components/accordion/_accordion.scss +0 -89
  105. package/src/themes/amsterdam/global_styling/mixins/_panel.scss +0 -61
package/eui.d.ts CHANGED
@@ -14,13 +14,13 @@ declare module '@elastic/eui/src/components/accessibility/screen_reader_only/scr
14
14
 
15
15
  }
16
16
  declare module '@elastic/eui/src/components/accessibility/screen_reader_only/screen_reader_only.styles' {
17
- export const euiScreenReaderOnlyStyles: () => import("@emotion/utils").SerializedStyles;
17
+ export const euiScreenReaderOnly: () => string;
18
18
 
19
19
  }
20
20
  declare module '@elastic/eui/src/components/accessibility/screen_reader_only' {
21
21
  export type { EuiScreenReaderOnlyProps } from '@elastic/eui/src/components/accessibility/screen_reader_only/screen_reader_only';
22
22
  export { EuiScreenReaderOnly } from '@elastic/eui/src/components/accessibility/screen_reader_only/screen_reader_only';
23
- export { euiScreenReaderOnlyStyles } from '@elastic/eui/src/components/accessibility/screen_reader_only/screen_reader_only.styles';
23
+ export { euiScreenReaderOnly } from '@elastic/eui/src/components/accessibility/screen_reader_only/screen_reader_only.styles';
24
24
 
25
25
  }
26
26
  declare module '@elastic/eui/src/components/accessibility/screen_reader_live/screen_reader_live' {
@@ -1207,14 +1207,14 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
1207
1207
  export const euiBackgroundColor: (color: EuiBackgroundColor, { euiTheme, colorMode }: UseEuiTheme) => string;
1208
1208
  export const useEuiBackgroundColor: (color: EuiBackgroundColor) => string;
1209
1209
  export const useEuiBackgroundColorCSS: () => {
1210
- transparent: string;
1211
- plain: string;
1212
- subdued: string;
1213
- accent: string;
1214
- primary: string;
1215
- success: string;
1216
- warning: string;
1217
- danger: string;
1210
+ transparent: import("@emotion/utils").SerializedStyles;
1211
+ plain: import("@emotion/utils").SerializedStyles;
1212
+ subdued: import("@emotion/utils").SerializedStyles;
1213
+ accent: import("@emotion/utils").SerializedStyles;
1214
+ primary: import("@emotion/utils").SerializedStyles;
1215
+ success: import("@emotion/utils").SerializedStyles;
1216
+ warning: import("@emotion/utils").SerializedStyles;
1217
+ danger: import("@emotion/utils").SerializedStyles;
1218
1218
  };
1219
1219
 
1220
1220
  }
@@ -2161,11 +2161,11 @@ declare module '@elastic/eui/src/global_styling/mixins/_padding' {
2161
2161
  export const useEuiPaddingSize: (size: EuiPaddingSize) => string | null;
2162
2162
  export const useEuiPaddingCSS: (side?: "left" | "right" | "top" | "horizontal" | "vertical" | "bottom" | undefined) => {
2163
2163
  none: null;
2164
- xs: string;
2165
- s: string;
2166
- m: string;
2167
- l: string;
2168
- xl: string;
2164
+ xs: import("@emotion/utils").SerializedStyles;
2165
+ s: import("@emotion/utils").SerializedStyles;
2166
+ m: import("@emotion/utils").SerializedStyles;
2167
+ l: import("@emotion/utils").SerializedStyles;
2168
+ xl: import("@emotion/utils").SerializedStyles;
2169
2169
  };
2170
2170
 
2171
2171
  }
@@ -3803,22 +3803,95 @@ declare module '@elastic/eui/src/components/form/file_picker' {
3803
3803
  export type { EuiFilePickerProps } from '@elastic/eui/src/components/form/file_picker/file_picker';
3804
3804
  export { EuiFilePicker } from '@elastic/eui/src/components/form/file_picker/file_picker';
3805
3805
 
3806
+ }
3807
+ declare module '@elastic/eui/src/themes/amsterdam/global_styling/functions/shadows' {
3808
+ import { EuiThemeColorModeStandard } from '@elastic/eui/src/services/theme/types';
3809
+ export const getShadowColor: (color: string, opacity: number, colorMode: EuiThemeColorModeStandard) => string;
3810
+
3811
+ }
3812
+ declare module '@elastic/eui/src/themes/amsterdam/global_styling/functions' {
3813
+ export * from '@elastic/eui/src/themes/amsterdam/global_styling/functions/shadows';
3814
+
3815
+ }
3816
+ declare module '@elastic/eui/src/themes/amsterdam/global_styling/mixins/shadow' {
3817
+ import { UseEuiTheme } from '@elastic/eui/src/services/theme';
3818
+ import { _EuiThemeShadowSize, _EuiThemeShadowCustomColor } from '@elastic/eui/src/global_styling/variables/shadow';
3819
+ export interface EuiShadowCustomColor {
3820
+ color?: string;
3821
+ }
3822
+ /**
3823
+ * euiSlightShadow
3824
+ */
3825
+ export const euiShadowXSmall: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
3826
+ /**
3827
+ * bottomShadowSmall
3828
+ */
3829
+ export const euiShadowSmall: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
3830
+ /**
3831
+ * bottomShadowMedium
3832
+ */
3833
+ export const euiShadowMedium: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
3834
+ /**
3835
+ * bottomShadow
3836
+ */
3837
+ export const euiShadowLarge: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
3838
+ /**
3839
+ * bottomShadowLarge
3840
+ */
3841
+ export interface EuiShadowXLarge extends _EuiThemeShadowCustomColor {
3842
+ reverse?: boolean;
3843
+ }
3844
+ export const euiShadowXLarge: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color, reverse }?: EuiShadowXLarge) => string;
3845
+ /**
3846
+ * slightShadowHover
3847
+ * TODO: I think this is only used by panels/cards in the Amsterdam theme, move there
3848
+ */
3849
+ export const euiSlightShadowHover: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
3850
+ export const useEuiSlightShadowHover: (color?: _EuiThemeShadowCustomColor['color']) => string;
3851
+ /**
3852
+ * bottomShadowFlat
3853
+ *
3854
+ * Similar to shadow medium but without the bottom depth.
3855
+ * Useful for popovers that drop UP rather than DOWN.
3856
+ */
3857
+ export const euiShadowFlat: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
3858
+ export const useEuiShadowFlat: (color?: _EuiThemeShadowCustomColor['color']) => string;
3859
+ export const euiShadow: (euiThemeContext: UseEuiTheme, size?: _EuiThemeShadowSize, { color }?: _EuiThemeShadowCustomColor) => string;
3860
+ export const useEuiShadow: (size?: _EuiThemeShadowSize, color?: _EuiThemeShadowCustomColor['color']) => string;
3861
+
3862
+ }
3863
+ declare module '@elastic/eui/src/themes/amsterdam/global_styling/mixins' {
3864
+ export * from '@elastic/eui/src/themes/amsterdam/global_styling/mixins/shadow';
3865
+
3866
+ }
3867
+ declare module '@elastic/eui/src/components/panel/panel.style' {
3868
+ import { UseEuiTheme } from '@elastic/eui/src/services';
3869
+ export const euiPanelStyles: (euiThemeContext: UseEuiTheme) => {
3870
+ euiPanel: import("@emotion/utils").SerializedStyles;
3871
+ grow: import("@emotion/utils").SerializedStyles;
3872
+ hasShadow: import("@emotion/utils").SerializedStyles;
3873
+ hasBorder: import("@emotion/utils").SerializedStyles;
3874
+ radius: {
3875
+ none: import("@emotion/utils").SerializedStyles;
3876
+ m: import("@emotion/utils").SerializedStyles;
3877
+ };
3878
+ isClickable: import("@emotion/utils").SerializedStyles;
3879
+ };
3880
+
3806
3881
  }
3807
3882
  declare module '@elastic/eui/src/components/panel/panel' {
3808
3883
  import { ButtonHTMLAttributes, FunctionComponent, HTMLAttributes, Ref } from 'react';
3884
+ import { EuiBackgroundColor, EuiPaddingSize } from '@elastic/eui/src/global_styling';
3809
3885
  import { CommonProps, ExclusiveUnion } from '@elastic/eui/src/components/common';
3810
- export const panelPaddingValues: {
3811
- none: number;
3812
- s: number;
3813
- m: number;
3814
- l: number;
3815
- };
3816
- export const SIZES: ("s" | "none" | "m" | "l")[];
3817
- export const BORDER_RADII: ("none" | "m")[];
3818
- export const COLORS: readonly ["transparent", "plain", "subdued", "accent", "primary", "success", "warning", "danger"];
3819
- export type PanelColor = typeof COLORS[number];
3820
- export type PanelPaddingSize = typeof SIZES[number];
3886
+ export const PANEL_SIZES: readonly ["none", "xs", "s", "m", "l", "xl"]; const _SIZES: readonly ["none", "s", "m", "l"];
3887
+ /**
3888
+ * This export has been deprecated in favor of the global style `EuiPaddingSize`
3889
+ */
3890
+ export type PanelPaddingSize_Deprecated = typeof _SIZES[number];
3891
+ export const BORDER_RADII: readonly ["none", "m"];
3821
3892
  export type PanelBorderRadius = typeof BORDER_RADII[number];
3893
+ export const COLORS: readonly ["transparent", "plain", "subdued", "accent", "primary", "success", "warning", "danger"];
3894
+ export type PanelColor = EuiBackgroundColor;
3822
3895
  export interface _EuiPanelProps extends CommonProps {
3823
3896
  /**
3824
3897
  * Adds a medium shadow to the panel;
@@ -3828,13 +3901,12 @@ declare module '@elastic/eui/src/components/panel/panel' {
3828
3901
  /**
3829
3902
  * Adds a slight 1px border on all edges.
3830
3903
  * Only works when `color="plain | transparent"`
3831
- * Default is `undefined` and will default to that theme's panel style
3832
3904
  */
3833
3905
  hasBorder?: boolean;
3834
3906
  /**
3835
3907
  * Padding for all four sides
3836
3908
  */
3837
- paddingSize?: PanelPaddingSize;
3909
+ paddingSize?: EuiPaddingSize;
3838
3910
  /**
3839
3911
  * Corner border radius
3840
3912
  */
@@ -3858,6 +3930,7 @@ declare module '@elastic/eui/src/components/panel/panel' {
3858
3930
  }
3859
3931
  export type EuiPanelProps = ExclusiveUnion<_EuiPanelButtonlike, _EuiPanelDivlike>;
3860
3932
  export const EuiPanel: FunctionComponent<EuiPanelProps>;
3933
+ export {};
3861
3934
 
3862
3935
  }
3863
3936
  declare module '@elastic/eui/src/services/hooks/useUpdateEffect' {
@@ -3959,8 +4032,8 @@ declare module '@elastic/eui/src/components/panel/split_panel' {
3959
4032
 
3960
4033
  }
3961
4034
  declare module '@elastic/eui/src/components/panel' {
3962
- export type { EuiPanelProps, PanelPaddingSize } from '@elastic/eui/src/components/panel/panel';
3963
- export { EuiPanel, SIZES } from '@elastic/eui/src/components/panel/panel';
4035
+ export type { EuiPanelProps } from '@elastic/eui/src/components/panel/panel';
4036
+ export { EuiPanel } from '@elastic/eui/src/components/panel/panel';
3964
4037
  export { EuiSplitPanel } from '@elastic/eui/src/components/panel/split_panel';
3965
4038
 
3966
4039
  }
@@ -4617,7 +4690,7 @@ declare module '@elastic/eui/src/components/popover/popover' {
4617
4690
  import { CommonProps, NoArgCallback } from '@elastic/eui/src/components/common';
4618
4691
  import { FocusTarget, EuiFocusTrapProps } from '@elastic/eui/src/components/focus_trap';
4619
4692
  import { ReactFocusOnProps } from 'react-focus-on/dist/es5/types';
4620
- import { PanelPaddingSize, EuiPanelProps } from '@elastic/eui/src/components/panel';
4693
+ import { PanelPaddingSize_Deprecated, EuiPanelProps } from '@elastic/eui/src/components/panel/panel';
4621
4694
  import { EuiPopoverPosition } from '@elastic/eui/src/services/popover';
4622
4695
  export const popoverAnchorPosition: readonly ["upCenter", "upLeft", "upRight", "downCenter", "downLeft", "downRight", "leftCenter", "leftUp", "leftDown", "rightCenter", "rightUp", "rightDown"];
4623
4696
  export type PopoverAnchorPosition = typeof popoverAnchorPosition[number];
@@ -4693,7 +4766,7 @@ declare module '@elastic/eui/src/components/popover/popover' {
4693
4766
  /**
4694
4767
  * EuiPanel padding on all sides
4695
4768
  */
4696
- panelPaddingSize?: PanelPaddingSize;
4769
+ panelPaddingSize?: PanelPaddingSize_Deprecated;
4697
4770
  /**
4698
4771
  * Standard DOM `style` attribute. Passed to the EuiPanel
4699
4772
  */
@@ -4771,7 +4844,7 @@ declare module '@elastic/eui/src/components/popover/popover' {
4771
4844
  hasArrow: boolean;
4772
4845
  isOpen: boolean;
4773
4846
  ownFocus: boolean;
4774
- panelPaddingSize: PanelPaddingSize;
4847
+ panelPaddingSize: PanelPaddingSize_Deprecated;
4775
4848
  };
4776
4849
  export class EuiPopover extends Component<Props, State> {
4777
4850
  static defaultProps: Partial<PropsWithDefaults>;
@@ -4859,13 +4932,13 @@ declare module '@elastic/eui/src/components/popover/input_popover' {
4859
4932
  declare module '@elastic/eui/src/components/popover/popover_title' {
4860
4933
  import { HTMLAttributes, FunctionComponent } from 'react';
4861
4934
  import { CommonProps } from '@elastic/eui/src/components/common';
4862
- import { PanelPaddingSize } from '@elastic/eui/src/components/panel';
4935
+ import { PanelPaddingSize_Deprecated } from '@elastic/eui/src/components/panel/panel';
4863
4936
  export type EuiPopoverTitleProps = FunctionComponent<HTMLAttributes<HTMLDivElement> & CommonProps & {
4864
4937
  /**
4865
4938
  * Customize the all around padding of the popover title.
4866
4939
  * Leave `undefined` to inherit from the `panelPaddingSize` of the containing EuiPopover
4867
4940
  */
4868
- paddingSize?: PanelPaddingSize;
4941
+ paddingSize?: PanelPaddingSize_Deprecated;
4869
4942
  }>;
4870
4943
  export const PADDING_SIZES: ("s" | "none" | "m" | "l")[];
4871
4944
  export const EuiPopoverTitle: EuiPopoverTitleProps;
@@ -4874,13 +4947,13 @@ declare module '@elastic/eui/src/components/popover/popover_title' {
4874
4947
  declare module '@elastic/eui/src/components/popover/popover_footer' {
4875
4948
  import { HTMLAttributes, FunctionComponent } from 'react';
4876
4949
  import { CommonProps } from '@elastic/eui/src/components/common';
4877
- import { PanelPaddingSize } from '@elastic/eui/src/components/panel';
4950
+ import { PanelPaddingSize_Deprecated } from '@elastic/eui/src/components/panel/panel';
4878
4951
  export type EuiPopoverFooterProps = FunctionComponent<HTMLAttributes<HTMLDivElement> & CommonProps & {
4879
4952
  /**
4880
4953
  * Customize the all around padding of the popover footer.
4881
4954
  * Leave `undefined` to inherit from the `panelPaddingSize` of the containing EuiPopover
4882
4955
  */
4883
- paddingSize?: PanelPaddingSize;
4956
+ paddingSize?: PanelPaddingSize_Deprecated;
4884
4957
  }>;
4885
4958
  export const PADDING_SIZES: ("s" | "none" | "m" | "l")[];
4886
4959
  export const EuiPopoverFooter: EuiPopoverFooterProps;
@@ -6752,15 +6825,50 @@ declare module '@elastic/eui/src/components/accessibility/skip_link' {
6752
6825
  declare module '@elastic/eui/src/components/accessibility' {
6753
6826
  export { EuiScreenReaderLive } from '@elastic/eui/src/components/accessibility/screen_reader_live';
6754
6827
  export type { EuiScreenReaderLiveProps } from '@elastic/eui/src/components/accessibility/screen_reader_live';
6755
- export { EuiScreenReaderOnly, euiScreenReaderOnlyStyles, } from '@elastic/eui/src/components/accessibility/screen_reader_only';
6828
+ export { EuiScreenReaderOnly, euiScreenReaderOnly } from '@elastic/eui/src/components/accessibility/screen_reader_only';
6756
6829
  export type { EuiScreenReaderOnlyProps } from '@elastic/eui/src/components/accessibility/screen_reader_only';
6757
6830
  export { EuiSkipLink } from '@elastic/eui/src/components/accessibility/skip_link';
6758
6831
  export type { EuiSkipLinkProps } from '@elastic/eui/src/components/accessibility/skip_link';
6759
6832
 
6833
+ }
6834
+ declare module '@elastic/eui/src/components/accordion/accordion.styles' {
6835
+ import { UseEuiTheme } from '@elastic/eui/src/services';
6836
+ export const euiAccordionButtonStyles: ({ euiTheme }: UseEuiTheme) => {
6837
+ euiAccordion__button: import("@emotion/utils").SerializedStyles;
6838
+ };
6839
+ export const euiAccordionChildrenStyles: ({ euiTheme }: UseEuiTheme) => {
6840
+ euiAccordion__children: import("@emotion/utils").SerializedStyles;
6841
+ isLoading: import("@emotion/utils").SerializedStyles;
6842
+ xs: import("@emotion/utils").SerializedStyles;
6843
+ s: import("@emotion/utils").SerializedStyles;
6844
+ m: import("@emotion/utils").SerializedStyles;
6845
+ l: import("@emotion/utils").SerializedStyles;
6846
+ xl: import("@emotion/utils").SerializedStyles;
6847
+ };
6848
+ export const euiAccordionChildWrapperStyles: ({ euiTheme }: UseEuiTheme) => {
6849
+ euiAccordion__childWrapper: import("@emotion/utils").SerializedStyles;
6850
+ isOpen: import("@emotion/utils").SerializedStyles;
6851
+ };
6852
+ export const euiAccordionIconButtonStyles: ({ euiTheme }: UseEuiTheme) => {
6853
+ euiAccordion__iconButton: import("@emotion/utils").SerializedStyles;
6854
+ isOpen: import("@emotion/utils").SerializedStyles;
6855
+ arrowRight: import("@emotion/utils").SerializedStyles;
6856
+ };
6857
+ export const euiAccordionOptionalActionStyles: () => {
6858
+ euiAccordion__optionalAction: import("@emotion/utils").SerializedStyles;
6859
+ };
6860
+ export const euiAccordionSpinnerStyles: ({ euiTheme }: UseEuiTheme) => {
6861
+ euiAccordion__spinner: import("@emotion/utils").SerializedStyles;
6862
+ };
6863
+ export const euiAccordionTriggerWrapperStyles: () => {
6864
+ euiAccordion__triggerWrapper: import("@emotion/utils").SerializedStyles;
6865
+ };
6866
+
6760
6867
  }
6761
6868
  declare module '@elastic/eui/src/components/accordion/accordion' {
6762
- import { Component, HTMLAttributes, ReactNode } from 'react';
6869
+ import React, { Component, HTMLAttributes, ReactNode } from 'react';
6763
6870
  import { CommonProps } from '@elastic/eui/src/components/common';
6871
+ import { WithEuiThemeProps } from '@elastic/eui/src/services';
6764
6872
  import { EuiButtonIconProps } from '@elastic/eui/src/components/button'; const paddingSizeToClassNameMap: {
6765
6873
  none: string;
6766
6874
  xs: string;
@@ -6810,7 +6918,7 @@ declare module '@elastic/eui/src/components/accordion/accordion' {
6810
6918
  /**
6811
6919
  * The accordion will start in the open state.
6812
6920
  */
6813
- initialIsOpen: boolean;
6921
+ initialIsOpen?: boolean;
6814
6922
  /**
6815
6923
  * Optional callback method called on open and close with a single `isOpen` parameter
6816
6924
  */
@@ -6836,17 +6944,17 @@ declare module '@elastic/eui/src/components/accordion/accordion' {
6836
6944
  */
6837
6945
  isLoadingMessage?: boolean | ReactNode;
6838
6946
  };
6839
- export class EuiAccordion extends Component<EuiAccordionProps, {
6947
+ export class EuiAccordionClass extends Component<WithEuiThemeProps & EuiAccordionProps, {
6840
6948
  isOpen: boolean;
6841
6949
  }> {
6842
6950
  static defaultProps: {
6843
6951
  initialIsOpen: boolean;
6844
- paddingSize: string;
6845
- arrowDisplay: string;
6952
+ paddingSize: "none";
6953
+ arrowDisplay: "left";
6846
6954
  isLoading: boolean;
6847
6955
  isLoadingMessage: boolean;
6848
- element: string;
6849
- buttonElement: string;
6956
+ element: "div";
6957
+ buttonElement: "button";
6850
6958
  };
6851
6959
  childContent: HTMLDivElement | null;
6852
6960
  childWrapper: HTMLDivElement | null;
@@ -6861,6 +6969,135 @@ declare module '@elastic/eui/src/components/accordion/accordion' {
6861
6969
  generatedId: string;
6862
6970
  render(): JSX.Element;
6863
6971
  }
6972
+ export const EuiAccordion: React.ForwardRefExoticComponent<Omit<WithEuiThemeProps<{}> & CommonProps & Omit<React.HTMLAttributes<HTMLElement>, "id"> & {
6973
+ id: string;
6974
+ /**
6975
+ * Applied to the entire .euiAccordion wrapper.
6976
+ * When using `fieldset`, it will enforce `buttonElement = legend` as well.
6977
+ */
6978
+ element?: "div" | "fieldset" | undefined;
6979
+ /**
6980
+ * Class that will apply to the trigger for the accordion.
6981
+ */
6982
+ buttonClassName?: string | undefined;
6983
+ /**
6984
+ * Apply more props to the triggering button
6985
+ */
6986
+ buttonProps?: (CommonProps & React.HTMLAttributes<HTMLElement>) | undefined;
6987
+ /**
6988
+ * Class that will apply to the trigger content for the accordion.
6989
+ */
6990
+ buttonContentClassName?: string | undefined;
6991
+ /**
6992
+ * The content of the clickable trigger
6993
+ */
6994
+ buttonContent?: ReactNode;
6995
+ /**
6996
+ * Applied to the main button receiving the `onToggle` event.
6997
+ * Anything other than the default `button` does not support removing the arrow display (for accessibility of focus).
6998
+ */
6999
+ buttonElement?: "button" | "div" | "legend" | undefined;
7000
+ /**
7001
+ * Extra props to pass to the EuiButtonIcon containing the arrow.
7002
+ */
7003
+ arrowProps?: Partial<Omit<EuiButtonIconProps, "aria-labelledby" | "onClick" | "iconType">> | undefined;
7004
+ /**
7005
+ * Will appear right aligned against the button. Useful for separate actions like deletions.
7006
+ */
7007
+ extraAction?: ReactNode;
7008
+ /**
7009
+ * The accordion will start in the open state.
7010
+ */
7011
+ initialIsOpen?: boolean | undefined;
7012
+ /**
7013
+ * Optional callback method called on open and close with a single `isOpen` parameter
7014
+ */
7015
+ onToggle?: ((isOpen: boolean) => void) | undefined;
7016
+ /**
7017
+ * The padding around the exposed accordion content.
7018
+ */
7019
+ paddingSize?: "s" | "none" | "xs" | "m" | "l" | "xl" | undefined;
7020
+ /**
7021
+ * Placement of the arrow indicator, or 'none' to hide it.
7022
+ */
7023
+ arrowDisplay?: "none" | "left" | "right" | undefined;
7024
+ /**
7025
+ * Control the opening of accordion via prop
7026
+ */
7027
+ forceState?: "open" | "closed" | undefined;
7028
+ /**
7029
+ * Change `extraAction` and children into a loading spinner
7030
+ */
7031
+ isLoading?: boolean | undefined;
7032
+ /**
7033
+ * Choose whether the loading message replaces the content. Customize the message by passing a node
7034
+ */
7035
+ isLoadingMessage?: boolean | ReactNode;
7036
+ }, "theme"> & React.RefAttributes<Omit<WithEuiThemeProps<{}> & CommonProps & Omit<React.HTMLAttributes<HTMLElement>, "id"> & {
7037
+ id: string;
7038
+ /**
7039
+ * Applied to the entire .euiAccordion wrapper.
7040
+ * When using `fieldset`, it will enforce `buttonElement = legend` as well.
7041
+ */
7042
+ element?: "div" | "fieldset" | undefined;
7043
+ /**
7044
+ * Class that will apply to the trigger for the accordion.
7045
+ */
7046
+ buttonClassName?: string | undefined;
7047
+ /**
7048
+ * Apply more props to the triggering button
7049
+ */
7050
+ buttonProps?: (CommonProps & React.HTMLAttributes<HTMLElement>) | undefined;
7051
+ /**
7052
+ * Class that will apply to the trigger content for the accordion.
7053
+ */
7054
+ buttonContentClassName?: string | undefined;
7055
+ /**
7056
+ * The content of the clickable trigger
7057
+ */
7058
+ buttonContent?: ReactNode;
7059
+ /**
7060
+ * Applied to the main button receiving the `onToggle` event.
7061
+ * Anything other than the default `button` does not support removing the arrow display (for accessibility of focus).
7062
+ */
7063
+ buttonElement?: "button" | "div" | "legend" | undefined;
7064
+ /**
7065
+ * Extra props to pass to the EuiButtonIcon containing the arrow.
7066
+ */
7067
+ arrowProps?: Partial<Omit<EuiButtonIconProps, "aria-labelledby" | "onClick" | "iconType">> | undefined;
7068
+ /**
7069
+ * Will appear right aligned against the button. Useful for separate actions like deletions.
7070
+ */
7071
+ extraAction?: ReactNode;
7072
+ /**
7073
+ * The accordion will start in the open state.
7074
+ */
7075
+ initialIsOpen?: boolean | undefined;
7076
+ /**
7077
+ * Optional callback method called on open and close with a single `isOpen` parameter
7078
+ */
7079
+ onToggle?: ((isOpen: boolean) => void) | undefined;
7080
+ /**
7081
+ * The padding around the exposed accordion content.
7082
+ */
7083
+ paddingSize?: "s" | "none" | "xs" | "m" | "l" | "xl" | undefined;
7084
+ /**
7085
+ * Placement of the arrow indicator, or 'none' to hide it.
7086
+ */
7087
+ arrowDisplay?: "none" | "left" | "right" | undefined;
7088
+ /**
7089
+ * Control the opening of accordion via prop
7090
+ */
7091
+ forceState?: "open" | "closed" | undefined;
7092
+ /**
7093
+ * Change `extraAction` and children into a loading spinner
7094
+ */
7095
+ isLoading?: boolean | undefined;
7096
+ /**
7097
+ * Choose whether the loading message replaces the content. Customize the message by passing a node
7098
+ */
7099
+ isLoadingMessage?: boolean | ReactNode;
7100
+ }, "theme">>>;
6864
7101
  export {};
6865
7102
 
6866
7103
  }
@@ -7218,66 +7455,6 @@ declare module '@elastic/eui/src/components/beacon' {
7218
7455
  export type { EuiBeaconProps } from '@elastic/eui/src/components/beacon/beacon';
7219
7456
  export { EuiBeacon } from '@elastic/eui/src/components/beacon/beacon';
7220
7457
 
7221
- }
7222
- declare module '@elastic/eui/src/themes/amsterdam/global_styling/functions/shadows' {
7223
- import { EuiThemeColorModeStandard } from '@elastic/eui/src/services/theme/types';
7224
- export const getShadowColor: (color: string, opacity: number, colorMode: EuiThemeColorModeStandard) => string;
7225
-
7226
- }
7227
- declare module '@elastic/eui/src/themes/amsterdam/global_styling/functions' {
7228
- export * from '@elastic/eui/src/themes/amsterdam/global_styling/functions/shadows';
7229
-
7230
- }
7231
- declare module '@elastic/eui/src/themes/amsterdam/global_styling/mixins/shadow' {
7232
- import { UseEuiTheme } from '@elastic/eui/src/services/theme';
7233
- import { _EuiThemeShadowSize, _EuiThemeShadowCustomColor } from '@elastic/eui/src/global_styling/variables/shadow';
7234
- export interface EuiShadowCustomColor {
7235
- color?: string;
7236
- }
7237
- /**
7238
- * euiSlightShadow
7239
- */
7240
- export const euiShadowXSmall: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
7241
- /**
7242
- * bottomShadowSmall
7243
- */
7244
- export const euiShadowSmall: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
7245
- /**
7246
- * bottomShadowMedium
7247
- */
7248
- export const euiShadowMedium: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
7249
- /**
7250
- * bottomShadow
7251
- */
7252
- export const euiShadowLarge: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
7253
- /**
7254
- * bottomShadowLarge
7255
- */
7256
- export interface EuiShadowXLarge extends _EuiThemeShadowCustomColor {
7257
- reverse?: boolean;
7258
- }
7259
- export const euiShadowXLarge: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color, reverse }?: EuiShadowXLarge) => string;
7260
- /**
7261
- * slightShadowHover
7262
- * TODO: I think this is only used by panels/cards in the Amsterdam theme, move there
7263
- */
7264
- export const euiSlightShadowHover: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
7265
- export const useEuiSlightShadowHover: (color?: _EuiThemeShadowCustomColor['color']) => string;
7266
- /**
7267
- * bottomShadowFlat
7268
- *
7269
- * Similar to shadow medium but without the bottom depth.
7270
- * Useful for popovers that drop UP rather than DOWN.
7271
- */
7272
- export const euiShadowFlat: ({ euiTheme, colorMode }: UseEuiTheme, { color: _color }?: _EuiThemeShadowCustomColor) => string;
7273
- export const useEuiShadowFlat: (color?: _EuiThemeShadowCustomColor['color']) => string;
7274
- export const euiShadow: (euiThemeContext: UseEuiTheme, size?: _EuiThemeShadowSize, { color }?: _EuiThemeShadowCustomColor) => string;
7275
- export const useEuiShadow: (size?: _EuiThemeShadowSize, color?: _EuiThemeShadowCustomColor['color']) => string;
7276
-
7277
- }
7278
- declare module '@elastic/eui/src/themes/amsterdam/global_styling/mixins' {
7279
- export * from '@elastic/eui/src/themes/amsterdam/global_styling/mixins/shadow';
7280
-
7281
7458
  }
7282
7459
  declare module '@elastic/eui/src/components/bottom_bar/bottom_bar.styles' {
7283
7460
  import { UseEuiTheme } from '@elastic/eui/src/services';
@@ -17740,7 +17917,7 @@ declare module '@elastic/eui/src/components/resizable_container/resizable_collap
17740
17917
  declare module '@elastic/eui/src/components/resizable_container/resizable_panel' {
17741
17918
  import { CSSProperties, ReactNode, FunctionComponent, HTMLAttributes } from 'react';
17742
17919
  import { CommonProps } from '@elastic/eui/src/components/common';
17743
- import { PanelPaddingSize, _EuiPanelProps } from '@elastic/eui/src/components/panel/panel';
17920
+ import { PanelPaddingSize_Deprecated, _EuiPanelProps } from '@elastic/eui/src/components/panel/panel';
17744
17921
  import { EuiResizablePanelController, ActionToggleOptions, PanelModeType } from '@elastic/eui/src/components/resizable_container/types';
17745
17922
  export interface ToggleOptions {
17746
17923
  'data-test-subj'?: string;
@@ -17814,7 +17991,7 @@ declare module '@elastic/eui/src/components/resizable_container/resizable_panel'
17814
17991
  * Padding to add directly to the wrapping `.euiResizablePanel` div
17815
17992
  * Gives space around the actual panel.
17816
17993
  */
17817
- wrapperPadding?: PanelPaddingSize;
17994
+ wrapperPadding?: PanelPaddingSize_Deprecated;
17818
17995
  }
17819
17996
  export const EuiResizablePanel: FunctionComponent<EuiResizablePanelProps>;
17820
17997
  export function euiResizablePanelWithControls(controls: EuiResizablePanelControls): (props: EuiResizablePanelProps) => JSX.Element;
@@ -22613,6 +22790,7 @@ declare module '@elastic/eui' {
22613
22790
  "euiColumnSelector.hideAll": any;
22614
22791
  "euiColumnSortingDraggable.defaultSortAsc": any;
22615
22792
  "euiColumnSortingDraggable.defaultSortDesc": any;
22793
+ "euiColumnSortingDraggable.dragHandleAriaLabel": any;
22616
22794
  "euiColumnSortingDraggable.activeSortLabel": any;
22617
22795
  "euiColumnSortingDraggable.removeSortLabel": any;
22618
22796
  "euiColumnSortingDraggable.toggleLegend": any;
package/i18ntokens.json CHANGED
@@ -5,12 +5,12 @@
5
5
  "highlighting": "string",
6
6
  "loc": {
7
7
  "start": {
8
- "line": 278,
9
- "column": 14
8
+ "line": 338,
9
+ "column": 16
10
10
  },
11
11
  "end": {
12
- "line": 278,
13
- "column": 74
12
+ "line": 338,
13
+ "column": 76
14
14
  }
15
15
  },
16
16
  "filepath": "src/components/accordion/accordion.tsx"
@@ -1103,17 +1103,33 @@
1103
1103
  },
1104
1104
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
1105
1105
  },
1106
+ {
1107
+ "token": "euiColumnSortingDraggable.dragHandleAriaLabel",
1108
+ "defString": "Drag handle",
1109
+ "highlighting": "string",
1110
+ "loc": {
1111
+ "start": {
1112
+ "line": 64,
1113
+ "column": 30
1114
+ },
1115
+ "end": {
1116
+ "line": 67,
1117
+ "column": 3
1118
+ }
1119
+ },
1120
+ "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
1121
+ },
1106
1122
  {
1107
1123
  "token": "euiColumnSortingDraggable.activeSortLabel",
1108
1124
  "defString": "{display} is sorting this data grid",
1109
1125
  "highlighting": "string",
1110
1126
  "loc": {
1111
1127
  "start": {
1112
- "line": 74,
1128
+ "line": 79,
1113
1129
  "column": 14
1114
1130
  },
1115
1131
  "end": {
1116
- "line": 78,
1132
+ "line": 83,
1117
1133
  "column": 15
1118
1134
  }
1119
1135
  },
@@ -1125,11 +1141,11 @@
1125
1141
  "highlighting": "string",
1126
1142
  "loc": {
1127
1143
  "start": {
1128
- "line": 90,
1144
+ "line": 95,
1129
1145
  "column": 14
1130
1146
  },
1131
1147
  "end": {
1132
- "line": 94,
1148
+ "line": 99,
1133
1149
  "column": 15
1134
1150
  }
1135
1151
  },
@@ -1141,11 +1157,11 @@
1141
1157
  "highlighting": "string",
1142
1158
  "loc": {
1143
1159
  "start": {
1144
- "line": 128,
1160
+ "line": 133,
1145
1161
  "column": 14
1146
1162
  },
1147
1163
  "end": {
1148
- "line": 132,
1164
+ "line": 137,
1149
1165
  "column": 15
1150
1166
  }
1151
1167
  },
@@ -4533,11 +4549,11 @@
4533
4549
  "highlighting": "string",
4534
4550
  "loc": {
4535
4551
  "start": {
4536
- "line": 772,
4552
+ "line": 776,
4537
4553
  "column": 14
4538
4554
  },
4539
4555
  "end": {
4540
- "line": 775,
4556
+ "line": 779,
4541
4557
  "column": 16
4542
4558
  }
4543
4559
  },
@@ -4597,11 +4613,11 @@
4597
4613
  "highlighting": "string",
4598
4614
  "loc": {
4599
4615
  "start": {
4600
- "line": 330,
4616
+ "line": 335,
4601
4617
  "column": 32
4602
4618
  },
4603
4619
  "end": {
4604
- "line": 333,
4620
+ "line": 338,
4605
4621
  "column": 3
4606
4622
  }
4607
4623
  },