@yselimcan/ui 0.0.1 → 0.0.3

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 (267) hide show
  1. package/dist/index.d.ts +231 -1
  2. package/dist/index.js +100 -15331
  3. package/dist/index10.js +137 -0
  4. package/dist/index100.js +7 -0
  5. package/dist/index101.js +69 -0
  6. package/dist/index102.js +11 -0
  7. package/dist/index103.js +16 -0
  8. package/dist/index104.js +6 -0
  9. package/dist/index105.js +6 -0
  10. package/dist/index106.js +8 -0
  11. package/dist/index107.js +10 -0
  12. package/dist/index108.js +90 -0
  13. package/dist/index109.js +15 -0
  14. package/dist/index11.js +21 -0
  15. package/dist/index110.js +65 -0
  16. package/dist/index111.js +40 -0
  17. package/dist/index112.js +16 -0
  18. package/dist/index113.js +35 -0
  19. package/dist/index114.js +21 -0
  20. package/dist/index115.js +8 -0
  21. package/dist/index116.js +6 -0
  22. package/dist/index117.js +7 -0
  23. package/dist/index118.js +14 -0
  24. package/dist/index119.js +21 -0
  25. package/dist/index12.js +20 -0
  26. package/dist/index120.js +15 -0
  27. package/dist/index121.js +299 -0
  28. package/dist/index122.js +7 -0
  29. package/dist/index123.js +41 -0
  30. package/dist/index124.js +128 -0
  31. package/dist/index125.js +23 -0
  32. package/dist/index126.js +79 -0
  33. package/dist/index127.js +67 -0
  34. package/dist/index128.js +48 -0
  35. package/dist/index129.js +32 -0
  36. package/dist/index13.js +206 -0
  37. package/dist/index130.js +14 -0
  38. package/dist/index131.js +69 -0
  39. package/dist/index132.js +56 -0
  40. package/dist/index133.js +15 -0
  41. package/dist/index134.js +15 -0
  42. package/dist/index135.js +15 -0
  43. package/dist/index136.js +43 -0
  44. package/dist/index137.js +14 -0
  45. package/dist/index138.js +11 -0
  46. package/dist/index139.js +8 -0
  47. package/dist/index14.js +24 -0
  48. package/dist/index140.js +90 -0
  49. package/dist/index141.js +14 -0
  50. package/dist/index142.js +266 -0
  51. package/dist/index143.js +82 -0
  52. package/dist/index144.js +14 -0
  53. package/dist/index145.js +59 -0
  54. package/dist/index146.js +14 -0
  55. package/dist/index147.js +14 -0
  56. package/dist/index148.js +33 -0
  57. package/dist/index149.js +21 -0
  58. package/dist/index15.js +19 -0
  59. package/dist/index150.js +69 -0
  60. package/dist/index151.js +107 -0
  61. package/dist/index152.js +11 -0
  62. package/dist/index153.js +11 -0
  63. package/dist/index154.js +25 -0
  64. package/dist/index155.js +106 -0
  65. package/dist/index156.js +10 -0
  66. package/dist/index157.js +35 -0
  67. package/dist/index158.js +233 -0
  68. package/dist/index159.js +77 -0
  69. package/dist/index16.js +8 -0
  70. package/dist/index160.js +286 -0
  71. package/dist/index161.js +56 -0
  72. package/dist/index162.js +6 -0
  73. package/dist/index163.js +17 -0
  74. package/dist/index164.js +18 -0
  75. package/dist/index165.js +31 -0
  76. package/dist/index166.js +10 -0
  77. package/dist/index167.js +25 -0
  78. package/dist/index168.js +27 -0
  79. package/dist/index169.js +163 -0
  80. package/dist/index17.js +46 -0
  81. package/dist/index170.js +116 -0
  82. package/dist/index171.js +78 -0
  83. package/dist/index172.js +67 -0
  84. package/dist/index173.js +72 -0
  85. package/dist/index174.js +16 -0
  86. package/dist/index175.js +8 -0
  87. package/dist/index176.js +20 -0
  88. package/dist/index177.js +24 -0
  89. package/dist/index178.js +61 -0
  90. package/dist/index179.js +20 -0
  91. package/dist/index18.js +41 -0
  92. package/dist/index180.js +30 -0
  93. package/dist/index181.js +45 -0
  94. package/dist/index182.js +24 -0
  95. package/dist/index183.js +51 -0
  96. package/dist/index184.js +54 -0
  97. package/dist/index185.js +20 -0
  98. package/dist/index186.js +14 -0
  99. package/dist/index187.js +38 -0
  100. package/dist/index188.js +18 -0
  101. package/dist/index189.js +82 -0
  102. package/dist/index19.js +80 -0
  103. package/dist/index190.js +26 -0
  104. package/dist/index191.js +6 -0
  105. package/dist/index192.js +14 -0
  106. package/dist/index193.js +13 -0
  107. package/dist/index194.js +43 -0
  108. package/dist/index195.js +7 -0
  109. package/dist/index196.js +12 -0
  110. package/dist/index197.js +14 -0
  111. package/dist/index198.js +120 -0
  112. package/dist/index199.js +14 -0
  113. package/dist/index20.js +25 -0
  114. package/dist/index200.js +8 -0
  115. package/dist/index201.js +50 -0
  116. package/dist/index202.js +202 -0
  117. package/dist/index203.js +50 -0
  118. package/dist/index204.js +22 -0
  119. package/dist/index205.js +29 -0
  120. package/dist/index206.js +6 -0
  121. package/dist/index207.js +24 -0
  122. package/dist/index208.js +130 -0
  123. package/dist/index209.js +47 -0
  124. package/dist/index21.js +40 -0
  125. package/dist/index210.js +20 -0
  126. package/dist/index211.js +7 -0
  127. package/dist/index212.js +183 -0
  128. package/dist/index213.js +78 -0
  129. package/dist/index214.js +401 -0
  130. package/dist/index215.js +9 -0
  131. package/dist/index216.js +7 -0
  132. package/dist/index217.js +19 -0
  133. package/dist/index218.js +17 -0
  134. package/dist/index219.js +35 -0
  135. package/dist/index22.js +31 -0
  136. package/dist/index220.js +41 -0
  137. package/dist/index221.js +59 -0
  138. package/dist/index222.js +30 -0
  139. package/dist/index223.js +10 -0
  140. package/dist/index224.js +15 -0
  141. package/dist/index225.js +14 -0
  142. package/dist/index226.js +14 -0
  143. package/dist/index227.js +24 -0
  144. package/dist/index228.js +14 -0
  145. package/dist/index229.js +10 -0
  146. package/dist/index23.js +25 -0
  147. package/dist/index230.js +45 -0
  148. package/dist/index231.js +599 -0
  149. package/dist/index232.js +14 -0
  150. package/dist/index233.js +6 -0
  151. package/dist/index234.js +12 -0
  152. package/dist/index235.js +14 -0
  153. package/dist/index236.js +17 -0
  154. package/dist/index237.js +211 -0
  155. package/dist/index238.js +6 -0
  156. package/dist/index239.js +16 -0
  157. package/dist/index24.js +56 -0
  158. package/dist/index240.js +50 -0
  159. package/dist/index241.js +6 -0
  160. package/dist/index242.js +15 -0
  161. package/dist/index243.js +60 -0
  162. package/dist/index244.js +32 -0
  163. package/dist/index245.js +16 -0
  164. package/dist/index246.js +11 -0
  165. package/dist/index247.js +209 -0
  166. package/dist/index248.js +23 -0
  167. package/dist/index249.js +8 -0
  168. package/dist/index25.js +35 -0
  169. package/dist/index250.js +324 -0
  170. package/dist/index251.js +5 -0
  171. package/dist/index252.js +5 -0
  172. package/dist/index253.js +489 -0
  173. package/dist/index254.js +10 -0
  174. package/dist/index255.js +4 -0
  175. package/dist/index256.js +46 -0
  176. package/dist/index257.js +58 -0
  177. package/dist/index258.js +10 -0
  178. package/dist/index259.js +4 -0
  179. package/dist/index26.js +7 -0
  180. package/dist/index260.js +57 -0
  181. package/dist/index261.js +58 -0
  182. package/dist/index262.js +4 -0
  183. package/dist/index263.js +4 -0
  184. package/dist/index264.js +4 -0
  185. package/dist/index265.js +4 -0
  186. package/dist/index27.js +82 -0
  187. package/dist/index28.js +32 -0
  188. package/dist/index29.js +6 -0
  189. package/dist/index3.js +181 -0
  190. package/dist/index30.js +9 -0
  191. package/dist/index31.js +6 -0
  192. package/dist/index32.js +23 -0
  193. package/dist/index33.js +207 -0
  194. package/dist/index34.js +25 -0
  195. package/dist/index35.js +102 -0
  196. package/dist/index36.js +69 -0
  197. package/dist/index37.js +66 -0
  198. package/dist/index38.js +113 -0
  199. package/dist/index39.js +53 -0
  200. package/dist/index4.js +47 -0
  201. package/dist/index40.js +35 -0
  202. package/dist/index41.js +28 -0
  203. package/dist/index42.js +18 -0
  204. package/dist/index43.js +27 -0
  205. package/dist/index44.js +25 -0
  206. package/dist/index45.js +36 -0
  207. package/dist/index46.js +78 -0
  208. package/dist/index47.js +65 -0
  209. package/dist/index48.js +128 -0
  210. package/dist/index49.js +19 -0
  211. package/dist/index5.js +52 -0
  212. package/dist/index50.js +86 -0
  213. package/dist/index51.js +6 -0
  214. package/dist/index52.js +268 -0
  215. package/dist/index53.js +25 -0
  216. package/dist/index54.js +207 -0
  217. package/dist/index55.js +146 -0
  218. package/dist/index56.js +88 -0
  219. package/dist/index57.js +29 -0
  220. package/dist/index58.js +30 -0
  221. package/dist/index59.js +48 -0
  222. package/dist/index6.js +93 -0
  223. package/dist/index60.js +79 -0
  224. package/dist/index61.js +45 -0
  225. package/dist/index62.js +46 -0
  226. package/dist/index63.js +76 -0
  227. package/dist/index64.js +45 -0
  228. package/dist/index65.js +22 -0
  229. package/dist/index66.js +101 -0
  230. package/dist/index67.js +14 -0
  231. package/dist/index68.js +6 -0
  232. package/dist/index69.js +321 -0
  233. package/dist/index7.js +294 -0
  234. package/dist/index70.js +24 -0
  235. package/dist/index71.js +143 -0
  236. package/dist/index72.js +200 -0
  237. package/dist/index73.js +43 -0
  238. package/dist/index74.js +29 -0
  239. package/dist/index75.js +148 -0
  240. package/dist/index76.js +32 -0
  241. package/dist/index77.js +53 -0
  242. package/dist/index78.js +28 -0
  243. package/dist/index79.js +15 -0
  244. package/dist/index8.js +264 -0
  245. package/dist/index80.js +15 -0
  246. package/dist/index81.js +135 -0
  247. package/dist/index82.js +31 -0
  248. package/dist/index83.js +35 -0
  249. package/dist/index84.js +17 -0
  250. package/dist/index85.js +2765 -0
  251. package/dist/index86.js +57 -0
  252. package/dist/index87.js +14 -0
  253. package/dist/index88.js +98 -0
  254. package/dist/index89.js +92 -0
  255. package/dist/index9.js +197 -0
  256. package/dist/index90.js +21 -0
  257. package/dist/index91.js +18 -0
  258. package/dist/index92.js +35 -0
  259. package/dist/index93.js +14 -0
  260. package/dist/index94.js +136 -0
  261. package/dist/index95.js +30 -0
  262. package/dist/index96.js +11 -0
  263. package/dist/index97.js +7 -0
  264. package/dist/index98.js +15 -0
  265. package/dist/index99.js +25 -0
  266. package/dist/styles.css +1 -1
  267. package/package.json +3 -2
@@ -0,0 +1,51 @@
1
+ import * as p from "react-dom";
2
+ import { useIsoLayoutEffect as r } from "./index97.js";
3
+ import { useStableCallback as D } from "./index95.js";
4
+ import { getCombinedFieldValidityData as v } from "./index234.js";
5
+ import { useFormContext as R } from "./index182.js";
6
+ import { useFieldRootContext as b } from "./index178.js";
7
+ function S(u) {
8
+ const {
9
+ enabled: l = !0,
10
+ value: a,
11
+ id: t,
12
+ name: f,
13
+ controlRef: d,
14
+ commit: m
15
+ } = u, {
16
+ formRef: n
17
+ } = R(), {
18
+ invalid: s,
19
+ markedDirtyRef: c,
20
+ validityData: o,
21
+ setValidityData: V
22
+ } = b(), i = D(u.getValue);
23
+ r(() => {
24
+ if (!l)
25
+ return;
26
+ let e = a;
27
+ e === void 0 && (e = i()), o.initialValue === null && e !== null && V((y) => ({
28
+ ...y,
29
+ initialValue: e
30
+ }));
31
+ }, [l, V, a, o.initialValue, i]), r(() => {
32
+ !l || !t || n.current.fields.set(t, {
33
+ getValue: i,
34
+ name: f,
35
+ controlRef: d,
36
+ validityData: v(o, s),
37
+ validate() {
38
+ let e = a;
39
+ e === void 0 && (e = i()), c.current = !0, p.flushSync(() => m(e));
40
+ }
41
+ });
42
+ }, [m, d, l, n, i, t, s, c, f, o, a]), r(() => {
43
+ const e = n.current.fields;
44
+ return () => {
45
+ t && e.delete(t);
46
+ };
47
+ }, [n, t]);
48
+ }
49
+ export {
50
+ S as useField
51
+ };
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ import { serializeValue as c } from "./index235.js";
3
+ function t(n) {
4
+ return n != null && n.length > 0 && typeof n[0] == "object" && n[0] != null && "items" in n[0];
5
+ }
6
+ function e(n, r) {
7
+ if (r && n != null)
8
+ return r(n) ?? "";
9
+ if (n && typeof n == "object") {
10
+ if ("label" in n && n.label != null)
11
+ return String(n.label);
12
+ if ("value" in n)
13
+ return String(n.value);
14
+ }
15
+ return c(n);
16
+ }
17
+ function b(n, r) {
18
+ return r && n != null ? r(n) ?? "" : n && typeof n == "object" && "value" in n && "label" in n ? c(n.value) : c(n);
19
+ }
20
+ function y(n, r, f) {
21
+ if (f && n != null)
22
+ return f(n);
23
+ if (n && typeof n == "object" && "label" in n && n.label != null)
24
+ return n.label;
25
+ if (r && !Array.isArray(r))
26
+ return r[n] ?? e(n, f);
27
+ if (Array.isArray(r)) {
28
+ const o = t(r) ? r.flatMap((l) => l.items) : r;
29
+ if (n == null) {
30
+ const l = o.find((u) => u.value == null);
31
+ return l && l.label != null ? l.label : e(n, f);
32
+ }
33
+ if (typeof n != "object") {
34
+ const l = o.find((u) => u && u.value === n);
35
+ return l && l.label != null ? l.label : e(n, f);
36
+ }
37
+ if ("value" in n) {
38
+ const l = o.find((u) => u && u.value === n.value);
39
+ if (l && l.label != null)
40
+ return l.label;
41
+ }
42
+ }
43
+ return e(n, f);
44
+ }
45
+ function p(n, r) {
46
+ return !Array.isArray(n) || n.length === 0 ? "" : n.map((f) => e(f, r)).join(", ");
47
+ }
48
+ export {
49
+ t as isGroupedItems,
50
+ p as resolveMultipleLabels,
51
+ y as resolveSelectedLabel,
52
+ e as stringifyAsLabel,
53
+ b as stringifyAsValue
54
+ };
@@ -0,0 +1,20 @@
1
+ const f = (n, e) => Object.is(n, e);
2
+ function u(n, e, r) {
3
+ return n == null || e == null ? Object.is(n, e) : r(n, e);
4
+ }
5
+ function i(n, e, r) {
6
+ return !n || n.length === 0 ? !1 : n.some((t) => t === void 0 ? !1 : u(t, e, r));
7
+ }
8
+ function d(n, e, r) {
9
+ return !n || n.length === 0 ? -1 : n.findIndex((t) => t === void 0 ? !1 : u(t, e, r));
10
+ }
11
+ function s(n, e, r) {
12
+ return n.filter((t) => !u(t, e, r));
13
+ }
14
+ export {
15
+ u as compareItemEquality,
16
+ f as defaultItemEquality,
17
+ d as findItemIndex,
18
+ i as itemIncludes,
19
+ s as removeItem
20
+ };
@@ -0,0 +1,14 @@
1
+ import * as c from "react";
2
+ import { useIsoLayoutEffect as o } from "./index97.js";
3
+ import { useStableCallback as f } from "./index95.js";
4
+ function u(r, n) {
5
+ const t = c.useRef(r), e = f(n);
6
+ o(() => {
7
+ t.current !== r && e(t.current);
8
+ }, [r, e]), o(() => {
9
+ t.current = r;
10
+ }, [r]);
11
+ }
12
+ export {
13
+ u as useValueChanged
14
+ };
@@ -0,0 +1,38 @@
1
+ import { isElement as s } from "./index94.js";
2
+ import { useId as m } from "./index149.js";
3
+ import { useRefWithInit as c } from "./index107.js";
4
+ import { useIsoLayoutEffect as a } from "./index97.js";
5
+ import { useFloatingParentNodeId as u } from "./index145.js";
6
+ import { FloatingRootStore as g } from "./index243.js";
7
+ import { PopupTriggerMap as p } from "./index203.js";
8
+ function O(o) {
9
+ const {
10
+ open: r = !1,
11
+ onOpenChange: i,
12
+ elements: e = {}
13
+ } = o, f = m(), l = u() != null;
14
+ if (process.env.NODE_ENV !== "production") {
15
+ const n = e.reference;
16
+ n && !s(n) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
17
+ }
18
+ const t = c(() => new g({
19
+ open: r,
20
+ onOpenChange: i,
21
+ referenceElement: e.reference ?? null,
22
+ floatingElement: e.floating ?? null,
23
+ triggerElements: e.triggers ?? new p(),
24
+ floatingId: f,
25
+ nested: l,
26
+ noEmit: o.noEmit || !1
27
+ })).current;
28
+ return a(() => {
29
+ const n = {
30
+ open: r,
31
+ floatingId: f
32
+ };
33
+ e.reference !== void 0 && (n.referenceElement = e.reference, n.domReferenceElement = s(e.reference) ? e.reference : null), e.floating !== void 0 && (n.floatingElement = e.floating), t.update(n);
34
+ }, [r, f, e.reference, e.floating, t]), t.context.onOpenChange = i, t.context.nested = l, t.context.noEmit = o.noEmit || !1, t;
35
+ }
36
+ export {
37
+ O as useFloatingRootContext
38
+ };
@@ -0,0 +1,18 @@
1
+ import * as c from "react";
2
+ import { s as i } from "./index251.js";
3
+ import { w as S } from "./index252.js";
4
+ import { isReactVersionAtLeast as a } from "./index200.js";
5
+ const u = a(19), m = u ? p : l;
6
+ function b(t, e, o, r, n) {
7
+ return m(t, e, o, r, n);
8
+ }
9
+ function p(t, e, o, r, n) {
10
+ const s = c.useCallback(() => e(t.getSnapshot(), o, r, n), [t, e, o, r, n]);
11
+ return i.useSyncExternalStore(t.subscribe, s, s);
12
+ }
13
+ function l(t, e, o, r, n) {
14
+ return S.useSyncExternalStoreWithSelector(t.subscribe, t.getSnapshot, t.getSnapshot, (s) => e(s, o, r, n));
15
+ }
16
+ export {
17
+ b as useStore
18
+ };
@@ -0,0 +1,82 @@
1
+ class e {
2
+ /**
3
+ * The current state of the store.
4
+ * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
5
+ * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
6
+ * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
7
+ *
8
+ * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
9
+ */
10
+ // Internal state to handle recursive `setState()` calls
11
+ constructor(t) {
12
+ this.state = t, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
13
+ }
14
+ /**
15
+ * Registers a listener that will be called whenever the store's state changes.
16
+ *
17
+ * @param fn The listener function to be called on state changes.
18
+ * @returns A function to unsubscribe the listener.
19
+ */
20
+ subscribe = (t) => (this.listeners.add(t), () => {
21
+ this.listeners.delete(t);
22
+ });
23
+ /**
24
+ * Returns the current state of the store.
25
+ */
26
+ getSnapshot = () => this.state;
27
+ /**
28
+ * Updates the entire store's state and notifies all registered listeners.
29
+ *
30
+ * @param newState The new state to set for the store.
31
+ */
32
+ setState(t) {
33
+ if (this.state === t)
34
+ return;
35
+ this.state = t, this.updateTick += 1;
36
+ const s = this.updateTick;
37
+ for (const i of this.listeners) {
38
+ if (s !== this.updateTick)
39
+ return;
40
+ i(t);
41
+ }
42
+ }
43
+ /**
44
+ * Merges the provided changes into the current state and notifies listeners if there are changes.
45
+ *
46
+ * @param changes An object containing the changes to apply to the current state.
47
+ */
48
+ update(t) {
49
+ for (const s in t)
50
+ if (!Object.is(this.state[s], t[s])) {
51
+ e.prototype.setState.call(this, {
52
+ ...this.state,
53
+ ...t
54
+ });
55
+ return;
56
+ }
57
+ }
58
+ /**
59
+ * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
60
+ *
61
+ * @param key The key in the store's state to update.
62
+ * @param value The new value to set for the specified key.
63
+ */
64
+ set(t, s) {
65
+ Object.is(this.state[t], s) || e.prototype.setState.call(this, {
66
+ ...this.state,
67
+ [t]: s
68
+ });
69
+ }
70
+ /**
71
+ * Gives the state a new reference and updates all registered listeners.
72
+ */
73
+ notifyAll() {
74
+ const t = {
75
+ ...this.state
76
+ };
77
+ e.prototype.setState.call(this, t);
78
+ }
79
+ }
80
+ export {
81
+ e as Store
82
+ };
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import * as c from "react";
3
+ import { useDialogRootContext as h } from "./index109.js";
4
+ import { useRenderElement as M } from "./index86.js";
5
+ import { popupStateMapping as y } from "./index111.js";
6
+ import { transitionStatusMapping as N } from "./index112.js";
7
+ import { DialogPopupCssVars as v } from "./index116.js";
8
+ import { DialogPopupDataAttributes as w } from "./index117.js";
9
+ import { useDialogPortalContext as A } from "./index118.js";
10
+ import { useOpenChangeComplete as K } from "./index119.js";
11
+ import { COMPOSITE_KEYS as T } from "./index120.js";
12
+ import { jsx as V } from "react/jsx-runtime";
13
+ import { FloatingFocusManager as _ } from "./index121.js";
14
+ const j = {
15
+ ...y,
16
+ ...N,
17
+ nestedDialogOpen(n) {
18
+ return n ? {
19
+ [w.nestedDialogOpen]: ""
20
+ } : null;
21
+ }
22
+ }, k = /* @__PURE__ */ c.forwardRef(function(s, d) {
23
+ const {
24
+ className: Y,
25
+ finalFocus: m,
26
+ initialFocus: i,
27
+ render: q,
28
+ ...f
29
+ } = s, {
30
+ store: t
31
+ } = h(), g = t.useState("descriptionElementId"), S = t.useState("disablePointerDismissal"), D = t.useState("floatingRootContext"), C = t.useState("popupProps"), P = t.useState("modal"), a = t.useState("mounted"), p = t.useState("nested"), r = t.useState("nestedOpenDialogCount"), e = t.useState("open"), x = t.useState("openMethod"), O = t.useState("titleElementId"), u = t.useState("transitionStatus"), b = t.useState("role");
32
+ A(), K({
33
+ open: e,
34
+ ref: t.context.popupRef,
35
+ onComplete() {
36
+ e && t.context.onOpenChangeComplete?.(!0);
37
+ }
38
+ });
39
+ function E(o) {
40
+ return o === "touch" ? t.context.popupRef.current : !0;
41
+ }
42
+ const F = i === void 0 ? E : i, l = r > 0, I = c.useMemo(() => ({
43
+ open: e,
44
+ nested: p,
45
+ transitionStatus: u,
46
+ nestedDialogOpen: l
47
+ }), [e, p, u, l]), R = M("div", s, {
48
+ state: I,
49
+ props: [C, {
50
+ "aria-labelledby": O ?? void 0,
51
+ "aria-describedby": g ?? void 0,
52
+ role: b,
53
+ tabIndex: -1,
54
+ hidden: !a,
55
+ onKeyDown(o) {
56
+ T.has(o.key) && o.stopPropagation();
57
+ },
58
+ style: {
59
+ [v.nestedDialogs]: r
60
+ }
61
+ }, f],
62
+ ref: [d, t.context.popupRef, t.useStateSetter("popupElement")],
63
+ stateAttributesMapping: j
64
+ });
65
+ return /* @__PURE__ */ V(_, {
66
+ context: D,
67
+ openInteractionType: x,
68
+ disabled: !a,
69
+ closeOnFocusOut: !S,
70
+ initialFocus: F,
71
+ returnFocus: m,
72
+ modal: P !== !1,
73
+ restoreFocus: "popup",
74
+ children: R
75
+ });
76
+ });
77
+ process.env.NODE_ENV !== "production" && (k.displayName = "DialogPopup");
78
+ export {
79
+ k as DialogPopup
80
+ };
@@ -0,0 +1,26 @@
1
+ import { FieldControlDataAttributes as a } from "./index233.js";
2
+ const e = {
3
+ badInput: !1,
4
+ customError: !1,
5
+ patternMismatch: !1,
6
+ rangeOverflow: !1,
7
+ rangeUnderflow: !1,
8
+ stepMismatch: !1,
9
+ tooLong: !1,
10
+ tooShort: !1,
11
+ typeMismatch: !1,
12
+ valid: null,
13
+ valueMissing: !1
14
+ }, r = {
15
+ valid(l) {
16
+ return l === null ? null : l ? {
17
+ [a.valid]: ""
18
+ } : {
19
+ [a.invalid]: ""
20
+ };
21
+ }
22
+ };
23
+ export {
24
+ e as DEFAULT_VALIDITY_STATE,
25
+ r as fieldValidityMapping
26
+ };
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const t = /* @__PURE__ */ e.createContext(void 0);
3
+ process.env.NODE_ENV !== "production" && (t.displayName = "SelectPortalContext");
4
+ export {
5
+ t as SelectPortalContext
6
+ };
@@ -0,0 +1,14 @@
1
+ import n from "./index100.js";
2
+ import * as t from "react";
3
+ const o = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (o.displayName = "SelectPositionerContext");
5
+ function i() {
6
+ const e = t.useContext(o);
7
+ if (!e)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>." : n(59));
9
+ return e;
10
+ }
11
+ export {
12
+ o as SelectPositionerContext,
13
+ i as useSelectPositionerContext
14
+ };
@@ -0,0 +1,13 @@
1
+ function e(o, t) {
2
+ o && Object.assign(o.style, t);
3
+ }
4
+ const i = {
5
+ position: "relative",
6
+ maxHeight: "100%",
7
+ overflowX: "hidden",
8
+ overflowY: "auto"
9
+ };
10
+ export {
11
+ i as LIST_FUNCTIONAL_STYLES,
12
+ e as clearStyles
13
+ };
@@ -0,0 +1,43 @@
1
+ const a = typeof navigator < "u", o = e(), n = f(), r = u(), c = typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter:none"), m = (
2
+ // iPads can claim to be MacIntel
3
+ o.platform === "MacIntel" && o.maxTouchPoints > 1 ? !0 : /iP(hone|ad|od)|iOS/.test(o.platform)
4
+ ), p = a && /firefox/i.test(r), g = a && /apple/i.test(navigator.vendor), d = a && /android/i.test(n) || /android/i.test(r), l = a && n.toLowerCase().startsWith("mac") && !navigator.maxTouchPoints, v = r.includes("jsdom/");
5
+ function e() {
6
+ if (!a)
7
+ return {
8
+ platform: "",
9
+ maxTouchPoints: -1
10
+ };
11
+ const t = navigator.userAgentData;
12
+ return t?.platform ? {
13
+ platform: t.platform,
14
+ maxTouchPoints: navigator.maxTouchPoints
15
+ } : {
16
+ platform: navigator.platform ?? "",
17
+ maxTouchPoints: navigator.maxTouchPoints ?? -1
18
+ };
19
+ }
20
+ function u() {
21
+ if (!a)
22
+ return "";
23
+ const t = navigator.userAgentData;
24
+ return t && Array.isArray(t.brands) ? t.brands.map(({
25
+ brand: i,
26
+ version: s
27
+ }) => `${i}/${s}`).join(" ") : navigator.userAgent;
28
+ }
29
+ function f() {
30
+ if (!a)
31
+ return "";
32
+ const t = navigator.userAgentData;
33
+ return t?.platform ? t.platform : navigator.platform ?? "";
34
+ }
35
+ export {
36
+ d as isAndroid,
37
+ p as isFirefox,
38
+ m as isIOS,
39
+ v as isJSDOM,
40
+ l as isMac,
41
+ g as isSafari,
42
+ c as isWebKit
43
+ };
@@ -0,0 +1,7 @@
1
+ function o(t) {
2
+ const i = t.currentTarget.getBoundingClientRect();
3
+ return i.top + 1 <= t.clientY && t.clientY <= i.bottom - 1 && i.left + 1 <= t.clientX && t.clientX <= i.right - 1;
4
+ }
5
+ export {
6
+ o as isMouseWithinBounds
7
+ };
@@ -0,0 +1,12 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ const e = "base-ui-disable-scrollbar", r = {
3
+ className: e,
4
+ element: /* @__PURE__ */ l("style", {
5
+ href: e,
6
+ precedence: "base-ui:low",
7
+ children: `.${e}{scrollbar-width:none}.${e}::-webkit-scrollbar{display:none}`
8
+ })
9
+ };
10
+ export {
11
+ r as styleDisableScrollbar
12
+ };
@@ -0,0 +1,14 @@
1
+ import n from "./index100.js";
2
+ import * as t from "react";
3
+ const o = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (o.displayName = "SelectItemContext");
5
+ function s() {
6
+ const e = t.useContext(o);
7
+ if (!e)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>." : n(57));
9
+ return e;
10
+ }
11
+ export {
12
+ o as SelectItemContext,
13
+ s as useSelectItemContext
14
+ };
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import * as R from "react";
3
+ import { useTimeout as O } from "./index148.js";
4
+ import { useIsoLayoutEffect as X } from "./index97.js";
5
+ import { useSelectRootContext as Y } from "./index177.js";
6
+ import { useSelectPositionerContext as _ } from "./index192.js";
7
+ import { useTransitionStatus as j } from "./index136.js";
8
+ import { useOpenChangeComplete as q } from "./index119.js";
9
+ import { useRenderElement as z } from "./index86.js";
10
+ import { selectors as d } from "./index181.js";
11
+ import { useStore as H } from "./index188.js";
12
+ const F = /* @__PURE__ */ R.forwardRef(function(w, I) {
13
+ const {
14
+ render: J,
15
+ className: K,
16
+ direction: r,
17
+ keepMounted: v = !1,
18
+ ...V
19
+ } = w, {
20
+ store: o,
21
+ popupRef: g,
22
+ listRef: a,
23
+ handleScrollArrowVisibility: C,
24
+ scrollArrowsMountedCountRef: c
25
+ } = Y(), {
26
+ side: S,
27
+ scrollDownArrowRef: E,
28
+ scrollUpArrowRef: N
29
+ } = _(), y = r === "up" ? d.scrollUpArrowVisible : d.scrollDownArrowVisible, B = H(o, y), D = H(o, d.openMethod), n = B && D !== "touch", f = O(), p = r === "up" ? N : E, {
30
+ transitionStatus: T,
31
+ setMounted: k
32
+ } = j(n);
33
+ X(() => (c.current += 1, o.state.hasScrollArrows || o.set("hasScrollArrows", !0), () => {
34
+ c.current = Math.max(0, c.current - 1), c.current === 0 && o.state.hasScrollArrows && o.set("hasScrollArrows", !1);
35
+ }), [o, c]), q({
36
+ open: n,
37
+ ref: p,
38
+ onComplete() {
39
+ n || k(!1);
40
+ }
41
+ });
42
+ const P = R.useMemo(() => ({
43
+ direction: r,
44
+ visible: n,
45
+ side: S,
46
+ transitionStatus: T
47
+ }), [r, n, S, T]), U = z("div", w, {
48
+ ref: [I, p],
49
+ state: P,
50
+ props: [{
51
+ "aria-hidden": !0,
52
+ children: r === "up" ? "▲" : "▼",
53
+ style: {
54
+ position: "absolute"
55
+ },
56
+ onMouseMove(A) {
57
+ if (A.movementX === 0 && A.movementY === 0 || f.isStarted())
58
+ return;
59
+ o.set("activeIndex", null);
60
+ function M() {
61
+ const t = o.state.listElement ?? g.current;
62
+ if (!t)
63
+ return;
64
+ o.set("activeIndex", null), C();
65
+ const x = t.scrollTop === 0, b = Math.round(t.scrollTop + t.clientHeight) >= t.scrollHeight;
66
+ if (a.current.length === 0 && (r === "up" ? o.set("scrollUpArrowVisible", !x) : o.set("scrollDownArrowVisible", !b)), r === "up" && x || r === "down" && b) {
67
+ f.clear();
68
+ return;
69
+ }
70
+ if ((o.state.listElement || g.current) && a.current && a.current.length > 0) {
71
+ const s = a.current, m = p.current?.offsetHeight || 0;
72
+ if (r === "up") {
73
+ let l = 0;
74
+ const h = t.scrollTop + m;
75
+ for (let e = 0; e < s.length; e += 1) {
76
+ const i = s[e];
77
+ if (i && i.offsetTop >= h) {
78
+ l = e;
79
+ break;
80
+ }
81
+ }
82
+ const u = Math.max(0, l - 1);
83
+ if (u < l) {
84
+ const e = s[u];
85
+ e && (t.scrollTop = Math.max(0, e.offsetTop - m));
86
+ } else
87
+ t.scrollTop = 0;
88
+ } else {
89
+ let l = s.length - 1;
90
+ const h = t.scrollTop + t.clientHeight - m;
91
+ for (let e = 0; e < s.length; e += 1) {
92
+ const i = s[e];
93
+ if (i && i.offsetTop + i.offsetHeight > h) {
94
+ l = Math.max(0, e - 1);
95
+ break;
96
+ }
97
+ }
98
+ const u = Math.min(s.length - 1, l + 1);
99
+ if (u > l) {
100
+ const e = s[u];
101
+ e && (t.scrollTop = e.offsetTop + e.offsetHeight - t.clientHeight + m);
102
+ } else
103
+ t.scrollTop = t.scrollHeight - t.clientHeight;
104
+ }
105
+ }
106
+ f.start(40, M);
107
+ }
108
+ f.start(40, M);
109
+ },
110
+ onMouseLeave() {
111
+ f.clear();
112
+ }
113
+ }, V]
114
+ });
115
+ return n || v ? U : null;
116
+ });
117
+ process.env.NODE_ENV !== "production" && (F.displayName = "SelectScrollArrow");
118
+ export {
119
+ F as SelectScrollArrow
120
+ };
@@ -0,0 +1,14 @@
1
+ import r from "./index100.js";
2
+ import * as t from "react";
3
+ const o = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (o.displayName = "SelectGroupContext");
5
+ function s() {
6
+ const e = t.useContext(o);
7
+ if (e === void 0)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>." : r(56));
9
+ return e;
10
+ }
11
+ export {
12
+ o as SelectGroupContext,
13
+ s as useSelectGroupContext
14
+ };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import * as n from "react";
3
+ import { useDialogRootContext as p } from "./index109.js";
4
+ import { useRenderElement as a } from "./index86.js";
5
+ import { useBaseUiId as c } from "./index115.js";
6
+ const d = /* @__PURE__ */ n.forwardRef(function(e, i) {
7
+ const {
8
+ render: m,
9
+ className: u,
10
+ id: r,
11
+ ...t
12
+ } = e, {
13
+ store: s
14
+ } = p(), o = c(r);
15
+ return s.useSyncedValueWithCleanup("descriptionElementId", o), a("p", e, {
16
+ ref: i,
17
+ props: [{
18
+ id: o
19
+ }, t]
20
+ });
21
+ });
22
+ process.env.NODE_ENV !== "production" && (d.displayName = "DialogDescription");
23
+ export {
24
+ d as DialogDescription
25
+ };
@@ -0,0 +1,8 @@
1
+ import * as t from "react";
2
+ const e = parseInt(t.version, 10);
3
+ function o(r) {
4
+ return e >= r;
5
+ }
6
+ export {
7
+ o as isReactVersionAtLeast
8
+ };