@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.
@@ -0,0 +1,8 @@
1
+ // src/core/fold.ts
2
+ function fold(text) {
3
+ return text.normalize("NFD").replace(/\p{M}/gu, "").toLocaleLowerCase();
4
+ }
5
+
6
+ export {
7
+ fold
8
+ };
@@ -133,10 +133,12 @@ function useControlled({
133
133
  return [value, setValue];
134
134
  }
135
135
 
136
- // src/combobox/defaultFilter.ts
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];
@@ -1,12 +1,15 @@
1
1
  import {
2
- anchorNameFor,
3
- anchoredDataAttributes,
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];