@rpcbase/ui 0.287.0 → 0.289.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 (738) hide show
  1. package/dist/assets/sha256.worker-DNtOSCbM.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  3. package/dist/index.js +12 -12
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js.map +1 -1
  6. package/dist/index101.js.map +1 -1
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js.map +1 -1
  9. package/dist/index104.js.map +1 -1
  10. package/dist/index105.js.map +1 -1
  11. package/dist/index106.js.map +1 -1
  12. package/dist/index107.js.map +1 -1
  13. package/dist/index108.js.map +1 -1
  14. package/dist/index109.js.map +1 -1
  15. package/dist/index11.js +96 -17
  16. package/dist/index11.js.map +1 -1
  17. package/dist/index110.js.map +1 -1
  18. package/dist/index111.js.map +1 -1
  19. package/dist/index112.js.map +1 -1
  20. package/dist/index113.js.map +1 -1
  21. package/dist/index114.js.map +1 -1
  22. package/dist/index115.js.map +1 -1
  23. package/dist/index116.js.map +1 -1
  24. package/dist/index117.js.map +1 -1
  25. package/dist/index118.js.map +1 -1
  26. package/dist/index119.js.map +1 -1
  27. package/dist/index12.js.map +1 -1
  28. package/dist/index120.js.map +1 -1
  29. package/dist/index121.js.map +1 -1
  30. package/dist/index122.js.map +1 -1
  31. package/dist/index123.js +1 -1
  32. package/dist/index123.js.map +1 -1
  33. package/dist/index124.js.map +1 -1
  34. package/dist/index125.js.map +1 -1
  35. package/dist/index126.js.map +1 -1
  36. package/dist/index127.js.map +1 -1
  37. package/dist/index128.js.map +1 -1
  38. package/dist/index129.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index130.js.map +1 -1
  41. package/dist/index131.js.map +1 -1
  42. package/dist/index132.js.map +1 -1
  43. package/dist/index133.js.map +1 -1
  44. package/dist/index134.js.map +1 -1
  45. package/dist/index135.js.map +1 -1
  46. package/dist/index136.js.map +1 -1
  47. package/dist/index137.js.map +1 -1
  48. package/dist/index138.js.map +1 -1
  49. package/dist/index139.js.map +1 -1
  50. package/dist/index14.js.map +1 -1
  51. package/dist/index140.js.map +1 -1
  52. package/dist/index141.js.map +1 -1
  53. package/dist/index142.js.map +1 -1
  54. package/dist/index143.js.map +1 -1
  55. package/dist/index144.js.map +1 -1
  56. package/dist/index145.js.map +1 -1
  57. package/dist/index146.js.map +1 -1
  58. package/dist/index147.js.map +1 -1
  59. package/dist/index148.js.map +1 -1
  60. package/dist/index149.js.map +1 -1
  61. package/dist/index15.js.map +1 -1
  62. package/dist/index150.js.map +1 -1
  63. package/dist/index151.js.map +1 -1
  64. package/dist/index152.js.map +1 -1
  65. package/dist/index153.js.map +1 -1
  66. package/dist/index154.js +4 -4
  67. package/dist/index154.js.map +1 -1
  68. package/dist/index155.js.map +1 -1
  69. package/dist/index156.js.map +1 -1
  70. package/dist/index157.js.map +1 -1
  71. package/dist/index158.js.map +1 -1
  72. package/dist/index159.js.map +1 -1
  73. package/dist/index16.js.map +1 -1
  74. package/dist/index160.js.map +1 -1
  75. package/dist/index161.js.map +1 -1
  76. package/dist/index162.js.map +1 -1
  77. package/dist/index163.js.map +1 -1
  78. package/dist/index164.js.map +1 -1
  79. package/dist/index165.js.map +1 -1
  80. package/dist/index166.js.map +1 -1
  81. package/dist/index167.js.map +1 -1
  82. package/dist/index168.js.map +1 -1
  83. package/dist/index169.js.map +1 -1
  84. package/dist/index17.js.map +1 -1
  85. package/dist/index170.js +18 -12
  86. package/dist/index170.js.map +1 -1
  87. package/dist/index171.js.map +1 -1
  88. package/dist/index172.js.map +1 -1
  89. package/dist/index173.js.map +1 -1
  90. package/dist/index174.js.map +1 -1
  91. package/dist/index175.js.map +1 -1
  92. package/dist/index176.js.map +1 -1
  93. package/dist/index177.js.map +1 -1
  94. package/dist/index178.js.map +1 -1
  95. package/dist/index179.js.map +1 -1
  96. package/dist/index18.js.map +1 -1
  97. package/dist/index180.js.map +1 -1
  98. package/dist/index181.js +1 -1
  99. package/dist/index181.js.map +1 -1
  100. package/dist/index182.js +3 -3
  101. package/dist/index182.js.map +1 -1
  102. package/dist/index183.js.map +1 -1
  103. package/dist/index184.js.map +1 -1
  104. package/dist/index185.js.map +1 -1
  105. package/dist/index186.js.map +1 -1
  106. package/dist/index187.js.map +1 -1
  107. package/dist/index188.js.map +1 -1
  108. package/dist/index189.js.map +1 -1
  109. package/dist/index19.js.map +1 -1
  110. package/dist/index190.js +9 -7
  111. package/dist/index190.js.map +1 -1
  112. package/dist/index191.js +4 -4
  113. package/dist/index191.js.map +1 -1
  114. package/dist/index192.js +4 -15
  115. package/dist/index192.js.map +1 -1
  116. package/dist/index193.js +13 -3
  117. package/dist/index193.js.map +1 -1
  118. package/dist/index194.js +2 -2
  119. package/dist/index194.js.map +1 -1
  120. package/dist/index195.js +4 -85
  121. package/dist/index195.js.map +1 -1
  122. package/dist/index196.js +79 -54
  123. package/dist/index196.js.map +1 -1
  124. package/dist/index197.js +68 -7
  125. package/dist/index197.js.map +1 -1
  126. package/dist/index198.js +3 -23
  127. package/dist/index198.js.map +1 -1
  128. package/dist/index199.js +6 -28
  129. package/dist/index199.js.map +1 -1
  130. package/dist/index20.js.map +1 -1
  131. package/dist/index200.js +4 -97
  132. package/dist/index200.js.map +1 -1
  133. package/dist/index201.js +3 -4
  134. package/dist/index201.js.map +1 -1
  135. package/dist/index202.js +23 -24
  136. package/dist/index202.js.map +1 -1
  137. package/dist/index203.js +28 -10
  138. package/dist/index203.js.map +1 -1
  139. package/dist/index204.js +97 -4
  140. package/dist/index204.js.map +1 -1
  141. package/dist/index205.js +4 -12
  142. package/dist/index205.js.map +1 -1
  143. package/dist/index206.js +22 -19
  144. package/dist/index206.js.map +1 -1
  145. package/dist/index207.js +4 -6
  146. package/dist/index207.js.map +1 -1
  147. package/dist/index208.js +4 -15
  148. package/dist/index208.js.map +1 -1
  149. package/dist/index209.js +10 -102
  150. package/dist/index209.js.map +1 -1
  151. package/dist/index210.js +21 -3
  152. package/dist/index210.js.map +1 -1
  153. package/dist/index211.js +5 -23
  154. package/dist/index211.js.map +1 -1
  155. package/dist/index212.js +15 -28
  156. package/dist/index212.js.map +1 -1
  157. package/dist/index213.js +101 -17
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +3 -7
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +24 -15
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +27 -7
  164. package/dist/index216.js.map +1 -1
  165. package/dist/index217.js +17 -24
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index218.js +6 -22
  168. package/dist/index218.js.map +1 -1
  169. package/dist/index219.js +15 -6
  170. package/dist/index219.js.map +1 -1
  171. package/dist/index220.js +8 -5
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +27 -4
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +23 -4
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +6 -24
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +5 -3
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +4 -24
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +4 -23
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +23 -6
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +22 -8
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -19
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index23.js.map +1 -1
  192. package/dist/index230.js +22 -50
  193. package/dist/index230.js.map +1 -1
  194. package/dist/index231.js +7 -20
  195. package/dist/index231.js.map +1 -1
  196. package/dist/index232.js +9 -27
  197. package/dist/index232.js.map +1 -1
  198. package/dist/index233.js +17 -97
  199. package/dist/index233.js.map +1 -1
  200. package/dist/index234.js +50 -33
  201. package/dist/index234.js.map +1 -1
  202. package/dist/index235.js +20 -119
  203. package/dist/index235.js.map +1 -1
  204. package/dist/index236.js +28 -13
  205. package/dist/index236.js.map +1 -1
  206. package/dist/index237.js +98 -4
  207. package/dist/index237.js.map +1 -1
  208. package/dist/index238.js +33 -15
  209. package/dist/index238.js.map +1 -1
  210. package/dist/index239.js +116 -62
  211. package/dist/index239.js.map +1 -1
  212. package/dist/index24.js.map +1 -1
  213. package/dist/index240.js +13 -10
  214. package/dist/index240.js.map +1 -1
  215. package/dist/index241.js +4 -109
  216. package/dist/index241.js.map +1 -1
  217. package/dist/index242.js +14 -14
  218. package/dist/index242.js.map +1 -1
  219. package/dist/index243.js +64 -12
  220. package/dist/index243.js.map +1 -1
  221. package/dist/index244.js +10 -5
  222. package/dist/index244.js.map +1 -1
  223. package/dist/index245.js +104 -318
  224. package/dist/index245.js.map +1 -1
  225. package/dist/index246.js +14 -66
  226. package/dist/index246.js.map +1 -1
  227. package/dist/index247.js +12 -232
  228. package/dist/index247.js.map +1 -1
  229. package/dist/index248.js +4 -270
  230. package/dist/index248.js.map +1 -1
  231. package/dist/index249.js +313 -309
  232. package/dist/index249.js.map +1 -1
  233. package/dist/index25.js.map +1 -1
  234. package/dist/index250.js +60 -171
  235. package/dist/index250.js.map +1 -1
  236. package/dist/index251.js +252 -8
  237. package/dist/index251.js.map +1 -1
  238. package/dist/index252.js +268 -41
  239. package/dist/index252.js.map +1 -1
  240. package/dist/index253.js +316 -47
  241. package/dist/index253.js.map +1 -1
  242. package/dist/index254.js +179 -9
  243. package/dist/index254.js.map +1 -1
  244. package/dist/index255.js +6 -50
  245. package/dist/index255.js.map +1 -1
  246. package/dist/index256.js +41 -51
  247. package/dist/index256.js.map +1 -1
  248. package/dist/index257.js +50 -7
  249. package/dist/index257.js.map +1 -1
  250. package/dist/index258.js +9 -10
  251. package/dist/index258.js.map +1 -1
  252. package/dist/index259.js +51 -61
  253. package/dist/index259.js.map +1 -1
  254. package/dist/index26.js.map +1 -1
  255. package/dist/index260.js +53 -42
  256. package/dist/index260.js.map +1 -1
  257. package/dist/index261.js +9 -97
  258. package/dist/index261.js.map +1 -1
  259. package/dist/index262.js +31 -47
  260. package/dist/index262.js.map +1 -1
  261. package/dist/index263.js +61 -36
  262. package/dist/index263.js.map +1 -1
  263. package/dist/index264.js +43 -47
  264. package/dist/index264.js.map +1 -1
  265. package/dist/index265.js +92 -46
  266. package/dist/index265.js.map +1 -1
  267. package/dist/index266.js +48 -20
  268. package/dist/index266.js.map +1 -1
  269. package/dist/index267.js +33 -176
  270. package/dist/index267.js.map +1 -1
  271. package/dist/index268.js +49 -48
  272. package/dist/index268.js.map +1 -1
  273. package/dist/index269.js +68 -15
  274. package/dist/index269.js.map +1 -1
  275. package/dist/index27.js.map +1 -1
  276. package/dist/index270.js +20 -65
  277. package/dist/index270.js.map +1 -1
  278. package/dist/index271.js +202 -9
  279. package/dist/index271.js.map +1 -1
  280. package/dist/index272.js +48 -40
  281. package/dist/index272.js.map +1 -1
  282. package/dist/index273.js +60 -91
  283. package/dist/index273.js.map +1 -1
  284. package/dist/index274.js +9 -278
  285. package/dist/index274.js.map +1 -1
  286. package/dist/index275.js +38 -55
  287. package/dist/index275.js.map +1 -1
  288. package/dist/index276.js +91 -10
  289. package/dist/index276.js.map +1 -1
  290. package/dist/index277.js +278 -12
  291. package/dist/index277.js.map +1 -1
  292. package/dist/index278.js +58 -11
  293. package/dist/index278.js.map +1 -1
  294. package/dist/index279.js +11 -64
  295. package/dist/index279.js.map +1 -1
  296. package/dist/index28.js +5 -5
  297. package/dist/index28.js.map +1 -1
  298. package/dist/index280.js +12 -6
  299. package/dist/index280.js.map +1 -1
  300. package/dist/index281.js +3 -25
  301. package/dist/index281.js.map +1 -1
  302. package/dist/index282.js +3 -25
  303. package/dist/index282.js.map +1 -1
  304. package/dist/index283.js +12 -126
  305. package/dist/index283.js.map +1 -1
  306. package/dist/index284.js +63 -51
  307. package/dist/index284.js.map +1 -1
  308. package/dist/index285.js +5 -60
  309. package/dist/index285.js.map +1 -1
  310. package/dist/index286.js +24 -48
  311. package/dist/index286.js.map +1 -1
  312. package/dist/index287.js +24 -6
  313. package/dist/index287.js.map +1 -1
  314. package/dist/index288.js +125 -14
  315. package/dist/index288.js.map +1 -1
  316. package/dist/index289.js +51 -16
  317. package/dist/index289.js.map +1 -1
  318. package/dist/index29.js +5 -7
  319. package/dist/index29.js.map +1 -1
  320. package/dist/index290.js +56 -11
  321. package/dist/index290.js.map +1 -1
  322. package/dist/index291.js +47 -24
  323. package/dist/index291.js.map +1 -1
  324. package/dist/index292.js +7 -51
  325. package/dist/index292.js.map +1 -1
  326. package/dist/index293.js +15 -6
  327. package/dist/index293.js.map +1 -1
  328. package/dist/index294.js +18 -148
  329. package/dist/index294.js.map +1 -1
  330. package/dist/index295.js +12 -59
  331. package/dist/index295.js.map +1 -1
  332. package/dist/index296.js +25 -120
  333. package/dist/index296.js.map +1 -1
  334. package/dist/index297.js +54 -15
  335. package/dist/index297.js.map +1 -1
  336. package/dist/index298.js +5 -866
  337. package/dist/index298.js.map +1 -1
  338. package/dist/index299.js +148 -28
  339. package/dist/index299.js.map +1 -1
  340. package/dist/index3.js.map +1 -1
  341. package/dist/index30.js +6 -8
  342. package/dist/index30.js.map +1 -1
  343. package/dist/index300.js +55 -512
  344. package/dist/index300.js.map +1 -1
  345. package/dist/index301.js +111 -794
  346. package/dist/index301.js.map +1 -1
  347. package/dist/index302.js +14 -7436
  348. package/dist/index302.js.map +1 -1
  349. package/dist/index303.js +862 -6
  350. package/dist/index303.js.map +1 -1
  351. package/dist/index304.js +28 -12
  352. package/dist/index304.js.map +1 -1
  353. package/dist/index305.js +515 -5
  354. package/dist/index305.js.map +1 -1
  355. package/dist/index306.js +803 -5
  356. package/dist/index306.js.map +1 -1
  357. package/dist/index307.js +7426 -468
  358. package/dist/index307.js.map +1 -1
  359. package/dist/index308.js +6 -37
  360. package/dist/index308.js.map +1 -1
  361. package/dist/index309.js +12 -19
  362. package/dist/index309.js.map +1 -1
  363. package/dist/index31.js +5 -11
  364. package/dist/index31.js.map +1 -1
  365. package/dist/index310.js +5 -30
  366. package/dist/index310.js.map +1 -1
  367. package/dist/index311.js +5 -4
  368. package/dist/index311.js.map +1 -1
  369. package/dist/index312.js +461 -51
  370. package/dist/index312.js.map +1 -1
  371. package/dist/index313.js +36 -10
  372. package/dist/index313.js.map +1 -1
  373. package/dist/index314.js +19 -5
  374. package/dist/index314.js.map +1 -1
  375. package/dist/index315.js +29 -8
  376. package/dist/index315.js.map +1 -1
  377. package/dist/index316.js +4 -12
  378. package/dist/index316.js.map +1 -1
  379. package/dist/index317.js +60 -3
  380. package/dist/index317.js.map +1 -1
  381. package/dist/index318.js +10 -15
  382. package/dist/index318.js.map +1 -1
  383. package/dist/index319.js +5 -25
  384. package/dist/index319.js.map +1 -1
  385. package/dist/index32.js +5 -5
  386. package/dist/index32.js.map +1 -1
  387. package/dist/index320.js +9 -41
  388. package/dist/index320.js.map +1 -1
  389. package/dist/index321.js +11 -4
  390. package/dist/index321.js.map +1 -1
  391. package/dist/index322.js +3 -26
  392. package/dist/index322.js.map +1 -1
  393. package/dist/index323.js +15 -18
  394. package/dist/index323.js.map +1 -1
  395. package/dist/index324.js +22 -31
  396. package/dist/index324.js.map +1 -1
  397. package/dist/index325.js +41 -5
  398. package/dist/index325.js.map +1 -1
  399. package/dist/index326.js +4 -8
  400. package/dist/index326.js.map +1 -1
  401. package/dist/index327.js +25 -8
  402. package/dist/index327.js.map +1 -1
  403. package/dist/index328.js +19 -9
  404. package/dist/index328.js.map +1 -1
  405. package/dist/index329.js +34 -10
  406. package/dist/index329.js.map +1 -1
  407. package/dist/index33.js +9 -6
  408. package/dist/index33.js.map +1 -1
  409. package/dist/index330.js +5 -7
  410. package/dist/index330.js.map +1 -1
  411. package/dist/index331.js +9 -75
  412. package/dist/index331.js.map +1 -1
  413. package/dist/index332.js +8 -162
  414. package/dist/index332.js.map +1 -1
  415. package/dist/index333.js +9 -114
  416. package/dist/index333.js.map +1 -1
  417. package/dist/index334.js +10 -14
  418. package/dist/index334.js.map +1 -1
  419. package/dist/index335.js +7 -80
  420. package/dist/index335.js.map +1 -1
  421. package/dist/index336.js +68 -39
  422. package/dist/index336.js.map +1 -1
  423. package/dist/index337.js +160 -11
  424. package/dist/index337.js.map +1 -1
  425. package/dist/index338.js +113 -15
  426. package/dist/index338.js.map +1 -1
  427. package/dist/index339.js +13 -100
  428. package/dist/index339.js.map +1 -1
  429. package/dist/index34.js +6 -6
  430. package/dist/index34.js.map +1 -1
  431. package/dist/index340.js +73 -49
  432. package/dist/index340.js.map +1 -1
  433. package/dist/index341.js +34 -96
  434. package/dist/index341.js.map +1 -1
  435. package/dist/index342.js +12 -70
  436. package/dist/index342.js.map +1 -1
  437. package/dist/index343.js +14 -111
  438. package/dist/index343.js.map +1 -1
  439. package/dist/index344.js +94 -48
  440. package/dist/index344.js.map +1 -1
  441. package/dist/index345.js +50 -37
  442. package/dist/index345.js.map +1 -1
  443. package/dist/index346.js +89 -125
  444. package/dist/index346.js.map +1 -1
  445. package/dist/index347.js +52 -123
  446. package/dist/index347.js.map +1 -1
  447. package/dist/index348.js +54 -197
  448. package/dist/index348.js.map +1 -1
  449. package/dist/index349.js +44 -229
  450. package/dist/index349.js.map +1 -1
  451. package/dist/index35.js +9 -9
  452. package/dist/index35.js.map +1 -1
  453. package/dist/index350.js +42 -308
  454. package/dist/index350.js.map +1 -1
  455. package/dist/index351.js +144 -5
  456. package/dist/index351.js.map +1 -1
  457. package/dist/index352.js +142 -6
  458. package/dist/index352.js.map +1 -1
  459. package/dist/index353.js +257 -7
  460. package/dist/index353.js.map +1 -1
  461. package/dist/index354.js +241 -6
  462. package/dist/index354.js.map +1 -1
  463. package/dist/index355.js +309 -6
  464. package/dist/index355.js.map +1 -1
  465. package/dist/index356.js +5 -21
  466. package/dist/index356.js.map +1 -1
  467. package/dist/index357.js +6 -10
  468. package/dist/index357.js.map +1 -1
  469. package/dist/index358.js +7 -128
  470. package/dist/index358.js.map +1 -1
  471. package/dist/index359.js +6 -42
  472. package/dist/index359.js.map +1 -1
  473. package/dist/index36.js +12 -7
  474. package/dist/index36.js.map +1 -1
  475. package/dist/index360.js +6 -68
  476. package/dist/index360.js.map +1 -1
  477. package/dist/index361.js +20 -116
  478. package/dist/index361.js.map +1 -1
  479. package/dist/index362.js +10 -490
  480. package/dist/index362.js.map +1 -1
  481. package/dist/index363.js +128 -7
  482. package/dist/index363.js.map +1 -1
  483. package/dist/index364.js +42 -13
  484. package/dist/index364.js.map +1 -1
  485. package/dist/index365.js +67 -3
  486. package/dist/index365.js.map +1 -1
  487. package/dist/index366.js +115 -45
  488. package/dist/index366.js.map +1 -1
  489. package/dist/index367.js +490 -11
  490. package/dist/index367.js.map +1 -1
  491. package/dist/index368.js +8 -26
  492. package/dist/index368.js.map +1 -1
  493. package/dist/index369.js +12 -41
  494. package/dist/index369.js.map +1 -1
  495. package/dist/index37.js +13 -5
  496. package/dist/index37.js.map +1 -1
  497. package/dist/index370.js +4 -36
  498. package/dist/index370.js.map +1 -1
  499. package/dist/index371.js +45 -15
  500. package/dist/index371.js.map +1 -1
  501. package/dist/index372.js +24 -41
  502. package/dist/index372.js.map +1 -1
  503. package/dist/index373.js +3 -12
  504. package/dist/index373.js.map +1 -1
  505. package/dist/index374.js +27 -11
  506. package/dist/index374.js.map +1 -1
  507. package/dist/index375.js +40 -50
  508. package/dist/index375.js.map +1 -1
  509. package/dist/index376.js +37 -40
  510. package/dist/index376.js.map +1 -1
  511. package/dist/index377.js +12 -10
  512. package/dist/index377.js.map +1 -1
  513. package/dist/index378.js +40 -4
  514. package/dist/index378.js.map +1 -1
  515. package/dist/index379.js +7 -4
  516. package/dist/index379.js.map +1 -1
  517. package/dist/index38.js +5 -5
  518. package/dist/index38.js.map +1 -1
  519. package/dist/index380.js +29 -8
  520. package/dist/index380.js.map +1 -1
  521. package/dist/index381.js +9 -303
  522. package/dist/index381.js.map +1 -1
  523. package/dist/index382.js +57 -4
  524. package/dist/index382.js.map +1 -1
  525. package/dist/index383.js +40 -22
  526. package/dist/index383.js.map +1 -1
  527. package/dist/index384.js +15 -105
  528. package/dist/index384.js.map +1 -1
  529. package/dist/index385.js +5 -22
  530. package/dist/index385.js.map +1 -1
  531. package/dist/index386.js +10 -22
  532. package/dist/index386.js.map +1 -1
  533. package/dist/index387.js +289 -16
  534. package/dist/index387.js.map +1 -1
  535. package/dist/index388.js +4 -12
  536. package/dist/index388.js.map +1 -1
  537. package/dist/index389.js +20 -112
  538. package/dist/index389.js.map +1 -1
  539. package/dist/index39.js +6 -10
  540. package/dist/index39.js.map +1 -1
  541. package/dist/index390.js +3 -9
  542. package/dist/index390.js.map +1 -1
  543. package/dist/index391.js +104 -27
  544. package/dist/index391.js.map +1 -1
  545. package/dist/index392.js +20 -9
  546. package/dist/index392.js.map +1 -1
  547. package/dist/index393.js +20 -6
  548. package/dist/index393.js.map +1 -1
  549. package/dist/index394.js +14 -253
  550. package/dist/index394.js.map +1 -1
  551. package/dist/index395.js +12 -10
  552. package/dist/index395.js.map +1 -1
  553. package/dist/index396.js +117 -11
  554. package/dist/index396.js.map +1 -1
  555. package/dist/index397.js +8 -6
  556. package/dist/index397.js.map +1 -1
  557. package/dist/index398.js +32 -22
  558. package/dist/index398.js.map +1 -1
  559. package/dist/index399.js +9 -23
  560. package/dist/index399.js.map +1 -1
  561. package/dist/index4.js.map +1 -1
  562. package/dist/index40.js +8 -11
  563. package/dist/index40.js.map +1 -1
  564. package/dist/index400.js +6 -105
  565. package/dist/index400.js.map +1 -1
  566. package/dist/index401.js +3 -15
  567. package/dist/index401.js.map +1 -1
  568. package/dist/index402.js +251 -10
  569. package/dist/index402.js.map +1 -1
  570. package/dist/index403.js +9 -7
  571. package/dist/index403.js.map +1 -1
  572. package/dist/index404.js +11 -239
  573. package/dist/index404.js.map +1 -1
  574. package/dist/index405.js +7 -28
  575. package/dist/index405.js.map +1 -1
  576. package/dist/index406.js +21 -37
  577. package/dist/index406.js.map +1 -1
  578. package/dist/index407.js +21 -10
  579. package/dist/index407.js.map +1 -1
  580. package/dist/index408.js +97 -117
  581. package/dist/index408.js.map +1 -1
  582. package/dist/index409.js +15 -40
  583. package/dist/index409.js.map +1 -1
  584. package/dist/index41.js +6 -7
  585. package/dist/index41.js.map +1 -1
  586. package/dist/index410.js +11 -25
  587. package/dist/index410.js.map +1 -1
  588. package/dist/index411.js +7 -9
  589. package/dist/index411.js.map +1 -1
  590. package/dist/index412.js +3 -24
  591. package/dist/index412.js.map +1 -1
  592. package/dist/index413.js +226 -15
  593. package/dist/index413.js.map +1 -1
  594. package/dist/index414.js +24 -11
  595. package/dist/index414.js.map +1 -1
  596. package/dist/index415.js +38 -4
  597. package/dist/index415.js.map +1 -1
  598. package/dist/index416.js +11 -324
  599. package/dist/index416.js.map +1 -1
  600. package/dist/index417.js +119 -62
  601. package/dist/index417.js.map +1 -1
  602. package/dist/index418.js +42 -4
  603. package/dist/index418.js.map +1 -1
  604. package/dist/index419.js +25 -28
  605. package/dist/index419.js.map +1 -1
  606. package/dist/index42.js +6 -4
  607. package/dist/index42.js.map +1 -1
  608. package/dist/index420.js +11 -470
  609. package/dist/index420.js.map +1 -1
  610. package/dist/index421.js +23 -268
  611. package/dist/index421.js.map +1 -1
  612. package/dist/index422.js +24 -0
  613. package/dist/index422.js.map +1 -0
  614. package/dist/index423.js +17 -0
  615. package/dist/index423.js.map +1 -0
  616. package/dist/index424.js +8 -0
  617. package/dist/index424.js.map +1 -0
  618. package/dist/index425.js +328 -0
  619. package/dist/index425.js.map +1 -0
  620. package/dist/index426.js +66 -0
  621. package/dist/index426.js.map +1 -0
  622. package/dist/index427.js +7 -0
  623. package/dist/index427.js.map +1 -0
  624. package/dist/index428.js +31 -0
  625. package/dist/index428.js.map +1 -0
  626. package/dist/index429.js +474 -0
  627. package/dist/index429.js.map +1 -0
  628. package/dist/index43.js +68 -7
  629. package/dist/index43.js.map +1 -1
  630. package/dist/index430.js +272 -0
  631. package/dist/index430.js.map +1 -0
  632. package/dist/index44.js +7 -6
  633. package/dist/index44.js.map +1 -1
  634. package/dist/index45.js +31 -7
  635. package/dist/index45.js.map +1 -1
  636. package/dist/index46.js +10 -10
  637. package/dist/index46.js.map +1 -1
  638. package/dist/index47.js +15 -13
  639. package/dist/index47.js.map +1 -1
  640. package/dist/index48.js +201 -7
  641. package/dist/index48.js.map +1 -1
  642. package/dist/index49.js +20 -6
  643. package/dist/index49.js.map +1 -1
  644. package/dist/index5.js.map +1 -1
  645. package/dist/index50.js +16 -6
  646. package/dist/index50.js.map +1 -1
  647. package/dist/index51.js +123 -14
  648. package/dist/index51.js.map +1 -1
  649. package/dist/index52.js +19 -8
  650. package/dist/index52.js.map +1 -1
  651. package/dist/index53.js +5 -7
  652. package/dist/index53.js.map +1 -1
  653. package/dist/index54.js +9 -68
  654. package/dist/index54.js.map +1 -1
  655. package/dist/index55.js +7 -7
  656. package/dist/index55.js.map +1 -1
  657. package/dist/index56.js +9 -31
  658. package/dist/index56.js.map +1 -1
  659. package/dist/index57.js +13 -10
  660. package/dist/index57.js.map +1 -1
  661. package/dist/index58.js +8 -15
  662. package/dist/index58.js.map +1 -1
  663. package/dist/index59.js +10 -201
  664. package/dist/index59.js.map +1 -1
  665. package/dist/index6.js.map +1 -1
  666. package/dist/index60.js +13 -20
  667. package/dist/index60.js.map +1 -1
  668. package/dist/index61.js +9 -16
  669. package/dist/index61.js.map +1 -1
  670. package/dist/index62.js +10 -123
  671. package/dist/index62.js.map +1 -1
  672. package/dist/index63.js +5 -19
  673. package/dist/index63.js.map +1 -1
  674. package/dist/index64.js +42 -9
  675. package/dist/index64.js.map +1 -1
  676. package/dist/index65.js +387 -9
  677. package/dist/index65.js.map +1 -1
  678. package/dist/index66.js +37 -14
  679. package/dist/index66.js.map +1 -1
  680. package/dist/index67.js +21 -9
  681. package/dist/index67.js.map +1 -1
  682. package/dist/index68.js +4 -9
  683. package/dist/index68.js.map +1 -1
  684. package/dist/index69.js +6 -4
  685. package/dist/index69.js.map +1 -1
  686. package/dist/index7.js +3 -3
  687. package/dist/index7.js.map +1 -1
  688. package/dist/index70.js +57 -41
  689. package/dist/index70.js.map +1 -1
  690. package/dist/index71.js +5 -387
  691. package/dist/index71.js.map +1 -1
  692. package/dist/index72.js +6 -37
  693. package/dist/index72.js.map +1 -1
  694. package/dist/index73.js +5 -21
  695. package/dist/index73.js.map +1 -1
  696. package/dist/index74.js +4 -56
  697. package/dist/index74.js.map +1 -1
  698. package/dist/index75.js +7 -7
  699. package/dist/index75.js.map +1 -1
  700. package/dist/index76.js +6 -5
  701. package/dist/index76.js.map +1 -1
  702. package/dist/index77.js +6 -5
  703. package/dist/index77.js.map +1 -1
  704. package/dist/index78.js +11 -5
  705. package/dist/index78.js.map +1 -1
  706. package/dist/index79.js +11 -5
  707. package/dist/index79.js.map +1 -1
  708. package/dist/index8.js.map +1 -1
  709. package/dist/index80.js +7 -6
  710. package/dist/index80.js.map +1 -1
  711. package/dist/index81.js +10 -6
  712. package/dist/index81.js.map +1 -1
  713. package/dist/index82.js +5 -8
  714. package/dist/index82.js.map +1 -1
  715. package/dist/index83.js +6 -7
  716. package/dist/index83.js.map +1 -1
  717. package/dist/index84.js.map +1 -1
  718. package/dist/index85.js.map +1 -1
  719. package/dist/index86.js.map +1 -1
  720. package/dist/index87.js +2 -2
  721. package/dist/index87.js.map +1 -1
  722. package/dist/index88.js +31 -31
  723. package/dist/index88.js.map +1 -1
  724. package/dist/index89.js +1 -1
  725. package/dist/index89.js.map +1 -1
  726. package/dist/index9.js.map +1 -1
  727. package/dist/index90.js.map +1 -1
  728. package/dist/index91.js.map +1 -1
  729. package/dist/index92.js.map +1 -1
  730. package/dist/index93.js.map +1 -1
  731. package/dist/index94.js.map +1 -1
  732. package/dist/index95.js.map +1 -1
  733. package/dist/index96.js.map +1 -1
  734. package/dist/index97.js.map +1 -1
  735. package/dist/index98.js.map +1 -1
  736. package/dist/index99.js.map +1 -1
  737. package/package.json +13 -13
  738. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
package/dist/index193.js CHANGED
@@ -1,8 +1,18 @@
1
- //#region ../../node_modules/@base-ui/react/utils/resolveClassName.mjs
1
+ //#region ../../node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
2
2
  function e(e, t) {
3
- return typeof e == "function" ? e(t) : e;
3
+ let n = {};
4
+ for (let r in e) {
5
+ let i = e[r];
6
+ if (t?.hasOwnProperty(r)) {
7
+ let e = t[r](i);
8
+ e != null && Object.assign(n, e);
9
+ continue;
10
+ }
11
+ i === !0 ? n[`data-${r.toLowerCase()}`] = "" : i && (n[`data-${r.toLowerCase()}`] = i.toString());
12
+ }
13
+ return n;
4
14
  }
5
15
  //#endregion
6
- export { e as resolveClassName };
16
+ export { e as getStateAttributesProps };
7
17
 
8
18
  //# sourceMappingURL=index193.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index193.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/resolveClassName.mjs"],"sourcesContent":["/**\n * If the provided className is a string, it will be returned as is.\n * Otherwise, the function will call the className function with the state as the first argument.\n *\n * @param className\n * @param state\n */\nexport function resolveClassName(className, state) {\n return typeof className === 'function' ? className(state) : className;\n}"],"x_google_ignoreList":[0],"mappings":";AAOA,SAAgB,EAAiB,GAAW,GAAO;CACjD,OAAO,OAAO,KAAc,aAAa,EAAU,CAAK,IAAI;AAC9D"}
1
+ {"version":3,"file":"index193.js","names":["getStateAttributesProps","props","key","state","value","customMapping","customProps"],"sources":["../../../node_modules/@base-ui/react/internals/getStateAttributesProps.mjs"],"sourcesContent":["export function getStateAttributesProps(state, customMapping) {\n const props = {};\n\n /* eslint-disable-next-line guard-for-in */\n for (const key in state) {\n const value = state[key];\n if (customMapping?.hasOwnProperty(key)) {\n const customProps = customMapping[key](value);\n if (customProps != null) {\n Object.assign(props, customProps);\n }\n continue;\n }\n if (value === true) {\n props[`data-${key.toLowerCase()}`] = '';\n } else if (value) {\n props[`data-${key.toLowerCase()}`] = value.toString();\n }\n }\n return props;\n}"],"ignoreList":[0],"mappings":";AAAA,SAAgBA,EAAwB,GAAO,GAAe;CAC5D,IAAMC,IAAQ,CAAC;CAGf,KAAK,IAAMC,KAAOC,GAAO;EACvB,IAAMC,IAAQD,EAAMD;EACpB,IAAIG,GAAe,eAAeH,CAAG,GAAG;GACtC,IAAMI,IAAcD,EAAcH,EAAI,CAACE,CAAK;GAC5C,AAAIE,KAAe,QACjB,OAAO,OAAOL,GAAOK,CAAW;GAElC;EACF;EACA,AAAIF,MAAU,KACZ,EAAM,QAAQF,EAAI,YAAY,OAAO,KAC5BE,MACT,EAAM,QAAQF,EAAI,YAAY,OAAOE,EAAM,SAAS;CAExD;CACA,OAAOH;AACT"}
package/dist/index194.js CHANGED
@@ -1,8 +1,8 @@
1
- //#region ../../node_modules/@base-ui/react/utils/resolveStyle.mjs
1
+ //#region ../../node_modules/@base-ui/react/utils/resolveClassName.mjs
2
2
  function e(e, t) {
3
3
  return typeof e == "function" ? e(t) : e;
4
4
  }
5
5
  //#endregion
6
- export { e as resolveStyle };
6
+ export { e as resolveClassName };
7
7
 
8
8
  //# sourceMappingURL=index194.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index194.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/resolveStyle.mjs"],"sourcesContent":["/**\n * If the provided style is an object, it will be returned as is.\n * Otherwise, the function will call the style function with the state as the first argument.\n *\n * @param style\n * @param state\n */\nexport function resolveStyle(style, state) {\n return typeof style === 'function' ? style(state) : style;\n}"],"x_google_ignoreList":[0],"mappings":";AAOA,SAAgB,EAAa,GAAO,GAAO;CACzC,OAAO,OAAO,KAAU,aAAa,EAAM,CAAK,IAAI;AACtD"}
1
+ {"version":3,"file":"index194.js","names":["resolveClassName","className","state"],"sources":["../../../node_modules/@base-ui/react/utils/resolveClassName.mjs"],"sourcesContent":["/**\n * If the provided className is a string, it will be returned as is.\n * Otherwise, the function will call the className function with the state as the first argument.\n *\n * @param className\n * @param state\n */\nexport function resolveClassName(className, state) {\n return typeof className === 'function' ? className(state) : className;\n}"],"ignoreList":[0],"mappings":";AAOA,SAAgBA,EAAiB,GAAW,GAAO;CACjD,OAAO,OAAOC,KAAc,aAAaA,EAAUC,CAAK,IAAID;AAC9D"}
package/dist/index195.js CHANGED
@@ -1,89 +1,8 @@
1
- import { mergeObjects as e } from "./index189.js";
2
- //#region ../../node_modules/@base-ui/react/merge-props/mergeProps.mjs
3
- var t = {};
4
- function n(e, t, n, r, o) {
5
- if (!n && !r && !o && !e) return i(t);
6
- let s = i(e);
7
- return t && (s = a(s, t)), n && (s = a(s, n)), r && (s = a(s, r)), o && (s = a(s, o)), s;
8
- }
9
- function r(e) {
10
- if (e.length === 0) return t;
11
- if (e.length === 1) return i(e[0]);
12
- let n = i(e[0]);
13
- for (let t = 1; t < e.length; t += 1) n = a(n, e[t]);
14
- return n;
15
- }
16
- function i(e) {
17
- return l(e) ? { ...u(e, t) } : o(e);
18
- }
19
- function a(e, t) {
20
- return l(t) ? u(t, e) : s(e, t);
21
- }
22
- function o(e) {
23
- let t = { ...e };
24
- for (let e in t) {
25
- let n = t[e];
26
- c(e, n) && (t[e] = f(n));
27
- }
28
- return t;
29
- }
30
- function s(t, n) {
31
- if (!n) return t;
32
- for (let r in n) {
33
- let i = n[r];
34
- switch (r) {
35
- case "style":
36
- t[r] = e(t.style, i);
37
- break;
38
- case "className":
39
- t[r] = m(t.className, i);
40
- break;
41
- default: t[r] = c(r, i) ? d(t[r], i) : i;
42
- }
43
- }
44
- return t;
45
- }
46
- function c(e, t) {
47
- let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
48
- return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
49
- }
50
- function l(e) {
51
- return typeof e == "function";
52
- }
53
- function u(e, n) {
54
- return l(e) ? e(n) : e ?? t;
55
- }
56
- function d(e, t) {
57
- return t ? e ? (...n) => {
58
- let r = n[0];
59
- if (h(r)) {
60
- let i = r;
61
- p(i);
62
- let a = t(...n);
63
- return i.baseUIHandlerPrevented || e?.(...n), a;
64
- }
65
- let i = t(...n);
66
- return e?.(...n), i;
67
- } : f(t) : e;
68
- }
69
- function f(e) {
70
- return e && ((...t) => {
71
- let n = t[0];
72
- return h(n) && p(n), e(...t);
73
- });
74
- }
75
- function p(e) {
76
- return e.preventBaseUIHandler = () => {
77
- e.baseUIHandlerPrevented = !0;
78
- }, e;
79
- }
80
- function m(e, t) {
81
- return t ? e ? t + " " + e : t : e;
82
- }
83
- function h(e) {
84
- return typeof e == "object" && !!e && "nativeEvent" in e;
1
+ //#region ../../node_modules/@base-ui/react/utils/resolveStyle.mjs
2
+ function e(e, t) {
3
+ return typeof e == "function" ? e(t) : e;
85
4
  }
86
5
  //#endregion
87
- export { p as makeEventPreventable, m as mergeClassNames, n as mergeProps, r as mergePropsN };
6
+ export { e as resolveStyle };
88
7
 
89
8
  //# sourceMappingURL=index195.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index195.js","names":[],"sources":["../../../node_modules/@base-ui/react/merge-props/mergeProps.mjs"],"sourcesContent":["import { mergeObjects } from '@base-ui/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/* eslint-disable id-denylist */\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n *\n * Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).\n * For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing\n * by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),\n * all handlers always execute without prevention capability.\n *\n * The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).\n * The `style` prop is merged with rightmost styles overwriting the prior ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (that is, we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param a Props object to merge.\n * @param b Props object to merge. The function will overwrite conflicting props from `a`.\n * @param c Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param d Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param e Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @returns The merged props.\n * @public\n */\n\nexport function mergeProps(a, b, c, d, e) {\n if (!c && !d && !e && !a) {\n return createInitialMergedProps(b);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(a);\n if (b) {\n merged = mergeInto(merged, b);\n }\n if (c) {\n merged = mergeInto(merged, c);\n }\n if (d) {\n merged = mergeInto(merged, d);\n }\n if (e) {\n merged = mergeInto(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\n/**\n * Merges an arbitrary number of React props using the same logic as {@link mergeProps}.\n * This function accepts an array of props instead of individual arguments.\n *\n * This has slightly lower performance than {@link mergeProps} due to accepting an array\n * instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or\n * fewer prop sets for better performance.\n *\n * @param props Array of props to merge.\n * @returns The merged props.\n * @see mergeProps\n * @public\n */\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return createInitialMergedProps(props[0]);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(props[0]);\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeInto(merged, props[i]);\n }\n return merged;\n}\nfunction createInitialMergedProps(inputProps) {\n if (isPropsGetter(inputProps)) {\n // Getter-returned handlers intentionally keep their existing semantics.\n return {\n ...resolvePropsGetter(inputProps, EMPTY_PROPS)\n };\n }\n return copyInitialProps(inputProps);\n}\nfunction mergeInto(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return resolvePropsGetter(inputProps, merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\nfunction copyInitialProps(inputProps) {\n const copiedProps = {\n ...inputProps\n };\n\n // `copiedProps` is our fresh own-object copy, so iterating with `for...in` is safe here.\n // eslint-disable-next-line guard-for-in\n for (const propName in copiedProps) {\n const propValue = copiedProps[propName];\n if (isEventHandler(propName, propValue)) {\n copiedProps[propName] = wrapEventHandler(propValue);\n }\n }\n return copiedProps;\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction resolvePropsGetter(inputProps, previousProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(previousProps);\n }\n return inputProps ?? EMPTY_PROPS;\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return wrapEventHandler(theirHandler);\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(...args);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(...args);\n }\n return result;\n }\n const result = theirHandler(...args);\n ourHandler?.(...args);\n return result;\n };\n}\nfunction wrapEventHandler(handler) {\n if (!handler) {\n return handler;\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n makeEventPreventable(event);\n }\n return handler(...args);\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAM,IAAc,CAAC;AAiCrB,SAAgB,EAAW,GAAG,GAAG,GAAG,GAAG,GAAG;CACxC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GACrB,OAAO,EAAyB,CAAC;CAInC,IAAI,IAAS,EAAyB,CAAC;CAavC,OAZI,MACF,IAAS,EAAU,GAAQ,CAAC,IAE1B,MACF,IAAS,EAAU,GAAQ,CAAC,IAE1B,MACF,IAAS,EAAU,GAAQ,CAAC,IAE1B,MACF,IAAS,EAAU,GAAQ,CAAC,IAEvB;AACT;AAgBA,SAAgB,EAAY,GAAO;CACjC,IAAI,EAAM,WAAW,GACnB,OAAO;CAET,IAAI,EAAM,WAAW,GACnB,OAAO,EAAyB,EAAM,EAAE;CAI1C,IAAI,IAAS,EAAyB,EAAM,EAAE;CAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,KAAK,GACrC,IAAS,EAAU,GAAQ,EAAM,EAAE;CAErC,OAAO;AACT;AACA,SAAS,EAAyB,GAAY;CAO5C,OANI,EAAc,CAAU,IAEnB,EACL,GAAG,EAAmB,GAAY,CAAW,EAC/C,IAEK,EAAiB,CAAU;AACpC;AACA,SAAS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,GAAG,CAAI;GAInC,OAHK,EAAY,0BACf,IAAa,GAAG,CAAI,GAEf;EACT;EACA,IAAM,IAAS,EAAa,GAAG,CAAI;EAEnC,OADA,IAAa,GAAG,CAAI,GACb;CACT,IAhBS,EAAiB,CAAY,IAH7B;AAoBX;AACA,SAAS,EAAiB,GAAS;CAIjC,OAHK,OAGG,GAAG,MAAS;EAClB,IAAM,IAAQ,EAAK;EAInB,OAHI,EAAiB,CAAK,KACxB,EAAqB,CAAK,GAErB,EAAQ,GAAG,CAAI;CACxB;AACF;AACA,SAAgB,EAAqB,GAAO;CAI1C,OAHA,EAAM,6BAA6B;EACjC,EAAM,yBAAyB;CACjC,GACO;AACT;AACA,SAAgB,EAAgB,GAAc,GAAgB;CAQ5D,OAPI,IACE,IAEK,IAAiB,MAAM,IAEzB,IAEF;AACT;AACA,SAAS,EAAiB,GAAO;CAC/B,OAAwB,OAAO,KAAU,cAAlC,KAA8C,iBAAiB;AACxE"}
1
+ {"version":3,"file":"index195.js","names":["resolveStyle","style","state"],"sources":["../../../node_modules/@base-ui/react/utils/resolveStyle.mjs"],"sourcesContent":["/**\n * If the provided style is an object, it will be returned as is.\n * Otherwise, the function will call the style function with the state as the first argument.\n *\n * @param style\n * @param state\n */\nexport function resolveStyle(style, state) {\n return typeof style === 'function' ? style(state) : style;\n}"],"ignoreList":[0],"mappings":";AAOA,SAAgBA,EAAa,GAAO,GAAO;CACzC,OAAO,OAAOC,KAAU,aAAaA,EAAMC,CAAK,IAAID;AACtD"}
package/dist/index196.js CHANGED
@@ -1,64 +1,89 @@
1
- import e from "./index183.js";
2
- import { useMergedRefs as t, useMergedRefsN as n } from "./index186.js";
3
- import { getReactElementRef as r } from "./index188.js";
4
- import { mergeObjects as i } from "./index189.js";
5
- import { warn as a } from "./index190.js";
6
- import { EMPTY_OBJECT as o } from "./index191.js";
7
- import { getStateAttributesProps as s } from "./index192.js";
8
- import { resolveClassName as c } from "./index193.js";
9
- import { resolveStyle as l } from "./index194.js";
10
- import { mergeClassNames as u, mergeProps as d, mergePropsN as f } from "./index195.js";
11
- import * as p from "react";
12
- import { createElement as m } from "react";
13
- //#region ../../node_modules/@base-ui/react/internals/useRenderElement.mjs
14
- function h(e, t, n = {}) {
15
- let r = t.render, i = g(t, n);
16
- return n.enabled === !1 ? null : x(e, r, i, n.state ?? o);
1
+ import { mergeObjects as e } from "./index189.js";
2
+ //#region ../../node_modules/@base-ui/react/merge-props/mergeProps.mjs
3
+ var t = {};
4
+ function n(e, t, n, r, o) {
5
+ if (!n && !r && !o && !e) return i(t);
6
+ let s = i(e);
7
+ return t && (s = a(s, t)), n && (s = a(s, n)), r && (s = a(s, r)), o && (s = a(s, o)), s;
17
8
  }
18
- function g(e, a = {}) {
19
- let { className: d, style: f, render: p } = e, { state: m = o, ref: h, props: g, stateAttributesMapping: v, enabled: y = !0 } = a, b = y ? c(d, m) : void 0, x = y ? l(f, m) : void 0, S = y ? s(m, v) : o, C = y && g ? _(g) : void 0, w = y ? i(S, C) ?? {} : o;
20
- return typeof document < "u" && (y ? w.ref = Array.isArray(h) ? n([
21
- w.ref,
22
- r(p),
23
- ...h
24
- ]) : t(w.ref, r(p), h) : t(null, null)), y ? (b !== void 0 && (w.className = u(w.className, b)), x !== void 0 && (w.style = i(w.style, x)), w) : o;
9
+ function r(e) {
10
+ if (e.length === 0) return t;
11
+ if (e.length === 1) return i(e[0]);
12
+ let n = i(e[0]);
13
+ for (let t = 1; t < e.length; t += 1) n = a(n, e[t]);
14
+ return n;
25
15
  }
26
- function _(e) {
27
- return Array.isArray(e) ? f(e) : d(void 0, e);
16
+ function i(e) {
17
+ return l(e) ? { ...u(e, t) } : o(e);
28
18
  }
29
- var v = Symbol.for("react.lazy"), y = /^[A-Z][A-Za-z0-9$]*$/, b = /[a-z]/;
30
- function x(t, n, r, i) {
31
- if (n) {
32
- if (typeof n == "function") return process.env.NODE_ENV !== "production" && S(n), n(r, i);
33
- let e = d(r, n.props);
34
- e.ref = r.ref;
35
- let t = n;
36
- if (t?.$$typeof === v && (t = p.Children.toArray(n)[0]), process.env.NODE_ENV !== "production" && !/*#__PURE__*/ p.isValidElement(t)) throw Error([
37
- "Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
38
- "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
39
- "https://base-ui.com/r/invalid-render-prop"
40
- ].join("\n"));
41
- return /*#__PURE__*/ p.cloneElement(t, e);
19
+ function a(e, t) {
20
+ return l(t) ? u(t, e) : s(e, t);
21
+ }
22
+ function o(e) {
23
+ let t = { ...e };
24
+ for (let e in t) {
25
+ let n = t[e];
26
+ c(e, n) && (t[e] = f(n));
27
+ }
28
+ return t;
29
+ }
30
+ function s(t, n) {
31
+ if (!n) return t;
32
+ for (let r in n) {
33
+ let i = n[r];
34
+ switch (r) {
35
+ case "style":
36
+ t[r] = e(t.style, i);
37
+ break;
38
+ case "className":
39
+ t[r] = m(t.className, i);
40
+ break;
41
+ default: t[r] = c(r, i) ? d(t[r], i) : i;
42
+ }
42
43
  }
43
- if (t && typeof t == "string") return C(t, r);
44
- throw Error(process.env.NODE_ENV === "production" ? e(8) : "Base UI: Render element or function are not defined.");
44
+ return t;
45
+ }
46
+ function c(e, t) {
47
+ let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
48
+ return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
49
+ }
50
+ function l(e) {
51
+ return typeof e == "function";
52
+ }
53
+ function u(e, n) {
54
+ return l(e) ? e(n) : e ?? t;
55
+ }
56
+ function d(e, t) {
57
+ return t ? e ? (...n) => {
58
+ let r = n[0];
59
+ if (h(r)) {
60
+ let i = r;
61
+ p(i);
62
+ let a = t(...n);
63
+ return i.baseUIHandlerPrevented || e?.(...n), a;
64
+ }
65
+ let i = t(...n);
66
+ return e?.(...n), i;
67
+ } : f(t) : e;
68
+ }
69
+ function f(e) {
70
+ return e && ((...t) => {
71
+ let n = t[0];
72
+ return h(n) && p(n), e(...t);
73
+ });
74
+ }
75
+ function p(e) {
76
+ return e.preventBaseUIHandler = () => {
77
+ e.baseUIHandlerPrevented = !0;
78
+ }, e;
45
79
  }
46
- function S(e) {
47
- let t = e.name;
48
- t.length !== 0 && y.test(t) && b.test(t) && a(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
80
+ function m(e, t) {
81
+ return t ? e ? t + " " + e : t : e;
49
82
  }
50
- function C(e, t) {
51
- return e === "button" ? /*#__PURE__*/ m("button", {
52
- type: "button",
53
- ...t,
54
- key: t.key
55
- }) : e === "img" ? /*#__PURE__*/ m("img", {
56
- alt: "",
57
- ...t,
58
- key: t.key
59
- }) : /*#__PURE__*/ p.createElement(e, t);
83
+ function h(e) {
84
+ return typeof e == "object" && !!e && "nativeEvent" in e;
60
85
  }
61
86
  //#endregion
62
- export { h as useRenderElement };
87
+ export { p as makeEventPreventable, m as mergeClassNames, n as mergeProps, r as mergePropsN };
63
88
 
64
89
  //# sourceMappingURL=index196.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index196.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/internals/useRenderElement.mjs"],"sourcesContent":["import _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs, useMergedRefsN } from '@base-ui/utils/useMergedRefs';\nimport { getReactElementRef } from '@base-ui/utils/getReactElementRef';\nimport { mergeObjects } from '@base-ui/utils/mergeObjects';\nimport { warn } from '@base-ui/utils/warn';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { getStateAttributesProps } from \"./getStateAttributesProps.mjs\";\nimport { resolveClassName } from \"../utils/resolveClassName.mjs\";\nimport { resolveStyle } from \"../utils/resolveStyle.mjs\";\nimport { mergeProps, mergePropsN, mergeClassNames } from \"../merge-props/index.mjs\";\nimport { createElement as _createElement } from \"react\";\n/**\n * Renders a Base UI element.\n *\n * @param element The default HTML element to render. Can be overridden by the `render` prop.\n * @param componentProps An object containing the `render` and `className` props to be used for element customization. Other props are ignored.\n * @param params Additional parameters for rendering the element.\n */\nexport function useRenderElement(element, componentProps, params = {}) {\n const renderProp = componentProps.render;\n const outProps = useRenderElementProps(componentProps, params);\n if (params.enabled === false) {\n return null;\n }\n const state = params.state ?? EMPTY_OBJECT;\n return evaluateRenderProp(element, renderProp, outProps, state);\n}\n\n/**\n * Computes render element final props.\n */\nfunction useRenderElementProps(componentProps, params = {}) {\n const {\n className: classNameProp,\n style: styleProp,\n render: renderProp\n } = componentProps;\n const {\n state = EMPTY_OBJECT,\n ref,\n props,\n stateAttributesMapping,\n enabled = true\n } = params;\n const className = enabled ? resolveClassName(classNameProp, state) : undefined;\n const style = enabled ? resolveStyle(styleProp, state) : undefined;\n const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;\n const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : undefined;\n\n // Ensure outProps is always a new mutable object when enabled, never EMPTY_OBJECT.\n // This prevents potential TypeError when setting ref, className, or style properties,\n // since EMPTY_OBJECT is frozen and mutations would fail in strict mode.\n const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;\n\n // SAFETY: The `useMergedRefs` functions use a single hook to store the same value,\n // switching between them at runtime is safe. If this assertion fails, React will\n // throw at runtime anyway.\n // This also skips the `useMergedRefs` call on the server, which is fine because\n // refs are not used on the server side.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (typeof document !== 'undefined') {\n if (!enabled) {\n // Called only to keep the hook order stable when disabled; the merged ref is unused.\n void useMergedRefs(null, null);\n } else if (Array.isArray(ref)) {\n outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);\n } else {\n outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);\n }\n }\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n if (className !== undefined) {\n outProps.className = mergeClassNames(outProps.className, className);\n }\n if (style !== undefined) {\n outProps.style = mergeObjects(outProps.style, style);\n }\n return outProps;\n}\nfunction resolveRenderFunctionProps(props) {\n if (Array.isArray(props)) {\n return mergePropsN(props);\n }\n return mergeProps(undefined, props);\n}\n\n// The symbol React uses internally for lazy components\n// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31\n//\n// TODO delete once https://github.com/react/react/issues/32392 is fixed\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\nconst COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;\nconst LOWERCASE_CHARACTER_PATTERN = /[a-z]/;\nfunction evaluateRenderProp(element, render, props, state) {\n if (render) {\n if (typeof render === 'function') {\n if (process.env.NODE_ENV !== 'production') {\n warnIfRenderPropLooksLikeComponent(render);\n }\n return render(props, state);\n }\n const mergedProps = mergeProps(props, render.props);\n mergedProps.ref = props.ref;\n let newElement = render;\n // Workaround for https://github.com/react/react/issues/32392\n // This works because the toArray() logic unwrap lazy element type in\n // https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186\n if (newElement?.$$typeof === REACT_LAZY_TYPE) {\n const children = React.Children.toArray(render);\n newElement = children[0];\n }\n\n // There is a high number of indirections, the error message thrown by React.cloneElement() is\n // hard to use for developers, this logic provides a better context.\n //\n // Our general guideline is to never change the control flow depending on the environment.\n // However, React.cloneElement() throws if React.isValidElement() is false,\n // so we can throw before with custom message.\n if (process.env.NODE_ENV !== 'production') {\n if (! /*#__PURE__*/React.isValidElement(newElement)) {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error(['Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.', 'A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.', 'https://base-ui.com/r/invalid-render-prop'].join('\\n'));\n }\n }\n return /*#__PURE__*/React.cloneElement(newElement, mergedProps);\n }\n if (element) {\n if (typeof element === 'string') {\n return renderTag(element, props);\n }\n }\n // Unreachable, but the typings on `useRenderElement` need to be reworked\n // to annotate it correctly.\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: Render element or function are not defined.' : _formatErrorMessage(8));\n}\nfunction warnIfRenderPropLooksLikeComponent(renderFn) {\n const functionName = renderFn.name;\n if (functionName.length === 0) {\n return;\n }\n if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {\n return;\n }\n if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {\n return;\n }\n warn(`The \\`render\\` prop received a function named \\`${functionName}\\` that starts with an uppercase letter.`, 'This usually means a React component was passed directly as `render={Component}`.', 'Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.', 'If this is an intentional render callback, rename it to start with a lowercase letter.', 'Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.', 'https://base-ui.com/r/invalid-render-prop');\n}\nfunction renderTag(Tag, props) {\n if (Tag === 'button') {\n return /*#__PURE__*/_createElement(\"button\", {\n type: \"button\",\n ...props,\n key: props.key\n });\n }\n if (Tag === 'img') {\n return /*#__PURE__*/_createElement(\"img\", {\n alt: \"\",\n ...props,\n key: props.key\n });\n }\n return /*#__PURE__*/React.createElement(Tag, props);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAmBA,SAAgB,EAAiB,GAAS,GAAgB,IAAS,CAAC,GAAG;CACrE,IAAM,IAAa,EAAe,QAC5B,IAAW,EAAsB,GAAgB,CAAM;CAK7D,OAJI,EAAO,YAAY,KACd,OAGF,EAAmB,GAAS,GAAY,GADjC,EAAO,SAAS,CACgC;AAChE;AAKA,SAAS,EAAsB,GAAgB,IAAS,CAAC,GAAG;CAC1D,I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A,aAA6B,gBACvB,CAAe,gBAAM,eAAe,CAAU,GAGhD,MAAU,MAAM;GAAC;GAAkH;GAA+H;EAA2C,CAAC,CAAC,KAAK,IAAI,CAAC;EAG7T,OAAoB,gBAAM,aAAa,GAAY,CAAW;CAChE;CACA,IAAI,KACE,OAAO,KAAY,UACrB,OAAO,EAAU,GAAS,CAAK;CAKnC,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAwEC,EAAoB,CAAC,IAA9E,sDAA+E;AACzI;AACA,SAAS,EAAmC,GAAU;CACpD,IAAM,IAAe,EAAS;CAC1B,EAAa,WAAW,KAGvB,EAA6B,KAAK,CAAY,KAG9C,EAA4B,KAAK,CAAY,KAGlD,EAAK,mDAAmD,EAAa,2CAA2C,qFAAqF,yGAAyG,0FAA0F,2FAA2F,2CAA2C;AAChhB;AACA,SAAS,EAAU,GAAK,GAAO;CAe7B,OAdI,MAAQ,WACU,gBAAe,UAAU;EAC3C,MAAM;EACN,GAAG;EACH,KAAK,EAAM;CACb,CAAC,IAEC,MAAQ,QACU,gBAAe,OAAO;EACxC,KAAK;EACL,GAAG;EACH,KAAK,EAAM;CACb,CAAC,IAEiB,gBAAM,cAAc,GAAK,CAAK;AACpD"}
1
+ {"version":3,"file":"index196.js","names":["EMPTY_PROPS","mergeProps","c","d","e","a","createInitialMergedProps","b","merged","mergeInto","mergePropsN","props","i","isPropsGetter","inputProps","resolvePropsGetter","copyInitialProps","mutablyMergeInto","copiedProps","propName","propValue","isEventHandler","wrapEventHandler","externalProps","mergedProps","externalPropValue","mergeObjects","mergeClassNames","mergeEventHandlers","code0","key","code1","code2","value","previousProps","theirHandler","ourHandler","args","event","isSyntheticEvent","baseUIEvent","result","handler","makeEventPreventable","theirClassName","ourClassName"],"sources":["../../../node_modules/@base-ui/react/merge-props/mergeProps.mjs"],"sourcesContent":["import { mergeObjects } from '@base-ui/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/* eslint-disable id-denylist */\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n *\n * Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).\n * For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing\n * by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),\n * all handlers always execute without prevention capability.\n *\n * The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).\n * The `style` prop is merged with rightmost styles overwriting the prior ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (that is, we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param a Props object to merge.\n * @param b Props object to merge. The function will overwrite conflicting props from `a`.\n * @param c Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param d Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param e Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @returns The merged props.\n * @public\n */\n\nexport function mergeProps(a, b, c, d, e) {\n if (!c && !d && !e && !a) {\n return createInitialMergedProps(b);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(a);\n if (b) {\n merged = mergeInto(merged, b);\n }\n if (c) {\n merged = mergeInto(merged, c);\n }\n if (d) {\n merged = mergeInto(merged, d);\n }\n if (e) {\n merged = mergeInto(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\n/**\n * Merges an arbitrary number of React props using the same logic as {@link mergeProps}.\n * This function accepts an array of props instead of individual arguments.\n *\n * This has slightly lower performance than {@link mergeProps} due to accepting an array\n * instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or\n * fewer prop sets for better performance.\n *\n * @param props Array of props to merge.\n * @returns The merged props.\n * @see mergeProps\n * @public\n */\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return createInitialMergedProps(props[0]);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(props[0]);\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeInto(merged, props[i]);\n }\n return merged;\n}\nfunction createInitialMergedProps(inputProps) {\n if (isPropsGetter(inputProps)) {\n // Getter-returned handlers intentionally keep their existing semantics.\n return {\n ...resolvePropsGetter(inputProps, EMPTY_PROPS)\n };\n }\n return copyInitialProps(inputProps);\n}\nfunction mergeInto(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return resolvePropsGetter(inputProps, merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\nfunction copyInitialProps(inputProps) {\n const copiedProps = {\n ...inputProps\n };\n\n // `copiedProps` is our fresh own-object copy, so iterating with `for...in` is safe here.\n // eslint-disable-next-line guard-for-in\n for (const propName in copiedProps) {\n const propValue = copiedProps[propName];\n if (isEventHandler(propName, propValue)) {\n copiedProps[propName] = wrapEventHandler(propValue);\n }\n }\n return copiedProps;\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction resolvePropsGetter(inputProps, previousProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(previousProps);\n }\n return inputProps ?? EMPTY_PROPS;\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return wrapEventHandler(theirHandler);\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(...args);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(...args);\n }\n return result;\n }\n const result = theirHandler(...args);\n ourHandler?.(...args);\n return result;\n };\n}\nfunction wrapEventHandler(handler) {\n if (!handler) {\n return handler;\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n makeEventPreventable(event);\n }\n return handler(...args);\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}"],"ignoreList":[0],"mappings":";;AACA,IAAMA,IAAc,CAAC;AAiCrB,SAAgBC,EAAW,GAAG,GAAG,GAAG,GAAG,GAAG;CACxC,IAAI,CAACC,KAAK,CAACC,KAAK,CAACC,KAAK,CAACC,GACrB,OAAOC,EAAyBC,CAAC;CAInC,IAAIC,IAASF,EAAyBD,CAAC;CAavC,O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;AACT;AACA,SAASN,EAAiB,GAAO;CAC/B,OAAwB,OAAOD,KAAU,cAAlCA,KAA8C,iBAAiBA;AACxE"}
package/dist/index197.js CHANGED
@@ -1,10 +1,71 @@
1
- //#region ../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
2
- var e = /*#__PURE__*/ function(e) {
3
- return e.startingStyle = "data-starting-style", e.endingStyle = "data-ending-style", e;
4
- }({}), t = { "data-starting-style": "" }, n = { "data-ending-style": "" }, r = { transitionStatus(e) {
5
- return e === "starting" ? t : e === "ending" ? n : null;
6
- } };
1
+ import e from "./index183.js";
2
+ import { useMergedRefs as t, useMergedRefsN as n } from "./index186.js";
3
+ import { getReactElementRef as r } from "./index188.js";
4
+ import { mergeObjects as i } from "./index189.js";
5
+ import { warn as a } from "./index191.js";
6
+ import { EMPTY_OBJECT as o } from "./index192.js";
7
+ import { getStateAttributesProps as s } from "./index193.js";
8
+ import { resolveClassName as c } from "./index194.js";
9
+ import { resolveStyle as l } from "./index195.js";
10
+ import { mergeClassNames as u, mergeProps as d, mergePropsN as f } from "./index196.js";
11
+ import * as p from "react";
12
+ import { createElement as m } from "react";
13
+ //#region ../../node_modules/@base-ui/react/internals/useRenderElement.mjs
14
+ function h(e, t, n = {}) {
15
+ let r = t.render;
16
+ n.enabled !== !1 && (r = x(r));
17
+ let i = g(t, n, r);
18
+ if (n.enabled === !1) return null;
19
+ let a = n.state ?? o;
20
+ return S(e, r, i, a);
21
+ }
22
+ function g(e, a, d) {
23
+ let { className: f, style: p } = e, { state: m = o, ref: h, props: g, stateAttributesMapping: v, enabled: y = !0 } = a, b = y ? c(f, m) : void 0, x = y ? l(p, m) : void 0, S = y ? s(m, v) : o, C = y && g ? _(g) : void 0, w = y ? i(S, C) ?? {} : o;
24
+ return typeof document < "u" && (y ? w.ref = Array.isArray(h) ? n([
25
+ w.ref,
26
+ r(d),
27
+ ...h
28
+ ]) : t(w.ref, r(d), h) : t(null, null)), y ? (b !== void 0 && (w.className = u(w.className, b)), x !== void 0 && (w.style = i(w.style, x)), w) : o;
29
+ }
30
+ function _(e) {
31
+ return Array.isArray(e) ? f(e) : d(void 0, e);
32
+ }
33
+ var v = Symbol.for("react.lazy"), y = /^[A-Z][A-Za-z0-9$]*$/, b = /[a-z]/;
34
+ function x(e) {
35
+ if (e?.$$typeof !== v) return e;
36
+ let t = p.Children.toArray(e)[0];
37
+ return /*#__PURE__*/ p.isValidElement(t) ? t : e;
38
+ }
39
+ function S(t, n, r, i) {
40
+ if (n) {
41
+ if (typeof n == "function") return process.env.NODE_ENV !== "production" && C(n), n(r, i);
42
+ let e = d(r, n.props);
43
+ if (e.ref = r.ref, process.env.NODE_ENV !== "production" && !/*#__PURE__*/ p.isValidElement(n)) throw Error([
44
+ "Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
45
+ "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
46
+ "https://base-ui.com/r/invalid-render-prop"
47
+ ].join("\n"));
48
+ return /*#__PURE__*/ p.cloneElement(n, e);
49
+ }
50
+ if (t && typeof t == "string") return w(t, r);
51
+ throw Error(process.env.NODE_ENV === "production" ? e(8) : "Base UI: Render element or function are not defined.");
52
+ }
53
+ function C(e) {
54
+ let t = e.name;
55
+ t.length !== 0 && y.test(t) && b.test(t) && a(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
56
+ }
57
+ function w(e, t) {
58
+ return e === "button" ? /*#__PURE__*/ m("button", {
59
+ type: "button",
60
+ ...t,
61
+ key: t.key
62
+ }) : e === "img" ? /*#__PURE__*/ m("img", {
63
+ alt: "",
64
+ ...t,
65
+ key: t.key
66
+ }) : /*#__PURE__*/ p.createElement(e, t);
67
+ }
7
68
  //#endregion
8
- export { e as TransitionStatusDataAttributes, r as transitionStatusMapping };
69
+ export { h as useRenderElement };
9
70
 
10
71
  //# sourceMappingURL=index197.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index197.js","names":[],"sources":["../../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs"],"sourcesContent":["export let TransitionStatusDataAttributes = /*#__PURE__*/function (TransitionStatusDataAttributes) {\n /**\n * Present when the component begins animating in.\n */\n TransitionStatusDataAttributes[\"startingStyle\"] = \"data-starting-style\";\n /**\n * Present when the component is animating out.\n */\n TransitionStatusDataAttributes[\"endingStyle\"] = \"data-ending-style\";\n return TransitionStatusDataAttributes;\n}({});\nconst STARTING_HOOK = {\n 'data-starting-style': ''\n};\nconst ENDING_HOOK = {\n 'data-ending-style': ''\n};\nexport const transitionStatusMapping = {\n transitionStatus(value) {\n if (value === 'starting') {\n return STARTING_HOOK;\n }\n if (value === 'ending') {\n return ENDING_HOOK;\n }\n return null;\n }\n};"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAW,IAA8C,uBAAU,GAAgC;CASjG,OALA,EAA+B,gBAAmB,uBAIlD,EAA+B,cAAiB,qBACzC;AACT,EAAE,CAAC,CAAC,GACE,IAAgB,EACpB,uBAAuB,GACzB,GACM,IAAc,EAClB,qBAAqB,GACvB,GACa,IAA0B,EACrC,iBAAiB,GAAO;CAOtB,OANI,MAAU,aACL,IAEL,MAAU,WACL,IAEF;AACT,EACF"}
1
+ {"version":3,"file":"index197.js","names":["React","_formatErrorMessage","formatErrorMessage","React$1","useRenderElement","renderProp","componentProps","params","unwrapLazyRenderProp","outProps","useRenderElementProps","state","EMPTY_OBJECT","evaluateRenderProp","element","classNameProp","styleProp","className","enabled","resolveClassName","style","resolveStyle","stateProps","getStateAttributesProps","stateAttributesMapping","resolvedProps","props","resolveRenderFunctionProps","mergeObjects","ref","useMergedRefsN","getReactElementRef","useMergedRefs","mergeClassNames","mergePropsN","mergeProps","REACT_LAZY_TYPE","COMPONENT_IDENTIFIER_PATTERN","LOWERCASE_CHARACTER_PATTERN","render","unwrapped","warnIfRenderPropLooksLikeComponent","mergedProps","renderTag","functionName","renderFn","warn","Tag"],"sources":["../../../node_modules/@base-ui/react/internals/useRenderElement.mjs"],"sourcesContent":["import _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs, useMergedRefsN } from '@base-ui/utils/useMergedRefs';\nimport { getReactElementRef } from '@base-ui/utils/getReactElementRef';\nimport { mergeObjects } from '@base-ui/utils/mergeObjects';\nimport { warn } from '@base-ui/utils/warn';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { getStateAttributesProps } from \"./getStateAttributesProps.mjs\";\nimport { resolveClassName } from \"../utils/resolveClassName.mjs\";\nimport { resolveStyle } from \"../utils/resolveStyle.mjs\";\nimport { mergeProps, mergePropsN, mergeClassNames } from \"../merge-props/index.mjs\";\nimport { createElement as _createElement } from \"react\";\n/**\n * Renders a Base UI element.\n *\n * @param element The default HTML element to render. Can be overridden by the `render` prop.\n * @param componentProps An object containing the `render` and `className` props to be used for element customization. Other props are ignored.\n * @param params Additional parameters for rendering the element.\n */\nexport function useRenderElement(element, componentProps, params = {}) {\n let renderProp = componentProps.render;\n if (params.enabled !== false) {\n // A pending lazy element suspends when unwrapped, so leave it wrapped while disabled.\n renderProp = unwrapLazyRenderProp(renderProp);\n }\n const outProps = useRenderElementProps(componentProps, params, renderProp);\n if (params.enabled === false) {\n return null;\n }\n const state = params.state ?? EMPTY_OBJECT;\n return evaluateRenderProp(element, renderProp, outProps, state);\n}\n\n/**\n * Computes render element final props.\n */\nfunction useRenderElementProps(componentProps, params, renderProp) {\n const {\n className: classNameProp,\n style: styleProp\n } = componentProps;\n const {\n state = EMPTY_OBJECT,\n ref,\n props,\n stateAttributesMapping,\n enabled = true\n } = params;\n const className = enabled ? resolveClassName(classNameProp, state) : undefined;\n const style = enabled ? resolveStyle(styleProp, state) : undefined;\n const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;\n const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : undefined;\n\n // Ensure outProps is always a new mutable object when enabled, never EMPTY_OBJECT.\n // This prevents potential TypeError when setting ref, className, or style properties,\n // since EMPTY_OBJECT is frozen and mutations would fail in strict mode.\n const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;\n\n // SAFETY: The `useMergedRefs` functions use a single hook to store the same value,\n // switching between them at runtime is safe. If this assertion fails, React will\n // throw at runtime anyway.\n // This also skips the `useMergedRefs` call on the server, which is fine because\n // refs are not used on the server side.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (typeof document !== 'undefined') {\n if (!enabled) {\n // Called only to keep the hook order stable when disabled; the merged ref is unused.\n void useMergedRefs(null, null);\n } else if (Array.isArray(ref)) {\n outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);\n } else {\n outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);\n }\n }\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n if (className !== undefined) {\n outProps.className = mergeClassNames(outProps.className, className);\n }\n if (style !== undefined) {\n outProps.style = mergeObjects(outProps.style, style);\n }\n return outProps;\n}\nfunction resolveRenderFunctionProps(props) {\n if (Array.isArray(props)) {\n return mergePropsN(props);\n }\n return mergeProps(undefined, props);\n}\n\n// The symbol React uses internally for lazy components\n// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31\n//\n// TODO delete once https://github.com/react/react/issues/32392 is fixed\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\nconst COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;\nconst LOWERCASE_CHARACTER_PATTERN = /[a-z]/;\n\n// Workaround for https://github.com/react/react/issues/32392\n// The Flight client hands over a lazy wrapper in place of a render element created in a\n// Server Component. The wrapper exposes no `.props` or `.ref`, so it must be unwrapped\n// before those are read. This works because the toArray() logic unwraps the lazy\n// element type in\n// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186\nfunction unwrapLazyRenderProp(render) {\n // `$$typeof` is a React internal, absent from the public element types.\n if (render?.$$typeof !== REACT_LAZY_TYPE) {\n return render;\n }\n // Keep the wrapper unless it unwraps to an element, so an invalid render prop is still\n // reported as one instead of silently falling back to the default element.\n const unwrapped = React.Children.toArray(render)[0];\n return /*#__PURE__*/React.isValidElement(unwrapped) ? unwrapped : render;\n}\nfunction evaluateRenderProp(element, render, props, state) {\n if (render) {\n if (typeof render === 'function') {\n if (process.env.NODE_ENV !== 'production') {\n warnIfRenderPropLooksLikeComponent(render);\n }\n return render(props, state);\n }\n const mergedProps = mergeProps(props, render.props);\n mergedProps.ref = props.ref;\n\n // There is a high number of indirections, the error message thrown by React.cloneElement() is\n // hard to use for developers, this logic provides a better context.\n //\n // Our general guideline is to never change the control flow depending on the environment.\n // However, React.cloneElement() throws if React.isValidElement() is false,\n // so we can throw before with custom message.\n if (process.env.NODE_ENV !== 'production') {\n if (! /*#__PURE__*/React.isValidElement(render)) {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error(['Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.', 'A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.', 'https://base-ui.com/r/invalid-render-prop'].join('\\n'));\n }\n }\n return /*#__PURE__*/React.cloneElement(render, mergedProps);\n }\n if (element) {\n if (typeof element === 'string') {\n return renderTag(element, props);\n }\n }\n // Unreachable, but the typings on `useRenderElement` need to be reworked\n // to annotate it correctly.\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: Render element or function are not defined.' : _formatErrorMessage(8));\n}\nfunction warnIfRenderPropLooksLikeComponent(renderFn) {\n const functionName = renderFn.name;\n if (functionName.length === 0) {\n return;\n }\n if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {\n return;\n }\n if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {\n return;\n }\n warn(`The \\`render\\` prop received a function named \\`${functionName}\\` that starts with an uppercase letter.`, 'This usually means a React component was passed directly as `render={Component}`.', 'Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.', 'If this is an intentional render callback, rename it to start with a lowercase letter.', 'Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.', 'https://base-ui.com/r/invalid-render-prop');\n}\nfunction renderTag(Tag, props) {\n if (Tag === 'button') {\n return /*#__PURE__*/_createElement(\"button\", {\n type: \"button\",\n ...props,\n key: props.key\n });\n }\n if (Tag === 'img') {\n return /*#__PURE__*/_createElement(\"img\", {\n alt: \"\",\n ...props,\n key: props.key\n });\n }\n return /*#__PURE__*/React.createElement(Tag, props);\n}"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;AAmBA,SAAgBI,EAAiB,GAAS,GAAgB,IAAS,CAAC,GAAG;CACrE,IAAIC,IAAaC,EAAe;CAChC,AAAIC,EAAO,YAAY,OAErB,IAAaC,EAAqBH,CAAU;CAE9C,IAAMI,IAAWC,EAAsBJ,GAAgBC,GAAQF,CAAU;CACzE,IAAIE,EAAO,YAAY,IACrB,OAAO;CAET,IAAMI,IAAQJ,EAAO,SAASK;CAC9B,OAAOC,EAAmBC,GAAST,GAAYI,GAAUE,CAAK;AAChE;AAKA,SAASD,EAAsB,GAAgB,GAAQ,GAAY;CACjE,IAAM,EACJ,WAAWK,GACX,OAAOC,MACLV,GACE,EACJ,WAAQM,GACR,QACA,UACA,2BACA,aAAU,OACRL,GACEU,IAAYC,IAAUC,EAAiBJ,GAAeJ,CAAK,IAAI,KAAA,GAC/DS,IAAQF,IAAUG,EAAaL,GAAWL,CAAK,IAAI,KAAA,GACnDW,IAAaJ,IAAUK,EAAwBZ,GAAOa,CAAsB,IAAIZ,GAChFa,IAAgBP,KAAWQ,IAAQC,EAA2BD,CAAK,IAAI,KAA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IAAI,CAAC;EAG7T,OAAoB,gBAAM,aAAaA,GAAQG,CAAW;CAC5D;CACA,IAAI5B,KACE,OAAOA,KAAY,UACrB,OAAO6B,EAAU7B,GAASY,CAAK;CAKnC,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAwEzB,EAAoB,CAAC,IAA9E,sDAA+E;AACzI;AACA,SAASwC,EAAmC,GAAU;CACpD,IAAMG,IAAeC,EAAS;CAC9B,AAAID,EAAa,WAAW,KAGvBP,EAA6B,KAAKO,CAAY,KAG9CN,EAA4B,KAAKM,CAAY,KAGlDE,EAAK,mDAAmDF,EAAa,2CAA2C,qFAAqF,yGAAyG,0FAA0F,2FAA2F,2CAA2C;AAChhB;AACA,SAASD,EAAU,GAAK,GAAO;CAe7B,OAdII,MAAQ,WACU,gBAAe,UAAU;EAC3C,MAAM;EACN,GAAGrB;EACH,KAAKA,EAAM;CACb,CAAC,IAECqB,MAAQ,QACU,gBAAe,OAAO;EACxC,KAAK;EACL,GAAGrB;EACH,KAAKA,EAAM;CACb,CAAC,IAEiB,gBAAM,cAAcqB,GAAKrB,CAAK;AACpD"}
package/dist/index198.js CHANGED
@@ -1,26 +1,6 @@
1
- import { TransitionStatusDataAttributes as e, transitionStatusMapping as t } from "./index197.js";
2
- (function(t) {
3
- return t.open = "data-open", t.closed = "data-closed", t[t.startingStyle = e.startingStyle] = "startingStyle", t[t.endingStyle = e.endingStyle] = "endingStyle", t.anchorHidden = "data-anchor-hidden", t.side = "data-side", t.align = "data-align", t;
4
- })({});
5
- var n = { "data-popup-open": "" }, r = {
6
- "data-popup-open": "",
7
- "data-pressed": ""
8
- }, i = { "data-open": "" }, a = { "data-closed": "" }, o = { "data-anchor-hidden": "" }, s = { open(e) {
9
- return e ? n : null;
10
- } }, c = { open(e) {
11
- return e ? r : null;
12
- } }, l = {
13
- open(e) {
14
- return e ? i : a;
15
- },
16
- anchorHidden(e) {
17
- return e ? o : null;
18
- }
19
- }, u = {
20
- ...l,
21
- ...t
22
- };
1
+ //#region ../../node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
2
+ var e = "data-starting-style", t = "data-ending-style";
23
3
  //#endregion
24
- export { l as popupStateMapping, u as popupTransitionStateMapping, c as pressableTriggerOpenStateMapping, s as triggerOpenStateMapping };
4
+ export { t as endingStyle, e as startingStyle };
25
5
 
26
6
  //# sourceMappingURL=index198.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index198.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/popupStateMapping.mjs"],"sourcesContent":["import { TransitionStatusDataAttributes, transitionStatusMapping } from \"../internals/stateAttributesMapping.mjs\";\nexport let CommonPopupDataAttributes = function (CommonPopupDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonPopupDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the popup is closed.\n */\n CommonPopupDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the popup begins animating in.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the popup is animating out.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the anchor is hidden.\n */\n CommonPopupDataAttributes[\"anchorHidden\"] = \"data-anchor-hidden\";\n /**\n * Indicates which side the popup is positioned relative to the trigger.\n * @type { 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}\n */\n CommonPopupDataAttributes[\"side\"] = \"data-side\";\n /**\n * Indicates how the popup is aligned relative to specified side.\n * @type {'start' | 'center' | 'end'}\n */\n CommonPopupDataAttributes[\"align\"] = \"data-align\";\n return CommonPopupDataAttributes;\n}({});\nexport let CommonTriggerDataAttributes = /*#__PURE__*/function (CommonTriggerDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonTriggerDataAttributes[\"popupOpen\"] = \"data-popup-open\";\n /**\n * Present when a pressable trigger is pressed.\n */\n CommonTriggerDataAttributes[\"pressed\"] = \"data-pressed\";\n return CommonTriggerDataAttributes;\n}({});\n\n// Literal keys (instead of enum member references) keep the docs-only enums above\n// tree-shakeable: a runtime reference would retain the whole enum IIFE in every bundle.\nconst TRIGGER_HOOK = {\n 'data-popup-open': ''\n};\nconst PRESSABLE_TRIGGER_HOOK = {\n 'data-popup-open': '',\n 'data-pressed': ''\n};\nconst POPUP_OPEN_HOOK = {\n 'data-open': ''\n};\nconst POPUP_CLOSED_HOOK = {\n 'data-closed': ''\n};\nconst ANCHOR_HIDDEN_HOOK = {\n 'data-anchor-hidden': ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const pressableTriggerOpenStateMapping = {\n open(value) {\n if (value) {\n return PRESSABLE_TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const popupStateMapping = {\n open(value) {\n if (value) {\n return POPUP_OPEN_HOOK;\n }\n return POPUP_CLOSED_HOOK;\n },\n anchorHidden(value) {\n if (value) {\n return ANCHOR_HIDDEN_HOOK;\n }\n return null;\n }\n};\nexport const popupTransitionStateMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};"],"x_google_ignoreList":[0],"mappings":";CACuC,SAAU,GAA2B;CA+B1E,OA3BA,EAA0B,OAAU,aAIpC,EAA0B,SAAY,eAItC,EAA0B,EAA0B,gBAAmB,EAA+B,iBAAiB,iBAIvH,EAA0B,EAA0B,cAAiB,EAA+B,eAAe,eAInH,EAA0B,eAAkB,sBAK5C,EAA0B,OAAU,aAKpC,EAA0B,QAAW,cAC9B;AACT,EAAA,CAAE,CAAC,CAAC;AAeJ,IAAM,IAAe,EACnB,mBAAmB,GACrB,GACM,IAAyB;CAC7B,mBAAmB;CACnB,gBAAgB;AAClB,GACM,IAAkB,EACtB,aAAa,GACf,GACM,IAAoB,EACxB,eAAe,GACjB,GACM,IAAqB,EACzB,sBAAsB,GACxB,GACa,IAA0B,EACrC,KAAK,GAAO;CAIV,OAHI,IACK,IAEF;AACT,EACF,GACa,IAAmC,EAC9C,KAAK,GAAO;CAIV,OAHI,IACK,IAEF;AACT,EACF,GACa,IAAoB;CAC/B,KAAK,GAAO;EAIV,OAHI,IACK,IAEF;CACT;CACA,aAAa,GAAO;EAIlB,OAHI,IACK,IAEF;CACT;AACF,GACa,IAA8B;CACzC,GAAG;CACH,GAAG;AACL"}
1
+ {"version":3,"file":"index198.js","names":["startingStyle","endingStyle"],"sources":["../../../node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs"],"sourcesContent":["/**\n * Present when the component begins animating in.\n */\nexport const startingStyle = 'data-starting-style';\n\n/**\n * Present when the component is animating out.\n */\nexport const endingStyle = 'data-ending-style';"],"ignoreList":[0],"mappings":";AAGA,IAAaA,IAAgB,uBAKhBC,IAAc"}
package/dist/index199.js CHANGED
@@ -1,31 +1,9 @@
1
- "use client";
2
- import { useDialogRootContext as e } from "./index184.js";
3
- import { useRenderElement as t } from "./index196.js";
4
- import { popupTransitionStateMapping as n } from "./index198.js";
5
- import * as r from "react";
6
- //#region ../../node_modules/@base-ui/react/dialog/backdrop/DialogBackdrop.mjs
7
- var i = /*#__PURE__*/ r.forwardRef(function(r, i) {
8
- let { render: a, className: o, style: s, forceRender: c = !1, ...l } = r, u = e(), d = u.useState("open"), f = u.useState("nested"), p = u.useState("mounted"), m = {
9
- open: d,
10
- transitionStatus: u.useState("transitionStatus")
11
- };
12
- return t("div", r, {
13
- state: m,
14
- ref: [u.context.backdropRef, i],
15
- stateAttributesMapping: n,
16
- props: [{
17
- role: "presentation",
18
- hidden: !p,
19
- style: {
20
- userSelect: "none",
21
- WebkitUserSelect: "none"
22
- }
23
- }, l],
24
- enabled: c || !f
25
- });
26
- });
27
- process.env.NODE_ENV !== "production" && (i.displayName = "DialogBackdrop");
1
+ import { endingStyle as e, startingStyle as t } from "./index198.js";
2
+ //#region ../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
3
+ var n = { [t]: "" }, r = { [e]: "" }, i = { transitionStatus(e) {
4
+ return e === "starting" ? n : e === "ending" ? r : null;
5
+ } };
28
6
  //#endregion
29
- export { i as DialogBackdrop };
7
+ export { i as transitionStatusMapping };
30
8
 
31
9
  //# sourceMappingURL=index199.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index199.js","names":[],"sources":["../../../node_modules/@base-ui/react/dialog/backdrop/DialogBackdrop.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * An overlay displayed beneath the popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogBackdrop = /*#__PURE__*/React.forwardRef(function DialogBackdrop(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n forceRender = false,\n ...elementProps\n } = componentProps;\n const store = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const mounted = store.useState('mounted');\n const transitionStatus = store.useState('transitionStatus');\n const state = {\n open,\n transitionStatus\n };\n return useRenderElement('div', componentProps, {\n state,\n ref: [store.context.backdropRef, forwardedRef],\n stateAttributesMapping: popupTransitionStateMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n userSelect: 'none',\n WebkitUserSelect: 'none'\n }\n }, elementProps],\n enabled: forceRender || !nested\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogBackdrop.displayName = \"DialogBackdrop\";"],"x_google_ignoreList":[0],"mappings":";;;;;;AAaA,IAAa,IAA8B,gBAAM,WAAW,SAAwB,GAAgB,GAAc;CAChH,IAAM,EACJ,WACA,cACA,UACA,iBAAc,IACd,GAAG,MACD,GACE,IAAQ,EAAqB,GAC7B,IAAO,EAAM,SAAS,MAAM,GAC5B,IAAS,EAAM,SAAS,QAAQ,GAChC,IAAU,EAAM,SAAS,SAAS,GAElC,IAAQ;EACZ;EACA,kBAHuB,EAAM,SAAS,kBAGvB;CACjB;CACA,OAAO,EAAiB,OAAO,GAAgB;EAC7C;EACA,KAAK,CAAC,EAAM,QAAQ,aAAa,CAAY;EAC7C,wBAAwB;EACxB,OAAO,CAAC;GACN,MAAM;GACN,QAAQ,CAAC;GACT,OAAO;IACL,YAAY;IACZ,kBAAkB;GACpB;EACF,GAAG,CAAY;EACf,SAAS,KAAe,CAAC;CAC3B,CAAC;AACH,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAe,cAAc"}
1
+ {"version":3,"file":"index199.js","names":["TransitionStatusDataAttributes.startingStyle","TransitionStatusDataAttributes.endingStyle","STARTING_HOOK","startingStyle","ENDING_HOOK","endingStyle","transitionStatusMapping","value"],"sources":["../../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs"],"sourcesContent":["import * as TransitionStatusDataAttributes from \"./TransitionStatusDataAttributes.mjs\";\nexport { TransitionStatusDataAttributes };\nconst STARTING_HOOK = {\n [TransitionStatusDataAttributes.startingStyle]: ''\n};\nconst ENDING_HOOK = {\n [TransitionStatusDataAttributes.endingStyle]: ''\n};\nexport const transitionStatusMapping = {\n transitionStatus(value) {\n if (value === 'starting') {\n return STARTING_HOOK;\n }\n if (value === 'ending') {\n return ENDING_HOOK;\n }\n return null;\n }\n};"],"ignoreList":[0],"mappings":";;AAEA,IAAME,IAAgB,GACnBF,IAA+C,GAClD,GACMI,IAAc,GACjBH,IAA6C,GAChD,GACaK,IAA0B,EACrC,iBAAiB,GAAO;CAOtB,OANIC,MAAU,aACLL,IAELK,MAAU,WACLH,IAEF;AACT,EACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index20.js","names":[],"sources":["../../../node_modules/@date-fns/tz/date/index.js"],"sourcesContent":["import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\nexport class TZDate extends TZDateMini {\n //#region static\n\n static tz(tz, ...args) {\n return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n }\n\n //#endregion\n\n //#region representation\n\n toISOString() {\n const [sign, hours, minutes] = this.tzComponents();\n const tz = `${sign}${hours}:${minutes}`;\n return this.internal.toISOString().slice(0, -1) + tz;\n }\n toString() {\n // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n return `${this.toDateString()} ${this.toTimeString()}`;\n }\n toDateString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n // \"Tue Aug 13 2024\"\n return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n }\n toTimeString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const time = this.internal.toUTCString().split(\" \")[4];\n const [sign, hours, minutes] = this.tzComponents();\n // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n }\n toLocaleString(locales, options) {\n return Date.prototype.toLocaleString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleDateString(locales, options) {\n return Date.prototype.toLocaleDateString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleTimeString(locales, options) {\n return Date.prototype.toLocaleTimeString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n\n //#endregion\n\n //#region private\n\n tzComponents() {\n const offset = this.getTimezoneOffset();\n const sign = offset > 0 ? \"-\" : \"+\";\n const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n return [sign, hours, minutes];\n }\n\n //#endregion\n\n withTimeZone(timeZone) {\n return new TZDate(+this, timeZone);\n }\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDate(+new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AG;GACH,UAAU,GAAS,YAAY,KAAK;EACtC,CAAC;CACH;CAMA,eAAe;EACb,IAAM,IAAS,KAAK,kBAAkB;EAItC,OAAO;GAHM,IAAS,IAAI,MAAM;GAClB,OAAO,KAAK,MAAM,KAAK,IAAI,CAAM,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,GAElD;GADF,OAAO,KAAK,IAAI,CAAM,IAAI,EAAE,CAAC,CAAC,SAAS,GAAG,GAC/B;EAAC;CAC9B;CAIA,aAAa,GAAU;EACrB,OAAO,IAAI,EAAO,CAAC,MAAM,CAAQ;CACnC;CAIA,CAAC,OAAO,IAAI,mBAAmB,GAAG,GAAM;EACtC,OAAO,IAAI,EAAO,CAAC,IAAI,KAAK,CAAI,GAAG,KAAK,QAAQ;CAClD;AAGF"}
1
+ {"version":3,"file":"index20.js","names":["TZDate","TZDateMini","args","tz","sign","hours","minutes","day","date","month","year","time","tzName","locales","options","offset","timeZone"],"sources":["../../../node_modules/@date-fns/tz/date/index.js"],"sourcesContent":["import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\nexport class TZDate extends TZDateMini {\n //#region static\n\n static tz(tz, ...args) {\n return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n }\n\n //#endregion\n\n //#region representation\n\n toISOString() {\n const [sign, hours, minutes] = this.tzComponents();\n const tz = `${sign}${hours}:${minutes}`;\n return this.internal.toISOString().slice(0, -1) + tz;\n }\n toString() {\n // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n return `${this.toDateString()} ${this.toTimeString()}`;\n }\n toDateString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n // \"Tue Aug 13 2024\"\n return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n }\n toTimeString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const time = this.internal.toUTCString().split(\" \")[4];\n const [sign, hours, minutes] = this.tzComponents();\n // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n }\n toLocaleString(locales, options) {\n return Date.prototype.toLocaleString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleDateString(locales, options) {\n return Date.prototype.toLocaleDateString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleTimeString(locales, options) {\n return Date.prototype.toLocaleTimeString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n\n //#endregion\n\n //#region private\n\n tzComponents() {\n const offset = this.getTimezoneOffset();\n const sign = offset > 0 ? \"-\" : \"+\";\n const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n return [sign, hours, minutes];\n }\n\n //#endregion\n\n withTimeZone(timeZone) {\n return new TZDate(+this, timeZone);\n }\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDate(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}"],"ignoreList":[0],"mappings":";;;AAEA,IAAaA,IAAb,MAAaA,UAAeC,EAAW;CAGrC,OAAO,GAAG,GAAI,GAAGC,GAAM;EACrB,OAAOA,EAAK,SAAS,IAAIF,EAAO,GAAGE,GAAMC,CAAE,IAAI,IAAIH,EAAO,KAAK,IAAI,GAAGG,CAAE;CAC1E;CAMA,cAAc;EACZ,IAAM,CAACC,GAAMC,GAAOC,KAAW,KAAK,aAAa,GAC3CH,IAAK,GAAGC,IAAOC,EAAM,GAAGC;EAC9B,OAAO,KAAK,SAAS,YAAY,CAAC,CAAC,MAAM,GAAG,EAAE,IAAIH;CACpD;CACA,WAAW;EAET,OAAO,GAAG,KAAK,aAAa,EAAE,GAAG,KAAK,aAAa;CACrD;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