@vlrc-fe/components 1.0.7 → 1.0.8

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 (448) hide show
  1. package/dist/MultiSelect/type.d.ts +2 -2
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +64 -41
  4. package/dist/index10.cjs +1 -1
  5. package/dist/index10.js +46 -80
  6. package/dist/index100.cjs +1 -1
  7. package/dist/index100.js +22 -60
  8. package/dist/index101.cjs +1 -1
  9. package/dist/index101.js +1147 -43
  10. package/dist/index102.cjs +1 -1
  11. package/dist/index102.js +30 -64
  12. package/dist/index103.cjs +1 -1
  13. package/dist/index103.js +31 -147
  14. package/dist/index104.cjs +1 -1
  15. package/dist/index104.js +93 -19
  16. package/dist/index105.cjs +1 -1
  17. package/dist/index105.js +80 -25
  18. package/dist/index106.cjs +1 -1
  19. package/dist/index106.js +9 -50
  20. package/dist/index107.cjs +1 -1
  21. package/dist/index107.js +30 -156
  22. package/dist/index108.cjs +1 -1
  23. package/dist/index108.js +350 -14
  24. package/dist/index109.cjs +1 -1
  25. package/dist/index109.js +11 -0
  26. package/dist/index11.cjs +1 -1
  27. package/dist/index11.js +55 -60
  28. package/dist/index110.cjs +1 -0
  29. package/dist/index110.js +430 -0
  30. package/dist/index111.cjs +1 -0
  31. package/dist/index111.js +36 -0
  32. package/dist/index112.cjs +1 -0
  33. package/dist/index112.js +28 -0
  34. package/dist/index113.cjs +1 -0
  35. package/dist/index113.js +14 -0
  36. package/dist/index114.cjs +1 -0
  37. package/dist/index114.js +156 -0
  38. package/dist/index115.cjs +1 -0
  39. package/dist/index115.js +19 -0
  40. package/dist/index116.cjs +1 -0
  41. package/dist/index116.js +67 -0
  42. package/dist/index117.cjs +1 -0
  43. package/dist/index117.js +118 -0
  44. package/dist/index118.cjs +1 -0
  45. package/dist/index118.js +36 -0
  46. package/dist/index119.cjs +1 -0
  47. package/dist/index119.js +13 -0
  48. package/dist/index12.cjs +1 -1
  49. package/dist/index12.js +44 -121
  50. package/dist/index120.cjs +1 -0
  51. package/dist/index120.js +31 -0
  52. package/dist/index121.cjs +1 -0
  53. package/dist/index121.js +37 -0
  54. package/dist/index122.cjs +1 -0
  55. package/dist/index122.js +123 -0
  56. package/dist/index123.cjs +1 -0
  57. package/dist/index123.js +44 -0
  58. package/dist/index124.cjs +1 -0
  59. package/dist/index124.js +43 -0
  60. package/dist/index125.cjs +1 -0
  61. package/dist/index125.js +14 -0
  62. package/dist/index126.cjs +1 -0
  63. package/dist/index126.js +64 -0
  64. package/dist/index127.cjs +1 -0
  65. package/dist/index127.js +23 -0
  66. package/dist/index128.cjs +1 -0
  67. package/dist/index128.js +34 -0
  68. package/dist/index129.cjs +1 -0
  69. package/dist/index129.js +27 -0
  70. package/dist/index13.cjs +1 -1
  71. package/dist/index13.js +30 -12
  72. package/dist/index130.cjs +1 -0
  73. package/dist/index130.js +26 -0
  74. package/dist/index131.cjs +1 -0
  75. package/dist/index131.js +157 -0
  76. package/dist/index132.cjs +1 -0
  77. package/dist/index132.js +34 -0
  78. package/dist/index133.cjs +1 -0
  79. package/dist/index133.js +46 -0
  80. package/dist/index134.cjs +1 -0
  81. package/dist/index134.js +142 -0
  82. package/dist/index135.cjs +1 -0
  83. package/dist/index135.js +125 -0
  84. package/dist/index136.cjs +1 -0
  85. package/dist/index136.js +26 -0
  86. package/dist/index137.cjs +1 -0
  87. package/dist/index137.js +88 -0
  88. package/dist/index138.cjs +1 -0
  89. package/dist/index138.js +221 -0
  90. package/dist/index139.cjs +1 -0
  91. package/dist/index139.js +166 -0
  92. package/dist/index14.cjs +1 -1
  93. package/dist/index14.js +8 -12
  94. package/dist/index140.cjs +1 -0
  95. package/dist/index140.js +126 -0
  96. package/dist/index141.cjs +1 -0
  97. package/dist/index141.js +15 -0
  98. package/dist/index142.cjs +1 -0
  99. package/dist/index142.js +9 -0
  100. package/dist/index143.cjs +1 -0
  101. package/dist/index143.js +17 -0
  102. package/dist/index144.cjs +1 -0
  103. package/dist/index144.js +22 -0
  104. package/dist/index145.cjs +1 -0
  105. package/dist/index145.js +18 -0
  106. package/dist/index146.cjs +1 -0
  107. package/dist/index146.js +6 -0
  108. package/dist/index147.cjs +1 -0
  109. package/dist/index147.js +7 -0
  110. package/dist/index148.cjs +1 -0
  111. package/dist/index148.js +8 -0
  112. package/dist/index149.cjs +1 -0
  113. package/dist/index149.js +7 -0
  114. package/dist/index15.cjs +1 -1
  115. package/dist/index15.js +12 -112
  116. package/dist/index150.cjs +1 -0
  117. package/dist/index150.js +7 -0
  118. package/dist/index151.cjs +1 -0
  119. package/dist/index151.js +9 -0
  120. package/dist/index152.cjs +1 -0
  121. package/dist/index152.js +69 -0
  122. package/dist/index153.cjs +1 -0
  123. package/dist/index153.js +11 -0
  124. package/dist/index154.cjs +1 -0
  125. package/dist/index154.js +202 -0
  126. package/dist/index155.cjs +1 -0
  127. package/dist/index155.js +124 -0
  128. package/dist/index156.cjs +1 -0
  129. package/dist/index156.js +32 -0
  130. package/dist/index157.cjs +1 -0
  131. package/dist/index157.js +20 -0
  132. package/dist/index158.cjs +1 -0
  133. package/dist/index158.js +69 -0
  134. package/dist/index159.cjs +1 -0
  135. package/dist/index159.js +32 -0
  136. package/dist/index16.cjs +1 -1
  137. package/dist/index16.js +4 -726
  138. package/dist/index160.cjs +1 -0
  139. package/dist/index160.js +11 -0
  140. package/dist/index161.cjs +1 -0
  141. package/dist/index161.js +280 -0
  142. package/dist/index162.cjs +1 -0
  143. package/dist/index162.js +157 -0
  144. package/dist/index163.cjs +1 -0
  145. package/dist/index163.js +20 -0
  146. package/dist/index164.cjs +1 -0
  147. package/dist/index164.js +10 -0
  148. package/dist/index165.cjs +1 -0
  149. package/dist/index165.js +14 -0
  150. package/dist/index166.cjs +1 -0
  151. package/dist/index166.js +8 -0
  152. package/dist/index167.cjs +1 -0
  153. package/dist/index167.js +8 -0
  154. package/dist/index168.cjs +1 -0
  155. package/dist/index168.js +11 -0
  156. package/dist/index169.cjs +1 -0
  157. package/dist/index169.js +10 -0
  158. package/dist/index17.cjs +1 -1
  159. package/dist/index17.js +79 -339
  160. package/dist/index170.cjs +1 -0
  161. package/dist/index170.js +6 -0
  162. package/dist/index171.cjs +1 -0
  163. package/dist/index171.js +8 -0
  164. package/dist/index172.cjs +1 -0
  165. package/dist/index172.js +8 -0
  166. package/dist/index173.cjs +1 -0
  167. package/dist/index173.js +10 -0
  168. package/dist/index174.cjs +1 -0
  169. package/dist/index174.js +11 -0
  170. package/dist/index175.cjs +1 -0
  171. package/dist/index175.js +15 -0
  172. package/dist/index176.cjs +1 -0
  173. package/dist/index176.js +11 -0
  174. package/dist/index177.cjs +1 -0
  175. package/dist/index177.js +11 -0
  176. package/dist/index178.cjs +1 -0
  177. package/dist/index178.js +6 -0
  178. package/dist/index179.cjs +1 -0
  179. package/dist/index179.js +43 -0
  180. package/dist/index18.cjs +1 -1
  181. package/dist/index18.js +19 -66
  182. package/dist/index180.cjs +1 -0
  183. package/dist/index180.js +382 -0
  184. package/dist/index181.cjs +1 -0
  185. package/dist/index181.js +40 -0
  186. package/dist/index182.cjs +1 -0
  187. package/dist/index182.js +23 -0
  188. package/dist/index183.cjs +1 -0
  189. package/dist/index183.js +59 -0
  190. package/dist/index184.cjs +1 -0
  191. package/dist/index184.js +55 -0
  192. package/dist/index185.cjs +1 -0
  193. package/dist/index185.js +54 -0
  194. package/dist/index186.cjs +1 -0
  195. package/dist/index186.js +57 -0
  196. package/dist/index187.cjs +1 -0
  197. package/dist/index187.js +57 -0
  198. package/dist/index188.cjs +1 -0
  199. package/dist/index188.js +88 -0
  200. package/dist/index189.cjs +1 -0
  201. package/dist/index189.js +66 -0
  202. package/dist/index19.cjs +1 -1
  203. package/dist/index19.js +18 -8
  204. package/dist/index190.cjs +1 -0
  205. package/dist/index190.js +594 -0
  206. package/dist/index191.cjs +9 -0
  207. package/dist/index191.js +30 -0
  208. package/dist/index192.cjs +1 -0
  209. package/dist/index192.js +50 -0
  210. package/dist/index193.cjs +1 -0
  211. package/dist/index193.js +65 -0
  212. package/dist/index194.cjs +1 -0
  213. package/dist/index194.js +48 -0
  214. package/dist/index195.cjs +1 -0
  215. package/dist/index195.js +67 -0
  216. package/dist/index196.cjs +1 -0
  217. package/dist/index196.js +151 -0
  218. package/dist/index197.cjs +1 -0
  219. package/dist/index197.js +23 -0
  220. package/dist/index198.cjs +1 -0
  221. package/dist/index198.js +27 -0
  222. package/dist/index199.cjs +1 -0
  223. package/dist/index199.js +53 -0
  224. package/dist/index20.cjs +1 -1
  225. package/dist/index20.js +51 -98
  226. package/dist/index200.cjs +1 -0
  227. package/dist/index200.js +161 -0
  228. package/dist/index201.cjs +1 -0
  229. package/dist/index201.js +16 -0
  230. package/dist/index202.cjs +1 -0
  231. package/dist/index21.cjs +1 -1
  232. package/dist/index21.js +81 -28
  233. package/dist/index22.cjs +1 -1
  234. package/dist/index22.js +64 -14
  235. package/dist/index23.cjs +1 -1
  236. package/dist/index23.js +25 -22
  237. package/dist/index24.cjs +1 -1
  238. package/dist/index24.js +1014 -33
  239. package/dist/index25.cjs +1 -1
  240. package/dist/index25.js +22 -96
  241. package/dist/index26.cjs +1 -1
  242. package/dist/index26.js +108 -25
  243. package/dist/index27.cjs +1 -1
  244. package/dist/index27.js +15 -9
  245. package/dist/index28.cjs +1 -1
  246. package/dist/index28.js +20 -66
  247. package/dist/index29.cjs +1 -1
  248. package/dist/index29.js +81 -11
  249. package/dist/index30.cjs +1 -1
  250. package/dist/index30.js +91 -29
  251. package/dist/index31.cjs +1 -1
  252. package/dist/index31.js +14 -41
  253. package/dist/index32.cjs +1 -1
  254. package/dist/index32.js +93 -12
  255. package/dist/index33.cjs +1 -1
  256. package/dist/index33.js +22 -62
  257. package/dist/index34.cjs +1 -1
  258. package/dist/index34.js +84 -22
  259. package/dist/index35.cjs +1 -1
  260. package/dist/index35.js +85 -33
  261. package/dist/index36.cjs +1 -1
  262. package/dist/index36.js +407 -25
  263. package/dist/index37.cjs +1 -1
  264. package/dist/index37.js +170 -25
  265. package/dist/index38.cjs +1 -1
  266. package/dist/index38.js +28 -154
  267. package/dist/index39.cjs +1 -1
  268. package/dist/index39.js +158 -33
  269. package/dist/index40.cjs +1 -1
  270. package/dist/index40.js +104 -45
  271. package/dist/index41.cjs +1 -1
  272. package/dist/index41.js +337 -140
  273. package/dist/index42.cjs +1 -1
  274. package/dist/index42.js +96 -124
  275. package/dist/index43.cjs +1 -1
  276. package/dist/index43.js +319 -23
  277. package/dist/index44.cjs +1 -1
  278. package/dist/index44.js +205 -81
  279. package/dist/index45.cjs +1 -1
  280. package/dist/index45.js +33 -220
  281. package/dist/index46.cjs +1 -1
  282. package/dist/index46.js +161 -163
  283. package/dist/index47.cjs +1 -1
  284. package/dist/index47.js +20 -125
  285. package/dist/index48.cjs +1 -1
  286. package/dist/index48.js +24 -14
  287. package/dist/index49.cjs +1 -1
  288. package/dist/index49.js +167 -7
  289. package/dist/index5.js +26 -14
  290. package/dist/index50.cjs +1 -1
  291. package/dist/index50.js +44 -15
  292. package/dist/index51.cjs +1 -1
  293. package/dist/index51.js +15 -18
  294. package/dist/index52.cjs +1 -1
  295. package/dist/index52.js +3 -17
  296. package/dist/index53.cjs +1 -1
  297. package/dist/index53.js +5 -5
  298. package/dist/index54.cjs +1 -1
  299. package/dist/index54.js +19 -4
  300. package/dist/index55.cjs +1 -1
  301. package/dist/index55.js +24 -6
  302. package/dist/index56.cjs +1 -1
  303. package/dist/index56.js +66 -4
  304. package/dist/index57.cjs +1 -1
  305. package/dist/index57.js +14 -5
  306. package/dist/index58.cjs +1 -1
  307. package/dist/index58.js +4 -8
  308. package/dist/index59.cjs +1 -1
  309. package/dist/index59.js +50 -67
  310. package/dist/index6.cjs +1 -1
  311. package/dist/index6.js +85 -46
  312. package/dist/index60.cjs +1 -1
  313. package/dist/index60.js +6 -10
  314. package/dist/index61.cjs +1 -1
  315. package/dist/index61.js +25 -199
  316. package/dist/index62.cjs +1 -1
  317. package/dist/index62.js +13 -122
  318. package/dist/index63.cjs +1 -1
  319. package/dist/index63.js +9 -30
  320. package/dist/index64.cjs +1 -1
  321. package/dist/index64.js +3 -20
  322. package/dist/index65.cjs +1 -1
  323. package/dist/index65.js +24 -66
  324. package/dist/index66.cjs +1 -1
  325. package/dist/index66.js +68 -30
  326. package/dist/index67.cjs +38 -1
  327. package/dist/index67.js +3 -11
  328. package/dist/index68.cjs +1 -1
  329. package/dist/index68.js +12 -279
  330. package/dist/index69.cjs +1 -1
  331. package/dist/index69.js +50 -155
  332. package/dist/index7.cjs +1 -1
  333. package/dist/index7.js +29 -85
  334. package/dist/index70.cjs +1 -1
  335. package/dist/index70.js +115 -19
  336. package/dist/index71.cjs +4 -1
  337. package/dist/index71.js +6 -9
  338. package/dist/index72.cjs +1 -1
  339. package/dist/index72.js +12 -12
  340. package/dist/index73.cjs +1 -1
  341. package/dist/index73.js +539 -6
  342. package/dist/index74.cjs +1 -1
  343. package/dist/index74.js +197 -6
  344. package/dist/index75.cjs +1 -1
  345. package/dist/index75.js +120 -9
  346. package/dist/index76.cjs +1 -1
  347. package/dist/index76.js +912 -8
  348. package/dist/index77.cjs +3 -1
  349. package/dist/index77.js +76 -4
  350. package/dist/index78.cjs +1 -1
  351. package/dist/index78.js +120 -6
  352. package/dist/index79.cjs +1 -1
  353. package/dist/index79.js +12 -6
  354. package/dist/index8.cjs +1 -1
  355. package/dist/index8.js +35 -62
  356. package/dist/index80.cjs +1 -1
  357. package/dist/index80.js +14 -8
  358. package/dist/index81.cjs +1 -1
  359. package/dist/index81.js +113 -9
  360. package/dist/index82.cjs +1 -1
  361. package/dist/index82.js +725 -13
  362. package/dist/index83.cjs +1 -1
  363. package/dist/index83.js +346 -9
  364. package/dist/index84.cjs +1 -1
  365. package/dist/index84.js +74 -9
  366. package/dist/index85.cjs +1 -1
  367. package/dist/index85.js +148 -4
  368. package/dist/index86.cjs +1 -1
  369. package/dist/index86.js +31 -42
  370. package/dist/index87.cjs +1 -1
  371. package/dist/index87.js +12 -380
  372. package/dist/index88.cjs +1 -1
  373. package/dist/index88.js +345 -37
  374. package/dist/index89.cjs +20 -1
  375. package/dist/index89.js +40 -18
  376. package/dist/index9.cjs +1 -1
  377. package/dist/index9.js +85 -17
  378. package/dist/index90.cjs +1 -1
  379. package/dist/index90.js +113 -56
  380. package/dist/index91.cjs +1 -1
  381. package/dist/index91.js +272 -51
  382. package/dist/index92.cjs +1 -1
  383. package/dist/index92.js +129 -50
  384. package/dist/index93.cjs +1 -1
  385. package/dist/index93.js +13 -54
  386. package/dist/index94.cjs +1 -1
  387. package/dist/index94.js +28 -55
  388. package/dist/index95.cjs +1 -1
  389. package/dist/index95.js +525 -80
  390. package/dist/index96.cjs +1 -1
  391. package/dist/index96.js +75 -61
  392. package/dist/index97.cjs +1 -1
  393. package/dist/index97.js +67 -583
  394. package/dist/index98.cjs +1 -9
  395. package/dist/index98.js +32 -27
  396. package/dist/index99.cjs +1 -1
  397. package/dist/index99.js +17 -49
  398. package/dist/ui/alert-dialog.d.ts +15 -0
  399. package/dist/ui/alert-dialog.d.ts.map +1 -0
  400. package/dist/ui/alert.d.ts +10 -0
  401. package/dist/ui/alert.d.ts.map +1 -0
  402. package/dist/ui/aspect-ratio.d.ts +4 -0
  403. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  404. package/dist/ui/avatar.d.ts +7 -0
  405. package/dist/ui/avatar.d.ts.map +1 -0
  406. package/dist/ui/badge.d.ts +1 -1
  407. package/dist/ui/breadcrumb.d.ts +12 -0
  408. package/dist/ui/breadcrumb.d.ts.map +1 -0
  409. package/dist/ui/button.d.ts +1 -1
  410. package/dist/ui/carousel.d.ts +20 -0
  411. package/dist/ui/carousel.d.ts.map +1 -0
  412. package/dist/ui/collapsible.d.ts +6 -0
  413. package/dist/ui/collapsible.d.ts.map +1 -0
  414. package/dist/ui/context-menu.d.ts +26 -0
  415. package/dist/ui/context-menu.d.ts.map +1 -0
  416. package/dist/ui/drawer.d.ts +14 -0
  417. package/dist/ui/drawer.d.ts.map +1 -0
  418. package/dist/ui/hover-card.d.ts +7 -0
  419. package/dist/ui/hover-card.d.ts.map +1 -0
  420. package/dist/ui/index.d.ts +23 -0
  421. package/dist/ui/index.d.ts.map +1 -1
  422. package/dist/ui/input-otp.d.ts +12 -0
  423. package/dist/ui/input-otp.d.ts.map +1 -0
  424. package/dist/ui/menubar.d.ts +27 -0
  425. package/dist/ui/menubar.d.ts.map +1 -0
  426. package/dist/ui/navigation-menu.d.ts +15 -0
  427. package/dist/ui/navigation-menu.d.ts.map +1 -0
  428. package/dist/ui/pagination.d.ts +14 -0
  429. package/dist/ui/pagination.d.ts.map +1 -0
  430. package/dist/ui/resizable.d.ts +9 -0
  431. package/dist/ui/resizable.d.ts.map +1 -0
  432. package/dist/ui/sheet.d.ts +14 -0
  433. package/dist/ui/sheet.d.ts.map +1 -0
  434. package/dist/ui/sidebar.d.ts +70 -0
  435. package/dist/ui/sidebar.d.ts.map +1 -0
  436. package/dist/ui/skeleton.d.ts +3 -0
  437. package/dist/ui/skeleton.d.ts.map +1 -0
  438. package/dist/ui/slider.d.ts +5 -0
  439. package/dist/ui/slider.d.ts.map +1 -0
  440. package/dist/ui/switch.d.ts +5 -0
  441. package/dist/ui/switch.d.ts.map +1 -0
  442. package/dist/ui/tabs.d.ts +8 -0
  443. package/dist/ui/tabs.d.ts.map +1 -0
  444. package/dist/ui/toggle-group.d.ts +8 -0
  445. package/dist/ui/toggle-group.d.ts.map +1 -0
  446. package/dist/ui/toggle.d.ts +10 -0
  447. package/dist/ui/toggle.d.ts.map +1 -0
  448. package/package.json +23 -5
package/dist/index90.js CHANGED
@@ -1,59 +1,116 @@
1
- import { getDefaultOptions as e } from "./index56.js";
2
- import t from "./index57.js";
3
- import n from "./index64.js";
4
- import r from "./index78.js";
5
- import { formatters as i } from "./index87.js";
6
- import { longFormatters as a } from "./index88.js";
7
- import { isProtectedDayOfYearToken as o, isProtectedWeekYearToken as s, warnOrThrowProtectedError as c } from "./index89.js";
8
- //#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js
9
- var l = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, u = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, d = /^'([^]*?)'?$/, f = /''/g, p = /[a-zA-Z]/;
10
- function m(d, f, m) {
11
- let g = e(), _ = m?.locale ?? g.locale ?? n, v = m?.firstWeekContainsDate ?? m?.locale?.options?.firstWeekContainsDate ?? g.firstWeekContainsDate ?? g.locale?.options?.firstWeekContainsDate ?? 1, y = m?.weekStartsOn ?? m?.locale?.options?.weekStartsOn ?? g.weekStartsOn ?? g.locale?.options?.weekStartsOn ?? 0, b = t(d, m?.in);
12
- if (!r(b)) throw RangeError("Invalid time value");
13
- let x = f.match(u).map((e) => {
14
- let t = e[0];
15
- if (t === "p" || t === "P") {
16
- let n = a[t];
17
- return n(e, _.formatLong);
1
+ import { cn as e } from "./index3.js";
2
+ import { Separator as t } from "./index80.js";
3
+ import "react";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { cva as r } from "class-variance-authority";
6
+ import { Slot as i } from "@radix-ui/react-slot";
7
+ //#region src/ui/item.tsx
8
+ function a({ className: t, ...r }) {
9
+ return /* @__PURE__ */ n("div", {
10
+ role: "list",
11
+ "data-slot": "item-group",
12
+ className: e("group/item-group flex flex-col", t),
13
+ ...r
14
+ });
15
+ }
16
+ function o({ className: r, ...i }) {
17
+ return /* @__PURE__ */ n(t, {
18
+ "data-slot": "item-separator",
19
+ orientation: "horizontal",
20
+ className: e("my-0", r),
21
+ ...i
22
+ });
23
+ }
24
+ var s = r("group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", {
25
+ variants: {
26
+ variant: {
27
+ default: "bg-transparent",
28
+ outline: "border-border",
29
+ muted: "bg-muted/50"
30
+ },
31
+ size: {
32
+ default: "p-4 gap-4 ",
33
+ sm: "py-3 px-4 gap-2.5"
18
34
  }
19
- return e;
20
- }).join("").match(l).map((e) => {
21
- if (e === "''") return {
22
- isToken: !1,
23
- value: "'"
24
- };
25
- let t = e[0];
26
- if (t === "'") return {
27
- isToken: !1,
28
- value: h(e)
29
- };
30
- if (i[t]) return {
31
- isToken: !0,
32
- value: e
33
- };
34
- if (t.match(p)) throw RangeError("Format string contains an unescaped latin alphabet character `" + t + "`");
35
- return {
36
- isToken: !1,
37
- value: e
38
- };
39
- });
40
- _.localize.preprocessor && (x = _.localize.preprocessor(b, x));
41
- let S = {
42
- firstWeekContainsDate: v,
43
- weekStartsOn: y,
44
- locale: _
45
- };
46
- return x.map((e) => {
47
- if (!e.isToken) return e.value;
48
- let t = e.value;
49
- (!m?.useAdditionalWeekYearTokens && s(t) || !m?.useAdditionalDayOfYearTokens && o(t)) && c(t, f, String(d));
50
- let n = i[t[0]];
51
- return n(b, t, _.localize, S);
52
- }).join("");
53
- }
54
- function h(e) {
55
- let t = e.match(d);
56
- return t ? t[1].replace(f, "'") : e;
35
+ },
36
+ defaultVariants: {
37
+ variant: "default",
38
+ size: "default"
39
+ }
40
+ });
41
+ function c({ className: t, variant: r = "default", size: a = "default", asChild: o = !1, ...c }) {
42
+ return /* @__PURE__ */ n(o ? i : "div", {
43
+ "data-slot": "item",
44
+ "data-variant": r,
45
+ "data-size": a,
46
+ className: e(s({
47
+ variant: r,
48
+ size: a,
49
+ className: t
50
+ })),
51
+ ...c
52
+ });
53
+ }
54
+ var l = r("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5", {
55
+ variants: { variant: {
56
+ default: "bg-transparent",
57
+ icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
58
+ image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"
59
+ } },
60
+ defaultVariants: { variant: "default" }
61
+ });
62
+ function u({ className: t, variant: r = "default", ...i }) {
63
+ return /* @__PURE__ */ n("div", {
64
+ "data-slot": "item-media",
65
+ "data-variant": r,
66
+ className: e(l({
67
+ variant: r,
68
+ className: t
69
+ })),
70
+ ...i
71
+ });
72
+ }
73
+ function d({ className: t, ...r }) {
74
+ return /* @__PURE__ */ n("div", {
75
+ "data-slot": "item-content",
76
+ className: e("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", t),
77
+ ...r
78
+ });
79
+ }
80
+ function f({ className: t, ...r }) {
81
+ return /* @__PURE__ */ n("div", {
82
+ "data-slot": "item-title",
83
+ className: e("flex w-fit items-center gap-2 text-sm leading-snug font-medium", t),
84
+ ...r
85
+ });
86
+ }
87
+ function p({ className: t, ...r }) {
88
+ return /* @__PURE__ */ n("p", {
89
+ "data-slot": "item-description",
90
+ className: e("text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", t),
91
+ ...r
92
+ });
93
+ }
94
+ function m({ className: t, ...r }) {
95
+ return /* @__PURE__ */ n("div", {
96
+ "data-slot": "item-actions",
97
+ className: e("flex items-center gap-2", t),
98
+ ...r
99
+ });
100
+ }
101
+ function h({ className: t, ...r }) {
102
+ return /* @__PURE__ */ n("div", {
103
+ "data-slot": "item-header",
104
+ className: e("flex basis-full items-center justify-between gap-2", t),
105
+ ...r
106
+ });
107
+ }
108
+ function g({ className: t, ...r }) {
109
+ return /* @__PURE__ */ n("div", {
110
+ "data-slot": "item-footer",
111
+ className: e("flex basis-full items-center justify-between gap-2", t),
112
+ ...r
113
+ });
57
114
  }
58
115
  //#endregion
59
- export { m as default };
116
+ export { c as Item, m as ItemActions, d as ItemContent, p as ItemDescription, g as ItemFooter, a as ItemGroup, h as ItemHeader, u as ItemMedia, o as ItemSeparator, f as ItemTitle };
package/dist/index91.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index57.cjs"),t=require("./index58.cjs"),n=require("./index65.cjs"),r=require("./index79.cjs"),i=require("./index88.cjs"),a=require("./index89.cjs"),o=require("./index90.cjs");var s=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,c=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l=/^'([^]*?)'?$/,u=/''/g,d=/[a-zA-Z]/;function f(l,u,f){let m=e.getDefaultOptions(),h=f?.locale??m.locale??n.default,g=f?.firstWeekContainsDate??f?.locale?.options?.firstWeekContainsDate??m.firstWeekContainsDate??m.locale?.options?.firstWeekContainsDate??1,_=f?.weekStartsOn??f?.locale?.options?.weekStartsOn??m.weekStartsOn??m.locale?.options?.weekStartsOn??0,v=t.default(l,f?.in);if(!r.default(v))throw RangeError(`Invalid time value`);let y=u.match(c).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=a.longFormatters[t];return n(e,h.formatLong)}return e}).join(``).match(s).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:p(e)};if(i.formatters[t])return{isToken:!0,value:e};if(t.match(d))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});h.localize.preprocessor&&(y=h.localize.preprocessor(v,y));let b={firstWeekContainsDate:g,weekStartsOn:_,locale:h};return y.map(e=>{if(!e.isToken)return e.value;let t=e.value;(!f?.useAdditionalWeekYearTokens&&o.isProtectedWeekYearToken(t)||!f?.useAdditionalDayOfYearTokens&&o.isProtectedDayOfYearToken(t))&&o.warnOrThrowProtectedError(t,u,String(l));let n=i.formatters[t[0]];return n(v,t,h.localize,b)}).join(``)}function p(e){let t=e.match(l);return t?t[1].replace(u,`'`):e}exports.default=f;
1
+ const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index81.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("class-variance-authority"),o=require("@radix-ui/react-slot");function s({className:e,...n}){return(0,i.jsx)(`div`,{role:`list`,"data-slot":`item-group`,className:t.cn(`group/item-group flex flex-col`,e),...n})}function c({className:e,...r}){return(0,i.jsx)(n.Separator,{"data-slot":`item-separator`,orientation:`horizontal`,className:t.cn(`my-0`,e),...r})}var l=(0,a.cva)(`group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,{variants:{variant:{default:`bg-transparent`,outline:`border-border`,muted:`bg-muted/50`},size:{default:`p-4 gap-4 `,sm:`py-3 px-4 gap-2.5`}},defaultVariants:{variant:`default`,size:`default`}});function u({className:e,variant:n=`default`,size:r=`default`,asChild:a=!1,...s}){return(0,i.jsx)(a?o.Slot:`div`,{"data-slot":`item`,"data-variant":n,"data-size":r,className:t.cn(l({variant:n,size:r,className:e})),...s})}var d=(0,a.cva)(`flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5`,{variants:{variant:{default:`bg-transparent`,icon:`size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4`,image:`size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover`}},defaultVariants:{variant:`default`}});function f({className:e,variant:n=`default`,...r}){return(0,i.jsx)(`div`,{"data-slot":`item-media`,"data-variant":n,className:t.cn(d({variant:n,className:e})),...r})}function p({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`item-content`,className:t.cn(`flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none`,e),...n})}function m({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`item-title`,className:t.cn(`flex w-fit items-center gap-2 text-sm leading-snug font-medium`,e),...n})}function h({className:e,...n}){return(0,i.jsx)(`p`,{"data-slot":`item-description`,className:t.cn(`text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...n})}function g({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`item-actions`,className:t.cn(`flex items-center gap-2`,e),...n})}function _({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`item-header`,className:t.cn(`flex basis-full items-center justify-between gap-2`,e),...n})}function v({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`item-footer`,className:t.cn(`flex basis-full items-center justify-between gap-2`,e),...n})}exports.Item=u,exports.ItemActions=g,exports.ItemContent=p,exports.ItemDescription=h,exports.ItemFooter=v,exports.ItemGroup=s,exports.ItemHeader=_,exports.ItemMedia=f,exports.ItemSeparator=c,exports.ItemTitle=m;
package/dist/index91.js CHANGED
@@ -1,55 +1,276 @@
1
- import e from "./index78.js";
2
- import t from "./index90.js";
3
- //#region src/Form/FormDatePicker/useFormDatePicker.ts
4
- function n(e) {
5
- let { pickerType: t = "date", showTime: n, dateFormat: r, rules: i = {}, onChangeDate: a, onChangeRange: o } = e, s = r || c(t, n), d = i.required !== void 0 && i.required !== !1;
6
- return {
7
- dateFormat: s,
8
- isRequired: d,
9
- processedRules: u(i, d),
10
- handleRangeChange: (e, t) => {
11
- e.onChange(t), o && o(t, [t[0] ? l(t[0], s) : "", t[1] ? l(t[1], s) : ""]);
1
+ "use client";
2
+ import { createContextScope as e } from "./index6.js";
3
+ import { useComposedRefs as t } from "./index7.js";
4
+ import { composeEventHandlers as n } from "./index8.js";
5
+ import { Primitive as r } from "./index12.js";
6
+ import { useControllableState as i } from "./index29.js";
7
+ import { useId as a } from "./index31.js";
8
+ import { createCollection as o } from "./index36.js";
9
+ import { Item as s, Root as c, createRovingFocusGroupScope as l } from "./index49.js";
10
+ import { Anchor2 as u, CheckboxItem as d, Content2 as f, Group as p, Item2 as m, ItemIndicator as h, Label as g, Portal as _, RadioGroup as v, RadioItem as y, Root3 as b, Separator as x, Sub as S, SubContent as C, SubTrigger as w, createMenuScope as T } from "./index73.js";
11
+ import * as E from "react";
12
+ import { jsx as D } from "react/jsx-runtime";
13
+ import { useDirection as O } from "@radix-ui/react-direction";
14
+ //#region ../../node_modules/.pnpm/@radix-ui+react-menubar@1.1.24_@types+react-dom@19.2.3_@types+react@19.2.17__@types+rea_db9202c20d138f0ad6d75a42c821293e/node_modules/@radix-ui/react-menubar/dist/index.mjs
15
+ var k = Object.defineProperty, A = (e, t) => k(e, "name", {
16
+ value: t,
17
+ configurable: !0
18
+ }), j = "Menubar", [M, N, ee] = o(j), [P, te] = e(j, [ee, l]), F = T(), I = l(), [L, R] = P(j), z = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
19
+ let { __scopeMenubar: n, value: a, onValueChange: o, defaultValue: s, loop: l = !0, dir: u, ...d } = e, f = O(u), p = I(n), [m, h] = i({
20
+ prop: a,
21
+ onChange: o,
22
+ defaultProp: s ?? "",
23
+ caller: j
24
+ }), [g, _] = E.useState(null);
25
+ return /* @__PURE__ */ D(L, {
26
+ scope: n,
27
+ value: m,
28
+ onMenuOpen: E.useCallback((e) => {
29
+ h(e), _(e);
30
+ }, [h]),
31
+ onMenuClose: E.useCallback(() => h(""), [h]),
32
+ onMenuToggle: E.useCallback((e) => {
33
+ h((t) => t ? "" : e), _(e);
34
+ }, [h]),
35
+ dir: f,
36
+ loop: l,
37
+ children: /* @__PURE__ */ D(M.Provider, {
38
+ scope: n,
39
+ children: /* @__PURE__ */ D(M.Slot, {
40
+ scope: n,
41
+ children: /* @__PURE__ */ D(c, {
42
+ asChild: !0,
43
+ ...p,
44
+ orientation: "horizontal",
45
+ loop: l,
46
+ dir: f,
47
+ currentTabStopId: g,
48
+ onCurrentTabStopIdChange: _,
49
+ children: /* @__PURE__ */ D(r.div, {
50
+ role: "menubar",
51
+ ...d,
52
+ ref: t
53
+ })
54
+ })
55
+ })
56
+ })
57
+ });
58
+ }, "Menubar")), B = "MenubarMenu", [V, H] = P(B), U = /* @__PURE__ */ A((e) => {
59
+ let { __scopeMenubar: t, value: n, ...r } = e, i = a(), o = n || i || "LEGACY_REACT_AUTO_VALUE", s = R(B, t), c = F(t), l = E.useRef(null), u = E.useRef(!1), d = s.value === o;
60
+ return E.useEffect(() => {
61
+ d || (u.current = !1);
62
+ }, [d]), /* @__PURE__ */ D(V, {
63
+ scope: t,
64
+ value: o,
65
+ triggerId: a(),
66
+ triggerRef: l,
67
+ contentId: a(),
68
+ wasKeyboardTriggerOpenRef: u,
69
+ children: /* @__PURE__ */ D(b, {
70
+ ...c,
71
+ open: d,
72
+ onOpenChange: (e) => {
73
+ e || s.onMenuClose();
74
+ },
75
+ modal: !1,
76
+ dir: s.dir,
77
+ ...r
78
+ })
79
+ });
80
+ }, "MenubarMenu"), W = "MenubarTrigger", G = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, i) {
81
+ let { __scopeMenubar: a, disabled: o = !1, ...c } = e, l = I(a), d = F(a), f = R(W, a), p = H(W, a), m = E.useRef(null), h = t(i, m, p.triggerRef), [g, _] = E.useState(!1), v = f.value === p.value;
82
+ return /* @__PURE__ */ D(M.ItemSlot, {
83
+ scope: a,
84
+ value: p.value,
85
+ disabled: o,
86
+ children: /* @__PURE__ */ D(s, {
87
+ asChild: !0,
88
+ ...l,
89
+ focusable: !o,
90
+ tabStopId: p.value,
91
+ children: /* @__PURE__ */ D(u, {
92
+ asChild: !0,
93
+ ...d,
94
+ children: /* @__PURE__ */ D(r.button, {
95
+ type: "button",
96
+ role: "menuitem",
97
+ id: p.triggerId,
98
+ "aria-haspopup": "menu",
99
+ "aria-expanded": v,
100
+ "aria-controls": v ? p.contentId : void 0,
101
+ "data-highlighted": g ? "" : void 0,
102
+ "data-state": v ? "open" : "closed",
103
+ "data-disabled": o ? "" : void 0,
104
+ disabled: o,
105
+ ...c,
106
+ ref: h,
107
+ onPointerDown: n(e.onPointerDown, (e) => {
108
+ !o && e.button === 0 && e.ctrlKey === !1 && (f.onMenuOpen(p.value), v || e.preventDefault());
109
+ }),
110
+ onPointerEnter: n(e.onPointerEnter, () => {
111
+ f.value && !v && (f.onMenuOpen(p.value), m.current?.focus());
112
+ }),
113
+ onKeyDown: n(e.onKeyDown, (e) => {
114
+ o || (["Enter", " "].includes(e.key) && f.onMenuToggle(p.value), e.key === "ArrowDown" && f.onMenuOpen(p.value), [
115
+ "Enter",
116
+ " ",
117
+ "ArrowDown"
118
+ ].includes(e.key) && (p.wasKeyboardTriggerOpenRef.current = !0, e.preventDefault()));
119
+ }),
120
+ onFocus: n(e.onFocus, () => _(!0)),
121
+ onBlur: n(e.onBlur, () => _(!1))
122
+ })
123
+ })
124
+ })
125
+ });
126
+ }, "MenubarTrigger")), K = /* @__PURE__ */ A((e) => {
127
+ let { __scopeMenubar: t, ...n } = e;
128
+ return /* @__PURE__ */ D(_, {
129
+ ...F(t),
130
+ ...n
131
+ });
132
+ }, "MenubarPortal"), q = "MenubarContent", J = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
133
+ let { __scopeMenubar: r, align: i = "start", ...a } = e, o = F(r), s = R(q, r), c = H(q, r), l = N(r), u = E.useRef(!1);
134
+ return /* @__PURE__ */ D(f, {
135
+ id: c.contentId,
136
+ "aria-labelledby": c.triggerId,
137
+ "data-radix-menubar-content": "",
138
+ ...o,
139
+ ...a,
140
+ ref: t,
141
+ align: i,
142
+ onCloseAutoFocus: n(e.onCloseAutoFocus, (e) => {
143
+ !s.value && !u.current && c.triggerRef.current?.focus(), u.current = !1, e.preventDefault();
144
+ }),
145
+ onFocusOutside: n(e.onFocusOutside, (e) => {
146
+ let t = e.target;
147
+ l().some((e) => e.ref.current?.contains(t)) && e.preventDefault();
148
+ }),
149
+ onInteractOutside: n(e.onInteractOutside, () => {
150
+ u.current = !0;
151
+ }),
152
+ onEntryFocus: (e) => {
153
+ c.wasKeyboardTriggerOpenRef.current || e.preventDefault();
12
154
  },
13
- handleSingleChange: (e, t) => {
14
- e.onChange(t), a && a(t, t ? l(t, s) : "");
155
+ onKeyDown: n(e.onKeyDown, (e) => {
156
+ if (["ArrowRight", "ArrowLeft"].includes(e.key)) {
157
+ let t = e.target, n = t.hasAttribute("data-radix-menubar-subtrigger"), r = t.closest("[data-radix-menubar-content]") !== e.currentTarget, i = (s.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === e.key;
158
+ if (!i && n || r && i) return;
159
+ let a = l().filter((e) => !e.disabled).map((e) => e.value);
160
+ i && a.reverse();
161
+ let o = a.indexOf(c.value);
162
+ a = s.loop ? $(a, o + 1) : a.slice(o + 1);
163
+ let [u] = a;
164
+ u && s.onMenuOpen(u);
165
+ }
166
+ }, { checkForDefaultPrevented: !1 }),
167
+ style: {
168
+ ...e.style,
169
+ "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
170
+ "--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
171
+ "--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
172
+ "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
173
+ "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
15
174
  }
16
- };
17
- }
18
- var r = (e, t) => {
19
- if (typeof e == "object") return e;
20
- if (e === !0 || t === "time") return { showSecond: !0 };
21
- }, i = (e, t) => {
22
- if (t) return typeof t == "function" && e ? t(e) : t;
23
- }, a = (e, t, n) => {
24
- if (!e && !t) return "";
25
- let r = e ? l(e, n) : "", i = t ? l(t, n) : "";
26
- return r && i ? `${r} ~ ${i}` : r || "";
27
- }, o = (e) => {
28
- switch (e) {
29
- case "small": return "h-8 text-xs";
30
- case "large": return "h-12 text-base";
31
- default: return "h-10 text-sm";
32
- }
33
- }, s = (e) => {
34
- switch (e) {
35
- case "error": return "border-destructive focus-visible:ring-destructive";
36
- case "warning": return "border-yellow-500 focus-visible:ring-yellow-500";
37
- default: return "";
38
- }
39
- }, c = (e, t) => e === "time" ? typeof t == "object" && t.format ? t.format : "HH:mm:ss" : e === "month" ? "MM/yyyy" : e === "year" ? "yyyy" : e === "datetime" || t ? typeof t == "object" && t.format ? `dd/MM/yyyy ${t.format}` : "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy", l = (n, r) => {
40
- if (!n || !e(n)) return "";
41
- try {
42
- return t(n, r);
43
- } catch (e) {
44
- return console.warn("Error formatting date:", e), "";
45
- }
46
- };
47
- function u(e = {}, t) {
48
- let n = { ...e };
49
- return t && typeof n.required != "string" && typeof n.required != "object" ? n.required = "Trường này là bắt buộc" : typeof n.required == "object" && !n.required.message && (n.required = {
50
- ...n.required,
51
- message: "Trường này là bắt buộc"
52
- }), n;
175
+ });
176
+ }, "MenubarContent")), Y = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
177
+ let { __scopeMenubar: n, ...r } = e;
178
+ return /* @__PURE__ */ D(p, {
179
+ ...F(n),
180
+ ...r,
181
+ ref: t
182
+ });
183
+ }, "MenubarGroup")), X = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
184
+ let { __scopeMenubar: n, ...r } = e;
185
+ return /* @__PURE__ */ D(g, {
186
+ ...F(n),
187
+ ...r,
188
+ ref: t
189
+ });
190
+ }, "MenubarLabel")), Z = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
191
+ let { __scopeMenubar: n, ...r } = e;
192
+ return /* @__PURE__ */ D(m, {
193
+ ...F(n),
194
+ ...r,
195
+ ref: t
196
+ });
197
+ }, "MenubarItem")), ne = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
198
+ let { __scopeMenubar: n, ...r } = e;
199
+ return /* @__PURE__ */ D(d, {
200
+ ...F(n),
201
+ ...r,
202
+ ref: t
203
+ });
204
+ }, "MenubarCheckboxItem")), Q = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
205
+ let { __scopeMenubar: n, ...r } = e;
206
+ return /* @__PURE__ */ D(v, {
207
+ ...F(n),
208
+ ...r,
209
+ ref: t
210
+ });
211
+ }, "MenubarRadioGroup")), re = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
212
+ let { __scopeMenubar: n, ...r } = e;
213
+ return /* @__PURE__ */ D(y, {
214
+ ...F(n),
215
+ ...r,
216
+ ref: t
217
+ });
218
+ }, "MenubarRadioItem")), ie = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
219
+ let { __scopeMenubar: n, ...r } = e;
220
+ return /* @__PURE__ */ D(h, {
221
+ ...F(n),
222
+ ...r,
223
+ ref: t
224
+ });
225
+ }, "MenubarItemIndicator")), ae = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
226
+ let { __scopeMenubar: n, ...r } = e;
227
+ return /* @__PURE__ */ D(x, {
228
+ ...F(n),
229
+ ...r,
230
+ ref: t
231
+ });
232
+ }, "MenubarSeparator")), oe = "MenubarSub", se = /* @__PURE__ */ A((e) => {
233
+ let { __scopeMenubar: t, children: n, open: r, onOpenChange: a, defaultOpen: o } = e, s = F(t), [c, l] = i({
234
+ prop: r,
235
+ defaultProp: o ?? !1,
236
+ onChange: a,
237
+ caller: oe
238
+ });
239
+ return /* @__PURE__ */ D(S, {
240
+ ...s,
241
+ open: c,
242
+ onOpenChange: l,
243
+ children: n
244
+ });
245
+ }, "MenubarSub"), ce = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
246
+ let { __scopeMenubar: n, ...r } = e;
247
+ return /* @__PURE__ */ D(w, {
248
+ "data-radix-menubar-subtrigger": "",
249
+ ...F(n),
250
+ ...r,
251
+ ref: t
252
+ });
253
+ }, "MenubarSubTrigger")), le = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ A(function(e, t) {
254
+ let { __scopeMenubar: n, ...r } = e;
255
+ return /* @__PURE__ */ D(C, {
256
+ ...F(n),
257
+ "data-radix-menubar-content": "",
258
+ ...r,
259
+ ref: t,
260
+ style: {
261
+ ...e.style,
262
+ "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
263
+ "--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
264
+ "--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
265
+ "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
266
+ "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
267
+ }
268
+ });
269
+ }, "MenubarSubContent"));
270
+ function $(e, t) {
271
+ return e.map((n, r) => e[(t + r) % e.length]);
53
272
  }
273
+ A($, "wrapArray");
274
+ var ue = z, de = U, fe = G, pe = K, me = J, he = Y, ge = X, _e = Z, ve = ne, ye = Q, be = re, xe = ie, Se = ae, Ce = se, we = ce, Te = le;
54
275
  //#endregion
55
- export { i as buildDisabledTime, a as buildRangeDisplayValue, r as buildTimeConfig, l as formatDateValue, o as getSizeClassName, s as getStatusClassName, n as useFormDatePicker };
276
+ export { ve as CheckboxItem2, me as Content2, he as Group2, _e as Item3, xe as ItemIndicator2, ge as Label2, de as Menu, pe as Portal2, ye as RadioGroup2, be as RadioItem2, ue as Root3, Se as Separator2, Ce as Sub2, Te as SubContent2, we as SubTrigger2, fe as Trigger };
package/dist/index92.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index79.cjs"),t=require("./index91.cjs");function n(e){let{pickerType:t=`date`,showTime:n,dateFormat:r,rules:i={},onChangeDate:a,onChangeRange:o}=e,s=r||c(t,n),d=i.required!==void 0&&i.required!==!1;return{dateFormat:s,isRequired:d,processedRules:u(i,d),handleRangeChange:(e,t)=>{e.onChange(t),o&&o(t,[t[0]?l(t[0],s):``,t[1]?l(t[1],s):``])},handleSingleChange:(e,t)=>{e.onChange(t),a&&a(t,t?l(t,s):``)}}}var r=(e,t)=>{if(typeof e==`object`)return e;if(e===!0||t===`time`)return{showSecond:!0}},i=(e,t)=>{if(t)return typeof t==`function`&&e?t(e):t},a=(e,t,n)=>{if(!e&&!t)return``;let r=e?l(e,n):``,i=t?l(t,n):``;return r&&i?`${r} ~ ${i}`:r||``},o=e=>{switch(e){case`small`:return`h-8 text-xs`;case`large`:return`h-12 text-base`;default:return`h-10 text-sm`}},s=e=>{switch(e){case`error`:return`border-destructive focus-visible:ring-destructive`;case`warning`:return`border-yellow-500 focus-visible:ring-yellow-500`;default:return``}},c=(e,t)=>e===`time`?typeof t==`object`&&t.format?t.format:`HH:mm:ss`:e===`month`?`MM/yyyy`:e===`year`?`yyyy`:e===`datetime`||t?typeof t==`object`&&t.format?`dd/MM/yyyy ${t.format}`:`dd/MM/yyyy HH:mm:ss`:`dd/MM/yyyy`,l=(n,r)=>{if(!n||!e.default(n))return``;try{return t.default(n,r)}catch(e){return console.warn(`Error formatting date:`,e),``}};function u(e={},t){let n={...e};return t&&typeof n.required!=`string`&&typeof n.required!=`object`?n.required=`Trường này là bắt buộc`:typeof n.required==`object`&&!n.required.message&&(n.required={...n.required,message:`Trường này là bắt buộc`}),n}exports.buildDisabledTime=i,exports.buildRangeDisplayValue=a,exports.buildTimeConfig=r,exports.formatDateValue=l,exports.getSizeClassName=o,exports.getStatusClassName=s,exports.useFormDatePicker=n;
1
+ "use client";const e=require("./index2.cjs"),t=require("./index7.cjs"),n=require("./index8.cjs"),r=require("./index9.cjs"),i=require("./index13.cjs"),a=require("./index30.cjs"),o=require("./index32.cjs"),s=require("./index37.cjs"),c=require("./index50.cjs"),l=require("./index74.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime"),f=require("@radix-ui/react-direction");var p=Object.defineProperty,m=(e,t)=>p(e,`name`,{value:t,configurable:!0}),h=`Menubar`,[g,_,v]=s.createCollection(h),[y,b]=t.createContextScope(h,[v,c.createRovingFocusGroupScope]),x=l.createMenuScope(),S=c.createRovingFocusGroupScope(),[C,w]=y(h),T=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:s,loop:l=!0,dir:p,...m}=e,_=(0,f.useDirection)(p),v=S(n),[y,b]=a.useControllableState({prop:r,onChange:o,defaultProp:s??``,caller:h}),[x,w]=u.useState(null);return(0,d.jsx)(C,{scope:n,value:y,onMenuOpen:u.useCallback(e=>{b(e),w(e)},[b]),onMenuClose:u.useCallback(()=>b(``),[b]),onMenuToggle:u.useCallback(e=>{b(t=>t?``:e),w(e)},[b]),dir:_,loop:l,children:(0,d.jsx)(g.Provider,{scope:n,children:(0,d.jsx)(g.Slot,{scope:n,children:(0,d.jsx)(c.Root,{asChild:!0,...v,orientation:`horizontal`,loop:l,dir:_,currentTabStopId:x,onCurrentTabStopIdChange:w,children:(0,d.jsx)(i.Primitive.div,{role:`menubar`,...m,ref:t})})})})})},`Menubar`)),E=`MenubarMenu`,[ee,D]=y(E),te=m(e=>{let{__scopeMenubar:t,value:n,...r}=e,i=o.useId(),a=n||i||`LEGACY_REACT_AUTO_VALUE`,s=w(E,t),c=x(t),f=u.useRef(null),p=u.useRef(!1),m=s.value===a;return u.useEffect(()=>{m||(p.current=!1)},[m]),(0,d.jsx)(ee,{scope:t,value:a,triggerId:o.useId(),triggerRef:f,contentId:o.useId(),wasKeyboardTriggerOpenRef:p,children:(0,d.jsx)(l.Root3,{...c,open:m,onOpenChange:e=>{e||s.onMenuClose()},modal:!1,dir:s.dir,...r})})},`MenubarMenu`),O=`MenubarTrigger`,k=u.forwardRef(m(function(e,t){let{__scopeMenubar:a,disabled:o=!1,...s}=e,f=S(a),p=x(a),m=w(O,a),h=D(O,a),_=u.useRef(null),v=n.useComposedRefs(t,_,h.triggerRef),[y,b]=u.useState(!1),C=m.value===h.value;return(0,d.jsx)(g.ItemSlot,{scope:a,value:h.value,disabled:o,children:(0,d.jsx)(c.Item,{asChild:!0,...f,focusable:!o,tabStopId:h.value,children:(0,d.jsx)(l.Anchor2,{asChild:!0,...p,children:(0,d.jsx)(i.Primitive.button,{type:`button`,role:`menuitem`,id:h.triggerId,"aria-haspopup":`menu`,"aria-expanded":C,"aria-controls":C?h.contentId:void 0,"data-highlighted":y?``:void 0,"data-state":C?`open`:`closed`,"data-disabled":o?``:void 0,disabled:o,...s,ref:v,onPointerDown:r.composeEventHandlers(e.onPointerDown,e=>{!o&&e.button===0&&e.ctrlKey===!1&&(m.onMenuOpen(h.value),C||e.preventDefault())}),onPointerEnter:r.composeEventHandlers(e.onPointerEnter,()=>{m.value&&!C&&(m.onMenuOpen(h.value),_.current?.focus())}),onKeyDown:r.composeEventHandlers(e.onKeyDown,e=>{o||([`Enter`,` `].includes(e.key)&&m.onMenuToggle(h.value),e.key===`ArrowDown`&&m.onMenuOpen(h.value),[`Enter`,` `,`ArrowDown`].includes(e.key)&&(h.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:r.composeEventHandlers(e.onFocus,()=>b(!0)),onBlur:r.composeEventHandlers(e.onBlur,()=>b(!1))})})})})},`MenubarTrigger`)),A=m(e=>{let{__scopeMenubar:t,...n}=e,r=x(t);return(0,d.jsx)(l.Portal,{...r,...n})},`MenubarPortal`),j=`MenubarContent`,M=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,align:i=`start`,...a}=e,o=x(n),s=w(j,n),c=D(j,n),f=_(n),p=u.useRef(!1);return(0,d.jsx)(l.Content2,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":``,...o,...a,ref:t,align:i,onCloseAutoFocus:r.composeEventHandlers(e.onCloseAutoFocus,e=>{!s.value&&!p.current&&c.triggerRef.current?.focus(),p.current=!1,e.preventDefault()}),onFocusOutside:r.composeEventHandlers(e.onFocusOutside,e=>{let t=e.target;f().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:r.composeEventHandlers(e.onInteractOutside,()=>{p.current=!0}),onEntryFocus:e=>{c.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:r.composeEventHandlers(e.onKeyDown,e=>{if([`ArrowRight`,`ArrowLeft`].includes(e.key)){let t=e.target,n=t.hasAttribute(`data-radix-menubar-subtrigger`),r=t.closest(`[data-radix-menubar-content]`)!==e.currentTarget,i=(s.dir===`rtl`?`ArrowRight`:`ArrowLeft`)===e.key;if(!i&&n||r&&i)return;let a=f().filter(e=>!e.disabled).map(e=>e.value);i&&a.reverse();let o=a.indexOf(c.value);a=s.loop?G(a,o+1):a.slice(o+1);let[l]=a;l&&s.onMenuOpen(l)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})},`MenubarContent`)),N=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.Group,{...i,...r,ref:t})},`MenubarGroup`)),P=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.Label,{...i,...r,ref:t})},`MenubarLabel`)),F=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.Item2,{...i,...r,ref:t})},`MenubarItem`)),I=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.CheckboxItem,{...i,...r,ref:t})},`MenubarCheckboxItem`)),L=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.RadioGroup,{...i,...r,ref:t})},`MenubarRadioGroup`)),R=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.RadioItem,{...i,...r,ref:t})},`MenubarRadioItem`)),z=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.ItemIndicator,{...i,...r,ref:t})},`MenubarItemIndicator`)),B=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.Separator,{...i,...r,ref:t})},`MenubarSeparator`)),V=`MenubarSub`,H=m(e=>{let{__scopeMenubar:t,children:n,open:r,onOpenChange:i,defaultOpen:o}=e,s=x(t),[c,u]=a.useControllableState({prop:r,defaultProp:o??!1,onChange:i,caller:V});return(0,d.jsx)(l.Sub,{...s,open:c,onOpenChange:u,children:n})},`MenubarSub`),U=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.SubTrigger,{"data-radix-menubar-subtrigger":``,...i,...r,ref:t})},`MenubarSubTrigger`)),W=u.forwardRef(m(function(e,t){let{__scopeMenubar:n,...r}=e,i=x(n);return(0,d.jsx)(l.SubContent,{...i,"data-radix-menubar-content":``,...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})},`MenubarSubContent`));function G(e,t){return e.map((n,r)=>e[(t+r)%e.length])}m(G,`wrapArray`);var K=T,q=te,J=k,Y=A,X=M,Z=N,Q=P,ne=F,re=I,ie=L,ae=R,oe=z,$=B,se=H,ce=U,le=W;exports.CheckboxItem2=re,exports.Content2=X,exports.Group2=Z,exports.Item3=ne,exports.ItemIndicator2=oe,exports.Label2=Q,exports.Menu=q,exports.Portal2=Y,exports.RadioGroup2=ie,exports.RadioItem2=ae,exports.Root3=K,exports.Separator2=$,exports.Sub2=se,exports.SubContent2=le,exports.SubTrigger2=ce,exports.Trigger=J;