@okam/stack-ui 1.32.4 → 1.32.6

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 (525) hide show
  1. package/components/fields/Checkbox/index.d.ts +6 -0
  2. package/components/fields/CheckboxGroup/components/CheckboxGroupItem/index.d.ts +6 -0
  3. package/components/fields/Select/Select.d.ts +4 -1
  4. package/components/fields/Select/Select.interface.d.ts +1 -0
  5. package/components/fields/TextArea/index.d.ts +4 -1
  6. package/index.d.ts +4 -2
  7. package/index.js +1 -1
  8. package/index.mjs +153 -151
  9. package/index110.js +1 -1
  10. package/index110.mjs +5 -5
  11. package/index111.js +1 -1
  12. package/index111.mjs +2 -2
  13. package/index112.js +1 -1
  14. package/index112.mjs +1 -1
  15. package/index113.js +1 -1
  16. package/index113.mjs +2 -2
  17. package/index115.js +1 -1
  18. package/index115.mjs +8 -8
  19. package/index116.js +1 -1
  20. package/index116.mjs +6 -6
  21. package/index120.js +1 -1
  22. package/index120.mjs +8 -8
  23. package/index121.js +1 -1
  24. package/index121.mjs +6 -6
  25. package/index123.js +1 -1
  26. package/index123.mjs +9 -9
  27. package/index124.js +1 -1
  28. package/index124.mjs +1 -1
  29. package/index125.js +1 -1
  30. package/index125.mjs +6 -6
  31. package/index126.js +1 -1
  32. package/index126.mjs +3 -3
  33. package/index130.js +1 -1
  34. package/index130.mjs +2 -2
  35. package/index133.js +1 -1
  36. package/index133.mjs +1 -1
  37. package/index139.js +1 -1
  38. package/index139.mjs +3 -3
  39. package/index140.js +1 -1
  40. package/index140.mjs +23 -23
  41. package/index141.js +1 -1
  42. package/index141.mjs +3 -3
  43. package/index144.js +1 -1
  44. package/index144.mjs +2 -2
  45. package/index145.js +1 -1
  46. package/index145.mjs +5 -5
  47. package/index146.js +1 -1
  48. package/index146.mjs +2 -2
  49. package/index147.js +1 -1
  50. package/index147.mjs +6 -6
  51. package/index148.js +1 -1
  52. package/index148.mjs +3 -3
  53. package/index149.js +1 -1
  54. package/index149.mjs +12 -12
  55. package/index150.js +1 -1
  56. package/index150.mjs +9 -9
  57. package/index151.js +1 -1
  58. package/index151.mjs +8 -8
  59. package/index152.js +1 -1
  60. package/index152.mjs +106 -20
  61. package/index153.js +1 -1
  62. package/index153.mjs +83 -107
  63. package/index154.js +1 -1
  64. package/index154.mjs +26 -83
  65. package/index155.js +1 -1
  66. package/index155.mjs +20 -25
  67. package/index156.js +1 -1
  68. package/index156.mjs +17 -123
  69. package/index157.js +1 -1
  70. package/index157.mjs +122 -24
  71. package/index158.js +1 -1
  72. package/index158.mjs +71 -17
  73. package/index159.js +1 -1
  74. package/index159.mjs +338 -62
  75. package/index16.js +1 -1
  76. package/index16.mjs +144 -67
  77. package/index160.js +1 -1
  78. package/index160.mjs +42 -346
  79. package/index161.js +1 -1
  80. package/index161.mjs +29 -43
  81. package/index162.js +1 -1
  82. package/index162.mjs +24 -28
  83. package/index163.js +1 -1
  84. package/index163.mjs +136 -71
  85. package/index164.js +1 -1
  86. package/index164.mjs +132 -50
  87. package/index165.js +1 -1
  88. package/index165.mjs +96 -21
  89. package/index166.js +1 -1
  90. package/index166.mjs +24 -27
  91. package/index167.js +1 -1
  92. package/index167.mjs +381 -33
  93. package/index168.js +1 -1
  94. package/index168.mjs +90 -24
  95. package/index169.js +1 -1
  96. package/index169.mjs +72 -217
  97. package/index17.js +1 -1
  98. package/index17.mjs +95 -26
  99. package/index170.js +1 -1
  100. package/index170.mjs +50 -132
  101. package/index171.js +1 -1
  102. package/index171.mjs +21 -14
  103. package/index172.js +1 -1
  104. package/index172.mjs +30 -4
  105. package/index173.js +1 -1
  106. package/index173.mjs +33 -6
  107. package/index174.js +1 -1
  108. package/index174.mjs +27 -35
  109. package/index175.js +1 -1
  110. package/index175.mjs +215 -17
  111. package/index176.js +1 -1
  112. package/index176.mjs +14 -43
  113. package/index177.js +1 -1
  114. package/index177.mjs +4 -154
  115. package/index178.js +1 -1
  116. package/index178.mjs +6 -100
  117. package/index179.js +1 -1
  118. package/index179.mjs +37 -17
  119. package/index180.js +1 -1
  120. package/index180.mjs +16 -134
  121. package/index181.js +1 -1
  122. package/index181.mjs +40 -93
  123. package/index182.js +1 -1
  124. package/index182.mjs +151 -24
  125. package/index183.js +1 -1
  126. package/index183.mjs +100 -381
  127. package/index184.js +1 -1
  128. package/index184.mjs +16 -94
  129. package/index185.js +1 -1
  130. package/index185.mjs +205 -197
  131. package/index186.js +1 -1
  132. package/index186.mjs +24 -64
  133. package/index187.js +1 -1
  134. package/index187.mjs +4 -143
  135. package/index188.js +1 -1
  136. package/index188.mjs +3 -124
  137. package/index189.js +1 -1
  138. package/index189.mjs +116 -215
  139. package/index190.js +1 -1
  140. package/index190.mjs +23 -184
  141. package/index191.js +1 -1
  142. package/index191.mjs +51 -69
  143. package/index192.js +1 -1
  144. package/index192.mjs +43 -278
  145. package/index193.js +1 -1
  146. package/index193.mjs +31 -92
  147. package/index194.js +1 -1
  148. package/index194.mjs +109 -184
  149. package/index195.js +1 -1
  150. package/index195.mjs +77 -84
  151. package/index196.js +1 -1
  152. package/index196.mjs +101 -58
  153. package/index197.js +1 -1
  154. package/index197.mjs +98 -127
  155. package/index198.js +1 -1
  156. package/index198.mjs +70 -114
  157. package/index199.js +1 -1
  158. package/index199.mjs +91 -118
  159. package/index20.js +1 -1
  160. package/index20.mjs +105 -31
  161. package/index200.js +1 -1
  162. package/index200.mjs +152 -69
  163. package/index201.js +1 -1
  164. package/index201.mjs +72 -111
  165. package/index202.js +1 -1
  166. package/index202.mjs +41 -51
  167. package/index203.js +1 -1
  168. package/index203.mjs +5 -93
  169. package/index204.js +1 -1
  170. package/index204.mjs +60 -69
  171. package/index205.js +1 -1
  172. package/index205.mjs +58 -55
  173. package/index206.js +1 -1
  174. package/index206.mjs +196 -92
  175. package/index207.js +1 -5
  176. package/index207.mjs +59 -75
  177. package/index208.js +1 -1
  178. package/index208.mjs +126 -2008
  179. package/index209.js +1 -1
  180. package/index209.mjs +121 -56
  181. package/index21.js +1 -1
  182. package/index21.mjs +141 -64
  183. package/index210.js +1 -1
  184. package/index210.mjs +221 -185
  185. package/index211.js +1 -1
  186. package/index211.mjs +185 -206
  187. package/index212.js +1 -1
  188. package/index212.mjs +69 -24
  189. package/index213.js +1 -1
  190. package/index213.mjs +279 -4
  191. package/index214.js +1 -1
  192. package/index214.mjs +98 -3
  193. package/index215.js +1 -1
  194. package/index215.mjs +179 -116
  195. package/index216.js +1 -1
  196. package/index216.mjs +84 -29
  197. package/index217.js +1 -1
  198. package/index217.mjs +58 -51
  199. package/index218.js +1 -1
  200. package/index218.mjs +125 -43
  201. package/index219.js +1 -1
  202. package/index219.mjs +112 -33
  203. package/index220.js +1 -1
  204. package/index220.mjs +119 -110
  205. package/index221.js +1 -1
  206. package/index221.mjs +72 -77
  207. package/index222.js +1 -1
  208. package/index222.mjs +105 -96
  209. package/index223.js +1 -1
  210. package/index223.mjs +53 -98
  211. package/index224.js +1 -1
  212. package/index224.mjs +89 -68
  213. package/index225.js +1 -1
  214. package/index225.mjs +68 -93
  215. package/index226.js +1 -1
  216. package/index226.mjs +52 -151
  217. package/index227.js +1 -1
  218. package/index227.mjs +100 -72
  219. package/index228.js +5 -1
  220. package/index228.mjs +78 -40
  221. package/index229.js +1 -1
  222. package/index229.mjs +2025 -5
  223. package/index230.js +1 -1
  224. package/index230.mjs +59 -61
  225. package/index231.js +1 -1
  226. package/index231.mjs +187 -58
  227. package/index232.js +1 -1
  228. package/index232.mjs +71 -19
  229. package/index233.js +1 -1
  230. package/index233.mjs +45 -20
  231. package/index234.js +1 -1
  232. package/index234.mjs +30 -20
  233. package/index235.js +1 -1
  234. package/index235.mjs +19 -19
  235. package/index236.js +1 -1
  236. package/index236.mjs +19 -19
  237. package/index237.js +1 -1
  238. package/index237.mjs +19 -19
  239. package/index238.js +1 -1
  240. package/index238.mjs +15 -15
  241. package/index239.js +1 -1
  242. package/index239.mjs +19 -19
  243. package/index240.js +1 -1
  244. package/index240.mjs +19 -19
  245. package/index241.js +1 -1
  246. package/index241.mjs +19 -19
  247. package/index242.js +1 -1
  248. package/index242.mjs +16 -16
  249. package/index243.js +1 -1
  250. package/index243.mjs +19 -19
  251. package/index244.js +1 -1
  252. package/index244.mjs +16 -16
  253. package/index245.js +1 -1
  254. package/index245.mjs +16 -16
  255. package/index246.js +1 -1
  256. package/index246.mjs +19 -19
  257. package/index247.js +1 -1
  258. package/index247.mjs +19 -19
  259. package/index248.js +1 -1
  260. package/index248.mjs +19 -19
  261. package/index249.js +1 -1
  262. package/index249.mjs +18 -18
  263. package/index250.js +1 -1
  264. package/index250.mjs +19 -19
  265. package/index251.js +1 -1
  266. package/index251.mjs +19 -19
  267. package/index252.js +1 -1
  268. package/index252.mjs +19 -19
  269. package/index253.js +1 -1
  270. package/index253.mjs +16 -16
  271. package/index254.js +1 -1
  272. package/index254.mjs +19 -19
  273. package/index255.js +1 -1
  274. package/index255.mjs +19 -19
  275. package/index256.js +1 -1
  276. package/index256.mjs +16 -16
  277. package/index257.js +1 -1
  278. package/index257.mjs +18 -18
  279. package/index258.js +1 -1
  280. package/index258.mjs +16 -16
  281. package/index259.js +1 -1
  282. package/index259.mjs +16 -16
  283. package/index260.js +1 -1
  284. package/index260.mjs +16 -16
  285. package/index261.js +1 -1
  286. package/index261.mjs +19 -19
  287. package/index262.js +1 -1
  288. package/index262.mjs +16 -16
  289. package/index263.js +1 -1
  290. package/index263.mjs +15 -15
  291. package/index264.js +1 -1
  292. package/index264.mjs +19 -19
  293. package/index265.js +1 -1
  294. package/index265.mjs +19 -19
  295. package/index266.js +1 -1
  296. package/index266.mjs +19 -71
  297. package/index267.js +1 -1
  298. package/index267.mjs +20 -45
  299. package/index268.js +1 -1
  300. package/index268.mjs +20 -30
  301. package/index269.js +1 -1
  302. package/index269.mjs +4 -130
  303. package/index270.js +1 -1
  304. package/index270.mjs +22 -188
  305. package/index271.js +1 -1
  306. package/index271.mjs +46 -8
  307. package/index272.js +1 -1
  308. package/index272.mjs +5 -3
  309. package/index273.js +1 -1
  310. package/index273.mjs +6 -37
  311. package/index274.js +1 -1
  312. package/index274.mjs +14 -5
  313. package/index275.js +1 -1
  314. package/index275.mjs +24 -29
  315. package/index276.js +1 -1
  316. package/index276.mjs +28 -6
  317. package/index277.js +1 -1
  318. package/index277.mjs +26 -135
  319. package/index278.js +1 -1
  320. package/index278.mjs +9 -197
  321. package/index279.js +1 -1
  322. package/index279.mjs +25 -19
  323. package/index280.js +1 -1
  324. package/index280.mjs +9 -28
  325. package/index281.js +1 -1
  326. package/index281.mjs +5 -46
  327. package/index282.js +1 -1
  328. package/index282.mjs +7 -48
  329. package/index283.js +1 -1
  330. package/index283.mjs +12 -99
  331. package/index284.js +1 -1
  332. package/index284.mjs +8 -5
  333. package/index285.js +1 -1
  334. package/index285.mjs +49 -72
  335. package/index286.js +1 -1
  336. package/index286.mjs +16 -59
  337. package/index287.js +1 -1
  338. package/index287.mjs +16 -8
  339. package/index288.js +1 -1
  340. package/index288.mjs +16 -12
  341. package/index289.js +1 -1
  342. package/index289.mjs +16 -48
  343. package/index290.js +1 -1
  344. package/index290.mjs +16 -25
  345. package/index291.js +1 -1
  346. package/index291.mjs +16 -6
  347. package/index292.js +1 -1
  348. package/index292.mjs +16 -15
  349. package/index293.js +1 -1
  350. package/index293.mjs +16 -25
  351. package/index294.js +1 -1
  352. package/index294.mjs +16 -29
  353. package/index295.js +1 -1
  354. package/index295.mjs +16 -32
  355. package/index296.js +1 -1
  356. package/index296.mjs +16 -10
  357. package/index297.js +1 -1
  358. package/index297.mjs +16 -10
  359. package/index298.js +1 -1
  360. package/index298.mjs +16 -6
  361. package/index299.js +1 -1
  362. package/index299.mjs +16 -8
  363. package/index300.js +1 -1
  364. package/index300.mjs +16 -14
  365. package/index301.js +1 -1
  366. package/index301.mjs +16 -9
  367. package/index302.js +1 -1
  368. package/index302.mjs +16 -5
  369. package/index303.js +1 -1
  370. package/index303.mjs +16 -49
  371. package/index304.js +1 -1
  372. package/index304.mjs +15 -15
  373. package/index305.js +1 -1
  374. package/index305.mjs +15 -15
  375. package/index306.js +1 -1
  376. package/index306.mjs +12 -12
  377. package/index307.js +1 -1
  378. package/index307.mjs +15 -15
  379. package/index308.js +1 -1
  380. package/index308.mjs +15 -15
  381. package/index309.js +1 -1
  382. package/index309.mjs +15 -15
  383. package/index310.js +1 -1
  384. package/index310.mjs +12 -12
  385. package/index311.js +1 -1
  386. package/index311.mjs +15 -15
  387. package/index312.js +1 -1
  388. package/index312.mjs +15 -15
  389. package/index313.js +1 -1
  390. package/index313.mjs +12 -12
  391. package/index314.js +1 -1
  392. package/index314.mjs +15 -15
  393. package/index315.js +1 -1
  394. package/index315.mjs +15 -15
  395. package/index316.js +1 -1
  396. package/index316.mjs +15 -15
  397. package/index317.js +1 -1
  398. package/index317.mjs +15 -15
  399. package/index318.js +1 -1
  400. package/index318.mjs +15 -15
  401. package/index319.js +1 -1
  402. package/index319.mjs +12 -12
  403. package/index320.js +1 -1
  404. package/index320.mjs +130 -15
  405. package/index321.js +1 -1
  406. package/index321.mjs +191 -16
  407. package/index322.js +1 -1
  408. package/index322.mjs +10 -16
  409. package/index323.js +1 -1
  410. package/index323.mjs +4 -16
  411. package/index324.js +1 -1
  412. package/index324.mjs +37 -16
  413. package/index325.js +1 -1
  414. package/index325.mjs +6 -16
  415. package/index326.js +1 -1
  416. package/index326.mjs +30 -16
  417. package/index327.js +1 -1
  418. package/index327.mjs +7 -16
  419. package/index328.js +1 -1
  420. package/index328.mjs +141 -16
  421. package/index329.js +1 -1
  422. package/index329.mjs +198 -16
  423. package/index330.js +1 -1
  424. package/index330.mjs +23 -16
  425. package/index331.js +1 -1
  426. package/index331.mjs +47 -16
  427. package/index332.js +1 -1
  428. package/index332.mjs +49 -16
  429. package/index333.js +1 -1
  430. package/index333.mjs +101 -16
  431. package/index334.js +1 -1
  432. package/index334.mjs +71 -15
  433. package/index335.js +1 -1
  434. package/index335.mjs +59 -16
  435. package/index336.js +1 -1
  436. package/index336.mjs +8 -16
  437. package/index337.js +1 -1
  438. package/index337.mjs +12 -16
  439. package/index338.js +1 -1
  440. package/index338.mjs +7 -4
  441. package/index339.js +1 -1
  442. package/index339.mjs +68 -6
  443. package/index340.js +1 -1
  444. package/index340.mjs +27 -65
  445. package/index341.js +1 -1
  446. package/index341.mjs +6 -30
  447. package/index342.js +1 -1
  448. package/index342.mjs +6 -6
  449. package/index343.js +1 -1
  450. package/index343.mjs +20 -6
  451. package/index344.js +1 -1
  452. package/index344.mjs +3 -20
  453. package/index345.js +1 -1
  454. package/index345.mjs +7 -71
  455. package/index346.js +1 -1
  456. package/index346.mjs +7 -117
  457. package/index347.js +1 -1
  458. package/index347.mjs +7 -7
  459. package/index348.js +1 -1
  460. package/index348.mjs +7 -7
  461. package/index349.js +1 -1
  462. package/index349.mjs +7 -7
  463. package/index350.js +1 -1
  464. package/index350.mjs +7 -7
  465. package/index351.js +1 -1
  466. package/index351.mjs +4 -4
  467. package/index352.js +1 -1
  468. package/index352.mjs +7 -7
  469. package/index353.js +1 -1
  470. package/index353.mjs +4 -4
  471. package/index354.js +1 -1
  472. package/index354.mjs +4 -4
  473. package/index355.js +1 -1
  474. package/index355.mjs +4 -4
  475. package/index356.js +1 -1
  476. package/index356.mjs +7 -7
  477. package/index357.js +1 -1
  478. package/index357.mjs +7 -7
  479. package/index358.js +1 -1
  480. package/index358.mjs +7 -7
  481. package/index359.js +1 -1
  482. package/index359.mjs +7 -7
  483. package/index360.js +1 -1
  484. package/index360.mjs +7 -7
  485. package/index361.js +1 -1
  486. package/index361.mjs +7 -7
  487. package/index362.js +1 -1
  488. package/index362.mjs +4 -4
  489. package/index363.js +1 -1
  490. package/index363.mjs +7 -7
  491. package/index364.js +1 -1
  492. package/index364.mjs +7 -7
  493. package/index365.js +1 -1
  494. package/index365.mjs +7 -7
  495. package/index366.js +1 -1
  496. package/index366.mjs +7 -7
  497. package/index367.js +1 -1
  498. package/index367.mjs +4 -4
  499. package/index368.js +1 -1
  500. package/index368.mjs +7 -7
  501. package/index369.js +1 -1
  502. package/index369.mjs +4 -4
  503. package/index370.js +1 -1
  504. package/index370.mjs +7 -7
  505. package/index371.js +1 -1
  506. package/index371.mjs +4 -4
  507. package/index372.js +1 -1
  508. package/index372.mjs +7 -7
  509. package/index373.js +1 -1
  510. package/index373.mjs +7 -7
  511. package/index374.js +1 -1
  512. package/index374.mjs +7 -7
  513. package/index375.js +1 -1
  514. package/index375.mjs +7 -7
  515. package/index376.js +1 -1
  516. package/index376.mjs +4 -4
  517. package/index377.js +1 -1
  518. package/index377.mjs +7 -7
  519. package/index378.js +1 -1
  520. package/index378.mjs +7 -7
  521. package/index379.js +1 -1
  522. package/index379.mjs +117 -7
  523. package/index380.js +1 -1
  524. package/index380.mjs +71 -7
  525. package/package.json +1 -1
package/index150.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import R from "./index163.mjs";
2
- import { useDatePickerGroup as k } from "./index164.mjs";
1
+ import R from "./index169.mjs";
2
+ import { useDatePickerGroup as k } from "./index170.mjs";
3
3
  import { createFocusManager as E } from "@react-aria/focus";
4
- import { mergeProps as P } from "./index158.mjs";
5
- import { filterDOMProps as V } from "./index165.mjs";
6
- import { useDescription as C } from "./index166.mjs";
7
- import { useFormReset as I } from "./index179.mjs";
4
+ import { mergeProps as P } from "./index156.mjs";
5
+ import { filterDOMProps as V } from "./index171.mjs";
6
+ import { useDescription as C } from "./index172.mjs";
7
+ import { useFormReset as I } from "./index184.mjs";
8
8
  import { useRef as g, useMemo as S, useEffect as G } from "react";
9
- import { useField as L } from "./index167.mjs";
10
- import { useFocusWithin as O } from "./index162.mjs";
11
- import { useFormValidation as U } from "./index159.mjs";
9
+ import { useField as L } from "./index173.mjs";
10
+ import { useFocusWithin as O } from "./index161.mjs";
11
+ import { useFormValidation as U } from "./index158.mjs";
12
12
  import { useLocalizedStringFormatter as j } from "@react-aria/i18n";
13
13
  function q(e) {
14
14
  return e && e.__esModule ? e.default : e;
package/index151.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index180.js"),te=require("./index183.js"),le=require("./index184.js"),J=require("./index170.js"),Q=require("./index153.js"),E=require("./index181.js"),re=require("./index156.js"),ne=require("./index157.js"),s=require("react"),k={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},W={year:5,month:2,day:7,hour:2,minute:15,second:15},ie={dayperiod:"dayPeriod"};function ue(a){let{locale:l,createCalendar:i,hideTimeZone:d,isDisabled:y=!1,isReadOnly:v=!1,isRequired:I=!1,minValue:R,maxValue:T,isDateUnavailable:_}=a,V=a.value||a.defaultValue||a.placeholderValue||null,[h,g]=m.useDefaultProps(V,a.granularity),Z=g||"UTC";if(V&&!(h in V))throw new Error("Invalid granularity "+h+" for value "+V.toString());let K=s.useMemo(()=>new E.DateFormatter(l),[l]),u=s.useMemo(()=>i(K.resolvedOptions().calendar),[i,K]);var C;let[O,j]=ne.useControlledState(a.value,(C=a.defaultValue)!==null&&C!==void 0?C:null,a.onChange),S=s.useMemo(()=>{var e;return(e=m.convertValue(O,u))!==null&&e!==void 0?e:null},[O,u]),[L,w]=s.useState(()=>m.createPlaceholderDate(a.placeholderValue,h,u,g)),X=S||L,U=u.identifier==="gregory"&&X.era==="BC",M=s.useMemo(()=>{var e;return{granularity:h,maxGranularity:(e=a.maxGranularity)!==null&&e!==void 0?e:"year",timeZone:g,hideTimeZone:d,hourCycle:a.hourCycle,showEra:U,shouldForceLeadingZeros:a.shouldForceLeadingZeros}},[a.maxGranularity,h,a.hourCycle,a.shouldForceLeadingZeros,g,d,U]),Y=s.useMemo(()=>m.getFormatOptions({},M),[M]),D=s.useMemo(()=>new E.DateFormatter(l,Y),[l,Y]),x=s.useMemo(()=>D.resolvedOptions(),[D]),c=s.useMemo(()=>D.formatToParts(new Date).filter(e=>k[e.type]).reduce((e,r)=>(e[r.type]=!0,e),{}),[D]),[t,P]=s.useState(()=>a.value||a.defaultValue?{...c}:{}),q=s.useRef(null),A=s.useRef(u.identifier);s.useEffect(()=>{u.identifier!==A.current&&(A.current=u.identifier,w(e=>Object.keys(t).length>0?J.toCalendar(e,u):m.createPlaceholderDate(a.placeholderValue,h,u,g)))},[u,h,t,g,a.placeholderValue]),O&&Object.keys(t).length<Object.keys(c).length&&(t={...c},P(t)),O==null&&Object.keys(t).length===Object.keys(c).length&&(t={},P(t),w(m.createPlaceholderDate(a.placeholderValue,h,u,g)));let n=S&&Object.keys(t).length>=Object.keys(c).length?S:L,b=e=>{if(a.isDisabled||a.isReadOnly)return;let r=Object.keys(t),o=Object.keys(c);e==null?(j(null),w(m.createPlaceholderDate(a.placeholderValue,h,u,g)),P({})):r.length>=o.length||r.length===o.length-1&&c.dayPeriod&&!t.dayPeriod&&q.current!=="dayPeriod"?(e=J.toCalendar(e,(V==null?void 0:V.calendar)||new le.GregorianCalendar),j(e)):w(e),q.current=null},$=s.useMemo(()=>n.toDate(Z),[n,Z]),p=s.useMemo(()=>D.formatToParts($).map(e=>{let r=k[e.type];e.type==="era"&&u.getEras().length===1&&(r=!1);let o=k[e.type]&&!t[e.type],f=k[e.type]?te.getPlaceholder(e.type,e.value,l):null;return{type:ie[e.type]||e.type,text:o?f:e.value,...oe(n,e.type,x),isPlaceholder:o,placeholder:f,isEditable:r}}),[$,t,D,x,n,u,l]);c.era&&t.year&&!t.era?(t.era=!0,P({...t})):!c.era&&t.era&&(delete t.era,P({...t}));let B=e=>{t[e]=!0,e==="year"&&c.era&&(t.era=!0),P({...t})},F=(e,r)=>{if(t[e])b(se(n,e,r,x));else{B(e);let o=Object.keys(t),f=Object.keys(c);(o.length>=f.length||o.length===f.length-1&&c.dayPeriod&&!t.dayPeriod)&&b(n)}},ee=s.useMemo(()=>m.getValidationResult(O,R,T,_,M),[O,R,T,_,M]),N=re.useFormValidationState({...a,value:O,builtinValidation:ee}),z=N.displayValidation.isInvalid,ae=a.validationState||(z?"invalid":null);var G;return{...N,value:S,dateValue:$,calendar:u,setValue:b,segments:p,dateFormatter:D,validationState:ae,isInvalid:z,granularity:h,maxGranularity:(G=a.maxGranularity)!==null&&G!==void 0?G:"year",isDisabled:y,isReadOnly:v,isRequired:I,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,W[e]||1)},decrementPage(e){F(e,-(W[e]||1))},setSegment(e,r){B(e),b(ce(n,e,r,x))},confirmPlaceholder(){if(a.isDisabled||a.isReadOnly)return;let e=Object.keys(t),r=Object.keys(c);e.length===r.length-1&&c.dayPeriod&&!t.dayPeriod&&(t={...c},P(t),b(n.copy()))},clearSegment(e){delete t[e],q.current=e,P({...t});let r=m.createPlaceholderDate(a.placeholderValue,h,u,g),o=n;if(e==="dayPeriod"&&"hour"in n&&"hour"in r){let f=n.hour>=12,H=r.hour>=12;f&&!H?o=n.set({hour:n.hour-12}):!f&&H&&(o=n.set({hour:n.hour+12}))}else e in n&&(o=n.set({[e]:r[e]}));j(null),b(o)},formatValue(e){if(!S)return"";let r=m.getFormatOptions(e,M);return new E.DateFormatter(l,r).format($)},getDateFormatter(e,r){let o={...M,...r},f=m.getFormatOptions({},o);return new E.DateFormatter(e,f)}}}function oe(a,l,i){switch(l){case"era":{let d=a.calendar.getEras();return{value:d.indexOf(a.era),minValue:0,maxValue:d.length-1}}case"year":return{value:a.year,minValue:1,maxValue:a.calendar.getYearsInEra(a)};case"month":return{value:a.month,minValue:Q.getMinimumMonthInYear(a),maxValue:a.calendar.getMonthsInYear(a)};case"day":return{value:a.day,minValue:Q.getMinimumDayInMonth(a),maxValue:a.calendar.getDaysInMonth(a)}}if("hour"in a)switch(l){case"dayPeriod":return{value:a.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(i.hour12){let d=a.hour>=12;return{value:a.hour,minValue:d?12:0,maxValue:d?23:11}}return{value:a.hour,minValue:0,maxValue:23};case"minute":return{value:a.minute,minValue:0,maxValue:59};case"second":return{value:a.second,minValue:0,maxValue:59}}return{}}function se(a,l,i,d){switch(l){case"era":case"year":case"month":case"day":return a.cycle(l,i,{round:l==="year"})}if("hour"in a)switch(l){case"dayPeriod":{let y=a.hour,v=y>=12;return a.set({hour:v?y-12:y+12})}case"hour":case"minute":case"second":return a.cycle(l,i,{round:l!=="hour",hourCycle:d.hour12?12:24})}throw new Error("Unknown segment: "+l)}function ce(a,l,i,d){switch(l){case"day":case"month":case"year":case"era":return a.set({[l]:i})}if("hour"in a&&typeof i=="number")switch(l){case"dayPeriod":{let y=a.hour,v=y>=12;return i>=12===v?a:a.set({hour:v?y-12:y+12})}case"hour":if(d.hour12){let v=a.hour>=12;!v&&i===12&&(i=0),v&&i<12&&(i+=12)}case"minute":case"second":return a.set({[l]:i})}throw new Error("Unknown segment: "+l)}exports.useDateFieldState=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index163.js"),te=require("./index167.js"),le=require("./index168.js"),J=require("./index164.js"),Q=require("./index152.js"),E=require("./index165.js"),re=require("./index157.js"),ne=require("./index162.js"),s=require("react"),k={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},W={year:5,month:2,day:7,hour:2,minute:15,second:15},ie={dayperiod:"dayPeriod"};function ue(a){let{locale:l,createCalendar:i,hideTimeZone:d,isDisabled:y=!1,isReadOnly:v=!1,isRequired:I=!1,minValue:R,maxValue:T,isDateUnavailable:_}=a,V=a.value||a.defaultValue||a.placeholderValue||null,[h,g]=m.useDefaultProps(V,a.granularity),Z=g||"UTC";if(V&&!(h in V))throw new Error("Invalid granularity "+h+" for value "+V.toString());let K=s.useMemo(()=>new E.DateFormatter(l),[l]),u=s.useMemo(()=>i(K.resolvedOptions().calendar),[i,K]);var C;let[O,j]=ne.useControlledState(a.value,(C=a.defaultValue)!==null&&C!==void 0?C:null,a.onChange),S=s.useMemo(()=>{var e;return(e=m.convertValue(O,u))!==null&&e!==void 0?e:null},[O,u]),[L,w]=s.useState(()=>m.createPlaceholderDate(a.placeholderValue,h,u,g)),X=S||L,U=u.identifier==="gregory"&&X.era==="BC",M=s.useMemo(()=>{var e;return{granularity:h,maxGranularity:(e=a.maxGranularity)!==null&&e!==void 0?e:"year",timeZone:g,hideTimeZone:d,hourCycle:a.hourCycle,showEra:U,shouldForceLeadingZeros:a.shouldForceLeadingZeros}},[a.maxGranularity,h,a.hourCycle,a.shouldForceLeadingZeros,g,d,U]),Y=s.useMemo(()=>m.getFormatOptions({},M),[M]),D=s.useMemo(()=>new E.DateFormatter(l,Y),[l,Y]),x=s.useMemo(()=>D.resolvedOptions(),[D]),c=s.useMemo(()=>D.formatToParts(new Date).filter(e=>k[e.type]).reduce((e,r)=>(e[r.type]=!0,e),{}),[D]),[t,P]=s.useState(()=>a.value||a.defaultValue?{...c}:{}),q=s.useRef(null),A=s.useRef(u.identifier);s.useEffect(()=>{u.identifier!==A.current&&(A.current=u.identifier,w(e=>Object.keys(t).length>0?J.toCalendar(e,u):m.createPlaceholderDate(a.placeholderValue,h,u,g)))},[u,h,t,g,a.placeholderValue]),O&&Object.keys(t).length<Object.keys(c).length&&(t={...c},P(t)),O==null&&Object.keys(t).length===Object.keys(c).length&&(t={},P(t),w(m.createPlaceholderDate(a.placeholderValue,h,u,g)));let n=S&&Object.keys(t).length>=Object.keys(c).length?S:L,b=e=>{if(a.isDisabled||a.isReadOnly)return;let r=Object.keys(t),o=Object.keys(c);e==null?(j(null),w(m.createPlaceholderDate(a.placeholderValue,h,u,g)),P({})):r.length>=o.length||r.length===o.length-1&&c.dayPeriod&&!t.dayPeriod&&q.current!=="dayPeriod"?(e=J.toCalendar(e,(V==null?void 0:V.calendar)||new le.GregorianCalendar),j(e)):w(e),q.current=null},$=s.useMemo(()=>n.toDate(Z),[n,Z]),p=s.useMemo(()=>D.formatToParts($).map(e=>{let r=k[e.type];e.type==="era"&&u.getEras().length===1&&(r=!1);let o=k[e.type]&&!t[e.type],f=k[e.type]?te.getPlaceholder(e.type,e.value,l):null;return{type:ie[e.type]||e.type,text:o?f:e.value,...oe(n,e.type,x),isPlaceholder:o,placeholder:f,isEditable:r}}),[$,t,D,x,n,u,l]);c.era&&t.year&&!t.era?(t.era=!0,P({...t})):!c.era&&t.era&&(delete t.era,P({...t}));let B=e=>{t[e]=!0,e==="year"&&c.era&&(t.era=!0),P({...t})},F=(e,r)=>{if(t[e])b(se(n,e,r,x));else{B(e);let o=Object.keys(t),f=Object.keys(c);(o.length>=f.length||o.length===f.length-1&&c.dayPeriod&&!t.dayPeriod)&&b(n)}},ee=s.useMemo(()=>m.getValidationResult(O,R,T,_,M),[O,R,T,_,M]),N=re.useFormValidationState({...a,value:O,builtinValidation:ee}),z=N.displayValidation.isInvalid,ae=a.validationState||(z?"invalid":null);var G;return{...N,value:S,dateValue:$,calendar:u,setValue:b,segments:p,dateFormatter:D,validationState:ae,isInvalid:z,granularity:h,maxGranularity:(G=a.maxGranularity)!==null&&G!==void 0?G:"year",isDisabled:y,isReadOnly:v,isRequired:I,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,W[e]||1)},decrementPage(e){F(e,-(W[e]||1))},setSegment(e,r){B(e),b(ce(n,e,r,x))},confirmPlaceholder(){if(a.isDisabled||a.isReadOnly)return;let e=Object.keys(t),r=Object.keys(c);e.length===r.length-1&&c.dayPeriod&&!t.dayPeriod&&(t={...c},P(t),b(n.copy()))},clearSegment(e){delete t[e],q.current=e,P({...t});let r=m.createPlaceholderDate(a.placeholderValue,h,u,g),o=n;if(e==="dayPeriod"&&"hour"in n&&"hour"in r){let f=n.hour>=12,H=r.hour>=12;f&&!H?o=n.set({hour:n.hour-12}):!f&&H&&(o=n.set({hour:n.hour+12}))}else e in n&&(o=n.set({[e]:r[e]}));j(null),b(o)},formatValue(e){if(!S)return"";let r=m.getFormatOptions(e,M);return new E.DateFormatter(l,r).format($)},getDateFormatter(e,r){let o={...M,...r},f=m.getFormatOptions({},o);return new E.DateFormatter(e,f)}}}function oe(a,l,i){switch(l){case"era":{let d=a.calendar.getEras();return{value:d.indexOf(a.era),minValue:0,maxValue:d.length-1}}case"year":return{value:a.year,minValue:1,maxValue:a.calendar.getYearsInEra(a)};case"month":return{value:a.month,minValue:Q.getMinimumMonthInYear(a),maxValue:a.calendar.getMonthsInYear(a)};case"day":return{value:a.day,minValue:Q.getMinimumDayInMonth(a),maxValue:a.calendar.getDaysInMonth(a)}}if("hour"in a)switch(l){case"dayPeriod":return{value:a.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(i.hour12){let d=a.hour>=12;return{value:a.hour,minValue:d?12:0,maxValue:d?23:11}}return{value:a.hour,minValue:0,maxValue:23};case"minute":return{value:a.minute,minValue:0,maxValue:59};case"second":return{value:a.second,minValue:0,maxValue:59}}return{}}function se(a,l,i,d){switch(l){case"era":case"year":case"month":case"day":return a.cycle(l,i,{round:l==="year"})}if("hour"in a)switch(l){case"dayPeriod":{let y=a.hour,v=y>=12;return a.set({hour:v?y-12:y+12})}case"hour":case"minute":case"second":return a.cycle(l,i,{round:l!=="hour",hourCycle:d.hour12?12:24})}throw new Error("Unknown segment: "+l)}function ce(a,l,i,d){switch(l){case"day":case"month":case"year":case"era":return a.set({[l]:i})}if("hour"in a&&typeof i=="number")switch(l){case"dayPeriod":{let y=a.hour,v=y>=12;return i>=12===v?a:a.set({hour:v?y-12:y+12})}case"hour":if(d.hour12){let v=a.hour>=12;!v&&i===12&&(i=0),v&&i<12&&(i+=12)}case"minute":case"second":return a.set({[l]:i})}throw new Error("Unknown segment: "+l)}exports.useDateFieldState=ue;
package/index151.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { useDefaultProps as re, convertValue as ie, createPlaceholderDate as w, getFormatOptions as T, getValidationResult as ne } from "./index180.mjs";
2
- import { getPlaceholder as ue } from "./index183.mjs";
3
- import { GregorianCalendar as oe } from "./index184.mjs";
4
- import { toCalendar as Q } from "./index170.mjs";
5
- import { getMinimumDayInMonth as ce, getMinimumMonthInYear as de } from "./index153.mjs";
6
- import { DateFormatter as k } from "./index181.mjs";
7
- import { useFormValidationState as se } from "./index156.mjs";
8
- import { useControlledState as fe } from "./index157.mjs";
1
+ import { useDefaultProps as re, convertValue as ie, createPlaceholderDate as w, getFormatOptions as T, getValidationResult as ne } from "./index163.mjs";
2
+ import { getPlaceholder as ue } from "./index167.mjs";
3
+ import { GregorianCalendar as oe } from "./index168.mjs";
4
+ import { toCalendar as Q } from "./index164.mjs";
5
+ import { getMinimumDayInMonth as ce, getMinimumMonthInYear as de } from "./index152.mjs";
6
+ import { DateFormatter as k } from "./index165.mjs";
7
+ import { useFormValidationState as se } from "./index157.mjs";
8
+ import { useControlledState as fe } from "./index162.mjs";
9
9
  import { useMemo as f, useState as W, useRef as X, useEffect as he } from "react";
10
10
  const j = {
11
11
  year: !0,
package/index152.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index381.js"),o=require("./index158.js"),u=require("./index171.js"),s=require("@react-aria/focus");function c(a,e,d){let l=s.useHasTabbableChild(d)?void 0:0;var r;const n=i.generateId(e,(r=a.id)!==null&&r!==void 0?r:e==null?void 0:e.selectedKey,"tabpanel"),b=u.useLabels({...a,id:n,"aria-labelledby":i.generateId(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:o.mergeProps(b,{tabIndex:l,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}exports.useTabPanel=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index164.js"),s=require("./index197.js");function $(e,n){return n=c.toCalendar(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function y(e,n){return e.calendar.identifier===n.calendar.identifier&&e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function p(e,n){return $(e,l(n))}function f(e,n){let t=e.calendar.toJulianDay(e),r=Math.ceil(t+1-w(n))%7;return r<0&&(r+=7),r}function d(e){return c.fromAbsolute(Date.now(),e)}function l(e){return c.toCalendarDate(d(e))}function M(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function g(e,n){return i(e)-i(n)}function i(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let a=null;function h(){return a==null&&(a=new Intl.DateTimeFormat().resolvedOptions().timeZone),a}function o(e){return e.subtract({days:e.day-1})}function x(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function D(e){return o(e.subtract({months:e.month-1}))}function I(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function O(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function m(e,n){let t=f(e,n);return e.subtract({days:t})}function k(e,n){return m(e,n).add({days:6})}const u=new Map;function v(e){if(Intl.Locale){let t=u.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&u.set(e,t)),t}let n=e.split("-")[1];return n==="u"?void 0:n}function w(e){let n=v(e);return n&&s.weekStartData[n]||0}function T(e,n){let t=e.calendar.getDaysInMonth(e);return Math.ceil((f(o(e),n)+t)/7)}function W(e,n){return e&&n?e.compare(n)<=0?e:n:e||n}function b(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}exports.compareDate=M;exports.compareTime=g;exports.endOfMonth=x;exports.endOfWeek=k;exports.getDayOfWeek=f;exports.getLocalTimeZone=h;exports.getMinimumDayInMonth=O;exports.getMinimumMonthInYear=I;exports.getWeeksInMonth=T;exports.isEqualDay=y;exports.isSameDay=$;exports.isToday=p;exports.maxDate=b;exports.minDate=W;exports.now=d;exports.startOfMonth=o;exports.startOfWeek=m;exports.startOfYear=D;exports.today=l;
package/index152.mjs CHANGED
@@ -1,24 +1,110 @@
1
- import { generateId as r } from "./index381.mjs";
2
- import { mergeProps as n } from "./index158.mjs";
3
- import { useLabels as c } from "./index171.mjs";
4
- import { useHasTabbableChild as f } from "@react-aria/focus";
5
- function m(a, e, b) {
6
- let i = f(b) ? void 0 : 0;
7
- var d;
8
- const l = r(e, (d = a.id) !== null && d !== void 0 ? d : e == null ? void 0 : e.selectedKey, "tabpanel"), o = c({
9
- ...a,
10
- id: l,
11
- "aria-labelledby": r(e, e == null ? void 0 : e.selectedKey, "tab")
1
+ import { toCalendar as i, toCalendarDate as u, fromAbsolute as d } from "./index164.mjs";
2
+ import { weekStartData as s } from "./index197.mjs";
3
+ function m(e, a) {
4
+ return a = i(a, e.calendar), e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
5
+ }
6
+ function D(e, a) {
7
+ return e.calendar.identifier === a.calendar.identifier && e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
8
+ }
9
+ function b(e, a) {
10
+ return m(e, p(a));
11
+ }
12
+ function o(e, a) {
13
+ let n = e.calendar.toJulianDay(e), t = Math.ceil(n + 1 - h(a)) % 7;
14
+ return t < 0 && (t += 7), t;
15
+ }
16
+ function l(e) {
17
+ return d(Date.now(), e);
18
+ }
19
+ function p(e) {
20
+ return u(l(e));
21
+ }
22
+ function I(e, a) {
23
+ return e.calendar.toJulianDay(e) - a.calendar.toJulianDay(a);
24
+ }
25
+ function O(e, a) {
26
+ return f(e) - f(a);
27
+ }
28
+ function f(e) {
29
+ return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
30
+ }
31
+ let r = null;
32
+ function k() {
33
+ return r == null && (r = new Intl.DateTimeFormat().resolvedOptions().timeZone), r;
34
+ }
35
+ function $(e) {
36
+ return e.subtract({
37
+ days: e.day - 1
38
+ });
39
+ }
40
+ function W(e) {
41
+ return e.add({
42
+ days: e.calendar.getDaysInMonth(e) - e.day
12
43
  });
13
- return {
14
- tabPanelProps: n(o, {
15
- tabIndex: i,
16
- role: "tabpanel",
17
- "aria-describedby": a["aria-describedby"],
18
- "aria-details": a["aria-details"]
19
- })
20
- };
44
+ }
45
+ function v(e) {
46
+ return $(e.subtract({
47
+ months: e.month - 1
48
+ }));
49
+ }
50
+ function w(e) {
51
+ return e.calendar.getMinimumMonthInYear ? e.calendar.getMinimumMonthInYear(e) : 1;
52
+ }
53
+ function T(e) {
54
+ return e.calendar.getMinimumDayInMonth ? e.calendar.getMinimumDayInMonth(e) : 1;
55
+ }
56
+ function y(e, a) {
57
+ let n = o(e, a);
58
+ return e.subtract({
59
+ days: n
60
+ });
61
+ }
62
+ function Y(e, a) {
63
+ return y(e, a).add({
64
+ days: 6
65
+ });
66
+ }
67
+ const c = /* @__PURE__ */ new Map();
68
+ function x(e) {
69
+ if (Intl.Locale) {
70
+ let n = c.get(e);
71
+ return n || (n = new Intl.Locale(e).maximize().region, n && c.set(e, n)), n;
72
+ }
73
+ let a = e.split("-")[1];
74
+ return a === "u" ? void 0 : a;
75
+ }
76
+ function h(e) {
77
+ let a = x(e);
78
+ return a && s[a] || 0;
79
+ }
80
+ function J(e, a) {
81
+ let n = e.calendar.getDaysInMonth(e);
82
+ return Math.ceil((o($(e), a) + n) / 7);
83
+ }
84
+ function L(e, a) {
85
+ return e && a ? e.compare(a) <= 0 ? e : a : e || a;
86
+ }
87
+ function S(e, a) {
88
+ return e && a ? e.compare(a) >= 0 ? e : a : e || a;
21
89
  }
22
90
  export {
23
- m as useTabPanel
91
+ I as compareDate,
92
+ O as compareTime,
93
+ W as endOfMonth,
94
+ Y as endOfWeek,
95
+ o as getDayOfWeek,
96
+ k as getLocalTimeZone,
97
+ T as getMinimumDayInMonth,
98
+ w as getMinimumMonthInYear,
99
+ J as getWeeksInMonth,
100
+ D as isEqualDay,
101
+ m as isSameDay,
102
+ b as isToday,
103
+ S as maxDate,
104
+ L as minDate,
105
+ l as now,
106
+ $ as startOfMonth,
107
+ y as startOfWeek,
108
+ v as startOfYear,
109
+ p as today
24
110
  };
package/index153.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index170.js"),s=require("./index223.js");function $(e,n){return n=c.toCalendar(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function y(e,n){return e.calendar.identifier===n.calendar.identifier&&e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function p(e,n){return $(e,l(n))}function f(e,n){let t=e.calendar.toJulianDay(e),r=Math.ceil(t+1-w(n))%7;return r<0&&(r+=7),r}function d(e){return c.fromAbsolute(Date.now(),e)}function l(e){return c.toCalendarDate(d(e))}function M(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function g(e,n){return i(e)-i(n)}function i(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let a=null;function h(){return a==null&&(a=new Intl.DateTimeFormat().resolvedOptions().timeZone),a}function o(e){return e.subtract({days:e.day-1})}function x(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function D(e){return o(e.subtract({months:e.month-1}))}function I(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function O(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function m(e,n){let t=f(e,n);return e.subtract({days:t})}function k(e,n){return m(e,n).add({days:6})}const u=new Map;function v(e){if(Intl.Locale){let t=u.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&u.set(e,t)),t}let n=e.split("-")[1];return n==="u"?void 0:n}function w(e){let n=v(e);return n&&s.weekStartData[n]||0}function T(e,n){let t=e.calendar.getDaysInMonth(e);return Math.ceil((f(o(e),n)+t)/7)}function W(e,n){return e&&n?e.compare(n)<=0?e:n:e||n}function b(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}exports.compareDate=M;exports.compareTime=g;exports.endOfMonth=x;exports.endOfWeek=k;exports.getDayOfWeek=f;exports.getLocalTimeZone=h;exports.getMinimumDayInMonth=O;exports.getMinimumMonthInYear=I;exports.getWeeksInMonth=T;exports.isEqualDay=y;exports.isSameDay=$;exports.isToday=p;exports.maxDate=b;exports.minDate=W;exports.now=d;exports.startOfMonth=o;exports.startOfWeek=m;exports.startOfYear=D;exports.today=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index199.js"),s=require("./index152.js"),k=require("react"),v=require("./index156.js"),w=require("./index176.js"),r=require("@react-aria/i18n");function m(o,e){let{startDate:u=e.visibleRange.start,endDate:c=e.visibleRange.end}=o,{direction:t}=r.useLocale(),d=a=>{switch(a.key){case"Enter":case" ":a.preventDefault(),e.selectFocusedDate();break;case"PageUp":a.preventDefault(),a.stopPropagation(),e.focusPreviousSection(a.shiftKey);break;case"PageDown":a.preventDefault(),a.stopPropagation(),e.focusNextSection(a.shiftKey);break;case"End":a.preventDefault(),a.stopPropagation(),e.focusSectionEnd();break;case"Home":a.preventDefault(),a.stopPropagation(),e.focusSectionStart();break;case"ArrowLeft":a.preventDefault(),a.stopPropagation(),t==="rtl"?e.focusNextDay():e.focusPreviousDay();break;case"ArrowUp":a.preventDefault(),a.stopPropagation(),e.focusPreviousRow();break;case"ArrowRight":a.preventDefault(),a.stopPropagation(),t==="rtl"?e.focusPreviousDay():e.focusNextDay();break;case"ArrowDown":a.preventDefault(),a.stopPropagation(),e.focusNextRow();break;case"Escape":"setAnchorDate"in e&&(a.preventDefault(),e.setAnchorDate(null));break}},f=l.useVisibleRangeDescription(u,c,e.timeZone,!0),{ariaLabel:p,ariaLabelledBy:D}=l.hookData.get(e),b=w.useLabels({"aria-label":[p,f].filter(Boolean).join(", "),"aria-labelledby":D}),i=r.useDateFormatter({weekday:o.weekdayStyle||"narrow",timeZone:e.timeZone}),{locale:n}=r.useLocale(),y=k.useMemo(()=>{let a=s.startOfWeek(s.today(e.timeZone),n);return[...new Array(7).keys()].map(g=>{let P=a.add({days:g}).toDate(e.timeZone);return i.format(P)})},[n,e.timeZone,i]);return{gridProps:v.mergeProps(b,{role:"grid","aria-readonly":e.isReadOnly||void 0,"aria-disabled":e.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in e||void 0,onKeyDown:d,onFocus:()=>e.setFocused(!0),onBlur:()=>e.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:y}}exports.useCalendarGrid=m;
package/index153.mjs CHANGED
@@ -1,110 +1,86 @@
1
- import { toCalendar as i, toCalendarDate as u, fromAbsolute as d } from "./index170.mjs";
2
- import { weekStartData as s } from "./index223.mjs";
3
- function m(e, a) {
4
- return a = i(a, e.calendar), e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
5
- }
6
- function D(e, a) {
7
- return e.calendar.identifier === a.calendar.identifier && e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
8
- }
9
- function b(e, a) {
10
- return m(e, p(a));
11
- }
12
- function o(e, a) {
13
- let n = e.calendar.toJulianDay(e), t = Math.ceil(n + 1 - h(a)) % 7;
14
- return t < 0 && (t += 7), t;
15
- }
16
- function l(e) {
17
- return d(Date.now(), e);
18
- }
19
- function p(e) {
20
- return u(l(e));
21
- }
22
- function I(e, a) {
23
- return e.calendar.toJulianDay(e) - a.calendar.toJulianDay(a);
24
- }
25
- function O(e, a) {
26
- return f(e) - f(a);
27
- }
28
- function f(e) {
29
- return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
30
- }
31
- let r = null;
32
- function k() {
33
- return r == null && (r = new Intl.DateTimeFormat().resolvedOptions().timeZone), r;
34
- }
35
- function $(e) {
36
- return e.subtract({
37
- days: e.day - 1
38
- });
39
- }
40
- function W(e) {
41
- return e.add({
42
- days: e.calendar.getDaysInMonth(e) - e.day
43
- });
44
- }
45
- function v(e) {
46
- return $(e.subtract({
47
- months: e.month - 1
48
- }));
49
- }
50
- function w(e) {
51
- return e.calendar.getMinimumMonthInYear ? e.calendar.getMinimumMonthInYear(e) : 1;
52
- }
53
- function T(e) {
54
- return e.calendar.getMinimumDayInMonth ? e.calendar.getMinimumDayInMonth(e) : 1;
55
- }
56
- function y(e, a) {
57
- let n = o(e, a);
58
- return e.subtract({
59
- days: n
60
- });
61
- }
62
- function Y(e, a) {
63
- return y(e, a).add({
64
- days: 6
65
- });
66
- }
67
- const c = /* @__PURE__ */ new Map();
68
- function x(e) {
69
- if (Intl.Locale) {
70
- let n = c.get(e);
71
- return n || (n = new Intl.Locale(e).maximize().region, n && c.set(e, n)), n;
72
- }
73
- let a = e.split("-")[1];
74
- return a === "u" ? void 0 : a;
75
- }
76
- function h(e) {
77
- let a = x(e);
78
- return a && s[a] || 0;
79
- }
80
- function J(e, a) {
81
- let n = e.calendar.getDaysInMonth(e);
82
- return Math.ceil((o($(e), a) + n) / 7);
83
- }
84
- function L(e, a) {
85
- return e && a ? e.compare(a) <= 0 ? e : a : e || a;
86
- }
87
- function S(e, a) {
88
- return e && a ? e.compare(a) >= 0 ? e : a : e || a;
1
+ import { useVisibleRangeDescription as y, hookData as g } from "./index199.mjs";
2
+ import { startOfWeek as $, today as k } from "./index152.mjs";
3
+ import { useMemo as w } from "react";
4
+ import { mergeProps as P } from "./index156.mjs";
5
+ import { useLabels as v } from "./index176.mjs";
6
+ import { useLocale as n, useDateFormatter as h } from "@react-aria/i18n";
7
+ function B(r, e) {
8
+ let { startDate: l = e.visibleRange.start, endDate: s = e.visibleRange.end } = r, { direction: o } = n(), f = (a) => {
9
+ switch (a.key) {
10
+ case "Enter":
11
+ case " ":
12
+ a.preventDefault(), e.selectFocusedDate();
13
+ break;
14
+ case "PageUp":
15
+ a.preventDefault(), a.stopPropagation(), e.focusPreviousSection(a.shiftKey);
16
+ break;
17
+ case "PageDown":
18
+ a.preventDefault(), a.stopPropagation(), e.focusNextSection(a.shiftKey);
19
+ break;
20
+ case "End":
21
+ a.preventDefault(), a.stopPropagation(), e.focusSectionEnd();
22
+ break;
23
+ case "Home":
24
+ a.preventDefault(), a.stopPropagation(), e.focusSectionStart();
25
+ break;
26
+ case "ArrowLeft":
27
+ a.preventDefault(), a.stopPropagation(), o === "rtl" ? e.focusNextDay() : e.focusPreviousDay();
28
+ break;
29
+ case "ArrowUp":
30
+ a.preventDefault(), a.stopPropagation(), e.focusPreviousRow();
31
+ break;
32
+ case "ArrowRight":
33
+ a.preventDefault(), a.stopPropagation(), o === "rtl" ? e.focusPreviousDay() : e.focusNextDay();
34
+ break;
35
+ case "ArrowDown":
36
+ a.preventDefault(), a.stopPropagation(), e.focusNextRow();
37
+ break;
38
+ case "Escape":
39
+ "setAnchorDate" in e && (a.preventDefault(), e.setAnchorDate(null));
40
+ break;
41
+ }
42
+ }, d = y(l, s, e.timeZone, !0), { ariaLabel: c, ariaLabelledBy: p } = g.get(e), u = v({
43
+ "aria-label": [
44
+ c,
45
+ d
46
+ ].filter(Boolean).join(", "),
47
+ "aria-labelledby": p
48
+ }), t = h({
49
+ weekday: r.weekdayStyle || "narrow",
50
+ timeZone: e.timeZone
51
+ }), { locale: i } = n(), b = w(() => {
52
+ let a = $(k(e.timeZone), i);
53
+ return [
54
+ ...new Array(7).keys()
55
+ ].map((D) => {
56
+ let m = a.add({
57
+ days: D
58
+ }).toDate(e.timeZone);
59
+ return t.format(m);
60
+ });
61
+ }, [
62
+ i,
63
+ e.timeZone,
64
+ t
65
+ ]);
66
+ return {
67
+ gridProps: P(u, {
68
+ role: "grid",
69
+ "aria-readonly": e.isReadOnly || void 0,
70
+ "aria-disabled": e.isDisabled || void 0,
71
+ "aria-multiselectable": "highlightedRange" in e || void 0,
72
+ onKeyDown: f,
73
+ onFocus: () => e.setFocused(!0),
74
+ onBlur: () => e.setFocused(!1)
75
+ }),
76
+ headerProps: {
77
+ // Column headers are hidden to screen readers to make navigating with a touch screen reader easier.
78
+ // The day names are already included in the label of each cell, so there's no need to announce them twice.
79
+ "aria-hidden": !0
80
+ },
81
+ weekDays: b
82
+ };
89
83
  }
90
84
  export {
91
- I as compareDate,
92
- O as compareTime,
93
- W as endOfMonth,
94
- Y as endOfWeek,
95
- o as getDayOfWeek,
96
- k as getLocalTimeZone,
97
- T as getMinimumDayInMonth,
98
- w as getMinimumMonthInYear,
99
- J as getWeeksInMonth,
100
- D as isEqualDay,
101
- m as isSameDay,
102
- b as isToday,
103
- S as maxDate,
104
- L as minDate,
105
- l as now,
106
- $ as startOfMonth,
107
- y as startOfWeek,
108
- v as startOfYear,
109
- p as today
85
+ B as useCalendarGrid
110
86
  };
package/index154.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index225.js"),s=require("./index153.js"),k=require("react"),v=require("./index158.js"),w=require("./index171.js"),r=require("@react-aria/i18n");function m(o,e){let{startDate:u=e.visibleRange.start,endDate:c=e.visibleRange.end}=o,{direction:t}=r.useLocale(),d=a=>{switch(a.key){case"Enter":case" ":a.preventDefault(),e.selectFocusedDate();break;case"PageUp":a.preventDefault(),a.stopPropagation(),e.focusPreviousSection(a.shiftKey);break;case"PageDown":a.preventDefault(),a.stopPropagation(),e.focusNextSection(a.shiftKey);break;case"End":a.preventDefault(),a.stopPropagation(),e.focusSectionEnd();break;case"Home":a.preventDefault(),a.stopPropagation(),e.focusSectionStart();break;case"ArrowLeft":a.preventDefault(),a.stopPropagation(),t==="rtl"?e.focusNextDay():e.focusPreviousDay();break;case"ArrowUp":a.preventDefault(),a.stopPropagation(),e.focusPreviousRow();break;case"ArrowRight":a.preventDefault(),a.stopPropagation(),t==="rtl"?e.focusPreviousDay():e.focusNextDay();break;case"ArrowDown":a.preventDefault(),a.stopPropagation(),e.focusNextRow();break;case"Escape":"setAnchorDate"in e&&(a.preventDefault(),e.setAnchorDate(null));break}},f=l.useVisibleRangeDescription(u,c,e.timeZone,!0),{ariaLabel:p,ariaLabelledBy:D}=l.hookData.get(e),b=w.useLabels({"aria-label":[p,f].filter(Boolean).join(", "),"aria-labelledby":D}),i=r.useDateFormatter({weekday:o.weekdayStyle||"narrow",timeZone:e.timeZone}),{locale:n}=r.useLocale(),y=k.useMemo(()=>{let a=s.startOfWeek(s.today(e.timeZone),n);return[...new Array(7).keys()].map(g=>{let P=a.add({days:g}).toDate(e.timeZone);return i.format(P)})},[n,e.timeZone,i]);return{gridProps:v.mergeProps(b,{role:"grid","aria-readonly":e.isReadOnly||void 0,"aria-disabled":e.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in e||void 0,onKeyDown:d,onFocus:()=>e.setFocused(!0),onBlur:()=>e.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:y}}exports.useCalendarGrid=m;
1
+ "use strict";const o=require("react/jsx-runtime"),r=require("./index152.js"),$=require("./index200.js"),F=require("@react-aria/focus"),I=require("./index156.js"),L=require("react"),T=require("react-aria"),t=require("./index64.js");function V({themeName:i="calendar",tokens:l,state:n,date:e}){const a=L.useRef(null),{cellProps:C,buttonProps:g,isSelected:c,isOutsideVisibleRange:m,isDisabled:u,formattedDate:y,isInvalid:d}=$.useCalendarCell({date:e},n,a),s=n==null?void 0:n.highlightedRange,f=s==null?void 0:s.start,h=s==null?void 0:s.end,D=s&&f?r.isSameDay(e,f):c,q=s&&h?r.isSameDay(e,h):c,{locale:p}=T.useLocale(),R=r.getDayOfWeek(e,p),S=c&&(D||R===0||e.day===1),b=c&&(q||R===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:x,isFocusVisible:P}=F.useFocusRing(),j=t(`${i}.cellContainer`,{...l,isFocusVisible:P}),v=t(`${i}.cell`,{...l,isSelected:c,isInvalid:d,isDisabled:u,isRoundedLeft:S,isRoundedRight:b}),O=t(`${i}.cellDate`,{...l,isSelected:c,isInvalid:d,isDisabled:u,isSelectionStart:D,isSelectionEnd:q});return o.jsx("td",{...C,"aria-disabled":!1,className:j,children:o.jsx("div",{...I.mergeProps(g,x),ref:a,hidden:m,className:v,children:o.jsx("div",{className:O,children:y})})})}module.exports=V;
package/index154.mjs CHANGED
@@ -1,86 +1,29 @@
1
- import { useVisibleRangeDescription as y, hookData as g } from "./index225.mjs";
2
- import { startOfWeek as $, today as k } from "./index153.mjs";
3
- import { useMemo as w } from "react";
4
- import { mergeProps as P } from "./index158.mjs";
5
- import { useLabels as v } from "./index171.mjs";
6
- import { useLocale as n, useDateFormatter as h } from "@react-aria/i18n";
7
- function B(r, e) {
8
- let { startDate: l = e.visibleRange.start, endDate: s = e.visibleRange.end } = r, { direction: o } = n(), f = (a) => {
9
- switch (a.key) {
10
- case "Enter":
11
- case " ":
12
- a.preventDefault(), e.selectFocusedDate();
13
- break;
14
- case "PageUp":
15
- a.preventDefault(), a.stopPropagation(), e.focusPreviousSection(a.shiftKey);
16
- break;
17
- case "PageDown":
18
- a.preventDefault(), a.stopPropagation(), e.focusNextSection(a.shiftKey);
19
- break;
20
- case "End":
21
- a.preventDefault(), a.stopPropagation(), e.focusSectionEnd();
22
- break;
23
- case "Home":
24
- a.preventDefault(), a.stopPropagation(), e.focusSectionStart();
25
- break;
26
- case "ArrowLeft":
27
- a.preventDefault(), a.stopPropagation(), o === "rtl" ? e.focusNextDay() : e.focusPreviousDay();
28
- break;
29
- case "ArrowUp":
30
- a.preventDefault(), a.stopPropagation(), e.focusPreviousRow();
31
- break;
32
- case "ArrowRight":
33
- a.preventDefault(), a.stopPropagation(), o === "rtl" ? e.focusPreviousDay() : e.focusNextDay();
34
- break;
35
- case "ArrowDown":
36
- a.preventDefault(), a.stopPropagation(), e.focusNextRow();
37
- break;
38
- case "Escape":
39
- "setAnchorDate" in e && (a.preventDefault(), e.setAnchorDate(null));
40
- break;
41
- }
42
- }, d = y(l, s, e.timeZone, !0), { ariaLabel: c, ariaLabelledBy: p } = g.get(e), u = v({
43
- "aria-label": [
44
- c,
45
- d
46
- ].filter(Boolean).join(", "),
47
- "aria-labelledby": p
48
- }), t = h({
49
- weekday: r.weekdayStyle || "narrow",
50
- timeZone: e.timeZone
51
- }), { locale: i } = n(), b = w(() => {
52
- let a = $(k(e.timeZone), i);
53
- return [
54
- ...new Array(7).keys()
55
- ].map((D) => {
56
- let m = a.add({
57
- days: D
58
- }).toDate(e.timeZone);
59
- return t.format(m);
60
- });
61
- }, [
62
- i,
63
- e.timeZone,
64
- t
65
- ]);
66
- return {
67
- gridProps: P(u, {
68
- role: "grid",
69
- "aria-readonly": e.isReadOnly || void 0,
70
- "aria-disabled": e.isDisabled || void 0,
71
- "aria-multiselectable": "highlightedRange" in e || void 0,
72
- onKeyDown: f,
73
- onFocus: () => e.setFocused(!0),
74
- onBlur: () => e.setFocused(!1)
75
- }),
76
- headerProps: {
77
- // Column headers are hidden to screen readers to make navigating with a touch screen reader easier.
78
- // The day names are already included in the label of each cell, so there's no need to announce them twice.
79
- "aria-hidden": !0
80
- },
81
- weekDays: b
82
- };
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { isSameDay as h, getDayOfWeek as F } from "./index152.mjs";
3
+ import { useCalendarCell as I } from "./index200.mjs";
4
+ import { useFocusRing as L } from "@react-aria/focus";
5
+ import { mergeProps as V } from "./index156.mjs";
6
+ import { useRef as W } from "react";
7
+ import { useLocale as j } from "react-aria";
8
+ import r from "./index64.mjs";
9
+ function B({ themeName: l = "calendar", tokens: i, state: c, date: e }) {
10
+ const t = W(null), { cellProps: D, buttonProps: b, isSelected: s, isOutsideVisibleRange: x, isDisabled: a, formattedDate: C, isInvalid: d } = I({ date: e }, c, t), o = c == null ? void 0 : c.highlightedRange, f = o == null ? void 0 : o.start, m = o == null ? void 0 : o.end, p = o && f ? h(e, f) : s, u = o && m ? h(e, m) : s, { locale: R } = j(), $ = F(e, R), g = s && (p || $ === 0 || e.day === 1), y = s && (u || $ === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: S, isFocusVisible: P } = L(), v = r(`${l}.cellContainer`, { ...i, isFocusVisible: P }), O = r(`${l}.cell`, {
11
+ ...i,
12
+ isSelected: s,
13
+ isInvalid: d,
14
+ isDisabled: a,
15
+ isRoundedLeft: g,
16
+ isRoundedRight: y
17
+ }), T = r(`${l}.cellDate`, {
18
+ ...i,
19
+ isSelected: s,
20
+ isInvalid: d,
21
+ isDisabled: a,
22
+ isSelectionStart: p,
23
+ isSelectionEnd: u
24
+ });
25
+ return /* @__PURE__ */ n("td", { ...D, "aria-disabled": !1, className: v, children: /* @__PURE__ */ n("div", { ...V(b, S), ref: t, hidden: x, className: O, children: /* @__PURE__ */ n("div", { className: T, children: C }) }) });
83
26
  }
84
27
  export {
85
- B as useCalendarGrid
28
+ B as default
86
29
  };
package/index155.js CHANGED
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),r=require("./index153.js"),$=require("./index226.js"),F=require("@react-aria/focus"),I=require("./index158.js"),L=require("react"),T=require("react-aria"),t=require("./index64.js");function V({themeName:i="calendar",tokens:l,state:n,date:e}){const a=L.useRef(null),{cellProps:C,buttonProps:g,isSelected:c,isOutsideVisibleRange:m,isDisabled:u,formattedDate:y,isInvalid:d}=$.useCalendarCell({date:e},n,a),s=n==null?void 0:n.highlightedRange,f=s==null?void 0:s.start,h=s==null?void 0:s.end,D=s&&f?r.isSameDay(e,f):c,q=s&&h?r.isSameDay(e,h):c,{locale:p}=T.useLocale(),R=r.getDayOfWeek(e,p),S=c&&(D||R===0||e.day===1),b=c&&(q||R===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:x,isFocusVisible:P}=F.useFocusRing(),j=t(`${i}.cellContainer`,{...l,isFocusVisible:P}),v=t(`${i}.cell`,{...l,isSelected:c,isInvalid:d,isDisabled:u,isRoundedLeft:S,isRoundedRight:b}),O=t(`${i}.cellDate`,{...l,isSelected:c,isInvalid:d,isDisabled:u,isSelectionStart:D,isSelectionEnd:q});return o.jsx("td",{...C,"aria-disabled":!1,className:j,children:o.jsx("div",{...I.mergeProps(g,x),ref:a,hidden:m,className:v,children:o.jsx("div",{className:O,children:y})})})}module.exports=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index381.js"),o=require("./index156.js"),u=require("./index176.js"),s=require("@react-aria/focus");function c(a,e,d){let l=s.useHasTabbableChild(d)?void 0:0;var r;const n=i.generateId(e,(r=a.id)!==null&&r!==void 0?r:e==null?void 0:e.selectedKey,"tabpanel"),b=u.useLabels({...a,id:n,"aria-labelledby":i.generateId(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:o.mergeProps(b,{tabIndex:l,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}exports.useTabPanel=c;
package/index155.mjs CHANGED
@@ -1,29 +1,24 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { isSameDay as h, getDayOfWeek as F } from "./index153.mjs";
3
- import { useCalendarCell as I } from "./index226.mjs";
4
- import { useFocusRing as L } from "@react-aria/focus";
5
- import { mergeProps as V } from "./index158.mjs";
6
- import { useRef as W } from "react";
7
- import { useLocale as j } from "react-aria";
8
- import r from "./index64.mjs";
9
- function B({ themeName: l = "calendar", tokens: i, state: c, date: e }) {
10
- const t = W(null), { cellProps: D, buttonProps: b, isSelected: s, isOutsideVisibleRange: x, isDisabled: a, formattedDate: C, isInvalid: d } = I({ date: e }, c, t), o = c == null ? void 0 : c.highlightedRange, f = o == null ? void 0 : o.start, m = o == null ? void 0 : o.end, p = o && f ? h(e, f) : s, u = o && m ? h(e, m) : s, { locale: R } = j(), $ = F(e, R), g = s && (p || $ === 0 || e.day === 1), y = s && (u || $ === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: S, isFocusVisible: P } = L(), v = r(`${l}.cellContainer`, { ...i, isFocusVisible: P }), O = r(`${l}.cell`, {
11
- ...i,
12
- isSelected: s,
13
- isInvalid: d,
14
- isDisabled: a,
15
- isRoundedLeft: g,
16
- isRoundedRight: y
17
- }), T = r(`${l}.cellDate`, {
18
- ...i,
19
- isSelected: s,
20
- isInvalid: d,
21
- isDisabled: a,
22
- isSelectionStart: p,
23
- isSelectionEnd: u
1
+ import { generateId as r } from "./index381.mjs";
2
+ import { mergeProps as n } from "./index156.mjs";
3
+ import { useLabels as c } from "./index176.mjs";
4
+ import { useHasTabbableChild as f } from "@react-aria/focus";
5
+ function m(a, e, b) {
6
+ let i = f(b) ? void 0 : 0;
7
+ var d;
8
+ const l = r(e, (d = a.id) !== null && d !== void 0 ? d : e == null ? void 0 : e.selectedKey, "tabpanel"), o = c({
9
+ ...a,
10
+ id: l,
11
+ "aria-labelledby": r(e, e == null ? void 0 : e.selectedKey, "tab")
24
12
  });
25
- return /* @__PURE__ */ n("td", { ...D, "aria-disabled": !1, className: v, children: /* @__PURE__ */ n("div", { ...V(b, S), ref: t, hidden: x, className: O, children: /* @__PURE__ */ n("div", { className: T, children: C }) }) });
13
+ return {
14
+ tabPanelProps: n(o, {
15
+ tabIndex: i,
16
+ role: "tabpanel",
17
+ "aria-describedby": a["aria-describedby"],
18
+ "aria-details": a["aria-details"]
19
+ })
20
+ };
26
21
  }
27
22
  export {
28
- B as default
23
+ m as useTabPanel
29
24
  };