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.
@@ -31,6 +31,7 @@ export interface MenuProps {
31
31
  selectedGroupLabel?: string;
32
32
  maxHeight?: string | number;
33
33
  onPopupScroll?: (e: React.UIEvent<HTMLElement>) => void;
34
+ normalizeTextSearch?: boolean;
34
35
  }
35
36
  export interface MenuState {
36
37
  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
@@ -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>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "https://vietdiemtran.github.io/fis-component/",
3
3
  "name": "fis-component",
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",