@muraldevkit/ui-toolkit 4.29.0 → 4.31.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/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +27 -0
- package/dist/components/form/select/components/MrlSelectClearIndicator.d.ts +9 -0
- package/dist/components/form/select/components/index.d.ts +1 -0
- package/dist/components/form/select/index.d.ts +2 -0
- package/dist/components/form/select/utils/closeMenuOnScroll.d.ts +10 -0
- package/dist/components/form/select/utils/index.d.ts +1 -0
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CreatableProps } from 'react-select/creatable';
|
|
3
|
+
import { GroupBase } from 'react-select';
|
|
4
|
+
import { SelectKind } from '../types';
|
|
5
|
+
export interface MrlCreatableSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends CreatableProps<Option, IsMulti, Group> {
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
isReadOnly?: boolean;
|
|
8
|
+
kind?: SelectKind;
|
|
9
|
+
/**
|
|
10
|
+
* The data-qa prefix, it will be used to add data-qa attributes to different sub components of the MrlCreatableSelect component.
|
|
11
|
+
*
|
|
12
|
+
* Available subcomponents:
|
|
13
|
+
* - container, <data-qa-prefix>-container
|
|
14
|
+
* - value-container, <data-qa-prefix>-value-container
|
|
15
|
+
*/
|
|
16
|
+
['data-qa']?: string;
|
|
17
|
+
showClearIndicatorIcon?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const CREATABLE_SELECT_CLASS_NAME_PREFIX = "MrlCreatableSelect";
|
|
20
|
+
export declare const CREATABLE_SELECT_MENU_LIST_CLASS_NAME: string;
|
|
21
|
+
/**
|
|
22
|
+
* MrlCreatableSelect component that supports creating extra options with user input. Option creating could be async too.
|
|
23
|
+
*
|
|
24
|
+
* @param props - the component props
|
|
25
|
+
* @returns the select component
|
|
26
|
+
*/
|
|
27
|
+
export declare function MrlCreatableSelect<T>(props: MrlCreatableSelectProps<T>): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClearIndicatorProps } from 'react-select';
|
|
3
|
+
/**
|
|
4
|
+
* MrlSelectClearIndicator component
|
|
5
|
+
*
|
|
6
|
+
* @param props the react-select clear indicator props
|
|
7
|
+
* @returns the select clear indicator
|
|
8
|
+
*/
|
|
9
|
+
export declare function MrlSelectClearIndicator<T>(props: ClearIndicatorProps<T>): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluates the scroll event target with a given class name to prevent closing the select menu when
|
|
3
|
+
* it renders inside a scrollable container.
|
|
4
|
+
* if the scroll event target contains the provided class, the function return `false` to keep the menu open.
|
|
5
|
+
* In most scenarios, `className` will be the class name of the select menu list.
|
|
6
|
+
*
|
|
7
|
+
* @param className - The class name to check against the target element's class list.
|
|
8
|
+
* @returns An event handler function that takes an event as an argument
|
|
9
|
+
*/
|
|
10
|
+
export declare function closeMenuOnScroll(className: string): (e: Event) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './closeMenuOnScroll';
|