@boxcustodia/library 1.3.5 → 1.4.2

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 (372) hide show
  1. package/dist/index.d.ts +7 -14
  2. package/dist/index.es100.js +1 -1
  3. package/dist/index.es101.js +10 -14
  4. package/dist/index.es102.js +12 -2495
  5. package/dist/index.es103.js +2497 -10
  6. package/dist/index.es104.js +3 -3
  7. package/dist/index.es105.js +5 -5
  8. package/dist/index.es106.js +1 -1
  9. package/dist/index.es108.js +55 -41
  10. package/dist/index.es109.js +54 -41
  11. package/dist/index.es11.js +1 -1
  12. package/dist/index.es110.js +92 -18
  13. package/dist/index.es111.js +35 -39
  14. package/dist/index.es112.js +23 -54
  15. package/dist/index.es113.js +29 -54
  16. package/dist/index.es114.js +40 -91
  17. package/dist/index.es115.js +42 -37
  18. package/dist/index.es116.js +17 -23
  19. package/dist/index.es117.js +39 -28
  20. package/dist/index.es118.js +1 -1
  21. package/dist/index.es119.js +1 -1
  22. package/dist/index.es122.js +1 -1
  23. package/dist/index.es124.js +7 -7
  24. package/dist/index.es125.js +257 -18
  25. package/dist/index.es126.js +13 -259
  26. package/dist/index.es127.js +39 -13
  27. package/dist/index.es128.js +14 -39
  28. package/dist/index.es129.js +12 -6
  29. package/dist/index.es136.js +1 -1
  30. package/dist/index.es137.js +3 -3
  31. package/dist/index.es138.js +1 -1
  32. package/dist/index.es139.js +1 -1
  33. package/dist/index.es141.js +17 -18
  34. package/dist/index.es142.js +42 -25
  35. package/dist/index.es143.js +10 -18
  36. package/dist/index.es144.js +10 -44
  37. package/dist/index.es145.js +21 -10
  38. package/dist/index.es146.js +7 -4
  39. package/dist/index.es147.js +10 -848
  40. package/dist/index.es148.js +13 -240
  41. package/dist/index.es149.js +19 -4
  42. package/dist/index.es150.js +25 -67
  43. package/dist/index.es151.js +238 -19
  44. package/dist/index.es152.js +69 -13
  45. package/dist/index.es153.js +848 -10
  46. package/dist/index.es154.js +4 -13
  47. package/dist/index.es156.js +1 -1
  48. package/dist/index.es158.js +2 -2
  49. package/dist/index.es159.js +1 -1
  50. package/dist/index.es160.js +1 -1
  51. package/dist/index.es161.js +1 -1
  52. package/dist/index.es162.js +9 -9
  53. package/dist/index.es163.js +3 -3
  54. package/dist/index.es164.js +14 -14
  55. package/dist/index.es165.js +2 -2
  56. package/dist/index.es166.js +7 -215
  57. package/dist/index.es167.js +2 -8
  58. package/dist/index.es168.js +33 -2
  59. package/dist/index.es169.js +396 -23
  60. package/dist/index.es170.js +14 -405
  61. package/dist/index.es171.js +32 -14
  62. package/dist/index.es172.js +10 -32
  63. package/dist/index.es173.js +6 -11
  64. package/dist/index.es174.js +19 -6
  65. package/dist/index.es175.js +34 -17
  66. package/dist/index.es176.js +210 -30
  67. package/dist/index.es177.js +19 -25
  68. package/dist/index.es178.js +37 -205
  69. package/dist/index.es179.js +7 -17
  70. package/dist/index.es180.js +25 -35
  71. package/dist/index.es181.js +205 -11
  72. package/dist/index.es186.js +4 -4
  73. package/dist/index.es187.js +3 -3
  74. package/dist/index.es188.js +2 -2
  75. package/dist/index.es192.js +1 -1
  76. package/dist/index.es193.js +9 -9
  77. package/dist/index.es194.js +8 -8
  78. package/dist/index.es195.js +4 -4
  79. package/dist/index.es196.js +3 -45
  80. package/dist/index.es197.js +45 -7
  81. package/dist/index.es198.js +8 -4
  82. package/dist/index.es200.js +1 -1
  83. package/dist/index.es201.js +26 -35
  84. package/dist/index.es202.js +2286 -113
  85. package/dist/index.es203.js +34 -15
  86. package/dist/index.es204.js +118 -8
  87. package/dist/index.es205.js +16 -2
  88. package/dist/index.es206.js +8 -2
  89. package/dist/index.es207.js +2 -26
  90. package/dist/index.es208.js +2 -2291
  91. package/dist/index.es209.js +2 -6
  92. package/dist/index.es210.js +51 -10
  93. package/dist/index.es211.js +59 -2048
  94. package/dist/index.es212.js +21 -2
  95. package/dist/index.es213.js +6 -50
  96. package/dist/index.es214.js +35 -62
  97. package/dist/index.es215.js +11 -14
  98. package/dist/index.es216.js +6 -9
  99. package/dist/index.es217.js +14 -40
  100. package/dist/index.es218.js +2053 -17
  101. package/dist/index.es219.js +19 -8
  102. package/dist/index.es220.js +13 -5
  103. package/dist/index.es221.js +6 -4
  104. package/dist/index.es222.js +6 -17
  105. package/dist/index.es223.js +52 -6
  106. package/dist/index.es224.js +6 -5
  107. package/dist/index.es225.js +6 -8
  108. package/dist/index.es226.js +7 -6
  109. package/dist/index.es227.js +7 -6
  110. package/dist/index.es228.js +16 -16
  111. package/dist/index.es229.js +6 -13
  112. package/dist/index.es230.js +6 -13
  113. package/dist/index.es231.js +8 -6
  114. package/dist/index.es232.js +13 -6
  115. package/dist/index.es233.js +9 -5
  116. package/dist/index.es234.js +5 -4
  117. package/dist/index.es235.js +81 -510
  118. package/dist/index.es236.js +6 -50
  119. package/dist/index.es237.js +17 -17
  120. package/dist/index.es238.js +9 -9
  121. package/dist/index.es239.js +7 -19
  122. package/dist/index.es240.js +6 -8
  123. package/dist/index.es241.js +6 -7
  124. package/dist/index.es242.js +7 -7
  125. package/dist/index.es243.js +5 -5
  126. package/dist/index.es244.js +4 -6
  127. package/dist/index.es245.js +5 -9
  128. package/dist/index.es246.js +8 -5
  129. package/dist/index.es247.js +6 -9
  130. package/dist/index.es248.js +15 -12
  131. package/dist/index.es249.js +4 -9
  132. package/dist/index.es250.js +513 -8
  133. package/dist/index.es251.js +50 -11
  134. package/dist/index.es252.js +17 -14
  135. package/dist/index.es253.js +9 -6
  136. package/dist/index.es254.js +19 -7
  137. package/dist/index.es255.js +8 -6
  138. package/dist/index.es256.js +7 -6
  139. package/dist/index.es257.js +7 -6
  140. package/dist/index.es258.js +5 -9
  141. package/dist/index.es259.js +6 -84
  142. package/dist/index.es26.js +2 -2
  143. package/dist/index.es260.js +10 -65
  144. package/dist/index.es261.js +5 -37
  145. package/dist/index.es262.js +8 -9
  146. package/dist/index.es263.js +12 -8
  147. package/dist/index.es264.js +9 -7
  148. package/dist/index.es265.js +10 -10
  149. package/dist/index.es266.js +14 -7
  150. package/dist/index.es267.js +65 -8
  151. package/dist/index.es268.js +37 -6
  152. package/dist/index.es269.js +9 -5
  153. package/dist/index.es270.js +8 -15
  154. package/dist/index.es271.js +7 -11
  155. package/dist/index.es272.js +8 -25
  156. package/dist/index.es273.js +16 -19
  157. package/dist/index.es274.js +12 -52
  158. package/dist/index.es275.js +176 -14
  159. package/dist/index.es276.js +24 -177
  160. package/dist/index.es277.js +2 -205
  161. package/dist/index.es278.js +2 -22
  162. package/dist/index.es279.js +204 -24
  163. package/dist/index.es280.js +21 -392
  164. package/dist/index.es281.js +25 -8
  165. package/dist/index.es282.js +393 -3
  166. package/dist/index.es283.js +8 -45
  167. package/dist/index.es284.js +3 -32
  168. package/dist/index.es285.js +43 -50
  169. package/dist/index.es286.js +30 -18
  170. package/dist/index.es287.js +51 -21
  171. package/dist/index.es288.js +18 -61
  172. package/dist/index.es289.js +21 -31
  173. package/dist/index.es290.js +61 -75
  174. package/dist/index.es291.js +30 -5
  175. package/dist/index.es292.js +74 -12
  176. package/dist/index.es293.js +6 -43
  177. package/dist/index.es294.js +13 -32
  178. package/dist/index.es295.js +43 -7
  179. package/dist/index.es296.js +33 -21
  180. package/dist/index.es297.js +7 -27
  181. package/dist/index.es298.js +19 -425
  182. package/dist/index.es299.js +27 -12
  183. package/dist/index.es300.js +423 -30
  184. package/dist/index.es301.js +13 -2
  185. package/dist/index.es302.js +34 -22
  186. package/dist/index.es303.js +2 -23
  187. package/dist/index.es304.js +51 -9246
  188. package/dist/index.es305.js +51 -15094
  189. package/dist/index.es306.js +2 -283
  190. package/dist/index.es307.js +22 -60
  191. package/dist/index.es308.js +22 -9
  192. package/dist/index.es309.js +9258 -28
  193. package/dist/index.es310.js +15090 -180
  194. package/dist/index.es311.js +283 -2
  195. package/dist/index.es312.js +59 -62
  196. package/dist/index.es313.js +9 -64
  197. package/dist/index.es314.js +29 -2
  198. package/dist/index.es315.js +198 -2
  199. package/dist/index.es32.js +7 -8
  200. package/dist/index.es320.js +1 -1
  201. package/dist/index.es321.js +2 -2
  202. package/dist/index.es322.js +4 -4
  203. package/dist/index.es323.js +4 -4
  204. package/dist/index.es324.js +2 -2
  205. package/dist/index.es325.js +2 -2
  206. package/dist/index.es326.js +2 -2
  207. package/dist/index.es327.js +3 -3
  208. package/dist/index.es328.js +3 -3
  209. package/dist/index.es329.js +5 -5
  210. package/dist/index.es33.js +18 -19
  211. package/dist/index.es330.js +5 -5
  212. package/dist/index.es331.js +3 -3
  213. package/dist/index.es332.js +3 -3
  214. package/dist/index.es333.js +2 -2
  215. package/dist/index.es334.js +3 -3
  216. package/dist/index.es335.js +3 -3
  217. package/dist/index.es336.js +3 -3
  218. package/dist/index.es337.js +2 -2
  219. package/dist/index.es338.js +2 -2
  220. package/dist/index.es339.js +2 -2
  221. package/dist/index.es34.js +6 -6
  222. package/dist/index.es340.js +3 -3
  223. package/dist/index.es341.js +3 -3
  224. package/dist/index.es342.js +3 -3
  225. package/dist/index.es343.js +3 -3
  226. package/dist/index.es344.js +3 -3
  227. package/dist/index.es345.js +3 -3
  228. package/dist/index.es346.js +2 -2
  229. package/dist/index.es347.js +5 -5
  230. package/dist/index.es348.js +5 -5
  231. package/dist/index.es349.js +3 -3
  232. package/dist/index.es350.js +3 -3
  233. package/dist/index.es352.js +3 -3
  234. package/dist/index.es353.js +3 -3
  235. package/dist/index.es371.js +2 -2
  236. package/dist/index.es373.js +2 -2
  237. package/dist/index.es374.js +2 -8
  238. package/dist/index.es375.js +2 -2
  239. package/dist/index.es376.js +8 -2
  240. package/dist/index.es378.js +68 -2
  241. package/dist/index.es379.js +31 -106
  242. package/dist/index.es380.js +9 -76
  243. package/dist/index.es381.js +153 -35
  244. package/dist/index.es382.js +108 -63
  245. package/dist/index.es383.js +68 -33
  246. package/dist/index.es384.js +31 -65
  247. package/dist/index.es385.js +17 -113
  248. package/dist/index.es386.js +141 -93
  249. package/dist/index.es387.js +115 -43
  250. package/dist/index.es388.js +2 -2
  251. package/dist/index.es389.js +106 -2
  252. package/dist/index.es390.js +76 -2
  253. package/dist/index.es391.js +36 -3
  254. package/dist/index.es392.js +64 -3
  255. package/dist/index.es393.js +34 -3
  256. package/dist/index.es394.js +66 -3
  257. package/dist/index.es395.js +113 -3
  258. package/dist/index.es396.js +94 -3
  259. package/dist/index.es397.js +42 -239
  260. package/dist/index.es398.js +4 -384
  261. package/dist/index.es399.js +4 -169
  262. package/dist/index.es400.js +4 -153
  263. package/dist/index.es401.js +4 -142
  264. package/dist/index.es402.js +2 -2
  265. package/dist/index.es404.js +2 -2
  266. package/dist/index.es406.js +2 -2
  267. package/dist/index.es407.js +241 -4
  268. package/dist/index.es408.js +378 -64
  269. package/dist/index.es409.js +169 -33
  270. package/dist/index.es41.js +2 -2
  271. package/dist/index.es410.js +153 -11
  272. package/dist/index.es411.js +137 -150
  273. package/dist/index.es412.js +2 -108
  274. package/dist/index.es413.js +2 -20
  275. package/dist/index.es414.js +2 -101
  276. package/dist/index.es415.js +2 -47
  277. package/dist/index.es416.js +2 -5
  278. package/dist/index.es417.js +2 -3
  279. package/dist/index.es418.js +19 -23
  280. package/dist/index.es419.js +98 -107
  281. package/dist/index.es420.js +46 -15
  282. package/dist/index.es421.js +5 -68
  283. package/dist/index.es422.js +3 -31
  284. package/dist/index.es423.js +24 -16
  285. package/dist/index.es424.js +110 -141
  286. package/dist/index.es425.js +15 -113
  287. package/dist/index.es428.js +3 -3
  288. package/dist/index.es429.js +4 -4
  289. package/dist/index.es430.js +1 -1
  290. package/dist/index.es44.js +3 -3
  291. package/dist/index.es45.js +1 -1
  292. package/dist/index.es459.js +1 -1
  293. package/dist/index.es463.js +1 -1
  294. package/dist/index.es466.js +1 -1
  295. package/dist/index.es47.js +1 -1
  296. package/dist/index.es472.js +1 -1
  297. package/dist/index.es473.js +1 -1
  298. package/dist/index.es477.js +3 -3
  299. package/dist/index.es479.js +3 -3
  300. package/dist/index.es488.js +1 -1
  301. package/dist/index.es49.js +1 -1
  302. package/dist/index.es490.js +2 -2
  303. package/dist/index.es491.js +1 -1
  304. package/dist/index.es492.js +2 -2
  305. package/dist/index.es497.js +21 -2
  306. package/dist/index.es498.js +156 -226
  307. package/dist/index.es499.js +49 -240
  308. package/dist/index.es500.js +2 -21
  309. package/dist/index.es501.js +226 -156
  310. package/dist/index.es502.js +240 -49
  311. package/dist/index.es503.js +16 -2
  312. package/dist/index.es504.js +29 -8
  313. package/dist/index.es505.js +12 -45
  314. package/dist/index.es506.js +7 -2
  315. package/dist/index.es507.js +2 -6
  316. package/dist/index.es508.js +10 -24
  317. package/dist/index.es509.js +46 -2
  318. package/dist/index.es510.js +4 -35
  319. package/dist/index.es511.js +8 -177
  320. package/dist/index.es512.js +21 -86
  321. package/dist/index.es513.js +4 -17
  322. package/dist/index.es514.js +35 -4
  323. package/dist/index.es515.js +177 -4
  324. package/dist/index.es516.js +89 -4
  325. package/dist/index.es517.js +17 -4
  326. package/dist/index.es518.js +2 -24
  327. package/dist/index.es519.js +2 -2
  328. package/dist/index.es520.js +2 -272
  329. package/dist/index.es521.js +2 -80
  330. package/dist/index.es522.js +21 -163
  331. package/dist/index.es523.js +2 -7
  332. package/dist/index.es524.js +271 -15
  333. package/dist/index.es525.js +78 -27
  334. package/dist/index.es526.js +165 -12
  335. package/dist/index.es527.js +2 -65
  336. package/dist/index.es528.js +74 -67
  337. package/dist/index.es529.js +93 -9
  338. package/dist/index.es53.js +6 -7
  339. package/dist/index.es530.js +51 -13
  340. package/dist/index.es531.js +8 -62
  341. package/dist/index.es532.js +5 -2
  342. package/dist/index.es533.js +48 -72
  343. package/dist/index.es534.js +61 -89
  344. package/dist/index.es535.js +67 -50
  345. package/dist/index.es536.js +9 -8
  346. package/dist/index.es537.js +14 -5
  347. package/dist/index.es538.js +61 -51
  348. package/dist/index.es59.js +3 -3
  349. package/dist/index.es60.js +2 -2
  350. package/dist/index.es61.js +4 -4
  351. package/dist/index.es62.js +2 -2
  352. package/dist/index.es63.js +1 -1
  353. package/dist/index.es66.js +3 -3
  354. package/dist/index.es67.js +2 -2
  355. package/dist/index.es70.js +1 -1
  356. package/dist/index.es74.js +1 -1
  357. package/dist/index.es76.js +71 -55
  358. package/dist/index.es77.js +1 -1
  359. package/dist/index.es81.js +1 -1
  360. package/dist/index.es82.js +2 -2
  361. package/dist/index.es86.js +2 -2
  362. package/dist/index.es862.js +2 -22
  363. package/dist/index.es863.js +2 -83
  364. package/dist/index.es864.js +21 -3
  365. package/dist/index.es865.js +82 -22
  366. package/dist/index.es866.js +4 -2
  367. package/dist/index.es867.js +23 -2
  368. package/dist/index.es88.js +3 -3
  369. package/dist/index.es90.js +1 -1
  370. package/dist/index.es91.js +2 -2
  371. package/dist/index.es99.js +1 -1
  372. package/package.json +1 -1
@@ -1,850 +1,12 @@
1
- import * as t from "react";
2
- import * as Re from "react-dom";
3
- import { clamp as Ie } from "./index.es195.js";
4
- import { composeEventHandlers as b } from "./index.es184.js";
5
- import { createCollection as ot } from "./index.es196.js";
6
- import { useComposedRefs as k } from "./index.es177.js";
7
- import { createContextScope as nt } from "./index.es185.js";
8
- import { useDirection as rt } from "./index.es197.js";
9
- import { DismissableLayer as st } from "./index.es186.js";
10
- import { useFocusGuards as lt } from "./index.es189.js";
11
- import { FocusScope as it } from "./index.es187.js";
12
- import { useId as ye } from "./index.es173.js";
13
- import { createPopperScope as be, Root as ct, Anchor as at, Content as dt, Arrow as ut } from "./index.es194.js";
14
- import { Portal as pt } from "./index.es188.js";
15
- import { Primitive as M } from "./index.es172.js";
16
- import { Slot as ft } from "./index.es109.js";
17
- import { useCallbackRef as mt } from "./index.es103.js";
18
- import { useControllableState as Pe } from "./index.es90.js";
19
- import { useLayoutEffect as z } from "./index.es198.js";
20
- import { usePrevious as ht } from "./index.es199.js";
21
- import { VisuallyHidden as vt } from "./index.es200.js";
22
- import { hideOthers as gt } from "./index.es191.js";
23
- import St from "./index.es190.js";
24
- import { j as d } from "./index.es104.js";
25
- var xt = [" ", "Enter", "ArrowUp", "ArrowDown"], wt = [" ", "Enter"], re = "Select", [ce, ae, Ct] = ot(re), [ee, lo] = nt(re, [
26
- Ct,
27
- be
28
- ]), de = be(), [yt, Y] = ee(re), [Tt, It] = ee(re), Ee = (n) => {
29
- const {
30
- __scopeSelect: c,
31
- children: e,
32
- open: i,
33
- defaultOpen: l,
34
- onOpenChange: p,
35
- value: r,
36
- defaultValue: s,
37
- onValueChange: o,
38
- dir: f,
39
- name: g,
40
- autoComplete: w,
41
- disabled: P,
42
- required: R,
43
- form: I
44
- } = n, a = de(c), [v, C] = t.useState(null), [u, h] = t.useState(null), [A, O] = t.useState(!1), te = rt(f), [E = !1, j] = Pe({
45
- prop: i,
46
- defaultProp: l,
47
- onChange: p
48
- }), [U, X] = Pe({
49
- prop: r,
50
- defaultProp: s,
51
- onChange: o
52
- }), V = t.useRef(null), B = v ? I || !!v.closest("form") : !0, [K, H] = t.useState(/* @__PURE__ */ new Set()), F = Array.from(K).map((_) => _.props.value).join(";");
53
- return /* @__PURE__ */ d.jsx(ct, { ...a, children: /* @__PURE__ */ d.jsxs(
54
- yt,
55
- {
56
- required: R,
57
- scope: c,
58
- trigger: v,
59
- onTriggerChange: C,
60
- valueNode: u,
61
- onValueNodeChange: h,
62
- valueNodeHasChildren: A,
63
- onValueNodeHasChildrenChange: O,
64
- contentId: ye(),
65
- value: U,
66
- onValueChange: X,
67
- open: E,
68
- onOpenChange: j,
69
- dir: te,
70
- triggerPointerDownPosRef: V,
71
- disabled: P,
72
- children: [
73
- /* @__PURE__ */ d.jsx(ce.Provider, { scope: c, children: /* @__PURE__ */ d.jsx(
74
- Tt,
75
- {
76
- scope: n.__scopeSelect,
77
- onNativeOptionAdd: t.useCallback((_) => {
78
- H((L) => new Set(L).add(_));
79
- }, []),
80
- onNativeOptionRemove: t.useCallback((_) => {
81
- H((L) => {
82
- const W = new Set(L);
83
- return W.delete(_), W;
84
- });
85
- }, []),
86
- children: e
87
- }
88
- ) }),
89
- B ? /* @__PURE__ */ d.jsxs(
90
- Qe,
91
- {
92
- "aria-hidden": !0,
93
- required: R,
94
- tabIndex: -1,
95
- name: g,
96
- autoComplete: w,
97
- value: U,
98
- onChange: (_) => X(_.target.value),
99
- disabled: P,
100
- form: I,
101
- children: [
102
- U === void 0 ? /* @__PURE__ */ d.jsx("option", { value: "" }) : null,
103
- Array.from(K)
104
- ]
105
- },
106
- F
107
- ) : null
108
- ]
109
- }
110
- ) });
111
- };
112
- Ee.displayName = re;
113
- var _e = "SelectTrigger", Ne = t.forwardRef(
114
- (n, c) => {
115
- const { __scopeSelect: e, disabled: i = !1, ...l } = n, p = de(e), r = Y(_e, e), s = r.disabled || i, o = k(c, r.onTriggerChange), f = ae(e), g = t.useRef("touch"), [w, P, R] = et((a) => {
116
- const v = f().filter((h) => !h.disabled), C = v.find((h) => h.value === r.value), u = tt(v, a, C);
117
- u !== void 0 && r.onValueChange(u.value);
118
- }), I = (a) => {
119
- s || (r.onOpenChange(!0), R()), a && (r.triggerPointerDownPosRef.current = {
120
- x: Math.round(a.pageX),
121
- y: Math.round(a.pageY)
122
- });
123
- };
124
- return /* @__PURE__ */ d.jsx(at, { asChild: !0, ...p, children: /* @__PURE__ */ d.jsx(
125
- M.button,
126
- {
127
- type: "button",
128
- role: "combobox",
129
- "aria-controls": r.contentId,
130
- "aria-expanded": r.open,
131
- "aria-required": r.required,
132
- "aria-autocomplete": "none",
133
- dir: r.dir,
134
- "data-state": r.open ? "open" : "closed",
135
- disabled: s,
136
- "data-disabled": s ? "" : void 0,
137
- "data-placeholder": Je(r.value) ? "" : void 0,
138
- ...l,
139
- ref: o,
140
- onClick: b(l.onClick, (a) => {
141
- a.currentTarget.focus(), g.current !== "mouse" && I(a);
142
- }),
143
- onPointerDown: b(l.onPointerDown, (a) => {
144
- g.current = a.pointerType;
145
- const v = a.target;
146
- v.hasPointerCapture(a.pointerId) && v.releasePointerCapture(a.pointerId), a.button === 0 && a.ctrlKey === !1 && a.pointerType === "mouse" && (I(a), a.preventDefault());
147
- }),
148
- onKeyDown: b(l.onKeyDown, (a) => {
149
- const v = w.current !== "";
150
- !(a.ctrlKey || a.altKey || a.metaKey) && a.key.length === 1 && P(a.key), !(v && a.key === " ") && xt.includes(a.key) && (I(), a.preventDefault());
151
- })
152
- }
153
- ) });
154
- }
155
- );
156
- Ne.displayName = _e;
157
- var Me = "SelectValue", Ae = t.forwardRef(
158
- (n, c) => {
159
- const { __scopeSelect: e, className: i, style: l, children: p, placeholder: r = "", ...s } = n, o = Y(Me, e), { onValueNodeHasChildrenChange: f } = o, g = p !== void 0, w = k(c, o.onValueNodeChange);
160
- return z(() => {
161
- f(g);
162
- }, [f, g]), /* @__PURE__ */ d.jsx(
163
- M.span,
164
- {
165
- ...s,
166
- ref: w,
167
- style: { pointerEvents: "none" },
168
- children: Je(o.value) ? /* @__PURE__ */ d.jsx(d.Fragment, { children: r }) : p
169
- }
170
- );
171
- }
172
- );
173
- Ae.displayName = Me;
174
- var Pt = "SelectIcon", Oe = t.forwardRef(
175
- (n, c) => {
176
- const { __scopeSelect: e, children: i, ...l } = n;
177
- return /* @__PURE__ */ d.jsx(M.span, { "aria-hidden": !0, ...l, ref: c, children: i || "▼" });
178
- }
179
- );
180
- Oe.displayName = Pt;
181
- var Rt = "SelectPortal", De = (n) => /* @__PURE__ */ d.jsx(pt, { asChild: !0, ...n });
182
- De.displayName = Rt;
183
- var J = "SelectContent", je = t.forwardRef(
184
- (n, c) => {
185
- const e = Y(J, n.__scopeSelect), [i, l] = t.useState();
186
- if (z(() => {
187
- l(new DocumentFragment());
188
- }, []), !e.open) {
189
- const p = i;
190
- return p ? Re.createPortal(
191
- /* @__PURE__ */ d.jsx(Le, { scope: n.__scopeSelect, children: /* @__PURE__ */ d.jsx(ce.Slot, { scope: n.__scopeSelect, children: /* @__PURE__ */ d.jsx("div", { children: n.children }) }) }),
192
- p
193
- ) : null;
194
- }
195
- return /* @__PURE__ */ d.jsx(ke, { ...n, ref: c });
196
- }
197
- );
198
- je.displayName = J;
199
- var D = 10, [Le, q] = ee(J), bt = "SelectContentImpl", ke = t.forwardRef(
200
- (n, c) => {
201
- const {
202
- __scopeSelect: e,
203
- position: i = "item-aligned",
204
- onCloseAutoFocus: l,
205
- onEscapeKeyDown: p,
206
- onPointerDownOutside: r,
207
- //
208
- // PopperContent props
209
- side: s,
210
- sideOffset: o,
211
- align: f,
212
- alignOffset: g,
213
- arrowPadding: w,
214
- collisionBoundary: P,
215
- collisionPadding: R,
216
- sticky: I,
217
- hideWhenDetached: a,
218
- avoidCollisions: v,
219
- //
220
- ...C
221
- } = n, u = Y(J, e), [h, A] = t.useState(null), [O, te] = t.useState(null), E = k(c, (m) => A(m)), [j, U] = t.useState(null), [X, V] = t.useState(
222
- null
223
- ), B = ae(e), [K, H] = t.useState(!1), F = t.useRef(!1);
224
- t.useEffect(() => {
225
- if (h) return gt(h);
226
- }, [h]), lt();
227
- const _ = t.useCallback(
228
- (m) => {
229
- const [T, ...N] = B().map((x) => x.ref.current), [y] = N.slice(-1), S = document.activeElement;
230
- for (const x of m)
231
- if (x === S || (x == null || x.scrollIntoView({ block: "nearest" }), x === T && O && (O.scrollTop = 0), x === y && O && (O.scrollTop = O.scrollHeight), x == null || x.focus(), document.activeElement !== S)) return;
232
- },
233
- [B, O]
234
- ), L = t.useCallback(
235
- () => _([j, h]),
236
- [_, j, h]
237
- );
238
- t.useEffect(() => {
239
- K && L();
240
- }, [K, L]);
241
- const { onOpenChange: W, triggerPointerDownPosRef: G } = u;
242
- t.useEffect(() => {
243
- if (h) {
244
- let m = { x: 0, y: 0 };
245
- const T = (y) => {
246
- var S, x;
247
- m = {
248
- x: Math.abs(Math.round(y.pageX) - (((S = G.current) == null ? void 0 : S.x) ?? 0)),
249
- y: Math.abs(Math.round(y.pageY) - (((x = G.current) == null ? void 0 : x.y) ?? 0))
250
- };
251
- }, N = (y) => {
252
- m.x <= 10 && m.y <= 10 ? y.preventDefault() : h.contains(y.target) || W(!1), document.removeEventListener("pointermove", T), G.current = null;
253
- };
254
- return G.current !== null && (document.addEventListener("pointermove", T), document.addEventListener("pointerup", N, { capture: !0, once: !0 })), () => {
255
- document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", N, { capture: !0 });
256
- };
257
- }
258
- }, [h, W, G]), t.useEffect(() => {
259
- const m = () => W(!1);
260
- return window.addEventListener("blur", m), window.addEventListener("resize", m), () => {
261
- window.removeEventListener("blur", m), window.removeEventListener("resize", m);
262
- };
263
- }, [W]);
264
- const [ue, se] = et((m) => {
265
- const T = B().filter((S) => !S.disabled), N = T.find((S) => S.ref.current === document.activeElement), y = tt(T, m, N);
266
- y && setTimeout(() => y.ref.current.focus());
267
- }), pe = t.useCallback(
268
- (m, T, N) => {
269
- const y = !F.current && !N;
270
- (u.value !== void 0 && u.value === T || y) && (U(m), y && (F.current = !0));
271
- },
272
- [u.value]
273
- ), fe = t.useCallback(() => h == null ? void 0 : h.focus(), [h]), Q = t.useCallback(
274
- (m, T, N) => {
275
- const y = !F.current && !N;
276
- (u.value !== void 0 && u.value === T || y) && V(m);
277
- },
278
- [u.value]
279
- ), le = i === "popper" ? ge : Ve, oe = le === ge ? {
280
- side: s,
281
- sideOffset: o,
282
- align: f,
283
- alignOffset: g,
284
- arrowPadding: w,
285
- collisionBoundary: P,
286
- collisionPadding: R,
287
- sticky: I,
288
- hideWhenDetached: a,
289
- avoidCollisions: v
290
- } : {};
291
- return /* @__PURE__ */ d.jsx(
292
- Le,
293
- {
294
- scope: e,
295
- content: h,
296
- viewport: O,
297
- onViewportChange: te,
298
- itemRefCallback: pe,
299
- selectedItem: j,
300
- onItemLeave: fe,
301
- itemTextRefCallback: Q,
302
- focusSelectedItem: L,
303
- selectedItemText: X,
304
- position: i,
305
- isPositioned: K,
306
- searchRef: ue,
307
- children: /* @__PURE__ */ d.jsx(St, { as: ft, allowPinchZoom: !0, children: /* @__PURE__ */ d.jsx(
308
- it,
309
- {
310
- asChild: !0,
311
- trapped: u.open,
312
- onMountAutoFocus: (m) => {
313
- m.preventDefault();
314
- },
315
- onUnmountAutoFocus: b(l, (m) => {
316
- var T;
317
- (T = u.trigger) == null || T.focus({ preventScroll: !0 }), m.preventDefault();
318
- }),
319
- children: /* @__PURE__ */ d.jsx(
320
- st,
321
- {
322
- asChild: !0,
323
- disableOutsidePointerEvents: !0,
324
- onEscapeKeyDown: p,
325
- onPointerDownOutside: r,
326
- onFocusOutside: (m) => m.preventDefault(),
327
- onDismiss: () => u.onOpenChange(!1),
328
- children: /* @__PURE__ */ d.jsx(
329
- le,
330
- {
331
- role: "listbox",
332
- id: u.contentId,
333
- "data-state": u.open ? "open" : "closed",
334
- dir: u.dir,
335
- onContextMenu: (m) => m.preventDefault(),
336
- ...C,
337
- ...oe,
338
- onPlaced: () => H(!0),
339
- ref: E,
340
- style: {
341
- // flex layout so we can place the scroll buttons properly
342
- display: "flex",
343
- flexDirection: "column",
344
- // reset the outline by default as the content MAY get focused
345
- outline: "none",
346
- ...C.style
347
- },
348
- onKeyDown: b(C.onKeyDown, (m) => {
349
- const T = m.ctrlKey || m.altKey || m.metaKey;
350
- if (m.key === "Tab" && m.preventDefault(), !T && m.key.length === 1 && se(m.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(m.key)) {
351
- let y = B().filter((S) => !S.disabled).map((S) => S.ref.current);
352
- if (["ArrowUp", "End"].includes(m.key) && (y = y.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
353
- const S = m.target, x = y.indexOf(S);
354
- y = y.slice(x + 1);
355
- }
356
- setTimeout(() => _(y)), m.preventDefault();
357
- }
358
- })
359
- }
360
- )
361
- }
362
- )
363
- }
364
- ) })
365
- }
366
- );
367
- }
368
- );
369
- ke.displayName = bt;
370
- var Et = "SelectItemAlignedPosition", Ve = t.forwardRef((n, c) => {
371
- const { __scopeSelect: e, onPlaced: i, ...l } = n, p = Y(J, e), r = q(J, e), [s, o] = t.useState(null), [f, g] = t.useState(null), w = k(c, (E) => g(E)), P = ae(e), R = t.useRef(!1), I = t.useRef(!0), { viewport: a, selectedItem: v, selectedItemText: C, focusSelectedItem: u } = r, h = t.useCallback(() => {
372
- if (p.trigger && p.valueNode && s && f && a && v && C) {
373
- const E = p.trigger.getBoundingClientRect(), j = f.getBoundingClientRect(), U = p.valueNode.getBoundingClientRect(), X = C.getBoundingClientRect();
374
- if (p.dir !== "rtl") {
375
- const S = X.left - j.left, x = U.left - S, Z = E.left - x, $ = E.width + Z, me = Math.max($, j.width), he = window.innerWidth - D, ve = Ie(x, [
376
- D,
377
- // Prevents the content from going off the starting edge of the
378
- // viewport. It may still go off the ending edge, but this can be
379
- // controlled by the user since they may want to manage overflow in a
380
- // specific way.
381
- // https://github.com/radix-ui/primitives/issues/2049
382
- Math.max(D, he - me)
383
- ]);
384
- s.style.minWidth = $ + "px", s.style.left = ve + "px";
385
- } else {
386
- const S = j.right - X.right, x = window.innerWidth - U.right - S, Z = window.innerWidth - E.right - x, $ = E.width + Z, me = Math.max($, j.width), he = window.innerWidth - D, ve = Ie(x, [
387
- D,
388
- Math.max(D, he - me)
389
- ]);
390
- s.style.minWidth = $ + "px", s.style.right = ve + "px";
391
- }
392
- const V = P(), B = window.innerHeight - D * 2, K = a.scrollHeight, H = window.getComputedStyle(f), F = parseInt(H.borderTopWidth, 10), _ = parseInt(H.paddingTop, 10), L = parseInt(H.borderBottomWidth, 10), W = parseInt(H.paddingBottom, 10), G = F + _ + K + W + L, ue = Math.min(v.offsetHeight * 5, G), se = window.getComputedStyle(a), pe = parseInt(se.paddingTop, 10), fe = parseInt(se.paddingBottom, 10), Q = E.top + E.height / 2 - D, le = B - Q, oe = v.offsetHeight / 2, m = v.offsetTop + oe, T = F + _ + m, N = G - T;
393
- if (T <= Q) {
394
- const S = V.length > 0 && v === V[V.length - 1].ref.current;
395
- s.style.bottom = "0px";
396
- const x = f.clientHeight - a.offsetTop - a.offsetHeight, Z = Math.max(
397
- le,
398
- oe + // viewport might have padding bottom, include it to avoid a scrollable viewport
399
- (S ? fe : 0) + x + L
400
- ), $ = T + Z;
401
- s.style.height = $ + "px";
402
- } else {
403
- const S = V.length > 0 && v === V[0].ref.current;
404
- s.style.top = "0px";
405
- const Z = Math.max(
406
- Q,
407
- F + a.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
408
- (S ? pe : 0) + oe
409
- ) + N;
410
- s.style.height = Z + "px", a.scrollTop = T - Q + a.offsetTop;
411
- }
412
- s.style.margin = `${D}px 0`, s.style.minHeight = ue + "px", s.style.maxHeight = B + "px", i == null || i(), requestAnimationFrame(() => R.current = !0);
413
- }
414
- }, [
415
- P,
416
- p.trigger,
417
- p.valueNode,
418
- s,
419
- f,
420
- a,
421
- v,
422
- C,
423
- p.dir,
424
- i
425
- ]);
426
- z(() => h(), [h]);
427
- const [A, O] = t.useState();
428
- z(() => {
429
- f && O(window.getComputedStyle(f).zIndex);
430
- }, [f]);
431
- const te = t.useCallback(
432
- (E) => {
433
- E && I.current === !0 && (h(), u == null || u(), I.current = !1);
434
- },
435
- [h, u]
436
- );
437
- return /* @__PURE__ */ d.jsx(
438
- Nt,
439
- {
440
- scope: e,
441
- contentWrapper: s,
442
- shouldExpandOnScrollRef: R,
443
- onScrollButtonChange: te,
444
- children: /* @__PURE__ */ d.jsx(
445
- "div",
446
- {
447
- ref: o,
448
- style: {
449
- display: "flex",
450
- flexDirection: "column",
451
- position: "fixed",
452
- zIndex: A
453
- },
454
- children: /* @__PURE__ */ d.jsx(
455
- M.div,
456
- {
457
- ...l,
458
- ref: w,
459
- style: {
460
- // When we get the height of the content, it includes borders. If we were to set
461
- // the height without having `boxSizing: 'border-box'` it would be too big.
462
- boxSizing: "border-box",
463
- // We need to ensure the content doesn't get taller than the wrapper
464
- maxHeight: "100%",
465
- ...l.style
466
- }
467
- }
468
- )
469
- }
470
- )
471
- }
472
- );
473
- });
474
- Ve.displayName = Et;
475
- var _t = "SelectPopperPosition", ge = t.forwardRef((n, c) => {
476
- const {
477
- __scopeSelect: e,
478
- align: i = "start",
479
- collisionPadding: l = D,
480
- ...p
481
- } = n, r = de(e);
482
- return /* @__PURE__ */ d.jsx(
483
- dt,
484
- {
485
- ...r,
486
- ...p,
487
- ref: c,
488
- align: i,
489
- collisionPadding: l,
490
- style: {
491
- // Ensure border-box for floating-ui calculations
492
- boxSizing: "border-box",
493
- ...p.style,
494
- "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
495
- "--radix-select-content-available-width": "var(--radix-popper-available-width)",
496
- "--radix-select-content-available-height": "var(--radix-popper-available-height)",
497
- "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
498
- "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
499
- }
500
- }
501
- );
502
- });
503
- ge.displayName = _t;
504
- var [Nt, Te] = ee(J, {}), Se = "SelectViewport", Be = t.forwardRef(
505
- (n, c) => {
506
- const { __scopeSelect: e, nonce: i, ...l } = n, p = q(Se, e), r = Te(Se, e), s = k(c, p.onViewportChange), o = t.useRef(0);
507
- return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
508
- /* @__PURE__ */ d.jsx(
509
- "style",
510
- {
511
- dangerouslySetInnerHTML: {
512
- __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
513
- },
514
- nonce: i
515
- }
516
- ),
517
- /* @__PURE__ */ d.jsx(ce.Slot, { scope: e, children: /* @__PURE__ */ d.jsx(
518
- M.div,
519
- {
520
- "data-radix-select-viewport": "",
521
- role: "presentation",
522
- ...l,
523
- ref: s,
524
- style: {
525
- // we use position: 'relative' here on the `viewport` so that when we call
526
- // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
527
- // (independent of the scrollUpButton).
528
- position: "relative",
529
- flex: 1,
530
- // Viewport should only be scrollable in the vertical direction.
531
- // This won't work in vertical writing modes, so we'll need to
532
- // revisit this if/when that is supported
533
- // https://developer.chrome.com/blog/vertical-form-controls
534
- overflow: "hidden auto",
535
- ...l.style
536
- },
537
- onScroll: b(l.onScroll, (f) => {
538
- const g = f.currentTarget, { contentWrapper: w, shouldExpandOnScrollRef: P } = r;
539
- if (P != null && P.current && w) {
540
- const R = Math.abs(o.current - g.scrollTop);
541
- if (R > 0) {
542
- const I = window.innerHeight - D * 2, a = parseFloat(w.style.minHeight), v = parseFloat(w.style.height), C = Math.max(a, v);
543
- if (C < I) {
544
- const u = C + R, h = Math.min(I, u), A = u - h;
545
- w.style.height = h + "px", w.style.bottom === "0px" && (g.scrollTop = A > 0 ? A : 0, w.style.justifyContent = "flex-end");
546
- }
547
- }
548
- }
549
- o.current = g.scrollTop;
550
- })
551
- }
552
- ) })
553
- ] });
554
- }
555
- );
556
- Be.displayName = Se;
557
- var He = "SelectGroup", [Mt, At] = ee(He), Fe = t.forwardRef(
558
- (n, c) => {
559
- const { __scopeSelect: e, ...i } = n, l = ye();
560
- return /* @__PURE__ */ d.jsx(Mt, { scope: e, id: l, children: /* @__PURE__ */ d.jsx(M.div, { role: "group", "aria-labelledby": l, ...i, ref: c }) });
561
- }
562
- );
563
- Fe.displayName = He;
564
- var We = "SelectLabel", Ue = t.forwardRef(
565
- (n, c) => {
566
- const { __scopeSelect: e, ...i } = n, l = At(We, e);
567
- return /* @__PURE__ */ d.jsx(M.div, { id: l.id, ...i, ref: c });
568
- }
569
- );
570
- Ue.displayName = We;
571
- var ie = "SelectItem", [Ot, Ke] = ee(ie), Ge = t.forwardRef(
572
- (n, c) => {
573
- const {
574
- __scopeSelect: e,
575
- value: i,
576
- disabled: l = !1,
577
- textValue: p,
578
- ...r
579
- } = n, s = Y(ie, e), o = q(ie, e), f = s.value === i, [g, w] = t.useState(p ?? ""), [P, R] = t.useState(!1), I = k(
580
- c,
581
- (u) => {
582
- var h;
583
- return (h = o.itemRefCallback) == null ? void 0 : h.call(o, u, i, l);
584
- }
585
- ), a = ye(), v = t.useRef("touch"), C = () => {
586
- l || (s.onValueChange(i), s.onOpenChange(!1));
587
- };
588
- if (i === "")
589
- throw new Error(
590
- "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
591
- );
592
- return /* @__PURE__ */ d.jsx(
593
- Ot,
594
- {
595
- scope: e,
596
- value: i,
597
- disabled: l,
598
- textId: a,
599
- isSelected: f,
600
- onItemTextChange: t.useCallback((u) => {
601
- w((h) => h || ((u == null ? void 0 : u.textContent) ?? "").trim());
602
- }, []),
603
- children: /* @__PURE__ */ d.jsx(
604
- ce.ItemSlot,
605
- {
606
- scope: e,
607
- value: i,
608
- disabled: l,
609
- textValue: g,
610
- children: /* @__PURE__ */ d.jsx(
611
- M.div,
612
- {
613
- role: "option",
614
- "aria-labelledby": a,
615
- "data-highlighted": P ? "" : void 0,
616
- "aria-selected": f && P,
617
- "data-state": f ? "checked" : "unchecked",
618
- "aria-disabled": l || void 0,
619
- "data-disabled": l ? "" : void 0,
620
- tabIndex: l ? void 0 : -1,
621
- ...r,
622
- ref: I,
623
- onFocus: b(r.onFocus, () => R(!0)),
624
- onBlur: b(r.onBlur, () => R(!1)),
625
- onClick: b(r.onClick, () => {
626
- v.current !== "mouse" && C();
627
- }),
628
- onPointerUp: b(r.onPointerUp, () => {
629
- v.current === "mouse" && C();
630
- }),
631
- onPointerDown: b(r.onPointerDown, (u) => {
632
- v.current = u.pointerType;
633
- }),
634
- onPointerMove: b(r.onPointerMove, (u) => {
635
- var h;
636
- v.current = u.pointerType, l ? (h = o.onItemLeave) == null || h.call(o) : v.current === "mouse" && u.currentTarget.focus({ preventScroll: !0 });
637
- }),
638
- onPointerLeave: b(r.onPointerLeave, (u) => {
639
- var h;
640
- u.currentTarget === document.activeElement && ((h = o.onItemLeave) == null || h.call(o));
641
- }),
642
- onKeyDown: b(r.onKeyDown, (u) => {
643
- var A;
644
- ((A = o.searchRef) == null ? void 0 : A.current) !== "" && u.key === " " || (wt.includes(u.key) && C(), u.key === " " && u.preventDefault());
645
- })
646
- }
647
- )
648
- }
649
- )
650
- }
651
- );
652
- }
653
- );
654
- Ge.displayName = ie;
655
- var ne = "SelectItemText", ze = t.forwardRef(
656
- (n, c) => {
657
- const { __scopeSelect: e, className: i, style: l, ...p } = n, r = Y(ne, e), s = q(ne, e), o = Ke(ne, e), f = It(ne, e), [g, w] = t.useState(null), P = k(
658
- c,
659
- (C) => w(C),
660
- o.onItemTextChange,
661
- (C) => {
662
- var u;
663
- return (u = s.itemTextRefCallback) == null ? void 0 : u.call(s, C, o.value, o.disabled);
664
- }
665
- ), R = g == null ? void 0 : g.textContent, I = t.useMemo(
666
- () => /* @__PURE__ */ d.jsx("option", { value: o.value, disabled: o.disabled, children: R }, o.value),
667
- [o.disabled, o.value, R]
668
- ), { onNativeOptionAdd: a, onNativeOptionRemove: v } = f;
669
- return z(() => (a(I), () => v(I)), [a, v, I]), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
670
- /* @__PURE__ */ d.jsx(M.span, { id: o.textId, ...p, ref: P }),
671
- o.isSelected && r.valueNode && !r.valueNodeHasChildren ? Re.createPortal(p.children, r.valueNode) : null
672
- ] });
673
- }
674
- );
675
- ze.displayName = ne;
676
- var Ye = "SelectItemIndicator", Dt = t.forwardRef(
677
- (n, c) => {
678
- const { __scopeSelect: e, ...i } = n;
679
- return Ke(Ye, e).isSelected ? /* @__PURE__ */ d.jsx(M.span, { "aria-hidden": !0, ...i, ref: c }) : null;
680
- }
681
- );
682
- Dt.displayName = Ye;
683
- var xe = "SelectScrollUpButton", qe = t.forwardRef((n, c) => {
684
- const e = q(xe, n.__scopeSelect), i = Te(xe, n.__scopeSelect), [l, p] = t.useState(!1), r = k(c, i.onScrollButtonChange);
685
- return z(() => {
686
- if (e.viewport && e.isPositioned) {
687
- let s = function() {
688
- const f = o.scrollTop > 0;
689
- p(f);
690
- };
691
- const o = e.viewport;
692
- return s(), o.addEventListener("scroll", s), () => o.removeEventListener("scroll", s);
693
- }
694
- }, [e.viewport, e.isPositioned]), l ? /* @__PURE__ */ d.jsx(
695
- Ze,
696
- {
697
- ...n,
698
- ref: r,
699
- onAutoScroll: () => {
700
- const { viewport: s, selectedItem: o } = e;
701
- s && o && (s.scrollTop = s.scrollTop - o.offsetHeight);
702
- }
703
- }
704
- ) : null;
705
- });
706
- qe.displayName = xe;
707
- var we = "SelectScrollDownButton", Xe = t.forwardRef((n, c) => {
708
- const e = q(we, n.__scopeSelect), i = Te(we, n.__scopeSelect), [l, p] = t.useState(!1), r = k(c, i.onScrollButtonChange);
709
- return z(() => {
710
- if (e.viewport && e.isPositioned) {
711
- let s = function() {
712
- const f = o.scrollHeight - o.clientHeight, g = Math.ceil(o.scrollTop) < f;
713
- p(g);
714
- };
715
- const o = e.viewport;
716
- return s(), o.addEventListener("scroll", s), () => o.removeEventListener("scroll", s);
717
- }
718
- }, [e.viewport, e.isPositioned]), l ? /* @__PURE__ */ d.jsx(
719
- Ze,
720
- {
721
- ...n,
722
- ref: r,
723
- onAutoScroll: () => {
724
- const { viewport: s, selectedItem: o } = e;
725
- s && o && (s.scrollTop = s.scrollTop + o.offsetHeight);
726
- }
727
- }
728
- ) : null;
729
- });
730
- Xe.displayName = we;
731
- var Ze = t.forwardRef((n, c) => {
732
- const { __scopeSelect: e, onAutoScroll: i, ...l } = n, p = q("SelectScrollButton", e), r = t.useRef(null), s = ae(e), o = t.useCallback(() => {
733
- r.current !== null && (window.clearInterval(r.current), r.current = null);
734
- }, []);
735
- return t.useEffect(() => () => o(), [o]), z(() => {
736
- var g;
737
- const f = s().find((w) => w.ref.current === document.activeElement);
738
- (g = f == null ? void 0 : f.ref.current) == null || g.scrollIntoView({ block: "nearest" });
739
- }, [s]), /* @__PURE__ */ d.jsx(
740
- M.div,
741
- {
742
- "aria-hidden": !0,
743
- ...l,
744
- ref: c,
745
- style: { flexShrink: 0, ...l.style },
746
- onPointerDown: b(l.onPointerDown, () => {
747
- r.current === null && (r.current = window.setInterval(i, 50));
748
- }),
749
- onPointerMove: b(l.onPointerMove, () => {
750
- var f;
751
- (f = p.onItemLeave) == null || f.call(p), r.current === null && (r.current = window.setInterval(i, 50));
752
- }),
753
- onPointerLeave: b(l.onPointerLeave, () => {
754
- o();
755
- })
756
- }
757
- );
758
- }), jt = "SelectSeparator", $e = t.forwardRef(
759
- (n, c) => {
760
- const { __scopeSelect: e, ...i } = n;
761
- return /* @__PURE__ */ d.jsx(M.div, { "aria-hidden": !0, ...i, ref: c });
762
- }
763
- );
764
- $e.displayName = jt;
765
- var Ce = "SelectArrow", Lt = t.forwardRef(
766
- (n, c) => {
767
- const { __scopeSelect: e, ...i } = n, l = de(e), p = Y(Ce, e), r = q(Ce, e);
768
- return p.open && r.position === "popper" ? /* @__PURE__ */ d.jsx(ut, { ...l, ...i, ref: c }) : null;
769
- }
770
- );
771
- Lt.displayName = Ce;
772
- function Je(n) {
773
- return n === "" || n === void 0;
774
- }
775
- var Qe = t.forwardRef(
776
- (n, c) => {
777
- const { value: e, ...i } = n, l = t.useRef(null), p = k(c, l), r = ht(e);
778
- return t.useEffect(() => {
779
- const s = l.current, o = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
780
- o,
781
- "value"
782
- ).set;
783
- if (r !== e && g) {
784
- const w = new Event("change", { bubbles: !0 });
785
- g.call(s, e), s.dispatchEvent(w);
786
- }
787
- }, [r, e]), /* @__PURE__ */ d.jsx(vt, { asChild: !0, children: /* @__PURE__ */ d.jsx("select", { ...i, ref: p, defaultValue: e }) });
788
- }
789
- );
790
- Qe.displayName = "BubbleSelect";
791
- function et(n) {
792
- const c = mt(n), e = t.useRef(""), i = t.useRef(0), l = t.useCallback(
793
- (r) => {
794
- const s = e.current + r;
795
- c(s), function o(f) {
796
- e.current = f, window.clearTimeout(i.current), f !== "" && (i.current = window.setTimeout(() => o(""), 1e3));
797
- }(s);
798
- },
799
- [c]
800
- ), p = t.useCallback(() => {
801
- e.current = "", window.clearTimeout(i.current);
802
- }, []);
803
- return t.useEffect(() => () => window.clearTimeout(i.current), []), [e, l, p];
804
- }
805
- function tt(n, c, e) {
806
- const l = c.length > 1 && Array.from(c).every((f) => f === c[0]) ? c[0] : c, p = e ? n.indexOf(e) : -1;
807
- let r = kt(n, Math.max(p, 0));
808
- l.length === 1 && (r = r.filter((f) => f !== e));
809
- const o = r.find(
810
- (f) => f.textValue.toLowerCase().startsWith(l.toLowerCase())
811
- );
812
- return o !== e ? o : void 0;
813
- }
814
- function kt(n, c) {
815
- return n.map((e, i) => n[(c + i) % n.length]);
816
- }
817
- var io = Ee, co = Ne, ao = Ae, uo = Oe, po = De, fo = je, mo = Be, ho = Fe, vo = Ue, go = Ge, So = ze, xo = qe, wo = Xe, Co = $e;
1
+ import e from "./index.es212.js";
2
+ /**
3
+ * @license lucide-react v0.475.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const o = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], n = e("ChevronLeft", o);
818
9
  export {
819
- fo as Content,
820
- ho as Group,
821
- uo as Icon,
822
- go as Item,
823
- So as ItemText,
824
- vo as Label,
825
- po as Portal,
826
- io as Root,
827
- wo as ScrollDownButton,
828
- xo as ScrollUpButton,
829
- Ee as Select,
830
- Lt as SelectArrow,
831
- je as SelectContent,
832
- Fe as SelectGroup,
833
- Oe as SelectIcon,
834
- Ge as SelectItem,
835
- Dt as SelectItemIndicator,
836
- ze as SelectItemText,
837
- Ue as SelectLabel,
838
- De as SelectPortal,
839
- Xe as SelectScrollDownButton,
840
- qe as SelectScrollUpButton,
841
- $e as SelectSeparator,
842
- Ne as SelectTrigger,
843
- Ae as SelectValue,
844
- Be as SelectViewport,
845
- Co as Separator,
846
- co as Trigger,
847
- ao as Value,
848
- mo as Viewport,
849
- lo as createSelectScope
10
+ o as __iconNode,
11
+ n as default
850
12
  };