Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added eui_114.0.0_selectable_ui_updates_05.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"@elastic/elasticsearch": "9.3.4",
"@elastic/ems-client": "8.6.3",
"@elastic/esql": "1.7.0",
"@elastic/eui": "114.0.0",
"@elastic/eui": "file:./eui_114.0.0_selectable_ui_updates_05.tgz",
"@elastic/eui-theme-borealis": "7.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/kibana-d3-color": "npm:@elastic/kibana-d3-color@2.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export const TagFilterPanel: FC<{}> = ({}) => {
onChange={onSelectChange}
data-test-subj="tagSelectableList"
aria-label={tagsLabel}
listProps={{ paddingSize: 's' }}
{...searchProps}
>
{(list, search) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ export const AddMessageVariables: React.FunctionComponent<Props> = ({
listProps={{
rowHeight: 70,
showIcons: false,
paddingSize: 'none',
textWrap: 'wrap',
}}
loadingMessage={i18n.LOADING_VARIABLES}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export const OptionsListPopoverSuggestions = ({
<EuiSelectable
options={selectableOptions}
renderOption={(option) => renderOption(option, searchString)}
listProps={{ onFocusBadge: false }}
listProps={{ onFocusBadge: false, paddingSize: 's' }}
aria-label={OptionsListStrings.popover.getSuggestionsAriaLabel(
label,
selectableOptions.length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export function DataViewsList({
{...selectableProps}
listProps={{
truncationProps: MIDDLE_TRUNCATION_PROPS,
paddingSize: 's',
...(selectableProps?.listProps ? selectableProps.listProps : undefined),
}}
data-test-subj="indexPattern-switcher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ describe('Saved query management list component', () => {
await waitFor(() => {
expect(findSavedQueriesSpy).toHaveBeenLastCalledWith(undefined, 5, 1);
});
expect(screen.getByRole('option', { name: 'Test 0', checked: false })).toBeInTheDocument();
expect(screen.getByRole('option', { name: 'Test 0', selected: false })).toBeInTheDocument();
await userEvent.click(screen.getByRole('option', { name: 'Test 0' }));
expect(screen.getByRole('option', { name: 'Test 0', checked: true })).toBeInTheDocument();
expect(screen.getByRole('option', { name: 'Test 0', selected: true })).toBeInTheDocument();
findSavedQueriesSpy.mockResolvedValue({
total: 6,
queries: generateSavedQueries(1),
Expand All @@ -398,7 +398,7 @@ describe('Saved query management list component', () => {
await waitFor(() => {
expect(findSavedQueriesSpy).toHaveBeenLastCalledWith(undefined, 5, 1);
});
expect(screen.getByRole('option', { name: 'Test 0', checked: true })).toBeInTheDocument();
expect(screen.getByRole('option', { name: 'Test 0', selected: true })).toBeInTheDocument();
});

it('should allow providing a search term', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export const SavedQueryManagementList = ({
isLoading={isInitializing}
singleSelection="always"
options={savedQueriesOptions}
listProps={{ onFocusBadge: false }}
listProps={{ onFocusBadge: false, paddingSize: 's' }}
isPreFiltered
searchable
searchProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependsOn:
- '@kbn/ml-query-utils'
- '@kbn/ml-is-defined'
- '@kbn/field-types'
- '@kbn/css-utils'
tags:
- shared-browser
- package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import type {
EuiComboBoxOptionOption,
EuiComboBoxSingleSelectionShape,
EuiSelectableOption,
UseEuiTheme,
} from '@elastic/eui';
import { EuiFlexItem, EuiSelectable, htmlIdGenerator } from '@elastic/eui';
import { css } from '@emotion/react';
import { useMemoCss } from '@kbn/css-utils/public/use_memo_css';
import { type DropDownLabel } from './types';
import { useFieldStatsFlyoutContext } from '../use_field_stats_flyout_context';
import { OptionsListPopoverFooter } from './option_list_popover_footer';
Expand Down Expand Up @@ -112,6 +114,11 @@ export const OptionsListPopover = ({
);
const id = useMemo(() => htmlIdGenerator()(), []);

const styles = useMemoCss({
optionsListAvailableOptions: ({ euiTheme }: UseEuiTheme) =>
css({ width: '100%', height: '100%', padding: euiTheme.size.s }),
});

const filteredOptions = useMemo(() => {
return showEmptyFields
? options
Expand Down Expand Up @@ -140,7 +147,7 @@ export const OptionsListPopover = ({
>
<EuiFlexItem
data-test-subj={`optionsListControlAvailableOptions`}
css={css({ width: '100%', height: '100%' })}
css={styles.optionsListAvailableOptions}
>
<OptionsListPopoverSuggestions
renderOption={renderOption}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"@kbn/ml-query-utils",
"@kbn/ml-is-defined",
"@kbn/field-types",
"@kbn/css-utils",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const SelectTemplateStep = ({
>
{(list, search) => (
<>
<div style={{ paddingLeft: euiTheme.size.l, paddingRight: euiTheme.size.l }}>
<div style={{ paddingLeft: euiTheme.size.s, paddingRight: euiTheme.size.s }}>
{search}
<EuiSpacer size="s" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const VariablePopover: React.FC<Props> = ({ variables, onSelect, variable
}}
listProps={{
showIcons: false,
paddingSize: 's',
}}
>
{(list, search) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export const AgentSelectorDropdown: React.FC<AgentSelectorDropdownProps> = ({
rowHeight: AGENT_OPTION_ROW_HEIGHT,
onFocusBadge: false,
css: selectorListStyles,
paddingSize: 's',
}}
>
{(list) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export const ConnectorSelector: React.FC<{}> = () => {
css: selectorListStyles,
rowHeight: CONNECTOR_OPTION_ROW_HEIGHT,
onFocusBadge: false,
paddingSize: 's',
}}
>
{(list) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('AssigneesFilterPopover', () => {
`You've selected the maximum number of ${MAX_ASSIGNEES_FILTER_LENGTH} assignees`
)
).toBeInTheDocument();
expect(await screen.findByTitle('No assignees')).toHaveAttribute('aria-selected', 'false');
expect(await screen.findByTitle('No assignees')).toHaveAttribute('aria-checked', 'false');
expect(await screen.findByTitle('No assignees')).toHaveAttribute('aria-disabled', 'true');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export function IntegrationsSelector({
placeholder: integrationsSelectorSearchPlaceholder,
compressed: true,
}}
listProps={{ paddingSize: 's' }}
aria-label={integrationsSelectorLabel}
options={integrations}
onChange={onIntegrationsChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export function NamespacesSelector({
placeholder: namespacesSelectorSearchPlaceholder,
compressed: true,
}}
listProps={{ paddingSize: 's' }}
aria-label={namespacesSelectorLabel}
options={namespaces}
onChange={onNamespacesChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export function Selector({
placeholder: searchPlaceholder,
compressed: true,
}}
listProps={{ paddingSize: 's' }}
aria-label={label}
options={options}
onChange={onOptionsChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const DatasetFilter: React.FunctionComponent<{
}
isOpen={isOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiSelectable
options={options}
Expand All @@ -111,7 +111,6 @@ export const DatasetFilter: React.FunctionComponent<{
data-test-subj="agentList.datasetFilterOptions"
isLoading={isLoading}
listProps={{
paddingSize: 's',
style: {
minWidth: 220,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const LogLevelFilter: React.FunctionComponent<{
}
isOpen={isOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiSelectable
options={options}
Expand All @@ -62,9 +62,6 @@ export const LogLevelFilter: React.FunctionComponent<{
});
}}
data-test-subj="agentList.logLevelFilterOptions"
listProps={{
paddingSize: 's',
}}
>
{(list) => list}
</EuiSelectable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,13 @@ export const AgentStatusFilter: React.FC<{
}
isOpen={isStatusFilterOpen}
closePopover={() => updateIsStatusFilterOpen(false)}
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiSelectable
options={options}
onChange={onOptionsChange}
data-test-subj="agentList.agentStatusFilterOptions"
listProps={{
paddingSize: 's',
style: {
minWidth: 140,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const AgentPolicyFilter: React.FunctionComponent<Props> = ({
}
isOpen={isAgentPoliciesFilterOpen}
closePopover={() => setIsAgentPoliciesFilterOpen(false)}
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiSelectable
options={options}
Expand All @@ -98,7 +98,6 @@ export const AgentPolicyFilter: React.FunctionComponent<Props> = ({
}}
data-test-subj="agentList.agentPolicyFilterOptions"
listProps={{
paddingSize: 's',
style: {
minWidth: 200,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const TagsFilter: React.FunctionComponent<Props> = ({
}
isOpen={isTagsFilterOpen}
closePopover={() => setIsTagsFilterOpen(false)}
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiSelectable
options={options}
Expand All @@ -90,7 +90,6 @@ export const TagsFilter: React.FunctionComponent<Props> = ({
}}
data-test-subj="agentList.agentPolicyFilterOptions"
listProps={{
paddingSize: 's',
style: {
minWidth: 140,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const StatusFilter: React.FC<StatusFilterProps> = ({
id={popoverId}
isOpen={isOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiFilterButton
data-test-subj={`${testSubjPrefix}.statusBtn`}
Expand All @@ -91,7 +91,6 @@ export const StatusFilter: React.FC<StatusFilterProps> = ({
options={options}
onChange={onSelectionChange}
listProps={{
paddingSize: 's',
showIcons: true,
style: {
minWidth: 250,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const SortFilter: React.FC = () => {
id="browseIntegrationsSortPopover"
isOpen={isOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiFilterButton
data-test-subj="browseIntegrations.searchBar.sortBtn"
Expand All @@ -148,7 +148,6 @@ const SortFilter: React.FC = () => {
}
}}
listProps={{
paddingSize: 's',
showIcons: false,
}}
>
Expand Down Expand Up @@ -211,7 +210,7 @@ const SetupMethodFilter: React.FC<{
id="browseIntegrationsSetupMethodPopover"
isOpen={isOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiFilterButton
data-test-subj="browseIntegrations.searchBar.setupMethodBtn"
Expand All @@ -235,7 +234,6 @@ const SetupMethodFilter: React.FC<{
options={options}
onChange={onSelectionChange}
listProps={{
paddingSize: 's',
showIcons: true,
style: { minWidth: 250 },
}}
Expand Down Expand Up @@ -307,7 +305,7 @@ const SignalFilter: React.FC<{
id="browseIntegrationsSignalPopover"
isOpen={isOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiFilterButton
data-test-subj="browseIntegrations.searchBar.signalBtn"
Expand All @@ -331,7 +329,6 @@ const SignalFilter: React.FC<{
options={options}
onChange={onSelectionChange}
listProps={{
paddingSize: 's',
showIcons: true,
style: { minWidth: 250 },
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const PlatformSelector: React.FunctionComponent<Props> = ({
}
isOpen={showExtendedPlatforms}
closePopover={() => setShowExtendedPlatforms(false)}
panelPaddingSize="none"
panelPaddingSize="s"
repositionOnScroll={true}
>
<EuiSelectable
Expand All @@ -203,7 +203,7 @@ export const PlatformSelector: React.FunctionComponent<Props> = ({
setShowExtendedPlatforms(false);
}}
css={{ width: 150 }}
listProps={{ paddingSize: 'none', onFocusBadge: false }}
listProps={{ onFocusBadge: false }}
>
{(list) => list}
</EuiSelectable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const ComponentTable: FunctionComponent<Props> = ({
button={button}
isOpen={isPopoverOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiSelectable
allowExclusions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function FilterListButton({ onChange, filters }: Props) {
button={button}
isOpen={isPopoverOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
data-test-subj="filterList"
aria-label="Filter component templates"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function FilterListButton<T extends string>({ onChange, filters }: Props<
button={button}
isOpen={isPopoverOpen}
closePopover={closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
data-test-subj="filterList"
>
<EuiSelectable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export const MappingsFilter: React.FC<Props> = ({
options={
!isAddingFields ? state.filter.selectedOptions : previousState.filter.selectedOptions
}
listProps={{ paddingSize: 's' }}
onChange={(options) => {
if (!isAddingFields) {
setSelectedOptions(options);
Expand Down
Loading
Loading