@a-ui/react 7.13.0-beta.7 → 7.13.0-beta.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 (436) hide show
  1. package/cjs/index10.js +1 -1
  2. package/cjs/index100.js +1 -1
  3. package/cjs/index101.js +1 -1
  4. package/cjs/index102.js +1 -1
  5. package/cjs/index103.js +1 -1
  6. package/cjs/index104.js +1 -1
  7. package/cjs/index105.js +1 -1
  8. package/cjs/index106.js +1 -1
  9. package/cjs/index107.js +1 -1
  10. package/cjs/index108.js +1 -1
  11. package/cjs/index109.js +1 -1
  12. package/cjs/index11.js +1 -1
  13. package/cjs/index110.js +1 -1
  14. package/cjs/index111.js +1 -1
  15. package/cjs/index112.js +1 -1
  16. package/cjs/index113.js +1 -1
  17. package/cjs/index114.js +1 -1
  18. package/cjs/index115.js +1 -1
  19. package/cjs/index116.js +1 -1
  20. package/cjs/index117.js +1 -1
  21. package/cjs/index118.js +1 -1
  22. package/cjs/index119.js +1 -1
  23. package/cjs/index12.js +1 -1
  24. package/cjs/index120.js +1 -1
  25. package/cjs/index121.js +1 -1
  26. package/cjs/index122.js +1 -1
  27. package/cjs/index123.js +1 -1
  28. package/cjs/index124.js +1 -1
  29. package/cjs/index125.js +1 -1
  30. package/cjs/index126.js +1 -1
  31. package/cjs/index127.js +1 -1
  32. package/cjs/index128.js +1 -1
  33. package/cjs/index129.js +1 -1
  34. package/cjs/index13.js +1 -1
  35. package/cjs/index130.js +1 -1
  36. package/cjs/index131.js +1 -1
  37. package/cjs/index132.js +1 -1
  38. package/cjs/index133.js +1 -1
  39. package/cjs/index134.js +1 -1
  40. package/cjs/index135.js +1 -1
  41. package/cjs/index136.js +1 -1
  42. package/cjs/index137.js +1 -1
  43. package/cjs/index138.js +1 -5
  44. package/cjs/index139.js +1 -1
  45. package/cjs/index14.js +1 -1
  46. package/cjs/index140.js +1 -1
  47. package/cjs/index141.js +1 -1
  48. package/cjs/index142.js +1 -1
  49. package/cjs/index143.js +1 -1
  50. package/cjs/index144.js +1 -1
  51. package/cjs/index145.js +1 -1
  52. package/cjs/index146.js +1 -1
  53. package/cjs/index147.js +1 -1
  54. package/cjs/index148.js +1 -1
  55. package/cjs/index149.js +1 -1
  56. package/cjs/index150.js +1 -1
  57. package/cjs/index151.js +1 -1
  58. package/cjs/index152.js +1 -1
  59. package/cjs/index153.js +1 -1
  60. package/cjs/index154.js +1 -1
  61. package/cjs/index155.js +1 -1
  62. package/cjs/index156.js +1 -1
  63. package/cjs/index157.js +1 -1
  64. package/cjs/index158.js +1 -1
  65. package/cjs/index159.js +1 -1
  66. package/cjs/index16.js +1 -1
  67. package/cjs/index160.js +1 -1
  68. package/cjs/index161.js +1 -1
  69. package/cjs/index162.js +1 -1
  70. package/cjs/index163.js +1 -1
  71. package/cjs/index164.js +1 -1
  72. package/cjs/index165.js +1 -1
  73. package/cjs/index166.js +1 -1
  74. package/cjs/index167.js +1 -1
  75. package/cjs/index168.js +1 -1
  76. package/cjs/index169.js +1 -1
  77. package/cjs/index17.js +1 -1
  78. package/cjs/index170.js +1 -1
  79. package/cjs/index171.js +1 -1
  80. package/cjs/index172.js +1 -1
  81. package/cjs/index173.js +1 -1
  82. package/cjs/index174.js +1 -1
  83. package/cjs/index175.js +1 -1
  84. package/cjs/index176.js +1 -1
  85. package/cjs/index177.js +1 -1
  86. package/cjs/index178.js +1 -1
  87. package/cjs/index179.js +1 -1
  88. package/cjs/index18.js +1 -1
  89. package/cjs/index180.js +1 -1
  90. package/cjs/index181.js +1 -1
  91. package/cjs/index182.js +1 -1
  92. package/cjs/index183.js +1 -1
  93. package/cjs/index184.js +1 -1
  94. package/cjs/index185.js +1 -1
  95. package/cjs/index186.js +1 -1
  96. package/cjs/index187.js +1 -1
  97. package/cjs/index188.js +1 -1
  98. package/cjs/index189.js +1 -1
  99. package/cjs/index190.js +1 -1
  100. package/cjs/index191.js +1 -1
  101. package/cjs/index192.js +1 -1
  102. package/cjs/index193.js +1 -1
  103. package/cjs/index194.js +1 -1
  104. package/cjs/index195.js +1 -1
  105. package/cjs/index196.js +2 -1
  106. package/cjs/index197.js +1 -1
  107. package/cjs/index198.js +1 -1
  108. package/cjs/index199.js +1 -1
  109. package/cjs/index2.js +1 -1
  110. package/cjs/index20.js +1 -1
  111. package/cjs/index200.js +1 -1
  112. package/cjs/index201.js +10 -1
  113. package/cjs/index202.js +1 -1
  114. package/cjs/index203.js +1 -1
  115. package/cjs/index204.js +1 -1
  116. package/cjs/index205.js +1 -1
  117. package/cjs/index206.js +1 -1
  118. package/cjs/index207.js +1 -1
  119. package/cjs/index208.js +5 -2
  120. package/cjs/index209.js +9 -1
  121. package/cjs/index21.js +1 -1
  122. package/cjs/index210.js +1 -1
  123. package/cjs/index211.js +1 -1
  124. package/cjs/index212.js +1 -1
  125. package/cjs/index213.js +1 -10
  126. package/cjs/index214.js +1 -1
  127. package/cjs/index215.js +1 -1
  128. package/cjs/index216.js +1 -1
  129. package/cjs/index217.js +1 -1
  130. package/cjs/index218.js +1 -1
  131. package/cjs/index219.js +1 -1
  132. package/cjs/index22.js +1 -1
  133. package/cjs/index220.js +1 -5
  134. package/cjs/index221.js +1 -9
  135. package/cjs/index223.js +1 -1
  136. package/cjs/index224.js +1 -1
  137. package/cjs/index229.js +1 -1
  138. package/cjs/index233.js +1 -1
  139. package/cjs/index235.js +1 -1
  140. package/cjs/index24.js +1 -1
  141. package/cjs/index25.js +1 -1
  142. package/cjs/index26.js +1 -1
  143. package/cjs/index27.js +1 -1
  144. package/cjs/index28.js +1 -1
  145. package/cjs/index3.js +1 -1
  146. package/cjs/index30.js +1 -1
  147. package/cjs/index31.js +1 -1
  148. package/cjs/index32.js +1 -1
  149. package/cjs/index33.js +1 -1
  150. package/cjs/index34.js +1 -1
  151. package/cjs/index36.js +1 -1
  152. package/cjs/index37.js +1 -1
  153. package/cjs/index38.js +1 -1
  154. package/cjs/index39.js +1 -1
  155. package/cjs/index4.js +1 -1
  156. package/cjs/index40.js +1 -1
  157. package/cjs/index41.js +1 -1
  158. package/cjs/index42.js +1 -1
  159. package/cjs/index43.js +1 -1
  160. package/cjs/index44.js +1 -1
  161. package/cjs/index45.js +1 -1
  162. package/cjs/index46.js +1 -1
  163. package/cjs/index47.js +1 -1
  164. package/cjs/index48.js +1 -1
  165. package/cjs/index49.js +1 -1
  166. package/cjs/index50.js +1 -1
  167. package/cjs/index51.js +7 -1
  168. package/cjs/index52.js +1 -1
  169. package/cjs/index54.js +1 -1
  170. package/cjs/index55.js +1 -1
  171. package/cjs/index56.js +1 -0
  172. package/cjs/index57.js +1 -1
  173. package/cjs/index58.js +1 -1
  174. package/cjs/index59.js +1 -1
  175. package/cjs/index6.js +1 -1
  176. package/cjs/index60.js +1 -1
  177. package/cjs/index61.js +1 -1
  178. package/cjs/index62.js +1 -1
  179. package/cjs/index63.js +1 -1
  180. package/cjs/index64.js +1 -1
  181. package/cjs/index65.js +1 -1
  182. package/cjs/index66.js +1 -1
  183. package/cjs/index67.js +1 -1
  184. package/cjs/index68.js +1 -1
  185. package/cjs/index69.js +1 -1
  186. package/cjs/index70.js +1 -1
  187. package/cjs/index71.js +1 -1
  188. package/cjs/index72.js +1 -1
  189. package/cjs/index73.js +1 -1
  190. package/cjs/index74.js +1 -1
  191. package/cjs/index75.js +1 -0
  192. package/cjs/index76.js +1 -1
  193. package/cjs/index77.js +1 -1
  194. package/cjs/index78.js +1 -1
  195. package/cjs/index79.js +1 -7
  196. package/cjs/index8.js +1 -1
  197. package/cjs/index80.js +1 -0
  198. package/cjs/index81.js +1 -0
  199. package/cjs/index82.js +1 -1
  200. package/cjs/index83.js +1 -1
  201. package/cjs/index84.js +1 -1
  202. package/cjs/index85.js +1 -1
  203. package/cjs/index86.js +1 -0
  204. package/cjs/index87.js +1 -1
  205. package/cjs/index88.js +1 -1
  206. package/cjs/index89.js +1 -1
  207. package/cjs/index9.js +1 -1
  208. package/cjs/index90.js +1 -1
  209. package/cjs/index91.js +5 -1
  210. package/cjs/index92.js +1 -1
  211. package/cjs/index93.js +1 -1
  212. package/cjs/index94.js +1 -1
  213. package/cjs/index95.js +1 -1
  214. package/cjs/index96.js +1 -1
  215. package/cjs/index97.js +1 -1
  216. package/cjs/index98.js +1 -1
  217. package/cjs/index99.js +1 -1
  218. package/es/index10.mjs +4 -4
  219. package/es/index100.mjs +6 -5
  220. package/es/index101.mjs +5 -4
  221. package/es/index102.mjs +5 -6
  222. package/es/index103.mjs +4 -4
  223. package/es/index104.mjs +4 -4
  224. package/es/index105.mjs +6 -4
  225. package/es/index106.mjs +5 -7
  226. package/es/index107.mjs +66 -12
  227. package/es/index108.mjs +3 -16
  228. package/es/index109.mjs +4 -8
  229. package/es/index11.mjs +1 -1
  230. package/es/index110.mjs +10 -5
  231. package/es/index111.mjs +4 -5
  232. package/es/index112.mjs +4 -4
  233. package/es/index113.mjs +7 -513
  234. package/es/index114.mjs +13 -50
  235. package/es/index115.mjs +15 -17
  236. package/es/index116.mjs +9 -18
  237. package/es/index117.mjs +5 -4
  238. package/es/index118.mjs +5 -7
  239. package/es/index119.mjs +4 -5
  240. package/es/index12.mjs +14 -14
  241. package/es/index120.mjs +512 -4
  242. package/es/index121.mjs +50 -6
  243. package/es/index122.mjs +17 -8
  244. package/es/index123.mjs +18 -5
  245. package/es/index124.mjs +4 -7
  246. package/es/index125.mjs +7 -11
  247. package/es/index126.mjs +5 -8
  248. package/es/index127.mjs +4 -8
  249. package/es/index128.mjs +5 -12
  250. package/es/index129.mjs +8 -3
  251. package/es/index13.mjs +2 -2
  252. package/es/index130.mjs +4 -32
  253. package/es/index131.mjs +8 -65
  254. package/es/index132.mjs +11 -7
  255. package/es/index133.mjs +8 -7
  256. package/es/index134.mjs +8 -6
  257. package/es/index135.mjs +12 -6
  258. package/es/index136.mjs +3 -13
  259. package/es/index137.mjs +24 -389
  260. package/es/index138.mjs +65 -40
  261. package/es/index139.mjs +8 -57
  262. package/es/index14.mjs +3 -3
  263. package/es/index140.mjs +7 -21
  264. package/es/index141.mjs +6 -40
  265. package/es/index142.mjs +6 -60
  266. package/es/index143.mjs +13 -31
  267. package/es/index144.mjs +2 -13
  268. package/es/index145.mjs +232 -59
  269. package/es/index146.mjs +2 -62
  270. package/es/index147.mjs +54 -60
  271. package/es/index148.mjs +17 -58
  272. package/es/index149.mjs +33 -32
  273. package/es/index150.mjs +44 -24
  274. package/es/index151.mjs +19 -40
  275. package/es/index152.mjs +10 -40
  276. package/es/index153.mjs +49 -24
  277. package/es/index154.mjs +39 -43
  278. package/es/index155.mjs +50 -53
  279. package/es/index156.mjs +40 -68
  280. package/es/index157.mjs +35 -36
  281. package/es/index158.mjs +36 -36
  282. package/es/index159.mjs +47 -35
  283. package/es/index16.mjs +1 -1
  284. package/es/index160.mjs +37 -19
  285. package/es/index161.mjs +31 -18
  286. package/es/index162.mjs +60 -18
  287. package/es/index163.mjs +60 -19
  288. package/es/index164.mjs +85 -18
  289. package/es/index165.mjs +36 -19
  290. package/es/index166.mjs +38 -11
  291. package/es/index167.mjs +36 -35
  292. package/es/index168.mjs +20 -35
  293. package/es/index169.mjs +21 -11
  294. package/es/index17.mjs +4 -4
  295. package/es/index170.mjs +21 -11
  296. package/es/index171.mjs +24 -23
  297. package/es/index172.mjs +24 -2
  298. package/es/index173.mjs +21 -232
  299. package/es/index174.mjs +14 -2
  300. package/es/index175.mjs +40 -2
  301. package/es/index176.mjs +37 -388
  302. package/es/index177.mjs +12 -123
  303. package/es/index178.mjs +11 -131
  304. package/es/index179.mjs +11 -68
  305. package/es/index18.mjs +8 -8
  306. package/es/index180.mjs +247 -31
  307. package/es/index181.mjs +89 -9
  308. package/es/index182.mjs +15 -155
  309. package/es/index183.mjs +4 -108
  310. package/es/index184.mjs +2 -20
  311. package/es/index185.mjs +2 -101
  312. package/es/index186.mjs +67 -46
  313. package/es/index187.mjs +31 -11
  314. package/es/index188.mjs +9 -247
  315. package/es/index189.mjs +150 -86
  316. package/es/index190.mjs +110 -15
  317. package/es/index191.mjs +20 -4
  318. package/es/index192.mjs +101 -2
  319. package/es/index193.mjs +47 -2
  320. package/es/index194.mjs +2 -59
  321. package/es/index195.mjs +7 -8
  322. package/es/index196.mjs +325 -18
  323. package/es/index197.mjs +49 -67
  324. package/es/index198.mjs +2 -31
  325. package/es/index199.mjs +65 -9
  326. package/es/index2.mjs +1 -1
  327. package/es/index20.mjs +2 -2
  328. package/es/index200.mjs +42 -107
  329. package/es/index201.mjs +58 -105
  330. package/es/index202.mjs +45 -8
  331. package/es/index203.mjs +39 -15
  332. package/es/index204.mjs +2 -29
  333. package/es/index205.mjs +2 -13
  334. package/es/index206.mjs +2 -2
  335. package/es/index207.mjs +30 -7
  336. package/es/index208.mjs +18 -326
  337. package/es/index209.mjs +57 -46
  338. package/es/index21.mjs +1 -1
  339. package/es/index210.mjs +68 -2
  340. package/es/index211.mjs +31 -65
  341. package/es/index212.mjs +9 -43
  342. package/es/index213.mjs +106 -58
  343. package/es/index214.mjs +109 -46
  344. package/es/index215.mjs +55 -36
  345. package/es/index216.mjs +9 -2
  346. package/es/index217.mjs +20 -2
  347. package/es/index218.mjs +7 -2
  348. package/es/index219.mjs +13 -28
  349. package/es/index22.mjs +1 -1
  350. package/es/index220.mjs +29 -19
  351. package/es/index221.mjs +12 -60
  352. package/es/index223.mjs +1 -1
  353. package/es/index224.mjs +1 -1
  354. package/es/index229.mjs +1 -1
  355. package/es/index233.mjs +2 -2
  356. package/es/index234.mjs +2 -2
  357. package/es/index235.mjs +2 -2
  358. package/es/index24.mjs +4 -4
  359. package/es/index25.mjs +2 -2
  360. package/es/index26.mjs +1 -1
  361. package/es/index27.mjs +1 -1
  362. package/es/index28.mjs +1 -1
  363. package/es/index3.mjs +1 -1
  364. package/es/index30.mjs +31 -31
  365. package/es/index31.mjs +2 -2
  366. package/es/index32.mjs +2 -2
  367. package/es/index33.mjs +3 -3
  368. package/es/index34.mjs +1 -1
  369. package/es/index36.mjs +3 -3
  370. package/es/index37.mjs +3 -3
  371. package/es/index38.mjs +3 -3
  372. package/es/index39.mjs +3 -3
  373. package/es/index4.mjs +2 -2
  374. package/es/index40.mjs +2 -2
  375. package/es/index41.mjs +1 -1
  376. package/es/index42.mjs +4 -4
  377. package/es/index43.mjs +1 -1
  378. package/es/index44.mjs +2 -2
  379. package/es/index45.mjs +3 -3
  380. package/es/index46.mjs +3 -3
  381. package/es/index47.mjs +2 -2
  382. package/es/index48.mjs +1 -1
  383. package/es/index49.mjs +2 -2
  384. package/es/index50.mjs +1 -1
  385. package/es/index51.mjs +407 -6
  386. package/es/index52.mjs +11 -49
  387. package/es/index54.mjs +47 -6
  388. package/es/index55.mjs +8 -47
  389. package/es/index56.mjs +30 -0
  390. package/es/index57.mjs +8 -2
  391. package/es/index58.mjs +11 -74
  392. package/es/index59.mjs +21 -11
  393. package/es/index6.mjs +3 -3
  394. package/es/index60.mjs +30 -29
  395. package/es/index61.mjs +12 -34
  396. package/es/index62.mjs +58 -3
  397. package/es/index63.mjs +47 -35
  398. package/es/index64.mjs +58 -4
  399. package/es/index65.mjs +61 -4
  400. package/es/index66.mjs +59 -4
  401. package/es/index67.mjs +28 -4
  402. package/es/index68.mjs +2 -5
  403. package/es/index69.mjs +72 -15
  404. package/es/index70.mjs +27 -27
  405. package/es/index71.mjs +35 -84
  406. package/es/index72.mjs +3 -5
  407. package/es/index73.mjs +32 -22
  408. package/es/index74.mjs +4 -54
  409. package/es/index75.mjs +7 -0
  410. package/es/index76.mjs +4 -4
  411. package/es/index77.mjs +4 -118
  412. package/es/index78.mjs +4 -20
  413. package/es/index79.mjs +16 -408
  414. package/es/index8.mjs +3 -3
  415. package/es/index80.mjs +87 -0
  416. package/es/index81.mjs +8 -0
  417. package/es/index82.mjs +24 -16
  418. package/es/index83.mjs +55 -30
  419. package/es/index84.mjs +24 -13
  420. package/es/index85.mjs +4 -58
  421. package/es/index86.mjs +121 -0
  422. package/es/index87.mjs +17 -62
  423. package/es/index88.mjs +117 -58
  424. package/es/index89.mjs +5 -5
  425. package/es/index9.mjs +1 -1
  426. package/es/index90.mjs +390 -59
  427. package/es/index91.mjs +40 -3
  428. package/es/index92.mjs +23 -4
  429. package/es/index93.mjs +2 -11
  430. package/es/index94.mjs +390 -4
  431. package/es/index95.mjs +124 -62
  432. package/es/index96.mjs +133 -13
  433. package/es/index97.mjs +62 -6
  434. package/es/index98.mjs +13 -6
  435. package/es/index99.mjs +6 -5
  436. package/package.json +1 -1
package/es/index68.mjs CHANGED
@@ -1,7 +1,4 @@
1
- import { addMonths as n } from "./index69.mjs";
2
- function m(o, r, t) {
3
- return n(o, -1, t);
4
- }
1
+ var r = /* @__PURE__ */ ((S) => (S.DAYS = "d", S.MONTHS = "m", S.YEARS = "y", S))(r || {});
5
2
  export {
6
- m as subMonths
3
+ r as CalendarView
7
4
  };
package/es/index69.mjs CHANGED
@@ -1,19 +1,76 @@
1
- import { constructFrom as s } from "./index104.mjs";
2
- import { toDate as a } from "./index105.mjs";
3
- function M(n, o, i) {
4
- const t = a(n, i?.in);
5
- if (isNaN(o)) return s(n, NaN);
6
- if (!o)
1
+ import { jsx as r, jsxs as M } from "react/jsx-runtime";
2
+ import { DayButton as b } from "./index97.mjs";
3
+ import { titleize as l } from "./index72.mjs";
4
+ import { useState as B } from "react";
5
+ import { isBetween as N } from "./index73.mjs";
6
+ import { eachDayOfInterval as $ } from "./index98.mjs";
7
+ import { endOfWeek as u } from "./index99.mjs";
8
+ import { startOfWeek as d } from "./index100.mjs";
9
+ import { format as k } from "./index83.mjs";
10
+ import { startOfMonth as j } from "./index101.mjs";
11
+ import { endOfMonth as V } from "./index102.mjs";
12
+ import { isValid as s } from "./index81.mjs";
13
+ import { isAfter as E } from "./index103.mjs";
14
+ import { addWeeks as z } from "./index104.mjs";
15
+ import { addDays as A } from "./index105.mjs";
16
+ function Z({
17
+ value: w,
18
+ onChange: y,
19
+ activeMonth: m,
20
+ activeYear: a,
21
+ ariaLabelCurrentDay: D,
22
+ locale: n,
23
+ unavailableFrom: O,
24
+ unavailableTo: S,
25
+ highlight: _,
26
+ unavailable: g,
27
+ hoverStart: f
28
+ }) {
29
+ const [c, p] = B(null), W = (t) => {
30
+ const o = [];
31
+ let e = d(t, { locale: n });
32
+ const i = u(t, { locale: n });
33
+ for (; s(e) && !E(e, i); ) {
34
+ let h = !1;
35
+ const I = new Date(a, m);
36
+ f && c && (h = N(e, f, c.toISOString())), o.push(
37
+ /* @__PURE__ */ r(
38
+ b,
39
+ {
40
+ ariaLabelCurrentDay: D,
41
+ unavailableFrom: O,
42
+ unavailableTo: S,
43
+ unavailable: g,
44
+ date: e,
45
+ hoverStyle: h,
46
+ highlight: _,
47
+ value: w,
48
+ monthYear: I,
49
+ onChange: y,
50
+ onMouseEnter: p,
51
+ onMouseLeave: () => p(null)
52
+ },
53
+ `day_${s(e) ? e.toISOString() : "invalid"}`
54
+ )
55
+ ), e = A(e, 1);
56
+ }
57
+ return /* @__PURE__ */ r("tr", { children: o }, `aui-calendar-week-${e.toISOString()}`);
58
+ }, v = () => {
59
+ const t = [], o = new Date(a, m);
60
+ let e = d(j(o), { locale: n });
61
+ const i = V(o);
62
+ for (; s(e) && !E(e, i); )
63
+ t.push(W(e)), e = z(e, 1);
7
64
  return t;
8
- const r = t.getDate(), e = s(n, t.getTime());
9
- e.setMonth(t.getMonth() + o + 1, 0);
10
- const f = e.getDate();
11
- return r >= f ? e : (t.setFullYear(
12
- e.getFullYear(),
13
- e.getMonth(),
14
- r
15
- ), t);
65
+ }, x = $({
66
+ start: d(/* @__PURE__ */ new Date(), { locale: n }),
67
+ end: u(/* @__PURE__ */ new Date(), { locale: n })
68
+ });
69
+ return /* @__PURE__ */ r("div", { className: "m-datepicker__grid", children: /* @__PURE__ */ M("table", { children: [
70
+ /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { className: "m-datepicker__grid-head", children: x.map((t) => /* @__PURE__ */ r("th", { scope: "col", children: /* @__PURE__ */ r("span", { title: l(k(t, "EEEE", { locale: n })), children: l(k(t, "EEEEEE", { locale: n })) }) }, `aui-calendar-weekday-${t}`)) }) }),
71
+ /* @__PURE__ */ r("tbody", { className: "m-datepicker__grid-body", children: v() })
72
+ ] }) });
16
73
  }
17
74
  export {
18
- M as addMonths
75
+ Z as DaysView
19
76
  };
package/es/index70.mjs CHANGED
@@ -1,31 +1,31 @@
1
- import { useRef as u, useEffect as s, useState as i } from "react";
2
- import { isScrollAtTheEnd as a } from "./index51.mjs";
3
- function E() {
4
- const [l, r] = i(!0), [n, o] = i(!0), t = u(null), c = (e) => {
5
- r(e.scrollLeft <= 0), o(a(e));
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import { classNames as h } from "./index55.mjs";
3
+ import { titleize as f } from "./index72.mjs";
4
+ import { DEFAULT_LOCALE as u } from "./index58.mjs";
5
+ import { getMonth as c } from "./index75.mjs";
6
+ import { getYear as m } from "./index74.mjs";
7
+ import { format as M } from "./index83.mjs";
8
+ function L({ onChange: d, value: o, activeYear: n, locale: l = u }) {
9
+ const s = (e) => {
10
+ const r = !!(o && e === c(o) && n === m(o)), a = h({
11
+ "is-current": e === c(/* @__PURE__ */ new Date()) && n === m(/* @__PURE__ */ new Date()),
12
+ "is-selected": r
13
+ }), i = new Date(n, e);
14
+ return /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("button", { type: "button", className: a, onClick: () => d(i), children: f(M(i, "MMMM", { locale: l })) }) });
6
15
  };
7
- return s(() => {
8
- const e = t.current;
9
- e && c(e);
10
- }, [t]), s(() => {
11
- function e() {
12
- t.current && c(t.current);
13
- }
14
- return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
15
- }, []), [t, (e) => {
16
- const d = e.target;
17
- c(d);
18
- }, l, n];
19
- }
20
- function m(l) {
21
- const r = u(null), n = (o) => {
22
- r?.current?.contains(o?.target) || l(o?.target);
23
- };
24
- return s(() => (window.addEventListener("click", n), () => {
25
- window.removeEventListener("click", n);
26
- })), { elementRef: r };
16
+ return /* @__PURE__ */ t("div", { className: "m-datepicker__list", children: /* @__PURE__ */ t("table", { children: /* @__PURE__ */ t("tbody", { className: "m-datepicker__list-body", children: (() => {
17
+ let e = 0;
18
+ const r = [];
19
+ for (; e < 12; )
20
+ r.push(
21
+ /* @__PURE__ */ p("tr", { children: [
22
+ s(e),
23
+ s(e + 1)
24
+ ] }, `aui-calendar-month-pair-${e}`)
25
+ ), e += 2;
26
+ return r;
27
+ })() }) }) });
27
28
  }
28
29
  export {
29
- E as useHorizontalScroll,
30
- m as useOutsideClick
30
+ L as MonthsView
31
31
  };
package/es/index71.mjs CHANGED
@@ -1,87 +1,38 @@
1
- import { longFormatters as y } from "./index114.mjs";
2
- import { isProtectedWeekYearToken as b, warnOrThrowProtectedError as E, isProtectedDayOfYearToken as C } from "./index115.mjs";
3
- import { constructFrom as D } from "./index104.mjs";
4
- import { getDefaultOptions as F } from "./index120.mjs";
5
- import { toDate as O } from "./index105.mjs";
6
- import { DateTimezoneSetter as $ } from "./index130.mjs";
7
- import { parsers as A } from "./index131.mjs";
8
- import { enUS as W } from "./index116.mjs";
9
- const N = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, L = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Y = /^'([^]*?)'?$/, j = /''/g, q = /\S/, v = /[a-zA-Z]/;
10
- function G(n, a, c, f) {
11
- const r = () => D(c, NaN), i = F(), l = i.locale ?? W, d = i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, R = i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0;
12
- if (!a)
13
- return n ? r() : O(c, f?.in);
14
- const m = {
15
- firstWeekContainsDate: d,
16
- weekStartsOn: R,
17
- locale: l
18
- }, p = [new $(f?.in, c)], x = a.match(L).map((t) => {
19
- const e = t[0];
20
- if (e in y) {
21
- const o = y[e];
22
- return o(t, l.formatLong);
23
- }
24
- return t;
25
- }).join("").match(N), u = [];
26
- for (let t of x) {
27
- b(t) && E(t, a, n), C(t) && E(t, a, n);
28
- const e = t[0], o = A[e];
29
- if (o) {
30
- const { incompatibleTokens: k } = o;
31
- if (Array.isArray(k)) {
32
- const w = u.find(
33
- (T) => k.includes(T.token) || T.token === e
34
- );
35
- if (w)
36
- throw new RangeError(
37
- `The format string mustn't contain \`${w.fullToken}\` and \`${t}\` at the same time`
38
- );
39
- } else if (o.incompatibleTokens === "*" && u.length > 0)
40
- throw new RangeError(
41
- `The format string mustn't contain \`${t}\` and any other token at the same time`
42
- );
43
- u.push({ token: e, fullToken: t });
44
- const g = o.run(
45
- n,
46
- t,
47
- l.match,
48
- m
49
- );
50
- if (!g)
51
- return r();
52
- p.push(g.setter), n = g.rest;
53
- } else {
54
- if (e.match(v))
55
- throw new RangeError(
56
- "Format string contains an unescaped latin alphabet character `" + e + "`"
57
- );
58
- if (t === "''" ? t = "'" : e === "'" && (t = z(t)), n.indexOf(t) === 0)
59
- n = n.slice(t.length);
60
- else
61
- return r();
62
- }
63
- }
64
- if (n.length > 0 && q.test(n))
65
- return r();
66
- const P = p.map((t) => t.priority).sort((t, e) => e - t).filter((t, e, o) => o.indexOf(t) === e).map(
67
- (t) => p.filter((e) => e.priority === t).sort((e, o) => o.subPriority - e.subPriority)
68
- ).map((t) => t[0]);
69
- let s = O(c, f?.in);
70
- if (isNaN(+s)) return r();
71
- const h = {};
72
- for (const t of P) {
73
- if (!t.validate(s, m))
74
- return r();
75
- const e = t.set(s, h, m);
76
- Array.isArray(e) ? (s = e[0], Object.assign(h, e[1])) : s = e;
77
- }
78
- return s;
79
- }
80
- function z(n) {
81
- return n.match(Y)[1].replace(j, "'");
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import { classNames as l } from "./index55.mjs";
3
+ import { getYear as c } from "./index74.mjs";
4
+ import { format as a } from "./index83.mjs";
5
+ import { getDate as p } from "./index106.mjs";
6
+ function D({ yearsRowsStart: s, value: t, activeMonth: o, onChange: d }) {
7
+ const i = (e) => {
8
+ const n = l({
9
+ "is-current": e === c(/* @__PURE__ */ new Date()),
10
+ "is-selected": !!(t && e === c(new Date(t)))
11
+ });
12
+ return /* @__PURE__ */ r("td", { children: /* @__PURE__ */ r(
13
+ "button",
14
+ {
15
+ type: "button",
16
+ className: n,
17
+ onClick: () => d(new Date(e, o, t ? p(t) : 1)),
18
+ children: a(new Date(e, o), "yyyy")
19
+ }
20
+ ) });
21
+ };
22
+ return /* @__PURE__ */ r("div", { className: "m-datepicker__list", children: /* @__PURE__ */ r("table", { children: /* @__PURE__ */ r("tbody", { className: "m-datepicker__list-body", children: (() => {
23
+ let e = 0;
24
+ const n = [];
25
+ for (; e < 16; )
26
+ n.push(
27
+ /* @__PURE__ */ m("tr", { children: [
28
+ i(s + e),
29
+ i(s + e + 1),
30
+ i(s + e + 2)
31
+ ] }, `aui-calendar-years-${e}`)
32
+ ), e += 3;
33
+ return n;
34
+ })() }) }) });
82
35
  }
83
36
  export {
84
- y as longFormatters,
85
- G as parse,
86
- A as parsers
37
+ D as YearsView
87
38
  };
package/es/index72.mjs CHANGED
@@ -1,8 +1,6 @@
1
- import { isDate as r } from "./index129.mjs";
2
- import { toDate as i } from "./index105.mjs";
3
- function e(o) {
4
- return !(!r(o) && typeof o != "number" || isNaN(+i(o)));
1
+ function t(e) {
2
+ return e.charAt(0).toUpperCase() + e.slice(1);
5
3
  }
6
4
  export {
7
- e as isValid
5
+ t as titleize
8
6
  };
package/es/index73.mjs CHANGED
@@ -1,27 +1,37 @@
1
- import { addLeadingZeros as e } from "./index117.mjs";
2
- import { toDate as O } from "./index105.mjs";
3
- function y(f, m) {
4
- const t = O(f, m?.in);
5
- if (isNaN(+t))
6
- throw new RangeError("Invalid time value");
7
- let o = "", s = "";
8
- const i = "-", u = ":";
9
- {
10
- const n = e(t.getDate(), 2), r = e(t.getMonth() + 1, 2);
11
- o = `${e(t.getFullYear(), 4)}${i}${r}${i}${n}`;
1
+ import "./index107.mjs";
2
+ import { tz as f } from "./index108.mjs";
3
+ import { TIMEZONE as m } from "./index58.mjs";
4
+ import { format as s } from "./index83.mjs";
5
+ import { isBefore as a } from "./index109.mjs";
6
+ import { isSameDay as o } from "./index110.mjs";
7
+ import { isAfter as u } from "./index103.mjs";
8
+ function S(t, e, r, n) {
9
+ return r && (a(t, new Date(r)) || o(t, new Date(r))) || e && (u(t, new Date(e)) || o(t, new Date(e))) || !!n?.find((i) => o(t, new Date(i)));
10
+ }
11
+ function h(t, e, r) {
12
+ return u(t, new Date(e)) && a(t, new Date(r));
13
+ }
14
+ function O(t, e) {
15
+ try {
16
+ return s(new Date(t), e);
17
+ } catch {
18
+ return t;
12
19
  }
13
- {
14
- const n = t.getTimezoneOffset();
15
- if (n !== 0) {
16
- const c = Math.abs(n), d = e(Math.trunc(c / 60), 2), h = e(c % 60, 2);
17
- s = `${n < 0 ? "+" : "-"}${d}:${h}`;
18
- } else
19
- s = "Z";
20
- const r = e(t.getHours(), 2), a = e(t.getMinutes(), 2), $ = e(t.getSeconds(), 2), g = o === "" ? "" : "T", l = [r, a, $].join(u);
21
- o = `${o}${g}${l}${s}`;
20
+ }
21
+ function g(t, e, r, n = "") {
22
+ try {
23
+ return s(t, e, { locale: r });
24
+ } catch {
25
+ return n;
22
26
  }
23
- return o;
27
+ }
28
+ function y(t, e, r) {
29
+ return f(m)(new Date(Date.UTC(t, e, r, 0, 0, 0))).toISOString();
24
30
  }
25
31
  export {
26
- y as formatISO
32
+ O as formatIfValid,
33
+ g as formatWithFallback,
34
+ h as isBetween,
35
+ S as isInRange,
36
+ y as toUtcMidnightInBrussels
27
37
  };
package/es/index74.mjs CHANGED
@@ -1,57 +1,7 @@
1
- import { getDefaultOptions as u } from "./index112.mjs";
2
- import { formatters as f } from "./index113.mjs";
3
- import { longFormatters as d } from "./index114.mjs";
4
- import { isProtectedWeekYearToken as g, isProtectedDayOfYearToken as h, warnOrThrowProtectedError as w } from "./index115.mjs";
5
- import { isValid as D } from "./index72.mjs";
6
- import { toDate as T } from "./index105.mjs";
7
- import { enUS as O } from "./index116.mjs";
8
- const E = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, v = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, C = /^'([^]*?)'?$/, S = /''/g, R = /[a-zA-Z]/;
9
- function L(o, a, r) {
10
- const n = u(), i = r?.locale ?? n.locale ?? O, m = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, p = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = T(o, r?.in);
11
- if (!D(s))
12
- throw new RangeError("Invalid time value");
13
- let c = a.match(v).map((t) => {
14
- const e = t[0];
15
- if (e === "p" || e === "P") {
16
- const l = d[e];
17
- return l(t, i.formatLong);
18
- }
19
- return t;
20
- }).join("").match(E).map((t) => {
21
- if (t === "''")
22
- return { isToken: !1, value: "'" };
23
- const e = t[0];
24
- if (e === "'")
25
- return { isToken: !1, value: W(t) };
26
- if (f[e])
27
- return { isToken: !0, value: t };
28
- if (e.match(R))
29
- throw new RangeError(
30
- "Format string contains an unescaped latin alphabet character `" + e + "`"
31
- );
32
- return { isToken: !1, value: t };
33
- });
34
- i.localize.preprocessor && (c = i.localize.preprocessor(s, c));
35
- const k = {
36
- firstWeekContainsDate: m,
37
- weekStartsOn: p,
38
- locale: i
39
- };
40
- return c.map((t) => {
41
- if (!t.isToken) return t.value;
42
- const e = t.value;
43
- (!r?.useAdditionalWeekYearTokens && g(e) || !r?.useAdditionalDayOfYearTokens && h(e)) && w(e, a, String(o));
44
- const l = f[e[0]];
45
- return l(s, e, i.localize, k);
46
- }).join("");
47
- }
48
- function W(o) {
49
- const a = o.match(C);
50
- return a ? a[1].replace(S, "'") : o;
1
+ import { toDate as r } from "./index112.mjs";
2
+ function n(t, e) {
3
+ return r(t, e?.in).getFullYear();
51
4
  }
52
5
  export {
53
- L as format,
54
- L as formatDate,
55
- f as formatters,
56
- d as longFormatters
6
+ n as getYear
57
7
  };
package/es/index75.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { toDate as n } from "./index112.mjs";
2
+ function r(t, o) {
3
+ return n(t, o?.in).getMonth();
4
+ }
5
+ export {
6
+ r as getMonth
7
+ };
package/es/index76.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { addDays as t } from "./index102.mjs";
2
- function u(o, a, r) {
3
- return t(o, -1, r);
1
+ import { addYears as t } from "./index77.mjs";
2
+ function n(r, a, o) {
3
+ return t(r, -1, o);
4
4
  }
5
5
  export {
6
- u as subDays
6
+ n as subYears
7
7
  };
package/es/index77.mjs CHANGED
@@ -1,121 +1,7 @@
1
- import { millisecondsInHour as p, millisecondsInMinute as N } from "./index106.mjs";
2
- import { constructFrom as T } from "./index104.mjs";
3
- import { toDate as D } from "./index105.mjs";
4
- function v(t, e) {
5
- const n = () => T(e?.in, NaN), i = I(t);
6
- let s;
7
- if (i.date) {
8
- const a = x(i.date, 2);
9
- s = Y(a.restDateString, a.year);
10
- }
11
- if (!s || isNaN(+s)) return n();
12
- const u = +s;
13
- let o = 0, c;
14
- if (i.time && (o = w(i.time), isNaN(o)))
15
- return n();
16
- if (i.timezone) {
17
- if (c = y(i.timezone), isNaN(c)) return n();
18
- } else {
19
- const a = new Date(u + o), d = D(0, e?.in);
20
- return d.setFullYear(
21
- a.getUTCFullYear(),
22
- a.getUTCMonth(),
23
- a.getUTCDate()
24
- ), d.setHours(
25
- a.getUTCHours(),
26
- a.getUTCMinutes(),
27
- a.getUTCSeconds(),
28
- a.getUTCMilliseconds()
29
- ), d;
30
- }
31
- return D(u + o + c, e?.in);
32
- }
33
- const f = {
34
- dateTimeDelimiter: /[T ]/,
35
- timeZoneDelimiter: /[Z ]/i,
36
- timezone: /([Z+-].*)$/
37
- }, U = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, h = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, C = /^([+-])(\d{2})(?::?(\d{2}))?$/;
38
- function I(t) {
39
- const e = {}, n = t.split(f.dateTimeDelimiter);
40
- let r;
41
- if (n.length > 2)
42
- return e;
43
- if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1], f.timeZoneDelimiter.test(e.date) && (e.date = t.split(f.timeZoneDelimiter)[0], r = t.substr(
44
- e.date.length,
45
- t.length
46
- ))), r) {
47
- const i = f.timezone.exec(r);
48
- i ? (e.time = r.replace(i[1], ""), e.timezone = i[1]) : e.time = r;
49
- }
50
- return e;
51
- }
52
- function x(t, e) {
53
- const n = new RegExp(
54
- "^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
55
- ), r = t.match(n);
56
- if (!r) return { year: NaN, restDateString: "" };
57
- const i = r[1] ? parseInt(r[1]) : null, s = r[2] ? parseInt(r[2]) : null;
58
- return {
59
- year: s === null ? i : s * 100,
60
- restDateString: t.slice((r[1] || r[2]).length)
61
- };
62
- }
63
- function Y(t, e) {
64
- if (e === null) return /* @__PURE__ */ new Date(NaN);
65
- const n = t.match(U);
66
- if (!n) return /* @__PURE__ */ new Date(NaN);
67
- const r = !!n[4], i = l(n[1]), s = l(n[2]) - 1, u = l(n[3]), o = l(n[4]), c = l(n[5]) - 1;
68
- if (r)
69
- return Z(e, o, c) ? z(e, o, c) : /* @__PURE__ */ new Date(NaN);
70
- {
71
- const a = /* @__PURE__ */ new Date(0);
72
- return !M(e, s, u) || !O(e, i) ? /* @__PURE__ */ new Date(NaN) : (a.setUTCFullYear(e, s, Math.max(i, u)), a);
73
- }
74
- }
75
- function l(t) {
76
- return t ? parseInt(t) : 1;
77
- }
78
- function w(t) {
79
- const e = t.match(h);
80
- if (!e) return NaN;
81
- const n = m(e[1]), r = m(e[2]), i = m(e[3]);
82
- return k(n, r, i) ? n * p + r * N + i * 1e3 : NaN;
83
- }
84
- function m(t) {
85
- return t && parseFloat(t.replace(",", ".")) || 0;
86
- }
87
- function y(t) {
88
- if (t === "Z") return 0;
89
- const e = t.match(C);
90
- if (!e) return 0;
91
- const n = e[1] === "+" ? -1 : 1, r = parseInt(e[2]), i = e[3] && parseInt(e[3]) || 0;
92
- return R(r, i) ? n * (r * p + i * N) : NaN;
93
- }
94
- function z(t, e, n) {
95
- const r = /* @__PURE__ */ new Date(0);
96
- r.setUTCFullYear(t, 0, 4);
97
- const i = r.getUTCDay() || 7, s = (e - 1) * 7 + n + 1 - i;
98
- return r.setUTCDate(r.getUTCDate() + s), r;
99
- }
100
- const F = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
101
- function g(t) {
102
- return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
103
- }
104
- function M(t, e, n) {
105
- return e >= 0 && e <= 11 && n >= 1 && n <= (F[e] || (g(t) ? 29 : 28));
106
- }
107
- function O(t, e) {
108
- return e >= 1 && e <= (g(t) ? 366 : 365);
109
- }
110
- function Z(t, e, n) {
111
- return e >= 1 && e <= 53 && n >= 0 && n <= 6;
112
- }
113
- function k(t, e, n) {
114
- return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
115
- }
116
- function R(t, e) {
117
- return e >= 0 && e <= 59;
1
+ import { addMonths as d } from "./index79.mjs";
2
+ function a(r, o, t) {
3
+ return d(r, o * 12, t);
118
4
  }
119
5
  export {
120
- v as parseISO
6
+ a as addYears
121
7
  };
package/es/index78.mjs CHANGED
@@ -1,23 +1,7 @@
1
- import { ICONS_SVG_HTML_ID as s } from "./index59.mjs";
2
- const r = 1048576;
3
- function a(i, e = "") {
4
- return e.split(",").map((t) => t.trim()).flatMap((t) => t.split(".")).some(
5
- (t) => !t || t === "*" || t === i.type || t.includes("*") && !!t.split("/")?.[0] && i.type.startsWith(t.split("/")?.[0])
6
- );
7
- }
8
- function c(i, e) {
9
- return !e || i.size <= e * r;
10
- }
11
- function o(i, e, n) {
12
- return i.map((t) => ({ validFormat: a(t, e), validSize: c(t, n) }));
13
- }
14
- function p(i) {
15
- const e = document.getElementById(s);
16
- return e ? !!e.querySelector(`symbol#ai-${i}`) : !1;
1
+ import { addMonths as n } from "./index79.mjs";
2
+ function m(o, r, t) {
3
+ return n(o, -1, t);
17
4
  }
18
5
  export {
19
- o as areFilesValid,
20
- a as hasValidFormat,
21
- c as hasValidSize,
22
- p as iconExists
6
+ m as subMonths
23
7
  };