@yselimcan/ui 0.0.6 → 0.0.8

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.
Files changed (236) hide show
  1. package/dist/index100.js +5 -32
  2. package/dist/index101.js +8 -19
  3. package/dist/index102.js +86 -4
  4. package/dist/index103.js +13 -4
  5. package/dist/index104.js +63 -5
  6. package/dist/index105.js +38 -12
  7. package/dist/index106.js +14 -19
  8. package/dist/index107.js +33 -13
  9. package/dist/index108.js +19 -297
  10. package/dist/index109.js +5 -4
  11. package/dist/index110.js +4 -39
  12. package/dist/index111.js +5 -126
  13. package/dist/index112.js +11 -4
  14. package/dist/index113.js +19 -21
  15. package/dist/index114.js +13 -77
  16. package/dist/index115.js +291 -59
  17. package/dist/index116.js +4 -45
  18. package/dist/index117.js +37 -65
  19. package/dist/index118.js +125 -8
  20. package/dist/index119.js +20 -13
  21. package/dist/index120.js +76 -3
  22. package/dist/index121.js +64 -3
  23. package/dist/index122.js +45 -5
  24. package/dist/index123.js +14 -134
  25. package/dist/index124.js +5 -27
  26. package/dist/index125.js +27 -6
  27. package/dist/index127.js +26 -11
  28. package/dist/index128.js +15 -20
  29. package/dist/index129.js +22 -14
  30. package/dist/index130.js +58 -5
  31. package/dist/index131.js +16 -28
  32. package/dist/index132.js +25 -15
  33. package/dist/index133.js +40 -21
  34. package/dist/index134.js +43 -59
  35. package/dist/index135.js +19 -15
  36. package/dist/index136.js +47 -26
  37. package/dist/index137.js +49 -38
  38. package/dist/index138.js +18 -43
  39. package/dist/index139.js +11 -21
  40. package/dist/index140.js +22 -48
  41. package/dist/index141.js +34 -50
  42. package/dist/index142.js +229 -16
  43. package/dist/index143.js +283 -11
  44. package/dist/index144.js +52 -21
  45. package/dist/index145.js +15 -35
  46. package/dist/index146.js +74 -225
  47. package/dist/index147.js +3 -283
  48. package/dist/index148.js +30 -53
  49. package/dist/index149.js +24 -16
  50. package/dist/index150.js +15 -79
  51. package/dist/index151.js +69 -3
  52. package/dist/index152.js +4 -31
  53. package/dist/index153.js +103 -22
  54. package/dist/index154.js +79 -15
  55. package/dist/index155.js +259 -65
  56. package/dist/index156.js +12 -4
  57. package/dist/index157.js +11 -105
  58. package/dist/index158.js +37 -76
  59. package/dist/index159.js +4 -263
  60. package/dist/index160.js +66 -11
  61. package/dist/index161.js +9 -10
  62. package/dist/index162.js +8 -40
  63. package/dist/index163.js +5 -4
  64. package/dist/index164.js +129 -62
  65. package/dist/index165.js +54 -10
  66. package/dist/index166.js +11 -8
  67. package/dist/index167.js +118 -6
  68. package/dist/index168.js +11 -53
  69. package/dist/index169.js +6 -6
  70. package/dist/index17.js +4 -4
  71. package/dist/index170.js +63 -114
  72. package/dist/index171.js +8 -7
  73. package/dist/index172.js +13 -12
  74. package/dist/index173.js +11 -65
  75. package/dist/index174.js +10 -11
  76. package/dist/index175.js +87 -12
  77. package/dist/index176.js +7 -8
  78. package/dist/index177.js +11 -11
  79. package/dist/index178.js +52 -83
  80. package/dist/index179.js +11 -11
  81. package/dist/index18.js +4 -4
  82. package/dist/index180.js +11 -11
  83. package/dist/index181.js +16 -54
  84. package/dist/index182.js +8 -11
  85. package/dist/index183.js +7 -10
  86. package/dist/index184.js +102 -17
  87. package/dist/index185.js +7 -8
  88. package/dist/index186.js +32 -8
  89. package/dist/index187.js +73 -102
  90. package/dist/index188.js +14 -7
  91. package/dist/index189.js +27 -31
  92. package/dist/index19.js +9 -9
  93. package/dist/index190.js +12 -74
  94. package/dist/index191.js +7 -14
  95. package/dist/index192.js +21 -27
  96. package/dist/index193.js +25 -8
  97. package/dist/index194.js +159 -21
  98. package/dist/index195.js +114 -25
  99. package/dist/index196.js +67 -152
  100. package/dist/index197.js +62 -111
  101. package/dist/index198.js +8 -75
  102. package/dist/index199.js +22 -64
  103. package/dist/index20.js +2 -2
  104. package/dist/index200.js +5 -47
  105. package/dist/index201.js +4 -200
  106. package/dist/index202.js +9 -47
  107. package/dist/index203.js +39 -20
  108. package/dist/index204.js +57 -27
  109. package/dist/index205.js +27 -5
  110. package/dist/index206.js +7 -9
  111. package/dist/index207.js +12 -11
  112. package/dist/index208.js +11 -16
  113. package/dist/index209.js +11 -6
  114. package/dist/index21.js +3 -3
  115. package/dist/index210.js +22 -4
  116. package/dist/index211.js +11 -21
  117. package/dist/index212.js +7 -127
  118. package/dist/index213.js +43 -45
  119. package/dist/index214.js +595 -16
  120. package/dist/index215.js +12 -5
  121. package/dist/index216.js +15 -179
  122. package/dist/index217.js +47 -75
  123. package/dist/index218.js +186 -385
  124. package/dist/index219.js +48 -4
  125. package/dist/index22.js +5 -5
  126. package/dist/index220.js +19 -4
  127. package/dist/index221.js +30 -12
  128. package/dist/index222.js +5 -31
  129. package/dist/index223.js +26 -38
  130. package/dist/index224.js +12 -57
  131. package/dist/index225.js +21 -27
  132. package/dist/index226.js +127 -7
  133. package/dist/index227.js +45 -13
  134. package/dist/index228.js +18 -12
  135. package/dist/index229.js +5 -12
  136. package/dist/index23.js +2 -2
  137. package/dist/index230.js +178 -19
  138. package/dist/index231.js +75 -11
  139. package/dist/index232.js +398 -7
  140. package/dist/index233.js +4 -43
  141. package/dist/index234.js +5 -597
  142. package/dist/index235.js +14 -11
  143. package/dist/index236.js +20 -208
  144. package/dist/index237.js +6 -4
  145. package/dist/index238.js +208 -13
  146. package/dist/index239.js +3 -47
  147. package/dist/index24.js +9 -9
  148. package/dist/index240.js +13 -3
  149. package/dist/index241.js +45 -10
  150. package/dist/index242.js +3 -57
  151. package/dist/index243.js +11 -28
  152. package/dist/index244.js +56 -12
  153. package/dist/index245.js +30 -9
  154. package/dist/index246.js +12 -205
  155. package/dist/index247.js +9 -15
  156. package/dist/index248.js +189 -304
  157. package/dist/index249.js +15 -3
  158. package/dist/index250.js +322 -3
  159. package/dist/index251.js +3 -21
  160. package/dist/index252.js +3 -6
  161. package/dist/index253.js +1 -1
  162. package/dist/index256.js +1 -1
  163. package/dist/index257.js +1 -1
  164. package/dist/index260.js +1 -1
  165. package/dist/index261.js +1 -1
  166. package/dist/index262.js +2 -2
  167. package/dist/index264.js +2 -2
  168. package/dist/index28.js +1 -1
  169. package/dist/index29.js +1 -1
  170. package/dist/index30.js +1 -1
  171. package/dist/index31.js +1 -1
  172. package/dist/index32.js +1 -1
  173. package/dist/index33.js +16 -16
  174. package/dist/index34.js +5 -5
  175. package/dist/index35.js +12 -12
  176. package/dist/index36.js +10 -10
  177. package/dist/index37.js +7 -7
  178. package/dist/index38.js +8 -8
  179. package/dist/index39.js +4 -4
  180. package/dist/index40.js +2 -2
  181. package/dist/index41.js +2 -2
  182. package/dist/index42.js +2 -2
  183. package/dist/index43.js +1 -1
  184. package/dist/index45.js +5 -5
  185. package/dist/index46.js +9 -9
  186. package/dist/index47.js +9 -9
  187. package/dist/index48.js +18 -18
  188. package/dist/index49.js +4 -4
  189. package/dist/index50.js +11 -11
  190. package/dist/index51.js +1 -1
  191. package/dist/index52.js +24 -24
  192. package/dist/index53.js +3 -3
  193. package/dist/index54.js +30 -30
  194. package/dist/index55.js +13 -13
  195. package/dist/index56.js +12 -12
  196. package/dist/index57.js +1 -1
  197. package/dist/index58.js +2 -2
  198. package/dist/index59.js +5 -5
  199. package/dist/index60.js +11 -11
  200. package/dist/index61.js +4 -4
  201. package/dist/index62.js +3 -3
  202. package/dist/index63.js +11 -11
  203. package/dist/index64.js +4 -4
  204. package/dist/index65.js +3 -3
  205. package/dist/index66.js +13 -13
  206. package/dist/index68.js +1 -1
  207. package/dist/index69.js +31 -31
  208. package/dist/index70.js +5 -5
  209. package/dist/index71.js +16 -16
  210. package/dist/index72.js +22 -22
  211. package/dist/index73.js +7 -7
  212. package/dist/index74.js +1 -1
  213. package/dist/index75.js +12 -12
  214. package/dist/index76.js +2 -2
  215. package/dist/index77.js +4 -4
  216. package/dist/index78.js +2 -2
  217. package/dist/index79.js +1 -1
  218. package/dist/index80.js +1 -1
  219. package/dist/index81.js +17 -17
  220. package/dist/index82.js +4 -4
  221. package/dist/index83.js +4 -4
  222. package/dist/index87.js +7 -7
  223. package/dist/index88.js +9 -9
  224. package/dist/index89.js +19 -90
  225. package/dist/index90.js +15 -18
  226. package/dist/index91.js +33 -16
  227. package/dist/index92.js +12 -33
  228. package/dist/index93.js +90 -12
  229. package/dist/index94.js +4 -7
  230. package/dist/index95.js +65 -86
  231. package/dist/index96.js +8 -12
  232. package/dist/index97.js +12 -61
  233. package/dist/index98.js +4 -38
  234. package/dist/index99.js +4 -14
  235. package/dist/styles.css +1 -1
  236. package/package.json +7 -4
package/dist/index202.js CHANGED
@@ -1,50 +1,12 @@
1
- import i from "./index112.js";
2
- class a {
3
- constructor() {
4
- this.elements = /* @__PURE__ */ new Set(), this.idMap = /* @__PURE__ */ new Map();
5
- }
6
- /**
7
- * Adds a trigger element with the given ID.
8
- *
9
- * Note: The provided element is assumed to not be registered under multiple IDs.
10
- */
11
- add(e, t) {
12
- const s = this.idMap.get(e);
13
- if (s !== t && (s !== void 0 && this.elements.delete(s), this.elements.add(t), this.idMap.set(e, t), process.env.NODE_ENV !== "production" && this.elements.size !== this.idMap.size))
14
- throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap." : i(87));
15
- }
16
- /**
17
- * Removes the trigger element with the given ID.
18
- */
19
- delete(e) {
20
- const t = this.idMap.get(e);
21
- t && (this.elements.delete(t), this.idMap.delete(e));
22
- }
23
- /**
24
- * Whether the given element is registered as a trigger.
25
- */
26
- hasElement(e) {
27
- return this.elements.has(e);
28
- }
29
- /**
30
- * Whether there is a registered trigger element matching the given predicate.
31
- */
32
- hasMatchingElement(e) {
33
- for (const t of this.elements)
34
- if (e(t))
35
- return !0;
36
- return !1;
37
- }
38
- getById(e) {
39
- return this.idMap.get(e);
40
- }
41
- entries() {
42
- return this.idMap.entries();
43
- }
44
- get size() {
45
- return this.idMap.size;
46
- }
1
+ function n(e, t) {
2
+ return {
3
+ ...e,
4
+ state: {
5
+ ...e.state,
6
+ valid: !t && e.state.valid
7
+ }
8
+ };
47
9
  }
48
10
  export {
49
- a as PopupTriggerMap
11
+ n as getCombinedFieldValidityData
50
12
  };
package/dist/index203.js CHANGED
@@ -1,22 +1,41 @@
1
- import t from "./index112.js";
2
- import { createSelectorCreator as s, lruMemoize as i } from "./index248.js";
3
- s({
4
- memoize: i,
5
- memoizeOptions: {
6
- maxSize: 1,
7
- equalityCheck: Object.is
8
- }
9
- });
10
- const u = (e, m, c, n, l, p, ...o) => {
11
- if (o.length > 0)
12
- throw new Error(process.env.NODE_ENV !== "production" ? "Unsupported number of selectors" : t(1));
13
- let r;
14
- if (e)
15
- r = e;
16
- else
17
- throw new Error("Missing arguments");
18
- return r;
19
- };
1
+ import e from "./index94.js";
2
+ import * as t from "react";
3
+ const n = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (n.displayName = "ComboboxRootContext");
5
+ const s = /* @__PURE__ */ t.createContext(void 0);
6
+ process.env.NODE_ENV !== "production" && (s.displayName = "ComboboxFloatingContext");
7
+ const r = /* @__PURE__ */ t.createContext(void 0);
8
+ process.env.NODE_ENV !== "production" && (r.displayName = "ComboboxDerivedItemsContext");
9
+ const i = /* @__PURE__ */ t.createContext("");
10
+ process.env.NODE_ENV !== "production" && (i.displayName = "ComboboxInputValueContext");
11
+ function b() {
12
+ const o = t.useContext(n);
13
+ if (!o)
14
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>." : e(22));
15
+ return o;
16
+ }
17
+ function C() {
18
+ const o = t.useContext(s);
19
+ if (!o)
20
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>." : e(23));
21
+ return o;
22
+ }
23
+ function m() {
24
+ const o = t.useContext(r);
25
+ if (!o)
26
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>." : e(24));
27
+ return o;
28
+ }
29
+ function c() {
30
+ return t.useContext(i);
31
+ }
20
32
  export {
21
- u as createSelector
33
+ r as ComboboxDerivedItemsContext,
34
+ s as ComboboxFloatingContext,
35
+ i as ComboboxInputValueContext,
36
+ n as ComboboxRootContext,
37
+ m as useComboboxDerivedItemsContext,
38
+ C as useComboboxFloatingContext,
39
+ c as useComboboxInputValueContext,
40
+ b as useComboboxRootContext
22
41
  };
package/dist/index204.js CHANGED
@@ -1,29 +1,59 @@
1
- "use client";
2
- import * as l from "react-dom";
3
- import { useAnimationFrame as m } from "./index164.js";
4
- import { useStableCallback as u } from "./index124.js";
5
- import { resolveRef as c } from "./index240.js";
6
- function S(s, f = !1, a = !0) {
7
- const i = m();
8
- return u((r, t = null) => {
9
- i.cancel();
10
- const e = c(s);
11
- e != null && (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED ? r() : i.request(() => {
12
- function o() {
13
- e && Promise.all(e.getAnimations().map((n) => n.finished)).then(() => {
14
- t != null && t.aborted || l.flushSync(r);
15
- }).catch(() => {
16
- if (a) {
17
- if (t != null && t.aborted)
18
- return;
19
- l.flushSync(r);
20
- } else e.getAnimations().length > 0 && e.getAnimations().some((n) => n.pending || n.playState !== "finished") && o();
21
- });
22
- }
23
- f ? i.request(o) : o();
24
- }));
25
- });
26
- }
1
+ import { compareItemEquality as l } from "./index138.js";
2
+ import { createSelector as t } from "./index220.js";
3
+ const u = {
4
+ id: t((e) => e.id),
5
+ query: t((e) => e.query),
6
+ items: t((e) => e.items),
7
+ selectedValue: t((e) => e.selectedValue),
8
+ open: t((e) => e.open),
9
+ mounted: t((e) => e.mounted),
10
+ forceMounted: t((e) => e.forceMounted),
11
+ inline: t((e) => e.inline),
12
+ activeIndex: t((e) => e.activeIndex),
13
+ selectedIndex: t((e) => e.selectedIndex),
14
+ isActive: t((e, i) => e.activeIndex === i),
15
+ isSelected: t((e, i) => {
16
+ const n = e.isItemEqualToValue, o = e.selectedValue;
17
+ return Array.isArray(o) ? o.some((p) => l(p, i, n)) : l(o, i, n);
18
+ }),
19
+ transitionStatus: t((e) => e.transitionStatus),
20
+ popupProps: t((e) => e.popupProps),
21
+ inputProps: t((e) => e.inputProps),
22
+ triggerProps: t((e) => e.triggerProps),
23
+ getItemProps: t((e) => e.getItemProps),
24
+ positionerElement: t((e) => e.positionerElement),
25
+ listElement: t((e) => e.listElement),
26
+ triggerElement: t((e) => e.triggerElement),
27
+ inputElement: t((e) => e.inputElement),
28
+ popupSide: t((e) => e.popupSide),
29
+ openMethod: t((e) => e.openMethod),
30
+ inputInsidePopup: t((e) => e.inputInsidePopup),
31
+ selectionMode: t((e) => e.selectionMode),
32
+ listRef: t((e) => e.listRef),
33
+ labelsRef: t((e) => e.labelsRef),
34
+ popupRef: t((e) => e.popupRef),
35
+ emptyRef: t((e) => e.emptyRef),
36
+ inputRef: t((e) => e.inputRef),
37
+ keyboardActiveRef: t((e) => e.keyboardActiveRef),
38
+ chipsContainerRef: t((e) => e.chipsContainerRef),
39
+ clearRef: t((e) => e.clearRef),
40
+ valuesRef: t((e) => e.valuesRef),
41
+ allValuesRef: t((e) => e.allValuesRef),
42
+ name: t((e) => e.name),
43
+ disabled: t((e) => e.disabled),
44
+ readOnly: t((e) => e.readOnly),
45
+ required: t((e) => e.required),
46
+ grid: t((e) => e.grid),
47
+ isGrouped: t((e) => e.isGrouped),
48
+ virtualized: t((e) => e.virtualized),
49
+ onOpenChangeComplete: t((e) => e.onOpenChangeComplete),
50
+ openOnInputClick: t((e) => e.openOnInputClick),
51
+ itemToStringLabel: t((e) => e.itemToStringLabel),
52
+ isItemEqualToValue: t((e) => e.isItemEqualToValue),
53
+ modal: t((e) => e.modal),
54
+ autoHighlight: t((e) => e.autoHighlight),
55
+ submitOnItemClick: t((e) => e.submitOnItemClick)
56
+ };
27
57
  export {
28
- S as useAnimationsFinished
58
+ u as selectors
29
59
  };
package/dist/index205.js CHANGED
@@ -1,8 +1,30 @@
1
- import * as t from "react";
2
- const e = parseInt(t.version, 10);
3
- function o(r) {
4
- return e >= r;
1
+ import { isAndroid as r, isJSDOM as o } from "./index158.js";
2
+ function s(i) {
3
+ i.preventDefault(), i.stopPropagation();
4
+ }
5
+ function e(i) {
6
+ return "nativeEvent" in i;
7
+ }
8
+ function p(i) {
9
+ return i.mozInputSource === 0 && i.isTrusted ? !0 : r && i.pointerType ? i.type === "click" && i.buttons === 1 : i.detail === 0 && !i.pointerType;
10
+ }
11
+ function c(i) {
12
+ return o ? !1 : !r && i.width === 0 && i.height === 0 || r && i.width === 1 && i.height === 1 && i.pressure === 0 && i.detail === 0 && i.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
13
+ i.width < 1 && i.height < 1 && i.pressure === 0 && i.detail === 0 && i.pointerType === "touch";
14
+ }
15
+ function d(i, t) {
16
+ const u = ["mouse", "pen"];
17
+ return t || u.push("", void 0), u.includes(i);
18
+ }
19
+ function f(i) {
20
+ const t = i.type;
21
+ return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
5
22
  }
6
23
  export {
7
- o as isReactVersionAtLeast
24
+ f as isClickLikeEvent,
25
+ d as isMouseLikePointerType,
26
+ e as isReactEvent,
27
+ p as isVirtualClick,
28
+ c as isVirtualPointerEvent,
29
+ s as stopEvent
8
30
  };
package/dist/index206.js CHANGED
@@ -1,12 +1,10 @@
1
- function n(e, t) {
2
- return {
3
- ...e,
4
- state: {
5
- ...e.state,
6
- valid: !t && e.state.valid
7
- }
8
- };
1
+ import * as o from "react";
2
+ const t = /* @__PURE__ */ o.createContext(void 0);
3
+ process.env.NODE_ENV !== "production" && (t.displayName = "ComboboxChipsContext");
4
+ function e() {
5
+ return o.useContext(t);
9
6
  }
10
7
  export {
11
- n as getCombinedFieldValidityData
8
+ t as ComboboxChipsContext,
9
+ e as useComboboxChipsContext
12
10
  };
package/dist/index207.js CHANGED
@@ -1,14 +1,15 @@
1
- function t(r) {
2
- if (r == null)
3
- return "";
4
- if (typeof r == "string")
5
- return r;
6
- try {
7
- return JSON.stringify(r);
8
- } catch {
9
- return String(r);
10
- }
1
+ "use client";
2
+ import r from "./index94.js";
3
+ import * as e from "react";
4
+ const t = /* @__PURE__ */ e.createContext(void 0);
5
+ process.env.NODE_ENV !== "production" && (t.displayName = "ComboboxPositionerContext");
6
+ function s(n) {
7
+ const o = e.useContext(t);
8
+ if (o === void 0 && !n)
9
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component" : r(21));
10
+ return o;
11
11
  }
12
12
  export {
13
- t as serializeValue
13
+ t as ComboboxPositionerContext,
14
+ s as useComboboxPositionerContext
14
15
  };
package/dist/index208.js CHANGED
@@ -1,19 +1,14 @@
1
- import * as n from "react";
2
- function e(i) {
3
- const o = n.useRef(""), c = n.useCallback((r) => {
4
- r.defaultPrevented || (o.current = r.pointerType, i(r, r.pointerType));
5
- }, [i]);
6
- return {
7
- onClick: n.useCallback((r) => {
8
- if (r.detail === 0) {
9
- i(r, "keyboard");
10
- return;
11
- }
12
- "pointerType" in r && i(r, r.pointerType), i(r, o.current), o.current = "";
13
- }, [i]),
14
- onPointerDown: c
15
- };
1
+ import r from "./index94.js";
2
+ import * as t from "react";
3
+ const e = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (e.displayName = "ComboboxPortalContext");
5
+ function s() {
6
+ const o = t.useContext(e);
7
+ if (o === void 0)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Combobox.Portal> is missing." : r(20));
9
+ return o;
16
10
  }
17
11
  export {
18
- e as useEnhancedClickHandler
12
+ e as ComboboxPortalContext,
13
+ s as useComboboxPortalContext
19
14
  };
package/dist/index209.js CHANGED
@@ -1,9 +1,14 @@
1
- "use client";
2
- import * as e from "react";
3
- const n = [];
4
- function o(t) {
5
- e.useEffect(t, n);
1
+ import r from "./index94.js";
2
+ import * as t from "react";
3
+ const e = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (e.displayName = "ComboboxGroupContext");
5
+ function s() {
6
+ const o = t.useContext(e);
7
+ if (o === void 0)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>." : r(18));
9
+ return o;
6
10
  }
7
11
  export {
8
- o as useOnMount
12
+ e as ComboboxGroupContext,
13
+ s as useComboboxGroupContext
9
14
  };
package/dist/index21.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import * as s from "react";
3
- import { useDialogRootContext as d } from "./index96.js";
3
+ import { useDialogRootContext as d } from "./index103.js";
4
4
  import { useRenderElement as m } from "./index87.js";
5
- import { popupStateMapping as l } from "./index98.js";
6
- import { transitionStatusMapping as f } from "./index99.js";
5
+ import { popupStateMapping as l } from "./index105.js";
6
+ import { transitionStatusMapping as f } from "./index106.js";
7
7
  const S = {
8
8
  ...l,
9
9
  ...f
package/dist/index210.js CHANGED
@@ -1,6 +1,24 @@
1
- let a = /* @__PURE__ */ (function(d) {
2
- return d.disabled = "data-disabled", d.valid = "data-valid", d.invalid = "data-invalid", d.touched = "data-touched", d.dirty = "data-dirty", d.filled = "data-filled", d.focused = "data-focused", d;
3
- })({});
1
+ "use client";
2
+ import * as o from "react";
3
+ import { jsx as i } from "react/jsx-runtime";
4
+ const e = /* @__PURE__ */ o.createContext(null);
5
+ process.env.NODE_ENV !== "production" && (e.displayName = "GroupCollectionContext");
6
+ function u() {
7
+ return o.useContext(e);
8
+ }
9
+ function s(n) {
10
+ const {
11
+ children: r,
12
+ items: t
13
+ } = n, c = o.useMemo(() => ({
14
+ items: t
15
+ }), [t]);
16
+ return /* @__PURE__ */ i(e.Provider, {
17
+ value: c,
18
+ children: r
19
+ });
20
+ }
4
21
  export {
5
- a as FieldControlDataAttributes
22
+ s as GroupCollectionProvider,
23
+ u as useGroupCollectionContext
6
24
  };
package/dist/index211.js CHANGED
@@ -1,24 +1,14 @@
1
- "use client";
2
- import * as e from "react";
3
- const t = /* @__PURE__ */ e.createContext({
4
- register: () => {
5
- },
6
- unregister: () => {
7
- },
8
- subscribeMapChange: () => () => {
9
- },
10
- elementsRef: {
11
- current: []
12
- },
13
- nextIndexRef: {
14
- current: 0
15
- }
16
- });
17
- process.env.NODE_ENV !== "production" && (t.displayName = "CompositeListContext");
18
- function n() {
19
- return e.useContext(t);
1
+ import n from "./index94.js";
2
+ import * as t from "react";
3
+ const e = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (e.displayName = "ComboboxItemContext");
5
+ function m() {
6
+ const o = t.useContext(e);
7
+ if (!o)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>." : n(19));
9
+ return o;
20
10
  }
21
11
  export {
22
- t as CompositeListContext,
23
- n as useCompositeListContext
12
+ e as ComboboxItemContext,
13
+ m as useComboboxItemContext
24
14
  };
package/dist/index212.js CHANGED
@@ -1,130 +1,10 @@
1
- const j = ["top", "right", "bottom", "left"], m = Math.min, p = Math.max, C = Math.round, L = Math.floor, E = (t) => ({
2
- x: t,
3
- y: t
4
- }), h = {
5
- left: "right",
6
- right: "left",
7
- bottom: "top",
8
- top: "bottom"
9
- }, x = {
10
- start: "end",
11
- end: "start"
12
- };
13
- function R(t, e, n) {
14
- return p(t, m(e, n));
15
- }
16
- function T(t, e) {
17
- return typeof t == "function" ? t(e) : t;
18
- }
19
- function g(t) {
20
- return t.split("-")[0];
21
- }
22
- function a(t) {
23
- return t.split("-")[1];
24
- }
25
- function b(t) {
26
- return t === "x" ? "y" : "x";
27
- }
28
- function d(t) {
29
- return t === "y" ? "height" : "width";
30
- }
31
- const A = /* @__PURE__ */ new Set(["top", "bottom"]);
32
- function P(t) {
33
- return A.has(g(t)) ? "y" : "x";
34
- }
35
- function y(t) {
36
- return b(P(t));
37
- }
38
- function k(t, e, n) {
39
- n === void 0 && (n = !1);
40
- const r = a(t), i = y(t), o = d(i);
41
- let c = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
42
- return e.reference[o] > e.floating[o] && (c = f(c)), [c, f(c)];
43
- }
44
- function q(t) {
45
- const e = f(t);
46
- return [s(t), e, s(e)];
47
- }
48
- function s(t) {
49
- return t.replace(/start|end/g, (e) => x[e]);
50
- }
51
- const u = ["left", "right"], l = ["right", "left"], M = ["top", "bottom"], O = ["bottom", "top"];
52
- function S(t, e, n) {
53
- switch (t) {
54
- case "top":
55
- case "bottom":
56
- return n ? e ? l : u : e ? u : l;
57
- case "left":
58
- case "right":
59
- return e ? M : O;
60
- default:
61
- return [];
62
- }
63
- }
64
- function z(t, e, n, r) {
65
- const i = a(t);
66
- let o = S(g(t), n === "start", r);
67
- return i && (o = o.map((c) => c + "-" + i), e && (o = o.concat(o.map(s)))), o;
68
- }
69
- function f(t) {
70
- return t.replace(/left|right|bottom|top/g, (e) => h[e]);
71
- }
72
- function w(t) {
73
- return {
74
- top: 0,
75
- right: 0,
76
- bottom: 0,
77
- left: 0,
78
- ...t
79
- };
80
- }
81
- function B(t) {
82
- return typeof t != "number" ? w(t) : {
83
- top: t,
84
- right: t,
85
- bottom: t,
86
- left: t
87
- };
88
- }
89
- function D(t) {
90
- const {
91
- x: e,
92
- y: n,
93
- width: r,
94
- height: i
95
- } = t;
96
- return {
97
- width: r,
98
- height: i,
99
- top: n,
100
- left: e,
101
- right: e + r,
102
- bottom: n + i,
103
- x: e,
104
- y: n
105
- };
1
+ import * as o from "react";
2
+ const t = /* @__PURE__ */ o.createContext(!1);
3
+ process.env.NODE_ENV !== "production" && (t.displayName = "ComboboxRowContext");
4
+ function e() {
5
+ return o.useContext(t);
106
6
  }
107
7
  export {
108
- R as clamp,
109
- E as createCoords,
110
- T as evaluate,
111
- w as expandPaddingObject,
112
- L as floor,
113
- a as getAlignment,
114
- y as getAlignmentAxis,
115
- k as getAlignmentSides,
116
- d as getAxisLength,
117
- q as getExpandedPlacements,
118
- s as getOppositeAlignmentPlacement,
119
- b as getOppositeAxis,
120
- z as getOppositeAxisPlacements,
121
- f as getOppositePlacement,
122
- B as getPaddingObject,
123
- g as getSide,
124
- P as getSideAxis,
125
- p as max,
126
- m as min,
127
- D as rectToClientRect,
128
- C as round,
129
- j as sides
8
+ t as ComboboxRowContext,
9
+ e as useComboboxRowContext
130
10
  };
package/dist/index213.js CHANGED
@@ -1,47 +1,45 @@
1
- import { evaluate as W, getPaddingObject as Y, getAlignmentAxis as k, getAlignment as q, clamp as B, getAxisLength as C } from "./index212.js";
2
- const F = (s) => ({
3
- name: "arrow",
4
- options: s,
5
- async fn(i) {
6
- const {
7
- x: y,
8
- y: j,
9
- placement: x,
10
- rects: n,
11
- platform: f,
12
- elements: l,
13
- middlewareData: M
14
- } = i, {
15
- element: g,
16
- padding: v = 0,
17
- offsetParent: z = "real"
18
- } = W(s, i) || {};
19
- if (g == null)
20
- return {};
21
- const h = Y(v), m = {
22
- x: y,
23
- y: j
24
- }, t = k(x), e = C(t), r = await f.getDimensions(g), d = t === "y", E = d ? "top" : "left", H = d ? "bottom" : "right", A = d ? "clientHeight" : "clientWidth", L = n.reference[e] + n.reference[t] - m[t] - n.floating[e], R = m[t] - n.reference[t], S = z === "real" ? await f.getOffsetParent?.(g) : l.floating;
25
- let a = l.floating[A] || n.floating[e];
26
- (!a || !await f.isElement?.(S)) && (a = l.floating[A] || n.floating[e]);
27
- const T = L / 2 - R / 2, O = a / 2 - r[e] / 2 - 1, u = Math.min(h[E], O), b = Math.min(h[H], O), c = u, D = a - r[e] - b, o = a / 2 - r[e] / 2 + T, P = B(c, o, D), p = !M.arrow && q(x) != null && o !== P && n.reference[e] / 2 - (o < c ? u : b) - r[e] / 2 < 0, w = p ? o < c ? o - c : o - D : 0;
28
- return {
29
- [t]: m[t] + w,
30
- data: {
31
- [t]: P,
32
- centerOffset: o - P - w,
33
- ...p && {
34
- alignmentOffset: w
35
- }
36
- },
37
- reset: p
38
- };
39
- }
40
- }), I = (s, i) => ({
41
- ...F(s),
42
- options: [s, i]
43
- });
1
+ "use client";
2
+ import "react";
3
+ import { stringifyAsLabel as l } from "./index137.js";
4
+ const f = /* @__PURE__ */ new Map();
5
+ function h(e) {
6
+ return Array.isArray(e) ? e.map((c) => h(c)).join(",") : e == null ? "" : String(e);
7
+ }
8
+ function m(e = {}) {
9
+ const c = {
10
+ usage: "search",
11
+ sensitivity: "base",
12
+ ignorePunctuation: !0,
13
+ ...e
14
+ }, a = `${h(e.locale)}|${JSON.stringify(c)}`, g = f.get(a);
15
+ if (g)
16
+ return g;
17
+ const o = new Intl.Collator(e.locale, c), u = {
18
+ contains(i, t, s) {
19
+ if (!t)
20
+ return !0;
21
+ const n = l(i, s);
22
+ for (let r = 0; r <= n.length - t.length; r += 1)
23
+ if (o.compare(n.slice(r, r + t.length), t) === 0)
24
+ return !0;
25
+ return !1;
26
+ },
27
+ startsWith(i, t, s) {
28
+ if (!t)
29
+ return !0;
30
+ const n = l(i, s);
31
+ return o.compare(n.slice(0, t.length), t) === 0;
32
+ },
33
+ endsWith(i, t, s) {
34
+ if (!t)
35
+ return !0;
36
+ const n = l(i, s), r = t.length;
37
+ return n.length >= r && o.compare(n.slice(n.length - r), t) === 0;
38
+ }
39
+ };
40
+ return f.set(a, u), u;
41
+ }
42
+ const d = m;
44
43
  export {
45
- I as arrow,
46
- F as baseArrow
44
+ d as useCoreFilter
47
45
  };