@rpcbase/ui 0.181.0 → 0.183.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 (618) hide show
  1. package/dist/helpers/index.d.ts +1 -0
  2. package/dist/helpers/index.d.ts.map +1 -1
  3. package/dist/helpers/useScrollPagination.d.ts +23 -0
  4. package/dist/helpers/useScrollPagination.d.ts.map +1 -0
  5. package/dist/helpers/useScrollPagination.test.d.ts +2 -0
  6. package/dist/helpers/useScrollPagination.test.d.ts.map +1 -0
  7. package/dist/index.js +62 -60
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +23 -69
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +5 -4
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +3 -3
  14. package/dist/index101.js.map +1 -1
  15. package/dist/index102.js +4 -6
  16. package/dist/index102.js.map +1 -1
  17. package/dist/index103.js +6 -145
  18. package/dist/index103.js.map +1 -1
  19. package/dist/index104.js +144 -38
  20. package/dist/index104.js.map +1 -1
  21. package/dist/index105.js +39 -4
  22. package/dist/index105.js.map +1 -1
  23. package/dist/index106.js +4 -7
  24. package/dist/index106.js.map +1 -1
  25. package/dist/index107.js +6 -12
  26. package/dist/index107.js.map +1 -1
  27. package/dist/index108.js +13 -13
  28. package/dist/index108.js.map +1 -1
  29. package/dist/index109.js +13 -7
  30. package/dist/index109.js.map +1 -1
  31. package/dist/index11.js +62 -544
  32. package/dist/index11.js.map +1 -1
  33. package/dist/index110.js +6 -30
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +31 -10
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +10 -10
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +10 -8
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +8 -13
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +13 -101
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +102 -20
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +20 -54
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +51 -70
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +72 -9
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index12.js +535 -110
  54. package/dist/index12.js.map +1 -1
  55. package/dist/index120.js +9 -20
  56. package/dist/index120.js.map +1 -1
  57. package/dist/index121.js +20 -16
  58. package/dist/index121.js.map +1 -1
  59. package/dist/index122.js +16 -23
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +23 -6
  62. package/dist/index123.js.map +1 -1
  63. package/dist/index124.js +6 -5
  64. package/dist/index124.js.map +1 -1
  65. package/dist/index125.js +5 -23
  66. package/dist/index125.js.map +1 -1
  67. package/dist/index126.js +24 -35
  68. package/dist/index126.js.map +1 -1
  69. package/dist/index127.js +35 -16
  70. package/dist/index127.js.map +1 -1
  71. package/dist/index128.js +16 -7
  72. package/dist/index128.js.map +1 -1
  73. package/dist/index129.js +6 -4
  74. package/dist/index129.js.map +1 -1
  75. package/dist/index13.js +122 -71
  76. package/dist/index13.js.map +1 -1
  77. package/dist/index130.js +4 -4
  78. package/dist/index130.js.map +1 -1
  79. package/dist/index131.js +4 -4
  80. package/dist/index131.js.map +1 -1
  81. package/dist/index132.js +4 -4
  82. package/dist/index132.js.map +1 -1
  83. package/dist/index133.js +4 -3
  84. package/dist/index133.js.map +1 -1
  85. package/dist/index134.js +3 -6
  86. package/dist/index134.js.map +1 -1
  87. package/dist/index135.js +7 -24
  88. package/dist/index135.js.map +1 -1
  89. package/dist/index136.js +24 -8
  90. package/dist/index136.js.map +1 -1
  91. package/dist/index137.js +7 -6
  92. package/dist/index137.js.map +1 -1
  93. package/dist/index138.js +6 -5
  94. package/dist/index138.js.map +1 -1
  95. package/dist/index139.js +5 -3
  96. package/dist/index139.js.map +1 -1
  97. package/dist/index14.js +61 -717
  98. package/dist/index14.js.map +1 -1
  99. package/dist/index140.js +3 -3
  100. package/dist/index140.js.map +1 -1
  101. package/dist/index141.js +3 -4
  102. package/dist/index141.js.map +1 -1
  103. package/dist/index142.js +4 -3
  104. package/dist/index142.js.map +1 -1
  105. package/dist/index143.js +3 -4
  106. package/dist/index143.js.map +1 -1
  107. package/dist/index144.js +4 -3
  108. package/dist/index144.js.map +1 -1
  109. package/dist/index145.js +3 -3
  110. package/dist/index145.js.map +1 -1
  111. package/dist/index146.js +3 -3
  112. package/dist/index146.js.map +1 -1
  113. package/dist/index147.js +3 -46
  114. package/dist/index147.js.map +1 -1
  115. package/dist/index148.js +2 -2
  116. package/dist/index15.js +727 -18
  117. package/dist/index15.js.map +1 -1
  118. package/dist/index150.js +2 -2
  119. package/dist/index152.js +3 -3
  120. package/dist/index153.js +40 -599
  121. package/dist/index153.js.map +1 -1
  122. package/dist/index154.js +605 -5
  123. package/dist/index154.js.map +1 -1
  124. package/dist/index155.js +5 -68
  125. package/dist/index155.js.map +1 -1
  126. package/dist/index156.js +69 -2
  127. package/dist/index156.js.map +1 -1
  128. package/dist/index157.js +2 -364
  129. package/dist/index157.js.map +1 -1
  130. package/dist/index158.js +303 -201
  131. package/dist/index158.js.map +1 -1
  132. package/dist/index159.js +247 -46
  133. package/dist/index159.js.map +1 -1
  134. package/dist/index16.js +19 -14
  135. package/dist/index16.js.map +1 -1
  136. package/dist/index160.js +56 -42
  137. package/dist/index160.js.map +1 -1
  138. package/dist/index161.js +46 -169
  139. package/dist/index161.js.map +1 -1
  140. package/dist/index162.js +156 -96
  141. package/dist/index162.js.map +1 -1
  142. package/dist/index163.js +109 -24
  143. package/dist/index163.js.map +1 -1
  144. package/dist/index164.js +25 -8
  145. package/dist/index164.js.map +1 -1
  146. package/dist/index165.js +8 -5
  147. package/dist/index165.js.map +1 -1
  148. package/dist/index166.js +4 -5
  149. package/dist/index166.js.map +1 -1
  150. package/dist/index167.js +5 -4
  151. package/dist/index167.js.map +1 -1
  152. package/dist/index168.js +4 -466
  153. package/dist/index168.js.map +1 -1
  154. package/dist/index169.js +420 -139
  155. package/dist/index169.js.map +1 -1
  156. package/dist/index17.js +13 -382
  157. package/dist/index17.js.map +1 -1
  158. package/dist/index170.js +149 -71
  159. package/dist/index170.js.map +1 -1
  160. package/dist/index171.js +74 -229
  161. package/dist/index171.js.map +1 -1
  162. package/dist/index172.js +262 -9
  163. package/dist/index172.js.map +1 -1
  164. package/dist/index173.js +9 -42
  165. package/dist/index173.js.map +1 -1
  166. package/dist/index174.js +42 -4
  167. package/dist/index174.js.map +1 -1
  168. package/dist/index175.js +4 -16
  169. package/dist/index175.js.map +1 -1
  170. package/dist/index176.js +57 -4
  171. package/dist/index176.js.map +1 -1
  172. package/dist/index177.js +8 -5
  173. package/dist/index177.js.map +1 -1
  174. package/dist/index178.js +55 -47
  175. package/dist/index178.js.map +1 -1
  176. package/dist/index179.js +17 -64
  177. package/dist/index179.js.map +1 -1
  178. package/dist/index18.js +363 -695
  179. package/dist/index18.js.map +1 -1
  180. package/dist/index180.js +16 -6
  181. package/dist/index180.js.map +1 -1
  182. package/dist/index181.js +5 -4
  183. package/dist/index181.js.map +1 -1
  184. package/dist/index182.js +5 -7
  185. package/dist/index182.js.map +1 -1
  186. package/dist/index183.js +6 -17
  187. package/dist/index183.js.map +1 -1
  188. package/dist/index184.js +4 -5
  189. package/dist/index184.js.map +1 -1
  190. package/dist/index185.js +7 -5
  191. package/dist/index185.js.map +1 -1
  192. package/dist/index186.js +17 -13
  193. package/dist/index186.js.map +1 -1
  194. package/dist/index187.js +5 -10
  195. package/dist/index187.js.map +1 -1
  196. package/dist/index188.js +5 -14
  197. package/dist/index188.js.map +1 -1
  198. package/dist/index189.js +13 -14
  199. package/dist/index189.js.map +1 -1
  200. package/dist/index19.js +685 -624
  201. package/dist/index19.js.map +1 -1
  202. package/dist/index190.js +10 -5
  203. package/dist/index190.js.map +1 -1
  204. package/dist/index191.js +14 -6
  205. package/dist/index191.js.map +1 -1
  206. package/dist/index192.js +14 -7
  207. package/dist/index192.js.map +1 -1
  208. package/dist/index193.js +5 -6
  209. package/dist/index193.js.map +1 -1
  210. package/dist/index194.js +6 -9
  211. package/dist/index194.js.map +1 -1
  212. package/dist/index195.js +7 -5
  213. package/dist/index195.js.map +1 -1
  214. package/dist/index196.js +6 -5
  215. package/dist/index196.js.map +1 -1
  216. package/dist/index197.js +9 -9
  217. package/dist/index197.js.map +1 -1
  218. package/dist/index198.js +5 -5
  219. package/dist/index198.js.map +1 -1
  220. package/dist/index199.js +5 -5
  221. package/dist/index199.js.map +1 -1
  222. package/dist/index2.js +2 -2
  223. package/dist/index20.js +640 -191
  224. package/dist/index20.js.map +1 -1
  225. package/dist/index200.js +9 -4
  226. package/dist/index200.js.map +1 -1
  227. package/dist/index201.js +5 -11
  228. package/dist/index201.js.map +1 -1
  229. package/dist/index202.js +5 -10
  230. package/dist/index202.js.map +1 -1
  231. package/dist/index203.js +4 -10
  232. package/dist/index203.js.map +1 -1
  233. package/dist/index204.js +11 -11
  234. package/dist/index204.js.map +1 -1
  235. package/dist/index205.js +10 -11
  236. package/dist/index205.js.map +1 -1
  237. package/dist/index206.js +10 -10
  238. package/dist/index206.js.map +1 -1
  239. package/dist/index207.js +11 -7
  240. package/dist/index207.js.map +1 -1
  241. package/dist/index208.js +11 -6
  242. package/dist/index208.js.map +1 -1
  243. package/dist/index209.js +10 -5
  244. package/dist/index209.js.map +1 -1
  245. package/dist/index21.js +209 -5
  246. package/dist/index21.js.map +1 -1
  247. package/dist/index210.js +7 -6
  248. package/dist/index210.js.map +1 -1
  249. package/dist/index211.js +6 -7
  250. package/dist/index211.js.map +1 -1
  251. package/dist/index212.js +5 -6
  252. package/dist/index212.js.map +1 -1
  253. package/dist/index213.js +6 -55
  254. package/dist/index213.js.map +1 -1
  255. package/dist/index214.js +7 -8
  256. package/dist/index214.js.map +1 -1
  257. package/dist/index215.js +6 -19
  258. package/dist/index215.js.map +1 -1
  259. package/dist/index216.js +54 -15
  260. package/dist/index216.js.map +1 -1
  261. package/dist/index217.js +16 -7
  262. package/dist/index217.js.map +1 -1
  263. package/dist/index218.js +7 -10
  264. package/dist/index218.js.map +1 -1
  265. package/dist/index219.js +9 -9
  266. package/dist/index219.js.map +1 -1
  267. package/dist/index22.js +5 -35
  268. package/dist/index22.js.map +1 -1
  269. package/dist/index220.js +10 -21
  270. package/dist/index220.js.map +1 -1
  271. package/dist/index221.js +21 -10
  272. package/dist/index221.js.map +1 -1
  273. package/dist/index222.js +10 -9
  274. package/dist/index222.js.map +1 -1
  275. package/dist/index223.js +6 -6
  276. package/dist/index223.js.map +1 -1
  277. package/dist/index224.js +9 -4
  278. package/dist/index224.js.map +1 -1
  279. package/dist/index225.js +4 -5
  280. package/dist/index225.js.map +1 -1
  281. package/dist/index226.js +5 -16
  282. package/dist/index226.js.map +1 -1
  283. package/dist/index227.js +16 -9
  284. package/dist/index227.js.map +1 -1
  285. package/dist/index228.js +9 -18
  286. package/dist/index228.js.map +1 -1
  287. package/dist/index229.js +15 -12
  288. package/dist/index229.js.map +1 -1
  289. package/dist/index23.js +24 -258
  290. package/dist/index23.js.map +1 -1
  291. package/dist/index230.js +12 -9
  292. package/dist/index230.js.map +1 -1
  293. package/dist/index231.js +12 -29
  294. package/dist/index231.js.map +1 -1
  295. package/dist/index232.js +28 -11
  296. package/dist/index232.js.map +1 -1
  297. package/dist/index233.js +10 -23
  298. package/dist/index233.js.map +1 -1
  299. package/dist/index234.js +25 -5
  300. package/dist/index234.js.map +1 -1
  301. package/dist/index235.js +5 -24
  302. package/dist/index235.js.map +1 -1
  303. package/dist/index236.js +24 -28
  304. package/dist/index236.js.map +1 -1
  305. package/dist/index237.js +29 -5
  306. package/dist/index237.js.map +1 -1
  307. package/dist/index238.js +5 -68
  308. package/dist/index238.js.map +1 -1
  309. package/dist/index239.js +64 -177
  310. package/dist/index239.js.map +1 -1
  311. package/dist/index24.js +254 -166
  312. package/dist/index24.js.map +1 -1
  313. package/dist/index240.js +176 -42
  314. package/dist/index240.js.map +1 -1
  315. package/dist/index241.js +45 -12
  316. package/dist/index241.js.map +1 -1
  317. package/dist/index242.js +13 -154
  318. package/dist/index242.js.map +1 -1
  319. package/dist/index243.js +151 -27
  320. package/dist/index243.js.map +1 -1
  321. package/dist/index244.js +30 -9
  322. package/dist/index244.js.map +1 -1
  323. package/dist/index245.js +9 -47
  324. package/dist/index245.js.map +1 -1
  325. package/dist/index246.js +46 -10
  326. package/dist/index246.js.map +1 -1
  327. package/dist/index247.js +11 -44
  328. package/dist/index247.js.map +1 -1
  329. package/dist/index248.js +40 -91
  330. package/dist/index248.js.map +1 -1
  331. package/dist/index249.js +85 -76
  332. package/dist/index249.js.map +1 -1
  333. package/dist/index25.js +180 -14
  334. package/dist/index25.js.map +1 -1
  335. package/dist/index250.js +69 -88
  336. package/dist/index250.js.map +1 -1
  337. package/dist/index251.js +92 -39
  338. package/dist/index251.js.map +1 -1
  339. package/dist/index252.js +51 -10
  340. package/dist/index252.js.map +1 -1
  341. package/dist/index253.js +10 -36
  342. package/dist/index253.js.map +1 -1
  343. package/dist/index254.js +37 -8
  344. package/dist/index254.js.map +1 -1
  345. package/dist/index255.js +8 -116
  346. package/dist/index255.js.map +1 -1
  347. package/dist/index256.js +115 -16
  348. package/dist/index256.js.map +1 -1
  349. package/dist/index257.js +17 -15
  350. package/dist/index257.js.map +1 -1
  351. package/dist/index258.js +15 -3
  352. package/dist/index258.js.map +1 -1
  353. package/dist/index259.js +3 -36
  354. package/dist/index259.js.map +1 -1
  355. package/dist/index26.js +15 -2763
  356. package/dist/index26.js.map +1 -1
  357. package/dist/index260.js +35 -19
  358. package/dist/index260.js.map +1 -1
  359. package/dist/index261.js +20 -9
  360. package/dist/index261.js.map +1 -1
  361. package/dist/index262.js +8 -7
  362. package/dist/index262.js.map +1 -1
  363. package/dist/index263.js +8 -19
  364. package/dist/index263.js.map +1 -1
  365. package/dist/index264.js +14 -23
  366. package/dist/index264.js.map +1 -1
  367. package/dist/index265.js +26 -14
  368. package/dist/index265.js.map +1 -1
  369. package/dist/index266.js +16 -4
  370. package/dist/index266.js.map +1 -1
  371. package/dist/index267.js +5 -19
  372. package/dist/index267.js.map +1 -1
  373. package/dist/index268.js +19 -13
  374. package/dist/index268.js.map +1 -1
  375. package/dist/index269.js +13 -5
  376. package/dist/index269.js.map +1 -1
  377. package/dist/index27.js +2761 -35
  378. package/dist/index27.js.map +1 -1
  379. package/dist/index270.js +5 -3
  380. package/dist/index270.js.map +1 -1
  381. package/dist/index271.js +3 -24
  382. package/dist/index271.js.map +1 -1
  383. package/dist/index272.js +22 -111
  384. package/dist/index272.js.map +1 -1
  385. package/dist/index273.js +111 -14
  386. package/dist/index273.js.map +1 -1
  387. package/dist/index274.js +14 -523
  388. package/dist/index274.js.map +1 -1
  389. package/dist/index275.js +511 -114
  390. package/dist/index275.js.map +1 -1
  391. package/dist/index276.js +111 -117
  392. package/dist/index276.js.map +1 -1
  393. package/dist/index277.js +133 -20
  394. package/dist/index277.js.map +1 -1
  395. package/dist/index278.js +20 -5
  396. package/dist/index278.js.map +1 -1
  397. package/dist/index279.js +5 -5
  398. package/dist/index279.js.map +1 -1
  399. package/dist/index28.js +37 -3
  400. package/dist/index28.js.map +1 -1
  401. package/dist/index280.js +6 -4
  402. package/dist/index280.js.map +1 -1
  403. package/dist/index281.js +4 -16
  404. package/dist/index281.js.map +1 -1
  405. package/dist/index282.js +14 -7
  406. package/dist/index282.js.map +1 -1
  407. package/dist/index283.js +8 -5
  408. package/dist/index283.js.map +1 -1
  409. package/dist/index284.js +5 -4
  410. package/dist/index284.js.map +1 -1
  411. package/dist/index285.js +4 -545
  412. package/dist/index285.js.map +1 -1
  413. package/dist/index286.js +544 -45
  414. package/dist/index286.js.map +1 -1
  415. package/dist/index287.js +47 -18
  416. package/dist/index287.js.map +1 -1
  417. package/dist/index288.js +17 -6
  418. package/dist/index288.js.map +1 -1
  419. package/dist/index289.js +6 -8
  420. package/dist/index289.js.map +1 -1
  421. package/dist/index29.js +3 -125
  422. package/dist/index29.js.map +1 -1
  423. package/dist/index290.js +8 -7
  424. package/dist/index290.js.map +1 -1
  425. package/dist/index291.js +7 -8
  426. package/dist/index291.js.map +1 -1
  427. package/dist/index292.js +8 -12
  428. package/dist/index292.js.map +1 -1
  429. package/dist/index293.js +12 -9
  430. package/dist/index293.js.map +1 -1
  431. package/dist/index294.js +9 -13
  432. package/dist/index294.js.map +1 -1
  433. package/dist/index295.js +14 -69
  434. package/dist/index295.js.map +1 -1
  435. package/dist/index296.js +68 -8
  436. package/dist/index296.js.map +1 -1
  437. package/dist/index297.js +9 -14
  438. package/dist/index297.js.map +1 -1
  439. package/dist/index298.js +14 -66
  440. package/dist/index298.js.map +1 -1
  441. package/dist/index299.js +65 -64
  442. package/dist/index299.js.map +1 -1
  443. package/dist/index30.js +120 -227
  444. package/dist/index30.js.map +1 -1
  445. package/dist/index300.js +64 -4
  446. package/dist/index300.js.map +1 -1
  447. package/dist/index301.js +5 -56
  448. package/dist/index301.js.map +1 -1
  449. package/dist/index302.js +54 -66
  450. package/dist/index302.js.map +1 -1
  451. package/dist/index303.js +67 -30
  452. package/dist/index303.js.map +1 -1
  453. package/dist/index304.js +31 -9
  454. package/dist/index304.js.map +1 -1
  455. package/dist/index305.js +9 -153
  456. package/dist/index305.js.map +1 -1
  457. package/dist/index306.js +142 -97
  458. package/dist/index306.js.map +1 -1
  459. package/dist/index307.js +108 -4
  460. package/dist/index307.js.map +1 -1
  461. package/dist/index308.js +3 -22
  462. package/dist/index308.js.map +1 -1
  463. package/dist/index309.js +22 -15
  464. package/dist/index309.js.map +1 -1
  465. package/dist/index31.js +229 -21
  466. package/dist/index31.js.map +1 -1
  467. package/dist/index310.js +14 -27
  468. package/dist/index310.js.map +1 -1
  469. package/dist/index311.js +27 -11
  470. package/dist/index311.js.map +1 -1
  471. package/dist/index312.js +11 -5
  472. package/dist/index312.js.map +1 -1
  473. package/dist/index313.js +6 -12
  474. package/dist/index313.js.map +1 -1
  475. package/dist/index314.js +20 -25
  476. package/dist/index314.js.map +1 -1
  477. package/dist/index315.js +12 -4
  478. package/dist/index315.js.map +1 -1
  479. package/dist/index316.js +25 -20
  480. package/dist/index316.js.map +1 -1
  481. package/dist/index317.js +8 -0
  482. package/dist/index317.js.map +1 -0
  483. package/dist/index32.js +23 -50
  484. package/dist/index32.js.map +1 -1
  485. package/dist/index33.js +50 -2640
  486. package/dist/index33.js.map +1 -1
  487. package/dist/index34.js +2598 -351
  488. package/dist/index34.js.map +1 -1
  489. package/dist/index35.js +375 -214
  490. package/dist/index35.js.map +1 -1
  491. package/dist/index36.js +230 -19
  492. package/dist/index36.js.map +1 -1
  493. package/dist/index37.js +18 -138
  494. package/dist/index37.js.map +1 -1
  495. package/dist/index38.js +125 -170
  496. package/dist/index38.js.map +1 -1
  497. package/dist/index39.js +174 -64
  498. package/dist/index39.js.map +1 -1
  499. package/dist/index40.js +72 -94
  500. package/dist/index40.js.map +1 -1
  501. package/dist/index41.js +98 -5
  502. package/dist/index41.js.map +1 -1
  503. package/dist/index42.js +5 -843
  504. package/dist/index42.js.map +1 -1
  505. package/dist/index43.js +832 -54
  506. package/dist/index43.js.map +1 -1
  507. package/dist/index44.js +66 -8
  508. package/dist/index44.js.map +1 -1
  509. package/dist/index45.js +8 -2
  510. package/dist/index45.js.map +1 -1
  511. package/dist/index46.js +2 -24
  512. package/dist/index46.js.map +1 -1
  513. package/dist/index47.js +22 -232
  514. package/dist/index47.js.map +1 -1
  515. package/dist/index48.js +233 -6
  516. package/dist/index48.js.map +1 -1
  517. package/dist/index49.js +203 -32
  518. package/dist/index49.js.map +1 -1
  519. package/dist/index5.js +1 -1
  520. package/dist/index50.js +3 -26
  521. package/dist/index50.js.map +1 -1
  522. package/dist/index51.js +6 -7
  523. package/dist/index51.js.map +1 -1
  524. package/dist/index52.js +47 -11
  525. package/dist/index52.js.map +1 -1
  526. package/dist/index53.js +26 -204
  527. package/dist/index53.js.map +1 -1
  528. package/dist/index54.js +50 -3
  529. package/dist/index54.js.map +1 -1
  530. package/dist/index55.js +7 -47
  531. package/dist/index55.js.map +1 -1
  532. package/dist/index56.js +12 -48
  533. package/dist/index56.js.map +1 -1
  534. package/dist/index57.js +133 -7
  535. package/dist/index57.js.map +1 -1
  536. package/dist/index58.js +10 -14
  537. package/dist/index58.js.map +1 -1
  538. package/dist/index59.js +210 -127
  539. package/dist/index59.js.map +1 -1
  540. package/dist/index6.js +138 -25
  541. package/dist/index6.js.map +1 -1
  542. package/dist/index60.js +12 -10
  543. package/dist/index60.js.map +1 -1
  544. package/dist/index61.js +32 -215
  545. package/dist/index61.js.map +1 -1
  546. package/dist/index62.js +47 -13
  547. package/dist/index62.js.map +1 -1
  548. package/dist/index63.js +7 -46
  549. package/dist/index63.js.map +1 -1
  550. package/dist/index67.js +2 -2
  551. package/dist/index69.js +3 -3
  552. package/dist/index7.js +26 -29
  553. package/dist/index7.js.map +1 -1
  554. package/dist/index70.js +11 -53
  555. package/dist/index70.js.map +1 -1
  556. package/dist/index71.js +54 -2
  557. package/dist/index71.js.map +1 -1
  558. package/dist/index72.js +6 -2
  559. package/dist/index72.js.map +1 -1
  560. package/dist/index73.js +7 -5
  561. package/dist/index73.js.map +1 -1
  562. package/dist/index74.js +4 -6
  563. package/dist/index74.js.map +1 -1
  564. package/dist/index75.js +2 -6
  565. package/dist/index75.js.map +1 -1
  566. package/dist/index76.js +2 -52
  567. package/dist/index76.js.map +1 -1
  568. package/dist/index77.js +52 -5
  569. package/dist/index77.js.map +1 -1
  570. package/dist/index78.js +4 -4
  571. package/dist/index78.js.map +1 -1
  572. package/dist/index79.js +4 -15
  573. package/dist/index79.js.map +1 -1
  574. package/dist/index8.js +28 -222
  575. package/dist/index8.js.map +1 -1
  576. package/dist/index80.js +15 -5
  577. package/dist/index80.js.map +1 -1
  578. package/dist/index81.js +5 -7
  579. package/dist/index81.js.map +1 -1
  580. package/dist/index82.js +6 -15
  581. package/dist/index82.js.map +1 -1
  582. package/dist/index83.js +16 -4
  583. package/dist/index83.js.map +1 -1
  584. package/dist/index84.js +1 -1
  585. package/dist/index84.js.map +1 -1
  586. package/dist/index85.js +4 -5
  587. package/dist/index85.js.map +1 -1
  588. package/dist/index86.js +4 -4
  589. package/dist/index86.js.map +1 -1
  590. package/dist/index87.js +5 -4
  591. package/dist/index87.js.map +1 -1
  592. package/dist/index88.js +2 -2
  593. package/dist/index88.js.map +1 -1
  594. package/dist/index89.js +3 -5
  595. package/dist/index89.js.map +1 -1
  596. package/dist/index9.js +226 -23
  597. package/dist/index9.js.map +1 -1
  598. package/dist/index90.js +6 -24
  599. package/dist/index90.js.map +1 -1
  600. package/dist/index91.js +24 -6
  601. package/dist/index91.js.map +1 -1
  602. package/dist/index92.js +6 -4
  603. package/dist/index92.js.map +1 -1
  604. package/dist/index93.js +3 -5
  605. package/dist/index93.js.map +1 -1
  606. package/dist/index94.js +6 -5
  607. package/dist/index94.js.map +1 -1
  608. package/dist/index95.js +5 -4
  609. package/dist/index95.js.map +1 -1
  610. package/dist/index96.js +3 -4
  611. package/dist/index96.js.map +1 -1
  612. package/dist/index97.js +5 -4
  613. package/dist/index97.js.map +1 -1
  614. package/dist/index98.js +4 -8
  615. package/dist/index98.js.map +1 -1
  616. package/dist/index99.js +8 -5
  617. package/dist/index99.js.map +1 -1
  618. package/package.json +1 -1
package/dist/index18.js CHANGED
@@ -1,722 +1,390 @@
1
- import { j as a } from "./index28.js";
2
- import { Check as ue, ChevronDown as oe, ChevronUp as ae } from "lucide-react";
3
- import * as r from "react";
4
- import { DismissableLayerBranch as fe } from "./index29.js";
5
- import { createPortal as de } from "react-dom";
6
- import { IMaskInput as me } from "react-imask";
7
- import pe, { InputMask as he } from "imask";
8
- import { Select as ve, SelectTrigger as be, SelectValue as ge, SelectContent as xe, SelectItem as we } from "./index20.js";
9
- import { useIsTouchDevice as ke } from "./index4.js";
10
- import { cn as W } from "./index2.js";
11
- const te = pe;
12
- typeof te.InputMask != "function" && (te.InputMask = he);
13
- function Z(d) {
14
- return String(d).padStart(2, "0");
1
+ import { j as a } from "./index29.js";
2
+ import * as t from "react";
3
+ import je, { components as Ne } from "react-select";
4
+ import { cn as F } from "./index2.js";
5
+ const se = t.createContext(null);
6
+ function Ve({ children: n, value: l, defaultValue: c, onChange: i }) {
7
+ const f = l !== void 0, [r, d] = t.useState(c ?? W), h = l ?? r, N = t.useCallback(
8
+ (v) => {
9
+ f || d(v), i?.(v);
10
+ },
11
+ [f, i]
12
+ ), R = t.useMemo(
13
+ () => ({
14
+ locale: h,
15
+ setLocale: N
16
+ }),
17
+ [h, N]
18
+ );
19
+ return /* @__PURE__ */ a.jsx(se.Provider, { value: R, children: n });
15
20
  }
16
- function Te(d) {
17
- const f = d.trim();
18
- if (!f) return null;
19
- const n = /^(\d{1,2}):(\d{2})$/.exec(f);
20
- if (!n)
21
- return null;
22
- const i = Number(n[1]), o = Number(n[2]);
23
- return !Number.isFinite(i) || !Number.isFinite(o) || i < 0 || i > 23 || o < 0 || o > 59 ? null : `${Z(i)}:${Z(o)}`;
21
+ const W = "en";
22
+ function Re(n) {
23
+ const c = (n.split("-")[0] ?? "").replace(/[^A-Za-z]/g, "");
24
+ return c ? c.slice(0, 3).toUpperCase() : "?";
24
25
  }
25
- function Q(d, f) {
26
- const n = Te(d);
27
- if (!n) return null;
28
- const i = f.find((o) => o.value === n);
29
- return z(i) ? { parsed: n, selectableValue: n } : { parsed: n, selectableValue: null };
26
+ function Ie(n) {
27
+ return n.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
30
28
  }
31
- function U(d) {
32
- const f = /^(\d{2}):(\d{2})$/.exec(d);
33
- if (!f)
34
- return null;
35
- const n = Number(f[1]), i = Number(f[2]);
36
- return !Number.isFinite(n) || !Number.isFinite(i) ? null : n * 60 + i;
29
+ function K(n) {
30
+ return Ie(n).toLowerCase();
37
31
  }
38
- function z(d) {
39
- return d ? !d.disabled : !1;
32
+ function Pe(n, l) {
33
+ if (Object.prototype.hasOwnProperty.call(n, l))
34
+ return n[l] ?? "";
35
+ const c = l.split("-").filter(Boolean);
36
+ for (; c.length > 1; ) {
37
+ c.pop();
38
+ const i = c.join("-");
39
+ if (Object.prototype.hasOwnProperty.call(n, i))
40
+ return n[i] ?? "";
41
+ }
42
+ return "";
40
43
  }
41
- function re(d, f) {
42
- let n = null, i = Number.POSITIVE_INFINITY, o = Number.NEGATIVE_INFINITY;
43
- for (const h of f) {
44
- if (!z(h)) continue;
45
- const g = U(h.value);
46
- if (g == null) continue;
47
- const N = Math.abs(g - d);
48
- (N < i || N === i && g > o) && (n = h, i = N, o = g);
44
+ function oe(n, l) {
45
+ if (typeof Intl > "u" || typeof Intl.DisplayNames > "u") return null;
46
+ try {
47
+ const c = Array.isArray(n) ? n : n ? [n] : void 0;
48
+ return new Intl.DisplayNames(c, { type: l });
49
+ } catch {
50
+ return null;
49
51
  }
50
- return n;
51
52
  }
52
- function ne({
53
- direction: d,
54
- viewportRef: f,
55
- speed: n = 400,
56
- className: i
57
- }) {
58
- const [o, h] = r.useState(!0), g = r.useRef(void 0), N = r.useRef(void 0), m = r.useRef(!1), p = r.useCallback(() => {
59
- const T = f.current;
60
- if (!T) {
61
- h(!0);
53
+ function H(n, l) {
54
+ if (n)
55
+ try {
56
+ return n.of(l) ?? void 0;
57
+ } catch {
62
58
  return;
63
59
  }
64
- const { scrollTop: x, scrollHeight: v, clientHeight: E } = T, w = 2, F = x > w, M = x < v - E - w;
65
- if (!(v > E + w)) {
66
- h(!0);
67
- return;
68
- }
69
- h(d === "up" ? !F : !M);
70
- }, [d, f]);
71
- r.useEffect(() => {
72
- const T = f.current;
73
- if (!T) return;
74
- p();
75
- const x = () => p(), v = () => p();
76
- T.addEventListener("scroll", x, { passive: !0 });
77
- const E = new ResizeObserver(v);
78
- E.observe(T);
79
- const w = new MutationObserver(v);
80
- return w.observe(T, { childList: !0, subtree: !0 }), () => {
81
- T.removeEventListener("scroll", x), E.disconnect(), w.disconnect();
60
+ }
61
+ function ke(n, l) {
62
+ const c = oe(n, "language"), i = oe("en", "language");
63
+ return (l ?? []).filter((r) => typeof r == "string" && r.length > 0).map((r) => {
64
+ const d = H(c, r) ?? H(i, r) ?? r;
65
+ return {
66
+ value: r,
67
+ name: d,
68
+ code: r,
69
+ searchable: Array.from(
70
+ /* @__PURE__ */ new Set([
71
+ d,
72
+ H(i, r) ?? r,
73
+ r.toLowerCase(),
74
+ r.toUpperCase()
75
+ ])
76
+ ).map((h) => K(h))
82
77
  };
83
- }, [f, p]);
84
- const j = r.useCallback(() => {
85
- g.current && (cancelAnimationFrame(g.current), g.current = void 0), m.current = !1, N.current = void 0;
86
- }, []), P = r.useCallback(
87
- (T) => {
88
- const x = f.current;
89
- if (!x || o || !m.current) {
90
- j();
91
- return;
92
- }
93
- N.current || (N.current = T);
94
- const v = T - N.current, E = n * v / 1e3;
95
- if (E < 0.1) {
96
- g.current = requestAnimationFrame(P);
97
- return;
98
- }
99
- const w = x.scrollTop, F = x.scrollHeight - x.clientHeight;
100
- let M;
101
- d === "up" ? M = Math.max(0, w - E) : M = Math.min(F, w + E), x.scrollTo({ top: M }), N.current = T;
102
- const L = 1;
103
- (d === "up" ? M > L : M < F - L) && Math.abs(M - w) > 0.01 ? g.current = requestAnimationFrame(P) : (j(), setTimeout(p, 16));
104
- },
105
- [p, d, o, n, j, f]
106
- ), q = r.useCallback(() => {
107
- o || !f.current || m.current || (m.current = !0, N.current = void 0, g.current = requestAnimationFrame(P));
108
- }, [o, P, f]);
109
- return r.useEffect(() => j, [j]), /* @__PURE__ */ a.jsx(
78
+ }).sort((r, d) => r.name.localeCompare(d.name));
79
+ }
80
+ const Me = {
81
+ control: () => ({
82
+ display: "none"
83
+ }),
84
+ menu: (n) => ({
85
+ ...n,
86
+ marginTop: 4,
87
+ borderRadius: "var(--radius)",
88
+ boxShadow: "0 18px 36px rgba(15, 23, 42, 0.18)",
89
+ backgroundColor: "hsl(var(--popover))",
90
+ overflow: "hidden",
91
+ zIndex: 30
92
+ }),
93
+ menuList: (n) => ({
94
+ ...n,
95
+ maxHeight: 280,
96
+ padding: 0,
97
+ display: "flex",
98
+ flexDirection: "column",
99
+ overflow: "hidden"
100
+ }),
101
+ option: (n, l) => ({
102
+ ...n,
103
+ fontSize: "0.875rem",
104
+ backgroundColor: l.isFocused ? "hsl(var(--muted))" : l.isSelected ? "hsl(var(--accent))" : "transparent",
105
+ color: l.isSelected ? "hsl(var(--accent-foreground))" : "hsl(var(--foreground))",
106
+ cursor: "pointer"
107
+ }),
108
+ noOptionsMessage: (n) => ({
109
+ ...n,
110
+ fontSize: "0.875rem",
111
+ color: "hsl(var(--muted-foreground))"
112
+ })
113
+ }, De = () => /* @__PURE__ */ a.jsx("div", { style: { display: "none" } }), D = () => null;
114
+ function Fe(n) {
115
+ const { data: l, innerRef: c, innerProps: i, isFocused: f, isSelected: r } = n;
116
+ return /* @__PURE__ */ a.jsxs(
110
117
  "div",
111
118
  {
112
- className: W(
113
- "flex items-center justify-center py-1 select-none",
114
- o ? "cursor-default opacity-40" : "cursor-pointer opacity-100 hover:bg-accent/20",
115
- i
119
+ ref: c,
120
+ ...i,
121
+ className: F(
122
+ "flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm",
123
+ r ? "bg-accent text-accent-foreground" : f ? "bg-muted text-foreground" : "text-foreground"
116
124
  ),
117
- onPointerEnter: () => {
118
- o || q();
119
- },
120
- onPointerMove: () => {
121
- !o && !m.current && q();
122
- },
123
- onPointerLeave: () => {
124
- j();
125
- },
126
- children: d === "up" ? /* @__PURE__ */ a.jsx(ae, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) : /* @__PURE__ */ a.jsx(oe, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" })
125
+ children: [
126
+ /* @__PURE__ */ a.jsx("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ a.jsx("span", { className: "truncate", children: l.name }) }),
127
+ /* @__PURE__ */ a.jsx("span", { className: "text-xs text-muted-foreground uppercase", children: l.code })
128
+ ]
127
129
  }
128
130
  );
129
131
  }
130
- function se({
131
- id: d,
132
- value: f,
133
- onChange: n,
134
- onValueUpdate: i,
135
- options: o,
136
- placeholder: h = "Select time",
137
- className: g,
138
- inputClassName: N,
139
- disabled: m,
140
- readOnly: p,
141
- open: j,
142
- onOpenChange: P,
143
- triggerTestId: q,
144
- contentTestId: T,
145
- isHydrated: x
146
- }) {
147
- const v = r.useId(), E = d ?? `hours-picker-${v}`, w = r.useRef(null), F = r.useRef(null), M = r.useCallback((e) => {
148
- F.current = e;
149
- }, []), L = r.useRef(null), C = r.useRef(!1), [O, I] = r.useState(null), J = r.useRef(null), _ = r.useRef(null), t = r.useRef(null), [l, k] = r.useState(() => ({
150
- left: 0,
151
- top: 0,
152
- width: 0
153
- })), [S, R] = r.useState(!1), b = j ?? S, V = P ?? R;
154
- r.useEffect(() => {
155
- if (!b || m || p)
156
- return;
157
- const e = w.current;
158
- e instanceof HTMLInputElement && (typeof document < "u" && document.activeElement === e || e.focus({ preventScroll: !0 }));
159
- }, [m, b, p]);
160
- const $ = r.useCallback((e) => {
161
- L.current = e, I(e);
162
- }, []), ie = r.useCallback(() => {
163
- C.current = !0;
164
- }, []);
165
- r.useEffect(() => {
166
- if (!b) return;
167
- const e = o.find((c) => c.value === f);
168
- if (e && z(e)) {
169
- $(e.value);
170
- return;
171
- }
172
- const s = o.find((c) => z(c));
173
- $(s?.value ?? null);
174
- }, [b, o, $, f]);
175
- const le = r.useCallback(
176
- (e) => {
177
- if (e === null) {
178
- i && i(null);
179
- return;
180
- }
181
- const s = o.find((c) => c.value === e);
182
- z(s) && i && i(e);
183
- },
184
- [i, o]
185
- ), ee = r.useCallback(
186
- (e) => {
187
- if (e === null) {
188
- i && i(null), n(null);
189
- return;
190
- }
191
- const s = o.find((c) => c.value === e);
192
- z(s) && (i && i(e), n(e));
193
- },
194
- [n, i, o]
195
- );
196
- r.useEffect(() => {
197
- if (!b) return;
198
- const e = (s) => {
199
- const c = s.target;
200
- if (!(c instanceof Node))
201
- return;
202
- const u = J.current;
203
- !u || u.contains(c) || _.current?.contains(c) || V(!1);
204
- };
205
- return document.addEventListener("pointerdown", e, !0), () => {
206
- document.removeEventListener("pointerdown", e, !0);
207
- };
208
- }, [b, V]), r.useEffect(() => {
209
- if (!b)
210
- return;
211
- const e = _.current;
212
- if (!e)
213
- return;
214
- const s = (c) => {
215
- const u = t.current;
216
- if (!u)
217
- return;
218
- const D = c.deltaY;
219
- if (D === 0)
220
- return;
221
- const A = Math.max(0, u.scrollHeight - u.clientHeight), y = u.scrollTop <= 0, G = u.scrollTop >= A, B = c.target;
222
- if (B instanceof Node && u.contains(B)) {
223
- (D < 0 && y || D > 0 && G) && c.preventDefault();
224
- return;
225
- }
226
- c.preventDefault();
227
- const K = Math.min(A, Math.max(0, u.scrollTop + D));
228
- u.scrollTop = K;
229
- };
230
- return e.addEventListener("wheel", s, { passive: !1 }), () => {
231
- e.removeEventListener("wheel", s);
232
- };
233
- }, [b]), r.useEffect(() => {
234
- if (!b || j !== void 0 && !P || typeof window > "u" || !("IntersectionObserver" in window))
235
- return;
236
- const e = w.current;
237
- if (!(e instanceof HTMLElement))
238
- return;
239
- let s = !0;
240
- const c = new IntersectionObserver((u) => {
241
- if (!s)
242
- return;
243
- const D = u[0];
244
- D && !D.isIntersecting && V(!1);
245
- });
246
- return c.observe(e), () => {
247
- s = !1, c.disconnect();
248
- };
249
- }, [P, b, j, V]);
250
- const Y = r.useCallback(() => {
251
- if (typeof window > "u") return;
252
- const e = w.current, s = _.current;
253
- if (!(e instanceof HTMLElement) || !s) return;
254
- const c = e.getBoundingClientRect(), u = s.offsetHeight, D = window.innerWidth ?? 0, A = window.innerHeight ?? 0, y = 8, G = c.width;
255
- let B = c.left;
256
- B + G > D - y && (B = Math.max(y, D - G - y)), B < y && (B = y);
257
- let H = c.bottom + y;
258
- const K = H + u > A - y, X = c.top - u - y;
259
- K && X >= y && (H = X), H < y && (H = y), H + u > A - y && (H = Math.max(y, A - u - y)), k({ left: B, top: H, width: G });
260
- }, []);
261
- return r.useLayoutEffect(() => {
262
- if (!b || m || typeof window > "u") return;
263
- Y();
264
- const e = window.requestAnimationFrame(Y);
265
- return window.addEventListener("scroll", Y, !0), window.addEventListener("resize", Y), () => {
266
- window.cancelAnimationFrame(e), window.removeEventListener("scroll", Y, !0), window.removeEventListener("resize", Y);
267
- };
268
- }, [m, b, Y]), r.useEffect(() => {
269
- if (!b) return;
270
- const e = t.current;
271
- if (!e) return;
272
- const c = requestAnimationFrame(() => {
273
- const u = e.querySelector('[role="option"][data-state="checked"]');
274
- if (u instanceof HTMLElement) {
275
- const K = u.offsetTop - 8, X = u.offsetTop + u.offsetHeight + 8;
276
- if (K < e.scrollTop) {
277
- e.scrollTop = Math.max(0, K);
278
- return;
279
- }
280
- const ce = e.scrollTop + e.clientHeight;
281
- X > ce && (e.scrollTop = Math.max(0, X - e.clientHeight));
282
- return;
283
- }
284
- const D = Array.from(e.querySelectorAll('[role="option"]'));
285
- if (!D.length) return;
286
- let A, y;
287
- for (const H of D) {
288
- if (!H.hasAttribute("data-disabled")) {
289
- A = H;
290
- break;
132
+ const Oe = t.forwardRef(
133
+ function(l, c) {
134
+ const {
135
+ value: i,
136
+ defaultValue: f,
137
+ locale: r,
138
+ defaultLocale: d,
139
+ onChange: h,
140
+ onLocaleChange: N,
141
+ locales: R,
142
+ multiline: v,
143
+ className: le,
144
+ inputClassName: ae,
145
+ selectProps: ce,
146
+ selectFooter: O,
147
+ languageSelectTabIndex: ie = -1,
148
+ disabled: I,
149
+ ...ue
150
+ } = l, { rows: de, ...P } = ue, E = t.useMemo(() => i ?? f ?? {}, [f, i]), [fe, Z] = t.useState(E), S = i !== void 0, y = S ? i ?? {} : fe, [p, z] = t.useState(""), m = t.useContext(se), g = t.useMemo(() => {
151
+ const e = Array.from(/* @__PURE__ */ new Set([...R ?? [], ...Object.keys(y)]));
152
+ return ke(void 0, e);
153
+ }, [y, R]), pe = t.useMemo(() => r ?? m?.locale ?? d ?? Object.keys(y)[0] ?? g[0]?.value ?? W, [y, d, m?.locale, g, r]), [w, A] = t.useState(pe), V = r ?? m?.locale ?? w;
154
+ t.useEffect(() => {
155
+ S || Z(E);
156
+ }, [E, S]), t.useEffect(() => {
157
+ r && r !== w && A(r);
158
+ }, [w, r]), t.useEffect(() => {
159
+ !r && m?.locale && m.locale !== w && A(m.locale);
160
+ }, [w, m?.locale, r]);
161
+ const L = g.find((e) => e.value === V) ?? g.find((e) => e.value === W) ?? g[0] ?? null, [x, _] = t.useState(!1), $ = t.useRef(null), k = t.useRef(null), G = t.useRef(null), J = t.useRef(null), T = t.useRef(null), j = t.useRef(null), Q = t.useRef(null), [X, me] = t.useState({ left: 0, top: 0 });
162
+ t.useImperativeHandle(c, () => k.current, []);
163
+ const B = (e) => {
164
+ if (!e) return;
165
+ const o = e.value;
166
+ S || A(o), N?.(o, e), m?.setLocale(o), b(!0);
167
+ }, ge = (e) => {
168
+ const o = {
169
+ ...y,
170
+ [V]: e.target.value
171
+ };
172
+ S || Z(o), h?.(o);
173
+ }, xe = Pe(y, V), M = t.useCallback(
174
+ (e) => {
175
+ if (!p) return !0;
176
+ const o = K(p);
177
+ return e.data.searchable.some((s) => s.includes(o));
178
+ },
179
+ [p]
180
+ ), be = v ? "left-2 top-2 -translate-y-0" : "left-3 top-1/2 -translate-y-1/2", he = "pl-10 pr-3", q = t.useCallback(() => {
181
+ const e = G.current, o = J.current;
182
+ if (!e || !o) return;
183
+ const s = e.getBoundingClientRect(), u = o.getBoundingClientRect();
184
+ me({
185
+ left: s.left - u.left,
186
+ top: s.bottom - u.top + 4
187
+ });
188
+ }, []), Y = t.useCallback((e) => !e || !(e instanceof Node) ? !1 : !!$.current?.contains(e), []), ee = t.useCallback(() => {
189
+ const e = k.current;
190
+ if (!e) return;
191
+ e.focus();
192
+ const o = Q.current;
193
+ o && o.start != null && o.end != null && e.setSelectionRange(o.start, o.end);
194
+ }, []);
195
+ t.useEffect(() => {
196
+ if (!x) return;
197
+ const e = j.current;
198
+ e && requestAnimationFrame(() => {
199
+ if (document.activeElement === e) return;
200
+ e.focus();
201
+ const o = e.value.length;
202
+ try {
203
+ e.setSelectionRange(o, o);
204
+ } catch {
291
205
  }
292
- y = H;
293
- }
294
- if (!A) return;
295
- const B = Math.max(0, (y || A).offsetTop - 8);
296
- e.scrollTop = B;
297
- });
298
- return () => cancelAnimationFrame(c);
299
- }, [b, o]), r.useEffect(() => {
300
- if (!b || !O || !C.current) return;
301
- const e = t.current;
302
- if (!e) return;
303
- const s = e.querySelector(`[role="option"][data-value="${O}"]`);
304
- if (!(s instanceof HTMLElement)) return;
305
- const c = 8, u = s.offsetTop - c, D = s.offsetTop + s.offsetHeight + c;
306
- if (u < e.scrollTop) {
307
- e.scrollTop = Math.max(0, u);
308
- return;
309
- }
310
- const A = e.scrollTop + e.clientHeight;
311
- D > A && (e.scrollTop = Math.max(0, D - e.clientHeight));
312
- }, [O, b]), /* @__PURE__ */ a.jsx(
313
- "div",
314
- {
315
- "data-slot": "hours-picker-input",
316
- className: W("w-[150px]", g),
317
- ref: J,
318
- children: /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
319
- /* @__PURE__ */ a.jsx(
320
- De,
321
- {
322
- id: E,
323
- placeholder: h,
324
- value: f,
325
- onValueUpdate: le,
326
- onCommit: ee,
327
- options: o,
328
- disabled: m,
329
- readOnly: p,
330
- open: b,
331
- setOpen: V,
332
- inputClassName: N,
333
- triggerTestId: q,
334
- isHydrated: x,
335
- highlightedValueRef: L,
336
- setHighlightedValue: $,
337
- markKeyboardNavigation: ie,
338
- inputRef: (e) => {
339
- w.current = e;
340
- },
341
- onDraftValueHandlerChange: M
342
- }
343
- ),
344
- b ? (() => {
345
- const e = /* @__PURE__ */ a.jsx(fe, { children: /* @__PURE__ */ a.jsxs(
346
- "div",
347
- {
348
- ref: _,
349
- "data-testid": T,
350
- "data-state": "open",
351
- className: W(
352
- "pointer-events-auto fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
353
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"
354
- ),
355
- style: {
356
- left: l.left,
357
- top: l.top,
358
- width: l.width
359
- },
360
- children: [
361
- /* @__PURE__ */ a.jsx(
362
- ne,
363
- {
364
- direction: "up",
365
- viewportRef: t
206
+ });
207
+ }, [x, p]);
208
+ const b = t.useCallback(
209
+ (e = !0) => {
210
+ _(!1), z(""), e && requestAnimationFrame(() => {
211
+ ee();
212
+ });
213
+ },
214
+ [ee]
215
+ ), {
216
+ components: te,
217
+ styles: ne,
218
+ classNamePrefix: ve,
219
+ placeholder: ye,
220
+ noOptionsMessage: Ce,
221
+ ...Se
222
+ } = ce ?? {}, U = t.useMemo(() => {
223
+ const e = K(p), o = (s) => {
224
+ const u = s.code.toLowerCase();
225
+ return e && u === e ? 0 : e && u.startsWith(e) ? 1 : e && s.searchable.some((C) => C.startsWith(e)) ? 2 : e && s.searchable.some((C) => C.includes(e)) ? 3 : 4;
226
+ };
227
+ return g.filter((s) => M({ data: s })).sort((s, u) => {
228
+ const C = o(s) - o(u);
229
+ return C !== 0 ? C : s.name.localeCompare(u.name);
230
+ });
231
+ }, [M, g, p]), we = t.useMemo(
232
+ () => ({
233
+ Control: De,
234
+ IndicatorsContainer: D,
235
+ DropdownIndicator: D,
236
+ IndicatorSeparator: D,
237
+ ValueContainer: D,
238
+ MenuList: (e) => {
239
+ const { children: o } = e;
240
+ return /* @__PURE__ */ a.jsxs(Ne.MenuList, { ...e, className: "!p-0 flex flex-col overflow-hidden", children: [
241
+ /* @__PURE__ */ a.jsx("div", { className: "border-b border-muted px-2 pb-2 pt-2", children: /* @__PURE__ */ a.jsx(
242
+ "input",
243
+ {
244
+ ref: j,
245
+ value: p,
246
+ onChange: (s) => z(s.target.value),
247
+ onKeyDown: (s) => {
248
+ if (s.key === "Escape") {
249
+ s.preventDefault(), b(!0);
250
+ return;
366
251
  }
367
- ),
368
- /* @__PURE__ */ a.jsx(
369
- "div",
370
- {
371
- ref: t,
372
- role: "listbox",
373
- className: "max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
374
- children: o.map((s) => {
375
- const c = s.value === f;
376
- return /* @__PURE__ */ a.jsxs(
377
- "div",
378
- {
379
- role: "option",
380
- "aria-selected": c,
381
- "data-value": s.value,
382
- "data-state": c ? "checked" : "unchecked",
383
- "data-disabled": s.disabled ? "" : void 0,
384
- className: W(
385
- "relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer",
386
- s.disabled && "pointer-events-none opacity-50",
387
- O === s.value && "bg-accent text-accent-foreground"
388
- ),
389
- onMouseDown: (u) => {
390
- u.preventDefault();
391
- },
392
- onClick: () => {
393
- s.disabled || (F.current?.(s.value), $(s.value), w.current?.focus({ preventScroll: !0 }), ee(s.value), V(!1));
394
- },
395
- onPointerEnter: () => {
396
- C.current || (C.current = !1, $(s.value));
397
- },
398
- onPointerMove: (u) => {
399
- C.current && u.movementX === 0 && u.movementY === 0 || (C.current = !1, $(s.value));
400
- },
401
- children: [
402
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: c ? /* @__PURE__ */ a.jsx(ue, { "aria-hidden": !0, className: "h-4 w-4" }) : null }),
403
- /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col", children: [
404
- /* @__PURE__ */ a.jsx("span", { children: s.label }),
405
- s.description != null ? /* @__PURE__ */ a.jsx("span", { "data-slot": "description", className: "text-xs text-muted-foreground", children: s.description }) : null
406
- ] })
407
- ]
408
- },
409
- s.value
410
- );
411
- })
252
+ if (s.key === "Enter") {
253
+ s.preventDefault();
254
+ const u = U[0];
255
+ u && B(u);
256
+ return;
412
257
  }
413
- ),
414
- /* @__PURE__ */ a.jsx(
415
- ne,
416
- {
417
- direction: "down",
418
- viewportRef: t
419
- }
420
- )
421
- ]
422
- }
423
- ) });
424
- return typeof document > "u" ? e : de(e, document.body);
425
- })() : null
426
- ] })
427
- }
428
- );
429
- }
430
- se.displayName = "HourPickerInput";
431
- function ye({
432
- id: d,
433
- value: f,
434
- onChange: n,
435
- onValueUpdate: i,
436
- options: o,
437
- placeholder: h = "Select time",
438
- className: g,
439
- inputClassName: N,
440
- disabled: m,
441
- open: p,
442
- onOpenChange: j,
443
- triggerTestId: P,
444
- contentTestId: q,
445
- isHydrated: T
446
- }) {
447
- const x = r.useCallback(
448
- (v) => {
449
- const E = o.find((w) => w.value === v);
450
- z(E) && (i && i(v), n(v));
451
- },
452
- [n, i, o]
453
- );
454
- return /* @__PURE__ */ a.jsx("div", { "data-slot": "hours-picker-field", className: W("w-[150px]", g), children: /* @__PURE__ */ a.jsxs(
455
- ve,
456
- {
457
- disabled: m,
458
- open: p,
459
- onOpenChange: j,
460
- value: f ?? "",
461
- onValueChange: (v) => x(v),
462
- children: [
463
- /* @__PURE__ */ a.jsx(
464
- be,
465
- {
466
- id: d,
467
- "data-testid": P,
468
- "data-hydrated": T ? "true" : void 0,
469
- className: W(
470
- "transition-colors hover:bg-accent hover:text-accent-foreground",
471
- !f && "text-muted-foreground",
472
- p && "ring-2 ring-primary ring-offset-2",
473
- "[&_[data-slot='description']]:hidden",
474
- N
475
- ),
476
- children: /* @__PURE__ */ a.jsx(ge, { placeholder: h })
477
- }
478
- ),
479
- /* @__PURE__ */ a.jsx(
480
- xe,
481
- {
482
- "data-testid": q,
483
- autoScroll: "firstEnabledWithContext",
484
- className: "max-h-64 overflow-y-auto",
485
- children: o.map((v) => /* @__PURE__ */ a.jsxs(
486
- we,
487
- {
488
- value: v.value,
489
- disabled: v.disabled,
490
- children: [
491
- /* @__PURE__ */ a.jsx("span", { children: v.label }),
492
- v.description != null ? /* @__PURE__ */ a.jsx("span", { "data-slot": "description", className: "block text-xs text-muted-foreground", children: v.description }) : null
493
- ]
494
- },
495
- v.value
496
- ))
497
- }
498
- )
499
- ]
500
- }
501
- ) });
502
- }
503
- function Se(d) {
504
- return ke() ? /* @__PURE__ */ a.jsx(ye, { ...d }) : /* @__PURE__ */ a.jsx(se, { ...d });
505
- }
506
- Se.displayName = "HourPickerField";
507
- function De({
508
- id: d,
509
- placeholder: f,
510
- value: n,
511
- onValueUpdate: i,
512
- onCommit: o,
513
- options: h,
514
- disabled: g,
515
- readOnly: N,
516
- open: m,
517
- setOpen: p,
518
- inputClassName: j,
519
- triggerTestId: P,
520
- isHydrated: q,
521
- highlightedValueRef: T,
522
- setHighlightedValue: x,
523
- markKeyboardNavigation: v,
524
- inputRef: E,
525
- onDraftValueHandlerChange: w
526
- }) {
527
- const F = r.useRef(!1), M = r.useRef(!1), L = r.useRef(!1), C = r.useRef(null), [O, I] = r.useState(() => n || "");
528
- r.useEffect(() => (w((t) => {
529
- I(t);
530
- }), () => {
531
- w(null);
532
- }), [w]);
533
- const J = r.useCallback(
534
- (t) => {
535
- const l = T.current ?? n ?? "";
536
- let k = h.findIndex((S) => S.value === l);
537
- k === -1 && (k = t === 1 ? -1 : h.length);
538
- for (let S = k + t; S >= 0 && S < h.length; S += t) {
539
- const R = h[S];
540
- if (z(R)) {
541
- x(R.value), C.current = R.value, I(R.value), i(R.value);
542
- return;
543
- }
544
- }
545
- },
546
- [T, i, h, x, n]
547
- );
548
- r.useEffect(() => {
549
- F.current || I(n || "");
550
- }, [n]);
551
- const _ = W(
552
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
553
- "transition-colors group-hover:bg-accent group-hover:text-accent-foreground",
554
- !O && "text-muted-foreground",
555
- m && "ring-2 ring-primary ring-offset-2",
556
- "[&_[data-slot='description']]:hidden",
557
- j
558
- );
559
- return /* @__PURE__ */ a.jsxs("div", { className: "relative group", children: [
560
- /* @__PURE__ */ a.jsx(
561
- me,
562
- {
563
- id: d,
564
- "data-testid": P,
565
- "data-hydrated": q ? "true" : void 0,
566
- type: "text",
567
- disabled: g,
568
- readOnly: N,
569
- inputRef: E,
570
- autoComplete: "off",
571
- mask: [
572
- { mask: "00:00", lazy: !0 },
573
- { mask: "0:00", lazy: !0 }
574
- ],
575
- dispatch: (t, l) => {
576
- const k = (l.value + t).replace(/\D/g, "");
577
- if (k.length <= 2 || k.length >= 4) return l.compiledMasks[0];
578
- const S = Z(Number(k.slice(0, 2)));
579
- return h.some((b) => b.value.startsWith(`${S}:`)) ? l.compiledMasks[0] : l.compiledMasks[1];
580
- },
581
- placeholder: f,
582
- value: O,
583
- className: _,
584
- onAccept: (t) => {
585
- const l = typeof t == "string" ? t : String(t ?? "");
586
- I(l), l.replace(/\D/g, "").length === 0 && n && o(null);
587
- },
588
- onComplete: (t) => {
589
- const l = typeof t == "string" ? t : String(t ?? "");
590
- if (C.current === l) {
591
- C.current = null;
592
- return;
593
- }
594
- const k = Q(l, h);
595
- if (!k)
596
- return;
597
- if (k.selectableValue) {
598
- if (x(k.selectableValue), I(k.selectableValue), n === k.selectableValue)
599
- return;
600
- o(k.selectableValue);
601
- return;
602
- }
603
- const S = U(k.parsed);
604
- if (S == null)
605
- return;
606
- const R = re(S, h);
607
- R && x(R.value);
608
- },
609
- onPointerDown: () => {
610
- M.current = !0, !g && (m || p(!0));
611
- },
612
- onMouseDown: (t) => {
613
- M.current = !0, L.current = typeof document < "u" && document.activeElement === t.currentTarget, !g && (m || p(!0));
614
- },
615
- onClick: () => {
616
- g || m || p(!0);
617
- },
618
- onKeyDown: (t) => {
619
- if (!g) {
620
- if (t.key === "Tab" && m && !t.defaultPrevented) {
621
- p(!1);
622
- return;
623
- }
624
- if (t.key === "Escape") {
625
- if (!m)
626
- return;
627
- t.preventDefault(), p(!1);
628
- return;
629
- }
630
- if (!m && !t.defaultPrevented && (t.key.length === 1 || t.key === "Backspace" || t.key === "Delete") && !t.ctrlKey && !t.metaKey && !t.altKey && p(!0), t.key === "ArrowDown" || t.key === "ArrowUp") {
631
- if (v(), t.preventDefault(), !m) {
632
- p(!0);
633
- return;
258
+ (s.key === "ArrowDown" || s.key === "ArrowUp") && (s.preventDefault(), T.current?.focus());
259
+ },
260
+ className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
261
+ placeholder: "Search language…"
634
262
  }
635
- J(t.key === "ArrowDown" ? 1 : -1);
636
- return;
637
- }
638
- if (t.key === "Enter") {
639
- v();
640
- const l = Q(O, h);
641
- if (!l) {
642
- if (!m || O.trim() !== "")
643
- return;
644
- const R = h.find((V) => V.value === T.current), b = (z(R) ? R?.value : void 0) ?? h.find((V) => z(V))?.value;
645
- if (!b)
646
- return;
647
- t.preventDefault(), x(b), I(b), o(b), p(!1);
648
- return;
649
- }
650
- if (l.selectableValue) {
651
- t.preventDefault(), x(l.selectableValue), I(l.selectableValue), o(l.selectableValue), p(!1);
652
- return;
653
- }
654
- const k = U(l.parsed);
655
- if (k == null)
656
- return;
657
- const S = re(k, h);
658
- if (!S)
659
- return;
660
- t.preventDefault(), x(S.value), I(S.value), o(S.value), p(!1);
661
- return;
662
- }
663
- }
263
+ ) }),
264
+ /* @__PURE__ */ a.jsx("div", { className: "max-h-60 overflow-y-auto", children: o }),
265
+ O ? /* @__PURE__ */ a.jsx("div", { className: "border-t border-muted bg-muted/60 px-3 py-2 text-xs text-muted-foreground", children: O }) : null
266
+ ] });
664
267
  },
665
- onFocus: (t) => {
666
- const l = !M.current || !L.current;
667
- if (M.current = !1, L.current = !1, F.current = !0, l) {
668
- const k = t.currentTarget;
669
- requestAnimationFrame(() => k.select());
670
- }
671
- g || m || p(!0);
672
- },
673
- onBlur: () => {
674
- F.current = !1;
675
- const t = O.trim();
676
- if (!t) {
677
- I(n || "");
678
- return;
679
- }
680
- const l = Q(t, h);
681
- if (!l) {
682
- I(n || "");
683
- return;
684
- }
685
- if (!l.selectableValue) {
686
- I(n || "");
687
- return;
688
- }
689
- I(l.selectableValue), n !== l.selectableValue && o(l.selectableValue);
690
- }
691
- }
692
- ),
693
- /* @__PURE__ */ a.jsx(
694
- "button",
268
+ ...te ?? {},
269
+ Option: Fe
270
+ }),
271
+ [b, M, U, B, g, p, O, te]
272
+ ), Le = t.useMemo(
273
+ () => ({
274
+ ...Me,
275
+ ...ne ?? {}
276
+ }),
277
+ [ne]
278
+ );
279
+ t.useLayoutEffect(() => {
280
+ if (!x) return;
281
+ q();
282
+ const e = () => q();
283
+ return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
284
+ }, [x, q]);
285
+ const re = {
286
+ ...P,
287
+ ref: k,
288
+ disabled: I,
289
+ value: xe,
290
+ onChange: ge,
291
+ onFocus: (e) => {
292
+ x && b(!1), P.onFocus?.(e);
293
+ },
294
+ onBlur: (e) => {
295
+ Y(e.relatedTarget) || b(!1), P.onBlur?.(e);
296
+ },
297
+ className: F(
298
+ "w-full rounded-md border border-input bg-background text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
299
+ v ? "min-h-24 py-2" : "h-10 py-2",
300
+ he,
301
+ ae
302
+ ),
303
+ placeholder: P.placeholder
304
+ };
305
+ return /* @__PURE__ */ a.jsxs(
306
+ "div",
695
307
  {
696
- type: "button",
697
- tabIndex: -1,
698
- disabled: g,
699
- "data-slot": "hours-picker-input-toggle",
700
- className: W(
701
- "absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
702
- ),
703
- "aria-label": m ? "Close time picker" : "Open time picker",
704
- onPointerDown: (t) => {
705
- t.preventDefault();
706
- },
707
- onMouseDown: (t) => {
708
- t.preventDefault();
308
+ ref: $,
309
+ className: F("relative flex flex-col", le),
310
+ onBlur: (e) => {
311
+ Y(e.relatedTarget) || b(!1);
709
312
  },
710
- onClick: () => {
711
- g || p(!m);
712
- },
713
- children: /* @__PURE__ */ a.jsx(oe, { "aria-hidden": !0, className: "size-4" })
313
+ children: [
314
+ /* @__PURE__ */ a.jsxs("div", { ref: J, className: "relative", children: [
315
+ v ? /* @__PURE__ */ a.jsx("textarea", { rows: de, ...re }) : /* @__PURE__ */ a.jsx("input", { type: "text", ...re }),
316
+ /* @__PURE__ */ a.jsx(
317
+ "button",
318
+ {
319
+ type: "button",
320
+ className: F(
321
+ "absolute flex h-6 w-6 items-center justify-center rounded border text-xs font-semibold leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
322
+ be,
323
+ I ? "cursor-not-allowed opacity-50 pointer-events-none" : "cursor-pointer hover:bg-muted",
324
+ L ? "border-transparent" : "border-dashed border-border text-muted-foreground"
325
+ ),
326
+ "aria-label": L ? `Select language (${L.code})` : "Select language",
327
+ onMouseDown: (e) => e.preventDefault(),
328
+ onClick: () => {
329
+ if (I) return;
330
+ const e = k.current;
331
+ e && (Q.current = {
332
+ start: e.selectionStart,
333
+ end: e.selectionEnd
334
+ }), z(""), _(!0), requestAnimationFrame(() => {
335
+ j.current ? (j.current.focus(), j.current.select()) : T.current?.focus();
336
+ });
337
+ },
338
+ tabIndex: ie,
339
+ disabled: I,
340
+ ref: G,
341
+ children: /* @__PURE__ */ a.jsx("span", { "aria-hidden": "true", children: L ? Re(L.code) : "?" })
342
+ }
343
+ )
344
+ ] }),
345
+ /* @__PURE__ */ a.jsx(
346
+ "div",
347
+ {
348
+ className: "absolute left-0 top-full z-30 mt-1",
349
+ style: {
350
+ pointerEvents: x ? "auto" : "none",
351
+ width: "min(260px, 100%)",
352
+ left: X.left,
353
+ top: X.top
354
+ },
355
+ children: /* @__PURE__ */ a.jsx(
356
+ je,
357
+ {
358
+ ...Se,
359
+ menuIsOpen: x,
360
+ options: U,
361
+ value: null,
362
+ onChange: B,
363
+ classNamePrefix: ve ?? "i18n-language-select",
364
+ components: we,
365
+ styles: Le,
366
+ isClearable: !1,
367
+ isSearchable: !1,
368
+ backspaceRemovesValue: !1,
369
+ tabSelectsValue: !0,
370
+ menuShouldScrollIntoView: !1,
371
+ placeholder: ye ?? "",
372
+ filterOption: M,
373
+ noOptionsMessage: Ce,
374
+ onMenuClose: () => b(!0),
375
+ ref: T
376
+ }
377
+ )
378
+ }
379
+ )
380
+ ]
714
381
  }
715
- )
716
- ] });
717
- }
382
+ );
383
+ }
384
+ );
385
+ Oe.displayName = "I18nField";
718
386
  export {
719
- Se as HourPickerField,
720
- se as HourPickerInput
387
+ Oe as I18nField,
388
+ Ve as I18nFieldLocaleProvider
721
389
  };
722
390
  //# sourceMappingURL=index18.js.map