fis-component 0.1.5 → 0.1.7
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/cjs/index.js +44 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/MenuSelect/types.d.ts +2 -0
- package/dist/cjs/types/src/utils/text.d.ts +19 -0
- package/dist/esm/index.js +44 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/MenuSelect/types.d.ts +2 -0
- package/dist/esm/types/src/utils/text.d.ts +19 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -30,7 +30,9 @@ export interface MenuProps {
|
|
|
30
30
|
removeSelectedText?: string;
|
|
31
31
|
selectedGroupLabel?: string;
|
|
32
32
|
maxHeight?: string | number;
|
|
33
|
+
focusSearchInput?: boolean;
|
|
33
34
|
onPopupScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
|
35
|
+
normalizeTextSearch?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export interface MenuState {
|
|
36
38
|
search: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes a text value by:
|
|
3
|
+
* - Removing all diacritic marks (e.g. Vietnamese accents)
|
|
4
|
+
* - Converting the result to lowercase
|
|
5
|
+
* - Trimming leading and trailing whitespace
|
|
6
|
+
*
|
|
7
|
+
* This is useful for case-insensitive and accent-insensitive text comparisons
|
|
8
|
+
* or searches, especially for languages that use diacritics.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* normalizeText("Công nghệ thông tin"); // "cong nghe thong tin"
|
|
13
|
+
* normalizeText(""); // ""
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param value - The input text to normalize. If falsy, an empty string is returned.
|
|
17
|
+
* @returns The normalized, accent-stripped, lowercase, and trimmed string.
|
|
18
|
+
*/
|
|
19
|
+
export declare const normalizeText: (value: string) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -3887,7 +3887,9 @@ interface MenuProps {
|
|
|
3887
3887
|
removeSelectedText?: string;
|
|
3888
3888
|
selectedGroupLabel?: string;
|
|
3889
3889
|
maxHeight?: string | number;
|
|
3890
|
+
focusSearchInput?: boolean;
|
|
3890
3891
|
onPopupScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
|
3892
|
+
normalizeTextSearch?: boolean;
|
|
3891
3893
|
}
|
|
3892
3894
|
|
|
3893
3895
|
declare const FISMenuSelect: React__default.FC<MenuProps>;
|