@rpcbase/ui 0.261.0 → 0.262.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts +19 -6
  3. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  4. package/dist/components/FilesUploadField/sha256.d.ts +5 -0
  5. package/dist/components/FilesUploadField/sha256.d.ts.map +1 -0
  6. package/dist/components/FilesUploadField/sha256.worker.d.ts +4 -0
  7. package/dist/components/FilesUploadField/sha256.worker.d.ts.map +1 -0
  8. package/dist/components/ImagesField/index.d.ts +4 -2
  9. package/dist/components/ImagesField/index.d.ts.map +1 -1
  10. package/dist/index.js +10 -10
  11. package/dist/index298.js +11 -803
  12. package/dist/index298.js.map +1 -1
  13. package/dist/index299.js +865 -28
  14. package/dist/index299.js.map +1 -1
  15. package/dist/index300.js +26 -510
  16. package/dist/index300.js.map +1 -1
  17. package/dist/index301.js +481 -755
  18. package/dist/index301.js.map +1 -1
  19. package/dist/index302.js +786 -7428
  20. package/dist/index302.js.map +1 -1
  21. package/dist/index303.js +7429 -7
  22. package/dist/index303.js.map +1 -1
  23. package/dist/index304.js +6 -12
  24. package/dist/index304.js.map +1 -1
  25. package/dist/index305.js +12 -5
  26. package/dist/index305.js.map +1 -1
  27. package/dist/index306.js +3 -3
  28. package/dist/index306.js.map +1 -1
  29. package/dist/index307.js +5 -469
  30. package/dist/index307.js.map +1 -1
  31. package/dist/index308.js +464 -32
  32. package/dist/index308.js.map +1 -1
  33. package/dist/index309.js +36 -18
  34. package/dist/index309.js.map +1 -1
  35. package/dist/index310.js +17 -28
  36. package/dist/index310.js.map +1 -1
  37. package/dist/index311.js +30 -4
  38. package/dist/index311.js.map +1 -1
  39. package/dist/index312.js +4 -59
  40. package/dist/index312.js.map +1 -1
  41. package/dist/index313.js +59 -9
  42. package/dist/index313.js.map +1 -1
  43. package/dist/index314.js +9 -5
  44. package/dist/index314.js.map +1 -1
  45. package/dist/index315.js +5 -9
  46. package/dist/index315.js.map +1 -1
  47. package/dist/index316.js +9 -12
  48. package/dist/index316.js.map +1 -1
  49. package/dist/index317.js +13 -3
  50. package/dist/index317.js.map +1 -1
  51. package/dist/index318.js +3 -17
  52. package/dist/index318.js.map +1 -1
  53. package/dist/index319.js +14 -23
  54. package/dist/index319.js.map +1 -1
  55. package/dist/index320.js +23 -39
  56. package/dist/index320.js.map +1 -1
  57. package/dist/index321.js +41 -5
  58. package/dist/index321.js.map +1 -1
  59. package/dist/index322.js +5 -25
  60. package/dist/index322.js.map +1 -1
  61. package/dist/index323.js +24 -18
  62. package/dist/index323.js.map +1 -1
  63. package/dist/index324.js +17 -32
  64. package/dist/index324.js.map +1 -1
  65. package/dist/index325.js +34 -5
  66. package/dist/index325.js.map +1 -1
  67. package/dist/index326.js +5 -9
  68. package/dist/index326.js.map +1 -1
  69. package/dist/index327.js +8 -7
  70. package/dist/index327.js.map +1 -1
  71. package/dist/index328.js +8 -9
  72. package/dist/index328.js.map +1 -1
  73. package/dist/index329.js +9 -10
  74. package/dist/index329.js.map +1 -1
  75. package/dist/index330.js +10 -7
  76. package/dist/index330.js.map +1 -1
  77. package/dist/index331.js +7 -75
  78. package/dist/index331.js.map +1 -1
  79. package/dist/index332.js +66 -153
  80. package/dist/index332.js.map +1 -1
  81. package/dist/index333.js +147 -99
  82. package/dist/index333.js.map +1 -1
  83. package/dist/index334.js +113 -13
  84. package/dist/index334.js.map +1 -1
  85. package/dist/index335.js +12 -78
  86. package/dist/index335.js.map +1 -1
  87. package/dist/index336.js +57 -23
  88. package/dist/index336.js.map +1 -1
  89. package/dist/index337.js +45 -12
  90. package/dist/index337.js.map +1 -1
  91. package/dist/index338.js +13 -16
  92. package/dist/index338.js.map +1 -1
  93. package/dist/index339.js +15 -100
  94. package/dist/index339.js.map +1 -1
  95. package/dist/index340.js +95 -50
  96. package/dist/index340.js.map +1 -1
  97. package/dist/index341.js +5 -57
  98. package/dist/index341.js.map +1 -1
  99. package/dist/index342.js +78 -41
  100. package/dist/index342.js.map +1 -1
  101. package/dist/index343.js +58 -100
  102. package/dist/index343.js.map +1 -1
  103. package/dist/index344.js +104 -46
  104. package/dist/index344.js.map +1 -1
  105. package/dist/index345.js +51 -39
  106. package/dist/index345.js.map +1 -1
  107. package/dist/index346.js +42 -142
  108. package/dist/index346.js.map +1 -1
  109. package/dist/index347.js +123 -120
  110. package/dist/index347.js.map +1 -1
  111. package/dist/index348.js +108 -224
  112. package/dist/index348.js.map +1 -1
  113. package/dist/index349.js +174 -158
  114. package/dist/index349.js.map +1 -1
  115. package/dist/index350.js +144 -213
  116. package/dist/index350.js.map +1 -1
  117. package/dist/index351.js +309 -5
  118. package/dist/index351.js.map +1 -1
  119. package/dist/index352.js +5 -6
  120. package/dist/index352.js.map +1 -1
  121. package/dist/index353.js +6 -7
  122. package/dist/index353.js.map +1 -1
  123. package/dist/index354.js +5 -4
  124. package/dist/index354.js.map +1 -1
  125. package/dist/index355.js +4 -4
  126. package/dist/index355.js.map +1 -1
  127. package/dist/index356.js +6 -21
  128. package/dist/index356.js.map +1 -1
  129. package/dist/index357.js +21 -10
  130. package/dist/index357.js.map +1 -1
  131. package/dist/index358.js +10 -128
  132. package/dist/index358.js.map +1 -1
  133. package/dist/index359.js +122 -36
  134. package/dist/index359.js.map +1 -1
  135. package/dist/index360.js +38 -64
  136. package/dist/index360.js.map +1 -1
  137. package/dist/index361.js +66 -115
  138. package/dist/index361.js.map +1 -1
  139. package/dist/index362.js +112 -485
  140. package/dist/index362.js.map +1 -1
  141. package/dist/index363.js +490 -13
  142. package/dist/index363.js.map +1 -1
  143. package/dist/index364.js +13 -4
  144. package/dist/index364.js.map +1 -1
  145. package/dist/index365.js +4 -47
  146. package/dist/index365.js.map +1 -1
  147. package/dist/index366.js +44 -15
  148. package/dist/index366.js.map +1 -1
  149. package/dist/index367.js +19 -5
  150. package/dist/index367.js.map +1 -1
  151. package/dist/index368.js +5 -27
  152. package/dist/index368.js.map +1 -1
  153. package/dist/index369.js +27 -48
  154. package/dist/index369.js.map +1 -1
  155. package/dist/index370.js +46 -27
  156. package/dist/index370.js.map +1 -1
  157. package/dist/index371.js +27 -16
  158. package/dist/index371.js.map +1 -1
  159. package/dist/index372.js +16 -41
  160. package/dist/index372.js.map +1 -1
  161. package/dist/index373.js +42 -14
  162. package/dist/index373.js.map +1 -1
  163. package/dist/index374.js +14 -10
  164. package/dist/index374.js.map +1 -1
  165. package/dist/index375.js +9 -51
  166. package/dist/index375.js.map +1 -1
  167. package/dist/index376.js +53 -43
  168. package/dist/index376.js.map +1 -1
  169. package/dist/index377.js +43 -16
  170. package/dist/index377.js.map +1 -1
  171. package/dist/index378.js +15 -4
  172. package/dist/index378.js.map +1 -1
  173. package/dist/index379.js +4 -4
  174. package/dist/index379.js.map +1 -1
  175. package/dist/index380.js +4 -9
  176. package/dist/index380.js.map +1 -1
  177. package/dist/index381.js +9 -340
  178. package/dist/index381.js.map +1 -1
  179. package/dist/index382.js +339 -4
  180. package/dist/index382.js.map +1 -1
  181. package/dist/index383.js +5 -16
  182. package/dist/index383.js.map +1 -1
  183. package/dist/index384.js +16 -111
  184. package/dist/index384.js.map +1 -1
  185. package/dist/index385.js +109 -19
  186. package/dist/index385.js.map +1 -1
  187. package/dist/index386.js +18 -18
  188. package/dist/index386.js.map +1 -1
  189. package/dist/index387.js +21 -5
  190. package/dist/index387.js.map +1 -1
  191. package/dist/index388.js +5 -20
  192. package/dist/index388.js.map +1 -1
  193. package/dist/index389.js +19 -13
  194. package/dist/index389.js.map +1 -1
  195. package/dist/index390.js +13 -84
  196. package/dist/index390.js.map +1 -1
  197. package/dist/index391.js +84 -7
  198. package/dist/index391.js.map +1 -1
  199. package/dist/index392.js +9 -29
  200. package/dist/index392.js.map +1 -1
  201. package/dist/index393.js +28 -9
  202. package/dist/index393.js.map +1 -1
  203. package/dist/index394.js +9 -5
  204. package/dist/index394.js.map +1 -1
  205. package/dist/index395.js +6 -252
  206. package/dist/index395.js.map +1 -1
  207. package/dist/index396.js +250 -10
  208. package/dist/index396.js.map +1 -1
  209. package/dist/index397.js +11 -10
  210. package/dist/index397.js.map +1 -1
  211. package/dist/index398.js +10 -6
  212. package/dist/index398.js.map +1 -1
  213. package/dist/index399.js +6 -22
  214. package/dist/index399.js.map +1 -1
  215. package/dist/index400.js +21 -21
  216. package/dist/index400.js.map +1 -1
  217. package/dist/index401.js +21 -107
  218. package/dist/index401.js.map +1 -1
  219. package/dist/index402.js +109 -15
  220. package/dist/index402.js.map +1 -1
  221. package/dist/index403.js +15 -12
  222. package/dist/index403.js.map +1 -1
  223. package/dist/index404.js +10 -8
  224. package/dist/index404.js.map +1 -1
  225. package/dist/index405.js +8 -242
  226. package/dist/index405.js.map +1 -1
  227. package/dist/index406.js +238 -25
  228. package/dist/index406.js.map +1 -1
  229. package/dist/index407.js +29 -51
  230. package/dist/index407.js.map +1 -1
  231. package/dist/index408.js +51 -10
  232. package/dist/index408.js.map +1 -1
  233. package/dist/index409.js +11 -128
  234. package/dist/index409.js.map +1 -1
  235. package/dist/index410.js +124 -35
  236. package/dist/index410.js.map +1 -1
  237. package/dist/index411.js +36 -23
  238. package/dist/index411.js.map +1 -1
  239. package/dist/index412.js +26 -11
  240. package/dist/index412.js.map +1 -1
  241. package/dist/index413.js +11 -23
  242. package/dist/index413.js.map +1 -1
  243. package/dist/index414.js +19 -13
  244. package/dist/index414.js.map +1 -1
  245. package/dist/index415.js +14 -13
  246. package/dist/index415.js.map +1 -1
  247. package/dist/index416.js +14 -322
  248. package/dist/index416.js.map +1 -1
  249. package/dist/index417.js +323 -61
  250. package/dist/index417.js.map +1 -1
  251. package/dist/index418.js +63 -4
  252. package/dist/index418.js.map +1 -1
  253. package/dist/index419.js +4 -28
  254. package/dist/index419.js.map +1 -1
  255. package/dist/index420.js +25 -468
  256. package/dist/index420.js.map +1 -1
  257. package/dist/index421.js +452 -250
  258. package/dist/index421.js.map +1 -1
  259. package/dist/index422.js +272 -0
  260. package/dist/index422.js.map +1 -0
  261. package/package.json +2 -1
package/dist/index396.js CHANGED
@@ -1,15 +1,255 @@
1
1
  "use client";
2
- import e from "./index183.js";
3
- import * as t from "react";
4
- //#region ../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
5
- var n = /*#__PURE__*/ t.createContext(void 0);
6
- process.env.NODE_ENV !== "production" && (n.displayName = "SelectPositionerContext");
7
- function r() {
8
- let r = t.useContext(n);
9
- if (!r) throw Error(process.env.NODE_ENV === "production" ? e(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
10
- return r;
2
+ import { getWindow as e } from "./index200.js";
3
+ import { useStableCallback as t } from "./index202.js";
4
+ import { useIsoLayoutEffect as n } from "./index204.js";
5
+ import { useValueAsRef as r } from "./index227.js";
6
+ import { ownerDocument as i } from "./index229.js";
7
+ import { getAlignment as a, getSide as o, getSideAxis as s } from "./index232.js";
8
+ import { autoUpdate as c } from "./index248.js";
9
+ import { flip as l, limitShift as u, offset as d, shift as f, size as p } from "./index249.js";
10
+ import { useFloating as ee } from "./index273.js";
11
+ import { useDirection as m } from "./index392.js";
12
+ import { arrow as h } from "./index393.js";
13
+ import { hide as te } from "./index394.js";
14
+ import { DEFAULT_SIDES as ne } from "./index395.js";
15
+ import * as g from "react";
16
+ //#region ../../node_modules/@base-ui/react/utils/useAnchorPositioning.mjs
17
+ function _(e, t, n) {
18
+ let r = e === "inline-start" || e === "inline-end";
19
+ return {
20
+ top: "top",
21
+ right: r ? n ? "inline-start" : "inline-end" : "right",
22
+ bottom: "bottom",
23
+ left: r ? n ? "inline-end" : "inline-start" : "left"
24
+ }[t];
25
+ }
26
+ function re(e, t, n) {
27
+ let { rects: r, placement: i } = e;
28
+ return {
29
+ side: _(t, o(i), n),
30
+ align: a(i) || "center",
31
+ anchor: {
32
+ width: r.reference.width,
33
+ height: r.reference.height
34
+ },
35
+ positioner: {
36
+ width: r.floating.width,
37
+ height: r.floating.height
38
+ }
39
+ };
40
+ }
41
+ function v(v) {
42
+ let { anchor: b, positionMethod: ie = "absolute", side: x = "bottom", sideOffset: S = 0, align: C = "center", alignOffset: w = 0, collisionBoundary: T, collisionPadding: ae = 5, sticky: E = !1, arrowPadding: oe = 5, disableAnchorTracking: D = !1, inline: se, keepMounted: O = !1, floatingRootContext: k, mounted: A, collisionAvoidance: j, shiftCrossAxis: M = !1, nodeId: ce, adaptiveOrigin: N, lazyFlip: le = !1, externalTree: ue } = v, [de, fe] = g.useState(null);
43
+ !A && de !== null && fe(null);
44
+ let P = j.side || "flip", F = j.align || "flip", pe = j.fallbackAxisSide || "end", me = typeof b == "function" ? b : void 0, he = t(me), ge = me ? he : b, I = r(b), _e = r(A), L = m() === "rtl", ve = de || {
45
+ top: "top",
46
+ right: "right",
47
+ bottom: "bottom",
48
+ left: "left",
49
+ "inline-end": L ? "left" : "right",
50
+ "inline-start": L ? "right" : "left"
51
+ }[x], ye = C === "center" ? ve : `${ve}-${C}`, R = ae, be = +(x === "bottom"), xe = +(x === "top"), Se = +(x === "right"), Ce = +(x === "left");
52
+ typeof R == "number" ? R = {
53
+ top: R + be,
54
+ right: R + Ce,
55
+ bottom: R + xe,
56
+ left: R + Se
57
+ } : R &&= {
58
+ top: (R.top || 0) + be,
59
+ right: (R.right || 0) + Ce,
60
+ bottom: (R.bottom || 0) + xe,
61
+ left: (R.left || 0) + Se
62
+ };
63
+ let z = {
64
+ boundary: T === "clipping-ancestors" ? "clippingAncestors" : T,
65
+ padding: R
66
+ }, B = g.useRef(null), V = r(S), H = r(w), we = typeof S == "function" ? 0 : S, Te = typeof w == "function" ? 0 : w, U = [];
67
+ se && U.push(se), U.push(d((e) => {
68
+ let t = re(e, x, L), n = typeof V.current == "function" ? V.current(t) : V.current, r = typeof H.current == "function" ? H.current(t) : H.current;
69
+ return {
70
+ mainAxis: n,
71
+ crossAxis: r,
72
+ alignmentAxis: r
73
+ };
74
+ }, [
75
+ we,
76
+ Te,
77
+ L,
78
+ x
79
+ ]));
80
+ let Ee = F === "none" && P !== "shift", De = !Ee && (E || M || P === "shift"), Oe = P === "none" ? null : l({
81
+ ...z,
82
+ padding: {
83
+ top: R.top + 1,
84
+ right: R.right + 1,
85
+ bottom: R.bottom + 1,
86
+ left: R.left + 1
87
+ },
88
+ mainAxis: !M && P === "flip",
89
+ crossAxis: F === "flip" && "alignment",
90
+ fallbackAxisSideDirection: pe
91
+ }), ke = Ee ? null : f((e) => {
92
+ let t = i(e.elements.floating).documentElement;
93
+ return {
94
+ ...z,
95
+ rootBoundary: M ? {
96
+ x: 0,
97
+ y: 0,
98
+ width: t.clientWidth,
99
+ height: t.clientHeight
100
+ } : void 0,
101
+ mainAxis: F !== "none",
102
+ crossAxis: De,
103
+ limiter: E || M ? void 0 : u((e) => {
104
+ if (!B.current) return {};
105
+ let { width: t, height: n } = B.current.getBoundingClientRect(), r = s(o(e.placement)), i = r === "y" ? t : n, a = r === "y" ? R.left + R.right : R.top + R.bottom;
106
+ return { offset: i / 2 + a / 2 };
107
+ })
108
+ };
109
+ }, [
110
+ z,
111
+ E,
112
+ M,
113
+ R,
114
+ F
115
+ ]);
116
+ P === "shift" || F === "shift" || C === "center" ? U.push(ke, Oe) : U.push(Oe, ke), U.push(p({
117
+ ...z,
118
+ apply({ elements: { floating: t }, availableWidth: n, availableHeight: r, rects: i }) {
119
+ if (!_e.current) return;
120
+ let a = t.style;
121
+ a.setProperty("--available-width", `${n}px`), a.setProperty("--available-height", `${r}px`);
122
+ let o = e(t).devicePixelRatio || 1, { x: s, y: c, width: l, height: u } = i.reference, d = (Math.round((s + l) * o) - Math.round(s * o)) / o, f = (Math.round((c + u) * o) - Math.round(c * o)) / o;
123
+ a.setProperty("--anchor-width", `${d}px`), a.setProperty("--anchor-height", `${f}px`);
124
+ }
125
+ }), h((e) => ({
126
+ element: B.current || i(e.elements.floating).createElement("div"),
127
+ padding: oe,
128
+ offsetParent: "floating"
129
+ }), [oe]), {
130
+ name: "transformOrigin",
131
+ fn(e) {
132
+ let { elements: t, middlewareData: n, placement: r, rects: i, y: a } = e, c = o(r), l = s(c), u = B.current, d = n.arrow?.x || 0, f = n.arrow?.y || 0, p = u?.clientWidth || 0, ee = u?.clientHeight || 0, m = d + p / 2, h = f + ee / 2, te = Math.abs(n.shift?.y || 0), ne = i.reference.height / 2, g = typeof S == "function" ? S(re(e, x, L)) : S, _ = te > g, v = {
133
+ top: `${m}px calc(100% + ${g}px)`,
134
+ bottom: `${m}px ${-g}px`,
135
+ left: `calc(100% + ${g}px) ${h}px`,
136
+ right: `${-g}px ${h}px`
137
+ }[c], y = `${m}px ${i.reference.y + ne - a}px`;
138
+ return t.floating.style.setProperty("--transform-origin", De && l === "y" && _ ? y : v), {};
139
+ }
140
+ }, te, N), n(() => {
141
+ !A && k && k.update({
142
+ referenceElement: null,
143
+ floatingElement: null,
144
+ domReferenceElement: null,
145
+ positionReference: null
146
+ });
147
+ }, [A, k]);
148
+ let W = g.useMemo(() => ({
149
+ elementResize: !D && typeof ResizeObserver < "u",
150
+ layoutShift: !D && typeof IntersectionObserver < "u"
151
+ }), [D]), { refs: G, elements: K, x: Ae, y: je, middlewareData: q, update: J, placement: Me, context: Ne, isPositioned: Y, floatingStyles: Pe } = ee({
152
+ rootContext: k,
153
+ open: O ? A : void 0,
154
+ placement: ye,
155
+ middleware: U,
156
+ strategy: ie,
157
+ whileElementsMounted: O ? void 0 : (...e) => c(...e, W),
158
+ nodeId: ce,
159
+ externalTree: ue
160
+ }), { sideX: X, sideY: Fe } = q.adaptiveOrigin || ne, Z = Y ? ie : "fixed", Ie = g.useMemo(() => {
161
+ let e = N ? {
162
+ position: Z,
163
+ [X]: Ae,
164
+ [Fe]: je
165
+ } : {
166
+ position: Z,
167
+ ...Pe
168
+ };
169
+ return Y || (e.opacity = 0), e;
170
+ }, [
171
+ N,
172
+ Z,
173
+ X,
174
+ Ae,
175
+ Fe,
176
+ je,
177
+ Pe,
178
+ Y
179
+ ]), Q = g.useRef(null);
180
+ n(() => {
181
+ if (!A) return;
182
+ let e = I.current, t = typeof e == "function" ? e() : e, n = (y(t) ? t.current : t) || null;
183
+ n !== Q.current && (G.setPositionReference(n), Q.current = n);
184
+ }, [
185
+ A,
186
+ G,
187
+ ge,
188
+ I
189
+ ]), g.useEffect(() => {
190
+ if (!A) return;
191
+ let e = I.current;
192
+ typeof e != "function" && y(e) && e.current !== Q.current && (G.setPositionReference(e.current), Q.current = e.current);
193
+ }, [
194
+ A,
195
+ G,
196
+ ge,
197
+ I
198
+ ]), g.useEffect(() => {
199
+ if (O && A && K.reference && K.floating) return c(K.reference, K.floating, J, W);
200
+ }, [
201
+ O,
202
+ A,
203
+ K,
204
+ J,
205
+ W
206
+ ]);
207
+ let $ = o(Me), Le = _(x, $, L), Re = a(Me) || "center", ze = !!q.hide?.referenceHidden;
208
+ n(() => {
209
+ le && A && Y && fe($);
210
+ }, [
211
+ le,
212
+ A,
213
+ Y,
214
+ $
215
+ ]);
216
+ let Be = g.useMemo(() => ({
217
+ position: "absolute",
218
+ top: q.arrow?.y,
219
+ left: q.arrow?.x
220
+ }), [q.arrow]), Ve = q.arrow?.centerOffset !== 0;
221
+ return g.useMemo(() => ({
222
+ positionerStyles: Ie,
223
+ arrowStyles: Be,
224
+ arrowRef: B,
225
+ arrowUncentered: Ve,
226
+ side: Le,
227
+ align: Re,
228
+ physicalSide: $,
229
+ anchorHidden: ze,
230
+ refs: G,
231
+ context: Ne,
232
+ isPositioned: Y,
233
+ update: J
234
+ }), [
235
+ Ie,
236
+ Be,
237
+ B,
238
+ Ve,
239
+ Le,
240
+ Re,
241
+ $,
242
+ ze,
243
+ G,
244
+ Ne,
245
+ Y,
246
+ J
247
+ ]);
248
+ }
249
+ function y(e) {
250
+ return e != null && "current" in e;
11
251
  }
12
252
  //#endregion
13
- export { n as SelectPositionerContext, r as useSelectPositionerContext };
253
+ export { v as useAnchorPositioning };
14
254
 
15
255
  //# sourceMappingURL=index396.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index396.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPositionerContext.displayName = \"SelectPositionerContext\";\nexport function useSelectPositionerContext() {\n const context = React.useContext(SelectPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAa,IAAuC,gBAAM,cAAc,KAAA,CAAS;AACjF,QAAA,IAAA,aAA6B,iBAAc,EAAwB,cAAc;AACjF,SAAgB,IAA6B;CAC3C,IAAM,IAAUA,EAAM,WAAW,CAAuB;CACxD,IAAI,CAAC,GACH,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAkIC,EAAoB,EAAE,IAAzI,gHAA0I;CAEpM,OAAO;AACT"}
1
+ {"version":3,"file":"index396.js","names":["React","ownerWindow"],"sources":["../../../node_modules/@base-ui/react/utils/useAnchorPositioning.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getSide, getAlignment, getSideAxis } from '@floating-ui/utils';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { autoUpdate, flip, limitShift, offset, shift, useFloating, size } from \"../floating-ui-react/index.mjs\";\nimport { useDirection } from \"../internals/direction-context/DirectionContext.mjs\";\nimport { arrow } from \"../floating-ui-react/middleware/arrow.mjs\";\nimport { hide } from \"./hideMiddleware.mjs\";\nimport { DEFAULT_SIDES } from \"./adaptiveOriginMiddleware.mjs\";\nfunction getLogicalSide(sideParam, renderedSide, isRtl) {\n const isLogicalSideParam = sideParam === 'inline-start' || sideParam === 'inline-end';\n const logicalRight = isRtl ? 'inline-start' : 'inline-end';\n const logicalLeft = isRtl ? 'inline-end' : 'inline-start';\n return {\n top: 'top',\n right: isLogicalSideParam ? logicalRight : 'right',\n bottom: 'bottom',\n left: isLogicalSideParam ? logicalLeft : 'left'\n }[renderedSide];\n}\nfunction getOffsetData(state, sideParam, isRtl) {\n const {\n rects,\n placement\n } = state;\n const data = {\n side: getLogicalSide(sideParam, getSide(placement), isRtl),\n align: getAlignment(placement) || 'center',\n anchor: {\n width: rects.reference.width,\n height: rects.reference.height\n },\n positioner: {\n width: rects.floating.width,\n height: rects.floating.height\n }\n };\n return data;\n}\n/**\n * Provides standardized anchor positioning behavior for floating elements. Wraps Floating UI's\n * `useFloating` hook.\n */\nexport function useAnchorPositioning(params) {\n const {\n // Public parameters\n anchor,\n positionMethod = 'absolute',\n side: sideParam = 'bottom',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n collisionBoundary,\n collisionPadding: collisionPaddingParam = 5,\n sticky = false,\n arrowPadding = 5,\n disableAnchorTracking = false,\n inline: inlineMiddleware,\n // Private parameters\n keepMounted = false,\n floatingRootContext,\n mounted,\n collisionAvoidance,\n shiftCrossAxis = false,\n nodeId,\n adaptiveOrigin,\n lazyFlip = false,\n externalTree\n } = params;\n const [mountSide, setMountSide] = React.useState(null);\n if (!mounted && mountSide !== null) {\n setMountSide(null);\n }\n const collisionAvoidanceSide = collisionAvoidance.side || 'flip';\n const collisionAvoidanceAlign = collisionAvoidance.align || 'flip';\n const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || 'end';\n const anchorFn = typeof anchor === 'function' ? anchor : undefined;\n const anchorFnCallback = useStableCallback(anchorFn);\n const anchorDep = anchorFn ? anchorFnCallback : anchor;\n const anchorValueRef = useValueAsRef(anchor);\n const mountedRef = useValueAsRef(mounted);\n const direction = useDirection();\n const isRtl = direction === 'rtl';\n const side = mountSide || {\n top: 'top',\n right: 'right',\n bottom: 'bottom',\n left: 'left',\n 'inline-end': isRtl ? 'left' : 'right',\n 'inline-start': isRtl ? 'right' : 'left'\n }[sideParam];\n const placement = align === 'center' ? side : `${side}-${align}`;\n let collisionPadding = collisionPaddingParam;\n\n // Create a bias to the preferred side.\n // On iOS, when the mobile software keyboard opens, the input is exactly centered\n // in the viewport, but this can cause it to flip to the top undesirably.\n const bias = 1;\n const biasTop = sideParam === 'bottom' ? bias : 0;\n const biasBottom = sideParam === 'top' ? bias : 0;\n const biasLeft = sideParam === 'right' ? bias : 0;\n const biasRight = sideParam === 'left' ? bias : 0;\n if (typeof collisionPadding === 'number') {\n collisionPadding = {\n top: collisionPadding + biasTop,\n right: collisionPadding + biasRight,\n bottom: collisionPadding + biasBottom,\n left: collisionPadding + biasLeft\n };\n } else if (collisionPadding) {\n collisionPadding = {\n top: (collisionPadding.top || 0) + biasTop,\n right: (collisionPadding.right || 0) + biasRight,\n bottom: (collisionPadding.bottom || 0) + biasBottom,\n left: (collisionPadding.left || 0) + biasLeft\n };\n }\n const commonCollisionProps = {\n boundary: collisionBoundary === 'clipping-ancestors' ? 'clippingAncestors' : collisionBoundary,\n padding: collisionPadding\n };\n\n // Using a ref assumes that the arrow element is always present in the DOM for the lifetime of the\n // popup. If this assumption ends up being false, we can switch to state to manage the arrow's\n // presence.\n const arrowRef = React.useRef(null);\n\n // Keep these reactive if they're not functions\n const sideOffsetRef = useValueAsRef(sideOffset);\n const alignOffsetRef = useValueAsRef(alignOffset);\n const sideOffsetDep = typeof sideOffset !== 'function' ? sideOffset : 0;\n const alignOffsetDep = typeof alignOffset !== 'function' ? alignOffset : 0;\n const middleware = [];\n if (inlineMiddleware) {\n middleware.push(inlineMiddleware);\n }\n middleware.push(offset(state => {\n const data = getOffsetData(state, sideParam, isRtl);\n const sideAxis = typeof sideOffsetRef.current === 'function' ? sideOffsetRef.current(data) : sideOffsetRef.current;\n const alignAxis = typeof alignOffsetRef.current === 'function' ? alignOffsetRef.current(data) : alignOffsetRef.current;\n return {\n mainAxis: sideAxis,\n crossAxis: alignAxis,\n alignmentAxis: alignAxis\n };\n }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));\n const shiftDisabled = collisionAvoidanceAlign === 'none' && collisionAvoidanceSide !== 'shift';\n const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === 'shift');\n const flipMiddleware = collisionAvoidanceSide === 'none' ? null : flip({\n ...commonCollisionProps,\n // Ensure the popup flips if it's been limited by its --available-height and it resizes.\n // Since the size() padding is smaller than the flip() padding, flip() will take precedence.\n padding: {\n top: collisionPadding.top + bias,\n right: collisionPadding.right + bias,\n bottom: collisionPadding.bottom + bias,\n left: collisionPadding.left + bias\n },\n mainAxis: !shiftCrossAxis && collisionAvoidanceSide === 'flip',\n crossAxis: collisionAvoidanceAlign === 'flip' ? 'alignment' : false,\n fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide\n });\n const shiftMiddleware = shiftDisabled ? null : shift(data => {\n const html = ownerDocument(data.elements.floating).documentElement;\n return {\n ...commonCollisionProps,\n // Use the Layout Viewport to avoid shifting around when pinch-zooming\n // for context menus.\n rootBoundary: shiftCrossAxis ? {\n x: 0,\n y: 0,\n width: html.clientWidth,\n height: html.clientHeight\n } : undefined,\n mainAxis: collisionAvoidanceAlign !== 'none',\n crossAxis: crossAxisShiftEnabled,\n limiter: sticky || shiftCrossAxis ? undefined : limitShift(limitData => {\n if (!arrowRef.current) {\n return {};\n }\n const {\n width,\n height\n } = arrowRef.current.getBoundingClientRect();\n const sideAxis = getSideAxis(getSide(limitData.placement));\n const arrowSize = sideAxis === 'y' ? width : height;\n const offsetAmount = sideAxis === 'y' ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;\n return {\n offset: arrowSize / 2 + offsetAmount / 2\n };\n })\n };\n }, [commonCollisionProps, sticky, shiftCrossAxis, collisionPadding, collisionAvoidanceAlign]);\n\n // https://floating-ui.com/docs/flip#combining-with-shift\n if (collisionAvoidanceSide === 'shift' || collisionAvoidanceAlign === 'shift' || align === 'center') {\n middleware.push(shiftMiddleware, flipMiddleware);\n } else {\n middleware.push(flipMiddleware, shiftMiddleware);\n }\n middleware.push(size({\n ...commonCollisionProps,\n apply({\n elements: {\n floating\n },\n availableWidth,\n availableHeight,\n rects\n }) {\n if (!mountedRef.current) {\n return;\n }\n const floatingStyle = floating.style;\n floatingStyle.setProperty('--available-width', `${availableWidth}px`);\n floatingStyle.setProperty('--available-height', `${availableHeight}px`);\n\n // Snap anchor dimensions to device pixels to ensure the popup's visual width matches the anchor's one.\n const dpr = ownerWindow(floating).devicePixelRatio || 1;\n const {\n x,\n y,\n width,\n height\n } = rects.reference;\n const anchorWidth = (Math.round((x + width) * dpr) - Math.round(x * dpr)) / dpr;\n const anchorHeight = (Math.round((y + height) * dpr) - Math.round(y * dpr)) / dpr;\n floatingStyle.setProperty('--anchor-width', `${anchorWidth}px`);\n floatingStyle.setProperty('--anchor-height', `${anchorHeight}px`);\n }\n }), arrow(state => ({\n // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,\n // we'll create a fake element.\n element: arrowRef.current || ownerDocument(state.elements.floating).createElement('div'),\n padding: arrowPadding,\n offsetParent: 'floating'\n }), [arrowPadding]), {\n name: 'transformOrigin',\n fn(state) {\n const {\n elements,\n middlewareData,\n placement: renderedPlacement,\n rects,\n y\n } = state;\n const currentRenderedSide = getSide(renderedPlacement);\n const currentRenderedAxis = getSideAxis(currentRenderedSide);\n const arrowEl = arrowRef.current;\n const arrowX = middlewareData.arrow?.x || 0;\n const arrowY = middlewareData.arrow?.y || 0;\n const arrowWidth = arrowEl?.clientWidth || 0;\n const arrowHeight = arrowEl?.clientHeight || 0;\n const transformX = arrowX + arrowWidth / 2;\n const transformY = arrowY + arrowHeight / 2;\n const shiftY = Math.abs(middlewareData.shift?.y || 0);\n const halfAnchorHeight = rects.reference.height / 2;\n const sideOffsetValue = typeof sideOffset === 'function' ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;\n const isOverlappingAnchor = shiftY > sideOffsetValue;\n const adjacentTransformOrigin = {\n top: `${transformX}px calc(100% + ${sideOffsetValue}px)`,\n bottom: `${transformX}px ${-sideOffsetValue}px`,\n left: `calc(100% + ${sideOffsetValue}px) ${transformY}px`,\n right: `${-sideOffsetValue}px ${transformY}px`\n }[currentRenderedSide];\n const overlapTransformOrigin = `${transformX}px ${rects.reference.y + halfAnchorHeight - y}px`;\n elements.floating.style.setProperty('--transform-origin', crossAxisShiftEnabled && currentRenderedAxis === 'y' && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);\n return {};\n }\n }, hide, adaptiveOrigin);\n useIsoLayoutEffect(() => {\n // Ensure positioning doesn't run initially for `keepMounted` elements that\n // aren't initially open.\n if (!mounted && floatingRootContext) {\n floatingRootContext.update({\n referenceElement: null,\n floatingElement: null,\n domReferenceElement: null,\n positionReference: null\n });\n }\n }, [mounted, floatingRootContext]);\n const autoUpdateOptions = React.useMemo(() => ({\n elementResize: !disableAnchorTracking && typeof ResizeObserver !== 'undefined',\n layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== 'undefined'\n }), [disableAnchorTracking]);\n const {\n refs,\n elements,\n x,\n y,\n middlewareData,\n update,\n placement: renderedPlacement,\n context,\n isPositioned,\n floatingStyles: originalFloatingStyles\n } = useFloating({\n rootContext: floatingRootContext,\n open: keepMounted ? mounted : undefined,\n placement,\n middleware,\n strategy: positionMethod,\n whileElementsMounted: keepMounted ? undefined : (...args) => autoUpdate(...args, autoUpdateOptions),\n nodeId,\n externalTree\n });\n const {\n sideX,\n sideY\n } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;\n\n // Default to `fixed` when not positioned to prevent `autoFocus` scroll jumps.\n // This ensures the popup is inside the viewport initially before it gets positioned.\n const resolvedPosition = isPositioned ? positionMethod : 'fixed';\n const floatingStyles = React.useMemo(() => {\n const base = adaptiveOrigin ? {\n position: resolvedPosition,\n [sideX]: x,\n [sideY]: y\n } : {\n position: resolvedPosition,\n ...originalFloatingStyles\n };\n if (!isPositioned) {\n base.opacity = 0;\n }\n return base;\n }, [adaptiveOrigin, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);\n const registeredPositionReferenceRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n if (!mounted) {\n return;\n }\n const anchorValue = anchorValueRef.current;\n const resolvedAnchor = typeof anchorValue === 'function' ? anchorValue() : anchorValue;\n const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;\n const finalAnchor = unwrappedElement || null;\n if (finalAnchor !== registeredPositionReferenceRef.current) {\n refs.setPositionReference(finalAnchor);\n registeredPositionReferenceRef.current = finalAnchor;\n }\n }, [mounted, refs, anchorDep, anchorValueRef]);\n React.useEffect(() => {\n if (!mounted) {\n return;\n }\n const anchorValue = anchorValueRef.current;\n\n // Refs from parent components are set after useLayoutEffect runs and are available in useEffect.\n // Therefore, if the anchor is a ref, we need to update the position reference in useEffect.\n if (typeof anchorValue === 'function') {\n return;\n }\n if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {\n refs.setPositionReference(anchorValue.current);\n registeredPositionReferenceRef.current = anchorValue.current;\n }\n }, [mounted, refs, anchorDep, anchorValueRef]);\n React.useEffect(() => {\n if (keepMounted && mounted && elements.reference && elements.floating) {\n return autoUpdate(elements.reference, elements.floating, update, autoUpdateOptions);\n }\n return undefined;\n }, [keepMounted, mounted, elements, update, autoUpdateOptions]);\n const renderedSide = getSide(renderedPlacement);\n const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);\n const renderedAlign = getAlignment(renderedPlacement) || 'center';\n const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);\n\n // Locks the flip (makes it \"sticky\") so it doesn't prefer a given placement\n // and flips back lazily, not eagerly. Ideal for filtered lists that change\n // the size of the popup dynamically to avoid unwanted flipping when typing.\n useIsoLayoutEffect(() => {\n if (lazyFlip && mounted && isPositioned) {\n setMountSide(renderedSide);\n }\n }, [lazyFlip, mounted, isPositioned, renderedSide]);\n const arrowStyles = React.useMemo(() => ({\n position: 'absolute',\n top: middlewareData.arrow?.y,\n left: middlewareData.arrow?.x\n }), [middlewareData.arrow]);\n const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;\n return React.useMemo(() => ({\n positionerStyles: floatingStyles,\n arrowStyles,\n arrowRef,\n arrowUncentered,\n side: logicalRenderedSide,\n align: renderedAlign,\n physicalSide: renderedSide,\n anchorHidden,\n refs,\n context,\n isPositioned,\n update\n }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update]);\n}\nfunction isRef(param) {\n return param != null && 'current' in param;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AAaA,SAAS,EAAe,GAAW,GAAc,GAAO;CACtD,IAAM,IAAqB,MAAc,kBAAkB,MAAc;CAGzE,OAAO;EACL,KAAK;EACL,OAAO,IAJY,IAAQ,iBAAiB,eAID;EAC3C,QAAQ;EACR,MAAM,IALY,IAAQ,eAAe,iBAKA;CAC3C,EAAE;AACJ;AACA,SAAS,GAAc,GAAO,GAAW,GAAO;CAC9C,IAAM,EACJ,UACA,iBACE;CAaJ,OAAO;EAXL,MAAM,EAAe,GAAW,EAAQ,CAAS,GAAG,CAAK;EACzD,OAAO,EAAa,CAAS,KAAK;EAClC,QAAQ;GACN,OAAO,EAAM,UAAU;GACvB,QAAQ,EAAM,UAAU;EAC1B;EACA,YAAY;GACV,OAAO,EAAM,SAAS;GACtB,QAAQ,EAAM,SAAS;EACzB;CAEQ;AACZ;AAKA,SAAgB,EAAqB,GAAQ;CAC3C,IAAM,EAEJ,WACA,qBAAiB,YACjB,MAAM,IAAY,UAClB,gBAAa,GACb,WAAQ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Aa,CAAY;CAE7B,GAAG;EAAC;EAAU;EAAS;EAAc;CAAY,CAAC;CAClD,IAAM,KAAcA,EAAM,eAAe;EACvC,UAAU;EACV,KAAK,EAAe,OAAO;EAC3B,MAAM,EAAe,OAAO;CAC9B,IAAI,CAAC,EAAe,KAAK,CAAC,GACpB,KAAkB,EAAe,OAAO,iBAAiB;CAC/D,OAAOA,EAAM,eAAe;EAC1B,kBAAkB;EAClB;EACA;EACA;EACA,MAAM;EACN,OAAO;EACP,cAAc;EACd;EACA;EACA;EACA;EACA;CACF,IAAI;EAAC;EAAgB;EAAa;EAAU;EAAiB;EAAqB;EAAe;EAAc;EAAc;EAAM;EAAS;EAAc;CAAM,CAAC;AACnK;AACA,SAAS,EAAM,GAAO;CACpB,OAAO,KAAS,QAAQ,aAAa;AACvC"}
package/dist/index397.js CHANGED
@@ -1,14 +1,15 @@
1
- //#region ../../node_modules/@base-ui/react/select/popup/utils.mjs
2
- function e(e, t) {
3
- e && Object.assign(e.style, t);
1
+ "use client";
2
+ import e from "./index183.js";
3
+ import * as t from "react";
4
+ //#region ../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
5
+ var n = /*#__PURE__*/ t.createContext(void 0);
6
+ process.env.NODE_ENV !== "production" && (n.displayName = "SelectPositionerContext");
7
+ function r() {
8
+ let r = t.useContext(n);
9
+ if (!r) throw Error(process.env.NODE_ENV === "production" ? e(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
10
+ return r;
4
11
  }
5
- var t = {
6
- position: "relative",
7
- maxHeight: "100%",
8
- overflowX: "hidden",
9
- overflowY: "auto"
10
- };
11
12
  //#endregion
12
- export { t as LIST_FUNCTIONAL_STYLES, e as clearStyles };
13
+ export { n as SelectPositionerContext, r as useSelectPositionerContext };
13
14
 
14
15
  //# sourceMappingURL=index397.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index397.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/popup/utils.mjs"],"sourcesContent":["export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAgB,EAAY,GAAS,GAAgB;CACnD,AAAI,KACF,OAAO,OAAO,EAAQ,OAAO,CAAc;AAE/C;AACA,IAAa,IAAyB;CACpC,UAAU;CACV,WAAW;CACX,WAAW;CACX,WAAW;AACb"}
1
+ {"version":3,"file":"index397.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPositionerContext.displayName = \"SelectPositionerContext\";\nexport function useSelectPositionerContext() {\n const context = React.useContext(SelectPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAa,IAAuC,gBAAM,cAAc,KAAA,CAAS;AACjF,QAAA,IAAA,aAA6B,iBAAc,EAAwB,cAAc;AACjF,SAAgB,IAA6B;CAC3C,IAAM,IAAUA,EAAM,WAAW,CAAuB;CACxD,IAAI,CAAC,GACH,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAkIC,EAAoB,EAAE,IAAzI,gHAA0I;CAEpM,OAAO;AACT"}
package/dist/index398.js CHANGED
@@ -1,10 +1,14 @@
1
- import { EMPTY_OBJECT as e } from "./index191.js";
2
- import { DISABLED_TRANSITIONS_STYLE as t } from "./index239.js";
3
- //#region ../../node_modules/@base-ui/react/utils/getDisabledMountTransitionStyles.mjs
4
- function n(n) {
5
- return n === "starting" ? t : e;
1
+ //#region ../../node_modules/@base-ui/react/select/popup/utils.mjs
2
+ function e(e, t) {
3
+ e && Object.assign(e.style, t);
6
4
  }
5
+ var t = {
6
+ position: "relative",
7
+ maxHeight: "100%",
8
+ overflowX: "hidden",
9
+ overflowY: "auto"
10
+ };
7
11
  //#endregion
8
- export { n as getDisabledMountTransitionStyles };
12
+ export { t as LIST_FUNCTIONAL_STYLES, e as clearStyles };
9
13
 
10
14
  //# sourceMappingURL=index398.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index398.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/getDisabledMountTransitionStyles.mjs"],"sourcesContent":["import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { DISABLED_TRANSITIONS_STYLE } from \"../internals/constants.mjs\";\nexport function getDisabledMountTransitionStyles(transitionStatus) {\n return transitionStatus === 'starting' ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;\n}"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAgB,EAAiC,GAAkB;CACjE,OAAO,MAAqB,aAAa,IAA6B;AACxE"}
1
+ {"version":3,"file":"index398.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/popup/utils.mjs"],"sourcesContent":["export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAgB,EAAY,GAAS,GAAgB;CACnD,AAAI,KACF,OAAO,OAAO,EAAQ,OAAO,CAAc;AAE/C;AACA,IAAa,IAAyB;CACpC,UAAU;CACV,WAAW;CACX,WAAW;CACX,WAAW;AACb"}
package/dist/index399.js CHANGED
@@ -1,26 +1,10 @@
1
- "use client";
2
- import { useRenderElement as e } from "./index196.js";
3
- import { popupStateMapping as t } from "./index198.js";
4
- import { getDisabledMountTransitionStyles as n } from "./index398.js";
5
- //#region ../../node_modules/@base-ui/react/utils/usePositioner.mjs
6
- function r(r, i, { styles: a, transitionStatus: o, props: s, refs: c, hidden: l, inert: u = !1 }) {
7
- let d = { ...a };
8
- return u && (d.pointerEvents = "none"), e("div", r, {
9
- state: i,
10
- ref: c,
11
- props: [
12
- {
13
- role: "presentation",
14
- hidden: l,
15
- style: d
16
- },
17
- n(o),
18
- s
19
- ],
20
- stateAttributesMapping: t
21
- });
1
+ import { EMPTY_OBJECT as e } from "./index191.js";
2
+ import { DISABLED_TRANSITIONS_STYLE as t } from "./index239.js";
3
+ //#region ../../node_modules/@base-ui/react/utils/getDisabledMountTransitionStyles.mjs
4
+ function n(n) {
5
+ return n === "starting" ? t : e;
22
6
  }
23
7
  //#endregion
24
- export { r as usePositioner };
8
+ export { n as getDisabledMountTransitionStyles };
25
9
 
26
10
  //# sourceMappingURL=index399.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index399.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/usePositioner.mjs"],"sourcesContent":["'use client';\n\nimport { popupStateMapping } from \"./popupStateMapping.mjs\";\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { getDisabledMountTransitionStyles } from \"./getDisabledMountTransitionStyles.mjs\";\n/**\n * Renders the shared outer Positioner element used by popup components.\n * Applies the common role, hidden state, transition styles, state attributes, and optional inert styling.\n */\nexport function usePositioner(componentProps, state, {\n styles,\n transitionStatus,\n props,\n refs,\n hidden,\n inert = false\n}) {\n const style = {\n ...styles\n };\n if (inert) {\n style.pointerEvents = 'none';\n }\n return useRenderElement('div', componentProps, {\n state,\n ref: refs,\n props: [{\n role: 'presentation',\n hidden,\n style\n }, getDisabledMountTransitionStyles(transitionStatus), props],\n stateAttributesMapping: popupStateMapping\n });\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AASA,SAAgB,EAAc,GAAgB,GAAO,EACnD,WACA,qBACA,UACA,SACA,WACA,WAAQ,MACP;CACD,IAAM,IAAQ,EACZ,GAAG,EACL;CAIA,OAHI,MACF,EAAM,gBAAgB,SAEjB,EAAiB,OAAO,GAAgB;EAC7C;EACA,KAAK;EACL,OAAO;GAAC;IACN,MAAM;IACN;IACA;GACF;GAAG,EAAiC,CAAgB;GAAG;EAAK;EAC5D,wBAAwB;CAC1B,CAAC;AACH"}
1
+ {"version":3,"file":"index399.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/getDisabledMountTransitionStyles.mjs"],"sourcesContent":["import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { DISABLED_TRANSITIONS_STYLE } from \"../internals/constants.mjs\";\nexport function getDisabledMountTransitionStyles(transitionStatus) {\n return transitionStatus === 'starting' ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;\n}"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAgB,EAAiC,GAAkB;CACjE,OAAO,MAAqB,aAAa,IAA6B;AACxE"}
package/dist/index400.js CHANGED
@@ -1,26 +1,26 @@
1
1
  "use client";
2
- import { useIsoLayoutEffect as e } from "./index204.js";
3
- import { ownerDocument as t } from "./index229.js";
4
- import { useScrollLock as n } from "./index284.js";
5
- import * as r from "react";
6
- //#region ../../node_modules/@base-ui/react/utils/useAnchoredPopupScrollLock.mjs
7
- var i = 20;
8
- function a(a, o, s, c) {
9
- let [l, u] = r.useState(!1);
10
- e(() => {
11
- if (!a || !o || s == null) {
12
- u(!1);
13
- return;
14
- }
15
- let e = t(s).documentElement.clientWidth, n = s.offsetWidth;
16
- u(e > 0 && n > 0 && n >= e - i);
17
- }, [
18
- a,
19
- o,
20
- s
21
- ]), n(a && (!o || l), c);
2
+ import { useRenderElement as e } from "./index196.js";
3
+ import { popupStateMapping as t } from "./index198.js";
4
+ import { getDisabledMountTransitionStyles as n } from "./index399.js";
5
+ //#region ../../node_modules/@base-ui/react/utils/usePositioner.mjs
6
+ function r(r, i, { styles: a, transitionStatus: o, props: s, refs: c, hidden: l, inert: u = !1 }) {
7
+ let d = { ...a };
8
+ return u && (d.pointerEvents = "none"), e("div", r, {
9
+ state: i,
10
+ ref: c,
11
+ props: [
12
+ {
13
+ role: "presentation",
14
+ hidden: l,
15
+ style: d
16
+ },
17
+ n(o),
18
+ s
19
+ ],
20
+ stateAttributesMapping: t
21
+ });
22
22
  }
23
23
  //#endregion
24
- export { a as useAnchoredPopupScrollLock };
24
+ export { r as usePositioner };
25
25
 
26
26
  //# sourceMappingURL=index400.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index400.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/utils/useAnchoredPopupScrollLock.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useScrollLock } from '@base-ui/utils/useScrollLock';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\n\n// Touch-opened popups normally avoid scroll locking so users can still swipe outside to dismiss.\n// This hook re-enables scroll lock only when the popup is effectively full-width.\n// Treat popups with up to 20px of total horizontal gutter as full-width so common ~10px side\n// padding still locks scroll, since that leaves too little outside space for a reliable swipe.\nconst VIEWPORT_WIDTH_TOLERANCE_PX = 20;\n\n/**\n * Manages scroll lock for anchored popups. For non-touch opens, scroll lock is applied when\n * enabled. For touch opens, scroll lock is applied only when the positioner width is effectively\n * viewport-sized.\n */\nexport function useAnchoredPopupScrollLock(enabled, touchOpen, positionerElement, referenceElement) {\n const [touchOpenShouldLockScroll, setTouchOpenShouldLockScroll] = React.useState(false);\n useIsoLayoutEffect(() => {\n if (!enabled || !touchOpen || positionerElement == null) {\n setTouchOpenShouldLockScroll(false);\n return;\n }\n const viewportWidth = ownerDocument(positionerElement).documentElement.clientWidth;\n const popupWidth = positionerElement.offsetWidth;\n setTouchOpenShouldLockScroll(viewportWidth > 0 && popupWidth > 0 && popupWidth >= viewportWidth - VIEWPORT_WIDTH_TOLERANCE_PX);\n }, [enabled, touchOpen, positionerElement]);\n useScrollLock(enabled && (!touchOpen || touchOpenShouldLockScroll), referenceElement);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAWA,IAAM,IAA8B;AAOpC,SAAgB,EAA2B,GAAS,GAAW,GAAmB,GAAkB;CAClG,IAAM,CAAC,GAA2B,KAAgCA,EAAM,SAAS,EAAK;CAUtF,AATA,QAAyB;EACvB,IAAI,CAAC,KAAW,CAAC,KAAa,KAAqB,MAAM;GACvD,EAA6B,EAAK;GAClC;EACF;EACA,IAAM,IAAgB,EAAc,CAAiB,CAAC,CAAC,gBAAgB,aACjE,IAAa,EAAkB;EACrC,EAA6B,IAAgB,KAAK,IAAa,KAAK,KAAc,IAAgB,CAA2B;CAC/H,GAAG;EAAC;EAAS;EAAW;CAAiB,CAAC,GAC1C,EAAc,MAAY,CAAC,KAAa,IAA4B,CAAgB;AACtF"}
1
+ {"version":3,"file":"index400.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/usePositioner.mjs"],"sourcesContent":["'use client';\n\nimport { popupStateMapping } from \"./popupStateMapping.mjs\";\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { getDisabledMountTransitionStyles } from \"./getDisabledMountTransitionStyles.mjs\";\n/**\n * Renders the shared outer Positioner element used by popup components.\n * Applies the common role, hidden state, transition styles, state attributes, and optional inert styling.\n */\nexport function usePositioner(componentProps, state, {\n styles,\n transitionStatus,\n props,\n refs,\n hidden,\n inert = false\n}) {\n const style = {\n ...styles\n };\n if (inert) {\n style.pointerEvents = 'none';\n }\n return useRenderElement('div', componentProps, {\n state,\n ref: refs,\n props: [{\n role: 'presentation',\n hidden,\n style\n }, getDisabledMountTransitionStyles(transitionStatus), props],\n stateAttributesMapping: popupStateMapping\n });\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AASA,SAAgB,EAAc,GAAgB,GAAO,EACnD,WACA,qBACA,UACA,SACA,WACA,WAAQ,MACP;CACD,IAAM,IAAQ,EACZ,GAAG,EACL;CAIA,OAHI,MACF,EAAM,gBAAgB,SAEjB,EAAiB,OAAO,GAAgB;EAC7C;EACA,KAAK;EACL,OAAO;GAAC;IACN,MAAM;IACN;IACA;GACF;GAAG,EAAiC,CAAgB;GAAG;EAAK;EAC5D,wBAAwB;CAC1B,CAAC;AACH"}
package/dist/index401.js CHANGED
@@ -1,112 +1,26 @@
1
1
  "use client";
2
- import { useStableCallback as e } from "./index202.js";
3
- import { useIsoLayoutEffect as t } from "./index204.js";
4
- import { none as n } from "./index208.js";
5
- import { createChangeEventDetails as r } from "./index209.js";
6
- import { DROPDOWN_COLLISION_AVOIDANCE as i } from "./index239.js";
7
- import { useStore as a } from "./index260.js";
8
- import { inertValue as ee } from "./index281.js";
9
- import { InternalBackdrop as o } from "./index282.js";
10
- import { useSelectFloatingContext as s, useSelectRootContext as c } from "./index366.js";
11
- import { findItemIndex as l, selectedValueIncludes as u } from "./index373.js";
12
- import { selectors as d } from "./index376.js";
13
- import { CompositeList as f } from "./index390.js";
14
- import { useAnchorPositioning as te } from "./index395.js";
15
- import { SelectPositionerContext as ne } from "./index396.js";
16
- import { clearStyles as p } from "./index397.js";
17
- import { usePositioner as re } from "./index399.js";
18
- import { useAnchoredPopupScrollLock as ie } from "./index400.js";
19
- import * as m from "react";
20
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
21
- //#region ../../node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs
22
- var _ = { position: "fixed" }, v = /*#__PURE__*/ m.forwardRef(function(v, ae) {
23
- let { anchor: y, positionMethod: oe = "absolute", className: se, render: ce, side: le = "bottom", align: ue = "center", sideOffset: b = 0, alignOffset: x = 0, collisionBoundary: S = "clipping-ancestors", collisionPadding: C, arrowPadding: w = 5, sticky: T = !1, disableAnchorTracking: E, alignItemWithTrigger: D = !0, collisionAvoidance: O = i, style: de, ...k } = v, { store: A, listRef: j, labelsRef: M, alignItemWithTriggerActiveRef: N, selectedItemTextRef: P, valuesRef: F, initialValueRef: I, popupRef: L, setValue: R } = c(), z = s(), B = a(A, d.open), V = a(A, d.mounted), H = a(A, d.modal), U = a(A, d.value), W = a(A, d.openMethod), G = a(A, d.positionerElement), K = a(A, d.triggerElement), q = a(A, d.isItemEqualToValue), fe = a(A, d.transitionStatus), pe = m.useRef(null), me = m.useRef(null), [J, Y] = m.useState(D), X = V && J && W !== "touch";
24
- !V && J !== D && Y(D), t(() => {
25
- V || (d.scrollUpArrowVisible(A.state) && A.set("scrollUpArrowVisible", !1), d.scrollDownArrowVisible(A.state) && A.set("scrollDownArrowVisible", !1));
26
- }, [A, V]), m.useImperativeHandle(N, () => X), ie((X || H) && B, W === "touch", G, K);
27
- let Z = te({
28
- anchor: y,
29
- floatingRootContext: z,
30
- positionMethod: oe,
31
- mounted: V,
32
- side: le,
33
- sideOffset: b,
34
- align: ue,
35
- alignOffset: x,
36
- arrowPadding: w,
37
- collisionBoundary: S,
38
- collisionPadding: C,
39
- sticky: T,
40
- disableAnchorTracking: E ?? X,
41
- collisionAvoidance: O,
42
- keepMounted: !0
43
- }), Q = X ? "none" : Z.side, he = X ? _ : Z.positionerStyles, ge = {
44
- open: B,
45
- side: Q,
46
- align: Z.align,
47
- anchorHidden: Z.anchorHidden
48
- };
49
- t(() => {
50
- A.set("popupSide", Z.side);
51
- }, [A, Z.side]);
52
- let _e = re(v, ge, {
53
- styles: he,
54
- transitionStatus: fe,
55
- props: k,
56
- refs: [ae, e((e) => {
57
- A.set("positionerElement", e);
58
- })],
59
- hidden: !V,
60
- inert: !B
61
- }), $ = m.useRef(0), ve = e((e) => {
62
- if (e.size === 0 && $.current === 0 || F.current.length === 0) return;
63
- let t = $.current;
64
- if ($.current = e.size, e.size === t) return;
65
- let i = r(n);
66
- if (t !== 0 && !A.state.multiple && U !== null && l(F.current, U, q) === -1) {
67
- let e = I.current, t = e != null && l(F.current, e, q) !== -1 ? e : null;
68
- R(t, i), t === null && (A.set("selectedIndex", null), P.current = null);
2
+ import { useIsoLayoutEffect as e } from "./index204.js";
3
+ import { ownerDocument as t } from "./index229.js";
4
+ import { useScrollLock as n } from "./index284.js";
5
+ import * as r from "react";
6
+ //#region ../../node_modules/@base-ui/react/utils/useAnchoredPopupScrollLock.mjs
7
+ var i = 20;
8
+ function a(a, o, s, c) {
9
+ let [l, u] = r.useState(!1);
10
+ e(() => {
11
+ if (!a || !o || s == null) {
12
+ u(!1);
13
+ return;
69
14
  }
70
- if (t !== 0 && A.state.multiple && Array.isArray(U)) {
71
- let e = (e) => l(F.current, e, q) !== -1, t = U.filter((t) => e(t));
72
- (t.length !== U.length || t.some((e) => !u(U, e, q))) && (R(t, i), t.length === 0 && (A.set("selectedIndex", null), P.current = null));
73
- }
74
- if (B && X) {
75
- A.update({
76
- scrollUpArrowVisible: !1,
77
- scrollDownArrowVisible: !1
78
- });
79
- let e = { height: "" };
80
- p(G, e), p(L.current, e);
81
- }
82
- }), ye = m.useMemo(() => ({
83
- ...Z,
84
- side: Q,
85
- alignItemWithTriggerActive: X,
86
- setControlledAlignItemWithTrigger: Y,
87
- scrollUpArrowRef: pe,
88
- scrollDownArrowRef: me
89
- }), [
90
- Z,
91
- Q,
92
- X,
93
- Y
94
- ]);
95
- return /*#__PURE__*/ h(f, {
96
- elementsRef: j,
97
- labelsRef: M,
98
- onMapChange: ve,
99
- children: /*#__PURE__*/ g(ne.Provider, {
100
- value: ye,
101
- children: [V && H && /*#__PURE__*/ h(o, {
102
- inert: ee(!B),
103
- cutout: K
104
- }), _e]
105
- })
106
- });
107
- });
108
- process.env.NODE_ENV !== "production" && (v.displayName = "SelectPositioner");
15
+ let e = t(s).documentElement.clientWidth, n = s.offsetWidth;
16
+ u(e > 0 && n > 0 && n >= e - i);
17
+ }, [
18
+ a,
19
+ o,
20
+ s
21
+ ]), n(a && (!o || l), c);
22
+ }
109
23
  //#endregion
110
- export { v as SelectPositioner };
24
+ export { a as useAnchoredPopupScrollLock };
111
25
 
112
26
  //# sourceMappingURL=index401.js.map