@elastic/eui 70.0.0 → 70.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +0 -179
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -179
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/es/components/basic_table/in_memory_table.js +8 -0
- package/es/components/button/button_display/_button_display.js +7 -6
- package/es/components/button/button_display/_button_display.styles.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +6 -9
- package/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/es/components/datagrid/controls/column_selector.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/header/header_links/header_links.js +6 -0
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +11 -7
- package/es/components/modal/modal.js +17 -2
- package/es/components/page_template/page_template.js +6 -9
- package/es/components/popover/popover.js +13 -3
- package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/es/components/popover/popover_panel/_popover_panel.js +8 -2
- package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/tabs/tab.js +33 -13
- package/es/components/tabs/tab.styles.js +50 -0
- package/es/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/es/components/tabs/tabs.js +20 -14
- package/es/components/tabs/tabs.styles.js +23 -0
- package/es/components/tour/tour_step.js +6 -0
- package/eui.d.ts +110 -47
- package/i18ntokens.json +4 -4
- package/lib/components/badge/beta_badge/beta_badge.js +6 -10
- package/lib/components/basic_table/in_memory_table.js +8 -0
- package/lib/components/button/button_display/_button_display.js +7 -6
- package/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +6 -9
- package/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/lib/components/datagrid/controls/column_selector.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/header/header_links/header_links.js +6 -0
- package/lib/components/loading/loading_spinner.js +13 -2
- package/lib/components/loading/loading_spinner.styles.js +14 -6
- package/lib/components/modal/modal.js +23 -2
- package/lib/components/page_template/page_template.js +6 -9
- package/lib/components/popover/popover.js +13 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/tabs/tab.js +33 -12
- package/lib/components/tabs/tab.styles.js +56 -0
- package/lib/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/lib/components/tabs/tabs.js +24 -14
- package/lib/components/tabs/tabs.styles.js +34 -0
- package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/optimize/es/components/button/button_display/_button_display.js +6 -5
- package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/es/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/loading/loading_spinner.js +13 -3
- package/optimize/es/components/loading/loading_spinner.styles.js +11 -7
- package/optimize/es/components/modal/modal.js +17 -2
- package/optimize/es/components/page_template/page_template.js +6 -9
- package/optimize/es/components/popover/popover.js +7 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/optimize/es/components/search_bar/search_bar.js +31 -5
- package/optimize/es/components/search_bar/search_box.js +29 -3
- package/optimize/es/components/tabs/tab.js +21 -13
- package/optimize/es/components/tabs/tab.styles.js +50 -0
- package/optimize/es/components/tabs/tabs.js +20 -14
- package/optimize/es/components/tabs/tabs.styles.js +23 -0
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -13
- package/optimize/lib/components/button/button_display/_button_display.js +7 -6
- package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/loading/loading_spinner.js +14 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +14 -6
- package/optimize/lib/components/modal/modal.js +22 -2
- package/optimize/lib/components/page_template/page_template.js +6 -9
- package/optimize/lib/components/popover/popover.js +7 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/optimize/lib/components/search_bar/search_bar.js +31 -5
- package/optimize/lib/components/search_bar/search_box.js +30 -3
- package/optimize/lib/components/tabs/tab.js +21 -12
- package/optimize/lib/components/tabs/tab.styles.js +56 -0
- package/optimize/lib/components/tabs/tabs.js +24 -14
- package/optimize/lib/components/tabs/tabs.styles.js +34 -0
- package/package.json +4 -4
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +6 -13
- package/test-env/components/basic_table/in_memory_table.js +8 -0
- package/test-env/components/button/button_display/_button_display.js +7 -6
- package/test-env/components/button/button_display/_button_display.styles.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +6 -9
- package/test-env/components/button/button_display/_button_display_content.styles.js +10 -40
- package/test-env/components/datagrid/controls/column_selector.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/header/header_links/header_links.js +6 -0
- package/test-env/components/loading/loading_spinner.js +14 -2
- package/test-env/components/loading/loading_spinner.styles.js +14 -6
- package/test-env/components/modal/modal.js +22 -2
- package/test-env/components/page_template/page_template.js +6 -9
- package/test-env/components/popover/popover.js +13 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/test-env/components/search_bar/search_bar.js +39 -5
- package/test-env/components/search_bar/search_box.js +38 -4
- package/test-env/components/tabs/tab.js +33 -12
- package/test-env/components/tabs/tab.styles.js +56 -0
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/test-env/components/tabs/tabs.js +24 -14
- package/test-env/components/tabs/tabs.styles.js +34 -0
- package/src/components/tabs/_index.scss +0 -1
- package/src/components/tabs/_tabs.scss +0 -110
- package/src/themes/amsterdam/overrides/_tabs.scss +0 -80
package/eui.d.ts
CHANGED
|
@@ -1711,8 +1711,9 @@ declare module '@elastic/eui/src/components/loading/loading_content' {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
declare module '@elastic/eui/src/components/loading/loading_spinner.styles' {
|
|
1713
1713
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
1714
|
-
import {
|
|
1715
|
-
export const
|
|
1714
|
+
import { EuiLoadingSpinnerColor } from '@elastic/eui/src/components/loading/loading_spinner';
|
|
1715
|
+
export const euiSpinnerBorderColorsCSS: ({ euiTheme }: UseEuiTheme, colors?: EuiLoadingSpinnerColor) => string;
|
|
1716
|
+
export const euiLoadingSpinnerStyles: (euiThemeContext: UseEuiTheme) => {
|
|
1716
1717
|
euiLoadingSpinner: import("@emotion/utils").SerializedStyles;
|
|
1717
1718
|
s: import("@emotion/utils").SerializedStyles;
|
|
1718
1719
|
m: import("@emotion/utils").SerializedStyles;
|
|
@@ -1910,12 +1911,6 @@ declare module '@elastic/eui/src/components/button/button_display/_button_displa
|
|
|
1910
1911
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
1911
1912
|
export const euiButtonDisplayContentStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
1912
1913
|
euiButtonDisplayContent: import("@emotion/utils").SerializedStyles;
|
|
1913
|
-
left: import("@emotion/utils").SerializedStyles;
|
|
1914
|
-
right: import("@emotion/utils").SerializedStyles;
|
|
1915
|
-
euiButtonDisplayContent__spinner: import("@emotion/utils").SerializedStyles;
|
|
1916
|
-
euiButtonDisplayContent__icon: import("@emotion/utils").SerializedStyles;
|
|
1917
|
-
s: import("@emotion/utils").SerializedStyles;
|
|
1918
|
-
m: import("@emotion/utils").SerializedStyles;
|
|
1919
1914
|
};
|
|
1920
1915
|
|
|
1921
1916
|
}
|
|
@@ -4504,6 +4499,13 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4504
4499
|
left: import("@emotion/utils").SerializedStyles;
|
|
4505
4500
|
right: import("@emotion/utils").SerializedStyles;
|
|
4506
4501
|
};
|
|
4502
|
+
hasDragDrop: {
|
|
4503
|
+
hasDragDrop: import("@emotion/utils").SerializedStyles;
|
|
4504
|
+
top: import("@emotion/utils").SerializedStyles;
|
|
4505
|
+
bottom: import("@emotion/utils").SerializedStyles;
|
|
4506
|
+
left: import("@emotion/utils").SerializedStyles;
|
|
4507
|
+
right: import("@emotion/utils").SerializedStyles;
|
|
4508
|
+
};
|
|
4507
4509
|
};
|
|
4508
4510
|
|
|
4509
4511
|
}
|
|
@@ -4520,6 +4522,7 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4520
4522
|
isOpen?: boolean;
|
|
4521
4523
|
isAttached?: boolean;
|
|
4522
4524
|
position?: EuiPopoverArrowPositions | null;
|
|
4525
|
+
hasDragDrop?: boolean;
|
|
4523
4526
|
};
|
|
4524
4527
|
/**
|
|
4525
4528
|
* *INTERNAL ONLY*
|
|
@@ -4640,6 +4643,11 @@ declare module '@elastic/eui/src/components/popover/popover' {
|
|
|
4640
4643
|
* an `EuiPopover` in a scrollable container, `repositionOnScroll` should be `true`
|
|
4641
4644
|
*/
|
|
4642
4645
|
repositionOnScroll?: boolean;
|
|
4646
|
+
/**
|
|
4647
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
4648
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
4649
|
+
*/
|
|
4650
|
+
hasDragDrop?: boolean;
|
|
4643
4651
|
/**
|
|
4644
4652
|
* By default, popover content inherits the z-index of the anchor
|
|
4645
4653
|
* component; pass `zIndex` to override
|
|
@@ -12993,43 +13001,46 @@ declare module '@elastic/eui/src/components/date_picker/date_picker' {
|
|
|
12993
13001
|
export {};
|
|
12994
13002
|
|
|
12995
13003
|
}
|
|
12996
|
-
declare module '@elastic/eui/src/components/tabs/tab' {
|
|
12997
|
-
import {
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13004
|
+
declare module '@elastic/eui/src/components/tabs/tab.styles' {
|
|
13005
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
13006
|
+
export const euiTabStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
13007
|
+
euiTab: import("@emotion/utils").SerializedStyles;
|
|
13008
|
+
s: import("@emotion/utils").SerializedStyles;
|
|
13009
|
+
m: import("@emotion/utils").SerializedStyles;
|
|
13010
|
+
l: import("@emotion/utils").SerializedStyles;
|
|
13011
|
+
xl: import("@emotion/utils").SerializedStyles;
|
|
13012
|
+
expanded: import("@emotion/utils").SerializedStyles;
|
|
13013
|
+
selected: import("@emotion/utils").SerializedStyles;
|
|
13014
|
+
disabled: import("@emotion/utils").SerializedStyles;
|
|
13015
|
+
};
|
|
13016
|
+
export const euiTabContentStyles: (euiThemeContext: UseEuiTheme) => {
|
|
13017
|
+
euiTab__content: import("@emotion/utils").SerializedStyles;
|
|
13018
|
+
s: import("@emotion/utils").SerializedStyles;
|
|
13019
|
+
m: import("@emotion/utils").SerializedStyles;
|
|
13020
|
+
l: import("@emotion/utils").SerializedStyles;
|
|
13021
|
+
xl: import("@emotion/utils").SerializedStyles;
|
|
13022
|
+
selected: import("@emotion/utils").SerializedStyles;
|
|
13023
|
+
disabled: import("@emotion/utils").SerializedStyles;
|
|
13024
|
+
};
|
|
13025
|
+
|
|
13026
|
+
}
|
|
13027
|
+
declare module '@elastic/eui/src/components/tabs/tabs.styles' {
|
|
13028
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
13029
|
+
export const euiTabsStyles: (euiThemeContext: UseEuiTheme) => {
|
|
13030
|
+
euiTabs: import("@emotion/utils").SerializedStyles;
|
|
13031
|
+
bottomBorder: import("@emotion/utils").SerializedStyles;
|
|
13032
|
+
s: import("@emotion/utils").SerializedStyles;
|
|
13033
|
+
m: import("@emotion/utils").SerializedStyles;
|
|
13034
|
+
l: import("@emotion/utils").SerializedStyles;
|
|
13035
|
+
xl: import("@emotion/utils").SerializedStyles;
|
|
13017
13036
|
};
|
|
13018
|
-
export type Props = ExclusiveUnion<EuiTabPropsForAnchor, EuiTabPropsForButton>;
|
|
13019
|
-
export const EuiTab: FunctionComponent<Props>;
|
|
13020
|
-
export {};
|
|
13021
13037
|
|
|
13022
13038
|
}
|
|
13023
13039
|
declare module '@elastic/eui/src/components/tabs/tabs' {
|
|
13024
13040
|
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
13025
|
-
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
l: string;
|
|
13029
|
-
xl: string;
|
|
13030
|
-
};
|
|
13031
|
-
export const SIZES: ("s" | "m" | "l" | "xl")[];
|
|
13032
|
-
export type EuiTabsSizes = keyof typeof sizeToClassNameMap;
|
|
13041
|
+
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
13042
|
+
export const SIZES: readonly ["s", "m", "l", "xl"];
|
|
13043
|
+
export type EuiTabSizes = typeof SIZES[number];
|
|
13033
13044
|
export type EuiTabsProps = CommonProps & HTMLAttributes<HTMLDivElement> & {
|
|
13034
13045
|
/**
|
|
13035
13046
|
* ReactNode to render as this component's content
|
|
@@ -13048,7 +13059,7 @@ declare module '@elastic/eui/src/components/tabs/tabs' {
|
|
|
13048
13059
|
* Sizes affect both font size and overall size.
|
|
13049
13060
|
* Only use the `xl` size when displayed as page titles.
|
|
13050
13061
|
*/
|
|
13051
|
-
size?:
|
|
13062
|
+
size?: EuiTabSizes;
|
|
13052
13063
|
};
|
|
13053
13064
|
export type EuiTabRef = HTMLDivElement;
|
|
13054
13065
|
export const EuiTabs: React.ForwardRefExoticComponent<CommonProps & React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -13073,12 +13084,48 @@ declare module '@elastic/eui/src/components/tabs/tabs' {
|
|
|
13073
13084
|
} & {
|
|
13074
13085
|
children?: React.ReactNode;
|
|
13075
13086
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
13087
|
+
|
|
13088
|
+
}
|
|
13089
|
+
declare module '@elastic/eui/src/components/tabs/tab' {
|
|
13090
|
+
import { MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes, FunctionComponent, ReactNode } from 'react';
|
|
13091
|
+
import { CommonProps, ExclusiveUnion } from '@elastic/eui/src/components/common';
|
|
13092
|
+
import { EuiTabsProps, EuiTabSizes } from '@elastic/eui/src/components/tabs/tabs';
|
|
13093
|
+
export interface EuiTabProps extends CommonProps {
|
|
13094
|
+
isSelected?: boolean;
|
|
13095
|
+
disabled?: boolean;
|
|
13096
|
+
/**
|
|
13097
|
+
* Places content before the tab content/children.
|
|
13098
|
+
* Will be excluded from interactive effects.
|
|
13099
|
+
*/
|
|
13100
|
+
prepend?: ReactNode;
|
|
13101
|
+
/**
|
|
13102
|
+
* Places content after the tab content/children.
|
|
13103
|
+
* Will be excluded from interactive effects.
|
|
13104
|
+
*/
|
|
13105
|
+
append?: ReactNode;
|
|
13106
|
+
/**
|
|
13107
|
+
* Evenly stretches each tab to fill the
|
|
13108
|
+
* horizontal space
|
|
13109
|
+
*/
|
|
13110
|
+
expand?: EuiTabsProps['expand'];
|
|
13111
|
+
/**
|
|
13112
|
+
* Sizes affect both font size and overall size.
|
|
13113
|
+
* Only use the `xl` size when displayed as page titles.
|
|
13114
|
+
*/
|
|
13115
|
+
size?: EuiTabSizes;
|
|
13116
|
+
} type EuiTabPropsForAnchor = EuiTabProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'href'> & {
|
|
13117
|
+
href?: string;
|
|
13118
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
13119
|
+
}; type EuiTabPropsForButton = EuiTabProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> & {
|
|
13120
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
13121
|
+
};
|
|
13122
|
+
export type Props = ExclusiveUnion<EuiTabPropsForAnchor, EuiTabPropsForButton>;
|
|
13123
|
+
export const EuiTab: FunctionComponent<Props>;
|
|
13076
13124
|
export {};
|
|
13077
13125
|
|
|
13078
13126
|
}
|
|
13079
13127
|
declare module '@elastic/eui/src/components/tabs/tabbed_content/tabbed_content' {
|
|
13080
13128
|
import { Component, HTMLAttributes, ReactNode, FocusEvent } from 'react';
|
|
13081
|
-
import { EuiTabsSizes } from '@elastic/eui/src/components/tabs/tabs';
|
|
13082
13129
|
import { EuiTabProps } from '@elastic/eui/src/components/tabs/tab';
|
|
13083
13130
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
13084
13131
|
/**
|
|
@@ -13115,7 +13162,7 @@ declare module '@elastic/eui/src/components/tabs/tabbed_content/tabbed_content'
|
|
|
13115
13162
|
* Use this prop if you want to control selection state within the owner component
|
|
13116
13163
|
*/
|
|
13117
13164
|
selectedTab?: EuiTabbedContentTab;
|
|
13118
|
-
size?:
|
|
13165
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
13119
13166
|
/**
|
|
13120
13167
|
* Each tab needs id and content properties, so we can associate it with its panel for accessibility.
|
|
13121
13168
|
* The name property (a node) is also required to display to the user.
|
|
@@ -16751,6 +16798,7 @@ declare module '@elastic/eui/src/components/tree_view' {
|
|
|
16751
16798
|
declare module '@elastic/eui/src/components/search_bar/search_box' {
|
|
16752
16799
|
import { Component } from 'react';
|
|
16753
16800
|
import { EuiFieldSearchProps } from '@elastic/eui/src/components/form';
|
|
16801
|
+
import { EuiSearchBarProps } from '@elastic/eui/src/components/search_bar/search_bar';
|
|
16754
16802
|
export interface SchemaType {
|
|
16755
16803
|
strict?: boolean;
|
|
16756
16804
|
fields?: any;
|
|
@@ -16759,6 +16807,11 @@ declare module '@elastic/eui/src/components/search_bar/search_box' {
|
|
|
16759
16807
|
export interface EuiSearchBoxProps extends EuiFieldSearchProps {
|
|
16760
16808
|
query: string;
|
|
16761
16809
|
onSearch: (queryText: string) => void;
|
|
16810
|
+
hint?: {
|
|
16811
|
+
id: string;
|
|
16812
|
+
isVisible: boolean;
|
|
16813
|
+
setIsVisible: (isVisible: boolean) => void;
|
|
16814
|
+
} & EuiSearchBarProps['hint'];
|
|
16762
16815
|
} type DefaultProps = Pick<EuiSearchBoxProps, 'placeholder' | 'incremental'>;
|
|
16763
16816
|
export class EuiSearchBox extends Component<EuiSearchBoxProps> {
|
|
16764
16817
|
static defaultProps: DefaultProps;
|
|
@@ -18085,12 +18138,13 @@ declare module '@elastic/eui/src/components/search_bar/search_filters' {
|
|
|
18085
18138
|
|
|
18086
18139
|
}
|
|
18087
18140
|
declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
18088
|
-
import { Component, ReactElement } from 'react';
|
|
18141
|
+
import React, { Component, ReactElement } from 'react';
|
|
18089
18142
|
import { SchemaType } from '@elastic/eui/src/components/search_bar/search_box';
|
|
18090
18143
|
import { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/search_filters';
|
|
18091
18144
|
import { Query } from '@elastic/eui/src/components/search_bar/query';
|
|
18092
18145
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
18093
18146
|
import { EuiFieldSearchProps } from '@elastic/eui/src/components/form/field_search';
|
|
18147
|
+
import { EuiInputPopoverProps } from '@elastic/eui/src/components/popover';
|
|
18094
18148
|
export { Query, AST as Ast } from '@elastic/eui/src/components/search_bar/query';
|
|
18095
18149
|
export type QueryType = Query | string; type Tools = ReactElement | ReactElement[];
|
|
18096
18150
|
interface ArgsWithQuery {
|
|
@@ -18103,7 +18157,7 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
18103
18157
|
queryText: string;
|
|
18104
18158
|
error: Error;
|
|
18105
18159
|
}
|
|
18106
|
-
export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError;
|
|
18160
|
+
export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError; type HintPopOverProps = Partial<Pick<EuiInputPopoverProps, 'isOpen' | 'closePopover' | 'fullWidth' | 'disableFocusTrap' | 'panelClassName' | 'panelPaddingSize' | 'panelStyle' | 'panelProps' | 'popoverScreenReaderText' | 'repositionOnScroll' | 'zIndex' | 'data-test-subj'>>;
|
|
18107
18161
|
export interface EuiSearchBarProps extends CommonProps {
|
|
18108
18162
|
onChange?: (args: EuiSearchBarOnChangeArgs) => void | boolean;
|
|
18109
18163
|
/**
|
|
@@ -18136,19 +18190,28 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
18136
18190
|
* Date formatter to use when parsing date values
|
|
18137
18191
|
*/
|
|
18138
18192
|
dateFormat?: object;
|
|
18193
|
+
/**
|
|
18194
|
+
* Hint to render below the search bar
|
|
18195
|
+
*/
|
|
18196
|
+
hint?: {
|
|
18197
|
+
content: React.ReactNode;
|
|
18198
|
+
popoverProps?: HintPopOverProps;
|
|
18199
|
+
};
|
|
18139
18200
|
}
|
|
18140
18201
|
interface State {
|
|
18141
18202
|
query: Query;
|
|
18142
18203
|
queryText: string;
|
|
18143
18204
|
error: null | Error;
|
|
18144
|
-
|
|
18205
|
+
isHintVisible: boolean;
|
|
18206
|
+
} type NotifyControllingParent = Pick<State, 'queryText' | 'error'> & {
|
|
18145
18207
|
query: Query | null;
|
|
18146
18208
|
};
|
|
18147
18209
|
export class EuiSearchBar extends Component<EuiSearchBarProps, State> {
|
|
18148
18210
|
static Query: typeof Query;
|
|
18211
|
+
hintId: string;
|
|
18149
18212
|
constructor(props: EuiSearchBarProps);
|
|
18150
18213
|
static getDerivedStateFromProps(nextProps: EuiSearchBarProps, prevState: State): State | null;
|
|
18151
|
-
notifyControllingParent(newState:
|
|
18214
|
+
notifyControllingParent(newState: NotifyControllingParent): void;
|
|
18152
18215
|
onSearch: (queryText: string) => void;
|
|
18153
18216
|
onFiltersChange: (query: Query) => void;
|
|
18154
18217
|
renderTools(tools?: Tools): JSX.Element | JSX.Element[] | undefined;
|
package/i18ntokens.json
CHANGED
|
@@ -4229,11 +4229,11 @@
|
|
|
4229
4229
|
"highlighting": "string",
|
|
4230
4230
|
"loc": {
|
|
4231
4231
|
"start": {
|
|
4232
|
-
"line":
|
|
4232
|
+
"line": 107,
|
|
4233
4233
|
"column": 10
|
|
4234
4234
|
},
|
|
4235
4235
|
"end": {
|
|
4236
|
-
"line":
|
|
4236
|
+
"line": 110,
|
|
4237
4237
|
"column": 11
|
|
4238
4238
|
}
|
|
4239
4239
|
},
|
|
@@ -4661,11 +4661,11 @@
|
|
|
4661
4661
|
"highlighting": "string",
|
|
4662
4662
|
"loc": {
|
|
4663
4663
|
"start": {
|
|
4664
|
-
"line":
|
|
4664
|
+
"line": 684,
|
|
4665
4665
|
"column": 16
|
|
4666
4666
|
},
|
|
4667
4667
|
"end": {
|
|
4668
|
-
"line":
|
|
4668
|
+
"line": 687,
|
|
4669
4669
|
"column": 18
|
|
4670
4670
|
}
|
|
4671
4671
|
},
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SIZES = exports.EuiBetaBadge = exports.COLORS = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -25,10 +25,6 @@ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPositi
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
-
|
|
30
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
32
28
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
33
29
|
|
|
34
30
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -117,7 +113,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
117
113
|
anchorProps: anchorProps
|
|
118
114
|
}, content);
|
|
119
115
|
} else {
|
|
120
|
-
return (0, _react2.jsx)(
|
|
116
|
+
return (0, _react2.jsx)("span", anchorProps, content);
|
|
121
117
|
}
|
|
122
118
|
} else {
|
|
123
119
|
if (tooltipContent) {
|
|
@@ -139,11 +135,11 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
139
135
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat(_typeof(spanTitle)));
|
|
140
136
|
}
|
|
141
137
|
|
|
142
|
-
return (0, _react2.jsx)("span", _extends({
|
|
143
|
-
css: cssStyles,
|
|
138
|
+
return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", _extends({
|
|
144
139
|
className: classes,
|
|
145
|
-
title: spanTitle
|
|
146
|
-
|
|
140
|
+
title: spanTitle,
|
|
141
|
+
css: cssStyles
|
|
142
|
+
}, rest), icon || label));
|
|
147
143
|
}
|
|
148
144
|
}
|
|
149
145
|
};
|
|
@@ -1155,6 +1155,14 @@ EuiInMemoryTable.propTypes = {
|
|
|
1155
1155
|
* Date formatter to use when parsing date values
|
|
1156
1156
|
*/
|
|
1157
1157
|
dateFormat: _propTypes.default.any,
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* Hint to render below the search bar
|
|
1161
|
+
*/
|
|
1162
|
+
hint: _propTypes.default.shape({
|
|
1163
|
+
content: _propTypes.default.node.isRequired,
|
|
1164
|
+
popoverProps: _propTypes.default.any
|
|
1165
|
+
}),
|
|
1158
1166
|
className: _propTypes.default.string,
|
|
1159
1167
|
"aria-label": _propTypes.default.string,
|
|
1160
1168
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -32,14 +32,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
32
32
|
|
|
33
33
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
34
34
|
|
|
35
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
36
|
-
|
|
37
35
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
38
36
|
|
|
39
37
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
40
38
|
|
|
41
39
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
42
40
|
|
|
41
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
42
|
+
|
|
43
43
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
44
44
|
|
|
45
45
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -62,7 +62,8 @@ function isButtonDisabled(_ref) {
|
|
|
62
62
|
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
63
63
|
var children = _ref2.children,
|
|
64
64
|
iconType = _ref2.iconType,
|
|
65
|
-
iconSide = _ref2.iconSide,
|
|
65
|
+
_ref2$iconSide = _ref2.iconSide,
|
|
66
|
+
iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
|
|
66
67
|
iconSize = _ref2.iconSize,
|
|
67
68
|
_ref2$size = _ref2.size,
|
|
68
69
|
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
@@ -97,7 +98,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
97
98
|
iconType: iconType,
|
|
98
99
|
iconSide: iconSide,
|
|
99
100
|
iconSize: iconSize,
|
|
100
|
-
textProps:
|
|
101
|
+
textProps: textProps
|
|
101
102
|
}, contentProps), children);
|
|
102
103
|
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
103
104
|
var elementProps = {}; // Element-specific attributes
|
|
@@ -125,8 +126,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
125
126
|
|
|
126
127
|
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
127
128
|
css: cssStyles,
|
|
128
|
-
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
129
|
-
|
|
129
|
+
style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
|
|
130
|
+
minInlineSize: minWidth
|
|
130
131
|
}) : style,
|
|
131
132
|
ref: ref
|
|
132
133
|
}, elementProps), relObj), rest), innerNode);
|
|
@@ -24,11 +24,11 @@ var _buttonSize = function _buttonSize(size) {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
27
|
-
name: "
|
|
28
|
-
styles: "
|
|
27
|
+
name: "8595p9-isDisabled",
|
|
28
|
+
styles: "cursor:not-allowed;label:isDisabled;"
|
|
29
29
|
} : {
|
|
30
|
-
name: "
|
|
31
|
-
styles: "
|
|
30
|
+
name: "8595p9-isDisabled",
|
|
31
|
+
styles: "cursor:not-allowed;label:isDisabled;",
|
|
32
32
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -46,14 +46,13 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
46
46
|
iconType = _ref.iconType,
|
|
47
47
|
_ref$iconSize = _ref.iconSize,
|
|
48
48
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
49
|
-
iconSide = _ref.iconSide,
|
|
49
|
+
_ref$iconSide = _ref.iconSide,
|
|
50
|
+
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
50
51
|
contentProps = _objectWithoutProperties(_ref, _excluded);
|
|
51
52
|
|
|
52
53
|
var theme = (0, _services.useEuiTheme)();
|
|
53
54
|
var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
|
|
54
|
-
var cssStyles = [styles.euiButtonDisplayContent
|
|
55
|
-
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
56
|
-
var cssIconStyles = [styles.euiButtonDisplayContent__icon, iconSize && styles[iconSize]]; // Add an icon to the button if one exists.
|
|
55
|
+
var cssStyles = [styles.euiButtonDisplayContent]; // Add an icon to the button if one exists.
|
|
57
56
|
|
|
58
57
|
var icon; // When the button is disabled the text gets gray
|
|
59
58
|
// and in some buttons the background gets a light gray
|
|
@@ -62,18 +61,16 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
62
61
|
// are always visible. The default spinner color could be very light.
|
|
63
62
|
|
|
64
63
|
var loadingSpinnerColor = isDisabled ? {
|
|
65
|
-
border: '
|
|
64
|
+
border: 'currentcolor'
|
|
66
65
|
} : undefined;
|
|
67
66
|
|
|
68
67
|
if (isLoading) {
|
|
69
68
|
icon = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
70
|
-
css: cssSpinnerStyles,
|
|
71
69
|
size: iconSize,
|
|
72
70
|
color: loadingSpinnerColor
|
|
73
71
|
});
|
|
74
72
|
} else if (iconType) {
|
|
75
73
|
icon = (0, _react2.jsx)(_icon.EuiIcon, {
|
|
76
|
-
css: cssIconStyles,
|
|
77
74
|
type: iconType,
|
|
78
75
|
size: iconSize,
|
|
79
76
|
color: "inherit" // forces the icon to inherit its parent color
|
|
@@ -84,9 +81,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
84
81
|
var isText = typeof children === 'string';
|
|
85
82
|
return (0, _react2.jsx)("span", _extends({
|
|
86
83
|
css: cssStyles
|
|
87
|
-
}, contentProps), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
84
|
+
}, contentProps), iconSide === 'left' && icon, isText || textProps ? (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
88
85
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
89
|
-
}), children) : children);
|
|
86
|
+
}), children) : children, iconSide === 'right' && icon);
|
|
90
87
|
};
|
|
91
88
|
|
|
92
89
|
exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
|
|
@@ -9,48 +9,18 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
|
|
10
10
|
var _global_styling = require("../../../global_styling");
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
25
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
26
|
-
} : {
|
|
27
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
28
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
|
|
29
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
33
|
-
name: "qfl6yj-right",
|
|
34
|
-
styles: "flex-direction:row-reverse;label:right;"
|
|
35
|
-
} : {
|
|
36
|
-
name: "qfl6yj-right",
|
|
37
|
-
styles: "flex-direction:row-reverse;label:right;",
|
|
38
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
|
|
42
|
-
var euiTheme = _ref4.euiTheme;
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref) {
|
|
20
|
+
var euiTheme = _ref.euiTheme;
|
|
43
21
|
return {
|
|
44
22
|
// Base
|
|
45
|
-
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
46
|
-
// Icon side
|
|
47
|
-
left: /*#__PURE__*/(0, _react.css)(";label:left;"),
|
|
48
|
-
right: _ref3,
|
|
49
|
-
euiButtonDisplayContent__spinner: _ref2,
|
|
50
|
-
euiButtonDisplayContent__icon: _ref,
|
|
51
|
-
// Icon size
|
|
52
|
-
s: /*#__PURE__*/(0, _react.css)(";label:s;"),
|
|
53
|
-
m: /*#__PURE__*/(0, _react.css)(";label:m;")
|
|
23
|
+
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
54
24
|
};
|
|
55
25
|
};
|
|
56
26
|
|
|
@@ -147,7 +147,7 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
|
|
|
147
147
|
},
|
|
148
148
|
anchorPosition: "downLeft",
|
|
149
149
|
panelPaddingSize: "s",
|
|
150
|
-
|
|
150
|
+
hasDragDrop: true,
|
|
151
151
|
button: (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
152
152
|
size: "xs",
|
|
153
153
|
iconType: allowColumnHiding ? 'listAdd' : 'list',
|
|
@@ -159,7 +159,7 @@ var useDataGridColumnSorting = function useDataGridColumnSorting(columns, sortin
|
|
|
159
159
|
},
|
|
160
160
|
anchorPosition: "downLeft",
|
|
161
161
|
panelPaddingSize: "s",
|
|
162
|
-
|
|
162
|
+
hasDragDrop: true,
|
|
163
163
|
button: (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
164
164
|
size: "xs",
|
|
165
165
|
iconType: "sortable",
|
|
@@ -272,6 +272,12 @@ EuiHeaderLinks.propTypes = {
|
|
|
272
272
|
*/
|
|
273
273
|
repositionOnScroll: _propTypes.default.bool,
|
|
274
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
277
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
278
|
+
*/
|
|
279
|
+
hasDragDrop: _propTypes.default.bool,
|
|
280
|
+
|
|
275
281
|
/**
|
|
276
282
|
* By default, popover content inherits the z-index of the anchor
|
|
277
283
|
* component; pass `zIndex` to override
|
|
@@ -19,12 +19,18 @@ var _loading_spinner = require("./loading_spinner.styles");
|
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["size", "className", "aria-label", "color"];
|
|
22
|
+
var _excluded = ["size", "className", "aria-label", "color", "style"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
27
|
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
28
34
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
35
|
|
|
30
36
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -38,16 +44,21 @@ var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
|
38
44
|
className = _ref.className,
|
|
39
45
|
ariaLabel = _ref['aria-label'],
|
|
40
46
|
color = _ref.color,
|
|
47
|
+
style = _ref.style,
|
|
41
48
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
49
|
|
|
43
50
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
44
|
-
var styles = (0, _loading_spinner.euiLoadingSpinnerStyles)(euiTheme
|
|
51
|
+
var styles = (0, _loading_spinner.euiLoadingSpinnerStyles)(euiTheme);
|
|
45
52
|
var cssStyles = [styles.euiLoadingSpinner, styles[size]];
|
|
46
53
|
var classes = (0, _classnames.default)('euiLoadingSpinner', className);
|
|
47
54
|
var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
|
|
55
|
+
var customColorStyle = color ? _objectSpread(_objectSpread({}, style), {}, {
|
|
56
|
+
borderColor: (0, _loading_spinner.euiSpinnerBorderColorsCSS)(euiTheme, color)
|
|
57
|
+
}) : style;
|
|
48
58
|
return (0, _react2.jsx)("span", _extends({
|
|
49
59
|
className: classes,
|
|
50
60
|
css: cssStyles,
|
|
61
|
+
style: customColorStyle,
|
|
51
62
|
role: "progressbar",
|
|
52
63
|
"aria-label": ariaLabel || defaultLabel
|
|
53
64
|
}, rest));
|