@arun-dev/headless 4.14.0 → 4.16.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/chunk-ETNICT5M.js +8 -0
- package/dist/combobox/index.cjs +3 -1
- package/dist/combobox/index.js +7 -7
- package/dist/menu/index.cjs +509 -33
- package/dist/menu/index.d.cts +216 -20
- package/dist/menu/index.d.ts +216 -20
- package/dist/menu/index.js +509 -37
- package/package.json +1 -1
package/dist/combobox/index.cjs
CHANGED
|
@@ -133,10 +133,12 @@ function useControlled({
|
|
|
133
133
|
return [value, setValue];
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
// src/
|
|
136
|
+
// src/core/fold.ts
|
|
137
137
|
function fold(text) {
|
|
138
138
|
return text.normalize("NFD").replace(/\p{M}/gu, "").toLocaleLowerCase();
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
// src/combobox/defaultFilter.ts
|
|
140
142
|
function defaultFilter(items, query, itemToString) {
|
|
141
143
|
const needle = fold(query.trim());
|
|
142
144
|
if (needle === "") return [...items];
|
package/dist/combobox/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
anchoredPopupStyle
|
|
5
|
-
} from "../chunk-HCOCPQXS.js";
|
|
2
|
+
fold
|
|
3
|
+
} from "../chunk-ETNICT5M.js";
|
|
6
4
|
import {
|
|
7
5
|
byDocumentOrder,
|
|
8
6
|
rovingIndex
|
|
9
7
|
} from "../chunk-2S4XG4VD.js";
|
|
8
|
+
import {
|
|
9
|
+
anchorNameFor,
|
|
10
|
+
anchoredDataAttributes,
|
|
11
|
+
anchoredPopupStyle
|
|
12
|
+
} from "../chunk-HCOCPQXS.js";
|
|
10
13
|
import {
|
|
11
14
|
useControlled
|
|
12
15
|
} from "../chunk-UEIB3I3T.js";
|
|
@@ -40,9 +43,6 @@ __export(index_parts_exports, {
|
|
|
40
43
|
import { useCallback, useDeferredValue, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
41
44
|
|
|
42
45
|
// src/combobox/defaultFilter.ts
|
|
43
|
-
function fold(text) {
|
|
44
|
-
return text.normalize("NFD").replace(/\p{M}/gu, "").toLocaleLowerCase();
|
|
45
|
-
}
|
|
46
46
|
function defaultFilter(items, query, itemToString) {
|
|
47
47
|
const needle = fold(query.trim());
|
|
48
48
|
if (needle === "") return [...items];
|