fis-component 0.1.5 → 0.1.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/dist/cjs/index.js +37 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/MenuSelect/types.d.ts +1 -0
- package/dist/cjs/types/src/utils/text.d.ts +19 -0
- package/dist/esm/index.js +37 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/MenuSelect/types.d.ts +1 -0
- package/dist/esm/types/src/utils/text.d.ts +19 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
@@ -3888,6 +3888,7 @@ interface MenuProps {
|
|
|
3888
3888
|
selectedGroupLabel?: string;
|
|
3889
3889
|
maxHeight?: string | number;
|
|
3890
3890
|
onPopupScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
|
3891
|
+
normalizeTextSearch?: boolean;
|
|
3891
3892
|
}
|
|
3892
3893
|
|
|
3893
3894
|
declare const FISMenuSelect: React__default.FC<MenuProps>;
|