@elastic/eui 95.1.0 → 95.2.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 (86) hide show
  1. package/dist/eui_theme_dark.css +0 -240
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -240
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  6. package/es/components/context_menu/context_menu_item.js +1 -1
  7. package/es/components/form/file_picker/file_picker.js +49 -35
  8. package/es/components/form/file_picker/file_picker.styles.js +98 -0
  9. package/es/components/icon/assets/app_cases.js +9 -7
  10. package/es/components/icon/assets/logo_elastic_stack.js +6 -12
  11. package/es/components/steps/step.js +5 -3
  12. package/es/components/steps/step.styles.js +13 -5
  13. package/es/components/steps/step_horizontal.js +8 -3
  14. package/es/components/steps/step_horizontal.styles.js +1 -0
  15. package/es/components/steps/step_number.js +48 -24
  16. package/es/components/steps/step_number.styles.js +4 -2
  17. package/es/components/steps/steps.js +3 -1
  18. package/es/components/steps/steps_horizontal.js +1 -1
  19. package/es/services/theme/warning.js +7 -2
  20. package/eui.d.ts +72 -20
  21. package/i18ntokens.json +16 -16
  22. package/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  23. package/lib/components/context_menu/context_menu_item.js +1 -1
  24. package/lib/components/form/file_picker/file_picker.js +51 -37
  25. package/lib/components/form/file_picker/file_picker.styles.js +102 -0
  26. package/lib/components/icon/assets/app_cases.js +9 -7
  27. package/lib/components/icon/assets/logo_elastic_stack.js +6 -12
  28. package/lib/components/icon/svgs/app_cases.svg +6 -5
  29. package/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
  30. package/lib/components/steps/step.js +5 -3
  31. package/lib/components/steps/step.styles.js +13 -5
  32. package/lib/components/steps/step_horizontal.js +8 -3
  33. package/lib/components/steps/step_horizontal.styles.js +1 -0
  34. package/lib/components/steps/step_number.js +48 -24
  35. package/lib/components/steps/step_number.styles.js +3 -1
  36. package/lib/components/steps/steps.js +3 -1
  37. package/lib/components/steps/steps_horizontal.js +1 -1
  38. package/lib/services/theme/warning.js +7 -2
  39. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  40. package/optimize/es/components/form/file_picker/file_picker.js +40 -34
  41. package/optimize/es/components/form/file_picker/file_picker.styles.js +98 -0
  42. package/optimize/es/components/icon/assets/app_cases.js +9 -7
  43. package/optimize/es/components/icon/assets/logo_elastic_stack.js +6 -12
  44. package/optimize/es/components/steps/step.js +2 -2
  45. package/optimize/es/components/steps/step.styles.js +13 -5
  46. package/optimize/es/components/steps/step_horizontal.js +8 -3
  47. package/optimize/es/components/steps/step_horizontal.styles.js +1 -0
  48. package/optimize/es/components/steps/step_number.js +44 -22
  49. package/optimize/es/components/steps/step_number.styles.js +4 -2
  50. package/optimize/es/components/steps/steps_horizontal.js +1 -1
  51. package/optimize/es/services/theme/warning.js +7 -2
  52. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  53. package/optimize/lib/components/form/file_picker/file_picker.js +42 -36
  54. package/optimize/lib/components/form/file_picker/file_picker.styles.js +102 -0
  55. package/optimize/lib/components/icon/assets/app_cases.js +9 -7
  56. package/optimize/lib/components/icon/assets/logo_elastic_stack.js +6 -12
  57. package/optimize/lib/components/icon/svgs/app_cases.svg +6 -5
  58. package/optimize/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
  59. package/optimize/lib/components/steps/step.js +2 -2
  60. package/optimize/lib/components/steps/step.styles.js +13 -5
  61. package/optimize/lib/components/steps/step_horizontal.js +8 -3
  62. package/optimize/lib/components/steps/step_horizontal.styles.js +1 -0
  63. package/optimize/lib/components/steps/step_number.js +44 -22
  64. package/optimize/lib/components/steps/step_number.styles.js +3 -1
  65. package/optimize/lib/components/steps/steps_horizontal.js +1 -1
  66. package/optimize/lib/services/theme/warning.js +7 -2
  67. package/package.json +1 -1
  68. package/src/components/form/_index.scss +0 -1
  69. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  70. package/test-env/components/context_menu/context_menu_item.js +1 -1
  71. package/test-env/components/form/file_picker/file_picker.js +46 -37
  72. package/test-env/components/form/file_picker/file_picker.styles.js +102 -0
  73. package/test-env/components/icon/assets/app_cases.js +9 -7
  74. package/test-env/components/icon/assets/logo_elastic_stack.js +6 -12
  75. package/test-env/components/steps/step.js +5 -3
  76. package/test-env/components/steps/step.styles.js +13 -5
  77. package/test-env/components/steps/step_horizontal.js +8 -3
  78. package/test-env/components/steps/step_horizontal.styles.js +1 -0
  79. package/test-env/components/steps/step_number.js +48 -24
  80. package/test-env/components/steps/step_number.styles.js +3 -1
  81. package/test-env/components/steps/steps.js +3 -1
  82. package/test-env/components/steps/steps_horizontal.js +1 -1
  83. package/test-env/services/theme/warning.js +7 -2
  84. package/src/components/form/file_picker/_file_picker.scss +0 -212
  85. package/src/components/form/file_picker/_index.scss +0 -2
  86. package/src/components/form/file_picker/_variables.scss +0 -1
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  var providerWarning = undefined;
10
- export var setEuiDevProviderWarning = function setEuiDevProviderWarning(level) {
11
- return providerWarning = level;
10
+ export var setEuiDevProviderWarning = function setEuiDevProviderWarning(warningType) {
11
+ return providerWarning = warningType;
12
12
  };
13
13
  export var getEuiDevProviderWarning = function getEuiDevProviderWarning() {
14
14
  return providerWarning;
@@ -16,6 +16,11 @@ export var getEuiDevProviderWarning = function getEuiDevProviderWarning() {
16
16
 
17
17
  // Not a public top-level EUI export, currently for internal use
18
18
  export var emitEuiProviderWarning = function emitEuiProviderWarning(providerMessage) {
19
+ // Handle callback types
20
+ if (typeof providerWarning === 'function') {
21
+ return providerWarning(providerMessage);
22
+ }
23
+ // Handle level types
19
24
  switch (providerWarning) {
20
25
  case 'log':
21
26
  console.log(providerMessage);
package/eui.d.ts CHANGED
@@ -1290,9 +1290,9 @@ declare module '@elastic/eui/src/global_styling/functions/size' {
1290
1290
 
1291
1291
  }
1292
1292
  declare module '@elastic/eui/src/services/theme/warning' {
1293
- type LEVELS = 'log' | 'warn' | 'error';
1294
- export const setEuiDevProviderWarning: (level: LEVELS | undefined) => LEVELS | undefined;
1295
- export const getEuiDevProviderWarning: () => LEVELS | undefined;
1293
+ type LEVELS = 'log' | 'warn' | 'error'; type ProviderCallback = (message: string | Error) => void; let providerWarning: LEVELS | ProviderCallback | undefined;
1294
+ export const setEuiDevProviderWarning: (warningType: typeof providerWarning) => LEVELS | ProviderCallback | undefined;
1295
+ export const getEuiDevProviderWarning: () => LEVELS | ProviderCallback | undefined;
1296
1296
  export const emitEuiProviderWarning: (providerMessage: string) => void;
1297
1297
  export {};
1298
1298
 
@@ -4628,8 +4628,9 @@ declare module '@elastic/eui/src/components/context_menu/context_menu_item.style
4628
4628
  declare module '@elastic/eui/src/components/context_menu/context_menu_item' {
4629
4629
  import React, { PropsWithChildren, ButtonHTMLAttributes, FunctionComponent, ReactElement, ReactNode, Ref } from 'react';
4630
4630
  import { CommonProps } from '@elastic/eui/src/components/common';
4631
+ import { type IconType } from '@elastic/eui/src/components/icon';
4631
4632
  import { EuiToolTipProps } from '@elastic/eui/src/components/tool_tip';
4632
- export type EuiContextMenuItemIcon = ReactElement<any> | string | HTMLElement;
4633
+ export type EuiContextMenuItemIcon = IconType | ReactElement<any> | HTMLElement;
4633
4634
  export type EuiContextMenuItemLayoutAlignment = 'center' | 'top' | 'bottom';
4634
4635
  export const SIZES: readonly ["s", "m"];
4635
4636
  export interface EuiContextMenuItemProps extends PropsWithChildren, CommonProps {
@@ -6746,22 +6747,58 @@ declare module '@elastic/eui/src/components/progress' {
6746
6747
  export type { EuiProgressProps } from '@elastic/eui/src/components/progress/progress';
6747
6748
  export { EuiProgress } from '@elastic/eui/src/components/progress/progress';
6748
6749
 
6750
+ }
6751
+ declare module '@elastic/eui/src/components/form/file_picker/file_picker.styles' {
6752
+ import { UseEuiTheme } from '@elastic/eui/src/services';
6753
+ export const euiFilePickerStyles: (euiThemeContext: UseEuiTheme) => {
6754
+ euiFilePicker: import("@emotion/utils").SerializedStyles;
6755
+ isDroppingFile: import("@emotion/utils").SerializedStyles;
6756
+ invalid: import("@emotion/utils").SerializedStyles;
6757
+ hasFiles: import("@emotion/utils").SerializedStyles;
6758
+ loading: import("@emotion/utils").SerializedStyles;
6759
+ formWidth: string;
6760
+ fullWidth: import("@emotion/utils").SerializedStyles;
6761
+ input: {
6762
+ euiFilePicker__input: import("@emotion/utils").SerializedStyles;
6763
+ largeInteractive: import("@emotion/utils").SerializedStyles;
6764
+ };
6765
+ euiFilePicker__prompt: import("@emotion/utils").SerializedStyles;
6766
+ disabled: import("@emotion/utils").SerializedStyles;
6767
+ uncompressed: string;
6768
+ compressed: import("@emotion/utils").SerializedStyles;
6769
+ large: {
6770
+ large: import("@emotion/utils").SerializedStyles;
6771
+ uncompressed: string;
6772
+ compressed: import("@emotion/utils").SerializedStyles;
6773
+ };
6774
+ icon: {
6775
+ euiFilePicker__icon: import("@emotion/utils").SerializedStyles;
6776
+ normal: import("@emotion/utils").SerializedStyles;
6777
+ uncompressed: string;
6778
+ compresssed: import("@emotion/utils").SerializedStyles;
6779
+ large: import("@emotion/utils").SerializedStyles;
6780
+ };
6781
+ rightIcon: {
6782
+ euiFilePicker__rightIcon: import("@emotion/utils").SerializedStyles;
6783
+ uncompressed: string;
6784
+ compressed: import("@emotion/utils").SerializedStyles;
6785
+ };
6786
+ euiFilePicker__clearButton: import("@emotion/utils").SerializedStyles;
6787
+ };
6788
+
6749
6789
  }
6750
6790
  declare module '@elastic/eui/src/components/form/file_picker/file_picker' {
6751
6791
  import React, { Component, InputHTMLAttributes, ReactNode } from 'react';
6792
+ import { WithEuiStylesMemoizerProps } from '@elastic/eui/src/services';
6752
6793
  import { CommonProps } from '@elastic/eui/src/components/common';
6753
- import { FormContextValue } from '@elastic/eui/src/components/form/eui_form_context'; const displayToClassNameMap: {
6754
- default: null;
6755
- large: string;
6756
- };
6757
- export const DISPLAYS: ("default" | "large")[];
6758
- export type EuiFilePickerDisplay = keyof typeof displayToClassNameMap;
6794
+ import { FormContextValue } from '@elastic/eui/src/components/form/eui_form_context';
6759
6795
  export interface EuiFilePickerProps extends CommonProps, Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
6760
6796
  id?: string;
6761
6797
  name?: string;
6762
6798
  className?: string;
6763
6799
  /**
6764
6800
  * The content that appears in the dropzone if no file is attached
6801
+ * @default 'Select or drag and drop a file'
6765
6802
  */
6766
6803
  initialPromptText?: ReactNode;
6767
6804
  /**
@@ -6770,14 +6807,16 @@ declare module '@elastic/eui/src/components/form/file_picker/file_picker' {
6770
6807
  onChange?: (files: FileList | null) => void;
6771
6808
  /**
6772
6809
  * Reduces the size to a typical (compressed) input
6810
+ * @default false
6773
6811
  */
6774
6812
  compressed?: boolean;
6775
6813
  /**
6776
6814
  * Size or type of display;
6777
6815
  * `default` for normal height, similar to other controls;
6778
6816
  * `large` for taller size
6817
+ * @default large
6779
6818
  */
6780
- display?: EuiFilePickerDisplay;
6819
+ display?: 'default' | 'large';
6781
6820
  /**
6782
6821
  * Expand to fill 100% of the parent.
6783
6822
  * Defaults to `fullWidth` prop of `<EuiForm>`.
@@ -6788,7 +6827,7 @@ declare module '@elastic/eui/src/components/form/file_picker/file_picker' {
6788
6827
  isLoading?: boolean;
6789
6828
  disabled?: boolean;
6790
6829
  }
6791
- export class EuiFilePicker extends Component<EuiFilePickerProps> {
6830
+ export class EuiFilePickerClass extends Component<EuiFilePickerProps & WithEuiStylesMemoizerProps> {
6792
6831
  static contextType: React.Context<FormContextValue>;
6793
6832
  static defaultProps: Partial<EuiFilePickerProps>;
6794
6833
  state: {
@@ -6803,7 +6842,7 @@ declare module '@elastic/eui/src/components/form/file_picker/file_picker' {
6803
6842
  hideDrop: () => void;
6804
6843
  render(): React.JSX.Element;
6805
6844
  }
6806
- export {};
6845
+ export const EuiFilePicker: React.ForwardRefExoticComponent<Omit<EuiFilePickerProps, "stylesMemoizer"> & React.RefAttributes<Omit<EuiFilePickerProps, "stylesMemoizer">>>;
6807
6846
 
6808
6847
  }
6809
6848
  declare module '@elastic/eui/src/components/form/file_picker' {
@@ -22659,6 +22698,7 @@ declare module '@elastic/eui/src/components/steps/step.styles' {
22659
22698
  export const euiStepVariables: (euiTheme: UseEuiTheme['euiTheme']) => {
22660
22699
  numberSize: string;
22661
22700
  numberXSSize: string;
22701
+ numberXXSSize: string;
22662
22702
  numberMargin: string;
22663
22703
  };
22664
22704
  export const euiStepStyles: (euiThemeContext: UseEuiTheme) => {
@@ -22666,12 +22706,14 @@ declare module '@elastic/eui/src/components/steps/step.styles' {
22666
22706
  m: import("@emotion/utils").SerializedStyles;
22667
22707
  s: import("@emotion/utils").SerializedStyles;
22668
22708
  xs: import("@emotion/utils").SerializedStyles;
22709
+ xxs: import("@emotion/utils").SerializedStyles;
22669
22710
  };
22670
22711
  export const euiStepContentStyles: (euiThemeContext: UseEuiTheme) => {
22671
22712
  euiStep__content: import("@emotion/utils").SerializedStyles;
22672
22713
  m: import("@emotion/utils").SerializedStyles;
22673
22714
  readonly s: import("@emotion/utils").SerializedStyles;
22674
22715
  xs: import("@emotion/utils").SerializedStyles;
22716
+ xxs: import("@emotion/utils").SerializedStyles;
22675
22717
  };
22676
22718
  export const euiStepTitleStyles: (euiThemeContext: UseEuiTheme) => {
22677
22719
  euiStep__titleWrapper: import("@emotion/utils").SerializedStyles;
@@ -22680,6 +22722,7 @@ declare module '@elastic/eui/src/components/steps/step.styles' {
22680
22722
  m: import("@emotion/utils").SerializedStyles;
22681
22723
  s: import("@emotion/utils").SerializedStyles;
22682
22724
  xs: import("@emotion/utils").SerializedStyles;
22725
+ xxs: import("@emotion/utils").SerializedStyles;
22683
22726
  };
22684
22727
 
22685
22728
  }
@@ -22690,6 +22733,7 @@ declare module '@elastic/eui/src/components/steps/step_number.styles' {
22690
22733
  m: import("@emotion/utils").SerializedStyles;
22691
22734
  s: import("@emotion/utils").SerializedStyles;
22692
22735
  xs: import("@emotion/utils").SerializedStyles;
22736
+ none: import("@emotion/utils").SerializedStyles;
22693
22737
  incomplete: import("@emotion/utils").SerializedStyles;
22694
22738
  disabled: import("@emotion/utils").SerializedStyles;
22695
22739
  loading: import("@emotion/utils").SerializedStyles;
@@ -22708,13 +22752,14 @@ declare module '@elastic/eui/src/components/steps/step_number.styles' {
22708
22752
  loading: import("@emotion/utils").SerializedStyles;
22709
22753
  disabled: import("@emotion/utils").SerializedStyles;
22710
22754
  current: import("@emotion/utils").SerializedStyles;
22755
+ none: import("@emotion/utils").SerializedStyles;
22711
22756
  };
22712
22757
 
22713
22758
  }
22714
22759
  declare module '@elastic/eui/src/components/steps/step_number' {
22715
22760
  import { FunctionComponent, HTMLAttributes } from 'react';
22716
22761
  import { CommonProps } from '@elastic/eui/src/components/common';
22717
- import { EuiStepProps } from '@elastic/eui/src/components/steps/step';
22762
+ import { EuiTitleProps } from '@elastic/eui/src/components/title';
22718
22763
  export const STATUS: readonly ["incomplete", "disabled", "loading", "warning", "danger", "complete", "current"];
22719
22764
  export type EuiStepStatus = (typeof STATUS)[number];
22720
22765
  export interface EuiStepNumberProps extends CommonProps, HTMLAttributes<HTMLDivElement> {
@@ -22724,9 +22769,11 @@ declare module '@elastic/eui/src/components/steps/step_number' {
22724
22769
  status?: EuiStepStatus;
22725
22770
  number?: number;
22726
22771
  /**
22727
- * Title sizing equivalent to EuiTitle, but only `m`, `s` and `xs`. Defaults to `s`
22772
+ * Title sizing equivalent to EuiTitle, but only `m`, `s`, `xs`.
22773
+ * `none` indicates no step number should be rendered.
22774
+ * @default s
22728
22775
  */
22729
- titleSize?: EuiStepProps['titleSize'];
22776
+ titleSize?: Extract<EuiTitleProps['size'], 'xs' | 's' | 'm'> | 'none';
22730
22777
  }
22731
22778
  export const EuiStepNumber: FunctionComponent<EuiStepNumberProps>;
22732
22779
 
@@ -22755,9 +22802,11 @@ declare module '@elastic/eui/src/components/steps/step' {
22755
22802
  */
22756
22803
  status?: EuiStepStatus;
22757
22804
  /**
22758
- * Title sizing equivalent to EuiTitle, but only `m`, `s` and `xs`. Defaults to `s`
22805
+ * Title sizing equivalent to **EuiTitle**, but only `m`, `s`, `xs` font sizes.
22806
+ * The `xxs` size reduces the size of the accompanying step indicator, but not the title itself.
22807
+ * @default s
22759
22808
  */
22760
- titleSize?: Exclude<EuiTitleProps['size'], 'xxxs' | 'xxs' | 'l'>;
22809
+ titleSize?: Extract<EuiTitleProps['size'], 'xxs' | 'xs' | 's' | 'm'>;
22761
22810
  }
22762
22811
  export type EuiStepProps = CommonProps & Omit<HTMLAttributes<HTMLDivElement>, 'title'> & EuiStepInterface;
22763
22812
  export const EuiStep: FunctionComponent<EuiStepProps>;
@@ -22782,7 +22831,9 @@ declare module '@elastic/eui/src/components/steps/steps' {
22782
22831
  */
22783
22832
  headingElement?: string;
22784
22833
  /**
22785
- * Title sizing equivalent to EuiTitle, but only `m`, `s` and `xs`. Defaults to `s`
22834
+ * Title sizing equivalent to **EuiTitle**, but only `m`, `s`, `xs` font sizes.
22835
+ * The `xxs` size reduces the size of the accompanying step indicator, but not the title itself.
22836
+ * @default s
22786
22837
  */
22787
22838
  titleSize?: EuiStepProps['titleSize'];
22788
22839
  }
@@ -22814,7 +22865,7 @@ declare module '@elastic/eui/src/components/steps/steps_horizontal' {
22814
22865
  import { FunctionComponent, OlHTMLAttributes } from 'react';
22815
22866
  import { CommonProps } from '@elastic/eui/src/components/common';
22816
22867
  import { EuiStepHorizontalProps } from '@elastic/eui/src/components/steps/step_horizontal';
22817
- export const SIZES: readonly ["s", "m"];
22868
+ export const SIZES: readonly ["xs", "s", "m"];
22818
22869
  export type EuiStepsHorizontalSizes = (typeof SIZES)[number];
22819
22870
  export interface EuiStepsHorizontalProps extends OlHTMLAttributes<HTMLOListElement>, CommonProps {
22820
22871
  /**
@@ -22832,6 +22883,7 @@ declare module '@elastic/eui/src/components/steps/step_horizontal.styles' {
22832
22883
  euiStepHorizontal: import("@emotion/utils").SerializedStyles;
22833
22884
  m: import("@emotion/utils").SerializedStyles;
22834
22885
  s: import("@emotion/utils").SerializedStyles;
22886
+ xs: import("@emotion/utils").SerializedStyles;
22835
22887
  enabled: import("@emotion/utils").SerializedStyles;
22836
22888
  disabled: import("@emotion/utils").SerializedStyles;
22837
22889
  };
package/i18ntokens.json CHANGED
@@ -4793,14 +4793,14 @@
4793
4793
  "highlighting": "string",
4794
4794
  "loc": {
4795
4795
  "start": {
4796
- "line": 72,
4796
+ "line": 76,
4797
4797
  "column": 6,
4798
- "index": 2220
4798
+ "index": 2335
4799
4799
  },
4800
4800
  "end": {
4801
- "line": 75,
4801
+ "line": 79,
4802
4802
  "column": 8,
4803
- "index": 2327
4803
+ "index": 2442
4804
4804
  }
4805
4805
  },
4806
4806
  "filepath": "src/components/form/file_picker/file_picker.tsx"
@@ -4811,14 +4811,14 @@
4811
4811
  "highlighting": "string",
4812
4812
  "loc": {
4813
4813
  "start": {
4814
- "line": 96,
4814
+ "line": 100,
4815
4815
  "column": 10,
4816
- "index": 2725
4816
+ "index": 2840
4817
4817
  },
4818
4818
  "end": {
4819
- "line": 100,
4819
+ "line": 104,
4820
4820
  "column": 12,
4821
- "index": 2907
4821
+ "index": 3022
4822
4822
  }
4823
4823
  },
4824
4824
  "filepath": "src/components/form/file_picker/file_picker.tsx"
@@ -4829,14 +4829,14 @@
4829
4829
  "highlighting": "string",
4830
4830
  "loc": {
4831
4831
  "start": {
4832
- "line": 142,
4832
+ "line": 146,
4833
4833
  "column": 6,
4834
- "index": 3770
4834
+ "index": 3885
4835
4835
  },
4836
4836
  "end": {
4837
- "line": 145,
4837
+ "line": 149,
4838
4838
  "column": 7,
4839
- "index": 3874
4839
+ "index": 3989
4840
4840
  }
4841
4841
  },
4842
4842
  "filepath": "src/components/form/file_picker/file_picker.tsx"
@@ -4847,14 +4847,14 @@
4847
4847
  "highlighting": "string",
4848
4848
  "loc": {
4849
4849
  "start": {
4850
- "line": 208,
4850
+ "line": 263,
4851
4851
  "column": 18,
4852
- "index": 6040
4852
+ "index": 7913
4853
4853
  },
4854
4854
  "end": {
4855
- "line": 211,
4855
+ "line": 266,
4856
4856
  "column": 20,
4857
- "index": 6163
4857
+ "index": 8036
4858
4858
  }
4859
4859
  },
4860
4860
  "filepath": "src/components/form/file_picker/file_picker.tsx"
@@ -299,7 +299,8 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
299
299
  },
300
300
  placeholder: showPlaceholder ? placeholder : undefined,
301
301
  value: this.searchValue,
302
- autoFocus: autoFocus
302
+ autoFocus: autoFocus,
303
+ autoComplete: "off"
303
304
  // Force the menu to re-open on every input click - only necessary when plain text
304
305
  ,
305
306
  onClick: this.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
@@ -126,7 +126,7 @@ EuiContextMenuItem.propTypes = {
126
126
  "aria-label": _propTypes.default.string,
127
127
  "data-test-subj": _propTypes.default.string,
128
128
  css: _propTypes.default.any,
129
- icon: _propTypes.default.oneOfType([_propTypes.default.element.isRequired, _propTypes.default.string.isRequired, _propTypes.default.any.isRequired]),
129
+ icon: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "diff", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "errorFilled", "esqlVis", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]).isRequired, _propTypes.default.element.isRequired, _propTypes.default.any.isRequired]),
130
130
  hasPanel: _propTypes.default.bool,
131
131
  disabled: _propTypes.default.bool,
132
132
  onClick: _propTypes.default.func,
@@ -3,26 +3,33 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.EuiFilePicker = exports.DISPLAYS = void 0;
6
+ exports.EuiFilePickerClass = exports.EuiFilePicker = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _common = require("../../common");
11
- var _validatable_control = require("../validatable_control");
10
+ var _services = require("../../../services");
12
11
  var _button = require("../../button");
13
12
  var _progress = require("../../progress");
14
13
  var _icon = require("../../icon");
15
14
  var _i18n = require("../../i18n");
16
15
  var _loading = require("../../loading");
17
- var _accessibility = require("../../../services/accessibility");
18
16
  var _eui_form_context = require("../eui_form_context");
17
+ var _validatable_control = require("../validatable_control");
18
+ var _form_control_layout_clear_button = require("../form_control_layout/form_control_layout_clear_button");
19
+ var _file_picker = require("./file_picker.styles");
19
20
  var _react2 = require("@emotion/react");
20
- var _excluded = ["id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
21
+ var _excluded = ["stylesMemoizer", "id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
21
22
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
24
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
25
  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); }
25
26
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
27
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
28
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
30
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
31
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
32
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
26
33
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
27
34
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
28
35
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -44,25 +51,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
44
51
  * in compliance with, at your election, the Elastic License 2.0 or the Server
45
52
  * Side Public License, v 1.
46
53
  */
47
- var displayToClassNameMap = {
48
- default: null,
49
- large: 'euiFilePicker--large'
50
- };
51
- var DISPLAYS = exports.DISPLAYS = (0, _common.keysOf)(displayToClassNameMap);
52
- var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
53
- function EuiFilePicker() {
54
+ var EuiFilePickerClass = exports.EuiFilePickerClass = /*#__PURE__*/function (_Component) {
55
+ function EuiFilePickerClass() {
54
56
  var _this;
55
- _classCallCheck(this, EuiFilePicker);
57
+ _classCallCheck(this, EuiFilePickerClass);
56
58
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
57
59
  args[_key] = arguments[_key];
58
60
  }
59
- _this = _callSuper(this, EuiFilePicker, [].concat(args));
61
+ _this = _callSuper(this, EuiFilePickerClass, [].concat(args));
60
62
  _defineProperty(_this, "state", {
61
63
  promptText: null,
62
64
  isHoveringDrop: false
63
65
  });
64
66
  _defineProperty(_this, "fileInput", null);
65
- _defineProperty(_this, "generatedId", (0, _accessibility.htmlIdGenerator)()());
67
+ _defineProperty(_this, "generatedId", (0, _services.htmlIdGenerator)()());
66
68
  _defineProperty(_this, "handleChange", function () {
67
69
  if (!_this.fileInput) return;
68
70
  if (_this.fileInput.files && _this.fileInput.files.length > 1) {
@@ -112,8 +114,8 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
112
114
  });
113
115
  return _this;
114
116
  }
115
- _inherits(EuiFilePicker, _Component);
116
- return _createClass(EuiFilePicker, [{
117
+ _inherits(EuiFilePickerClass, _Component);
118
+ return _createClass(EuiFilePickerClass, [{
117
119
  key: "render",
118
120
  value: function render() {
119
121
  var _this2 = this;
@@ -124,6 +126,7 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
124
126
  default: "Clear selected files"
125
127
  }, function (clearSelectedFiles) {
126
128
  var _this2$props = _this2.props,
129
+ stylesMemoizer = _this2$props.stylesMemoizer,
127
130
  id = _this2$props.id,
128
131
  name = _this2$props.name,
129
132
  initialPromptText = _this2$props.initialPromptText,
@@ -140,34 +143,39 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
140
143
  var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
141
144
  var isOverridingInitialPrompt = _this2.state.promptText != null;
142
145
  var normalFormControl = display === 'default';
143
- var classes = (0, _classnames.default)('euiFilePicker', displayToClassNameMap[display], {
144
- euiFilePicker__showDrop: _this2.state.isHoveringDrop,
145
- 'euiFilePicker--compressed': compressed,
146
- 'euiFilePicker--fullWidth': fullWidth,
146
+ var classes = (0, _classnames.default)('euiFilePicker', {
147
+ 'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
147
148
  'euiFilePicker-isInvalid': isInvalid,
148
149
  'euiFilePicker-isLoading': isLoading,
149
150
  'euiFilePicker-hasFiles': isOverridingInitialPrompt
150
151
  }, className);
152
+ var styles = stylesMemoizer(_file_picker.euiFilePickerStyles);
153
+ var cssStyles = [styles.euiFilePicker, fullWidth ? styles.fullWidth : styles.formWidth, _this2.state.isHoveringDrop && styles.isDroppingFile, isInvalid && !disabled && styles.invalid, isOverridingInitialPrompt && !disabled && styles.hasFiles, isLoading && styles.loading];
154
+ var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
155
+ var promptStyles = [styles.euiFilePicker__prompt, disabled && styles.disabled].concat(_toConsumableArray(normalFormControl ? [compressed ? styles.compressed : styles.uncompressed] : [styles.large.large, compressed ? styles.large.compressed : styles.large.uncompressed]));
156
+ var iconStyles = [styles.icon.euiFilePicker__icon].concat(_toConsumableArray(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
157
+ var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
151
158
  var clearButton;
152
159
  if (isLoading && normalFormControl) {
153
160
  // Override clear button with loading spinner if it is in loading state
154
161
  clearButton = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
155
- className: "euiFilePicker__loadingSpinner"
162
+ css: rightIconStyles,
163
+ className: "euiFilePicker__loadingSpinner",
164
+ size: compressed ? 's' : 'm'
156
165
  });
157
166
  } else if (isOverridingInitialPrompt && !disabled) {
158
167
  if (normalFormControl) {
159
- clearButton = (0, _react2.jsx)("button", {
160
- type: "button",
168
+ clearButton = (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, {
161
169
  "aria-label": clearSelectedFiles,
170
+ css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
162
171
  className: "euiFilePicker__clearButton",
163
- onClick: _this2.removeFiles
164
- }, (0, _react2.jsx)(_icon.EuiIcon, {
165
- className: "euiFilePicker__clearIcon",
166
- type: "cross"
167
- }));
172
+ onClick: _this2.removeFiles,
173
+ size: compressed ? 's' : 'm'
174
+ });
168
175
  } else {
169
176
  clearButton = (0, _react2.jsx)(_button.EuiButtonEmpty, {
170
177
  "aria-label": clearSelectedFiles,
178
+ css: styles.euiFilePicker__clearButton,
171
179
  className: "euiFilePicker__clearButton",
172
180
  size: "xs",
173
181
  onClick: _this2.removeFiles
@@ -185,15 +193,15 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
185
193
  position: "absolute"
186
194
  });
187
195
  return (0, _react2.jsx)("div", {
196
+ css: cssStyles,
188
197
  className: classes
189
- }, (0, _react2.jsx)("div", {
190
- className: "euiFilePicker__wrap"
191
198
  }, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
192
199
  isInvalid: isInvalid
193
200
  }, (0, _react2.jsx)("input", _extends({
194
201
  type: "file",
195
202
  id: id,
196
203
  name: name,
204
+ css: inputStyles,
197
205
  className: "euiFilePicker__input",
198
206
  onChange: _this2.handleChange,
199
207
  ref: function ref(input) {
@@ -205,23 +213,25 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
205
213
  disabled: disabled,
206
214
  "aria-describedby": promptId
207
215
  }, rest))), (0, _react2.jsx)("div", {
216
+ css: promptStyles,
208
217
  className: "euiFilePicker__prompt",
209
218
  id: promptId
210
219
  }, (0, _react2.jsx)(_icon.EuiIcon, {
220
+ css: iconStyles,
211
221
  className: "euiFilePicker__icon",
212
222
  color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary',
213
223
  type: isInvalid ? 'alert' : 'importAction',
214
224
  size: normalFormControl ? 'm' : 'l',
215
225
  "aria-hidden": "true"
216
- }), (0, _react2.jsx)("div", {
226
+ }), (0, _react2.jsx)("span", {
217
227
  className: "euiFilePicker__promptText"
218
- }, _this2.state.promptText || initialPromptText), clearButton, loader)));
228
+ }, _this2.state.promptText || initialPromptText), clearButton, loader));
219
229
  });
220
230
  }
221
231
  }]);
222
232
  }(_react.Component);
223
- _defineProperty(EuiFilePicker, "contextType", _eui_form_context.FormContext);
224
- _defineProperty(EuiFilePicker, "defaultProps", {
233
+ _defineProperty(EuiFilePickerClass, "contextType", _eui_form_context.FormContext);
234
+ _defineProperty(EuiFilePickerClass, "defaultProps", {
225
235
  initialPromptText: (0, _react2.jsx)(_i18n.EuiI18n, {
226
236
  token: "euiFilePicker.promptText",
227
237
  default: "Select or drag and drop a file"
@@ -229,12 +239,13 @@ _defineProperty(EuiFilePicker, "defaultProps", {
229
239
  compressed: false,
230
240
  display: 'large'
231
241
  });
232
- EuiFilePicker.propTypes = {
242
+ EuiFilePickerClass.propTypes = {
233
243
  id: _propTypes.default.string,
234
244
  name: _propTypes.default.string,
235
245
  className: _propTypes.default.string,
236
246
  /**
237
247
  * The content that appears in the dropzone if no file is attached
248
+ * @default 'Select or drag and drop a file'
238
249
  */
239
250
  initialPromptText: _propTypes.default.node,
240
251
  /**
@@ -243,12 +254,14 @@ EuiFilePicker.propTypes = {
243
254
  onChange: _propTypes.default.func,
244
255
  /**
245
256
  * Reduces the size to a typical (compressed) input
257
+ * @default false
246
258
  */
247
259
  compressed: _propTypes.default.bool,
248
260
  /**
249
261
  * Size or type of display;
250
262
  * `default` for normal height, similar to other controls;
251
263
  * `large` for taller size
264
+ * @default large
252
265
  */
253
266
  display: _propTypes.default.oneOf(["default", "large"]),
254
267
  /**
@@ -263,4 +276,5 @@ EuiFilePicker.propTypes = {
263
276
  "aria-label": _propTypes.default.string,
264
277
  "data-test-subj": _propTypes.default.string,
265
278
  css: _propTypes.default.any
266
- };
279
+ };
280
+ var EuiFilePicker = exports.EuiFilePicker = (0, _services.withEuiStylesMemoizer)(EuiFilePickerClass);