@rpcbase/ui 0.238.0 → 0.240.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
  2. package/dist/components/I18nField/index.d.ts +2 -1
  3. package/dist/components/I18nField/index.d.ts.map +1 -1
  4. package/dist/helpers/useMapsLibrary.d.ts.map +1 -1
  5. package/dist/index106.js +36 -36
  6. package/dist/index11.js +373 -335
  7. package/dist/index11.js.map +1 -1
  8. package/dist/index118.js +6 -6
  9. package/dist/index121.js +10 -10
  10. package/dist/index123.js +2 -2
  11. package/dist/index124.js +3 -3
  12. package/dist/index125.js +1 -1
  13. package/dist/index127.js +2 -2
  14. package/dist/index129.js +2 -2
  15. package/dist/index172.js +3 -3
  16. package/dist/index175.js +1 -1
  17. package/dist/index176.js +4 -4
  18. package/dist/index178.js +1 -1
  19. package/dist/index182.js +2 -2
  20. package/dist/index184.js +12 -12
  21. package/dist/index185.js +1 -1
  22. package/dist/index187.js +6 -6
  23. package/dist/index189.js +6 -6
  24. package/dist/index190.js +5 -5
  25. package/dist/index193.js +3 -3
  26. package/dist/index194.js +5 -5
  27. package/dist/index196.js +20 -59
  28. package/dist/index196.js.map +1 -1
  29. package/dist/index197.js +66 -8
  30. package/dist/index197.js.map +1 -1
  31. package/dist/index198.js +6 -87
  32. package/dist/index198.js.map +1 -1
  33. package/dist/index199.js +11 -19
  34. package/dist/index199.js.map +1 -1
  35. package/dist/index200.js +48 -14
  36. package/dist/index200.js.map +1 -1
  37. package/dist/index201.js +4 -6
  38. package/dist/index201.js.map +1 -1
  39. package/dist/index202.js +29 -5
  40. package/dist/index202.js.map +1 -1
  41. package/dist/index203.js +16 -6
  42. package/dist/index203.js.map +1 -1
  43. package/dist/index204.js +5 -4
  44. package/dist/index204.js.map +1 -1
  45. package/dist/index205.js +21 -6
  46. package/dist/index205.js.map +1 -1
  47. package/dist/index206.js +51 -16
  48. package/dist/index206.js.map +1 -1
  49. package/dist/index207.js +25 -4
  50. package/dist/index207.js.map +1 -1
  51. package/dist/index208.js +41 -4
  52. package/dist/index208.js.map +1 -1
  53. package/dist/index209.js +39 -12
  54. package/dist/index209.js.map +1 -1
  55. package/dist/index210.js +45 -10
  56. package/dist/index210.js.map +1 -1
  57. package/dist/index211.js +20 -13
  58. package/dist/index211.js.map +1 -1
  59. package/dist/index212.js +70 -13
  60. package/dist/index212.js.map +1 -1
  61. package/dist/index213.js +17 -4
  62. package/dist/index213.js.map +1 -1
  63. package/dist/index214.js +11 -5
  64. package/dist/index214.js.map +1 -1
  65. package/dist/index215.js +27 -6
  66. package/dist/index215.js.map +1 -1
  67. package/dist/index216.js +13 -5
  68. package/dist/index216.js.map +1 -1
  69. package/dist/index217.js +17 -53
  70. package/dist/index217.js.map +1 -1
  71. package/dist/index218.js +36 -8
  72. package/dist/index218.js.map +1 -1
  73. package/dist/index219.js +262 -4
  74. package/dist/index219.js.map +1 -1
  75. package/dist/index22.js.map +1 -1
  76. package/dist/index220.js +278 -4
  77. package/dist/index220.js.map +1 -1
  78. package/dist/index221.js +68 -8
  79. package/dist/index221.js.map +1 -1
  80. package/dist/index222.js +99 -4
  81. package/dist/index222.js.map +1 -1
  82. package/dist/index223.js +83 -4
  83. package/dist/index223.js.map +1 -1
  84. package/dist/index224.js +3 -3
  85. package/dist/index224.js.map +1 -1
  86. package/dist/index225.js +29 -10
  87. package/dist/index225.js.map +1 -1
  88. package/dist/index226.js +16 -9
  89. package/dist/index226.js.map +1 -1
  90. package/dist/index227.js +35 -10
  91. package/dist/index227.js.map +1 -1
  92. package/dist/index228.js +16 -10
  93. package/dist/index228.js.map +1 -1
  94. package/dist/index229.js +3 -10
  95. package/dist/index229.js.map +1 -1
  96. package/dist/index230.js +26 -9
  97. package/dist/index230.js.map +1 -1
  98. package/dist/index231.js +28 -6
  99. package/dist/index231.js.map +1 -1
  100. package/dist/index232.js +4 -6
  101. package/dist/index232.js.map +1 -1
  102. package/dist/index233.js +78 -4
  103. package/dist/index233.js.map +1 -1
  104. package/dist/index234.js +269 -5
  105. package/dist/index234.js.map +1 -1
  106. package/dist/index235.js +11 -6
  107. package/dist/index235.js.map +1 -1
  108. package/dist/index236.js +10 -5
  109. package/dist/index236.js.map +1 -1
  110. package/dist/index237.js +25 -29
  111. package/dist/index237.js.map +1 -1
  112. package/dist/index238.js +16 -12
  113. package/dist/index238.js.map +1 -1
  114. package/dist/index239.js +124 -24
  115. package/dist/index239.js.map +1 -1
  116. package/dist/index240.js +5 -5
  117. package/dist/index240.js.map +1 -1
  118. package/dist/index241.js +40 -16
  119. package/dist/index241.js.map +1 -1
  120. package/dist/index242.js +65 -7
  121. package/dist/index242.js.map +1 -1
  122. package/dist/index243.js +13 -10
  123. package/dist/index243.js.map +1 -1
  124. package/dist/index244.js +7 -10
  125. package/dist/index244.js.map +1 -1
  126. package/dist/index245.js +5 -21
  127. package/dist/index245.js.map +1 -1
  128. package/dist/index246.js +3 -10
  129. package/dist/index246.js.map +1 -1
  130. package/dist/index247.js +10 -9
  131. package/dist/index247.js.map +1 -1
  132. package/dist/index248.js +7 -9
  133. package/dist/index248.js.map +1 -1
  134. package/dist/index249.js +133 -4
  135. package/dist/index249.js.map +1 -1
  136. package/dist/index250.js +399 -5
  137. package/dist/index250.js.map +1 -1
  138. package/dist/index251.js +52 -16
  139. package/dist/index251.js.map +1 -1
  140. package/dist/index252.js +11 -9
  141. package/dist/index252.js.map +1 -1
  142. package/dist/index253.js +11 -18
  143. package/dist/index253.js.map +1 -1
  144. package/dist/index254.js +16 -15
  145. package/dist/index254.js.map +1 -1
  146. package/dist/index255.js +5 -12
  147. package/dist/index255.js.map +1 -1
  148. package/dist/index256.js +6 -20
  149. package/dist/index256.js.map +1 -1
  150. package/dist/index257.js +57 -65
  151. package/dist/index257.js.map +1 -1
  152. package/dist/index258.js +87 -6
  153. package/dist/index258.js.map +1 -1
  154. package/dist/index259.js +6 -11
  155. package/dist/index259.js.map +1 -1
  156. package/dist/index260.js +4 -50
  157. package/dist/index260.js.map +1 -1
  158. package/dist/index261.js +7 -4
  159. package/dist/index261.js.map +1 -1
  160. package/dist/index262.js +16 -29
  161. package/dist/index262.js.map +1 -1
  162. package/dist/index263.js +4 -16
  163. package/dist/index263.js.map +1 -1
  164. package/dist/index264.js +4 -5
  165. package/dist/index264.js.map +1 -1
  166. package/dist/index265.js +12 -21
  167. package/dist/index265.js.map +1 -1
  168. package/dist/index266.js +9 -51
  169. package/dist/index266.js.map +1 -1
  170. package/dist/index267.js +13 -25
  171. package/dist/index267.js.map +1 -1
  172. package/dist/index268.js +13 -41
  173. package/dist/index268.js.map +1 -1
  174. package/dist/index269.js +4 -39
  175. package/dist/index269.js.map +1 -1
  176. package/dist/index270.js +6 -45
  177. package/dist/index270.js.map +1 -1
  178. package/dist/index271.js +6 -20
  179. package/dist/index271.js.map +1 -1
  180. package/dist/index272.js +5 -70
  181. package/dist/index272.js.map +1 -1
  182. package/dist/index273.js +53 -16
  183. package/dist/index273.js.map +1 -1
  184. package/dist/index274.js +8 -11
  185. package/dist/index274.js.map +1 -1
  186. package/dist/index275.js +4 -27
  187. package/dist/index275.js.map +1 -1
  188. package/dist/index276.js +4 -13
  189. package/dist/index276.js.map +1 -1
  190. package/dist/index277.js +8 -18
  191. package/dist/index277.js.map +1 -1
  192. package/dist/index278.js +4 -36
  193. package/dist/index278.js.map +1 -1
  194. package/dist/index279.js +4 -262
  195. package/dist/index279.js.map +1 -1
  196. package/dist/index280.js +3 -278
  197. package/dist/index280.js.map +1 -1
  198. package/dist/index281.js +10 -68
  199. package/dist/index281.js.map +1 -1
  200. package/dist/index282.js +9 -99
  201. package/dist/index282.js.map +1 -1
  202. package/dist/index283.js +9 -83
  203. package/dist/index283.js.map +1 -1
  204. package/dist/index284.js +10 -3
  205. package/dist/index284.js.map +1 -1
  206. package/dist/index285.js +10 -29
  207. package/dist/index285.js.map +1 -1
  208. package/dist/index286.js +9 -16
  209. package/dist/index286.js.map +1 -1
  210. package/dist/index287.js +7 -35
  211. package/dist/index287.js.map +1 -1
  212. package/dist/index288.js +5 -16
  213. package/dist/index288.js.map +1 -1
  214. package/dist/index289.js +4 -3
  215. package/dist/index289.js.map +1 -1
  216. package/dist/index290.js +5 -26
  217. package/dist/index290.js.map +1 -1
  218. package/dist/index291.js +6 -28
  219. package/dist/index291.js.map +1 -1
  220. package/dist/index292.js +6 -4
  221. package/dist/index292.js.map +1 -1
  222. package/dist/index293.js +8 -78
  223. package/dist/index293.js.map +1 -1
  224. package/dist/index294.js +18 -268
  225. package/dist/index294.js.map +1 -1
  226. package/dist/index295.js +15 -10
  227. package/dist/index295.js.map +1 -1
  228. package/dist/index296.js +7 -10
  229. package/dist/index296.js.map +1 -1
  230. package/dist/index297.js +10 -25
  231. package/dist/index297.js.map +1 -1
  232. package/dist/index298.js +10 -16
  233. package/dist/index298.js.map +1 -1
  234. package/dist/index299.js +21 -125
  235. package/dist/index299.js.map +1 -1
  236. package/dist/index3.js.map +1 -1
  237. package/dist/index300.js +10 -5
  238. package/dist/index300.js.map +1 -1
  239. package/dist/index301.js +9 -40
  240. package/dist/index301.js.map +1 -1
  241. package/dist/index302.js +9 -65
  242. package/dist/index302.js.map +1 -1
  243. package/dist/index303.js +5 -14
  244. package/dist/index303.js.map +1 -1
  245. package/dist/index304.js +5 -7
  246. package/dist/index304.js.map +1 -1
  247. package/dist/index305.js +16 -5
  248. package/dist/index305.js.map +1 -1
  249. package/dist/index306.js +9 -3
  250. package/dist/index306.js.map +1 -1
  251. package/dist/index307.js +18 -10
  252. package/dist/index307.js.map +1 -1
  253. package/dist/index308.js +15 -7
  254. package/dist/index308.js.map +1 -1
  255. package/dist/index309.js +11 -132
  256. package/dist/index309.js.map +1 -1
  257. package/dist/index310.js +29 -399
  258. package/dist/index310.js.map +1 -1
  259. package/dist/index311.js +12 -52
  260. package/dist/index311.js.map +1 -1
  261. package/dist/index312.js +25 -11
  262. package/dist/index312.js.map +1 -1
  263. package/dist/index313.js +5 -11
  264. package/dist/index313.js.map +1 -1
  265. package/dist/index321.js +1 -1
  266. package/dist/index329.js +1 -1
  267. package/dist/index330.js +1 -1
  268. package/dist/index334.js +7 -8
  269. package/dist/index334.js.map +1 -1
  270. package/dist/index335.js +8 -7
  271. package/dist/index335.js.map +1 -1
  272. package/dist/index339.js +1 -1
  273. package/dist/index345.js +51 -17
  274. package/dist/index345.js.map +1 -1
  275. package/dist/index346.js +17 -51
  276. package/dist/index346.js.map +1 -1
  277. package/dist/index347.js +5 -122
  278. package/dist/index347.js.map +1 -1
  279. package/dist/index348.js +121 -31
  280. package/dist/index348.js.map +1 -1
  281. package/dist/index349.js +31 -72
  282. package/dist/index349.js.map +1 -1
  283. package/dist/index350.js +70 -139
  284. package/dist/index350.js.map +1 -1
  285. package/dist/index351.js +116 -35
  286. package/dist/index351.js.map +1 -1
  287. package/dist/index352.js +56 -44
  288. package/dist/index352.js.map +1 -1
  289. package/dist/index353.js +49 -14
  290. package/dist/index353.js.map +1 -1
  291. package/dist/index354.js +15 -6
  292. package/dist/index354.js.map +1 -1
  293. package/dist/index359.js +11 -4
  294. package/dist/index359.js.map +1 -1
  295. package/dist/index360.js +17 -18
  296. package/dist/index360.js.map +1 -1
  297. package/dist/index361.js +4 -13
  298. package/dist/index361.js.map +1 -1
  299. package/dist/index362.js +5 -11
  300. package/dist/index362.js.map +1 -1
  301. package/dist/index363.js +19 -15
  302. package/dist/index363.js.map +1 -1
  303. package/dist/index364.js +45 -6
  304. package/dist/index364.js.map +1 -1
  305. package/dist/index365.js +18 -4
  306. package/dist/index365.js.map +1 -1
  307. package/dist/index366.js +5 -21
  308. package/dist/index366.js.map +1 -1
  309. package/dist/index367.js +200 -44
  310. package/dist/index367.js.map +1 -1
  311. package/dist/index368.js +77 -17
  312. package/dist/index368.js.map +1 -1
  313. package/dist/index369.js +5 -5
  314. package/dist/index369.js.map +1 -1
  315. package/dist/index370.js +16 -199
  316. package/dist/index370.js.map +1 -1
  317. package/dist/index371.js +12 -77
  318. package/dist/index371.js.map +1 -1
  319. package/dist/index374.js +3 -3
  320. package/dist/index375.js +1 -1
  321. package/dist/index376.js +3 -3
  322. package/dist/index378.js +2 -2
  323. package/dist/index380.js +1 -1
  324. package/dist/index381.js +2 -2
  325. package/dist/index384.js +2 -2
  326. package/dist/index386.js +1 -1
  327. package/dist/index387.js +3 -5
  328. package/dist/index387.js.map +1 -1
  329. package/dist/index388.js +3 -5
  330. package/dist/index388.js.map +1 -1
  331. package/dist/index389.js +5 -4
  332. package/dist/index389.js.map +1 -1
  333. package/dist/index390.js +4 -15
  334. package/dist/index390.js.map +1 -1
  335. package/dist/index391.js +4 -9
  336. package/dist/index391.js.map +1 -1
  337. package/dist/index392.js +15 -5
  338. package/dist/index392.js.map +1 -1
  339. package/dist/index393.js +8 -4
  340. package/dist/index393.js.map +1 -1
  341. package/dist/index394.js +5 -545
  342. package/dist/index394.js.map +1 -1
  343. package/dist/index395.js +5 -47
  344. package/dist/index395.js.map +1 -1
  345. package/dist/index396.js +543 -15
  346. package/dist/index396.js.map +1 -1
  347. package/dist/index397.js +47 -6
  348. package/dist/index397.js.map +1 -1
  349. package/dist/index398.js +17 -7
  350. package/dist/index398.js.map +1 -1
  351. package/dist/index399.js +5 -6
  352. package/dist/index399.js.map +1 -1
  353. package/dist/index400.js +7 -7
  354. package/dist/index400.js.map +1 -1
  355. package/dist/index401.js +6 -11
  356. package/dist/index401.js.map +1 -1
  357. package/dist/index402.js +7 -8
  358. package/dist/index402.js.map +1 -1
  359. package/dist/index403.js +11 -12
  360. package/dist/index403.js.map +1 -1
  361. package/dist/index404.js +9 -3
  362. package/dist/index404.js.map +1 -1
  363. package/dist/index405.js +13 -3
  364. package/dist/index405.js.map +1 -1
  365. package/dist/index407.js +1 -1
  366. package/dist/index408.js +7 -4
  367. package/dist/index408.js.map +1 -1
  368. package/dist/index409.js +2 -56
  369. package/dist/index409.js.map +1 -1
  370. package/dist/index410.js +43 -67
  371. package/dist/index410.js.map +1 -1
  372. package/dist/index411.js +56 -31
  373. package/dist/index411.js.map +1 -1
  374. package/dist/index412.js +8 -9
  375. package/dist/index412.js.map +1 -1
  376. package/dist/index413.js +2 -153
  377. package/dist/index413.js.map +1 -1
  378. package/dist/index414.js +54 -107
  379. package/dist/index414.js.map +1 -1
  380. package/dist/index415.js +55 -7
  381. package/dist/index415.js.map +1 -1
  382. package/dist/index416.js +5 -2
  383. package/dist/index416.js.map +1 -1
  384. package/dist/index417.js +54 -42
  385. package/dist/index417.js.map +1 -1
  386. package/dist/index418.js +68 -56
  387. package/dist/index418.js.map +1 -1
  388. package/dist/index419.js +31 -8
  389. package/dist/index419.js.map +1 -1
  390. package/dist/index420.js +9 -2
  391. package/dist/index420.js.map +1 -1
  392. package/dist/index421.js +152 -54
  393. package/dist/index421.js.map +1 -1
  394. package/dist/index422.js +108 -56
  395. package/dist/index422.js.map +1 -1
  396. package/dist/index423.js +2 -16
  397. package/dist/index423.js.map +1 -1
  398. package/dist/index424.js +2 -29
  399. package/dist/index424.js.map +1 -1
  400. package/dist/index425.js +2 -13
  401. package/dist/index425.js.map +1 -1
  402. package/dist/index426.js +2 -7
  403. package/dist/index426.js.map +1 -1
  404. package/dist/index427.js +16 -2
  405. package/dist/index427.js.map +1 -1
  406. package/dist/index428.js +29 -2
  407. package/dist/index428.js.map +1 -1
  408. package/dist/index429.js +13 -2
  409. package/dist/index429.js.map +1 -1
  410. package/dist/index430.js +7 -2
  411. package/dist/index430.js.map +1 -1
  412. package/dist/index44.js +1 -1
  413. package/dist/index45.js +2 -2
  414. package/dist/index49.js +28 -28
  415. package/dist/index50.js +21 -21
  416. package/dist/index51.js +1 -1
  417. package/dist/index52.js +8 -8
  418. package/dist/index53.js +2 -2
  419. package/dist/index55.js +17 -17
  420. package/dist/index56.js +4 -4
  421. package/dist/index57.js +3 -3
  422. package/dist/index58.js +7 -7
  423. package/dist/index59.js +4 -4
  424. package/dist/index60.js +12 -12
  425. package/dist/index61.js +2 -2
  426. package/dist/index62.js +2 -2
  427. package/dist/index70.js +1 -1
  428. package/dist/index71.js +1 -1
  429. package/dist/index74.js +6 -2
  430. package/dist/index74.js.map +1 -1
  431. package/dist/index75.js +8 -2
  432. package/dist/index75.js.map +1 -1
  433. package/dist/index76.js +5 -5
  434. package/dist/index76.js.map +1 -1
  435. package/dist/index77.js +2 -8
  436. package/dist/index77.js.map +1 -1
  437. package/dist/index78.js +2 -6
  438. package/dist/index78.js.map +1 -1
  439. package/package.json +1 -1
package/dist/index312.js CHANGED
@@ -1,15 +1,29 @@
1
- import n from "./index191.js";
2
- import * as t from "react";
3
- const o = /* @__PURE__ */ t.createContext(void 0);
4
- process.env.NODE_ENV !== "production" && (o.displayName = "SelectItemContext");
5
- function s() {
6
- const e = t.useContext(o);
7
- if (!e)
8
- throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>." : n(57));
9
- return e;
1
+ import { defaultDateLib as p } from "./index106.js";
2
+ import { dateMatchModifiers as s } from "./index32.js";
3
+ import { rangeContainsDayOfWeek as M } from "./index311.js";
4
+ import { rangeIncludesDate as l } from "./index126.js";
5
+ import { rangeOverlaps as y } from "./index313.js";
6
+ import { isDatesArray as a, isDateRange as A, isDayOfWeekType as C, isDateInterval as I, isDateAfterType as v, isDateBeforeType as F } from "./index128.js";
7
+ function d(n, t, f = p) {
8
+ const e = Array.isArray(t) ? t : [t];
9
+ if (e.filter((o) => typeof o != "function").some((o) => typeof o == "boolean" ? o : f.isDate(o) ? l(n, o, !1, f) : a(o, f) ? o.some((r) => l(n, r, !1, f)) : A(o) ? o.from && o.to ? y(n, { from: o.from, to: o.to }, f) : !1 : C(o) ? M(n, o.dayOfWeek, f) : I(o) ? f.isAfter(o.before, o.after) ? y(n, {
10
+ from: f.addDays(o.after, 1),
11
+ to: f.addDays(o.before, -1)
12
+ }, f) : s(n.from, o, f) || s(n.to, o, f) : v(o) || F(o) ? s(n.from, o, f) || s(n.to, o, f) : !1))
13
+ return !0;
14
+ const i = e.filter((o) => typeof o == "function");
15
+ if (i.length) {
16
+ let o = n.from;
17
+ const r = f.differenceInCalendarDays(n.to, n.from);
18
+ for (let u = 0; u <= r; u++) {
19
+ if (i.some((D) => D(o)))
20
+ return !0;
21
+ o = f.addDays(o, 1);
22
+ }
23
+ }
24
+ return !1;
10
25
  }
11
26
  export {
12
- o as SelectItemContext,
13
- s as useSelectItemContext
27
+ d as rangeContainsModifiers
14
28
  };
15
29
  //# sourceMappingURL=index312.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index312.js","sources":["../../../node_modules/@base-ui/react/esm/select/item/SelectItemContext.js"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectItemContext.displayName = \"SelectItemContext\";\nexport function useSelectItemContext() {\n const context = React.useContext(SelectItemContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : _formatErrorMessage(57));\n }\n return context;\n}"],"names":["SelectItemContext","React","useSelectItemContext","context","_formatErrorMessage"],"mappings":";;AAIY,MAACA,IAAiC,gBAAAC,EAAM,cAAc,MAAS;AACvE,QAAQ,IAAI,aAAa,iBAAcD,EAAkB,cAAc;AACpE,SAASE,IAAuB;AACrC,QAAMC,IAAUF,EAAM,WAAWD,CAAiB;AAClD,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,iGAAiGC,EAAoB,EAAE,CAAC;AAElL,SAAOD;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index312.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { dateMatchModifiers } from \"./dateMatchModifiers.js\";\nimport { rangeContainsDayOfWeek } from \"./rangeContainsDayOfWeek.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { rangeOverlaps } from \"./rangeOverlaps.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a date range contains dates that match the given modifiers.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param modifiers - The modifiers to match against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains matching dates, otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {\n const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];\n // Defer function matchers evaluation as they are the least performant.\n const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== \"function\");\n const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {\n if (typeof matcher === \"boolean\")\n return matcher;\n if (dateLib.isDate(matcher)) {\n return rangeIncludesDate(range, matcher, false, dateLib);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));\n }\n if (isDateRange(matcher)) {\n if (matcher.from && matcher.to) {\n return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);\n }\n return false;\n }\n if (isDayOfWeekType(matcher)) {\n return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);\n }\n if (isDateInterval(matcher)) {\n const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return rangeOverlaps(range, {\n from: dateLib.addDays(matcher.after, 1),\n to: dateLib.addDays(matcher.before, -1),\n }, dateLib);\n }\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n return false;\n });\n if (nonFunctionMatchersResult) {\n return true;\n }\n const functionMatchers = matchers.filter((matcher) => typeof matcher === \"function\");\n if (functionMatchers.length) {\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n for (let i = 0; i <= totalDays; i++) {\n if (functionMatchers.some((matcher) => matcher(date))) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n }\n return false;\n}\n"],"names":["rangeContainsModifiers","range","modifiers","dateLib","defaultDateLib","matchers","matcher","rangeIncludesDate","isDatesArray","date","isDateRange","rangeOverlaps","isDayOfWeekType","rangeContainsDayOfWeek","isDateInterval","dateMatchModifiers","isDateAfterType","isDateBeforeType","functionMatchers","totalDays","i"],"mappings":";;;;;;AAgBO,SAASA,EAAuBC,GAAOC,GAAWC,IAAUC,GAAgB;AAC/E,QAAMC,IAAW,MAAM,QAAQH,CAAS,IAAIA,IAAY,CAACA,CAAS;AAsClE,MApC4BG,EAAS,OAAO,CAACC,MAAY,OAAOA,KAAY,UAAU,EAChC,KAAK,CAACA,MACpD,OAAOA,KAAY,YACZA,IACPH,EAAQ,OAAOG,CAAO,IACfC,EAAkBN,GAAOK,GAAS,IAAOH,CAAO,IAEvDK,EAAaF,GAASH,CAAO,IACtBG,EAAQ,KAAK,CAACG,MAASF,EAAkBN,GAAOQ,GAAM,IAAON,CAAO,CAAC,IAE5EO,EAAYJ,CAAO,IACfA,EAAQ,QAAQA,EAAQ,KACjBK,EAAcV,GAAO,EAAE,MAAMK,EAAQ,MAAM,IAAIA,EAAQ,GAAE,GAAIH,CAAO,IAExE,KAEPS,EAAgBN,CAAO,IAChBO,EAAuBZ,GAAOK,EAAQ,WAAWH,CAAO,IAE/DW,EAAeR,CAAO,IACGH,EAAQ,QAAQG,EAAQ,QAAQA,EAAQ,KAAK,IAE3DK,EAAcV,GAAO;AAAA,IACxB,MAAME,EAAQ,QAAQG,EAAQ,OAAO,CAAC;AAAA,IACtC,IAAIH,EAAQ,QAAQG,EAAQ,QAAQ,EAAE;AAAA,EAC1D,GAAmBH,CAAO,IAENY,EAAmBd,EAAM,MAAMK,GAASH,CAAO,KACnDY,EAAmBd,EAAM,IAAIK,GAASH,CAAO,IAEjDa,EAAgBV,CAAO,KAAKW,EAAiBX,CAAO,IAC5CS,EAAmBd,EAAM,MAAMK,GAASH,CAAO,KACnDY,EAAmBd,EAAM,IAAIK,GAASH,CAAO,IAE9C,EACV;AAEG,WAAO;AAEX,QAAMe,IAAmBb,EAAS,OAAO,CAACC,MAAY,OAAOA,KAAY,UAAU;AACnF,MAAIY,EAAiB,QAAQ;AACzB,QAAIT,IAAOR,EAAM;AACjB,UAAMkB,IAAYhB,EAAQ,yBAAyBF,EAAM,IAAIA,EAAM,IAAI;AACvE,aAASmB,IAAI,GAAGA,KAAKD,GAAWC,KAAK;AACjC,UAAIF,EAAiB,KAAK,CAACZ,MAAYA,EAAQG,CAAI,CAAC;AAChD,eAAO;AAEX,MAAAA,IAAON,EAAQ,QAAQM,GAAM,CAAC;AAAA,IAClC;AAAA,EACJ;AACA,SAAO;AACX;","x_google_ignoreList":[0]}
package/dist/index313.js CHANGED
@@ -1,15 +1,9 @@
1
- import r from "./index191.js";
2
- import * as t from "react";
3
- const o = /* @__PURE__ */ t.createContext(void 0);
4
- process.env.NODE_ENV !== "production" && (o.displayName = "SelectGroupContext");
5
- function s() {
6
- const e = t.useContext(o);
7
- if (e === void 0)
8
- throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>." : r(56));
9
- return e;
1
+ import { rangeIncludesDate as m } from "./index126.js";
2
+ import { defaultDateLib as r } from "./index106.js";
3
+ function u(o, f, l = r) {
4
+ return m(o, f.from, !1, l) || m(o, f.to, !1, l) || m(f, o.from, !1, l) || m(f, o.to, !1, l);
10
5
  }
11
6
  export {
12
- o as SelectGroupContext,
13
- s as useSelectGroupContext
7
+ u as rangeOverlaps
14
8
  };
15
9
  //# sourceMappingURL=index313.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index313.js","sources":["../../../node_modules/@base-ui/react/esm/select/group/SelectGroupContext.js"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectGroupContext.displayName = \"SelectGroupContext\";\nexport function useSelectGroupContext() {\n const context = React.useContext(SelectGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));\n }\n return context;\n}"],"names":["SelectGroupContext","React","useSelectGroupContext","context","_formatErrorMessage"],"mappings":";;AAIY,MAACA,IAAkC,gBAAAC,EAAM,cAAc,MAAS;AACxE,QAAQ,IAAI,aAAa,iBAAcD,EAAmB,cAAc;AACrE,SAASE,IAAwB;AACtC,QAAMC,IAAUF,EAAM,WAAWD,CAAkB;AACnD,MAAIG,MAAY;AACd,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,oGAAoGC,EAAoB,EAAE,CAAC;AAErL,SAAOD;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index313.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/index.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\n/**\n * Determines if two date ranges overlap.\n *\n * @since 9.2.2\n * @param rangeLeft - The first date range.\n * @param rangeRight - The second date range.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the ranges overlap, otherwise `false`.\n * @group Utilities\n */\nexport function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {\n return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||\n rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));\n}\n"],"names":["rangeOverlaps","rangeLeft","rangeRight","dateLib","defaultDateLib","rangeIncludesDate"],"mappings":";;AAYO,SAASA,EAAcC,GAAWC,GAAYC,IAAUC,GAAgB;AAC3E,SAAQC,EAAkBJ,GAAWC,EAAW,MAAM,IAAOC,CAAO,KAChEE,EAAkBJ,GAAWC,EAAW,IAAI,IAAOC,CAAO,KAC1DE,EAAkBH,GAAYD,EAAU,MAAM,IAAOE,CAAO,KAC5DE,EAAkBH,GAAYD,EAAU,IAAI,IAAOE,CAAO;AAClE;","x_google_ignoreList":[0]}
package/dist/index321.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import N from "./index331.js";
2
2
  import g from "./index159.js";
3
3
  import m, { getCountryCallingCode as s } from "./index164.js";
4
- import h from "./index334.js";
4
+ import h from "./index335.js";
5
5
  import { formatRFC3966 as I } from "./index327.js";
6
6
  var l = {
7
7
  formatExtension: function(t, r, e) {
package/dist/index329.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MIN_LENGTH_FOR_NSN as e, VALID_DIGITS as _, PLUS_CHARS as t, VALID_PUNCTUATION as E } from "./index160.js";
2
- import r from "./index335.js";
2
+ import r from "./index334.js";
3
3
  var n = "[" + _ + "]{" + e + "}", I = "[" + t + "]{0,1}(?:[" + E + "]*[" + _ + "]){3,}[" + E + _ + "]*", P = new RegExp("^[" + t + "]{0,1}(?:[" + E + "]*[" + _ + "]){1,2}$", "i"), R = I + // Phone number extensions
4
4
  "(?:" + r() + ")?", T = new RegExp(
5
5
  // Either a short two-digit-only phone number
package/dist/index330.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index335.js";
1
+ import o from "./index334.js";
2
2
  var n = new RegExp("(?:" + o() + ")$", "i");
3
3
  function c(e) {
4
4
  var a = e.search(n);
package/dist/index334.js CHANGED
@@ -1,11 +1,10 @@
1
- import f from "./index164.js";
2
- var u = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
3
- function D(t, r, a) {
4
- var e = new f(a);
5
- if (e.selectNumberingPlan(t, r), e.defaultIDDPrefix())
6
- return e.defaultIDDPrefix();
7
- if (u.test(e.IDDPrefix()))
8
- return e.IDDPrefix();
1
+ import { VALID_DIGITS as A } from "./index160.js";
2
+ var g = ";ext=", t = function(a) {
3
+ return "([".concat(A, "]{1,").concat(a, "})");
4
+ };
5
+ function D(x) {
6
+ var a = "20", o = "15", i = "9", F = "6", n = "[  \\t,]*", e = "[:\\..]?[  \\t,-]*", r = "#?", s = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", E = "(?:[xx##~~]|int|int)", l = "[- ]+", u = "[  \\t]*", v = "(?:,{2}|;)", b = g + t(a), m = n + s + e + t(a) + r, p = n + E + e + t(i) + r, L = l + t(F) + "#", f = u + v + e + t(o) + r, c = u + "(?:,)+" + e + t(i) + r;
7
+ return b + "|" + m + "|" + p + "|" + L + "|" + f + "|" + c;
9
8
  }
10
9
  export {
11
10
  D as default
@@ -1 +1 @@
1
- {"version":3,"file":"index334.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\n\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/;\n\n// If the `country` supports IDD calling, it returns a preferred IDD prefix.\n// If the `country` doesn't support IDD calling, it returns `undefined`.\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n//# sourceMappingURL=getIddPrefix.js.map"],"names":["SINGLE_IDD_PREFIX_REG_EXP","getIddPrefix","country","callingCode","metadata","countryMetadata","Metadata"],"mappings":";AAWA,IAAIA,IAA4B;AAIjB,SAASC,EAAaC,GAASC,GAAaC,GAAU;AACnE,MAAIC,IAAkB,IAAIC,EAASF,CAAQ;AAE3C,MADAC,EAAgB,oBAAoBH,GAASC,CAAW,GACpDE,EAAgB;AAClB,WAAOA,EAAgB,iBAAgB;AAEzC,MAAIL,EAA0B,KAAKK,EAAgB,UAAS,CAAE;AAC5D,WAAOA,EAAgB,UAAS;AAEpC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index334.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js"],"sourcesContent":["import { VALID_DIGITS } from '../../constants.js';\n\n// The RFC 3966 format for extensions.\nvar RFC3966_EXTN_PREFIX = ';ext=';\n\n/**\r\n * Helper method for constructing regular expressions for parsing. Creates\r\n * an expression that captures up to max_length digits.\r\n * @return {string} RegEx pattern to capture extension digits.\r\n */\nvar getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {\n return \"([\".concat(VALID_DIGITS, \"]{1,\").concat(maxLength, \"})\");\n};\n\n/**\r\n * Helper initialiser method to create the regular-expression pattern to match\r\n * extensions.\r\n * Copy-pasted from Google's `libphonenumber`:\r\n * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766\r\n * @return {string} RegEx pattern to capture extensions.\r\n */\nexport default function createExtensionPattern(purpose) {\n // We cap the maximum length of an extension based on the ambiguity of the way\n // the extension is prefixed. As per ITU, the officially allowed length for\n // extensions is actually 40, but we don't support this since we haven't seen real\n // examples and this introduces many false interpretations as the extension labels\n // are not standardized.\n /** @type {string} */\n var extLimitAfterExplicitLabel = '20';\n /** @type {string} */\n var extLimitAfterLikelyLabel = '15';\n /** @type {string} */\n var extLimitAfterAmbiguousChar = '9';\n /** @type {string} */\n var extLimitWhenNotSure = '6';\n\n /** @type {string} */\n var possibleSeparatorsBetweenNumberAndExtLabel = \"[ \\xA0\\\\t,]*\";\n // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.\n /** @type {string} */\n var possibleCharsAfterExtLabel = \"[:\\\\.\\uFF0E]?[ \\xA0\\\\t,-]*\";\n /** @type {string} */\n var optionalExtnSuffix = \"#?\";\n\n // Here the extension is called out in more explicit way, i.e mentioning it obvious\n // patterns like \"ext.\".\n /** @type {string} */\n var explicitExtLabels = \"(?:e?xt(?:ensi(?:o\\u0301?|\\xF3))?n?|\\uFF45?\\uFF58\\uFF54\\uFF4E?|\\u0434\\u043E\\u0431|anexo)\";\n // One-character symbols that can be used to indicate an extension, and less\n // commonly used or more ambiguous extension labels.\n /** @type {string} */\n var ambiguousExtLabels = \"(?:[x\\uFF58#\\uFF03~\\uFF5E]|int|\\uFF49\\uFF4E\\uFF54)\";\n // When extension is not separated clearly.\n /** @type {string} */\n var ambiguousSeparator = \"[- ]+\";\n // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching\n // comma as extension label may have it.\n /** @type {string} */\n var possibleSeparatorsNumberExtLabelNoComma = \"[ \\xA0\\\\t]*\";\n // \",,\" is commonly used for auto dialling the extension when connected. First\n // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do\n // not repeat it here. Semi-colon works in Iphone and Android also to pop up a\n // button with the extension number following.\n /** @type {string} */\n var autoDiallingAndExtLabelsFound = \"(?:,{2}|;)\";\n\n /** @type {string} */\n var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);\n /** @type {string} */\n var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;\n /** @type {string} */\n var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;\n /** @type {string} */\n var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + \"#\";\n\n /** @type {string} */\n var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;\n /** @type {string} */\n var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + \"(?:,)+\" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;\n\n // The first regular expression covers RFC 3966 format, where the extension is added\n // using \";ext=\". The second more generic where extension is mentioned with explicit\n // labels like \"ext:\". In both the above cases we allow more numbers in extension than\n // any other extension labels. The third one captures when single character extension\n // labels or less commonly used labels are used. In such cases we capture fewer\n // extension digits in order to reduce the chance of falsely interpreting two\n // numbers beside each other as a number + extension. The fourth one covers the\n // special case of American numbers where the extension is written with a hash\n // at the end, such as \"- 503#\". The fifth one is exclusively for extension\n // autodialling formats which are used when dialling and in this case we accept longer\n // extensions. The last one is more liberal on the number of commas that acts as\n // extension labels, so we have a strict cap on the number of digits in such extensions.\n return rfcExtn + \"|\" + explicitExtn + \"|\" + ambiguousExtn + \"|\" + americanStyleExtnWithSuffix + \"|\" + autoDiallingExtn + \"|\" + onlyCommasExtn;\n}\n//# sourceMappingURL=createExtensionPattern.js.map"],"names":["RFC3966_EXTN_PREFIX","getExtensionDigitsPattern","maxLength","VALID_DIGITS","createExtensionPattern","purpose","extLimitAfterExplicitLabel","extLimitAfterLikelyLabel","extLimitAfterAmbiguousChar","extLimitWhenNotSure","possibleSeparatorsBetweenNumberAndExtLabel","possibleCharsAfterExtLabel","optionalExtnSuffix","explicitExtLabels","ambiguousExtLabels","ambiguousSeparator","possibleSeparatorsNumberExtLabelNoComma","autoDiallingAndExtLabelsFound","rfcExtn","explicitExtn","ambiguousExtn","americanStyleExtnWithSuffix","autoDiallingExtn","onlyCommasExtn"],"mappings":";AAGA,IAAIA,IAAsB,SAOtBC,IAA4B,SAAmCC,GAAW;AAC5E,SAAO,KAAK,OAAOC,GAAc,MAAM,EAAE,OAAOD,GAAW,IAAI;AACjE;AASe,SAASE,EAAuBC,GAAS;AAOtD,MAAIC,IAA6B,MAE7BC,IAA2B,MAE3BC,IAA6B,KAE7BC,IAAsB,KAGtBC,IAA6C,aAG7CC,IAA6B,sBAE7BC,IAAqB,MAKrBC,IAAoB,iDAIpBC,IAAqB,wBAGrBC,IAAqB,SAIrBC,IAA0C,YAM1CC,IAAgC,cAGhCC,IAAUlB,IAAsBC,EAA0BK,CAA0B,GAEpFa,IAAeT,IAA6CG,IAAoBF,IAA6BV,EAA0BK,CAA0B,IAAIM,GAErKQ,IAAgBV,IAA6CI,IAAqBH,IAA6BV,EAA0BO,CAA0B,IAAII,GAEvKS,IAA8BN,IAAqBd,EAA0BQ,CAAmB,IAAI,KAGpGa,IAAmBN,IAA0CC,IAAgCN,IAA6BV,EAA0BM,CAAwB,IAAIK,GAEhLW,IAAiBP,IAA0C,WAAWL,IAA6BV,EAA0BO,CAA0B,IAAII;AAc/J,SAAOM,IAAU,MAAMC,IAAe,MAAMC,IAAgB,MAAMC,IAA8B,MAAMC,IAAmB,MAAMC;AACjI;","x_google_ignoreList":[0]}
package/dist/index335.js CHANGED
@@ -1,10 +1,11 @@
1
- import { VALID_DIGITS as A } from "./index160.js";
2
- var g = ";ext=", t = function(a) {
3
- return "([".concat(A, "]{1,").concat(a, "})");
4
- };
5
- function D(x) {
6
- var a = "20", o = "15", i = "9", F = "6", n = "[  \\t,]*", e = "[:\\..]?[  \\t,-]*", r = "#?", s = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", E = "(?:[xx##~~]|int|int)", l = "[- ]+", u = "[  \\t]*", v = "(?:,{2}|;)", b = g + t(a), m = n + s + e + t(a) + r, p = n + E + e + t(i) + r, L = l + t(F) + "#", f = u + v + e + t(o) + r, c = u + "(?:,)+" + e + t(i) + r;
7
- return b + "|" + m + "|" + p + "|" + L + "|" + f + "|" + c;
1
+ import f from "./index164.js";
2
+ var u = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
3
+ function D(t, r, a) {
4
+ var e = new f(a);
5
+ if (e.selectNumberingPlan(t, r), e.defaultIDDPrefix())
6
+ return e.defaultIDDPrefix();
7
+ if (u.test(e.IDDPrefix()))
8
+ return e.IDDPrefix();
8
9
  }
9
10
  export {
10
11
  D as default
@@ -1 +1 @@
1
- {"version":3,"file":"index335.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js"],"sourcesContent":["import { VALID_DIGITS } from '../../constants.js';\n\n// The RFC 3966 format for extensions.\nvar RFC3966_EXTN_PREFIX = ';ext=';\n\n/**\r\n * Helper method for constructing regular expressions for parsing. Creates\r\n * an expression that captures up to max_length digits.\r\n * @return {string} RegEx pattern to capture extension digits.\r\n */\nvar getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {\n return \"([\".concat(VALID_DIGITS, \"]{1,\").concat(maxLength, \"})\");\n};\n\n/**\r\n * Helper initialiser method to create the regular-expression pattern to match\r\n * extensions.\r\n * Copy-pasted from Google's `libphonenumber`:\r\n * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766\r\n * @return {string} RegEx pattern to capture extensions.\r\n */\nexport default function createExtensionPattern(purpose) {\n // We cap the maximum length of an extension based on the ambiguity of the way\n // the extension is prefixed. As per ITU, the officially allowed length for\n // extensions is actually 40, but we don't support this since we haven't seen real\n // examples and this introduces many false interpretations as the extension labels\n // are not standardized.\n /** @type {string} */\n var extLimitAfterExplicitLabel = '20';\n /** @type {string} */\n var extLimitAfterLikelyLabel = '15';\n /** @type {string} */\n var extLimitAfterAmbiguousChar = '9';\n /** @type {string} */\n var extLimitWhenNotSure = '6';\n\n /** @type {string} */\n var possibleSeparatorsBetweenNumberAndExtLabel = \"[ \\xA0\\\\t,]*\";\n // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.\n /** @type {string} */\n var possibleCharsAfterExtLabel = \"[:\\\\.\\uFF0E]?[ \\xA0\\\\t,-]*\";\n /** @type {string} */\n var optionalExtnSuffix = \"#?\";\n\n // Here the extension is called out in more explicit way, i.e mentioning it obvious\n // patterns like \"ext.\".\n /** @type {string} */\n var explicitExtLabels = \"(?:e?xt(?:ensi(?:o\\u0301?|\\xF3))?n?|\\uFF45?\\uFF58\\uFF54\\uFF4E?|\\u0434\\u043E\\u0431|anexo)\";\n // One-character symbols that can be used to indicate an extension, and less\n // commonly used or more ambiguous extension labels.\n /** @type {string} */\n var ambiguousExtLabels = \"(?:[x\\uFF58#\\uFF03~\\uFF5E]|int|\\uFF49\\uFF4E\\uFF54)\";\n // When extension is not separated clearly.\n /** @type {string} */\n var ambiguousSeparator = \"[- ]+\";\n // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching\n // comma as extension label may have it.\n /** @type {string} */\n var possibleSeparatorsNumberExtLabelNoComma = \"[ \\xA0\\\\t]*\";\n // \",,\" is commonly used for auto dialling the extension when connected. First\n // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do\n // not repeat it here. Semi-colon works in Iphone and Android also to pop up a\n // button with the extension number following.\n /** @type {string} */\n var autoDiallingAndExtLabelsFound = \"(?:,{2}|;)\";\n\n /** @type {string} */\n var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);\n /** @type {string} */\n var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;\n /** @type {string} */\n var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;\n /** @type {string} */\n var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + \"#\";\n\n /** @type {string} */\n var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;\n /** @type {string} */\n var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + \"(?:,)+\" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;\n\n // The first regular expression covers RFC 3966 format, where the extension is added\n // using \";ext=\". The second more generic where extension is mentioned with explicit\n // labels like \"ext:\". In both the above cases we allow more numbers in extension than\n // any other extension labels. The third one captures when single character extension\n // labels or less commonly used labels are used. In such cases we capture fewer\n // extension digits in order to reduce the chance of falsely interpreting two\n // numbers beside each other as a number + extension. The fourth one covers the\n // special case of American numbers where the extension is written with a hash\n // at the end, such as \"- 503#\". The fifth one is exclusively for extension\n // autodialling formats which are used when dialling and in this case we accept longer\n // extensions. The last one is more liberal on the number of commas that acts as\n // extension labels, so we have a strict cap on the number of digits in such extensions.\n return rfcExtn + \"|\" + explicitExtn + \"|\" + ambiguousExtn + \"|\" + americanStyleExtnWithSuffix + \"|\" + autoDiallingExtn + \"|\" + onlyCommasExtn;\n}\n//# sourceMappingURL=createExtensionPattern.js.map"],"names":["RFC3966_EXTN_PREFIX","getExtensionDigitsPattern","maxLength","VALID_DIGITS","createExtensionPattern","purpose","extLimitAfterExplicitLabel","extLimitAfterLikelyLabel","extLimitAfterAmbiguousChar","extLimitWhenNotSure","possibleSeparatorsBetweenNumberAndExtLabel","possibleCharsAfterExtLabel","optionalExtnSuffix","explicitExtLabels","ambiguousExtLabels","ambiguousSeparator","possibleSeparatorsNumberExtLabelNoComma","autoDiallingAndExtLabelsFound","rfcExtn","explicitExtn","ambiguousExtn","americanStyleExtnWithSuffix","autoDiallingExtn","onlyCommasExtn"],"mappings":";AAGA,IAAIA,IAAsB,SAOtBC,IAA4B,SAAmCC,GAAW;AAC5E,SAAO,KAAK,OAAOC,GAAc,MAAM,EAAE,OAAOD,GAAW,IAAI;AACjE;AASe,SAASE,EAAuBC,GAAS;AAOtD,MAAIC,IAA6B,MAE7BC,IAA2B,MAE3BC,IAA6B,KAE7BC,IAAsB,KAGtBC,IAA6C,aAG7CC,IAA6B,sBAE7BC,IAAqB,MAKrBC,IAAoB,iDAIpBC,IAAqB,wBAGrBC,IAAqB,SAIrBC,IAA0C,YAM1CC,IAAgC,cAGhCC,IAAUlB,IAAsBC,EAA0BK,CAA0B,GAEpFa,IAAeT,IAA6CG,IAAoBF,IAA6BV,EAA0BK,CAA0B,IAAIM,GAErKQ,IAAgBV,IAA6CI,IAAqBH,IAA6BV,EAA0BO,CAA0B,IAAII,GAEvKS,IAA8BN,IAAqBd,EAA0BQ,CAAmB,IAAI,KAGpGa,IAAmBN,IAA0CC,IAAgCN,IAA6BV,EAA0BM,CAAwB,IAAIK,GAEhLW,IAAiBP,IAA0C,WAAWL,IAA6BV,EAA0BO,CAA0B,IAAII;AAc/J,SAAOM,IAAU,MAAMC,IAAe,MAAMC,IAAgB,MAAMC,IAA8B,MAAMC,IAAmB,MAAMC;AACjI;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index335.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\n\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/;\n\n// If the `country` supports IDD calling, it returns a preferred IDD prefix.\n// If the `country` doesn't support IDD calling, it returns `undefined`.\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n//# sourceMappingURL=getIddPrefix.js.map"],"names":["SINGLE_IDD_PREFIX_REG_EXP","getIddPrefix","country","callingCode","metadata","countryMetadata","Metadata"],"mappings":";AAWA,IAAIA,IAA4B;AAIjB,SAASC,EAAaC,GAASC,GAAaC,GAAU;AACnE,MAAIC,IAAkB,IAAIC,EAASF,CAAQ;AAE3C,MADAC,EAAgB,oBAAoBH,GAASC,CAAW,GACpDE,EAAgB;AAClB,WAAOA,EAAgB,iBAAgB;AAEzC,MAAIL,EAA0B,KAAKK,EAAgB,UAAS,CAAE;AAC5D,WAAOA,EAAgB,UAAS;AAEpC;","x_google_ignoreList":[0]}
package/dist/index339.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as n from "react";
2
- import { isReactVersionAtLeast as o } from "./index354.js";
2
+ import { isReactVersionAtLeast as o } from "./index347.js";
3
3
  function s(t) {
4
4
  if (!/* @__PURE__ */ n.isValidElement(t))
5
5
  return null;
package/dist/index345.js CHANGED
@@ -1,21 +1,55 @@
1
- import * as n from "react";
2
- import { SafeReact as f } from "./index356.js";
3
- let o = 0;
4
- function l(u, t = "mui") {
5
- const [e, s] = n.useState(u), c = u || e;
6
- return n.useEffect(() => {
7
- e == null && (o += 1, s(`${t}-${o}`));
8
- }, [e, t]), c;
9
- }
10
- const a = f.useId;
11
- function I(u, t) {
12
- if (a !== void 0) {
13
- const e = a();
14
- return u ?? (t ? `${t}-${e}` : e);
15
- }
16
- return l(u, t);
1
+ import * as l from "react-dom";
2
+ import { useAnimationFrame as b } from "./index242.js";
3
+ import { useStableCallback as A } from "./index202.js";
4
+ import { resolveRef as d } from "./index383.js";
5
+ import { TransitionStatusDataAttributes as h } from "./index174.js";
6
+ function y(c, f = !1, m = !0) {
7
+ const o = b();
8
+ return A((s, n = null) => {
9
+ o.cancel();
10
+ const a = d(c);
11
+ if (a == null)
12
+ return;
13
+ const e = a, u = () => {
14
+ l.flushSync(s);
15
+ };
16
+ if (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
17
+ s();
18
+ return;
19
+ }
20
+ function i() {
21
+ Promise.all(e.getAnimations().map((t) => t.finished)).then(() => {
22
+ n?.aborted || u();
23
+ }).catch(() => {
24
+ if (m) {
25
+ n?.aborted || u();
26
+ return;
27
+ }
28
+ const t = e.getAnimations();
29
+ !n?.aborted && t.length > 0 && t.some((r) => r.pending || r.playState !== "finished") && i();
30
+ });
31
+ }
32
+ if (f) {
33
+ const t = h.startingStyle;
34
+ if (!e.hasAttribute(t)) {
35
+ o.request(i);
36
+ return;
37
+ }
38
+ const r = new MutationObserver(() => {
39
+ e.hasAttribute(t) || (r.disconnect(), i());
40
+ });
41
+ r.observe(e, {
42
+ attributes: !0,
43
+ attributeFilter: [t]
44
+ }), n?.addEventListener("abort", () => r.disconnect(), {
45
+ once: !0
46
+ });
47
+ return;
48
+ }
49
+ o.request(i);
50
+ });
17
51
  }
18
52
  export {
19
- I as useId
53
+ y as useAnimationsFinished
20
54
  };
21
55
  //# sourceMappingURL=index345.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index345.js","sources":["../../../node_modules/@base-ui/utils/esm/useId.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.js\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`${prefix}-${globalId}`);\n }\n }, [defaultId, prefix]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}"],"names":["globalId","useGlobalId","idOverride","prefix","defaultId","setDefaultId","React","id","maybeReactUseId","SafeReact","useId","reactId"],"mappings":";;AAIA,IAAIA,IAAW;AAGf,SAASC,EAAYC,GAAYC,IAAS,OAAO;AAC/C,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAM,SAASJ,CAAU,GACrDK,IAAKL,KAAcE;AACzB,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAIF,KAAa,SAKfJ,KAAY,GACZK,EAAa,GAAGF,CAAM,IAAIH,CAAQ,EAAE;AAAA,EAExC,GAAG,CAACI,GAAWD,CAAM,CAAC,GACfI;AACT;AACA,MAAMC,IAAkBC,EAAU;AAQ3B,SAASC,EAAMR,GAAYC,GAAQ;AAExC,MAAIK,MAAoB,QAAW;AACjC,UAAMG,IAAUH,EAAe;AAC/B,WAAON,MAAeC,IAAS,GAAGA,CAAM,IAAIQ,CAAO,KAAKA;AAAA,EAC1D;AAIA,SAAOV,EAAYC,GAAYC,CAAM;AACvC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index345.js","sources":["../../../node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js"],"sourcesContent":["'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { resolveRef } from \"../utils/resolveRef.js\";\nimport { TransitionStatusDataAttributes } from \"./stateAttributesMapping.js\";\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.\n * @param treatAbortedAsFinished - Whether to treat aborted animations as finished. If `false`, and there are aborted animations,\n * the function will check again if any new animations have started and wait for them to finish.\n * @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback\n */\nexport function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {\n const frame = useAnimationFrame();\n return useStableCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n const element = resolveRef(elementOrRef);\n if (element == null) {\n return;\n }\n const resolvedElement = element;\n const done = () => {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\n };\n if (typeof resolvedElement.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n return;\n }\n function exec() {\n Promise.all(resolvedElement.getAnimations().map(animation => animation.finished)).then(() => {\n if (!signal?.aborted) {\n done();\n }\n }).catch(() => {\n if (treatAbortedAsFinished) {\n if (!signal?.aborted) {\n done();\n }\n return;\n }\n const currentAnimations = resolvedElement.getAnimations();\n if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some(animation => animation.pending || animation.playState !== 'finished')) {\n // Sometimes animations can be aborted because a property they depend on changes while the animation plays.\n // In such cases, we need to re-check if any new animations have started.\n exec();\n }\n });\n }\n if (waitForStartingStyleRemoved) {\n const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;\n\n // If `[data-starting-style]` isn't present, fall back to waiting one more frame\n // to give \"open\" animations a chance to be registered.\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n frame.request(exec);\n return;\n }\n\n // Wait for `[data-starting-style]` to have been removed.\n const attributeObserver = new MutationObserver(() => {\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n attributeObserver.disconnect();\n exec();\n }\n });\n attributeObserver.observe(resolvedElement, {\n attributes: true,\n attributeFilter: [startingStyleAttribute]\n });\n signal?.addEventListener('abort', () => attributeObserver.disconnect(), {\n once: true\n });\n return;\n }\n frame.request(exec);\n });\n}"],"names":["useAnimationsFinished","elementOrRef","waitForStartingStyleRemoved","treatAbortedAsFinished","frame","useAnimationFrame","useStableCallback","fnToExecute","signal","element","resolveRef","resolvedElement","done","ReactDOM","exec","animation","currentAnimations","startingStyleAttribute","TransitionStatusDataAttributes","attributeObserver"],"mappings":";;;;;AAgBO,SAASA,EAAsBC,GAAcC,IAA8B,IAAOC,IAAyB,IAAM;AACtH,QAAMC,IAAQC,EAAiB;AAC/B,SAAOC,EAAkB,CAACC,GAM1BC,IAAS,SAAS;AAChB,IAAAJ,EAAM,OAAM;AACZ,UAAMK,IAAUC,EAAWT,CAAY;AACvC,QAAIQ,KAAW;AACb;AAEF,UAAME,IAAkBF,GAClBG,IAAO,MAAM;AAGjB,MAAAC,EAAS,UAAUN,CAAW;AAAA,IAChC;AACA,QAAI,OAAOI,EAAgB,iBAAkB,cAAc,WAAW,6BAA6B;AACjG,MAAAJ,EAAW;AACX;AAAA,IACF;AACA,aAASO,IAAO;AACd,cAAQ,IAAIH,EAAgB,gBAAgB,IAAI,CAAAI,MAAaA,EAAU,QAAQ,CAAC,EAAE,KAAK,MAAM;AAC3F,QAAKP,GAAQ,WACXI,EAAI;AAAA,MAER,CAAC,EAAE,MAAM,MAAM;AACb,YAAIT,GAAwB;AAC1B,UAAKK,GAAQ,WACXI,EAAI;AAEN;AAAA,QACF;AACA,cAAMI,IAAoBL,EAAgB,cAAa;AACvD,QAAI,CAACH,GAAQ,WAAWQ,EAAkB,SAAS,KAAKA,EAAkB,KAAK,CAAAD,MAAaA,EAAU,WAAWA,EAAU,cAAc,UAAU,KAGjJD,EAAI;AAAA,MAER,CAAC;AAAA,IACH;AACA,QAAIZ,GAA6B;AAC/B,YAAMe,IAAyBC,EAA+B;AAI9D,UAAI,CAACP,EAAgB,aAAaM,CAAsB,GAAG;AACzD,QAAAb,EAAM,QAAQU,CAAI;AAClB;AAAA,MACF;AAGA,YAAMK,IAAoB,IAAI,iBAAiB,MAAM;AACnD,QAAKR,EAAgB,aAAaM,CAAsB,MACtDE,EAAkB,WAAU,GAC5BL,EAAI;AAAA,MAER,CAAC;AACD,MAAAK,EAAkB,QAAQR,GAAiB;AAAA,QACzC,YAAY;AAAA,QACZ,iBAAiB,CAACM,CAAsB;AAAA,MAChD,CAAO,GACDT,GAAQ,iBAAiB,SAAS,MAAMW,EAAkB,WAAU,GAAI;AAAA,QACtE,MAAM;AAAA,MACd,CAAO;AACD;AAAA,IACF;AACA,IAAAf,EAAM,QAAQU,CAAI;AAAA,EACpB,CAAC;AACH;","x_google_ignoreList":[0]}
package/dist/index346.js CHANGED
@@ -1,55 +1,21 @@
1
- import * as l from "react-dom";
2
- import { useAnimationFrame as b } from "./index302.js";
3
- import { useStableCallback as A } from "./index262.js";
4
- import { resolveRef as d } from "./index383.js";
5
- import { TransitionStatusDataAttributes as h } from "./index174.js";
6
- function y(c, f = !1, m = !0) {
7
- const o = b();
8
- return A((s, n = null) => {
9
- o.cancel();
10
- const a = d(c);
11
- if (a == null)
12
- return;
13
- const e = a, u = () => {
14
- l.flushSync(s);
15
- };
16
- if (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
17
- s();
18
- return;
19
- }
20
- function i() {
21
- Promise.all(e.getAnimations().map((t) => t.finished)).then(() => {
22
- n?.aborted || u();
23
- }).catch(() => {
24
- if (m) {
25
- n?.aborted || u();
26
- return;
27
- }
28
- const t = e.getAnimations();
29
- !n?.aborted && t.length > 0 && t.some((r) => r.pending || r.playState !== "finished") && i();
30
- });
31
- }
32
- if (f) {
33
- const t = h.startingStyle;
34
- if (!e.hasAttribute(t)) {
35
- o.request(i);
36
- return;
37
- }
38
- const r = new MutationObserver(() => {
39
- e.hasAttribute(t) || (r.disconnect(), i());
40
- });
41
- r.observe(e, {
42
- attributes: !0,
43
- attributeFilter: [t]
44
- }), n?.addEventListener("abort", () => r.disconnect(), {
45
- once: !0
46
- });
47
- return;
48
- }
49
- o.request(i);
50
- });
1
+ import * as n from "react";
2
+ import { SafeReact as f } from "./index356.js";
3
+ let o = 0;
4
+ function l(u, t = "mui") {
5
+ const [e, s] = n.useState(u), c = u || e;
6
+ return n.useEffect(() => {
7
+ e == null && (o += 1, s(`${t}-${o}`));
8
+ }, [e, t]), c;
9
+ }
10
+ const a = f.useId;
11
+ function I(u, t) {
12
+ if (a !== void 0) {
13
+ const e = a();
14
+ return u ?? (t ? `${t}-${e}` : e);
15
+ }
16
+ return l(u, t);
51
17
  }
52
18
  export {
53
- y as useAnimationsFinished
19
+ I as useId
54
20
  };
55
21
  //# sourceMappingURL=index346.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index346.js","sources":["../../../node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js"],"sourcesContent":["'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { resolveRef } from \"../utils/resolveRef.js\";\nimport { TransitionStatusDataAttributes } from \"./stateAttributesMapping.js\";\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.\n * @param treatAbortedAsFinished - Whether to treat aborted animations as finished. If `false`, and there are aborted animations,\n * the function will check again if any new animations have started and wait for them to finish.\n * @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback\n */\nexport function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {\n const frame = useAnimationFrame();\n return useStableCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n const element = resolveRef(elementOrRef);\n if (element == null) {\n return;\n }\n const resolvedElement = element;\n const done = () => {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\n };\n if (typeof resolvedElement.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n return;\n }\n function exec() {\n Promise.all(resolvedElement.getAnimations().map(animation => animation.finished)).then(() => {\n if (!signal?.aborted) {\n done();\n }\n }).catch(() => {\n if (treatAbortedAsFinished) {\n if (!signal?.aborted) {\n done();\n }\n return;\n }\n const currentAnimations = resolvedElement.getAnimations();\n if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some(animation => animation.pending || animation.playState !== 'finished')) {\n // Sometimes animations can be aborted because a property they depend on changes while the animation plays.\n // In such cases, we need to re-check if any new animations have started.\n exec();\n }\n });\n }\n if (waitForStartingStyleRemoved) {\n const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;\n\n // If `[data-starting-style]` isn't present, fall back to waiting one more frame\n // to give \"open\" animations a chance to be registered.\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n frame.request(exec);\n return;\n }\n\n // Wait for `[data-starting-style]` to have been removed.\n const attributeObserver = new MutationObserver(() => {\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n attributeObserver.disconnect();\n exec();\n }\n });\n attributeObserver.observe(resolvedElement, {\n attributes: true,\n attributeFilter: [startingStyleAttribute]\n });\n signal?.addEventListener('abort', () => attributeObserver.disconnect(), {\n once: true\n });\n return;\n }\n frame.request(exec);\n });\n}"],"names":["useAnimationsFinished","elementOrRef","waitForStartingStyleRemoved","treatAbortedAsFinished","frame","useAnimationFrame","useStableCallback","fnToExecute","signal","element","resolveRef","resolvedElement","done","ReactDOM","exec","animation","currentAnimations","startingStyleAttribute","TransitionStatusDataAttributes","attributeObserver"],"mappings":";;;;;AAgBO,SAASA,EAAsBC,GAAcC,IAA8B,IAAOC,IAAyB,IAAM;AACtH,QAAMC,IAAQC,EAAiB;AAC/B,SAAOC,EAAkB,CAACC,GAM1BC,IAAS,SAAS;AAChB,IAAAJ,EAAM,OAAM;AACZ,UAAMK,IAAUC,EAAWT,CAAY;AACvC,QAAIQ,KAAW;AACb;AAEF,UAAME,IAAkBF,GAClBG,IAAO,MAAM;AAGjB,MAAAC,EAAS,UAAUN,CAAW;AAAA,IAChC;AACA,QAAI,OAAOI,EAAgB,iBAAkB,cAAc,WAAW,6BAA6B;AACjG,MAAAJ,EAAW;AACX;AAAA,IACF;AACA,aAASO,IAAO;AACd,cAAQ,IAAIH,EAAgB,gBAAgB,IAAI,CAAAI,MAAaA,EAAU,QAAQ,CAAC,EAAE,KAAK,MAAM;AAC3F,QAAKP,GAAQ,WACXI,EAAI;AAAA,MAER,CAAC,EAAE,MAAM,MAAM;AACb,YAAIT,GAAwB;AAC1B,UAAKK,GAAQ,WACXI,EAAI;AAEN;AAAA,QACF;AACA,cAAMI,IAAoBL,EAAgB,cAAa;AACvD,QAAI,CAACH,GAAQ,WAAWQ,EAAkB,SAAS,KAAKA,EAAkB,KAAK,CAAAD,MAAaA,EAAU,WAAWA,EAAU,cAAc,UAAU,KAGjJD,EAAI;AAAA,MAER,CAAC;AAAA,IACH;AACA,QAAIZ,GAA6B;AAC/B,YAAMe,IAAyBC,EAA+B;AAI9D,UAAI,CAACP,EAAgB,aAAaM,CAAsB,GAAG;AACzD,QAAAb,EAAM,QAAQU,CAAI;AAClB;AAAA,MACF;AAGA,YAAMK,IAAoB,IAAI,iBAAiB,MAAM;AACnD,QAAKR,EAAgB,aAAaM,CAAsB,MACtDE,EAAkB,WAAU,GAC5BL,EAAI;AAAA,MAER,CAAC;AACD,MAAAK,EAAkB,QAAQR,GAAiB;AAAA,QACzC,YAAY;AAAA,QACZ,iBAAiB,CAACM,CAAsB;AAAA,MAChD,CAAO,GACDT,GAAQ,iBAAiB,SAAS,MAAMW,EAAkB,WAAU,GAAI;AAAA,QACtE,MAAM;AAAA,MACd,CAAO;AACD;AAAA,IACF;AACA,IAAAf,EAAM,QAAQU,CAAI;AAAA,EACpB,CAAC;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index346.js","sources":["../../../node_modules/@base-ui/utils/esm/useId.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.js\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`${prefix}-${globalId}`);\n }\n }, [defaultId, prefix]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}"],"names":["globalId","useGlobalId","idOverride","prefix","defaultId","setDefaultId","React","id","maybeReactUseId","SafeReact","useId","reactId"],"mappings":";;AAIA,IAAIA,IAAW;AAGf,SAASC,EAAYC,GAAYC,IAAS,OAAO;AAC/C,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAM,SAASJ,CAAU,GACrDK,IAAKL,KAAcE;AACzB,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAIF,KAAa,SAKfJ,KAAY,GACZK,EAAa,GAAGF,CAAM,IAAIH,CAAQ,EAAE;AAAA,EAExC,GAAG,CAACI,GAAWD,CAAM,CAAC,GACfI;AACT;AACA,MAAMC,IAAkBC,EAAU;AAQ3B,SAASC,EAAMR,GAAYC,GAAQ;AAExC,MAAIK,MAAoB,QAAW;AACjC,UAAMG,IAAUH,EAAe;AAC/B,WAAON,MAAeC,IAAS,GAAGA,CAAM,IAAIQ,CAAO,KAAKA;AAAA,EAC1D;AAIA,SAAOV,EAAYC,GAAYC,CAAM;AACvC;","x_google_ignoreList":[0]}
package/dist/index347.js CHANGED
@@ -1,126 +1,9 @@
1
- import { getWindow as d, isOverflowElement as m } from "./index309.js";
2
- import { addEventListener as T } from "./index300.js";
3
- import { isIOS as E, isWebKit as H } from "./index301.js";
4
- import { ownerDocument as a } from "./index284.js";
5
- import { useIsoLayoutEffect as z } from "./index261.js";
6
- import { Timeout as k } from "./index285.js";
7
- import { AnimationFrame as j } from "./index302.js";
8
- import { NOOP as F } from "./index264.js";
9
- let Y = {}, C = {}, O = "";
10
- function R(s) {
11
- if (typeof document > "u")
12
- return !1;
13
- const e = a(s);
14
- return d(e).innerWidth - e.documentElement.clientWidth > 0;
15
- }
16
- function I(s) {
17
- if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u")
18
- return !1;
19
- const t = a(s), o = t.documentElement, l = t.body, r = m(o) ? o : l, i = r.style.overflowY, c = o.style.scrollbarGutter;
20
- o.style.scrollbarGutter = "stable", r.style.overflowY = "scroll";
21
- const u = r.offsetWidth;
22
- r.style.overflowY = "hidden";
23
- const f = r.offsetWidth;
24
- return r.style.overflowY = i, o.style.scrollbarGutter = c, u === f;
25
- }
26
- function V(s) {
27
- const e = a(s), t = e.documentElement, o = e.body, l = m(t) ? t : o, r = {
28
- overflowY: l.style.overflowY,
29
- overflowX: l.style.overflowX
30
- };
31
- return Object.assign(l.style, {
32
- overflowY: "hidden",
33
- overflowX: "hidden"
34
- }), () => {
35
- Object.assign(l.style, r);
36
- };
37
- }
38
- function q(s) {
39
- const e = a(s), t = e.documentElement, o = e.body, l = d(t);
40
- let r = 0, i = 0, c = !1;
41
- const u = j.create();
42
- if (H && (l.visualViewport?.scale ?? 1) !== 1)
43
- return () => {
44
- };
45
- function f() {
46
- const h = l.getComputedStyle(t), n = l.getComputedStyle(o), v = (h.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
47
- r = t.scrollTop, i = t.scrollLeft, Y = {
48
- scrollbarGutter: t.style.scrollbarGutter,
49
- overflowY: t.style.overflowY,
50
- overflowX: t.style.overflowX
51
- }, O = t.style.scrollBehavior, C = {
52
- position: o.style.position,
53
- height: o.style.height,
54
- width: o.style.width,
55
- boxSizing: o.style.boxSizing,
56
- overflowY: o.style.overflowY,
57
- overflowX: o.style.overflowX,
58
- scrollBehavior: o.style.scrollBehavior
59
- };
60
- const G = t.scrollHeight > t.clientHeight, B = t.scrollWidth > t.clientWidth, W = h.overflowY === "scroll" || n.overflowY === "scroll", x = h.overflowX === "scroll" || n.overflowX === "scroll", b = Math.max(0, l.innerWidth - o.clientWidth), w = Math.max(0, l.innerHeight - o.clientHeight), p = parseFloat(n.marginTop) + parseFloat(n.marginBottom), g = parseFloat(n.marginLeft) + parseFloat(n.marginRight), S = m(t) ? t : o;
61
- if (c = I(s), c) {
62
- t.style.scrollbarGutter = v, S.style.overflowY = "hidden", S.style.overflowX = "hidden";
63
- return;
64
- }
65
- Object.assign(t.style, {
66
- scrollbarGutter: v,
67
- overflowY: "hidden",
68
- overflowX: "hidden"
69
- }), (G || W) && (t.style.overflowY = "scroll"), (B || x) && (t.style.overflowX = "scroll"), Object.assign(o.style, {
70
- position: "relative",
71
- height: p || w ? `calc(100dvh - ${p + w}px)` : "100dvh",
72
- width: g || b ? `calc(100vw - ${g + b}px)` : "100vw",
73
- boxSizing: "border-box",
74
- overflow: "hidden",
75
- scrollBehavior: "unset"
76
- }), o.scrollTop = r, o.scrollLeft = i, t.setAttribute("data-base-ui-scroll-locked", ""), t.style.scrollBehavior = "unset";
77
- }
78
- function y() {
79
- Object.assign(t.style, Y), Object.assign(o.style, C), c || (t.scrollTop = r, t.scrollLeft = i, t.removeAttribute("data-base-ui-scroll-locked"), t.style.scrollBehavior = O);
80
- }
81
- function L() {
82
- y(), u.request(f);
83
- }
84
- f();
85
- const X = T(l, "resize", L);
86
- return () => {
87
- u.cancel(), y(), typeof l.removeEventListener == "function" && X();
88
- };
89
- }
90
- class A {
91
- lockCount = 0;
92
- restore = null;
93
- timeoutLock = k.create();
94
- timeoutUnlock = k.create();
95
- acquire(e) {
96
- return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
97
- }
98
- release = () => {
99
- this.lockCount -= 1, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
100
- };
101
- unlock = () => {
102
- this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
103
- };
104
- lock(e) {
105
- if (this.lockCount === 0 || this.restore !== null)
106
- return;
107
- const o = a(e).documentElement, l = d(o).getComputedStyle(o).overflowY;
108
- if (l === "hidden" || l === "clip") {
109
- this.restore = F;
110
- return;
111
- }
112
- const r = E || !R(e);
113
- this.restore = r ? V(e) : q(e);
114
- }
115
- }
116
- const K = new A();
117
- function tt(s = !0, e = null) {
118
- z(() => {
119
- if (s)
120
- return K.acquire(e);
121
- }, [s, e]);
1
+ import * as t from "react";
2
+ const e = parseInt(t.version, 10);
3
+ function o(r) {
4
+ return e >= r;
122
5
  }
123
6
  export {
124
- tt as useScrollLock
7
+ o as isReactVersionAtLeast
125
8
  };
126
9
  //# sourceMappingURL=index347.js.map