@okam/stack-ui 1.28.0 → 1.29.1

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 (569) hide show
  1. package/components/Button/interface.d.ts +2 -2
  2. package/components/Menu/interface.d.ts +5 -2
  3. package/components/Video/index.d.ts +3 -0
  4. package/components/Video/interface.d.ts +6 -0
  5. package/components/WysiwygBlock/attributes.d.ts +2 -0
  6. package/index.d.ts +1 -2
  7. package/index.js +1 -1
  8. package/index.mjs +101 -103
  9. package/index10.js +1 -1
  10. package/index10.mjs +1 -1
  11. package/index100.js +2 -1
  12. package/index100.mjs +22 -17
  13. package/index101.js +1 -2
  14. package/index101.mjs +63 -22
  15. package/index102.js +1 -1
  16. package/index102.mjs +24 -58
  17. package/index103.js +1 -1
  18. package/index103.mjs +52 -29
  19. package/index104.js +1 -1
  20. package/index107.js +1 -1
  21. package/index107.mjs +1 -1
  22. package/index108.js +1 -1
  23. package/index109.js +1 -1
  24. package/index109.mjs +2 -2
  25. package/index11.js +1 -1
  26. package/index11.mjs +3 -3
  27. package/index110.js +1 -1
  28. package/index111.js +1 -1
  29. package/index112.js +1 -1
  30. package/index112.mjs +1 -1
  31. package/index113.js +1 -1
  32. package/index113.mjs +1 -1
  33. package/index114.js +1 -1
  34. package/index114.mjs +1 -1
  35. package/index115.js +1 -1
  36. package/index115.mjs +9 -9
  37. package/index116.js +1 -1
  38. package/index116.mjs +3 -3
  39. package/index117.js +1 -1
  40. package/index118.js +1 -1
  41. package/index119.js +1 -1
  42. package/index12.js +1 -1
  43. package/index12.mjs +1 -1
  44. package/index120.js +1 -1
  45. package/index120.mjs +2 -2
  46. package/index121.js +1 -1
  47. package/index121.mjs +1 -1
  48. package/index122.js +1 -1
  49. package/index122.mjs +1 -1
  50. package/index123.js +1 -1
  51. package/index123.mjs +21 -5
  52. package/index124.js +1 -1
  53. package/index124.mjs +11 -21
  54. package/index125.js +2 -1
  55. package/index125.mjs +22 -11
  56. package/index126.js +1 -1
  57. package/index126.mjs +12 -42
  58. package/index127.js +1 -2
  59. package/index127.mjs +46 -22
  60. package/index128.js +1 -1
  61. package/index128.mjs +241 -12
  62. package/index129.js +2 -1
  63. package/index129.mjs +13 -46
  64. package/index13.js +1 -1
  65. package/index13.mjs +8 -5
  66. package/index130.js +1 -1
  67. package/index130.mjs +28 -239
  68. package/index131.js +1 -2
  69. package/index131.mjs +51 -13
  70. package/index132.js +1 -1
  71. package/index132.mjs +27 -30
  72. package/index133.js +1 -1
  73. package/index133.mjs +19 -49
  74. package/index134.js +1 -1
  75. package/index134.mjs +61 -26
  76. package/index135.js +1 -1
  77. package/index135.mjs +91 -17
  78. package/index136.js +1 -1
  79. package/index136.mjs +31 -3
  80. package/index137.js +1 -4
  81. package/index137.mjs +119 -244
  82. package/index138.js +1 -1
  83. package/index138.mjs +27 -61
  84. package/index139.js +1 -1
  85. package/index139.mjs +122 -92
  86. package/index14.js +1 -1
  87. package/index14.mjs +2 -2
  88. package/index140.js +1 -1
  89. package/index140.mjs +134 -31
  90. package/index141.js +1 -1
  91. package/index141.mjs +12 -119
  92. package/index142.js +1 -1
  93. package/index142.mjs +93 -25
  94. package/index143.js +1 -1
  95. package/index143.mjs +103 -121
  96. package/index144.js +1 -1
  97. package/index144.mjs +5 -134
  98. package/index145.js +1 -1
  99. package/index145.mjs +3 -14
  100. package/index146.js +1 -1
  101. package/index146.mjs +113 -83
  102. package/index147.js +1 -1
  103. package/index147.mjs +25 -102
  104. package/index148.js +1 -1
  105. package/index148.mjs +51 -5
  106. package/index149.js +1 -1
  107. package/index149.mjs +44 -3
  108. package/index15.js +1 -1
  109. package/index15.mjs +1 -1
  110. package/index150.js +1 -1
  111. package/index150.mjs +29 -117
  112. package/index151.js +1 -1
  113. package/index151.mjs +100 -16
  114. package/index152.js +1 -1
  115. package/index152.mjs +70 -44
  116. package/index153.js +1 -1
  117. package/index153.mjs +90 -33
  118. package/index154.js +1 -1
  119. package/index154.mjs +98 -38
  120. package/index155.js +1 -1
  121. package/index155.mjs +195 -109
  122. package/index156.js +1 -1
  123. package/index156.mjs +61 -74
  124. package/index157.js +1 -1
  125. package/index157.mjs +141 -101
  126. package/index158.js +1 -1
  127. package/index158.mjs +120 -98
  128. package/index159.js +1 -1
  129. package/index159.mjs +218 -2
  130. package/index16.js +1 -1
  131. package/index160.js +1 -1
  132. package/index160.mjs +190 -5
  133. package/index161.js +1 -1
  134. package/index161.mjs +68 -63
  135. package/index162.js +1 -1
  136. package/index162.mjs +255 -23
  137. package/index163.js +1 -1
  138. package/index163.mjs +94 -51
  139. package/index164.js +1 -1
  140. package/index164.mjs +171 -152
  141. package/index165.js +1 -1
  142. package/index165.mjs +83 -21
  143. package/index166.js +1 -1
  144. package/index166.mjs +57 -18
  145. package/index167.js +1 -1
  146. package/index167.mjs +123 -36
  147. package/index168.js +1 -1
  148. package/index168.mjs +113 -79
  149. package/index169.js +1 -1
  150. package/index169.mjs +119 -27
  151. package/index17.js +1 -1
  152. package/index17.mjs +1 -1
  153. package/index170.js +1 -1
  154. package/index170.mjs +70 -19
  155. package/index171.js +1 -1
  156. package/index171.mjs +110 -53
  157. package/index172.js +1 -1
  158. package/index172.mjs +53 -2
  159. package/index173.js +1 -11
  160. package/index173.mjs +92 -114
  161. package/index174.js +1 -1
  162. package/index174.mjs +63 -192
  163. package/index175.js +1 -1
  164. package/index175.mjs +51 -59
  165. package/index176.js +1 -1
  166. package/index176.mjs +93 -135
  167. package/index177.js +5 -1
  168. package/index177.mjs +75 -114
  169. package/index178.js +1 -1
  170. package/index178.mjs +1994 -200
  171. package/index179.js +1 -1
  172. package/index179.mjs +57 -188
  173. package/index18.js +1 -1
  174. package/index18.mjs +3 -3
  175. package/index180.js +1 -1
  176. package/index180.mjs +186 -67
  177. package/index181.js +1 -1
  178. package/index181.mjs +5 -258
  179. package/index182.js +1 -1
  180. package/index182.mjs +127 -94
  181. package/index183.js +1 -1
  182. package/index183.mjs +171 -166
  183. package/index184.js +1 -1
  184. package/index184.mjs +8 -83
  185. package/index185.js +1 -1
  186. package/index185.mjs +3 -58
  187. package/index186.js +1 -1
  188. package/index186.mjs +32 -122
  189. package/index187.js +1 -1
  190. package/index187.mjs +5 -116
  191. package/index188.js +1 -1
  192. package/index188.mjs +25 -118
  193. package/index189.js +1 -1
  194. package/index189.mjs +6 -72
  195. package/index19.js +1 -1
  196. package/index190.js +1 -1
  197. package/index190.mjs +306 -103
  198. package/index191.js +1 -1
  199. package/index191.mjs +189 -49
  200. package/index192.js +1 -1
  201. package/index192.mjs +8 -93
  202. package/index193.js +1 -1
  203. package/index193.mjs +24 -68
  204. package/index194.js +1 -1
  205. package/index194.mjs +54 -55
  206. package/index195.js +1 -1
  207. package/index195.mjs +42 -95
  208. package/index196.js +1 -5
  209. package/index196.mjs +123 -79
  210. package/index197.js +1 -1
  211. package/index197.mjs +5 -2011
  212. package/index198.js +1 -1
  213. package/index198.mjs +26 -57
  214. package/index199.js +1 -1
  215. package/index199.mjs +7 -189
  216. package/index2.js +1 -1
  217. package/index2.mjs +20 -20
  218. package/index20.js +1 -1
  219. package/index20.mjs +1 -1
  220. package/index200.js +1 -1
  221. package/index200.mjs +6 -4
  222. package/index201.js +1 -1
  223. package/index201.mjs +8 -2
  224. package/index202.js +1 -1
  225. package/index202.mjs +4 -52
  226. package/index203.js +1 -1
  227. package/index203.mjs +5 -20
  228. package/index204.js +1 -1
  229. package/index204.mjs +9 -23
  230. package/index21.js +1 -1
  231. package/index21.mjs +1 -1
  232. package/index22.js +1 -1
  233. package/index22.mjs +1 -1
  234. package/index23.js +1 -1
  235. package/index23.mjs +1 -1
  236. package/index24.js +1 -1
  237. package/index24.mjs +1 -1
  238. package/index25.js +1 -1
  239. package/index25.mjs +1 -1
  240. package/index26.js +1 -1
  241. package/index26.mjs +1 -1
  242. package/index27.js +1 -1
  243. package/index28.js +1 -1
  244. package/index28.mjs +2 -2
  245. package/index29.js +1 -1
  246. package/index29.mjs +1 -1
  247. package/index3.js +1 -1
  248. package/index3.mjs +1 -1
  249. package/index30.js +1 -1
  250. package/index31.js +1 -1
  251. package/index31.mjs +2 -2
  252. package/index32.js +1 -1
  253. package/index32.mjs +1 -1
  254. package/index33.js +1 -1
  255. package/index33.mjs +88 -65
  256. package/index34.js +1 -1
  257. package/index34.mjs +2 -2
  258. package/index35.js +1 -1
  259. package/index35.mjs +2 -2
  260. package/index36.js +1 -1
  261. package/index36.mjs +1 -1
  262. package/index37.js +1 -1
  263. package/index38.js +2 -1
  264. package/index38.mjs +20 -45
  265. package/index39.js +1 -2
  266. package/index39.mjs +5 -26
  267. package/index4.js +1 -1
  268. package/index4.mjs +4 -4
  269. package/index40.js +1 -1
  270. package/index40.mjs +7 -4
  271. package/index41.js +1 -1
  272. package/index41.mjs +5 -5
  273. package/index42.js +1 -1
  274. package/index42.mjs +5 -8
  275. package/index43.js +1 -1
  276. package/index43.mjs +2 -2
  277. package/index44.js +1 -1
  278. package/index44.mjs +1 -1
  279. package/index45.js +1 -1
  280. package/index45.mjs +4 -4
  281. package/index46.js +1 -1
  282. package/index46.mjs +9 -3
  283. package/index47.js +1 -1
  284. package/index47.mjs +9 -7
  285. package/index48.js +1 -1
  286. package/index48.mjs +9 -9
  287. package/index49.js +1 -1
  288. package/index49.mjs +46 -13
  289. package/index50.js +1 -1
  290. package/index50.mjs +8 -46
  291. package/index51.js +1 -1
  292. package/index51.mjs +69 -6
  293. package/index52.js +1 -1
  294. package/index52.mjs +8 -71
  295. package/index53.js +1 -1
  296. package/index53.mjs +12 -7
  297. package/index54.js +1 -1
  298. package/index54.mjs +9 -12
  299. package/index55.js +1 -1
  300. package/index55.mjs +17 -10
  301. package/index56.js +1 -1
  302. package/index56.mjs +13 -17
  303. package/index57.js +1 -1
  304. package/index57.mjs +5 -5
  305. package/index58.js +1 -1
  306. package/index58.mjs +6 -6
  307. package/index59.js +1 -1
  308. package/index59.mjs +8 -10
  309. package/index6.js +1 -1
  310. package/index6.mjs +1 -1
  311. package/index60.js +1 -1
  312. package/index60.mjs +5 -5
  313. package/index61.js +1 -1
  314. package/index61.mjs +8 -6
  315. package/index62.js +1 -1
  316. package/index62.mjs +14 -13
  317. package/index63.js +2 -1
  318. package/index63.mjs +23 -14
  319. package/index64.js +1 -1
  320. package/index64.mjs +15 -21
  321. package/index65.js +1 -1
  322. package/index65.mjs +14 -16
  323. package/index66.js +1 -1
  324. package/index66.mjs +40 -13
  325. package/index67.js +1 -1
  326. package/index67.mjs +36 -39
  327. package/index68.js +1 -1
  328. package/index68.mjs +11 -37
  329. package/index69.js +1 -1
  330. package/index69.mjs +10 -11
  331. package/index7.js +1 -1
  332. package/index7.mjs +1 -1
  333. package/index70.js +1 -1
  334. package/index70.mjs +13 -10
  335. package/index71.js +1 -1
  336. package/index71.mjs +10 -13
  337. package/index72.js +1 -2
  338. package/index72.mjs +2 -12
  339. package/index73.js +2 -1
  340. package/index73.mjs +9 -2
  341. package/index74.js +1 -1
  342. package/index74.mjs +6 -7
  343. package/index75.js +1 -1
  344. package/index75.mjs +6 -6
  345. package/index76.js +1 -1
  346. package/index76.mjs +6 -6
  347. package/index77.js +1 -2
  348. package/index77.mjs +25 -8
  349. package/index78.js +1 -1
  350. package/index78.mjs +2 -25
  351. package/index79.js +6 -1
  352. package/index79.mjs +94 -2
  353. package/index8.js +1 -1
  354. package/index8.mjs +3 -3
  355. package/index80.js +1 -6
  356. package/index80.mjs +54 -79
  357. package/index81.js +1 -1
  358. package/index81.mjs +33 -61
  359. package/index82.js +42 -1
  360. package/index82.mjs +67 -34
  361. package/index83.js +1 -42
  362. package/index83.mjs +154 -65
  363. package/index84.js +9 -1
  364. package/index84.mjs +47 -149
  365. package/index85.js +1 -9
  366. package/index85.mjs +36 -48
  367. package/index86.js +1 -1
  368. package/index86.mjs +8 -40
  369. package/index87.js +1 -1
  370. package/index87.mjs +31 -9
  371. package/index88.js +1 -1
  372. package/index88.mjs +6 -35
  373. package/index89.js +12 -1
  374. package/index89.mjs +40 -6
  375. package/index9.js +1 -1
  376. package/index9.mjs +38 -43
  377. package/index90.js +1 -12
  378. package/index90.mjs +25 -36
  379. package/index91.js +1 -1
  380. package/index91.mjs +8 -24
  381. package/index92.js +7 -1
  382. package/index92.mjs +13 -7
  383. package/index93.js +14 -6
  384. package/index93.mjs +65 -13
  385. package/index94.js +1 -15
  386. package/index94.mjs +7 -71
  387. package/index95.js +16 -1
  388. package/index95.mjs +25 -7
  389. package/index96.js +1 -16
  390. package/index96.mjs +37 -20
  391. package/index97.js +1 -1
  392. package/index97.mjs +43 -40
  393. package/index98.js +1 -1
  394. package/index98.mjs +47 -44
  395. package/index99.js +1 -1
  396. package/index99.mjs +17 -48
  397. package/package.json +1 -1
  398. package/theme/Alerts/index.d.ts +88 -0
  399. package/theme/Button/index.d.ts +28 -0
  400. package/theme/Carousel/index.d.ts +36 -0
  401. package/types/next-link.d.ts +16 -0
  402. package/components/DirectusImg/index.d.ts +0 -3
  403. package/components/DirectusImg/interface.d.ts +0 -20
  404. package/components/Img/index.d.ts +0 -3
  405. package/components/Img/interface.d.ts +0 -6
  406. package/index205.js +0 -1
  407. package/index205.mjs +0 -29
  408. package/index206.js +0 -1
  409. package/index206.mjs +0 -49
  410. package/index207.js +0 -1
  411. package/index207.mjs +0 -4
  412. package/index208.js +0 -1
  413. package/index208.mjs +0 -23
  414. package/index209.js +0 -1
  415. package/index209.mjs +0 -4
  416. package/index210.js +0 -1
  417. package/index210.mjs +0 -31
  418. package/index211.js +0 -1
  419. package/index211.mjs +0 -4
  420. package/index212.js +0 -1
  421. package/index212.mjs +0 -4
  422. package/index213.js +0 -1
  423. package/index213.mjs +0 -25
  424. package/index214.js +0 -1
  425. package/index214.mjs +0 -4
  426. package/index215.js +0 -1
  427. package/index215.mjs +0 -4
  428. package/index216.js +0 -1
  429. package/index216.mjs +0 -4
  430. package/index217.js +0 -1
  431. package/index217.mjs +0 -40
  432. package/index218.js +0 -1
  433. package/index218.mjs +0 -4
  434. package/index219.js +0 -1
  435. package/index219.mjs +0 -23
  436. package/index220.js +0 -1
  437. package/index220.mjs +0 -25
  438. package/index221.js +0 -1
  439. package/index221.mjs +0 -4
  440. package/index222.js +0 -1
  441. package/index222.mjs +0 -25
  442. package/index223.js +0 -1
  443. package/index223.mjs +0 -4
  444. package/index224.js +0 -1
  445. package/index224.mjs +0 -133
  446. package/index225.js +0 -1
  447. package/index225.mjs +0 -182
  448. package/index226.js +0 -1
  449. package/index226.mjs +0 -12
  450. package/index227.js +0 -1
  451. package/index227.mjs +0 -6
  452. package/index228.js +0 -1
  453. package/index228.mjs +0 -39
  454. package/index229.js +0 -1
  455. package/index229.mjs +0 -8
  456. package/index230.js +0 -1
  457. package/index230.mjs +0 -32
  458. package/index231.js +0 -1
  459. package/index231.mjs +0 -9
  460. package/index232.js +0 -1
  461. package/index232.mjs +0 -316
  462. package/index233.js +0 -1
  463. package/index233.mjs +0 -195
  464. package/index234.js +0 -1
  465. package/index234.mjs +0 -11
  466. package/index235.js +0 -1
  467. package/index235.mjs +0 -29
  468. package/index236.js +0 -1
  469. package/index236.mjs +0 -58
  470. package/index237.js +0 -1
  471. package/index237.mjs +0 -49
  472. package/index238.js +0 -1
  473. package/index238.mjs +0 -127
  474. package/index239.js +0 -1
  475. package/index239.mjs +0 -4
  476. package/index240.js +0 -1
  477. package/index240.mjs +0 -4
  478. package/index241.js +0 -1
  479. package/index241.mjs +0 -4
  480. package/index242.js +0 -1
  481. package/index242.mjs +0 -20
  482. package/index243.js +0 -1
  483. package/index243.mjs +0 -29
  484. package/index244.js +0 -1
  485. package/index244.mjs +0 -4
  486. package/index245.js +0 -1
  487. package/index245.mjs +0 -91
  488. package/index246.js +0 -1
  489. package/index246.mjs +0 -22
  490. package/index247.js +0 -1
  491. package/index247.mjs +0 -4
  492. package/index248.js +0 -1
  493. package/index248.mjs +0 -40
  494. package/index249.js +0 -1
  495. package/index249.mjs +0 -139
  496. package/index250.js +0 -1
  497. package/index250.mjs +0 -4
  498. package/index251.js +0 -1
  499. package/index251.mjs +0 -25
  500. package/index252.js +0 -1
  501. package/index252.mjs +0 -4
  502. package/index253.js +0 -1
  503. package/index253.mjs +0 -4
  504. package/index254.js +0 -1
  505. package/index254.mjs +0 -4
  506. package/index255.js +0 -1
  507. package/index255.mjs +0 -4
  508. package/index256.js +0 -1
  509. package/index256.mjs +0 -25
  510. package/index257.js +0 -1
  511. package/index257.mjs +0 -4
  512. package/index258.js +0 -1
  513. package/index258.mjs +0 -28
  514. package/index259.js +0 -1
  515. package/index259.mjs +0 -4
  516. package/index260.js +0 -1
  517. package/index260.mjs +0 -8
  518. package/index261.js +0 -1
  519. package/index261.mjs +0 -4
  520. package/index262.js +0 -1
  521. package/index262.mjs +0 -4
  522. package/index263.js +0 -1
  523. package/index263.mjs +0 -4
  524. package/index264.js +0 -1
  525. package/index264.mjs +0 -4
  526. package/index265.js +0 -1
  527. package/index265.mjs +0 -74
  528. package/index266.js +0 -1
  529. package/index266.mjs +0 -4
  530. package/index267.js +0 -1
  531. package/index267.mjs +0 -4
  532. package/index268.js +0 -1
  533. package/index268.mjs +0 -21
  534. package/index269.js +0 -1
  535. package/index269.mjs +0 -4
  536. package/index270.js +0 -1
  537. package/index270.mjs +0 -4
  538. package/index271.js +0 -1
  539. package/index271.mjs +0 -4
  540. package/index272.js +0 -1
  541. package/index272.mjs +0 -31
  542. package/index273.js +0 -1
  543. package/index273.mjs +0 -9
  544. package/index274.js +0 -1
  545. package/index274.mjs +0 -10
  546. package/index275.js +0 -1
  547. package/index275.mjs +0 -10
  548. package/index276.js +0 -1
  549. package/index276.mjs +0 -4
  550. package/index277.js +0 -1
  551. package/index277.mjs +0 -39
  552. package/index278.js +0 -1
  553. package/index278.mjs +0 -4
  554. package/index279.js +0 -1
  555. package/index279.mjs +0 -7
  556. package/index280.js +0 -1
  557. package/index280.mjs +0 -8
  558. package/index281.js +0 -1
  559. package/index281.mjs +0 -12
  560. package/index282.js +0 -1
  561. package/index282.mjs +0 -4
  562. package/index283.js +0 -1
  563. package/index283.mjs +0 -20
  564. package/index284.js +0 -1
  565. package/index284.mjs +0 -33
  566. package/index285.js +0 -1
  567. package/index285.mjs +0 -4
  568. package/index286.js +0 -1
  569. package/index286.mjs +0 -4
package/index135.mjs CHANGED
@@ -1,23 +1,97 @@
1
- import { generateId as i } from "./index260.mjs";
2
- import { useLabels as n, mergeProps as c } from "@react-aria/utils";
3
- import { useHasTabbableChild as f } from "@react-aria/focus";
4
- function m(a, e, l) {
5
- let r = f(l) ? void 0 : 0;
6
- var d;
7
- const b = i(e, (d = a.id) !== null && d !== void 0 ? d : e == null ? void 0 : e.selectedKey, "tabpanel"), o = n({
8
- ...a,
9
- id: b,
10
- "aria-labelledby": i(e, e == null ? void 0 : e.selectedKey, "tab")
1
+ import { isNonContiguousSelectionModifier as U, isCtrlKeyPressed as R } from "./index192.mjs";
2
+ import { focusSafely as V } from "@react-aria/focus";
3
+ import { useRouter as N, openLink as j, mergeProps as q } from "@react-aria/utils";
4
+ import { usePress as z } from "./index190.mjs";
5
+ import { useLongPress as G } from "./index195.mjs";
6
+ import { useEffect as H, useRef as h } from "react";
7
+ function _(r) {
8
+ let { selectionManager: t, key: o, ref: c, shouldSelectOnPressUp: K, shouldUseVirtualFocus: d, focus: $, isDisabled: n, onAction: g, allowsDifferentPressOrigin: O, linkBehavior: a = "action" } = r, T = N(), p = (e) => {
9
+ if (e.pointerType === "keyboard" && U(e)) t.toggleSelection(o);
10
+ else {
11
+ if (t.selectionMode === "none") return;
12
+ if (t.isLink(o)) {
13
+ if (a === "selection") {
14
+ let f = t.getItemProps(o);
15
+ T.open(c.current, e, f.href, f.routerOptions), t.setSelectedKeys(t.selectedKeys);
16
+ return;
17
+ } else if (a === "override" || a === "none") return;
18
+ }
19
+ t.selectionMode === "single" ? t.isSelected(o) && !t.disallowEmptySelection ? t.toggleSelection(o) : t.replaceSelection(o) : e && e.shiftKey ? t.extendSelection(o) : t.selectionBehavior === "toggle" || e && (R(e) || e.pointerType === "touch" || e.pointerType === "virtual") ? t.toggleSelection(o) : t.replaceSelection(o);
20
+ }
21
+ };
22
+ H(() => {
23
+ o === t.focusedKey && t.isFocused && !d && ($ ? $() : document.activeElement !== c.current && V(c.current));
24
+ }, [
25
+ c,
26
+ o,
27
+ t.focusedKey,
28
+ t.childFocusStrategy,
29
+ t.isFocused,
30
+ d
31
+ ]), n = n || t.isDisabled(o);
32
+ let y = {};
33
+ !d && !n ? y = {
34
+ tabIndex: o === t.focusedKey ? 0 : -1,
35
+ onFocus(e) {
36
+ e.target === c.current && t.setFocusedKey(o);
37
+ }
38
+ } : n && (y.onMouseDown = (e) => {
39
+ e.preventDefault();
11
40
  });
41
+ let L = t.isLink(o) && a === "override", D = t.isLink(o) && a !== "selection" && a !== "none", i = !n && t.canSelectItem(o) && !L, S = (g || D) && !n, l = S && (t.selectionBehavior === "replace" ? !i : !i || t.isEmpty), v = S && i && t.selectionBehavior === "replace", u = l || v, P = h(null), m = u && i, k = h(!1), F = h(!1), b = (e) => {
42
+ if (g && g(), D) {
43
+ let f = t.getItemProps(o);
44
+ T.open(c.current, e, f.href, f.routerOptions);
45
+ }
46
+ }, s = {};
47
+ K ? (s.onPressStart = (e) => {
48
+ P.current = e.pointerType, k.current = m, e.pointerType === "keyboard" && (!u || A()) && p(e);
49
+ }, O ? (s.onPressUp = l ? null : (e) => {
50
+ e.pointerType !== "keyboard" && i && p(e);
51
+ }, s.onPress = l ? b : null) : s.onPress = (e) => {
52
+ if (l || v && e.pointerType !== "mouse") {
53
+ if (e.pointerType === "keyboard" && !w()) return;
54
+ b(e);
55
+ } else e.pointerType !== "keyboard" && i && p(e);
56
+ }) : (s.onPressStart = (e) => {
57
+ P.current = e.pointerType, k.current = m, F.current = l, i && (e.pointerType === "mouse" && !l || e.pointerType === "keyboard" && (!S || A())) && p(e);
58
+ }, s.onPress = (e) => {
59
+ (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && u && w() || e.pointerType === "mouse" && F.current) && (u ? b(e) : i && p(e));
60
+ }), y["data-key"] = o, s.preventFocusOnPress = d;
61
+ let { pressProps: x, isPressed: C } = z(s), E = v ? (e) => {
62
+ P.current === "mouse" && (e.stopPropagation(), e.preventDefault(), b(e));
63
+ } : void 0, { longPressProps: B } = G({
64
+ isDisabled: !m,
65
+ onLongPress(e) {
66
+ e.pointerType === "touch" && (p(e), t.setSelectionBehavior("toggle"));
67
+ }
68
+ }), I = (e) => {
69
+ P.current === "touch" && k.current && e.preventDefault();
70
+ }, M = t.isLink(o) ? (e) => {
71
+ j.isOpening || e.preventDefault();
72
+ } : void 0;
12
73
  return {
13
- tabPanelProps: c(o, {
14
- tabIndex: r,
15
- role: "tabpanel",
16
- "aria-describedby": a["aria-describedby"],
17
- "aria-details": a["aria-details"]
18
- })
74
+ itemProps: q(y, i || l ? x : {}, m ? B : {}, {
75
+ onDoubleClick: E,
76
+ onDragStartCapture: I,
77
+ onClick: M
78
+ }),
79
+ isPressed: C,
80
+ isSelected: t.isSelected(o),
81
+ isFocused: t.isFocused && t.focusedKey === o,
82
+ isDisabled: n,
83
+ allowsSelection: i,
84
+ hasAction: u
19
85
  };
20
86
  }
87
+ function w() {
88
+ let r = window.event;
89
+ return (r == null ? void 0 : r.key) === "Enter";
90
+ }
91
+ function A() {
92
+ let r = window.event;
93
+ return (r == null ? void 0 : r.key) === " " || (r == null ? void 0 : r.code) === "Space";
94
+ }
21
95
  export {
22
- m as useTabPanel
96
+ _ as useSelectableItem
23
97
  };
package/index136.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}exports.getDefaultExportFromCjs=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index191.js"),b=require("./index196.js"),u=require("@react-aria/i18n"),g=require("react");function y(l){let{selectionManager:t,collection:o,disabledKeys:a,ref:e,keyboardDelegate:r}=l,i=u.useCollator({usage:"search",sensitivity:"base"}),s=t.disabledBehavior,c=g.useMemo(()=>r||new b.ListKeyboardDelegate({collection:o,disabledKeys:a,disabledBehavior:s,ref:e,collator:i}),[r,o,a,e,i,s]),{collectionProps:n}=d.useSelectableCollection({...l,ref:e,selectionManager:t,keyboardDelegate:c});return{listProps:n}}exports.useSelectableList=y;
package/index136.mjs CHANGED
@@ -1,6 +1,34 @@
1
- function e(t) {
2
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1
+ import { useSelectableCollection as b } from "./index191.mjs";
2
+ import { ListKeyboardDelegate as n } from "./index196.mjs";
3
+ import { useCollator as f } from "@react-aria/i18n";
4
+ import { useMemo as g } from "react";
5
+ function u(a) {
6
+ let { selectionManager: o, collection: l, disabledKeys: t, ref: e, keyboardDelegate: r } = a, i = f({
7
+ usage: "search",
8
+ sensitivity: "base"
9
+ }), s = o.disabledBehavior, d = g(() => r || new n({
10
+ collection: l,
11
+ disabledKeys: t,
12
+ disabledBehavior: s,
13
+ ref: e,
14
+ collator: i
15
+ }), [
16
+ r,
17
+ l,
18
+ t,
19
+ e,
20
+ i,
21
+ s
22
+ ]), { collectionProps: c } = b({
23
+ ...a,
24
+ ref: e,
25
+ selectionManager: o,
26
+ keyboardDelegate: d
27
+ });
28
+ return {
29
+ listProps: c
30
+ };
3
31
  }
4
32
  export {
5
- e as getDefaultExportFromCjs
33
+ u as useSelectableList
6
34
  };
package/index137.js CHANGED
@@ -1,4 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("./index159.js");require("./index160.js");const ae=require("react/jsx-runtime"),fe=require("react"),de=require("./index161.js"),pe=require("./index162.js"),he=require("./index163.js"),_e=require("./index164.js"),me=require("./index165.js"),ve=require("./index166.js"),we=require("./index167.js"),ge=require("./index168.js"),ye=require("./index169.js"),be=require("./index170.js"),Ee=require("./index171.js"),qe=require("./index172.js");(function(z,p){"use client";Object.defineProperty(p,"__esModule",{value:!0}),Object.defineProperty(p,"default",{enumerable:!0,get:function(){return se}});const J=qe.__exports,D=ae,l=J._(fe),O=de.__require(),S=pe.__require(),Q=he.__require(),X=_e.__require(),Y=me.__require(),Z=ve.__require(),ee=we.__require(),te=ge.__require(),re=ye.__require(),oe=be.__require(),U=Ee.__require(),V=new Set;function j(o,r,a,n,s,f){if(typeof window>"u"||!f&&!(0,S.isLocalURL)(r))return;if(!n.bypassPrefetchedCheck){const g=typeof n.locale<"u"?n.locale:"locale"in o?o.locale:void 0,y=r+"%"+a+"%"+g;if(V.has(y))return;V.add(y)}const b=f?o.prefetch(r,s):o.prefetch(r,a,n);Promise.resolve(b).catch(g=>{if(process.env.NODE_ENV!=="production")throw g})}function ne(o){const a=o.currentTarget.getAttribute("target");return a&&a!=="_self"||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey||o.nativeEvent&&o.nativeEvent.which===2}function ie(o,r,a,n,s,f,b,g,y){const{nodeName:T}=o.currentTarget;if(T.toUpperCase()==="A"&&(ne(o)||!y&&!(0,S.isLocalURL)(a)))return;o.preventDefault();const C=()=>{const h=b??!0;"beforePopState"in r?r[s?"replace":"push"](a,n,{shallow:f,locale:g,scroll:h}):r[s?"replace":"push"](n||a,{scroll:h})};y?l.default.startTransition(C):C()}function H(o){return typeof o=="string"?o:(0,Q.formatUrl)(o)}const se=l.default.forwardRef(function(r,a){let n;const{href:s,as:f,children:b,prefetch:g=null,passHref:y,replace:T,shallow:A,scroll:C,locale:h,onClick:k,onMouseEnter:M,onTouchStart:B,legacyBehavior:d=!1,...ce}=r;n=b,d&&(typeof n=="string"||typeof n=="number")&&(n=(0,D.jsx)("a",{children:n}));const i=l.default.useContext(Z.RouterContext),le=l.default.useContext(ee.AppRouterContext),_=i??le,m=!i,L=g!==!1,x=g===null?U.PrefetchKind.AUTO:U.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let e=function(t){return new Error("Failed prop type: The prop `"+t.key+"` expects a "+t.expected+" in `<Link>`, but got `"+t.actual+"` instead."+(typeof window<"u"?`
2
- Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(t=>{if(t==="href"&&(r[t]==null||typeof r[t]!="string"&&typeof r[t]!="object"))throw e({key:t,expected:"`string` or `object`",actual:r[t]===null?"null":typeof r[t]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(t=>{const w=typeof r[t];if(t==="as"){if(r[t]&&w!=="string"&&w!=="object")throw e({key:t,expected:"`string` or `object`",actual:w})}else if(t==="locale"){if(r[t]&&w!=="string")throw e({key:t,expected:"`string`",actual:w})}else if(t==="onClick"||t==="onMouseEnter"||t==="onTouchStart"){if(r[t]&&w!=="function")throw e({key:t,expected:"`function`",actual:w})}else if((t==="replace"||t==="scroll"||t==="shallow"||t==="passHref"||t==="prefetch"||t==="legacyBehavior")&&r[t]!=null&&w!=="boolean")throw e({key:t,expected:"`boolean`",actual:w})});const F=l.default.useRef(!1);r.prefetch&&!F.current&&!m&&(F.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&m&&!f){let e;if(typeof s=="string"?e=s:typeof s=="object"&&typeof s.pathname=="string"&&(e=s.pathname),e&&e.split("/").some(q=>q.startsWith("[")&&q.endsWith("]")))throw new Error("Dynamic href `"+e+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:v,as:u}=l.default.useMemo(()=>{if(!i){const q=H(s);return{href:q,as:f?H(f):q}}const[e,P]=(0,O.resolveHref)(i,s,!0);return{href:e,as:f?(0,O.resolveHref)(i,f):P||e}},[i,s,f]),K=l.default.useRef(v),G=l.default.useRef(u);let c;if(d)if(process.env.NODE_ENV==="development"){k&&console.warn('"onClick" was passed to <Link> with `href` of `'+s+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),M&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+s+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{c=l.default.Children.only(n)}catch{throw n?new Error("Multiple children were passed to <Link> with `href` of `"+s+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
3
- Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+s+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else c=l.default.Children.only(n);else if(process.env.NODE_ENV==="development"&&(n==null?void 0:n.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
4
- Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const E=d?c&&typeof c=="object"&&c.ref:a,[I,W,$]=(0,te.useIntersection)({rootMargin:"200px"}),ue=l.default.useCallback(e=>{(G.current!==u||K.current!==v)&&($(),G.current=u,K.current=v),I(e),E&&(typeof E=="function"?E(e):typeof E=="object"&&(E.current=e))},[u,E,v,$,I]);l.default.useEffect(()=>{process.env.NODE_ENV==="production"&&_&&(!W||!L||j(_,v,u,{locale:h},{kind:x},m))},[u,v,W,h,L,i==null?void 0:i.locale,_,m,x]);const N={ref:ue,onClick(e){if(process.env.NODE_ENV!=="production"&&!e)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!d&&typeof k=="function"&&k(e),d&&c.props&&typeof c.props.onClick=="function"&&c.props.onClick(e),_&&(e.defaultPrevented||ie(e,_,v,u,T,A,C,h,m))},onMouseEnter(e){!d&&typeof M=="function"&&M(e),d&&c.props&&typeof c.props.onMouseEnter=="function"&&c.props.onMouseEnter(e),_&&((!L||process.env.NODE_ENV==="development")&&m||j(_,v,u,{locale:h,priority:!0,bypassPrefetchedCheck:!0},{kind:x},m))},onTouchStart(e){!d&&typeof B=="function"&&B(e),d&&c.props&&typeof c.props.onTouchStart=="function"&&c.props.onTouchStart(e),_&&(!L&&m||j(_,v,u,{locale:h,priority:!0,bypassPrefetchedCheck:!0},{kind:x},m))}};if((0,X.isAbsoluteUrl)(u))N.href=u;else if(!d||y||c.type==="a"&&!("href"in c.props)){const e=typeof h<"u"?h:i==null?void 0:i.locale,P=(i==null?void 0:i.isLocaleDomain)&&(0,re.getDomainLocale)(u,e,i==null?void 0:i.locales,i==null?void 0:i.domainLocales);N.href=P||(0,oe.addBasePath)((0,Y.addLocale)(u,e,i==null?void 0:i.defaultLocale))}return d?l.default.cloneElement(c,N):(0,D.jsx)("a",{...ce,...N,children:n})});(typeof p.default=="function"||typeof p.default=="object"&&p.default!==null)&&typeof p.default.__esModule>"u"&&(Object.defineProperty(p.default,"__esModule",{value:!0}),Object.assign(p.default,p),z.exports=p.default)})(R.__module,R.__module.exports);var Pe=R.__module.exports;exports.linkExports=Pe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),v={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},x={...v,customError:!0,valid:!1},c={isInvalid:!1,validationDetails:v,validationErrors:[]},h=n.createContext({}),I="__formValidationState"+Date.now();function R(e){if(e[I]){let{realtimeValidation:a,displayValidation:t,updateValidation:i,resetValidation:s,commitValidation:l}=e[I];return{realtimeValidation:a,displayValidation:t,updateValidation:i,resetValidation:s,commitValidation:l}}return w(e)}function w(e){let{isInvalid:a,validationState:t,name:i,value:s,builtinValidation:l,validate:d,validationBehavior:o="aria"}=e;t&&(a||(a=t==="invalid"));let V=a!==void 0?{isInvalid:a,validationErrors:[],validationDetails:x}:null,m=n.useMemo(()=>T(F(d,s)),[d,s]);l!=null&&l.validationDetails.valid&&(l=null);let u=n.useContext(h),A=n.useMemo(()=>i?Array.isArray(i)?i.flatMap(r=>D(u[r])):D(u[i]):[],[u,i]),[C,L]=n.useState(u),[g,$]=n.useState(!1);u!==C&&(L(u),$(!1));let b=n.useMemo(()=>T(g?[]:A),[g,A]),M=n.useRef(c),[E,p]=n.useState(c),f=n.useRef(c),_=()=>{if(!O)return;S(!1);let r=m||l||M.current;y(r,f.current)||(f.current=r,p(r))},[O,S]=n.useState(!1);return n.useEffect(_),{realtimeValidation:V||b||m||l||c,displayValidation:o==="native"?V||b||E:V||b||m||l||E,updateValidation(r){o==="aria"&&!y(E,r)?p(r):M.current=r},resetValidation(){let r=c;y(r,f.current)||(f.current=r,p(r)),o==="native"&&S(!1),$(!0)},commitValidation(){o==="native"&&S(!0),$(!0)}}}function D(e){return e?Array.isArray(e)?e:[e]:[]}function F(e,a){if(typeof e=="function"){let t=e(a);if(t&&typeof t!="boolean")return D(t)}return[]}function T(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:x}:null}function y(e,a){return e===a?!0:e&&a&&e.isInvalid===a.isInvalid&&e.validationErrors.length===a.validationErrors.length&&e.validationErrors.every((t,i)=>t===a.validationErrors[i])&&Object.entries(e.validationDetails).every(([t,i])=>a.validationDetails[t]===i)}function U(...e){let a=new Set,t=!1,i={...v};for(let d of e){var s,l;for(let o of d.validationErrors)a.add(o);t||(t=d.isInvalid);for(let o in i)(s=i)[l=o]||(s[l]=d.validationDetails[o])}return i.valid=!t,{isInvalid:t,validationErrors:[...a],validationDetails:i}}exports.DEFAULT_VALIDATION_RESULT=c;exports.FormValidationContext=h;exports.VALID_VALIDITY_STATE=v;exports.mergeValidation=U;exports.privateValidationStateProp=I;exports.useFormValidationState=R;
package/index137.mjs CHANGED
@@ -1,249 +1,124 @@
1
- import { __module as M } from "./index159.mjs";
2
- import "./index160.mjs";
3
- import ue from "react/jsx-runtime";
4
- import fe from "react";
5
- import { __require as de } from "./index161.mjs";
6
- import { __require as pe } from "./index162.mjs";
7
- import { __require as he } from "./index163.mjs";
8
- import { __require as me } from "./index164.mjs";
9
- import { __require as _e } from "./index165.mjs";
10
- import { __require as ve } from "./index166.mjs";
11
- import { __require as we } from "./index167.mjs";
12
- import { __require as ge } from "./index168.mjs";
13
- import { __require as ye } from "./index169.mjs";
14
- import { __require as Ee } from "./index170.mjs";
15
- import { __require as be } from "./index171.mjs";
16
- import { __exports as Pe } from "./index172.mjs";
17
- (function(z, p) {
18
- "use client";
19
- Object.defineProperty(p, "__esModule", {
20
- value: !0
21
- }), Object.defineProperty(p, "default", {
22
- enumerable: !0,
23
- get: function() {
24
- return se;
25
- }
26
- });
27
- const J = Pe, D = ue, a = /* @__PURE__ */ J._(fe), O = de(), U = pe(), Q = he(), X = me(), Y = _e(), Z = ve(), ee = we(), te = ge(), re = ye(), oe = Ee(), A = be(), S = /* @__PURE__ */ new Set();
28
- function j(o, r, u, n, s, f) {
29
- if (typeof window > "u" || !f && !(0, U.isLocalURL)(r))
30
- return;
31
- if (!n.bypassPrefetchedCheck) {
32
- const g = (
33
- // Let the link's locale prop override the default router locale.
34
- typeof n.locale < "u" ? n.locale : "locale" in o ? o.locale : void 0
35
- ), y = r + "%" + u + "%" + g;
36
- if (S.has(y))
37
- return;
38
- S.add(y);
39
- }
40
- const E = f ? o.prefetch(r, s) : o.prefetch(r, u, n);
41
- Promise.resolve(E).catch((g) => {
42
- if (process.env.NODE_ENV !== "production")
43
- throw g;
44
- });
45
- }
46
- function ne(o) {
47
- const u = o.currentTarget.getAttribute("target");
48
- return u && u !== "_self" || o.metaKey || o.ctrlKey || o.shiftKey || o.altKey || // triggers resource download
49
- o.nativeEvent && o.nativeEvent.which === 2;
50
- }
51
- function ie(o, r, u, n, s, f, E, g, y) {
52
- const { nodeName: R } = o.currentTarget;
53
- if (R.toUpperCase() === "A" && (ne(o) || // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.
54
- !y && !(0, U.isLocalURL)(u)))
55
- return;
56
- o.preventDefault();
57
- const C = () => {
58
- const h = E ?? !0;
59
- "beforePopState" in r ? r[s ? "replace" : "push"](u, n, {
60
- shallow: f,
61
- locale: g,
62
- scroll: h
63
- }) : r[s ? "replace" : "push"](n || u, {
64
- scroll: h
65
- });
1
+ import { createContext as O, useMemo as I, useContext as U, useState as f, useRef as T, useEffect as R } from "react";
2
+ const D = {
3
+ badInput: !1,
4
+ customError: !1,
5
+ patternMismatch: !1,
6
+ rangeOverflow: !1,
7
+ rangeUnderflow: !1,
8
+ stepMismatch: !1,
9
+ tooLong: !1,
10
+ tooShort: !1,
11
+ typeMismatch: !1,
12
+ valueMissing: !1,
13
+ valid: !0
14
+ }, L = {
15
+ ...D,
16
+ customError: !0,
17
+ valid: !1
18
+ }, c = {
19
+ isInvalid: !1,
20
+ validationDetails: D,
21
+ validationErrors: []
22
+ }, B = O({}), h = "__formValidationState" + Date.now();
23
+ function P(a) {
24
+ if (a[h]) {
25
+ let { realtimeValidation: e, displayValidation: t, updateValidation: i, resetValidation: o, commitValidation: l } = a[h];
26
+ return {
27
+ realtimeValidation: e,
28
+ displayValidation: t,
29
+ updateValidation: i,
30
+ resetValidation: o,
31
+ commitValidation: l
66
32
  };
67
- y ? a.default.startTransition(C) : C();
68
- }
69
- function V(o) {
70
- return typeof o == "string" ? o : (0, Q.formatUrl)(o);
71
33
  }
72
- const se = /* @__PURE__ */ a.default.forwardRef(function(r, u) {
73
- let n;
74
- const { href: s, as: f, children: E, prefetch: g = null, passHref: y, replace: R, shallow: H, scroll: C, locale: h, onClick: T, onMouseEnter: k, onTouchStart: B, legacyBehavior: d = !1, ...ce } = r;
75
- n = E, d && (typeof n == "string" || typeof n == "number") && (n = /* @__PURE__ */ (0, D.jsx)("a", {
76
- children: n
77
- }));
78
- const i = a.default.useContext(Z.RouterContext), ae = a.default.useContext(ee.AppRouterContext), m = i ?? ae, _ = !i, L = g !== !1, x = g === null ? A.PrefetchKind.AUTO : A.PrefetchKind.FULL;
79
- if (process.env.NODE_ENV !== "production") {
80
- let e = function(t) {
81
- return new Error("Failed prop type: The prop `" + t.key + "` expects a " + t.expected + " in `<Link>`, but got `" + t.actual + "` instead." + (typeof window < "u" ? `
82
- Open your browser's console to view the Component stack trace.` : ""));
83
- };
84
- Object.keys({
85
- href: !0
86
- }).forEach((t) => {
87
- if (t === "href" && (r[t] == null || typeof r[t] != "string" && typeof r[t] != "object"))
88
- throw e({
89
- key: t,
90
- expected: "`string` or `object`",
91
- actual: r[t] === null ? "null" : typeof r[t]
92
- });
93
- }), Object.keys({
94
- as: !0,
95
- replace: !0,
96
- scroll: !0,
97
- shallow: !0,
98
- passHref: !0,
99
- prefetch: !0,
100
- locale: !0,
101
- onClick: !0,
102
- onMouseEnter: !0,
103
- onTouchStart: !0,
104
- legacyBehavior: !0
105
- }).forEach((t) => {
106
- const w = typeof r[t];
107
- if (t === "as") {
108
- if (r[t] && w !== "string" && w !== "object")
109
- throw e({
110
- key: t,
111
- expected: "`string` or `object`",
112
- actual: w
113
- });
114
- } else if (t === "locale") {
115
- if (r[t] && w !== "string")
116
- throw e({
117
- key: t,
118
- expected: "`string`",
119
- actual: w
120
- });
121
- } else if (t === "onClick" || t === "onMouseEnter" || t === "onTouchStart") {
122
- if (r[t] && w !== "function")
123
- throw e({
124
- key: t,
125
- expected: "`function`",
126
- actual: w
127
- });
128
- } else if ((t === "replace" || t === "scroll" || t === "shallow" || t === "passHref" || t === "prefetch" || t === "legacyBehavior") && r[t] != null && w !== "boolean")
129
- throw e({
130
- key: t,
131
- expected: "`boolean`",
132
- actual: w
133
- });
134
- });
135
- const $ = a.default.useRef(!1);
136
- r.prefetch && !$.current && !_ && ($.current = !0, console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"));
34
+ return Q(a);
35
+ }
36
+ function Q(a) {
37
+ let { isInvalid: e, validationState: t, name: i, value: o, builtinValidation: l, validate: d, validationBehavior: n = "aria" } = a;
38
+ t && (e || (e = t === "invalid"));
39
+ let v = e !== void 0 ? {
40
+ isInvalid: e,
41
+ validationErrors: [],
42
+ validationDetails: L
43
+ } : null, V = I(() => C(Y(d, o)), [
44
+ d,
45
+ o
46
+ ]);
47
+ l != null && l.validationDetails.valid && (l = null);
48
+ let s = U(B), A = I(() => i ? Array.isArray(i) ? i.flatMap((r) => S(s[r])) : S(s[i]) : [], [
49
+ s,
50
+ i
51
+ ]), [M, _] = f(s), [x, m] = f(!1);
52
+ s !== M && (_(s), m(!1));
53
+ let $ = I(() => C(x ? [] : A), [
54
+ x,
55
+ A
56
+ ]), g = T(c), [b, E] = f(c), u = T(c), w = () => {
57
+ if (!F) return;
58
+ p(!1);
59
+ let r = V || l || g.current;
60
+ y(r, u.current) || (u.current = r, E(r));
61
+ }, [F, p] = f(!1);
62
+ return R(w), {
63
+ realtimeValidation: v || $ || V || l || c,
64
+ displayValidation: n === "native" ? v || $ || b : v || $ || V || l || b,
65
+ updateValidation(r) {
66
+ n === "aria" && !y(b, r) ? E(r) : g.current = r;
67
+ },
68
+ resetValidation() {
69
+ let r = c;
70
+ y(r, u.current) || (u.current = r, E(r)), n === "native" && p(!1), m(!0);
71
+ },
72
+ commitValidation() {
73
+ n === "native" && p(!0), m(!0);
137
74
  }
138
- if (process.env.NODE_ENV !== "production" && _ && !f) {
139
- let e;
140
- if (typeof s == "string" ? e = s : typeof s == "object" && typeof s.pathname == "string" && (e = s.pathname), e && e.split("/").some((P) => P.startsWith("[") && P.endsWith("]")))
141
- throw new Error("Dynamic href `" + e + "` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href");
142
- }
143
- const { href: v, as: l } = a.default.useMemo(() => {
144
- if (!i) {
145
- const P = V(s);
146
- return {
147
- href: P,
148
- as: f ? V(f) : P
149
- };
150
- }
151
- const [e, q] = (0, O.resolveHref)(i, s, !0);
152
- return {
153
- href: e,
154
- as: f ? (0, O.resolveHref)(i, f) : q || e
155
- };
156
- }, [
157
- i,
158
- s,
159
- f
160
- ]), K = a.default.useRef(v), G = a.default.useRef(l);
161
- let c;
162
- if (d)
163
- if (process.env.NODE_ENV === "development") {
164
- T && console.warn('"onClick" was passed to <Link> with `href` of `' + s + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'), k && console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + s + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
165
- try {
166
- c = a.default.Children.only(n);
167
- } catch {
168
- throw n ? new Error("Multiple children were passed to <Link> with `href` of `" + s + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window < "u" ? `
169
- Open your browser's console to view the Component stack trace.` : "")) : new Error("No children were passed to <Link> with `href` of `" + s + "` but one child is required https://nextjs.org/docs/messages/link-no-children");
170
- }
171
- } else
172
- c = a.default.Children.only(n);
173
- else if (process.env.NODE_ENV === "development" && (n == null ? void 0 : n.type) === "a")
174
- throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
175
- Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);
176
- const b = d ? c && typeof c == "object" && c.ref : u, [I, F, W] = (0, te.useIntersection)({
177
- rootMargin: "200px"
178
- }), le = a.default.useCallback((e) => {
179
- (G.current !== l || K.current !== v) && (W(), G.current = l, K.current = v), I(e), b && (typeof b == "function" ? b(e) : typeof b == "object" && (b.current = e));
180
- }, [
181
- l,
182
- b,
183
- v,
184
- W,
185
- I
186
- ]);
187
- a.default.useEffect(() => {
188
- process.env.NODE_ENV === "production" && m && (!F || !L || j(m, v, l, {
189
- locale: h
190
- }, {
191
- kind: x
192
- }, _));
193
- }, [
194
- l,
195
- v,
196
- F,
197
- h,
198
- L,
199
- i == null ? void 0 : i.locale,
200
- m,
201
- _,
202
- x
203
- ]);
204
- const N = {
205
- ref: le,
206
- onClick(e) {
207
- if (process.env.NODE_ENV !== "production" && !e)
208
- throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');
209
- !d && typeof T == "function" && T(e), d && c.props && typeof c.props.onClick == "function" && c.props.onClick(e), m && (e.defaultPrevented || ie(e, m, v, l, R, H, C, h, _));
210
- },
211
- onMouseEnter(e) {
212
- !d && typeof k == "function" && k(e), d && c.props && typeof c.props.onMouseEnter == "function" && c.props.onMouseEnter(e), m && ((!L || process.env.NODE_ENV === "development") && _ || j(m, v, l, {
213
- locale: h,
214
- priority: !0,
215
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
216
- bypassPrefetchedCheck: !0
217
- }, {
218
- kind: x
219
- }, _));
220
- },
221
- onTouchStart(e) {
222
- !d && typeof B == "function" && B(e), d && c.props && typeof c.props.onTouchStart == "function" && c.props.onTouchStart(e), m && (!L && _ || j(m, v, l, {
223
- locale: h,
224
- priority: !0,
225
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
226
- bypassPrefetchedCheck: !0
227
- }, {
228
- kind: x
229
- }, _));
230
- }
231
- };
232
- if ((0, X.isAbsoluteUrl)(l))
233
- N.href = l;
234
- else if (!d || y || c.type === "a" && !("href" in c.props)) {
235
- const e = typeof h < "u" ? h : i == null ? void 0 : i.locale, q = (i == null ? void 0 : i.isLocaleDomain) && (0, re.getDomainLocale)(l, e, i == null ? void 0 : i.locales, i == null ? void 0 : i.domainLocales);
236
- N.href = q || (0, oe.addBasePath)((0, Y.addLocale)(l, e, i == null ? void 0 : i.defaultLocale));
237
- }
238
- return d ? /* @__PURE__ */ a.default.cloneElement(c, N) : /* @__PURE__ */ (0, D.jsx)("a", {
239
- ...ce,
240
- ...N,
241
- children: n
242
- });
243
- });
244
- (typeof p.default == "function" || typeof p.default == "object" && p.default !== null) && typeof p.default.__esModule > "u" && (Object.defineProperty(p.default, "__esModule", { value: !0 }), Object.assign(p.default, p), z.exports = p.default);
245
- })(M, M.exports);
246
- var Ge = M.exports;
75
+ };
76
+ }
77
+ function S(a) {
78
+ return a ? Array.isArray(a) ? a : [
79
+ a
80
+ ] : [];
81
+ }
82
+ function Y(a, e) {
83
+ if (typeof a == "function") {
84
+ let t = a(e);
85
+ if (t && typeof t != "boolean") return S(t);
86
+ }
87
+ return [];
88
+ }
89
+ function C(a) {
90
+ return a.length ? {
91
+ isInvalid: !0,
92
+ validationErrors: a,
93
+ validationDetails: L
94
+ } : null;
95
+ }
96
+ function y(a, e) {
97
+ return a === e ? !0 : a && e && a.isInvalid === e.isInvalid && a.validationErrors.length === e.validationErrors.length && a.validationErrors.every((t, i) => t === e.validationErrors[i]) && Object.entries(a.validationDetails).every(([t, i]) => e.validationDetails[t] === i);
98
+ }
99
+ function k(...a) {
100
+ let e = /* @__PURE__ */ new Set(), t = !1, i = {
101
+ ...D
102
+ };
103
+ for (let d of a) {
104
+ var o, l;
105
+ for (let n of d.validationErrors) e.add(n);
106
+ t || (t = d.isInvalid);
107
+ for (let n in i) (o = i)[l = n] || (o[l] = d.validationDetails[n]);
108
+ }
109
+ return i.valid = !t, {
110
+ isInvalid: t,
111
+ validationErrors: [
112
+ ...e
113
+ ],
114
+ validationDetails: i
115
+ };
116
+ }
247
117
  export {
248
- Ge as l
118
+ c as DEFAULT_VALIDATION_RESULT,
119
+ B as FormValidationContext,
120
+ D as VALID_VALIDITY_STATE,
121
+ k as mergeValidation,
122
+ h as privateValidationStateProp,
123
+ P as useFormValidationState
249
124
  };
package/index138.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@react-aria/utils"),O=require("@react-aria/focus"),m=require("./index232.js");function S(s,o){let{elementType:r="button",isDisabled:e,onPress:l,onPressStart:u,onPressEnd:P,onPressUp:p,onPressChange:c,preventFocusOnPress:b,allowFocusWhenDisabled:f,onClick:i,href:g,target:h,rel:y,type:d="button"}=s,n;r==="button"?n={type:d,disabled:e}:n={role:"button",tabIndex:e?void 0:0,href:r==="a"&&e?void 0:g,target:r==="a"?h:void 0,type:r==="input"?d:void 0,disabled:r==="input"?e:void 0,"aria-disabled":!e||r==="input"?void 0:e,rel:r==="a"?y:void 0};let{pressProps:C,isPressed:x}=m.usePress({onPressStart:u,onPressEnd:P,onPressChange:c,onPress:l,onPressUp:p,isDisabled:e,preventFocusOnPress:b,ref:o}),{focusableProps:t}=O.useFocusable(s,o);f&&(t.tabIndex=e?-1:t.tabIndex);let D=a.mergeProps(t,C,a.filterDOMProps(s,{labelable:!0}));return{isPressed:x,buttonProps:a.mergeProps(n,D,{"aria-haspopup":s["aria-haspopup"],"aria-expanded":s["aria-expanded"],"aria-controls":s["aria-controls"],"aria-pressed":s["aria-pressed"],onClick:F=>{i&&(i(F),console.warn("onClick is deprecated, please use onPress"))}})}}exports.useButton=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function C(o,b,u){let[p,s]=l.useState(o||b),i=l.useRef(o!==void 0),e=o!==void 0;l.useEffect(()=>{let t=i.current;t!==e&&console.warn(`WARN: A component changed from ${t?"controlled":"uncontrolled"} to ${e?"controlled":"uncontrolled"}.`),i.current=e},[e]);let n=e?o:p,S=l.useCallback((t,...f)=>{let a=(r,...c)=>{u&&(Object.is(n,r)||u(r,...c)),e||(n=r)};typeof t=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s((c,...m)=>{let d=t(e?n:c,...m);return a(d,...f),e?c:d})):(e||s(t),a(t,...f))},[e,n,u]);return[n,S]}exports.useControlledState=C;