@elastic/eui 88.3.0 → 88.4.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 (103) hide show
  1. package/dist/eui_theme_dark.css +0 -142
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -142
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/in_memory_table.js +85 -34
  6. package/es/components/card/card.js +3 -3
  7. package/es/components/combo_box/combo_box.js +16 -4
  8. package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  9. package/es/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  10. package/es/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  11. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
  12. package/es/components/datagrid/controls/column_selector.js +5 -3
  13. package/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
  14. package/es/components/description_list/description_list_title.js +0 -1
  15. package/es/components/description_list/description_list_title.styles.js +1 -1
  16. package/es/components/drag_and_drop/draggable.js +18 -23
  17. package/es/components/drag_and_drop/draggable.styles.js +56 -0
  18. package/es/components/drag_and_drop/droppable.js +24 -21
  19. package/es/components/drag_and_drop/droppable.styles.js +51 -0
  20. package/es/components/search_bar/search_box.js +54 -88
  21. package/es/components/table/table_pagination/table_pagination.js +1 -0
  22. package/es/test/rtl/custom_render.js +1 -1
  23. package/eui.d.ts +480 -420
  24. package/i18ntokens.json +142 -88
  25. package/lib/components/basic_table/in_memory_table.js +85 -34
  26. package/lib/components/card/card.js +3 -3
  27. package/lib/components/combo_box/combo_box.js +16 -4
  28. package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  29. package/lib/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  30. package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  31. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
  32. package/lib/components/datagrid/controls/column_selector.js +4 -2
  33. package/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
  34. package/lib/components/description_list/description_list_title.js +0 -1
  35. package/lib/components/description_list/description_list_title.styles.js +1 -1
  36. package/lib/components/drag_and_drop/draggable.js +17 -22
  37. package/lib/components/drag_and_drop/draggable.styles.js +62 -0
  38. package/lib/components/drag_and_drop/droppable.js +26 -22
  39. package/lib/components/drag_and_drop/droppable.styles.js +57 -0
  40. package/lib/components/search_bar/search_box.js +61 -93
  41. package/lib/components/table/table_pagination/table_pagination.js +1 -0
  42. package/lib/test/rtl/custom_render.js +2 -2
  43. package/optimize/es/components/basic_table/in_memory_table.js +62 -34
  44. package/optimize/es/components/card/card.js +3 -3
  45. package/optimize/es/components/combo_box/combo_box.js +6 -4
  46. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  47. package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
  48. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
  49. package/optimize/es/components/datagrid/controls/column_selector.js +5 -3
  50. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
  51. package/optimize/es/components/description_list/description_list_title.js +0 -1
  52. package/optimize/es/components/description_list/description_list_title.styles.js +1 -1
  53. package/optimize/es/components/drag_and_drop/draggable.js +17 -22
  54. package/optimize/es/components/drag_and_drop/draggable.styles.js +56 -0
  55. package/optimize/es/components/drag_and_drop/droppable.js +23 -20
  56. package/optimize/es/components/drag_and_drop/droppable.styles.js +51 -0
  57. package/optimize/es/components/search_bar/search_box.js +50 -83
  58. package/optimize/es/components/table/table_pagination/table_pagination.js +1 -0
  59. package/optimize/es/test/rtl/custom_render.js +1 -1
  60. package/optimize/lib/components/basic_table/in_memory_table.js +62 -34
  61. package/optimize/lib/components/card/card.js +3 -3
  62. package/optimize/lib/components/combo_box/combo_box.js +6 -4
  63. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  64. package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
  65. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
  66. package/optimize/lib/components/datagrid/controls/column_selector.js +4 -2
  67. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
  68. package/optimize/lib/components/description_list/description_list_title.js +0 -1
  69. package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
  70. package/optimize/lib/components/drag_and_drop/draggable.js +16 -21
  71. package/optimize/lib/components/drag_and_drop/draggable.styles.js +62 -0
  72. package/optimize/lib/components/drag_and_drop/droppable.js +25 -21
  73. package/optimize/lib/components/drag_and_drop/droppable.styles.js +57 -0
  74. package/optimize/lib/components/search_bar/search_box.js +57 -89
  75. package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -0
  76. package/optimize/lib/test/rtl/custom_render.js +2 -2
  77. package/package.json +4 -4
  78. package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -1
  79. package/src/components/index.scss +0 -1
  80. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  81. package/test-env/components/basic_table/in_memory_table.js +85 -34
  82. package/test-env/components/card/card.js +3 -3
  83. package/test-env/components/combo_box/combo_box.js +16 -4
  84. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  85. package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  86. package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  87. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +58 -14
  88. package/test-env/components/datagrid/controls/column_selector.js +4 -2
  89. package/test-env/components/datagrid/controls/column_sorting_draggable.js +4 -1
  90. package/test-env/components/description_list/description_list_title.js +0 -1
  91. package/test-env/components/description_list/description_list_title.styles.js +1 -1
  92. package/test-env/components/drag_and_drop/draggable.js +17 -22
  93. package/test-env/components/drag_and_drop/draggable.styles.js +62 -0
  94. package/test-env/components/drag_and_drop/droppable.js +26 -22
  95. package/test-env/components/drag_and_drop/droppable.styles.js +57 -0
  96. package/test-env/components/search_bar/search_box.js +60 -88
  97. package/test-env/components/table/table_pagination/table_pagination.js +1 -0
  98. package/test-env/test/rtl/custom_render.js +2 -2
  99. package/src/components/drag_and_drop/_draggable.scss +0 -41
  100. package/src/components/drag_and_drop/_droppable.scss +0 -40
  101. package/src/components/drag_and_drop/_index.scss +0 -3
  102. package/src/components/drag_and_drop/_variables.scss +0 -5
  103. package/src/themes/amsterdam/overrides/_description_list.scss +0 -7
package/eui.d.ts CHANGED
@@ -9548,25 +9548,6 @@ declare module '@elastic/eui/src/components/breadcrumbs' {
9548
9548
  export type { EuiBreadcrumbsProps, EuiBreadcrumbResponsiveMaxCount, } from '@elastic/eui/src/components/breadcrumbs/breadcrumbs';
9549
9549
  export { EuiBreadcrumbs } from '@elastic/eui/src/components/breadcrumbs/breadcrumbs';
9550
9550
 
9551
- }
9552
- declare module '@elastic/eui/src/components/card/card_select/card_select.styles' {
9553
- export const euiCardSelectStyles: () => {
9554
- euiCardSelect: import("@emotion/utils").SerializedStyles;
9555
- };
9556
-
9557
- }
9558
- declare module '@elastic/eui/src/components/card/card_select/card_select' {
9559
- import { FunctionComponent } from 'react';
9560
- import { Props } from '@elastic/eui/src/components/button/button';
9561
- export type EuiCardSelectProps = Props;
9562
- export const EuiCardSelect: FunctionComponent<EuiCardSelectProps>;
9563
- export function euiCardSelectableColor(color: Props['color'], isSelected: boolean | undefined): Props['color'];
9564
-
9565
- }
9566
- declare module '@elastic/eui/src/components/card/card_select' {
9567
- export type { EuiCardSelectProps } from '@elastic/eui/src/components/card/card_select/card_select';
9568
- export { EuiCardSelect, euiCardSelectableColor } from '@elastic/eui/src/components/card/card_select/card_select';
9569
-
9570
9551
  }
9571
9552
  declare module '@elastic/eui/src/components/spacer/spacer.styles' {
9572
9553
  import { UseEuiTheme } from '@elastic/eui/src/services';
@@ -9596,10 +9577,29 @@ declare module '@elastic/eui/src/components/spacer' {
9596
9577
  export type { EuiSpacerProps } from '@elastic/eui/src/components/spacer/spacer';
9597
9578
  export { EuiSpacer } from '@elastic/eui/src/components/spacer/spacer';
9598
9579
 
9580
+ }
9581
+ declare module '@elastic/eui/src/components/card/card_select/card_select.styles' {
9582
+ export const euiCardSelectStyles: () => {
9583
+ euiCardSelect: import("@emotion/utils").SerializedStyles;
9584
+ };
9585
+
9586
+ }
9587
+ declare module '@elastic/eui/src/components/card/card_select/card_select' {
9588
+ import { FunctionComponent } from 'react';
9589
+ import { Props } from '@elastic/eui/src/components/button/button';
9590
+ export type EuiCardSelectProps = Props;
9591
+ export const EuiCardSelect: FunctionComponent<EuiCardSelectProps>;
9592
+ export function euiCardSelectableColor(color: Props['color'], isSelected: boolean | undefined): Props['color'];
9593
+
9594
+ }
9595
+ declare module '@elastic/eui/src/components/card/card_select' {
9596
+ export type { EuiCardSelectProps } from '@elastic/eui/src/components/card/card_select/card_select';
9597
+ export { EuiCardSelect, euiCardSelectableColor } from '@elastic/eui/src/components/card/card_select/card_select';
9598
+
9599
9599
  }
9600
9600
  declare module '@elastic/eui/src/components/card/card.styles' {
9601
- import { EuiCardProps } from '@elastic/eui/src/components';
9602
9601
  import { UseEuiTheme } from '@elastic/eui/src/services';
9602
+ import { EuiCardProps } from '@elastic/eui/src/components/card/card';
9603
9603
  /**
9604
9604
  * 1. Footer is always at the bottom.
9605
9605
  * 3. Horizontal layouts should always top left align no matter the textAlign prop
@@ -9675,8 +9675,8 @@ declare module '@elastic/eui/src/components/card/card' {
9675
9675
  import { CommonProps, ExclusiveUnion } from '@elastic/eui/src/components/common';
9676
9676
  import { EuiBetaBadgeProps } from '@elastic/eui/src/components/badge/beta_badge';
9677
9677
  import { EuiIconProps } from '@elastic/eui/src/components/icon';
9678
- import { EuiCardSelectProps } from '@elastic/eui/src/components/card/card_select';
9679
9678
  import { EuiPanelProps } from '@elastic/eui/src/components/panel';
9679
+ import { EuiCardSelectProps } from '@elastic/eui/src/components/card/card_select';
9680
9680
  export const ALIGNMENTS: readonly ["left", "center", "right"]; type CardAlignment = (typeof ALIGNMENTS)[number]; type EuiCardPropsLayout = ExclusiveUnion<{
9681
9681
  layout?: 'vertical';
9682
9682
  /**
@@ -11288,74 +11288,6 @@ declare module '@elastic/eui/src/components/color_picker' {
11288
11288
  export type { EuiColorPaletteDisplayProps } from '@elastic/eui/src/components/color_picker/color_palette_display';
11289
11289
  export { EuiColorPaletteDisplay } from '@elastic/eui/src/components/color_picker/color_palette_display';
11290
11290
 
11291
- }
11292
- declare module '@elastic/eui/src/components/mark/mark.styles' {
11293
- import { UseEuiTheme } from '@elastic/eui/src/services';
11294
- export const euiMarkStyles: ({ euiTheme, colorMode }: UseEuiTheme) => {
11295
- euiMark: import("@emotion/utils").SerializedStyles;
11296
- };
11297
- export const euiMarkScreenReaderStyles: (highlightStart: string, highlightEnd: string) => {
11298
- hasScreenReaderHelpText: import("@emotion/utils").SerializedStyles;
11299
- };
11300
-
11301
- }
11302
- declare module '@elastic/eui/src/components/mark/mark' {
11303
- import { HTMLAttributes, FunctionComponent, ReactNode } from 'react';
11304
- import { CommonProps } from '@elastic/eui/src/components/common';
11305
- export type EuiMarkProps = HTMLAttributes<HTMLElement> & CommonProps & {
11306
- /**
11307
- * Set to `false` to remove the CSS :before and :after
11308
- * screen reader helper text
11309
- */
11310
- hasScreenReaderHelpText?: boolean;
11311
- /**
11312
- * ReactNode to render as this component's content
11313
- */
11314
- children: ReactNode;
11315
- };
11316
- export const EuiMark: FunctionComponent<EuiMarkProps>;
11317
-
11318
- }
11319
- declare module '@elastic/eui/src/components/mark' {
11320
- export type { EuiMarkProps } from '@elastic/eui/src/components/mark/mark';
11321
- export { EuiMark } from '@elastic/eui/src/components/mark/mark';
11322
-
11323
- }
11324
- declare module '@elastic/eui/src/components/highlight/highlight' {
11325
- import { HTMLAttributes, FunctionComponent } from 'react';
11326
- import { CommonProps } from '@elastic/eui/src/components/common';
11327
- import { EuiMarkProps } from '@elastic/eui/src/components/mark'; type EuiMarkPropHelpText = Pick<EuiMarkProps, 'hasScreenReaderHelpText'>;
11328
- export type EuiHighlightProps = HTMLAttributes<HTMLSpanElement> & EuiMarkPropHelpText & CommonProps & {
11329
- /**
11330
- * string to highlight as this component's content
11331
- */
11332
- children: string;
11333
- /**
11334
- * What to search for
11335
- */
11336
- search: string;
11337
- /**
11338
- * Should the search be strict or not
11339
- */
11340
- strict?: boolean;
11341
- /**
11342
- * Should highlight all matches
11343
- */
11344
- highlightAll?: boolean;
11345
- };
11346
- export const EuiHighlight: FunctionComponent<EuiHighlightProps>;
11347
- export {};
11348
-
11349
- }
11350
- declare module '@elastic/eui/src/components/highlight' {
11351
- export type { EuiHighlightProps } from '@elastic/eui/src/components/highlight/highlight';
11352
- export { EuiHighlight } from '@elastic/eui/src/components/highlight/highlight';
11353
-
11354
- }
11355
- declare module '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_title' {
11356
- import { FunctionComponent, PropsWithChildren } from 'react';
11357
- export const EuiComboBoxTitle: FunctionComponent<PropsWithChildren>;
11358
-
11359
11291
  }
11360
11292
  declare module '@elastic/eui/src/components/filter_group/filter_select_item.styles' {
11361
11293
  import { UseEuiTheme } from '@elastic/eui/src/services';
@@ -11399,128 +11331,212 @@ declare module '@elastic/eui/src/components/filter_group/filter_select_item' {
11399
11331
  export const EuiFilterSelectItem: React.ForwardRefExoticComponent<Omit<EuiFilterSelectItemProps, "theme"> & React.RefAttributes<Omit<EuiFilterSelectItemProps, "theme">>>;
11400
11332
 
11401
11333
  }
11402
- declare module '@elastic/eui/src/components/combo_box/types' {
11403
- import { ButtonHTMLAttributes, ReactNode } from 'react';
11404
- import { CommonProps } from '@elastic/eui/src/components/common';
11405
- export interface EuiComboBoxOptionOption<T = string | number | string[] | undefined> extends CommonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
11406
- isGroupLabelOption?: boolean;
11407
- label: string;
11408
- key?: string;
11409
- options?: Array<EuiComboBoxOptionOption<T>>;
11410
- value?: T;
11411
- prepend?: ReactNode;
11412
- append?: ReactNode;
11334
+ declare module '@elastic/eui/src/components/text_truncate/utils' {
11335
+ import type { ExclusiveUnion } from '@elastic/eui/src/components/common';
11336
+ interface SharedParams {
11337
+ fullText: string;
11338
+ ellipsis: string;
11339
+ availableWidth: number;
11413
11340
  }
11414
- export type UpdatePositionHandler = (listElement?: RefInstance<HTMLDivElement>) => void;
11415
- export type OptionHandler<T> = (option: EuiComboBoxOptionOption<T>) => void;
11416
- export type RefInstance<T> = T | null;
11417
- export type EuiComboBoxOptionsListPosition = 'top' | 'bottom';
11418
- export interface EuiComboBoxSingleSelectionShape {
11419
- asPlainText?: boolean;
11341
+ interface DOMParams extends SharedParams {
11342
+ container: HTMLElement;
11343
+ } type CanvasParams = SharedParams & ExclusiveUnion<{
11344
+ container: HTMLElement;
11345
+ }, {
11346
+ font: CanvasTextDrawingStyles['font'];
11347
+ }>; abstract class _TruncationUtils {
11348
+ protected fullText: SharedParams['fullText'];
11349
+ protected ellipsis: SharedParams['ellipsis'];
11350
+ protected availableWidth: SharedParams['availableWidth'];
11351
+ constructor({ fullText, ellipsis, availableWidth }: SharedParams);
11352
+ /**
11353
+ * Internal measurement utils which will be overridden depending on the
11354
+ * rendering approach used (e.g. DOM vs Canvas).
11355
+ */
11356
+ abstract textWidth: number;
11357
+ abstract setTextToCheck: (text: string) => void;
11358
+ /**
11359
+ * Early return checks
11360
+ */
11361
+ checkIfTruncationIsNeeded: () => false | undefined;
11362
+ checkSufficientEllipsisWidth: (truncation: string) => false | undefined;
11363
+ checkTruncationOffsetWidth: (text: string) => false | undefined;
11364
+ /**
11365
+ * Truncation types logic. This is where the magic happens
11366
+ */
11367
+ truncateStart: (truncationOffset?: number | undefined) => string;
11368
+ truncateEnd: (truncationOffset?: number | undefined) => string;
11369
+ truncateStartEndAtPosition: (truncationPosition: number) => string;
11370
+ truncateStartEndAtMiddle: () => string;
11371
+ truncateMiddle: () => string;
11372
+ }
11373
+ /**
11374
+ * Creates a temporary vanilla JS DOM element for manipulating text and
11375
+ * determining text width.
11376
+ *
11377
+ * Requires passing in a container element to which the temporary element
11378
+ * will be appended. Any CSS/font styles that need to be accounted for should
11379
+ * be automatically inherited from the container.
11380
+ *
11381
+ * NOTE: The consumer is responsible for calling the `cleanup()` method manually
11382
+ * to remove the temporary DOM node once their usage of this utility is complete.
11383
+ */
11384
+ export class TruncationUtilsWithDOM extends _TruncationUtils {
11385
+ container: DOMParams['container'];
11386
+ span: HTMLSpanElement;
11387
+ constructor({ container, ...rest }: DOMParams);
11388
+ get textWidth(): number;
11389
+ setTextToCheck: (text: string) => void;
11390
+ cleanup: () => void;
11391
+ }
11392
+ /**
11393
+ * Creates a temporary Canvas element for manipulating text & determining
11394
+ * text width. This method is compatible with charts or other canvas-rendered
11395
+ * frameworks, and requires no cleanup method.
11396
+ *
11397
+ * To accurately measure text, canvas rendering requires either a container to
11398
+ * compute/derive font styles from, or a static font string (useful for usage
11399
+ * outside the DOM). Particular care should be applied when fallback fonts are
11400
+ * used, as more fallback fonts can lead to less precision.
11401
+ *
11402
+ * Please note that while canvas is more performant than DOM measurement, there
11403
+ * are subpixel to single digit pixel differences between DOM and canvas
11404
+ * measurement due to the different rendering engines used.
11405
+ */
11406
+ export class TruncationUtilsWithCanvas extends _TruncationUtils {
11407
+ context: CanvasRenderingContext2D;
11408
+ currentText: string;
11409
+ constructor({ font, container, ...rest }: CanvasParams);
11410
+ computeFontFromElement: (element: HTMLElement) => string;
11411
+ get textWidth(): number;
11412
+ setTextToCheck: (text: string) => void;
11420
11413
  }
11414
+ export {};
11421
11415
 
11422
11416
  }
11423
- declare module '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list' {
11424
- import React, { Component, ComponentProps, ReactNode, RefCallback } from 'react';
11425
- import { FixedSizeList, ListProps, ListChildComponentProps } from 'react-window';
11426
- import { EuiFilterSelectItemClass } from '@elastic/eui/src/components/filter_group/filter_select_item';
11427
- import { htmlIdGenerator } from '@elastic/eui/src/services';
11428
- import { EuiComboBoxOptionOption, EuiComboBoxOptionsListPosition, EuiComboBoxSingleSelectionShape, OptionHandler, RefInstance, UpdatePositionHandler } from '@elastic/eui/src/components/combo_box/types';
11429
- import { CommonProps } from '@elastic/eui/src/components/common';
11430
- import { EuiPopoverPanel } from '@elastic/eui/src/components/popover/popover_panel';
11431
- export type EuiComboBoxOptionsListProps<T> = CommonProps & ComponentProps<typeof EuiPopoverPanel> & {
11432
- 'data-test-subj': string;
11433
- activeOptionIndex?: number;
11434
- areAllOptionsSelected?: boolean;
11435
- listboxAriaLabel: string;
11417
+ declare module '@elastic/eui/src/components/text_truncate/text_truncate.styles' {
11418
+ export const euiTextTruncateStyles: {
11419
+ euiTextTruncate: import("@emotion/utils").SerializedStyles;
11436
11420
  /**
11437
- * Creates a custom text option. You can use `{searchValue}` inside your string to better customize your text.
11438
- * It won't show if there's no onCreateOption.
11421
+ * The below CSS is a hack to get double clicking and selecting the *full* text
11422
+ * instead of the truncated text (useful for copying/pasting, and mimics how
11423
+ * `text-overflow: ellipsis` works).
11424
+ *
11425
+ * Real talk: I'm lowkey amazed it works and it wouldn't surprise me if we ran into
11426
+ * cross-browser issues with this at some point. Hopefully CSS natively implements
11427
+ * custom text truncation some day (https://github.com/w3c/csswg-drafts/issues/3937)
11428
+ * and there'll be no need for the entire component at that point 🙏
11439
11429
  */
11440
- customOptionText?: string;
11441
- fullWidth?: boolean;
11442
- getSelectedOptionForSearchValue?: (params: {
11443
- isCaseSensitive?: boolean;
11444
- searchValue: string;
11445
- selectedOptions: any[];
11446
- }) => EuiComboBoxOptionOption<T> | undefined;
11447
- isCaseSensitive?: boolean;
11448
- isLoading?: boolean;
11449
- listRef: RefCallback<HTMLDivElement>;
11450
- matchingOptions: Array<EuiComboBoxOptionOption<T>>;
11451
- onCloseList: (event: Event) => void;
11452
- onCreateOption?: (searchValue: string, options: Array<EuiComboBoxOptionOption<T>>) => boolean | void;
11453
- onOptionClick?: OptionHandler<T>;
11454
- onOptionEnterKey?: OptionHandler<T>;
11455
- onScroll?: ListProps['onScroll'];
11456
- optionRef: (index: number, node: RefInstance<EuiFilterSelectItemClass>) => void;
11430
+ truncatedText: import("@emotion/utils").SerializedStyles;
11431
+ fullText: import("@emotion/utils").SerializedStyles;
11432
+ };
11433
+
11434
+ }
11435
+ declare module '@elastic/eui/src/components/text_truncate/text_truncate' {
11436
+ import { HTMLAttributes, FunctionComponent, ReactNode } from 'react';
11437
+ import type { CommonProps } from '@elastic/eui/src/components/common'; const TRUNCATION_TYPES: readonly ["end", "start", "startEnd", "middle"];
11438
+ export type EuiTextTruncationTypes = (typeof TRUNCATION_TYPES)[number];
11439
+ export type EuiTextTruncateProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onResize'> & CommonProps & {
11457
11440
  /**
11458
- * Array of EuiComboBoxOptionOption objects. See #EuiComboBoxOptionOption
11441
+ * The full text string to truncate
11459
11442
  */
11460
- options: Array<EuiComboBoxOptionOption<T>>;
11461
- position?: EuiComboBoxOptionsListPosition;
11462
- renderOption?: (option: EuiComboBoxOptionOption<T>, searchValue: string, OPTION_CONTENT_CLASSNAME: string) => ReactNode;
11463
- rootId: ReturnType<typeof htmlIdGenerator>;
11464
- rowHeight: number;
11465
- scrollToIndex?: number;
11466
- searchValue: string;
11467
- selectedOptions: Array<EuiComboBoxOptionOption<T>>;
11468
- updatePosition: UpdatePositionHandler;
11469
- width: number;
11470
- singleSelection?: boolean | EuiComboBoxSingleSelectionShape;
11471
- delimiter?: string;
11472
- zIndex?: number;
11443
+ text: string;
11444
+ /**
11445
+ * The truncation type desired. Determines where the ellipses are placed.
11446
+ */
11447
+ truncation?: EuiTextTruncationTypes;
11448
+ /**
11449
+ * This prop **only** applies to the `start` and `end` truncation types.
11450
+ * It allows preserving a certain number of characters of either the
11451
+ * starting or ending text.
11452
+ *
11453
+ * If the passed offset is greater than the total text length,
11454
+ * the offset will be ignored.
11455
+ */
11456
+ truncationOffset?: number;
11457
+ /**
11458
+ * This prop **only** applies to the `startEnd` truncation type.
11459
+ * It allows customizing the anchor position of the displayed text,
11460
+ * which otherwise defaults to the middle of the text string.
11461
+ *
11462
+ * The primary use case for this prop for is search highlighting - e.g., if
11463
+ * a user searches for a specific word in the text, pass the index of that
11464
+ * found word to ensure it is always visible.
11465
+ *
11466
+ * This behavior will intelligently detect when positions are close to the start
11467
+ * or end of the text, and omit leading or trailing ellipses when necessary.
11468
+ * If the passed position is greater than the total text length,
11469
+ * the truncation will simply default to `start` instead.
11470
+ */
11471
+ truncationPosition?: number;
11472
+ /**
11473
+ * Defaults to the horizontal ellipsis character.
11474
+ * Can be optionally configured to use other punctuation,
11475
+ * e.g. spaces, brackets, hyphens, asterisks, etc.
11476
+ */
11477
+ ellipsis?: string;
11478
+ /**
11479
+ * By default, EuiTextTruncate will render a resize observer to detect the
11480
+ * available width it has. For performance reasons (e.g. multiple truncated
11481
+ * text items within the same container), you may opt to pass in your own
11482
+ * container width, which will skip initializing a resize observer.
11483
+ */
11484
+ width?: number;
11485
+ /**
11486
+ * Optional callback that fires when the default resizer observer both mounts and
11487
+ * registers a size change. This callback will **not** fire if `width` is passed.
11488
+ */
11489
+ onResize?: (width: number) => void;
11490
+ /**
11491
+ * By default, EuiTextTruncate will calculate its truncation via DOM manipulation
11492
+ * and measurement, which has the benefit of automatically inheriting font styles.
11493
+ * However, if this approach proves to have a significant performance impact for your
11494
+ * usage, consider using the `canvas` API instead, which is more performant.
11495
+ *
11496
+ * Please note that there are minute pixel to subpixel differences between the
11497
+ * two options due to different rendering engines.
11498
+ */
11499
+ measurementRenderAPI?: 'dom' | 'canvas';
11500
+ /**
11501
+ * By default, EuiTextTruncate will render the truncated string directly.
11502
+ * You can optionally pass a render prop function to the component, which
11503
+ * allows for more flexible text rendering, e.g. adding custom markup
11504
+ * or highlighting
11505
+ */
11506
+ children?: (truncatedString: string) => ReactNode;
11473
11507
  };
11474
- export class EuiComboBoxOptionsList<T> extends Component<EuiComboBoxOptionsListProps<T>> {
11475
- listRefInstance: RefInstance<HTMLDivElement>;
11476
- listRef: FixedSizeList | null;
11477
- listBoxRef: HTMLUListElement | null;
11478
- static defaultProps: {
11479
- 'data-test-subj': string;
11480
- rowHeight: number;
11481
- isCaseSensitive: boolean;
11482
- };
11483
- updatePosition: () => void;
11484
- componentDidMount(): void;
11485
- componentDidUpdate(prevProps: EuiComboBoxOptionsListProps<T>): void;
11486
- componentWillUnmount(): void;
11487
- closeListOnScroll: (event: Event) => void;
11488
- listRefCallback: RefCallback<HTMLDivElement>;
11489
- setListRef: (ref: FixedSizeList | null) => void;
11490
- setListBoxRef: (ref: HTMLUListElement | null) => void;
11491
- ListRow: ({ data, index, style }: ListChildComponentProps) => React.JSX.Element;
11492
- render(): React.JSX.Element;
11493
- }
11508
+ export const EuiTextTruncate: FunctionComponent<EuiTextTruncateProps>;
11509
+ export {};
11494
11510
 
11495
11511
  }
11496
- declare module '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_option' {
11497
- import React, { Component, HTMLAttributes, KeyboardEventHandler, ReactNode, RefCallback } from 'react';
11498
- import { EuiComboBoxOptionOption, OptionHandler } from '@elastic/eui/src/components/combo_box/types';
11512
+ declare module '@elastic/eui/src/components/text_truncate' {
11513
+ export type { EuiTextTruncateProps, EuiTextTruncationTypes, } from '@elastic/eui/src/components/text_truncate/text_truncate';
11514
+ export { EuiTextTruncate } from '@elastic/eui/src/components/text_truncate/text_truncate';
11515
+ export { TruncationUtilsWithDOM, TruncationUtilsWithCanvas } from '@elastic/eui/src/components/text_truncate/utils';
11516
+
11517
+ }
11518
+ declare module '@elastic/eui/src/components/combo_box/types' {
11519
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
11499
11520
  import { CommonProps } from '@elastic/eui/src/components/common';
11500
- export interface EuiComboBoxOptionProps<T> extends CommonProps, Omit<HTMLAttributes<HTMLButtonElement>, 'onClick'> {
11501
- children?: ReactNode;
11502
- className?: string;
11503
- disabled?: boolean;
11504
- isFocused: boolean;
11505
- onClick: OptionHandler<T>;
11506
- onEnterKey: OptionHandler<T>;
11507
- option: EuiComboBoxOptionOption<T>;
11508
- optionRef?: RefCallback<HTMLButtonElement>;
11521
+ import type { _EuiComboBoxProps } from '@elastic/eui/src/components/combo_box/combo_box';
11522
+ export interface EuiComboBoxOptionOption<T = string | number | string[] | undefined> extends CommonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
11523
+ isGroupLabelOption?: boolean;
11524
+ label: string;
11525
+ key?: string;
11526
+ options?: Array<EuiComboBoxOptionOption<T>>;
11527
+ value?: T;
11528
+ prepend?: ReactNode;
11529
+ append?: ReactNode;
11530
+ truncationProps?: _EuiComboBoxProps<T>['truncationProps'];
11509
11531
  }
11510
- export class EuiComboBoxOption<T> extends Component<EuiComboBoxOptionProps<T>> {
11511
- onClick: () => void;
11512
- onKeyDown: KeyboardEventHandler<HTMLButtonElement>;
11513
- render(): React.JSX.Element;
11532
+ export type UpdatePositionHandler = (listElement?: RefInstance<HTMLDivElement>) => void;
11533
+ export type OptionHandler<T> = (option: EuiComboBoxOptionOption<T>) => void;
11534
+ export type RefInstance<T> = T | null;
11535
+ export type EuiComboBoxOptionsListPosition = 'top' | 'bottom';
11536
+ export interface EuiComboBoxSingleSelectionShape {
11537
+ asPlainText?: boolean;
11514
11538
  }
11515
11539
 
11516
- }
11517
- declare module '@elastic/eui/src/components/combo_box/combo_box_options_list' {
11518
- export type { EuiComboBoxOptionsListProps } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list';
11519
- export { EuiComboBoxOptionsList } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list';
11520
- export type { EuiComboBoxOptionProps } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_option';
11521
- export { EuiComboBoxOption } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_option';
11522
- export { EuiComboBoxTitle } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_title';
11523
-
11524
11540
  }
11525
11541
  declare module '@elastic/eui/src/components/combo_box/matching_options' {
11526
11542
  import { EuiComboBoxOptionOption } from '@elastic/eui/src/components/combo_box/types';
@@ -11625,6 +11641,180 @@ declare module '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_
11625
11641
  }
11626
11642
  export {};
11627
11643
 
11644
+ }
11645
+ declare module '@elastic/eui/src/components/mark/mark.styles' {
11646
+ import { UseEuiTheme } from '@elastic/eui/src/services';
11647
+ export const euiMarkStyles: ({ euiTheme, colorMode }: UseEuiTheme) => {
11648
+ euiMark: import("@emotion/utils").SerializedStyles;
11649
+ };
11650
+ export const euiMarkScreenReaderStyles: (highlightStart: string, highlightEnd: string) => {
11651
+ hasScreenReaderHelpText: import("@emotion/utils").SerializedStyles;
11652
+ };
11653
+
11654
+ }
11655
+ declare module '@elastic/eui/src/components/mark/mark' {
11656
+ import { HTMLAttributes, FunctionComponent, ReactNode } from 'react';
11657
+ import { CommonProps } from '@elastic/eui/src/components/common';
11658
+ export type EuiMarkProps = HTMLAttributes<HTMLElement> & CommonProps & {
11659
+ /**
11660
+ * Set to `false` to remove the CSS :before and :after
11661
+ * screen reader helper text
11662
+ */
11663
+ hasScreenReaderHelpText?: boolean;
11664
+ /**
11665
+ * ReactNode to render as this component's content
11666
+ */
11667
+ children: ReactNode;
11668
+ };
11669
+ export const EuiMark: FunctionComponent<EuiMarkProps>;
11670
+
11671
+ }
11672
+ declare module '@elastic/eui/src/components/mark' {
11673
+ export type { EuiMarkProps } from '@elastic/eui/src/components/mark/mark';
11674
+ export { EuiMark } from '@elastic/eui/src/components/mark/mark';
11675
+
11676
+ }
11677
+ declare module '@elastic/eui/src/components/highlight/highlight' {
11678
+ import { HTMLAttributes, FunctionComponent } from 'react';
11679
+ import { CommonProps } from '@elastic/eui/src/components/common';
11680
+ import { EuiMarkProps } from '@elastic/eui/src/components/mark'; type EuiMarkPropHelpText = Pick<EuiMarkProps, 'hasScreenReaderHelpText'>;
11681
+ export type EuiHighlightProps = HTMLAttributes<HTMLSpanElement> & EuiMarkPropHelpText & CommonProps & {
11682
+ /**
11683
+ * string to highlight as this component's content
11684
+ */
11685
+ children: string;
11686
+ /**
11687
+ * What to search for
11688
+ */
11689
+ search: string;
11690
+ /**
11691
+ * Should the search be strict or not
11692
+ */
11693
+ strict?: boolean;
11694
+ /**
11695
+ * Should highlight all matches
11696
+ */
11697
+ highlightAll?: boolean;
11698
+ };
11699
+ export const EuiHighlight: FunctionComponent<EuiHighlightProps>;
11700
+ export {};
11701
+
11702
+ }
11703
+ declare module '@elastic/eui/src/components/highlight' {
11704
+ export type { EuiHighlightProps } from '@elastic/eui/src/components/highlight/highlight';
11705
+ export { EuiHighlight } from '@elastic/eui/src/components/highlight/highlight';
11706
+
11707
+ }
11708
+ declare module '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_title' {
11709
+ import { FunctionComponent, PropsWithChildren } from 'react';
11710
+ export const EuiComboBoxTitle: FunctionComponent<PropsWithChildren>;
11711
+
11712
+ }
11713
+ declare module '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list' {
11714
+ import React, { Component, ComponentProps, ReactNode, RefCallback } from 'react';
11715
+ import { FixedSizeList, ListProps, ListChildComponentProps } from 'react-window';
11716
+ import { EuiFilterSelectItemClass } from '@elastic/eui/src/components/filter_group/filter_select_item';
11717
+ import { htmlIdGenerator } from '@elastic/eui/src/services';
11718
+ import { CommonProps } from '@elastic/eui/src/components/common';
11719
+ import { EuiPopoverPanel } from '@elastic/eui/src/components/popover/popover_panel';
11720
+ import type { _EuiComboBoxProps } from '@elastic/eui/src/components/combo_box/combo_box';
11721
+ import { EuiComboBoxOptionOption, EuiComboBoxOptionsListPosition, EuiComboBoxSingleSelectionShape, OptionHandler, RefInstance, UpdatePositionHandler } from '@elastic/eui/src/components/combo_box/types';
11722
+ export type EuiComboBoxOptionsListProps<T> = CommonProps & ComponentProps<typeof EuiPopoverPanel> & {
11723
+ activeOptionIndex?: number;
11724
+ areAllOptionsSelected?: boolean;
11725
+ listboxAriaLabel: string;
11726
+ /**
11727
+ * Creates a custom text option. You can use `{searchValue}` inside your string to better customize your text.
11728
+ * It won't show if there's no onCreateOption.
11729
+ */
11730
+ customOptionText?: string;
11731
+ fullWidth?: boolean;
11732
+ getSelectedOptionForSearchValue?: (params: {
11733
+ isCaseSensitive?: boolean;
11734
+ searchValue: string;
11735
+ selectedOptions: any[];
11736
+ }) => EuiComboBoxOptionOption<T> | undefined;
11737
+ isCaseSensitive?: boolean;
11738
+ isLoading?: boolean;
11739
+ listRef: RefCallback<HTMLDivElement>;
11740
+ matchingOptions: Array<EuiComboBoxOptionOption<T>>;
11741
+ onCloseList: (event: Event) => void;
11742
+ onCreateOption?: (searchValue: string, options: Array<EuiComboBoxOptionOption<T>>) => boolean | void;
11743
+ onOptionClick?: OptionHandler<T>;
11744
+ onOptionEnterKey?: OptionHandler<T>;
11745
+ onScroll?: ListProps['onScroll'];
11746
+ optionRef: (index: number, node: RefInstance<EuiFilterSelectItemClass>) => void;
11747
+ /**
11748
+ * Array of EuiComboBoxOptionOption objects. See #EuiComboBoxOptionOption
11749
+ */
11750
+ options: Array<EuiComboBoxOptionOption<T>>;
11751
+ position?: EuiComboBoxOptionsListPosition;
11752
+ renderOption?: (option: EuiComboBoxOptionOption<T>, searchValue: string, OPTION_CONTENT_CLASSNAME: string) => ReactNode;
11753
+ rootId: ReturnType<typeof htmlIdGenerator>;
11754
+ rowHeight: number;
11755
+ scrollToIndex?: number;
11756
+ searchValue: string;
11757
+ selectedOptions: Array<EuiComboBoxOptionOption<T>>;
11758
+ updatePosition: UpdatePositionHandler;
11759
+ width: number;
11760
+ singleSelection?: boolean | EuiComboBoxSingleSelectionShape;
11761
+ delimiter?: string;
11762
+ zIndex?: number;
11763
+ truncationProps?: _EuiComboBoxProps<T>['truncationProps'];
11764
+ };
11765
+ export class EuiComboBoxOptionsList<T> extends Component<EuiComboBoxOptionsListProps<T>> {
11766
+ listRefInstance: RefInstance<HTMLDivElement>;
11767
+ listRef: FixedSizeList | null;
11768
+ listBoxRef: HTMLUListElement | null;
11769
+ static defaultProps: {
11770
+ 'data-test-subj': string;
11771
+ rowHeight: number;
11772
+ isCaseSensitive: boolean;
11773
+ };
11774
+ updatePosition: () => void;
11775
+ componentDidMount(): void;
11776
+ componentDidUpdate(prevProps: EuiComboBoxOptionsListProps<T>): void;
11777
+ componentWillUnmount(): void;
11778
+ closeListOnScroll: (event: Event) => void;
11779
+ listRefCallback: RefCallback<HTMLDivElement>;
11780
+ setListRef: (ref: FixedSizeList | null) => void;
11781
+ setListBoxRef: (ref: HTMLUListElement | null) => void;
11782
+ ListRow: ({ data, index, style }: ListChildComponentProps) => React.JSX.Element;
11783
+ optionWidth: number | undefined;
11784
+ setOptionWidth: (width: number) => void;
11785
+ renderTruncatedOption: (text: string, truncationProps: EuiComboBoxOptionsListProps<T>['truncationProps']) => React.JSX.Element;
11786
+ render(): React.JSX.Element;
11787
+ }
11788
+
11789
+ }
11790
+ declare module '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_option' {
11791
+ import React, { Component, HTMLAttributes, KeyboardEventHandler, ReactNode, RefCallback } from 'react';
11792
+ import { EuiComboBoxOptionOption, OptionHandler } from '@elastic/eui/src/components/combo_box/types';
11793
+ import { CommonProps } from '@elastic/eui/src/components/common';
11794
+ export interface EuiComboBoxOptionProps<T> extends CommonProps, Omit<HTMLAttributes<HTMLButtonElement>, 'onClick'> {
11795
+ children?: ReactNode;
11796
+ className?: string;
11797
+ disabled?: boolean;
11798
+ isFocused: boolean;
11799
+ onClick: OptionHandler<T>;
11800
+ onEnterKey: OptionHandler<T>;
11801
+ option: EuiComboBoxOptionOption<T>;
11802
+ optionRef?: RefCallback<HTMLButtonElement>;
11803
+ }
11804
+ export class EuiComboBoxOption<T> extends Component<EuiComboBoxOptionProps<T>> {
11805
+ onClick: () => void;
11806
+ onKeyDown: KeyboardEventHandler<HTMLButtonElement>;
11807
+ render(): React.JSX.Element;
11808
+ }
11809
+
11810
+ }
11811
+ declare module '@elastic/eui/src/components/combo_box/combo_box_options_list' {
11812
+ export type { EuiComboBoxOptionsListProps } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list';
11813
+ export { EuiComboBoxOptionsList } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list';
11814
+ export type { EuiComboBoxOptionProps } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_option';
11815
+ export { EuiComboBoxOption } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_option';
11816
+ export { EuiComboBoxTitle } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_title';
11817
+
11628
11818
  }
11629
11819
  declare module '@elastic/eui/src/components/combo_box/combo_box' {
11630
11820
  /**
@@ -11632,14 +11822,15 @@ declare module '@elastic/eui/src/components/combo_box/combo_box' {
11632
11822
  * from the tab order with tabindex={-1} so that we can control the keyboard navigation interface.
11633
11823
  */
11634
11824
  import React, { Component, FocusEventHandler, HTMLAttributes, KeyboardEventHandler, RefCallback } from 'react';
11825
+ import AutosizeInput from 'react-input-autosize';
11826
+ import { CommonProps } from '@elastic/eui/src/components/common';
11827
+ import { EuiFormControlLayoutProps } from '@elastic/eui/src/components/form';
11828
+ import { EuiFilterSelectItemClass } from '@elastic/eui/src/components/filter_group/filter_select_item';
11829
+ import type { EuiTextTruncateProps } from '@elastic/eui/src/components/text_truncate';
11635
11830
  import { SortMatchesBy } from '@elastic/eui/src/components/combo_box/matching_options';
11636
11831
  import { EuiComboBoxInputProps } from '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_input';
11637
11832
  import { EuiComboBoxOptionsListProps } from '@elastic/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list';
11638
- import { UpdatePositionHandler, OptionHandler, RefInstance, EuiComboBoxOptionOption, EuiComboBoxOptionsListPosition, EuiComboBoxSingleSelectionShape } from '@elastic/eui/src/components/combo_box/types';
11639
- import { EuiFilterSelectItemClass } from '@elastic/eui/src/components/filter_group/filter_select_item';
11640
- import AutosizeInput from 'react-input-autosize';
11641
- import { CommonProps } from '@elastic/eui/src/components/common';
11642
- import { EuiFormControlLayoutProps } from '@elastic/eui/src/components/form'; type DrillProps<T> = Pick<EuiComboBoxOptionsListProps<T>, 'customOptionText' | 'onCreateOption' | 'options' | 'renderOption' | 'selectedOptions'>;
11833
+ import { UpdatePositionHandler, OptionHandler, RefInstance, EuiComboBoxOptionOption, EuiComboBoxOptionsListPosition, EuiComboBoxSingleSelectionShape } from '@elastic/eui/src/components/combo_box/types'; type DrillProps<T> = Pick<EuiComboBoxOptionsListProps<T>, 'customOptionText' | 'onCreateOption' | 'options' | 'renderOption' | 'selectedOptions'>;
11643
11834
  export interface _EuiComboBoxProps<T> extends CommonProps, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>, DrillProps<T> {
11644
11835
  'data-test-subj'?: string;
11645
11836
  /**
@@ -11734,6 +11925,16 @@ declare module '@elastic/eui/src/components/combo_box/combo_box' {
11734
11925
  * supplied by `aria-label` or from [EuiFormRow](/#/forms/form-layouts).
11735
11926
  */
11736
11927
  'aria-labelledby'?: string;
11928
+ /**
11929
+ * By default, EuiComboBox will truncate option labels at the end of
11930
+ * the string. You can use pass in a custom truncation configuration that
11931
+ * accepts any prop that [EuiTextTruncate](/#/utilities/text-truncate) prop
11932
+ * except for `text` and `children`.
11933
+ *
11934
+ * Note: when searching, custom truncation props are ignored. The highlighted search
11935
+ * text will always take precedence.
11936
+ */
11937
+ truncationProps?: Partial<Omit<EuiTextTruncateProps, 'text' | 'children'>>;
11737
11938
  } type DefaultProps<T> = Omit<(typeof EuiComboBox)['defaultProps'], 'options' | 'selectedOptions'> & {
11738
11939
  options: Array<EuiComboBoxOptionOption<T>>;
11739
11940
  selectedOptions: Array<EuiComboBoxOptionOption<T>>;
@@ -13728,17 +13929,35 @@ declare module '@elastic/eui/src/components/drag_and_drop/drag_drop_context' {
13728
13929
  export const EuiDragDropContext: FunctionComponent<DragDropContextProps>;
13729
13930
  export {};
13730
13931
 
13932
+ }
13933
+ declare module '@elastic/eui/src/components/drag_and_drop/droppable.styles' {
13934
+ import { UseEuiTheme } from '@elastic/eui/src/services';
13935
+ export const euiDroppableStyles: (euiThemeContext: UseEuiTheme) => {
13936
+ euiDroppable: import("@emotion/utils").SerializedStyles;
13937
+ isDragging: import("@emotion/utils").SerializedStyles;
13938
+ isDraggingOver: import("@emotion/utils").SerializedStyles;
13939
+ grow: import("@emotion/utils").SerializedStyles;
13940
+ noGrow: import("@emotion/utils").SerializedStyles;
13941
+ spacing: {
13942
+ none: null;
13943
+ s: import("@emotion/utils").SerializedStyles;
13944
+ m: import("@emotion/utils").SerializedStyles;
13945
+ l: import("@emotion/utils").SerializedStyles;
13946
+ };
13947
+ };
13948
+ export const sharedSpacingPadding: ({ euiTheme }: UseEuiTheme) => {
13949
+ none: null;
13950
+ s: import("@emotion/utils").SerializedStyles;
13951
+ m: import("@emotion/utils").SerializedStyles;
13952
+ l: import("@emotion/utils").SerializedStyles;
13953
+ };
13954
+
13731
13955
  }
13732
13956
  declare module '@elastic/eui/src/components/drag_and_drop/droppable' {
13733
13957
  import React, { CSSProperties, FunctionComponent, ReactElement } from 'react';
13734
13958
  import { DroppableProps } from '@hello-pangea/dnd';
13735
- import { CommonProps } from '@elastic/eui/src/components/common'; const spacingToClassNameMap: {
13736
- none: null;
13737
- s: string;
13738
- m: string;
13739
- l: string;
13740
- };
13741
- export type EuiDroppableSpacing = keyof typeof spacingToClassNameMap;
13959
+ import { CommonProps } from '@elastic/eui/src/components/common';
13960
+ export const SPACINGS: readonly ["none", "s", "m", "l"];
13742
13961
  export interface EuiDroppableProps extends CommonProps, Omit<DroppableProps, 'children'> {
13743
13962
  /**
13744
13963
  * ReactNode to render as this component's content
@@ -13753,7 +13972,7 @@ declare module '@elastic/eui/src/components/drag_and_drop/droppable' {
13753
13972
  /**
13754
13973
  * Adds padding to the droppable area
13755
13974
  */
13756
- spacing?: EuiDroppableSpacing;
13975
+ spacing?: (typeof SPACINGS)[number];
13757
13976
  /**
13758
13977
  * Adds an EuiPanel style to the droppable area
13759
13978
  */
@@ -13767,19 +13986,33 @@ declare module '@elastic/eui/src/components/drag_and_drop/droppable' {
13767
13986
  cloneItems: boolean;
13768
13987
  }>;
13769
13988
  export const EuiDroppable: FunctionComponent<EuiDroppableProps>;
13770
- export {};
13989
+
13990
+ }
13991
+ declare module '@elastic/eui/src/components/drag_and_drop/draggable.styles' {
13992
+ import { UseEuiTheme } from '@elastic/eui/src/services';
13993
+ export const euiDraggableStyles: (euiThemeContext: UseEuiTheme) => {
13994
+ euiDraggable: import("@emotion/utils").SerializedStyles;
13995
+ isDragging: import("@emotion/utils").SerializedStyles;
13996
+ hasClone: import("@emotion/utils").SerializedStyles;
13997
+ isRemovable: import("@emotion/utils").SerializedStyles;
13998
+ spacing: {
13999
+ none: null;
14000
+ s: import("@emotion/utils").SerializedStyles;
14001
+ m: import("@emotion/utils").SerializedStyles;
14002
+ l: import("@emotion/utils").SerializedStyles;
14003
+ };
14004
+ };
14005
+ export const euiDraggableItemStyles: {
14006
+ euiDraggable__item: import("@emotion/utils").SerializedStyles;
14007
+ disabled: import("@emotion/utils").SerializedStyles;
14008
+ };
13771
14009
 
13772
14010
  }
13773
14011
  declare module '@elastic/eui/src/components/drag_and_drop/draggable' {
13774
14012
  import { CSSProperties, FunctionComponent, ReactElement } from 'react';
13775
14013
  import { DraggableProps } from '@hello-pangea/dnd';
13776
- import { CommonProps } from '@elastic/eui/src/components/common'; const spacingToClassNameMap: {
13777
- none: null;
13778
- s: string;
13779
- m: string;
13780
- l: string;
13781
- };
13782
- export type EuiDraggableSpacing = keyof typeof spacingToClassNameMap;
14014
+ import { CommonProps } from '@elastic/eui/src/components/common';
14015
+ import { SPACINGS } from '@elastic/eui/src/components/drag_and_drop/droppable';
13783
14016
  export interface EuiDraggableProps extends CommonProps, Omit<DraggableProps, 'children'> {
13784
14017
  /**
13785
14018
  * ReactNode to render as this component's content
@@ -13802,11 +14035,10 @@ declare module '@elastic/eui/src/components/drag_and_drop/draggable' {
13802
14035
  /**
13803
14036
  * Adds padding to the draggable item
13804
14037
  */
13805
- spacing?: EuiDraggableSpacing;
14038
+ spacing?: (typeof SPACINGS)[number];
13806
14039
  style?: CSSProperties;
13807
14040
  }
13808
14041
  export const EuiDraggable: FunctionComponent<EuiDraggableProps>;
13809
- export {};
13810
14042
 
13811
14043
  }
13812
14044
  declare module '@elastic/eui/src/components/drag_and_drop/services' {
@@ -19183,30 +19415,23 @@ declare module '@elastic/eui/src/components/tree_view' {
19183
19415
 
19184
19416
  }
19185
19417
  declare module '@elastic/eui/src/components/search_bar/search_box' {
19186
- import React, { Component } from 'react';
19418
+ import { FunctionComponent } from 'react';
19187
19419
  import { EuiFieldSearchProps } from '@elastic/eui/src/components/form';
19188
19420
  import { EuiSearchBarProps } from '@elastic/eui/src/components/search_bar/search_bar';
19189
- export interface SchemaType {
19190
- strict?: boolean;
19191
- fields?: any;
19192
- flags?: string[];
19193
- }
19194
19421
  export interface EuiSearchBoxProps extends EuiFieldSearchProps {
19195
19422
  query: string;
19196
19423
  onSearch: (queryText: string) => void;
19424
+ /**
19425
+ * @default Search...
19426
+ */
19427
+ placeholder?: string;
19197
19428
  hint?: {
19198
19429
  id: string;
19199
19430
  isVisible: boolean;
19200
19431
  setIsVisible: (isVisible: boolean) => void;
19201
19432
  } & EuiSearchBarProps['hint'];
19202
- } type DefaultProps = Pick<EuiSearchBoxProps, 'placeholder' | 'incremental'>;
19203
- export class EuiSearchBox extends Component<EuiSearchBoxProps> {
19204
- static defaultProps: DefaultProps;
19205
- private inputElement;
19206
- componentDidUpdate(oldProps: EuiSearchBoxProps): void;
19207
- render(): React.JSX.Element;
19208
19433
  }
19209
- export {};
19434
+ export const EuiSearchBox: FunctionComponent<EuiSearchBoxProps>;
19210
19435
 
19211
19436
  }
19212
19437
  declare module '@elastic/eui/src/components/search_bar/query/date_format' {
@@ -20541,7 +20766,6 @@ declare module '@elastic/eui/src/components/search_bar/search_filters' {
20541
20766
  }
20542
20767
  declare module '@elastic/eui/src/components/search_bar/search_bar' {
20543
20768
  import React, { Component, ReactElement } from 'react';
20544
- import { SchemaType } from '@elastic/eui/src/components/search_bar/search_box';
20545
20769
  import { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/search_filters';
20546
20770
  import { Query } from '@elastic/eui/src/components/search_bar/query';
20547
20771
  import { CommonProps } from '@elastic/eui/src/components/common';
@@ -20559,6 +20783,11 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
20559
20783
  queryText: string;
20560
20784
  error: Error;
20561
20785
  }
20786
+ export interface SchemaType {
20787
+ strict?: boolean;
20788
+ fields?: any;
20789
+ flags?: string[];
20790
+ }
20562
20791
  export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError; type HintPopOverProps = Partial<Pick<EuiInputPopoverProps, 'isOpen' | 'closePopover' | 'fullWidth' | 'disableFocusTrap' | 'panelClassName' | 'panelPaddingSize' | 'panelStyle' | 'panelProps' | 'popoverScreenReaderText' | 'repositionOnScroll' | 'zIndex' | 'data-test-subj'>>;
20563
20792
  export interface EuiSearchBarProps extends CommonProps {
20564
20793
  onChange?: (args: EuiSearchBarOnChangeArgs) => void | boolean;
@@ -22015,10 +22244,8 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
22015
22244
  import { EuiBasicTable, Criteria, EuiBasicTableProps, CriteriaWithPagination } from '@elastic/eui/src/components/basic_table/basic_table';
22016
22245
  import { PropertySort } from '@elastic/eui/src/services';
22017
22246
  import { Direction } from '@elastic/eui/src/services/sort';
22018
- import { Query } from '@elastic/eui/src/components/search_bar';
22247
+ import { EuiSearchBarProps, Query, SchemaType } from '@elastic/eui/src/components/search_bar/search_bar';
22019
22248
  import { CommonProps } from '@elastic/eui/src/components/common';
22020
- import { EuiSearchBarProps } from '@elastic/eui/src/components/search_bar/search_bar';
22021
- import { SchemaType } from '@elastic/eui/src/components/search_bar/search_box';
22022
22249
  import { EuiTablePaginationProps } from '@elastic/eui/src/components/table/table_pagination';
22023
22250
  import { EuiComponentDefaults } from '@elastic/eui/src/components/provider/component_defaults';
22024
22251
  interface onChangeArgument {
@@ -22042,6 +22269,18 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
22042
22269
  * Configures #Search.
22043
22270
  */
22044
22271
  search?: Search;
22272
+ /**
22273
+ * By default, tables use `eql` format for search which allows using advanced filters.
22274
+ *
22275
+ * However, certain special characters (such as quotes, parentheses, and colons)
22276
+ * are reserved for EQL syntax and will error if used.
22277
+ * If your table does not require filter search and instead requires searching for certain
22278
+ * symbols, use a plain `text` search format instead (note that filters will be ignored
22279
+ * in this format).
22280
+ *
22281
+ * @default "eql"
22282
+ */
22283
+ searchFormat?: 'eql' | 'text';
22045
22284
  /**
22046
22285
  * Configures #Pagination
22047
22286
  */
@@ -22105,6 +22344,7 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
22105
22344
  static defaultProps: {
22106
22345
  responsive: boolean;
22107
22346
  tableLayout: string;
22347
+ searchFormat: string;
22108
22348
  };
22109
22349
  tableRef: React.RefObject<EuiBasicTable>;
22110
22350
  static getDerivedStateFromProps<T>(nextProps: EuiInMemoryTableProps<T>, prevState: State<T>): State<T> | null;
@@ -22112,6 +22352,7 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
22112
22352
  setSelection(newSelection: T[]): void;
22113
22353
  onTableChange: ({ page, sort }: Criteria<T>) => void;
22114
22354
  onQueryChange: ({ query, queryText, error }: onChangeArgument) => void;
22355
+ onPlainTextSearch: (searchValue: string) => void;
22115
22356
  renderSearchBar(): React.JSX.Element | undefined;
22116
22357
  resolveSearchSchema(): SchemaType;
22117
22358
  getItemSorter(): (a: T, b: T) => number;
@@ -22182,190 +22423,6 @@ declare module '@elastic/eui/src/components/text_diff' {
22182
22423
  export type { EuiTextDiffProps } from '@elastic/eui/src/components/text_diff/text_diff';
22183
22424
  export { useEuiTextDiff } from '@elastic/eui/src/components/text_diff/text_diff';
22184
22425
 
22185
- }
22186
- declare module '@elastic/eui/src/components/text_truncate/utils' {
22187
- import type { ExclusiveUnion } from '@elastic/eui/src/components/common';
22188
- interface SharedParams {
22189
- fullText: string;
22190
- ellipsis: string;
22191
- availableWidth: number;
22192
- }
22193
- interface DOMParams extends SharedParams {
22194
- container: HTMLElement;
22195
- } type CanvasParams = SharedParams & ExclusiveUnion<{
22196
- container: HTMLElement;
22197
- }, {
22198
- font: CanvasTextDrawingStyles['font'];
22199
- }>; abstract class _TruncationUtils {
22200
- protected fullText: SharedParams['fullText'];
22201
- protected ellipsis: SharedParams['ellipsis'];
22202
- protected availableWidth: SharedParams['availableWidth'];
22203
- constructor({ fullText, ellipsis, availableWidth }: SharedParams);
22204
- /**
22205
- * Internal measurement utils which will be overridden depending on the
22206
- * rendering approach used (e.g. DOM vs Canvas).
22207
- */
22208
- abstract textWidth: number;
22209
- abstract setTextToCheck: (text: string) => void;
22210
- /**
22211
- * Early return checks
22212
- */
22213
- checkIfTruncationIsNeeded: () => false | undefined;
22214
- checkSufficientEllipsisWidth: (truncation: string) => false | undefined;
22215
- checkTruncationOffsetWidth: (text: string) => false | undefined;
22216
- /**
22217
- * Truncation types logic. This is where the magic happens
22218
- */
22219
- truncateStart: (truncationOffset?: number | undefined) => string;
22220
- truncateEnd: (truncationOffset?: number | undefined) => string;
22221
- truncateStartEndAtPosition: (truncationPosition: number) => string;
22222
- truncateStartEndAtMiddle: () => string;
22223
- truncateMiddle: () => string;
22224
- }
22225
- /**
22226
- * Creates a temporary vanilla JS DOM element for manipulating text and
22227
- * determining text width.
22228
- *
22229
- * Requires passing in a container element to which the temporary element
22230
- * will be appended. Any CSS/font styles that need to be accounted for should
22231
- * be automatically inherited from the container.
22232
- *
22233
- * NOTE: The consumer is responsible for calling the `cleanup()` method manually
22234
- * to remove the temporary DOM node once their usage of this utility is complete.
22235
- */
22236
- export class TruncationUtilsWithDOM extends _TruncationUtils {
22237
- container: DOMParams['container'];
22238
- span: HTMLSpanElement;
22239
- constructor({ container, ...rest }: DOMParams);
22240
- get textWidth(): number;
22241
- setTextToCheck: (text: string) => void;
22242
- cleanup: () => void;
22243
- }
22244
- /**
22245
- * Creates a temporary Canvas element for manipulating text & determining
22246
- * text width. This method is compatible with charts or other canvas-rendered
22247
- * frameworks, and requires no cleanup method.
22248
- *
22249
- * To accurately measure text, canvas rendering requires either a container to
22250
- * compute/derive font styles from, or a static font string (useful for usage
22251
- * outside the DOM). Particular care should be applied when fallback fonts are
22252
- * used, as more fallback fonts can lead to less precision.
22253
- *
22254
- * Please note that while canvas is more performant than DOM measurement, there
22255
- * are subpixel to single digit pixel differences between DOM and canvas
22256
- * measurement due to the different rendering engines used.
22257
- */
22258
- export class TruncationUtilsWithCanvas extends _TruncationUtils {
22259
- context: CanvasRenderingContext2D;
22260
- currentText: string;
22261
- constructor({ font, container, ...rest }: CanvasParams);
22262
- computeFontFromElement: (element: HTMLElement) => string;
22263
- get textWidth(): number;
22264
- setTextToCheck: (text: string) => void;
22265
- }
22266
- export {};
22267
-
22268
- }
22269
- declare module '@elastic/eui/src/components/text_truncate/text_truncate.styles' {
22270
- export const euiTextTruncateStyles: {
22271
- euiTextTruncate: import("@emotion/utils").SerializedStyles;
22272
- /**
22273
- * The below CSS is a hack to get double clicking and selecting the *full* text
22274
- * instead of the truncated text (useful for copying/pasting, and mimics how
22275
- * `text-overflow: ellipsis` works).
22276
- *
22277
- * Real talk: I'm lowkey amazed it works and it wouldn't surprise me if we ran into
22278
- * cross-browser issues with this at some point. Hopefully CSS natively implements
22279
- * custom text truncation some day (https://github.com/w3c/csswg-drafts/issues/3937)
22280
- * and there'll be no need for the entire component at that point 🙏
22281
- */
22282
- truncatedText: import("@emotion/utils").SerializedStyles;
22283
- fullText: import("@emotion/utils").SerializedStyles;
22284
- };
22285
-
22286
- }
22287
- declare module '@elastic/eui/src/components/text_truncate/text_truncate' {
22288
- import { HTMLAttributes, FunctionComponent, ReactNode } from 'react';
22289
- import type { CommonProps } from '@elastic/eui/src/components/common'; const TRUNCATION_TYPES: readonly ["end", "start", "startEnd", "middle"];
22290
- export type EuiTextTruncationTypes = (typeof TRUNCATION_TYPES)[number];
22291
- export type EuiTextTruncateProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onResize'> & CommonProps & {
22292
- /**
22293
- * The full text string to truncate
22294
- */
22295
- text: string;
22296
- /**
22297
- * The truncation type desired. Determines where the ellipses are placed.
22298
- */
22299
- truncation?: EuiTextTruncationTypes;
22300
- /**
22301
- * This prop **only** applies to the `start` and `end` truncation types.
22302
- * It allows preserving a certain number of characters of either the
22303
- * starting or ending text.
22304
- *
22305
- * If the passed offset is greater than the total text length,
22306
- * the offset will be ignored.
22307
- */
22308
- truncationOffset?: number;
22309
- /**
22310
- * This prop **only** applies to the `startEnd` truncation type.
22311
- * It allows customizing the anchor position of the displayed text,
22312
- * which otherwise defaults to the middle of the text string.
22313
- *
22314
- * The primary use case for this prop for is search highlighting - e.g., if
22315
- * a user searches for a specific word in the text, pass the index of that
22316
- * found word to ensure it is always visible.
22317
- *
22318
- * This behavior will intelligently detect when positions are close to the start
22319
- * or end of the text, and omit leading or trailing ellipses when necessary.
22320
- * If the passed position is greater than the total text length,
22321
- * the truncation will simply default to `start` instead.
22322
- */
22323
- truncationPosition?: number;
22324
- /**
22325
- * Defaults to the horizontal ellipsis character.
22326
- * Can be optionally configured to use other punctuation,
22327
- * e.g. spaces, brackets, hyphens, asterisks, etc.
22328
- */
22329
- ellipsis?: string;
22330
- /**
22331
- * By default, EuiTextTruncate will render a resize observer to detect the
22332
- * available width it has. For performance reasons (e.g. multiple truncated
22333
- * text items within the same container), you may opt to pass in your own
22334
- * container width, which will skip initializing a resize observer.
22335
- */
22336
- width?: number;
22337
- /**
22338
- * Optional callback that fires when the default resizer observer both mounts and
22339
- * registers a size change. This callback will **not** fire if `width` is passed.
22340
- */
22341
- onResize?: (width: number) => void;
22342
- /**
22343
- * By default, EuiTextTruncate will calculate its truncation via DOM manipulation
22344
- * and measurement, which has the benefit of automatically inheriting font styles.
22345
- * However, if this approach proves to have a significant performance impact for your
22346
- * usage, consider using the `canvas` API instead, which is more performant.
22347
- *
22348
- * Please note that there are minute pixel to subpixel differences between the
22349
- * two options due to different rendering engines.
22350
- */
22351
- measurementRenderAPI?: 'dom' | 'canvas';
22352
- /**
22353
- * By default, EuiTextTruncate will render the truncated string directly.
22354
- * You can optionally pass a render prop function to the component, which
22355
- * allows for more flexible text rendering, e.g. adding custom markup
22356
- * or highlighting
22357
- */
22358
- children?: (truncatedString: string) => ReactNode;
22359
- };
22360
- export const EuiTextTruncate: FunctionComponent<EuiTextTruncateProps>;
22361
- export {};
22362
-
22363
- }
22364
- declare module '@elastic/eui/src/components/text_truncate' {
22365
- export type { EuiTextTruncateProps, EuiTextTruncationTypes, } from '@elastic/eui/src/components/text_truncate/text_truncate';
22366
- export { EuiTextTruncate } from '@elastic/eui/src/components/text_truncate/text_truncate';
22367
- export { TruncationUtilsWithDOM, TruncationUtilsWithCanvas } from '@elastic/eui/src/components/text_truncate/utils';
22368
-
22369
22426
  }
22370
22427
  declare module '@elastic/eui/src/components/toast/toast.styles' {
22371
22428
  import { UseEuiTheme } from '@elastic/eui/src/services';
@@ -28775,6 +28832,9 @@ declare module '@elastic/eui' {
28775
28832
  "euiResizableButton.horizontalResizerAriaLabel": any;
28776
28833
  "euiResizableButton.verticalResizerAriaLabel": any;
28777
28834
  "euiResizablePanel.toggleButtonAriaLabel": any;
28835
+ "euiSearchBox.placeholder": any;
28836
+ "euiSearchBox.incrementalAriaLabel": any;
28837
+ "euiSearchBox.ariaLabel": any;
28778
28838
  "euiSelectableListItem.checkedOption": any;
28779
28839
  "euiSelectableListItem.checkOptionInstructions": any;
28780
28840
  "euiSelectableListItem.uncheckOptionInstructions": any;