@vlrc-fe/components 2.7.0 → 2.8.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 (476) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/ConfirmModal.d.ts +2 -3
  3. package/dist/ConfirmModal.d.ts.map +1 -1
  4. package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
  5. package/dist/DataTable/components/DataTablePagination.d.ts.map +1 -1
  6. package/dist/Dropdown/Dropdown.d.ts.map +1 -1
  7. package/dist/Dropdown/types.d.ts +1 -1
  8. package/dist/Dropdown/types.d.ts.map +1 -1
  9. package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
  10. package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts +2 -1
  11. package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts.map +1 -1
  12. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +7 -1
  13. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
  14. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -1
  15. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
  16. package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
  17. package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
  18. package/dist/Form/FormDatePicker/types.d.ts +5 -0
  19. package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
  20. package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
  21. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts +2 -2
  22. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
  23. package/dist/Form/FormSelect/FormSelect.d.ts.map +1 -1
  24. package/dist/Form/FormSelect/types.d.ts +1 -1
  25. package/dist/Form/FormSelect/types.d.ts.map +1 -1
  26. package/dist/Form/FormSelect/useFormSelect.d.ts +1 -1
  27. package/dist/Form/FormSelect/useFormSelect.d.ts.map +1 -1
  28. package/dist/MultiSelect/MultiSelect.d.ts +3 -31
  29. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  30. package/dist/MultiSelect/renderers.d.ts.map +1 -1
  31. package/dist/MultiSelect/type.d.ts +1 -0
  32. package/dist/MultiSelect/type.d.ts.map +1 -1
  33. package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
  34. package/dist/Select/BaseSelect.d.ts.map +1 -1
  35. package/dist/Select/MultiSelectTags.d.ts.map +1 -1
  36. package/dist/Select/type.d.ts +1 -1
  37. package/dist/Select/type.d.ts.map +1 -1
  38. package/dist/Typography/Code.d.ts.map +1 -1
  39. package/dist/Typography/Link.d.ts.map +1 -1
  40. package/dist/Typography/Paragraph.d.ts.map +1 -1
  41. package/dist/Typography/Text.d.ts.map +1 -1
  42. package/dist/Typography/Title.d.ts.map +1 -1
  43. package/dist/Typography/types.d.ts +37 -1
  44. package/dist/Typography/types.d.ts.map +1 -1
  45. package/dist/Typography/utils.d.ts +3 -2
  46. package/dist/Typography/utils.d.ts.map +1 -1
  47. package/dist/assets/stylex.css +36 -24
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.js +108 -108
  50. package/dist/index10.cjs +1 -1
  51. package/dist/index10.js +18 -55
  52. package/dist/index101.cjs +1 -1
  53. package/dist/index101.js +89 -89
  54. package/dist/index102.cjs +1 -1
  55. package/dist/index102.js +29 -29
  56. package/dist/index103.cjs +1 -1
  57. package/dist/index103.js +128 -124
  58. package/dist/index104.cjs +1 -1
  59. package/dist/index104.js +16 -16
  60. package/dist/index106.cjs +1 -1
  61. package/dist/index106.js +2 -2
  62. package/dist/index107.cjs +1 -1
  63. package/dist/index107.js +114 -117
  64. package/dist/index108.cjs +1 -1
  65. package/dist/index108.js +95 -92
  66. package/dist/index109.cjs +1 -1
  67. package/dist/index109.js +41 -41
  68. package/dist/index11.cjs +1 -1
  69. package/dist/index11.js +36 -164
  70. package/dist/index110.cjs +1 -1
  71. package/dist/index110.js +1 -1
  72. package/dist/index111.cjs +1 -1
  73. package/dist/index111.js +1 -1
  74. package/dist/index112.cjs +1 -1
  75. package/dist/index112.js +128 -120
  76. package/dist/index114.cjs +1 -1
  77. package/dist/index114.js +151 -151
  78. package/dist/index116.cjs +1 -1
  79. package/dist/index116.js +96 -91
  80. package/dist/index117.cjs +1 -1
  81. package/dist/index117.js +18 -18
  82. package/dist/index118.cjs +1 -1
  83. package/dist/index118.js +2 -2
  84. package/dist/index119.cjs +1 -1
  85. package/dist/index119.js +15 -15
  86. package/dist/index12.cjs +1 -1
  87. package/dist/index12.js +147 -103
  88. package/dist/index120.cjs +1 -1
  89. package/dist/index120.js +10 -10
  90. package/dist/index121.cjs +1 -1
  91. package/dist/index121.js +31 -31
  92. package/dist/index122.cjs +1 -1
  93. package/dist/index122.js +3 -3
  94. package/dist/index123.cjs +1 -1
  95. package/dist/index123.js +2 -2
  96. package/dist/index124.cjs +1 -1
  97. package/dist/index124.js +53 -49
  98. package/dist/index126.cjs +1 -1
  99. package/dist/index126.js +35 -38
  100. package/dist/index127.cjs +1 -1
  101. package/dist/index127.js +114 -107
  102. package/dist/index128.cjs +1 -1
  103. package/dist/index128.js +8 -8
  104. package/dist/index129.cjs +1 -1
  105. package/dist/index129.js +53 -53
  106. package/dist/index13.cjs +1 -1
  107. package/dist/index13.js +130 -102
  108. package/dist/index130.cjs +1 -1
  109. package/dist/index130.js +134 -130
  110. package/dist/index132.cjs +1 -1
  111. package/dist/index132.js +7 -7
  112. package/dist/index133.cjs +1 -1
  113. package/dist/index133.js +95 -95
  114. package/dist/index134.cjs +1 -1
  115. package/dist/index134.js +2 -2
  116. package/dist/index135.cjs +1 -1
  117. package/dist/index135.js +113 -99
  118. package/dist/index136.cjs +1 -1
  119. package/dist/index136.js +8 -8
  120. package/dist/index137.cjs +1 -1
  121. package/dist/index137.js +16 -16
  122. package/dist/index138.cjs +1 -1
  123. package/dist/index138.js +20 -20
  124. package/dist/index14.cjs +1 -1
  125. package/dist/index14.js +154 -80
  126. package/dist/index140.cjs +1 -1
  127. package/dist/index140.js +2 -2
  128. package/dist/index141.cjs +1 -1
  129. package/dist/index141.js +24 -24
  130. package/dist/index142.cjs +1 -1
  131. package/dist/index142.js +2 -2
  132. package/dist/index143.cjs +1 -1
  133. package/dist/index143.js +15 -15
  134. package/dist/index144.cjs +1 -1
  135. package/dist/index144.js +3 -3
  136. package/dist/index145.cjs +1 -1
  137. package/dist/index145.js +2 -2
  138. package/dist/index146.cjs +1 -1
  139. package/dist/index146.js +1 -1
  140. package/dist/index147.cjs +1 -1
  141. package/dist/index147.js +88 -88
  142. package/dist/index149.cjs +1 -1
  143. package/dist/index149.js +64 -64
  144. package/dist/index15.cjs +1 -1
  145. package/dist/index15.js +116 -63
  146. package/dist/index150.cjs +1 -1
  147. package/dist/index150.js +9 -9
  148. package/dist/index152.cjs +1 -1
  149. package/dist/index152.js +1 -1
  150. package/dist/index153.cjs +1 -1
  151. package/dist/index153.js +41 -41
  152. package/dist/index154.cjs +1 -1
  153. package/dist/index154.js +73 -73
  154. package/dist/index155.cjs +1 -1
  155. package/dist/index155.js +34 -34
  156. package/dist/index156.cjs +1 -1
  157. package/dist/index156.js +8 -8
  158. package/dist/index157.cjs +1 -1
  159. package/dist/index157.js +1 -1
  160. package/dist/index158.cjs +1 -1
  161. package/dist/index158.js +30 -30
  162. package/dist/index159.cjs +1 -1
  163. package/dist/index159.js +21 -21
  164. package/dist/index16.cjs +1 -1
  165. package/dist/index16.js +60 -91
  166. package/dist/index160.cjs +1 -1
  167. package/dist/index160.js +59 -59
  168. package/dist/index161.cjs +1 -1
  169. package/dist/index161.js +2 -2
  170. package/dist/index162.cjs +1 -1
  171. package/dist/index162.js +50 -50
  172. package/dist/index163.cjs +1 -1
  173. package/dist/index163.js +11 -11
  174. package/dist/index164.cjs +1 -1
  175. package/dist/index164.js +1 -1
  176. package/dist/index165.cjs +1 -1
  177. package/dist/index165.js +33 -33
  178. package/dist/index166.cjs +1 -1
  179. package/dist/index166.js +11 -11
  180. package/dist/index167.cjs +1 -1
  181. package/dist/index167.js +2 -2
  182. package/dist/index168.cjs +1 -1
  183. package/dist/index168.js +7 -7
  184. package/dist/index169.cjs +1 -1
  185. package/dist/index169.js +74 -65
  186. package/dist/index17.cjs +1 -1
  187. package/dist/index17.js +122 -15
  188. package/dist/index170.cjs +1 -1
  189. package/dist/index170.js +9 -9
  190. package/dist/index171.cjs +1 -1
  191. package/dist/index171.js +7 -7
  192. package/dist/index172.cjs +1 -1
  193. package/dist/index172.js +12 -12
  194. package/dist/index174.cjs +1 -1
  195. package/dist/index174.js +15 -15
  196. package/dist/index175.cjs +1 -1
  197. package/dist/index175.js +13 -13
  198. package/dist/index176.cjs +1 -1
  199. package/dist/index176.js +2 -2
  200. package/dist/index177.cjs +1 -1
  201. package/dist/index177.js +140 -115
  202. package/dist/index178.cjs +1 -1
  203. package/dist/index178.js +4 -4
  204. package/dist/index179.cjs +1 -1
  205. package/dist/index179.js +47 -47
  206. package/dist/index18.cjs +1 -1
  207. package/dist/index18.js +15 -268
  208. package/dist/index181.cjs +1 -1
  209. package/dist/index181.js +36 -25
  210. package/dist/index183.cjs +1 -1
  211. package/dist/index183.js +4 -4
  212. package/dist/index185.cjs +1 -1
  213. package/dist/index185.js +5 -8
  214. package/dist/index186.cjs +1 -1
  215. package/dist/index186.js +5 -15
  216. package/dist/index187.cjs +1 -1
  217. package/dist/index187.js +5 -20
  218. package/dist/index188.cjs +1 -1
  219. package/dist/index188.js +5 -16
  220. package/dist/index189.cjs +1 -1
  221. package/dist/index189.js +8 -5
  222. package/dist/index19.cjs +1 -1
  223. package/dist/index19.js +11 -281
  224. package/dist/index190.cjs +1 -1
  225. package/dist/index190.js +7 -4
  226. package/dist/index191.cjs +1 -1
  227. package/dist/index191.js +12 -6
  228. package/dist/index192.cjs +1 -1
  229. package/dist/index192.js +6 -5
  230. package/dist/index193.cjs +1 -1
  231. package/dist/index193.js +6 -5
  232. package/dist/index194.cjs +1 -1
  233. package/dist/index194.js +6 -7
  234. package/dist/index195.cjs +1 -1
  235. package/dist/index195.js +10 -68
  236. package/dist/index196.cjs +1 -1
  237. package/dist/index196.js +9 -10
  238. package/dist/index197.cjs +1 -1
  239. package/dist/index197.js +5 -201
  240. package/dist/index198.cjs +1 -1
  241. package/dist/index198.js +7 -123
  242. package/dist/index199.cjs +1 -1
  243. package/dist/index199.js +7 -31
  244. package/dist/index20.cjs +1 -1
  245. package/dist/index20.js +26 -11
  246. package/dist/index200.cjs +1 -1
  247. package/dist/index200.js +66 -17
  248. package/dist/index201.cjs +1 -1
  249. package/dist/index201.js +8 -68
  250. package/dist/index202.cjs +1 -1
  251. package/dist/index202.js +13 -13
  252. package/dist/index203.cjs +1 -1
  253. package/dist/index203.js +6 -6
  254. package/dist/index204.cjs +1 -1
  255. package/dist/index204.js +15 -278
  256. package/dist/index205.cjs +1 -1
  257. package/dist/index205.js +171 -126
  258. package/dist/index206.cjs +1 -1
  259. package/dist/index206.js +21 -19
  260. package/dist/index207.cjs +1 -1
  261. package/dist/index207.js +16 -8
  262. package/dist/index208.cjs +1 -1
  263. package/dist/index208.js +123 -13
  264. package/dist/index209.cjs +1 -1
  265. package/dist/index209.js +19 -7
  266. package/dist/index21.cjs +1 -1
  267. package/dist/index21.js +29 -26
  268. package/dist/index210.cjs +1 -1
  269. package/dist/index210.js +8 -6
  270. package/dist/index211.cjs +1 -1
  271. package/dist/index211.js +9 -9
  272. package/dist/index212.cjs +1 -1
  273. package/dist/index212.js +13 -8
  274. package/dist/index213.cjs +1 -1
  275. package/dist/index213.js +9 -4
  276. package/dist/index214.cjs +1 -1
  277. package/dist/index214.js +9 -6
  278. package/dist/index215.cjs +1 -1
  279. package/dist/index215.js +4 -6
  280. package/dist/index216.cjs +1 -1
  281. package/dist/index216.js +42 -9
  282. package/dist/index217.cjs +1 -1
  283. package/dist/index217.js +386 -8
  284. package/dist/index218.cjs +1 -1
  285. package/dist/index218.js +37 -14
  286. package/dist/index219.cjs +1 -1
  287. package/dist/index219.js +22 -10
  288. package/dist/index22.cjs +1 -1
  289. package/dist/index22.js +367 -59
  290. package/dist/index220.cjs +1 -1
  291. package/dist/index220.js +57 -9
  292. package/dist/index221.cjs +1 -1
  293. package/dist/index221.js +39 -4
  294. package/dist/index222.cjs +1 -1
  295. package/dist/index222.js +116 -35
  296. package/dist/index223.cjs +1 -1
  297. package/dist/index223.js +85 -387
  298. package/dist/index224.cjs +1 -1
  299. package/dist/index224.js +87 -35
  300. package/dist/index225.cjs +1 -1
  301. package/dist/index225.js +116 -18
  302. package/dist/index226.cjs +1 -1
  303. package/dist/index226.js +97 -55
  304. package/dist/index227.cjs +1 -1
  305. package/dist/index227.js +154 -37
  306. package/dist/index228.cjs +1 -1
  307. package/dist/index228.js +76 -121
  308. package/dist/index229.cjs +9 -1
  309. package/dist/index229.js +588 -77
  310. package/dist/index23.cjs +1 -1
  311. package/dist/index23.js +212 -29
  312. package/dist/index230.cjs +1 -1
  313. package/dist/index230.js +64 -68
  314. package/dist/index231.cjs +1 -1
  315. package/dist/index231.js +42 -115
  316. package/dist/index232.cjs +1 -1
  317. package/dist/index232.js +65 -98
  318. package/dist/index233.cjs +1 -1
  319. package/dist/index233.js +48 -149
  320. package/dist/index234.cjs +1 -1
  321. package/dist/index234.js +98 -68
  322. package/dist/index235.cjs +1 -9
  323. package/dist/index235.js +214 -580
  324. package/dist/index236.cjs +1 -1
  325. package/dist/index236.js +29 -66
  326. package/dist/index237.cjs +1 -1
  327. package/dist/index237.js +23 -40
  328. package/dist/index238.cjs +1 -1
  329. package/dist/index238.js +55 -59
  330. package/dist/index239.cjs +1 -1
  331. package/dist/index239.js +419 -46
  332. package/dist/index24.cjs +1 -1
  333. package/dist/index24.js +200 -312
  334. package/dist/index240.cjs +1 -1
  335. package/dist/index240.js +30 -97
  336. package/dist/index241.cjs +1 -1
  337. package/dist/index241.js +205 -196
  338. package/dist/index25.cjs +1 -1
  339. package/dist/index25.js +228 -124
  340. package/dist/index26.cjs +1 -1
  341. package/dist/index26.js +161 -86
  342. package/dist/index27.cjs +1 -1
  343. package/dist/index27.js +89 -143
  344. package/dist/index28.cjs +1 -1
  345. package/dist/index28.js +140 -76
  346. package/dist/index29.cjs +1 -1
  347. package/dist/index29.js +92 -84
  348. package/dist/index30.cjs +1 -1
  349. package/dist/index30.js +84 -26
  350. package/dist/index31.cjs +1 -1
  351. package/dist/index31.js +26 -35
  352. package/dist/index32.cjs +1 -1
  353. package/dist/index32.js +39 -86
  354. package/dist/index33.cjs +1 -1
  355. package/dist/index33.js +84 -231
  356. package/dist/index34.cjs +1 -1
  357. package/dist/index34.js +234 -44
  358. package/dist/index35.cjs +1 -1
  359. package/dist/index35.js +39 -26
  360. package/dist/index36.cjs +1 -1
  361. package/dist/index36.js +30 -14
  362. package/dist/index37.cjs +1 -1
  363. package/dist/index37.js +14 -13
  364. package/dist/index38.cjs +1 -1
  365. package/dist/index38.js +13 -3
  366. package/dist/index39.cjs +1 -1
  367. package/dist/index39.js +4 -87
  368. package/dist/index40.cjs +1 -1
  369. package/dist/index40.js +83 -174
  370. package/dist/index41.cjs +1 -1
  371. package/dist/index41.js +66 -142
  372. package/dist/index42.cjs +1 -1
  373. package/dist/index42.js +217 -62
  374. package/dist/index43.cjs +1 -1
  375. package/dist/index43.js +135 -47
  376. package/dist/index44.cjs +1 -1
  377. package/dist/index44.js +47 -260
  378. package/dist/index45.cjs +1 -1
  379. package/dist/index45.js +273 -8
  380. package/dist/index46.cjs +1 -1
  381. package/dist/index46.js +7 -4
  382. package/dist/index47.cjs +1 -1
  383. package/dist/index47.js +4 -503
  384. package/dist/index48.cjs +1 -1
  385. package/dist/index48.js +472 -177
  386. package/dist/index49.cjs +1 -1
  387. package/dist/index49.js +205 -23
  388. package/dist/index50.cjs +1 -1
  389. package/dist/index50.js +21 -1008
  390. package/dist/index51.cjs +1 -1
  391. package/dist/index51.js +1014 -21
  392. package/dist/index52.cjs +1 -1
  393. package/dist/index52.js +22 -207
  394. package/dist/index53.cjs +1 -1
  395. package/dist/index53.js +181 -130
  396. package/dist/index54.cjs +1 -1
  397. package/dist/index54.js +132 -99
  398. package/dist/index55.cjs +1 -1
  399. package/dist/index55.js +123 -19
  400. package/dist/index56.cjs +1 -1
  401. package/dist/index56.js +17 -79
  402. package/dist/index57.cjs +1 -1
  403. package/dist/index57.js +75 -90
  404. package/dist/index58.cjs +1 -1
  405. package/dist/index58.js +91 -9
  406. package/dist/index59.cjs +1 -1
  407. package/dist/index59.js +12 -91
  408. package/dist/index6.cjs +1 -1
  409. package/dist/index6.js +62 -5
  410. package/dist/index60.cjs +1 -1
  411. package/dist/index60.js +92 -31
  412. package/dist/index61.cjs +1 -1
  413. package/dist/index61.js +29 -208
  414. package/dist/index62.cjs +1 -1
  415. package/dist/index62.js +123 -99
  416. package/dist/index63.cjs +1 -1
  417. package/dist/index63.js +17 -17
  418. package/dist/index64.cjs +1 -1
  419. package/dist/index64.js +28 -28
  420. package/dist/index65.cjs +1 -1
  421. package/dist/index65.js +30 -30
  422. package/dist/index67.cjs +1 -1
  423. package/dist/index67.js +11 -11
  424. package/dist/index7.cjs +1 -1
  425. package/dist/index7.js +22 -28
  426. package/dist/index73.cjs +1 -1
  427. package/dist/index73.js +1 -1
  428. package/dist/index74.cjs +1 -1
  429. package/dist/index74.js +20 -20
  430. package/dist/index75.cjs +1 -1
  431. package/dist/index75.js +7 -7
  432. package/dist/index77.cjs +1 -1
  433. package/dist/index77.js +28 -28
  434. package/dist/index8.cjs +1 -1
  435. package/dist/index8.js +28 -61
  436. package/dist/index9.cjs +1 -1
  437. package/dist/index9.js +60 -15
  438. package/dist/ui/accordion.d.ts.map +1 -1
  439. package/dist/ui/avatar.d.ts.map +1 -1
  440. package/dist/ui/breadcrumb.d.ts.map +1 -1
  441. package/dist/ui/button.d.ts.map +1 -1
  442. package/dist/ui/calendar.d.ts +1 -1
  443. package/dist/ui/calendar.d.ts.map +1 -1
  444. package/dist/ui/command.d.ts +1 -1
  445. package/dist/ui/command.d.ts.map +1 -1
  446. package/dist/ui/context-menu.d.ts.map +1 -1
  447. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  448. package/dist/ui/editable.d.ts.map +1 -1
  449. package/dist/ui/field.d.ts.map +1 -1
  450. package/dist/ui/form.d.ts.map +1 -1
  451. package/dist/ui/input-group.d.ts.map +1 -1
  452. package/dist/ui/input-otp.d.ts +1 -1
  453. package/dist/ui/input-otp.d.ts.map +1 -1
  454. package/dist/ui/item.d.ts.map +1 -1
  455. package/dist/ui/menubar.d.ts.map +1 -1
  456. package/dist/ui/pagination.d.ts +3 -1
  457. package/dist/ui/pagination.d.ts.map +1 -1
  458. package/dist/ui/toggle-group.d.ts +1 -1
  459. package/dist/ui/toggle-group.d.ts.map +1 -1
  460. package/dist/ui/toggle.d.ts +1 -1
  461. package/dist/ui/toggle.d.ts.map +1 -1
  462. package/dist/ui/useBreakpoint.d.ts +0 -4
  463. package/dist/ui/useBreakpoint.d.ts.map +1 -1
  464. package/package.json +1 -1
  465. package/dist/index242.cjs +0 -1
  466. package/dist/index242.js +0 -25
  467. package/dist/index243.cjs +0 -1
  468. package/dist/index243.js +0 -26
  469. package/dist/index244.cjs +0 -1
  470. package/dist/index244.js +0 -63
  471. package/dist/index245.cjs +0 -1
  472. package/dist/index245.js +0 -422
  473. package/dist/index246.cjs +0 -1
  474. package/dist/index246.js +0 -25
  475. package/dist/index247.cjs +0 -1
  476. package/dist/index247.js +0 -209
package/dist/index225.js CHANGED
@@ -1,22 +1,120 @@
1
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js
2
- var e = /^D+$/, t = /^Y+$/, n = [
3
- "D",
4
- "DD",
5
- "YY",
6
- "YYYY"
1
+ import { Icons as e } from "./index4.js";
2
+ import { Text as t } from "./index14.js";
3
+ import "@stylexjs/stylex";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { useState as i } from "react";
6
+ import { c as a } from "react/compiler-runtime";
7
+ // src/Form/FormDatePicker/MonthPickerPanel.tsx
8
+ var o = [
9
+ "Jan",
10
+ "Feb",
11
+ "Mar",
12
+ "Apr",
13
+ "May",
14
+ "Jun",
15
+ "Jul",
16
+ "Aug",
17
+ "Sep",
18
+ "Oct",
19
+ "Nov",
20
+ "Dec"
7
21
  ];
8
- function r(t) {
9
- return e.test(t);
22
+ function s(s) {
23
+ let u = a(40), { value: d, onChange: f, disabledDate: p, onYearClick: m, locale: h } = s, g;
24
+ u[0] === d ? g = u[1] : (g = d ? d.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear(), u[0] = d, u[1] = g);
25
+ let [_, v] = i(g), y;
26
+ u[2] === d ? y = u[3] : (y = d?.getFullYear(), u[2] = d, u[3] = y);
27
+ let b = y, x;
28
+ u[4] === d ? x = u[5] : (x = d?.getMonth(), u[4] = d, u[5] = x);
29
+ let S = x, C;
30
+ u[6] === Symbol.for("react.memo_cache_sentinel") ? (C = (e) => {
31
+ e.stopPropagation(), v(l);
32
+ }, u[6] = C) : C = u[6];
33
+ let w = C, T;
34
+ u[7] === Symbol.for("react.memo_cache_sentinel") ? (T = (e) => {
35
+ e.stopPropagation(), v(c);
36
+ }, u[7] = T) : T = u[7];
37
+ let E = T, D;
38
+ u[8] !== f || u[9] !== _ ? (D = (e) => {
39
+ let t = new Date(_, e, 1);
40
+ f(t);
41
+ }, u[8] = f, u[9] = _, u[10] = D) : D = u[10];
42
+ let O = D, k;
43
+ u[11] === h ? k = u[12] : (k = (e) => h?.localize?.month ? h.localize.month(e, { width: "abbreviated" }) : o[e], u[11] = h, u[12] = k);
44
+ let A = k, j;
45
+ u[13] !== h?.code || u[14] !== _ ? (j = h?.code?.startsWith("vi") ? `Năm ${_}` : String(_), u[13] = h?.code, u[14] = _, u[15] = j) : j = u[15];
46
+ let M = j, N;
47
+ u[16] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ n("button", {
48
+ type: "button",
49
+ onClick: w,
50
+ "aria-label": "Previous Year",
51
+ className: "x3nfvp2 x6s0dn4 xl56j7k xgd8bvy x1fgtraw xsda711 xmkeg23 x1y0btm7 xb30jbz xjbqb8w x84br7x x1ypdohk xfyfa0t x9p52ec x10ubyu6",
52
+ children: /* @__PURE__ */ n(e.ChevronLeft, { size: 16 })
53
+ }), u[16] = N) : N = u[16];
54
+ let P;
55
+ u[17] !== m || u[18] !== _ ? (P = () => m?.(_), u[17] = m, u[18] = _, u[19] = P) : P = u[19];
56
+ let F;
57
+ u[20] === M ? F = u[21] : (F = /* @__PURE__ */ n(t, {
58
+ weight: "semibold",
59
+ size: "sm",
60
+ children: M
61
+ }), u[20] = M, u[21] = F);
62
+ let I;
63
+ u[22] !== P || u[23] !== F ? (I = /* @__PURE__ */ n("button", {
64
+ type: "button",
65
+ onClick: P,
66
+ className: "xc342km xjbqb8w x1ypdohk xv98brn x1q0v2j7 x111pd7f x9p52ec",
67
+ children: F
68
+ }), u[22] = P, u[23] = F, u[24] = I) : I = u[24];
69
+ let L;
70
+ u[25] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ n("button", {
71
+ type: "button",
72
+ onClick: E,
73
+ "aria-label": "Next Year",
74
+ className: "x3nfvp2 x6s0dn4 xl56j7k xgd8bvy x1fgtraw xsda711 xmkeg23 x1y0btm7 xb30jbz xjbqb8w x84br7x x1ypdohk xfyfa0t x9p52ec x10ubyu6",
75
+ children: /* @__PURE__ */ n(e.ChevronRight, { size: 16 })
76
+ }), u[25] = L) : L = u[25];
77
+ let R;
78
+ u[26] === I ? R = u[27] : (R = /* @__PURE__ */ r("div", {
79
+ className: "x78zum5 x6s0dn4 x1qughib x1y4g5ey x1wwzmr xso031l x1q0q8m5 x1c03eaz",
80
+ children: [
81
+ N,
82
+ I,
83
+ L
84
+ ]
85
+ }), u[26] = I, u[27] = R);
86
+ let z;
87
+ u[28] !== p || u[29] !== A || u[30] !== O || u[31] !== S || u[32] !== b || u[33] !== _ ? (z = o.map((e, t) => {
88
+ let r = A(t), i = b === _ && S === t, a = new Date(_, t, 1), o = p ? p(a) : !1;
89
+ return /* @__PURE__ */ n("button", {
90
+ type: "button",
91
+ disabled: o,
92
+ onClick: () => O(t),
93
+ ...{
94
+ 0: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w x84br7x xkpwil5 x1ypdohk xfyfa0t x9p52ec x10ubyu6" },
95
+ 2: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 x1ypdohk xfyfa0t x1j7ufkg xstwp1q x1s688f x1439r81 x1fth186" },
96
+ 1: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 xfyfa0t x9p52ec x10ubyu6 xw3nh4a x3onkmb x1h6gzvc x47corl" },
97
+ 3: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a x3onkmb x1h6gzvc x47corl" }
98
+ }[!!i << 1 | !!o],
99
+ children: r
100
+ }, r);
101
+ }), u[28] = p, u[29] = A, u[30] = O, u[31] = S, u[32] = b, u[33] = _, u[34] = z) : z = u[34];
102
+ let B;
103
+ u[35] === z ? B = u[36] : (B = /* @__PURE__ */ n("div", {
104
+ className: "xrvj5dj x1wlfl8j x1m5ztt4",
105
+ children: z
106
+ }), u[35] = z, u[36] = B);
107
+ let V;
108
+ return u[37] !== R || u[38] !== B ? (V = /* @__PURE__ */ r("div", {
109
+ "data-slot": "month-picker-panel",
110
+ className: "x1dz1jew x1g7u2xf x1mlyrtw xsda711 x87ps6o",
111
+ children: [R, B]
112
+ }), u[37] = R, u[38] = B, u[39] = V) : V = u[39], V;
10
113
  }
11
- function i(e) {
12
- return t.test(e);
114
+ function c(e) {
115
+ return e + 1;
13
116
  }
14
- function a(e, t, r) {
15
- let i = o(e, t, r);
16
- if (console.warn(i), n.includes(e)) throw RangeError(i);
117
+ function l(e) {
118
+ return e - 1;
17
119
  }
18
- function o(e, t, n) {
19
- let r = e[0] === "Y" ? "years" : "days of the month";
20
- return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
21
- }
22
- export { r as isProtectedDayOfYearToken, i as isProtectedWeekYearToken, a as warnOrThrowProtectedError };
120
+ export { s as MonthPickerPanel, s as default };
package/dist/index226.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index192.cjs"),t=require("./index193.cjs"),n=require("./index200.cjs"),r=require("./index214.cjs"),i=require("./index223.cjs"),a=require("./index224.cjs"),o=require("./index225.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,exports.format=f,exports.formatDate=f,exports.formatters=i.formatters,exports.longFormatters=a.longFormatters;
1
+ const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index14.cjs");let r=require("@stylexjs/stylex");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("react");a=e.__toESM(a,1);let o=require("react/compiler-runtime");function s(e){let r=(0,o.c)(32),{value:s,onChange:u,disabledDate:d}=e,f;r[0]===s?f=r[1]:(f=s?s.getFullYear():new Date().getFullYear(),r[0]=s,r[1]=f);let[p,m]=(0,a.useState)(Math.floor(f/10)*10),h;r[2]===s?h=r[3]:(h=s?.getFullYear(),r[2]=s,r[3]=h);let g=h,_=p+9,v;r[4]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{e.stopPropagation(),m(l)},r[4]=v):v=r[4];let y=v,b;r[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>{e.stopPropagation(),m(c)},r[5]=b):b=r[5];let x=b,S,C,w,T,E;if(r[6]!==_||r[7]!==d||r[8]!==u||r[9]!==g||r[10]!==s||r[11]!==p){let e=[];for(let t=p-1;t<=_+1;t++)e.push(t);let a=e=>{let t=s?s.getMonth():0,n=new Date(e,t,1);u(n)};w=`year-picker-panel`,T=`x1dz1jew x1g7u2xf x1mlyrtw xsda711 x87ps6o`;let o;r[17]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,i.jsx)(`button`,{type:`button`,onClick:y,"aria-label":`Previous Decade`,className:`x3nfvp2 x6s0dn4 xl56j7k xgd8bvy x1fgtraw xsda711 xmkeg23 x1y0btm7 xb30jbz xjbqb8w x84br7x x1ypdohk xfyfa0t x9p52ec x10ubyu6`,children:(0,i.jsx)(t.Icons.ChevronLeft,{size:16})}),r[17]=o):o=r[17];let c;r[18]!==_||r[19]!==p?(c=(0,i.jsxs)(n.Text,{weight:`semibold`,size:`sm`,children:[p,` - `,_]}),r[18]=_,r[19]=p,r[20]=c):c=r[20];let l;r[21]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,i.jsx)(`button`,{type:`button`,onClick:x,"aria-label":`Next Decade`,className:`x3nfvp2 x6s0dn4 xl56j7k xgd8bvy x1fgtraw xsda711 xmkeg23 x1y0btm7 xb30jbz xjbqb8w x84br7x x1ypdohk xfyfa0t x9p52ec x10ubyu6`,children:(0,i.jsx)(t.Icons.ChevronRight,{size:16})}),r[21]=l):l=r[21],r[22]===c?E=r[23]:(E=(0,i.jsxs)(`div`,{className:`x78zum5 x6s0dn4 x1qughib x1y4g5ey x1wwzmr xso031l x1q0q8m5 x1c03eaz`,children:[o,c,l]}),r[22]=c,r[23]=E),S=`xrvj5dj x1wlfl8j x1m5ztt4`,C=e.map(e=>{let t=g===e,n=e<p||e>_,r=new Date(e,0,1),o=d?d(r):!1;return(0,i.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>a(e),...{0:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w x84br7x xkpwil5 x1ypdohk xfyfa0t x9p52ec x10ubyu6`},4:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 x1ypdohk xfyfa0t x1j7ufkg xstwp1q x1s688f x1439r81 x1fth186`},2:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 x1ypdohk xfyfa0t x9p52ec x10ubyu6 xw3nh4a xbyyjgo`},6:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 x1ypdohk xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a xbyyjgo`},1:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 xfyfa0t x9p52ec x10ubyu6 xw3nh4a x3onkmb x1h6gzvc x47corl`},5:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a x3onkmb x1h6gzvc x47corl`},3:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 xfyfa0t x9p52ec x10ubyu6 xw3nh4a x3onkmb x1h6gzvc x47corl`},7:{className:`x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a x3onkmb x1h6gzvc x47corl`}}[!!t<<2|!(!n||t)<<1|!!o],children:e},e)}),r[6]=_,r[7]=d,r[8]=u,r[9]=g,r[10]=s,r[11]=p,r[12]=S,r[13]=C,r[14]=w,r[15]=T,r[16]=E}else S=r[12],C=r[13],w=r[14],T=r[15],E=r[16];let D;r[24]!==S||r[25]!==C?(D=(0,i.jsx)(`div`,{className:S,children:C}),r[24]=S,r[25]=C,r[26]=D):D=r[26];let O;return r[27]!==D||r[28]!==w||r[29]!==T||r[30]!==E?(O=(0,i.jsxs)(`div`,{"data-slot":w,className:T,children:[E,D]}),r[27]=D,r[28]=w,r[29]=T,r[30]=E,r[31]=O):O=r[31],O}function c(e){return e+10}function l(e){return e-10}exports.YearPickerPanel=s,exports.default=s;
package/dist/index226.js CHANGED
@@ -1,58 +1,100 @@
1
- import { getDefaultOptions as e } from "./index192.js";
2
- import t from "./index193.js";
3
- import n from "./index200.js";
4
- import r from "./index214.js";
5
- import { formatters as i } from "./index223.js";
6
- import { longFormatters as a } from "./index224.js";
7
- import { isProtectedDayOfYearToken as o, isProtectedWeekYearToken as s, warnOrThrowProtectedError as c } from "./index225.js";
8
- // ../../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);
18
- }
19
- return e;
20
- }).join("").match(l).map((e) => {
21
- if (e === "''") return {
22
- isToken: !1,
23
- value: "'"
1
+ import { Icons as e } from "./index4.js";
2
+ import { Text as t } from "./index14.js";
3
+ import "@stylexjs/stylex";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { useState as i } from "react";
6
+ import { c as a } from "react/compiler-runtime";
7
+ // src/Form/FormDatePicker/YearPickerPanel.tsx
8
+ function o(o) {
9
+ let l = a(32), { value: u, onChange: d, disabledDate: f } = o, p;
10
+ l[0] === u ? p = l[1] : (p = u ? u.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear(), l[0] = u, l[1] = p);
11
+ let [m, h] = i(Math.floor(p / 10) * 10), g;
12
+ l[2] === u ? g = l[3] : (g = u?.getFullYear(), l[2] = u, l[3] = g);
13
+ let _ = g, v = m + 9, y;
14
+ l[4] === Symbol.for("react.memo_cache_sentinel") ? (y = (e) => {
15
+ e.stopPropagation(), h(c);
16
+ }, l[4] = y) : y = l[4];
17
+ let b = y, x;
18
+ l[5] === Symbol.for("react.memo_cache_sentinel") ? (x = (e) => {
19
+ e.stopPropagation(), h(s);
20
+ }, l[5] = x) : x = l[5];
21
+ let S = x, C, w, T, E, D;
22
+ if (l[6] !== v || l[7] !== f || l[8] !== d || l[9] !== _ || l[10] !== u || l[11] !== m) {
23
+ let i = [];
24
+ for (let e = m - 1; e <= v + 1; e++) i.push(e);
25
+ let a = (e) => {
26
+ let t = u ? u.getMonth() : 0, n = new Date(e, t, 1);
27
+ d(n);
24
28
  };
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("");
29
+ T = "year-picker-panel", E = "x1dz1jew x1g7u2xf x1mlyrtw xsda711 x87ps6o";
30
+ let o;
31
+ l[17] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ n("button", {
32
+ type: "button",
33
+ onClick: b,
34
+ "aria-label": "Previous Decade",
35
+ className: "x3nfvp2 x6s0dn4 xl56j7k xgd8bvy x1fgtraw xsda711 xmkeg23 x1y0btm7 xb30jbz xjbqb8w x84br7x x1ypdohk xfyfa0t x9p52ec x10ubyu6",
36
+ children: /* @__PURE__ */ n(e.ChevronLeft, { size: 16 })
37
+ }), l[17] = o) : o = l[17];
38
+ let s;
39
+ l[18] !== v || l[19] !== m ? (s = /* @__PURE__ */ r(t, {
40
+ weight: "semibold",
41
+ size: "sm",
42
+ children: [
43
+ m,
44
+ " - ",
45
+ v
46
+ ]
47
+ }), l[18] = v, l[19] = m, l[20] = s) : s = l[20];
48
+ let c;
49
+ l[21] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ n("button", {
50
+ type: "button",
51
+ onClick: S,
52
+ "aria-label": "Next Decade",
53
+ className: "x3nfvp2 x6s0dn4 xl56j7k xgd8bvy x1fgtraw xsda711 xmkeg23 x1y0btm7 xb30jbz xjbqb8w x84br7x x1ypdohk xfyfa0t x9p52ec x10ubyu6",
54
+ children: /* @__PURE__ */ n(e.ChevronRight, { size: 16 })
55
+ }), l[21] = c) : c = l[21], l[22] === s ? D = l[23] : (D = /* @__PURE__ */ r("div", {
56
+ className: "x78zum5 x6s0dn4 x1qughib x1y4g5ey x1wwzmr xso031l x1q0q8m5 x1c03eaz",
57
+ children: [
58
+ o,
59
+ s,
60
+ c
61
+ ]
62
+ }), l[22] = s, l[23] = D), C = "xrvj5dj x1wlfl8j x1m5ztt4", w = i.map((e) => {
63
+ let t = _ === e, r = e < m || e > v, i = new Date(e, 0, 1), o = f ? f(i) : !1;
64
+ return /* @__PURE__ */ n("button", {
65
+ type: "button",
66
+ disabled: o,
67
+ onClick: () => a(e),
68
+ ...{
69
+ 0: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w x84br7x xkpwil5 x1ypdohk xfyfa0t x9p52ec x10ubyu6" },
70
+ 4: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 x1ypdohk xfyfa0t x1j7ufkg xstwp1q x1s688f x1439r81 x1fth186" },
71
+ 2: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 x1ypdohk xfyfa0t x9p52ec x10ubyu6 xw3nh4a xbyyjgo" },
72
+ 6: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 x1ypdohk xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a xbyyjgo" },
73
+ 1: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 xfyfa0t x9p52ec x10ubyu6 xw3nh4a x3onkmb x1h6gzvc x47corl" },
74
+ 5: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a x3onkmb x1h6gzvc x47corl" },
75
+ 3: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xjbqb8w xkpwil5 xfyfa0t x9p52ec x10ubyu6 xw3nh4a x3onkmb x1h6gzvc x47corl" },
76
+ 7: { className: "x78zum5 x6s0dn4 xl56j7k xn3w4p2 xsda711 xc342km xkpwil5 xfyfa0t x1j7ufkg x1s688f x1439r81 x1fth186 xw3nh4a x3onkmb x1h6gzvc x47corl" }
77
+ }[!!t << 2 | !(!r || t) << 1 | !!o],
78
+ children: e
79
+ }, e);
80
+ }), l[6] = v, l[7] = f, l[8] = d, l[9] = _, l[10] = u, l[11] = m, l[12] = C, l[13] = w, l[14] = T, l[15] = E, l[16] = D;
81
+ } else C = l[12], w = l[13], T = l[14], E = l[15], D = l[16];
82
+ let O;
83
+ l[24] !== C || l[25] !== w ? (O = /* @__PURE__ */ n("div", {
84
+ className: C,
85
+ children: w
86
+ }), l[24] = C, l[25] = w, l[26] = O) : O = l[26];
87
+ let k;
88
+ return l[27] !== O || l[28] !== T || l[29] !== E || l[30] !== D ? (k = /* @__PURE__ */ r("div", {
89
+ "data-slot": T,
90
+ className: E,
91
+ children: [D, O]
92
+ }), l[27] = O, l[28] = T, l[29] = E, l[30] = D, l[31] = k) : k = l[31], k;
93
+ }
94
+ function s(e) {
95
+ return e + 10;
53
96
  }
54
- function h(e) {
55
- let t = e.match(d);
56
- return t ? t[1].replace(f, "'") : e;
97
+ function c(e) {
98
+ return e - 10;
57
99
  }
58
- export { m as default, m as format, m as formatDate, i as formatters, a as longFormatters };
100
+ export { o as YearPickerPanel, o as default };
package/dist/index227.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index214.cjs"),t=require("./index226.cjs");function n(e){let{pickerType:t=`date`,showTime:n,dateFormat:r,rules:s={},onChangeDate:c,onChangeRange:l}=e,u=r||i(t,n),d=s.required!==void 0&&s.required!==!1;return{dateFormat:u,isRequired:d,processedRules:o(s,d),handleRangeChange:(e,t)=>{if(e.onChange(t),l){let e=[t[0]?a(t[0],u):``,t[1]?a(t[1],u):``];l(t,e)}},handleSingleChange:(e,t)=>{e.onChange(t),c&&c(t,t?a(t,u):``)}}}var r=(e,t,n)=>{if(!e&&!t)return``;let r=e?a(e,n):``,i=t?a(t,n):``;return r&&i?`${r} ~ ${i}`:r||``},i=(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`,a=(n,r)=>{if(!n||!e.default(n))return``;try{return t.default(n,r)}catch(e){return console.warn(`Error formatting date:`,e),``}};function o(e={},t){let n={...e};return t&&typeof n.required!=`string`&&typeof n.required!=`object`?n.required=`This field is required`:typeof n.required==`object`&&!n.required.message&&(n.required={...n.required,message:`This field is required`}),n}exports.buildRangeDisplayValue=r,exports.formatDateValue=a,exports.getDefaultFormat=i,exports.useFormDatePicker=n;
1
+ const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index14.cjs"),r=require("./index20.cjs"),i=require("./index22.cjs"),a=require("./index41.cjs"),o=require("./index47.cjs"),s=require("./index48.cjs"),c=require("./index221.cjs"),l=require("./index223.cjs"),u=require("./index224.cjs"),d=require("./index225.cjs"),f=require("./index226.cjs");let p=require("@stylexjs/stylex");p=e.__toESM(p,1);let m=require("react/jsx-runtime"),h=require("react");h=e.__toESM(h,1);var g={triggerButton:{kjj79g:`x1qughib`,k63SB2:`xo1l8bm`,$$css:!0},statusError:{kVAM5u:`x1uwefn5`,$$css:!0},statusWarning:{kVAM5u:`x6j094l`,$$css:!0},fullWidth:{kzqmXN:`xh8yej3`,$$css:!0},clearButton:{kkrTdU:`x1ypdohk`,kDPRdz:`x1mqvv6a`,$$css:!0},popoverContent:{kzqmXN:`x14atkfc`,kmVPX3:`x1717udv`,$$css:!0}};function _({value:e,onChange:p,placeholder:_=`Select Date`,dateFormat:v,pickerType:y=`date`,showTime:b,size:x=`md`,status:S,width:C=`auto`,disabled:w,allowClear:T,hideValue:E,suffixIcon:D,className:O,sx:k,disabledDate:A,disabledTime:j,timeConfig:M,locale:N,startMonth:P,endMonth:F}){let[I,L]=(0,h.useState)(!1),[R,z]=(0,h.useState)(e||new Date),B=o.resolveDatePickerSize(x),V=v||c.getDefaultFormat(y,b),H=c.formatDateValue(e,V),U=t=>{if(!t){p?.(void 0);return}let n=t;b&&e&&(n=new Date(t),n.setHours(e.getHours()),n.setMinutes(e.getMinutes()),n.setSeconds(e.getSeconds())),p?.(n),z(n),b||L(!1)},W=e=>{p?.(e)},G=e=>{e.stopPropagation(),p?.(void 0)},K=()=>D||(y===`time`?(0,m.jsx)(t.Icons.Clock,{className:`xcdlrvm x1l36t39 xbyyjgo`}):(0,m.jsx)(t.Icons.CalendarIcon,{className:`xcdlrvm x1l36t39 xbyyjgo`})),q=()=>y===`time`?(0,m.jsxs)(`div`,{className:`x7gbtqy`,children:[(0,m.jsx)(u.TimePicker,{value:e,onChange:W,timeConfig:M,disabledTime:J(e,j)}),(0,m.jsx)(`div`,{className:`x1mjqqkp x1b58sdr x178xt8z x13fuv20 xh5ekmr`,children:(0,m.jsx)(l.TimeInput,{value:e,onChange:W,timeConfig:M})})]}):y===`month`?(0,m.jsx)(d.MonthPickerPanel,{value:e,onChange:U,disabledDate:A,locale:N}):y===`year`?(0,m.jsx)(f.YearPickerPanel,{value:e,onChange:U,disabledDate:A}):(0,m.jsxs)(`div`,{className:`x78zum5`,children:[(0,m.jsx)(s.Calendar,{mode:`single`,size:B,selected:e,onSelect:U,disabled:A,captionLayout:`dropdown`,locale:N,month:R,startMonth:P,endMonth:F,onMonthChange:z}),b&&(0,m.jsx)(`div`,{className:`x7gbtqy`,children:(0,m.jsx)(u.TimePicker,{value:e,onChange:W,timeConfig:M,disabledTime:J(e,j)})})]}),J=(e,t)=>{if(!t)return{};let n=typeof t==`function`&&e?t(e):typeof t==`function`?{}:t;return{disabledHours:()=>n.disabledHours?.()||[],disabledMinutes:e=>n.disabledMinutes?.(e)||[],disabledSeconds:(e,t)=>n.disabledSeconds?.(e,t)||[]}},Y=S===`error`?g.statusError:S===`warning`?g.statusWarning:void 0,X=B===`xxs`||B===`xs`?`xs`:B===`xl`||B===`xxl`?`lg`:`sm`;return(0,m.jsxs)(a.Popover,{open:I,onOpenChange:L,children:[(0,m.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,m.jsxs)(i.Button,{variant:`outline`,size:B,disabled:w,width:C,sx:[g.triggerButton,Y,C===`auto`?g.fullWidth:void 0,k],className:O,style:C===`auto`?void 0:{width:r.resolveWidth(C)},children:[!E&&H?(0,m.jsx)(n.Text,{size:X,weight:`normal`,children:H}):(0,m.jsx)(n.Text,{size:X,type:`muted`,children:_}),(0,m.jsxs)(`div`,{className:`x8x9d4c x78zum5 x6s0dn4 xvh977a`,children:[T&&e&&(0,m.jsx)(n.Text,{as:`span`,onClick:G,sx:g.clearButton,children:`×`}),K()]})]})}),(0,m.jsx)(a.PopoverContent,{sx:g.popoverContent,align:`start`,children:q()})]})}exports.SingleDatePicker=_,exports.default=_;
package/dist/index227.js CHANGED
@@ -1,40 +1,157 @@
1
- import e from "./index214.js";
2
- import t from "./index226.js";
3
- // src/Form/FormDatePicker/useFormDatePicker.ts
4
- function n(e) {
5
- let { pickerType: t = "date", showTime: n, dateFormat: r, rules: s = {}, onChangeDate: c, onChangeRange: l } = e, u = r || i(t, n), d = s.required !== void 0 && s.required !== !1;
6
- return {
7
- dateFormat: u,
8
- isRequired: d,
9
- processedRules: o(s, d),
10
- handleRangeChange: (e, t) => {
11
- if (e.onChange(t), l) {
12
- let e = [t[0] ? a(t[0], u) : "", t[1] ? a(t[1], u) : ""];
13
- l(t, e);
14
- }
15
- },
16
- handleSingleChange: (e, t) => {
17
- e.onChange(t), c && c(t, t ? a(t, u) : "");
18
- }
19
- };
20
- }
21
- var r = (e, t, n) => {
22
- if (!e && !t) return "";
23
- let r = e ? a(e, n) : "", i = t ? a(t, n) : "";
24
- return r && i ? `${r} ~ ${i}` : r || "";
25
- }, i = (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", a = (n, r) => {
26
- if (!n || !e(n)) return "";
27
- try {
28
- return t(n, r);
29
- } catch (e) {
30
- return console.warn("Error formatting date:", e), "";
1
+ import { Icons as e } from "./index4.js";
2
+ import { Text as t } from "./index14.js";
3
+ import { resolveWidth as n } from "./index20.js";
4
+ import { Button as ee } from "./index22.js";
5
+ import { Popover as r, PopoverContent as i, PopoverTrigger as a } from "./index41.js";
6
+ import { resolveDatePickerSize as o } from "./index47.js";
7
+ import { Calendar as s } from "./index48.js";
8
+ import { formatDateValue as c, getDefaultFormat as l } from "./index221.js";
9
+ import { TimeInput as u } from "./index223.js";
10
+ import { TimePicker as d } from "./index224.js";
11
+ import { MonthPickerPanel as f } from "./index225.js";
12
+ import { YearPickerPanel as p } from "./index226.js";
13
+ import "@stylexjs/stylex";
14
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
15
+ import { useState as g } from "react";
16
+ // src/Form/FormDatePicker/SingleDatePicker.tsx
17
+ var _ = {
18
+ triggerButton: {
19
+ kjj79g: "x1qughib",
20
+ k63SB2: "xo1l8bm",
21
+ $$css: !0
22
+ },
23
+ statusError: {
24
+ kVAM5u: "x1uwefn5",
25
+ $$css: !0
26
+ },
27
+ statusWarning: {
28
+ kVAM5u: "x6j094l",
29
+ $$css: !0
30
+ },
31
+ fullWidth: {
32
+ kzqmXN: "xh8yej3",
33
+ $$css: !0
34
+ },
35
+ clearButton: {
36
+ kkrTdU: "x1ypdohk",
37
+ kDPRdz: "x1mqvv6a",
38
+ $$css: !0
39
+ },
40
+ popoverContent: {
41
+ kzqmXN: "x14atkfc",
42
+ kmVPX3: "x1717udv",
43
+ $$css: !0
31
44
  }
32
45
  };
33
- function o(e = {}, t) {
34
- let n = { ...e };
35
- return t && typeof n.required != "string" && typeof n.required != "object" ? n.required = "This field is required" : typeof n.required == "object" && !n.required.message && (n.required = {
36
- ...n.required,
37
- message: "This field is required"
38
- }), n;
46
+ function v({ value: v, onChange: y, placeholder: b = "Select Date", dateFormat: x, pickerType: S = "date", showTime: C, size: w = "md", status: T, width: E = "auto", disabled: D, allowClear: O, hideValue: k, suffixIcon: A, className: j, sx: M, disabledDate: N, disabledTime: P, timeConfig: F, locale: I, startMonth: L, endMonth: R }) {
47
+ let [z, B] = g(!1), [V, H] = g(v || /* @__PURE__ */ new Date()), U = o(w), W = x || l(S, C), G = c(v, W), K = (e) => {
48
+ if (!e) {
49
+ y?.(void 0);
50
+ return;
51
+ }
52
+ let t = e;
53
+ C && v && (t = new Date(e), t.setHours(v.getHours()), t.setMinutes(v.getMinutes()), t.setSeconds(v.getSeconds())), y?.(t), H(t), C || B(!1);
54
+ }, q = (e) => {
55
+ y?.(e);
56
+ }, J = (e) => {
57
+ e.stopPropagation(), y?.(void 0);
58
+ }, Y = () => A || m(S === "time" ? e.Clock : e.CalendarIcon, { className: "xcdlrvm x1l36t39 xbyyjgo" }), X = () => S === "time" ? /* @__PURE__ */ h("div", {
59
+ className: "x7gbtqy",
60
+ children: [/* @__PURE__ */ m(d, {
61
+ value: v,
62
+ onChange: q,
63
+ timeConfig: F,
64
+ disabledTime: Z(v, P)
65
+ }), /* @__PURE__ */ m("div", {
66
+ className: "x1mjqqkp x1b58sdr x178xt8z x13fuv20 xh5ekmr",
67
+ children: /* @__PURE__ */ m(u, {
68
+ value: v,
69
+ onChange: q,
70
+ timeConfig: F
71
+ })
72
+ })]
73
+ }) : S === "month" ? /* @__PURE__ */ m(f, {
74
+ value: v,
75
+ onChange: K,
76
+ disabledDate: N,
77
+ locale: I
78
+ }) : S === "year" ? /* @__PURE__ */ m(p, {
79
+ value: v,
80
+ onChange: K,
81
+ disabledDate: N
82
+ }) : /* @__PURE__ */ h("div", {
83
+ className: "x78zum5",
84
+ children: [/* @__PURE__ */ m(s, {
85
+ mode: "single",
86
+ size: U,
87
+ selected: v,
88
+ onSelect: K,
89
+ disabled: N,
90
+ captionLayout: "dropdown",
91
+ locale: I,
92
+ month: V,
93
+ startMonth: L,
94
+ endMonth: R,
95
+ onMonthChange: H
96
+ }), C && /* @__PURE__ */ m("div", {
97
+ className: "x7gbtqy",
98
+ children: /* @__PURE__ */ m(d, {
99
+ value: v,
100
+ onChange: q,
101
+ timeConfig: F,
102
+ disabledTime: Z(v, P)
103
+ })
104
+ })]
105
+ }), Z = (e, t) => {
106
+ if (!t) return {};
107
+ let n = typeof t == "function" && e ? t(e) : typeof t == "function" ? {} : t;
108
+ return {
109
+ disabledHours: () => n.disabledHours?.() || [],
110
+ disabledMinutes: (e) => n.disabledMinutes?.(e) || [],
111
+ disabledSeconds: (e, t) => n.disabledSeconds?.(e, t) || []
112
+ };
113
+ }, Q = T === "error" ? _.statusError : T === "warning" ? _.statusWarning : void 0, $ = U === "xxs" || U === "xs" ? "xs" : U === "xl" || U === "xxl" ? "lg" : "sm";
114
+ return /* @__PURE__ */ h(r, {
115
+ open: z,
116
+ onOpenChange: B,
117
+ children: [/* @__PURE__ */ m(a, {
118
+ asChild: !0,
119
+ children: /* @__PURE__ */ h(ee, {
120
+ variant: "outline",
121
+ size: U,
122
+ disabled: D,
123
+ width: E,
124
+ sx: [
125
+ _.triggerButton,
126
+ Q,
127
+ E === "auto" ? _.fullWidth : void 0,
128
+ M
129
+ ],
130
+ className: j,
131
+ style: E === "auto" ? void 0 : { width: n(E) },
132
+ children: [!k && G ? /* @__PURE__ */ m(t, {
133
+ size: $,
134
+ weight: "normal",
135
+ children: G
136
+ }) : /* @__PURE__ */ m(t, {
137
+ size: $,
138
+ type: "muted",
139
+ children: b
140
+ }), /* @__PURE__ */ h("div", {
141
+ className: "x8x9d4c x78zum5 x6s0dn4 xvh977a",
142
+ children: [O && v && /* @__PURE__ */ m(t, {
143
+ as: "span",
144
+ onClick: J,
145
+ sx: _.clearButton,
146
+ children: "×"
147
+ }), Y()]
148
+ })]
149
+ })
150
+ }), /* @__PURE__ */ m(i, {
151
+ sx: _.popoverContent,
152
+ align: "start",
153
+ children: X()
154
+ })]
155
+ });
39
156
  }
40
- export { r as buildRangeDisplayValue, a as formatDateValue, i as getDefaultFormat, n as useFormDatePicker };
157
+ export { v as SingleDatePicker, v as default };
package/dist/index228.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index13.cjs"),r=require("./index21.cjs"),i=require("./index24.cjs"),a=require("./index42.cjs"),o=require("./index46.cjs"),s=require("./index47.cjs"),c=require("./index206.cjs"),l=require("./index227.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("@stylexjs/stylex");d=e.__toESM(d,1);let f=require("react/jsx-runtime");var p={triggerButton:{kjj79g:`x1qughib`,k63SB2:`xo1l8bm`,$$css:!0},statusError:{kVAM5u:`x1uwefn5`,$$css:!0},statusWarning:{kVAM5u:`x6j094l`,$$css:!0},fullWidth:{kzqmXN:`xh8yej3`,$$css:!0},popoverContent:{kzqmXN:`x14atkfc`,kmVPX3:`x1717udv`,$$css:!0}};function m({value:e=[void 0,void 0],onChange:d,placeholder:m=`Select Date Range`,dateFormat:h,showTime:g,size:_=`md`,status:v,width:y=`auto`,disabled:b,allowClear:x,hideValue:S,suffixIcon:C,className:w,sx:T,disabledDate:E}){let[D,O]=u.default.useState(!1),k=o.resolveDatePickerSize(_),[A,j]=e,M=h||l.getDefaultFormat(`date`,g),N=l.buildRangeDisplayValue(A,j,M),[P,F]=u.default.useState({from:A,to:j}),[I,L]=u.default.useState(!1);u.default.useEffect(()=>{F({from:A,to:j}),L(!1)},[A,j,D]);let R=e=>{e.stopPropagation(),F({from:void 0,to:void 0}),L(!1),d?.([void 0,void 0])},z=e=>{O(e)},B=e=>{if(!I||!P.from)F({from:e,to:void 0}),L(!0),d?.([e,void 0]);else{let t=P.from,n=e;e<t&&(t=e,n=P.from),F({from:t,to:n}),L(!1),d?.([t,n]),g||O(!1)}},V=v===`error`?p.statusError:v===`warning`?p.statusWarning:void 0,H=k===`xxs`||k===`xs`?`xs`:k===`xl`||k===`xxl`?`lg`:`sm`;return(0,f.jsxs)(a.Popover,{open:D,onOpenChange:z,children:[(0,f.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,f.jsxs)(i.Button,{variant:`outline`,size:k,disabled:b,width:y,sx:[p.triggerButton,V,y===`auto`?p.fullWidth:void 0,T],className:w,style:y===`auto`?void 0:{width:r.resolveWidth(y)},children:[!S&&N?(0,f.jsx)(n.Text,{size:H,weight:`normal`,children:N}):(0,f.jsx)(n.Text,{size:H,type:`muted`,children:m}),(0,f.jsxs)(`div`,{className:`x8x9d4c x78zum5 x6s0dn4 xvh977a`,children:[x&&(A||j)&&(0,f.jsx)(`span`,{onClick:R,className:`x1ypdohk x1mqvv6a`,children:`×`}),C||(0,f.jsx)(t.Icons.CalendarIcon,{className:`xcdlrvm x1l36t39 xbyyjgo`})]})]})}),(0,f.jsx)(a.PopoverContent,{sx:p.popoverContent,align:`start`,children:(0,f.jsx)(s.Calendar,{mode:`range`,size:k,selected:P,onDayClick:B,disabled:E,captionLayout:`dropdown`,hidden:{after:new Date(new Date().getFullYear()+50,11,31)},locale:c.default})})]})}exports.RangeDatePicker=m,exports.default=m;
1
+ const e=require("./index2.cjs"),t=require("./index116.cjs"),n=require("./index221.cjs"),r=require("./index222.cjs"),i=require("./index227.cjs");let a=require("@stylexjs/stylex");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s={formItem:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,$$css:!0}};function c(e){let{control:a,name:c,label:l,placeholder:u,status:d,size:f=`md`,width:p=`auto`,pickerType:m=`date`,dateFormat:h,showTime:g,disabled:_=!1,hideValue:v=!1,allowClear:y=!1,isRangePicker:b=!1,onChangeDate:x,onChangeRange:S,rules:C={},hideErrorMessage:w=!1,suffixIcon:T,className:E,disabledDate:D,disabledTime:O,locale:k,numberOfMonths:A,closeOnSelect:j,startMonth:M,endMonth:N}=e,{dateFormat:P,isRequired:F,processedRules:I,handleRangeChange:L,handleSingleChange:R}=n.useFormDatePicker({pickerType:m,showTime:g,dateFormat:h,rules:C,onChangeDate:x,onChangeRange:S}),z=e=>(0,o.jsx)(r.RangeDatePicker,{value:e.value||[void 0,void 0],onChange:t=>L(e,t),placeholder:u,dateFormat:P,showTime:g,size:f,status:d,width:p,disabled:_,allowClear:y,hideValue:v,suffixIcon:T,className:E,disabledDate:D,locale:k,numberOfMonths:A,closeOnSelect:j,startMonth:M,endMonth:N}),B=e=>(0,o.jsx)(i.SingleDatePicker,{value:e.value,onChange:t=>R(e,t),placeholder:u,pickerType:m,dateFormat:P,showTime:g,size:f,status:d,width:p,disabled:_,allowClear:y,hideValue:v,suffixIcon:T,className:E,disabledDate:D,disabledTime:O,locale:k,startMonth:M,endMonth:N});return(0,o.jsx)(t.FormField,{control:a,name:c,rules:I,render:({field:e})=>(0,o.jsxs)(t.FormItem,{sx:s.formItem,children:[l&&(0,o.jsxs)(t.FormLabel,{children:[l,F&&(0,o.jsx)(`span`,{className:`xuuroe4 x4aigyd`,children:`*`})]}),(0,o.jsx)(t.FormControl,{children:b?z(e):B(e)}),!w&&(0,o.jsx)(t.FormMessage,{})]})})}exports.default=c;