@yselimcan/ui 0.0.3 → 0.0.5

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 (225) hide show
  1. package/dist/index100.js +5 -4
  2. package/dist/index101.js +7 -66
  3. package/dist/index102.js +87 -8
  4. package/dist/index103.js +11 -12
  5. package/dist/index104.js +62 -3
  6. package/dist/index105.js +38 -4
  7. package/dist/index106.js +14 -6
  8. package/dist/index107.js +32 -7
  9. package/dist/index108.js +19 -88
  10. package/dist/index109.js +4 -11
  11. package/dist/index110.js +4 -63
  12. package/dist/index111.js +4 -37
  13. package/dist/index112.js +12 -14
  14. package/dist/index113.js +18 -32
  15. package/dist/index114.js +13 -19
  16. package/dist/index115.js +295 -4
  17. package/dist/index116.js +5 -4
  18. package/dist/index117.js +39 -5
  19. package/dist/index118.js +124 -10
  20. package/dist/index119.js +21 -19
  21. package/dist/index120.js +77 -13
  22. package/dist/index121.js +59 -291
  23. package/dist/index122.js +45 -4
  24. package/dist/index123.js +14 -39
  25. package/dist/index124.js +4 -124
  26. package/dist/index125.js +29 -20
  27. package/dist/index126.js +5 -77
  28. package/dist/index127.js +25 -62
  29. package/dist/index128.js +16 -44
  30. package/dist/index129.js +21 -29
  31. package/dist/index130.js +58 -11
  32. package/dist/index131.js +16 -65
  33. package/dist/index132.js +24 -50
  34. package/dist/index133.js +39 -11
  35. package/dist/index134.js +42 -12
  36. package/dist/index135.js +20 -11
  37. package/dist/index136.js +44 -36
  38. package/dist/index137.js +51 -11
  39. package/dist/index138.js +17 -8
  40. package/dist/index139.js +11 -5
  41. package/dist/index140.js +21 -86
  42. package/dist/index141.js +35 -11
  43. package/dist/index142.js +223 -256
  44. package/dist/index143.js +279 -75
  45. package/dist/index144.js +53 -11
  46. package/dist/index145.js +13 -54
  47. package/dist/index146.js +79 -11
  48. package/dist/index147.js +3 -11
  49. package/dist/index148.js +2 -2
  50. package/dist/index149.js +23 -18
  51. package/dist/index150.js +14 -65
  52. package/dist/index151.js +63 -98
  53. package/dist/index152.js +4 -9
  54. package/dist/index153.js +103 -7
  55. package/dist/index154.js +78 -21
  56. package/dist/index155.js +259 -99
  57. package/dist/index156.js +11 -7
  58. package/dist/index157.js +10 -32
  59. package/dist/index158.js +38 -228
  60. package/dist/index159.js +4 -74
  61. package/dist/index160.js +63 -280
  62. package/dist/index161.js +10 -54
  63. package/dist/index162.js +8 -3
  64. package/dist/index163.js +5 -14
  65. package/dist/index164.js +132 -14
  66. package/dist/index165.js +51 -26
  67. package/dist/index166.js +11 -7
  68. package/dist/index167.js +116 -21
  69. package/dist/index168.js +12 -25
  70. package/dist/index169.js +8 -160
  71. package/dist/index17.js +4 -4
  72. package/dist/index170.js +12 -113
  73. package/dist/index171.js +22 -75
  74. package/dist/index172.js +11 -64
  75. package/dist/index173.js +65 -68
  76. package/dist/index174.js +13 -14
  77. package/dist/index175.js +13 -6
  78. package/dist/index176.js +11 -16
  79. package/dist/index177.js +11 -21
  80. package/dist/index178.js +86 -57
  81. package/dist/index179.js +11 -17
  82. package/dist/index18.js +4 -4
  83. package/dist/index180.js +11 -27
  84. package/dist/index181.js +56 -42
  85. package/dist/index182.js +10 -20
  86. package/dist/index183.js +11 -48
  87. package/dist/index184.js +15 -48
  88. package/dist/index185.js +8 -17
  89. package/dist/index186.js +8 -11
  90. package/dist/index187.js +102 -34
  91. package/dist/index188.js +7 -15
  92. package/dist/index189.js +31 -78
  93. package/dist/index19.js +10 -10
  94. package/dist/index190.js +74 -23
  95. package/dist/index191.js +15 -4
  96. package/dist/index192.js +28 -11
  97. package/dist/index193.js +7 -10
  98. package/dist/index194.js +22 -40
  99. package/dist/index195.js +25 -5
  100. package/dist/index196.js +160 -9
  101. package/dist/index197.js +113 -11
  102. package/dist/index198.js +73 -115
  103. package/dist/index199.js +64 -11
  104. package/dist/index20.js +3 -3
  105. package/dist/index201.js +2 -2
  106. package/dist/index202.js +5 -5
  107. package/dist/index203.js +1 -1
  108. package/dist/index204.js +2 -2
  109. package/dist/index205.js +3 -3
  110. package/dist/index206.js +12 -4
  111. package/dist/index207.js +4 -19
  112. package/dist/index208.js +4 -128
  113. package/dist/index209.js +10 -45
  114. package/dist/index21.js +4 -4
  115. package/dist/index210.js +16 -17
  116. package/dist/index211.js +22 -5
  117. package/dist/index212.js +122 -175
  118. package/dist/index213.js +45 -76
  119. package/dist/index214.js +15 -396
  120. package/dist/index215.js +5 -7
  121. package/dist/index216.js +181 -5
  122. package/dist/index217.js +74 -15
  123. package/dist/index218.js +396 -12
  124. package/dist/index219.js +38 -32
  125. package/dist/index22.js +5 -5
  126. package/dist/index220.js +57 -39
  127. package/dist/index221.js +28 -57
  128. package/dist/index222.js +7 -27
  129. package/dist/index223.js +12 -7
  130. package/dist/index224.js +10 -11
  131. package/dist/index225.js +5 -5
  132. package/dist/index226.js +21 -11
  133. package/dist/index227.js +11 -21
  134. package/dist/index228.js +7 -11
  135. package/dist/index229.js +42 -7
  136. package/dist/index23.js +3 -3
  137. package/dist/index230.js +4 -43
  138. package/dist/index231.js +5 -597
  139. package/dist/index232.js +596 -11
  140. package/dist/index233.js +12 -4
  141. package/dist/index234.js +11 -6
  142. package/dist/index235.js +32 -11
  143. package/dist/index236.js +208 -14
  144. package/dist/index237.js +4 -209
  145. package/dist/index238.js +13 -3
  146. package/dist/index239.js +47 -13
  147. package/dist/index24.js +9 -9
  148. package/dist/index240.js +3 -47
  149. package/dist/index241.js +12 -3
  150. package/dist/index242.js +56 -11
  151. package/dist/index243.js +29 -57
  152. package/dist/index244.js +13 -29
  153. package/dist/index245.js +9 -14
  154. package/dist/index246.js +207 -9
  155. package/dist/index247.js +13 -205
  156. package/dist/index248.js +317 -16
  157. package/dist/index249.js +3 -6
  158. package/dist/index250.js +3 -322
  159. package/dist/index251.js +21 -3
  160. package/dist/index252.js +6 -3
  161. package/dist/index253.js +1 -1
  162. package/dist/index26.js +1 -1
  163. package/dist/index27.js +1 -1
  164. package/dist/index28.js +1 -1
  165. package/dist/index32.js +1 -1
  166. package/dist/index33.js +17 -17
  167. package/dist/index34.js +5 -5
  168. package/dist/index35.js +14 -14
  169. package/dist/index36.js +11 -11
  170. package/dist/index37.js +8 -8
  171. package/dist/index38.js +9 -9
  172. package/dist/index39.js +5 -5
  173. package/dist/index40.js +3 -3
  174. package/dist/index41.js +4 -4
  175. package/dist/index42.js +2 -2
  176. package/dist/index43.js +2 -2
  177. package/dist/index44.js +1 -1
  178. package/dist/index45.js +6 -6
  179. package/dist/index46.js +10 -10
  180. package/dist/index47.js +9 -9
  181. package/dist/index48.js +17 -17
  182. package/dist/index49.js +4 -4
  183. package/dist/index50.js +11 -11
  184. package/dist/index52.js +24 -24
  185. package/dist/index53.js +3 -3
  186. package/dist/index54.js +30 -30
  187. package/dist/index55.js +14 -14
  188. package/dist/index56.js +13 -13
  189. package/dist/index57.js +2 -2
  190. package/dist/index58.js +4 -4
  191. package/dist/index59.js +6 -6
  192. package/dist/index60.js +12 -12
  193. package/dist/index61.js +5 -5
  194. package/dist/index62.js +4 -4
  195. package/dist/index63.js +12 -12
  196. package/dist/index64.js +5 -5
  197. package/dist/index65.js +3 -3
  198. package/dist/index66.js +14 -14
  199. package/dist/index69.js +32 -32
  200. package/dist/index70.js +5 -5
  201. package/dist/index71.js +18 -18
  202. package/dist/index72.js +23 -23
  203. package/dist/index73.js +8 -8
  204. package/dist/index74.js +2 -2
  205. package/dist/index75.js +12 -12
  206. package/dist/index76.js +3 -3
  207. package/dist/index77.js +5 -5
  208. package/dist/index78.js +4 -4
  209. package/dist/index79.js +1 -1
  210. package/dist/index80.js +1 -1
  211. package/dist/index81.js +16 -16
  212. package/dist/index82.js +5 -5
  213. package/dist/index83.js +5 -5
  214. package/dist/index86.js +11 -54
  215. package/dist/index87.js +54 -11
  216. package/dist/index88.js +11 -11
  217. package/dist/index89.js +6 -6
  218. package/dist/index94.js +4 -133
  219. package/dist/index95.js +63 -24
  220. package/dist/index96.js +8 -8
  221. package/dist/index97.js +14 -5
  222. package/dist/index98.js +3 -12
  223. package/dist/index99.js +3 -22
  224. package/dist/styles.css +1 -1
  225. package/package.json +1 -1
package/dist/index76.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import * as t from "react";
3
- import { useSelectRootContext as a } from "./index177.js";
4
- import { useSelectItemContext as d } from "./index197.js";
5
- import { useRenderElement as x } from "./index86.js";
3
+ import { useSelectRootContext as a } from "./index129.js";
4
+ import { useSelectItemContext as d } from "./index166.js";
5
+ import { useRenderElement as x } from "./index87.js";
6
6
  const p = /* @__PURE__ */ t.memo(/* @__PURE__ */ t.forwardRef(function(r, l) {
7
7
  const {
8
8
  indexRef: c,
package/dist/index77.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import * as t from "react";
3
- import { useSelectItemContext as u } from "./index197.js";
4
- import { useTransitionStatus as I } from "./index136.js";
5
- import { useOpenChangeComplete as R } from "./index119.js";
6
- import { useRenderElement as M } from "./index86.js";
7
- import { transitionStatusMapping as N } from "./index112.js";
3
+ import { useSelectItemContext as u } from "./index166.js";
4
+ import { useTransitionStatus as I } from "./index133.js";
5
+ import { useOpenChangeComplete as R } from "./index113.js";
6
+ import { useRenderElement as M } from "./index87.js";
7
+ import { transitionStatusMapping as N } from "./index106.js";
8
8
  import { jsx as S } from "react/jsx-runtime";
9
9
  const h = /* @__PURE__ */ t.forwardRef(function(n, r) {
10
10
  const s = n.keepMounted ?? !1, {
package/dist/index78.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import * as c from "react";
3
- import { useIsoLayoutEffect as i } from "./index97.js";
4
- import { useBaseUiId as l } from "./index115.js";
5
- import { useSelectGroupContext as m } from "./index199.js";
6
- import { useRenderElement as p } from "./index86.js";
3
+ import { useIsoLayoutEffect as i } from "./index126.js";
4
+ import { useBaseUiId as l } from "./index109.js";
5
+ import { useSelectGroupContext as m } from "./index168.js";
6
+ import { useRenderElement as p } from "./index87.js";
7
7
  const a = /* @__PURE__ */ c.forwardRef(function(o, r) {
8
8
  const {
9
9
  className: f,
package/dist/index79.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import * as e from "react";
3
- import { SelectScrollArrow as c } from "./index198.js";
3
+ import { SelectScrollArrow as c } from "./index167.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
5
  const l = /* @__PURE__ */ e.forwardRef(function(r, o) {
6
6
  return /* @__PURE__ */ t(c, {
package/dist/index80.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import * as e from "react";
3
- import { SelectScrollArrow as c } from "./index198.js";
3
+ import { SelectScrollArrow as c } from "./index167.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
5
  const l = /* @__PURE__ */ e.forwardRef(function(r, o) {
6
6
  return /* @__PURE__ */ t(c, {
package/dist/index81.js CHANGED
@@ -1,24 +1,24 @@
1
1
  "use client";
2
2
  import * as l from "react";
3
- import { ownerDocument as Z } from "./index162.js";
3
+ import { ownerDocument as Z } from "./index147.js";
4
4
  import { useTimeout as m } from "./index148.js";
5
- import { useStableCallback as $ } from "./index95.js";
6
- import { useMergedRefs as ee } from "./index101.js";
7
- import { useValueAsRef as te } from "./index176.js";
8
- import { useSelectRootContext as oe } from "./index177.js";
9
- import { useFieldRootContext as re } from "./index178.js";
10
- import { useLabelableContext as ne } from "./index179.js";
11
- import { pressableTriggerOpenStateMapping as se } from "./index111.js";
12
- import { fieldValidityMapping as ie } from "./index190.js";
13
- import { useRenderElement as le } from "./index86.js";
14
- import { selectors as n } from "./index181.js";
15
- import { getPseudoElementBounds as ae } from "./index164.js";
16
- import { createChangeEventDetails as h } from "./index113.js";
5
+ import { useStableCallback as $ } from "./index127.js";
6
+ import { useMergedRefs as ee } from "./index95.js";
7
+ import { useValueAsRef as te } from "./index128.js";
8
+ import { useSelectRootContext as oe } from "./index129.js";
9
+ import { useFieldRootContext as re } from "./index130.js";
10
+ import { useLabelableContext as ne } from "./index131.js";
11
+ import { pressableTriggerOpenStateMapping as se } from "./index105.js";
12
+ import { fieldValidityMapping as ie } from "./index149.js";
13
+ import { useRenderElement as le } from "./index87.js";
14
+ import { selectors as n } from "./index134.js";
15
+ import { getPseudoElementBounds as ae } from "./index150.js";
16
+ import { createChangeEventDetails as h } from "./index107.js";
17
17
  import { useButton as ue } from "./index89.js";
18
- import { useStore as s } from "./index188.js";
19
- import { getFloatingFocusElement as ce, contains as y } from "./index173.js";
18
+ import { useStore as s } from "./index145.js";
19
+ import { getFloatingFocusElement as ce, contains as y } from "./index151.js";
20
20
  import { mergeProps as me } from "./index27.js";
21
- import { focusOut as fe, cancelOpen as de } from "./index114.js";
21
+ import { focusOut as fe, cancelOpen as de } from "./index108.js";
22
22
  const f = 2, pe = {
23
23
  ...se,
24
24
  ...ie,
package/dist/index82.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import * as o from "react";
3
- import { useRenderElement as p } from "./index86.js";
4
- import { useSelectRootContext as i } from "./index177.js";
5
- import { triggerOpenStateMapping as m } from "./index111.js";
6
- import { selectors as a } from "./index181.js";
7
- import { useStore as l } from "./index188.js";
3
+ import { useRenderElement as p } from "./index87.js";
4
+ import { useSelectRootContext as i } from "./index129.js";
5
+ import { triggerOpenStateMapping as m } from "./index105.js";
6
+ import { selectors as a } from "./index134.js";
7
+ import { useStore as l } from "./index145.js";
8
8
  const f = /* @__PURE__ */ o.forwardRef(function(e, r) {
9
9
  const {
10
10
  className: d,
package/dist/index83.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import * as i from "react";
3
- import { useRenderElement as S } from "./index86.js";
4
- import { useSelectRootContext as v } from "./index177.js";
5
- import { resolveMultipleLabels as V, resolveSelectedLabel as b } from "./index184.js";
6
- import { selectors as o } from "./index181.js";
7
- import { useStore as r } from "./index188.js";
3
+ import { useRenderElement as S } from "./index87.js";
4
+ import { useSelectRootContext as v } from "./index129.js";
5
+ import { resolveMultipleLabels as V, resolveSelectedLabel as b } from "./index137.js";
6
+ import { selectors as o } from "./index134.js";
7
+ import { useStore as r } from "./index145.js";
8
8
  const R = {
9
9
  value: () => null
10
10
  }, h = /* @__PURE__ */ i.forwardRef(function(s, c) {
package/dist/index86.js CHANGED
@@ -1,57 +1,14 @@
1
- import R from "./index100.js";
2
- import * as P from "react";
3
- import { createElement as d } from "react";
4
- import { useMergedRefs as p, useMergedRefsN as b } from "./index101.js";
5
- import { getReactElementRef as y } from "./index102.js";
6
- import { mergeObjects as g } from "./index87.js";
7
- import { getStateAttributesProps as A } from "./index103.js";
8
- import { resolveClassName as M } from "./index104.js";
9
- import { resolveStyle as k } from "./index105.js";
10
- import { EMPTY_OBJECT as f } from "./index106.js";
11
- import { mergePropsN as v, mergeClassNames as C, mergeProps as O } from "./index27.js";
12
- function Y(r, e, t = {}) {
13
- const i = e.render, o = w(e, t);
14
- if (t.enabled === !1)
15
- return null;
16
- const m = t.state ?? f;
17
- return B(r, i, o, m);
18
- }
19
- function w(r, e = {}) {
20
- const {
21
- className: t,
22
- style: i,
23
- render: o
24
- } = r, {
25
- state: m = f,
26
- ref: u,
27
- props: a,
28
- stateAttributesMapping: E,
29
- enabled: s = !0
30
- } = e, l = s ? M(t, m) : void 0, c = s ? k(i, m) : void 0, N = s ? A(m, E) : f, n = s ? g(N, Array.isArray(a) ? v(a) : a) ?? f : f;
31
- return typeof document < "u" && (s ? Array.isArray(u) ? n.ref = b([n.ref, y(o), ...u]) : n.ref = p(n.ref, y(o), u) : p(null, null)), s ? (l !== void 0 && (n.className = C(n.className, l)), c !== void 0 && (n.style = g(n.style, c)), n) : f;
32
- }
33
- function B(r, e, t, i) {
34
- if (e) {
35
- if (typeof e == "function")
36
- return e(t, i);
37
- const o = O(t, e.props);
38
- return o.ref = t.ref, /* @__PURE__ */ P.cloneElement(e, o);
39
- }
40
- if (r && typeof r == "string")
41
- return S(r, t);
42
- throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: Render element or function are not defined." : R(8));
43
- }
44
- function S(r, e) {
45
- return r === "button" ? /* @__PURE__ */ d("button", {
46
- type: "button",
47
- ...e,
48
- key: e.key
49
- }) : r === "img" ? /* @__PURE__ */ d("img", {
50
- alt: "",
51
- ...e,
52
- key: e.key
53
- }) : /* @__PURE__ */ P.createElement(r, e);
1
+ function n(e, r) {
2
+ if (e && !r)
3
+ return e;
4
+ if (!e && r)
5
+ return r;
6
+ if (e || r)
7
+ return {
8
+ ...e,
9
+ ...r
10
+ };
54
11
  }
55
12
  export {
56
- Y as useRenderElement
13
+ n as mergeObjects
57
14
  };
package/dist/index87.js CHANGED
@@ -1,14 +1,57 @@
1
- function n(e, r) {
2
- if (e && !r)
3
- return e;
4
- if (!e && r)
5
- return r;
6
- if (e || r)
7
- return {
8
- ...e,
9
- ...r
10
- };
1
+ import R from "./index94.js";
2
+ import * as P from "react";
3
+ import { createElement as d } from "react";
4
+ import { useMergedRefs as p, useMergedRefsN as b } from "./index95.js";
5
+ import { getReactElementRef as y } from "./index96.js";
6
+ import { mergeObjects as g } from "./index86.js";
7
+ import { getStateAttributesProps as A } from "./index97.js";
8
+ import { resolveClassName as M } from "./index98.js";
9
+ import { resolveStyle as k } from "./index99.js";
10
+ import { EMPTY_OBJECT as f } from "./index100.js";
11
+ import { mergePropsN as v, mergeClassNames as C, mergeProps as O } from "./index27.js";
12
+ function Y(r, e, t = {}) {
13
+ const i = e.render, o = w(e, t);
14
+ if (t.enabled === !1)
15
+ return null;
16
+ const m = t.state ?? f;
17
+ return B(r, i, o, m);
18
+ }
19
+ function w(r, e = {}) {
20
+ const {
21
+ className: t,
22
+ style: i,
23
+ render: o
24
+ } = r, {
25
+ state: m = f,
26
+ ref: u,
27
+ props: a,
28
+ stateAttributesMapping: E,
29
+ enabled: s = !0
30
+ } = e, l = s ? M(t, m) : void 0, c = s ? k(i, m) : void 0, N = s ? A(m, E) : f, n = s ? g(N, Array.isArray(a) ? v(a) : a) ?? f : f;
31
+ return typeof document < "u" && (s ? Array.isArray(u) ? n.ref = b([n.ref, y(o), ...u]) : n.ref = p(n.ref, y(o), u) : p(null, null)), s ? (l !== void 0 && (n.className = C(n.className, l)), c !== void 0 && (n.style = g(n.style, c)), n) : f;
32
+ }
33
+ function B(r, e, t, i) {
34
+ if (e) {
35
+ if (typeof e == "function")
36
+ return e(t, i);
37
+ const o = O(t, e.props);
38
+ return o.ref = t.ref, /* @__PURE__ */ P.cloneElement(e, o);
39
+ }
40
+ if (r && typeof r == "string")
41
+ return S(r, t);
42
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: Render element or function are not defined." : R(8));
43
+ }
44
+ function S(r, e) {
45
+ return r === "button" ? /* @__PURE__ */ d("button", {
46
+ type: "button",
47
+ ...e,
48
+ key: e.key
49
+ }) : r === "img" ? /* @__PURE__ */ d("img", {
50
+ alt: "",
51
+ ...e,
52
+ key: e.key
53
+ }) : /* @__PURE__ */ P.createElement(r, e);
11
54
  }
12
55
  export {
13
- n as mergeObjects
56
+ Y as useRenderElement
14
57
  };
package/dist/index88.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import * as p from "react";
3
- import { useStableCallback as x } from "./index95.js";
4
- import { useControlled as L } from "./index129.js";
5
- import { useIsoLayoutEffect as k } from "./index97.js";
6
- import { useFieldRootContext as b } from "./index178.js";
7
- import { useLabelableContext as B } from "./index179.js";
8
- import { useLabelableId as S } from "./index180.js";
9
- import { fieldValidityMapping as U } from "./index190.js";
10
- import { useRenderElement as A } from "./index86.js";
11
- import { useField as K } from "./index183.js";
12
- import { createChangeEventDetails as O } from "./index113.js";
13
- import { none as _ } from "./index114.js";
3
+ import { useStableCallback as x } from "./index127.js";
4
+ import { useControlled as L } from "./index125.js";
5
+ import { useIsoLayoutEffect as k } from "./index126.js";
6
+ import { useFieldRootContext as b } from "./index130.js";
7
+ import { useLabelableContext as B } from "./index131.js";
8
+ import { useLabelableId as S } from "./index132.js";
9
+ import { fieldValidityMapping as U } from "./index149.js";
10
+ import { useRenderElement as A } from "./index87.js";
11
+ import { useField as K } from "./index136.js";
12
+ import { createChangeEventDetails as O } from "./index107.js";
13
+ import { none as _ } from "./index108.js";
14
14
  const j = /* @__PURE__ */ p.forwardRef(function(n, C) {
15
15
  const {
16
16
  render: z,
package/dist/index89.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import * as i from "react";
3
- import { isHTMLElement as K } from "./index94.js";
4
- import { useStableCallback as d } from "./index95.js";
5
- import { error as m } from "./index96.js";
6
- import { useIsoLayoutEffect as N } from "./index97.js";
7
- import { useCompositeRootContext as O } from "./index98.js";
8
- import { useFocusableWhenDisabled as T } from "./index99.js";
3
+ import { isHTMLElement as K } from "./index164.js";
4
+ import { useStableCallback as d } from "./index127.js";
5
+ import { error as m } from "./index169.js";
6
+ import { useIsoLayoutEffect as N } from "./index126.js";
7
+ import { useCompositeRootContext as O } from "./index170.js";
8
+ import { useFocusableWhenDisabled as T } from "./index171.js";
9
9
  import { mergeProps as U, makeEventPreventable as b } from "./index27.js";
10
10
  function F(a = {}) {
11
11
  const {
package/dist/index94.js CHANGED
@@ -1,136 +1,7 @@
1
- function c() {
2
- return typeof window < "u";
3
- }
4
- function u(t) {
5
- return p(t) ? (t.nodeName || "").toLowerCase() : "#document";
6
- }
7
- function i(t) {
8
- var e;
9
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
10
- }
11
- function N(t) {
12
- var e;
13
- return (e = (p(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
14
- }
15
- function p(t) {
16
- return c() ? t instanceof Node || t instanceof i(t).Node : !1;
17
- }
18
- function m(t) {
19
- return c() ? t instanceof Element || t instanceof i(t).Element : !1;
20
- }
21
- function w(t) {
22
- return c() ? t instanceof HTMLElement || t instanceof i(t).HTMLElement : !1;
23
- }
24
- function f(t) {
25
- return !c() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof i(t).ShadowRoot;
26
- }
27
- const E = /* @__PURE__ */ new Set(["inline", "contents"]);
28
- function y(t) {
29
- const {
30
- overflow: e,
31
- overflowX: n,
32
- overflowY: o,
33
- display: r
34
- } = S(t);
35
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !E.has(r);
36
- }
37
- const T = /* @__PURE__ */ new Set(["table", "td", "th"]);
38
- function A(t) {
39
- return T.has(u(t));
40
- }
41
- const v = [":popover-open", ":modal"];
42
- function L(t) {
43
- return v.some((e) => {
44
- try {
45
- return t.matches(e);
46
- } catch {
47
- return !1;
48
- }
49
- });
50
- }
51
- const D = ["transform", "translate", "scale", "rotate", "perspective"], C = ["transform", "translate", "scale", "rotate", "perspective", "filter"], k = ["paint", "layout", "strict", "content"];
52
- function V(t) {
53
- const e = O(), n = m(t) ? S(t) : t;
54
- return D.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || C.some((o) => (n.willChange || "").includes(o)) || k.some((o) => (n.contain || "").includes(o));
55
- }
56
- function B(t) {
57
- let e = s(t);
58
- for (; w(e) && !h(e); ) {
59
- if (V(e))
60
- return e;
61
- if (L(e))
62
- return null;
63
- e = s(e);
64
- }
65
- return null;
66
- }
67
- function O() {
68
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
69
- }
70
- const R = /* @__PURE__ */ new Set(["html", "body", "#document"]);
71
- function h(t) {
72
- return R.has(u(t));
73
- }
74
- function S(t) {
75
- return i(t).getComputedStyle(t);
76
- }
77
- function F(t) {
78
- return m(t) ? {
79
- scrollLeft: t.scrollLeft,
80
- scrollTop: t.scrollTop
81
- } : {
82
- scrollLeft: t.scrollX,
83
- scrollTop: t.scrollY
84
- };
85
- }
86
- function s(t) {
87
- if (u(t) === "html")
88
- return t;
89
- const e = (
90
- // Step into the shadow DOM of the parent of a slotted node.
91
- t.assignedSlot || // DOM Element detected.
92
- t.parentNode || // ShadowRoot detected.
93
- f(t) && t.host || // Fallback.
94
- N(t)
95
- );
96
- return f(e) ? e.host : e;
97
- }
98
- function b(t) {
99
- const e = s(t);
100
- return h(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : w(e) && y(e) ? e : b(e);
101
- }
102
- function d(t, e, n) {
103
- var o;
104
- e === void 0 && (e = []), n === void 0 && (n = !0);
105
- const r = b(t), g = r === ((o = t.ownerDocument) == null ? void 0 : o.body), l = i(r);
106
- if (g) {
107
- const a = _(l);
108
- return e.concat(l, l.visualViewport || [], y(r) ? r : [], a && n ? d(a) : []);
109
- }
110
- return e.concat(r, d(r, [], n));
111
- }
112
- function _(t) {
113
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1
+ function o(r, ...a) {
2
+ const e = new URL(`https://base-ui.com/production-error/${r}`);
3
+ return a.forEach((s) => e.searchParams.append("args[]", s)), `Base UI error #${r}; visit ${e} for the full message.`;
114
4
  }
115
5
  export {
116
- S as getComputedStyle,
117
- B as getContainingBlock,
118
- N as getDocumentElement,
119
- _ as getFrameElement,
120
- b as getNearestOverflowAncestor,
121
- u as getNodeName,
122
- F as getNodeScroll,
123
- d as getOverflowAncestors,
124
- s as getParentNode,
125
- i as getWindow,
126
- V as isContainingBlock,
127
- m as isElement,
128
- w as isHTMLElement,
129
- h as isLastTraversableNode,
130
- p as isNode,
131
- y as isOverflowElement,
132
- f as isShadowRoot,
133
- A as isTableElement,
134
- L as isTopLayer,
135
- O as isWebKit
6
+ o as default
136
7
  };
package/dist/index95.js CHANGED
@@ -1,30 +1,69 @@
1
- "use client";
2
- import * as a from "react";
3
- import { useRefWithInit as c } from "./index107.js";
4
- const n = a[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)], r = (
5
- // React 17 doesn't have useInsertionEffect.
6
- n && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
7
- n !== a.useLayoutEffect ? n : (e) => e()
8
- );
9
- function f(e) {
10
- const t = c(o).current;
11
- return t.next = e, r(t.effect), t.trampoline;
1
+ import { useRefWithInit as r } from "./index101.js";
2
+ function b(n, e, c, t) {
3
+ const l = r(i).current;
4
+ return s(l, n, e, c, t) && o(l, [n, e, c, t]), l.callback;
12
5
  }
13
- function o() {
14
- const e = {
15
- next: void 0,
16
- callback: l,
17
- trampoline: (...t) => e.callback?.(...t),
18
- effect: () => {
19
- e.callback = e.next;
20
- }
6
+ function h(n) {
7
+ const e = r(i).current;
8
+ return f(e, n) && o(e, n), e.callback;
9
+ }
10
+ function i() {
11
+ return {
12
+ callback: null,
13
+ cleanup: null,
14
+ refs: []
21
15
  };
22
- return e;
23
16
  }
24
- function l() {
25
- if (process.env.NODE_ENV !== "production")
26
- throw new Error("Base UI: Cannot call an event handler while rendering.");
17
+ function s(n, e, c, t, l) {
18
+ return n.refs[0] !== e || n.refs[1] !== c || n.refs[2] !== t || n.refs[3] !== l;
19
+ }
20
+ function f(n, e) {
21
+ return n.refs.length !== e.length || n.refs.some((c, t) => c !== e[t]);
22
+ }
23
+ function o(n, e) {
24
+ if (n.refs = e, e.every((c) => c == null)) {
25
+ n.callback = null;
26
+ return;
27
+ }
28
+ n.callback = (c) => {
29
+ if (n.cleanup && (n.cleanup(), n.cleanup = null), c != null) {
30
+ const t = Array(e.length).fill(null);
31
+ for (let l = 0; l < e.length; l += 1) {
32
+ const u = e[l];
33
+ if (u != null)
34
+ switch (typeof u) {
35
+ case "function": {
36
+ const a = u(c);
37
+ typeof a == "function" && (t[l] = a);
38
+ break;
39
+ }
40
+ case "object": {
41
+ u.current = c;
42
+ break;
43
+ }
44
+ }
45
+ }
46
+ n.cleanup = () => {
47
+ for (let l = 0; l < e.length; l += 1) {
48
+ const u = e[l];
49
+ if (u != null)
50
+ switch (typeof u) {
51
+ case "function": {
52
+ const a = t[l];
53
+ typeof a == "function" ? a() : u(null);
54
+ break;
55
+ }
56
+ case "object": {
57
+ u.current = null;
58
+ break;
59
+ }
60
+ }
61
+ }
62
+ };
63
+ }
64
+ };
27
65
  }
28
66
  export {
29
- f as useStableCallback
67
+ b as useMergedRefs,
68
+ h as useMergedRefsN
30
69
  };
package/dist/index96.js CHANGED
@@ -1,11 +1,11 @@
1
- let o;
2
- process.env.NODE_ENV !== "production" && (o = /* @__PURE__ */ new Set());
3
- function s(...r) {
4
- if (process.env.NODE_ENV !== "production") {
5
- const e = r.join(" ");
6
- o.has(e) || (o.add(e), console.error(`Base UI: ${e}`));
7
- }
1
+ import * as n from "react";
2
+ import { isReactVersionAtLeast as o } from "./index200.js";
3
+ function s(t) {
4
+ if (!/* @__PURE__ */ n.isValidElement(t))
5
+ return null;
6
+ const e = t, r = e.props;
7
+ return (o(19) ? r?.ref : e.ref) ?? null;
8
8
  }
9
9
  export {
10
- s as error
10
+ s as getReactElementRef
11
11
  };
package/dist/index97.js CHANGED
@@ -1,7 +1,16 @@
1
- "use client";
2
- import * as e from "react";
3
- const o = () => {
4
- }, t = typeof document < "u" ? e.useLayoutEffect : o;
1
+ function i(r, n) {
2
+ const o = {};
3
+ for (const t in r) {
4
+ const e = r[t];
5
+ if (n?.hasOwnProperty(t)) {
6
+ const s = n[t](e);
7
+ s != null && Object.assign(o, s);
8
+ continue;
9
+ }
10
+ e === !0 ? o[`data-${t.toLowerCase()}`] = "" : e && (o[`data-${t.toLowerCase()}`] = e.toString());
11
+ }
12
+ return o;
13
+ }
5
14
  export {
6
- t as useIsoLayoutEffect
15
+ i as getStateAttributesProps
7
16
  };
package/dist/index98.js CHANGED
@@ -1,15 +1,6 @@
1
- "use client";
2
- import n from "./index100.js";
3
- import * as t from "react";
4
- const e = /* @__PURE__ */ t.createContext(void 0);
5
- process.env.NODE_ENV !== "production" && (e.displayName = "CompositeRootContext");
6
- function r(s = !1) {
7
- const o = t.useContext(e);
8
- if (o === void 0 && !s)
9
- throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : n(16));
10
- return o;
1
+ function t(n, o) {
2
+ return typeof n == "function" ? n(o) : n;
11
3
  }
12
4
  export {
13
- e as CompositeRootContext,
14
- r as useCompositeRootContext
5
+ t as resolveClassName
15
6
  };
package/dist/index99.js CHANGED
@@ -1,25 +1,6 @@
1
- "use client";
2
- import * as c from "react";
3
- function f(d) {
4
- const {
5
- focusableWhenDisabled: e,
6
- disabled: s,
7
- composite: t = !1,
8
- tabIndex: i = 0,
9
- isNativeButton: o
10
- } = d, n = t && e !== !1, l = t && e === !1;
11
- return {
12
- props: c.useMemo(() => {
13
- const a = {
14
- // allow Tabbing away from focusableWhenDisabled elements
15
- onKeyDown(b) {
16
- s && e && b.key !== "Tab" && b.preventDefault();
17
- }
18
- };
19
- return t || (a.tabIndex = i, !o && s && (a.tabIndex = e ? i : -1)), (o && (e || n) || !o && s) && (a["aria-disabled"] = s), o && (!e || l) && (a.disabled = s), a;
20
- }, [t, s, e, n, l, o, i])
21
- };
1
+ function e(n, o) {
2
+ return typeof n == "function" ? n(o) : n;
22
3
  }
23
4
  export {
24
- f as useFocusableWhenDisabled
5
+ e as resolveStyle
25
6
  };