@equinor/echo-components 0.12.5 → 0.12.6
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/package.json
CHANGED
|
@@ -47,6 +47,7 @@ export * from './secondaryMarker/SecondaryMarker';
|
|
|
47
47
|
export * from './secondaryMarker/SecondaryMarkerExpander';
|
|
48
48
|
export * from './secondaryMarker/SecondaryMarkerWithChip';
|
|
49
49
|
export * from './secondaryMarker/SecondaryMarkerWrapper';
|
|
50
|
+
export * from './selectTextOnFocusAutocomplete/SelectTextOnFocusAutocomplete';
|
|
50
51
|
export * from './sidebarButton/SidebarButton';
|
|
51
52
|
export * from './sidesheet';
|
|
52
53
|
export * from './splitView';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Autocomplete } from '@equinor/eds-core-react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface SelectTextOnFocusAutocompleteProps<T> extends Omit<React.ComponentProps<typeof Autocomplete<T>>, 'ref'> {
|
|
4
|
+
ariaPressed?: boolean;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
wrapperClassName?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A reusable component that wraps the EDS Autocomplete in a button.
|
|
11
|
+
* When the button is clicked or activated with keyboard (Enter/Space),
|
|
12
|
+
* the input inside the Autocomplete is automatically focused and its text is selected.
|
|
13
|
+
*
|
|
14
|
+
* @template T - The type of the Autocomplete options.
|
|
15
|
+
* @param props - All Autocomplete props (except 'ref'), plus optional ariaPressed, style, and className for the button.
|
|
16
|
+
* @returns A button-wrapped Autocomplete with auto-select-on-focus behavior.
|
|
17
|
+
*/
|
|
18
|
+
export declare function SelectTextOnFocusAutocomplete<T>(props: Readonly<SelectTextOnFocusAutocompleteProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|