@rpcbase/ui 0.252.0 → 0.254.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 (353) hide show
  1. package/dist/components/Notifications/types.d.ts +2 -0
  2. package/dist/components/Notifications/types.d.ts.map +1 -1
  3. package/dist/index10.js +2 -2
  4. package/dist/index106.js +1 -1
  5. package/dist/index11.js +2 -2
  6. package/dist/index12.js +3 -3
  7. package/dist/index120.js +10 -10
  8. package/dist/index122.js +2 -2
  9. package/dist/index123.js +3 -3
  10. package/dist/index13.js +2 -2
  11. package/dist/index14.js +2 -2
  12. package/dist/index15.js +2 -2
  13. package/dist/index16.js +8 -8
  14. package/dist/index167.js +3 -3
  15. package/dist/index17.js +1 -1
  16. package/dist/index172.js +3 -3
  17. package/dist/index175.js +1 -1
  18. package/dist/index176.js +4 -4
  19. package/dist/index18.js +7 -7
  20. package/dist/index182.js +2 -2
  21. package/dist/index184.js +4 -4
  22. package/dist/index185.js +14 -14
  23. package/dist/index186.js +1 -1
  24. package/dist/index187.js +1 -1
  25. package/dist/index188.js +6 -6
  26. package/dist/index189.js +2 -2
  27. package/dist/index19.js +16 -16
  28. package/dist/index192.js +2 -2
  29. package/dist/index193.js +6 -6
  30. package/dist/index21.js +1 -1
  31. package/dist/index22.js +2 -2
  32. package/dist/index23.js +1 -1
  33. package/dist/index235.js +27 -14
  34. package/dist/index235.js.map +1 -1
  35. package/dist/index236.js +12 -7
  36. package/dist/index236.js.map +1 -1
  37. package/dist/index237.js +24 -9
  38. package/dist/index237.js.map +1 -1
  39. package/dist/index238.js +5 -10
  40. package/dist/index238.js.map +1 -1
  41. package/dist/index239.js +15 -20
  42. package/dist/index239.js.map +1 -1
  43. package/dist/index24.js +1 -1
  44. package/dist/index240.js +7 -8
  45. package/dist/index240.js.map +1 -1
  46. package/dist/index241.js +10 -9
  47. package/dist/index241.js.map +1 -1
  48. package/dist/index242.js +10 -9
  49. package/dist/index242.js.map +1 -1
  50. package/dist/index243.js +21 -4
  51. package/dist/index243.js.map +1 -1
  52. package/dist/index244.js +8 -5
  53. package/dist/index244.js.map +1 -1
  54. package/dist/index245.js +9 -16
  55. package/dist/index245.js.map +1 -1
  56. package/dist/index246.js +8 -8
  57. package/dist/index246.js.map +1 -1
  58. package/dist/index247.js +4 -18
  59. package/dist/index247.js.map +1 -1
  60. package/dist/index248.js +5 -20
  61. package/dist/index248.js.map +1 -1
  62. package/dist/index249.js +16 -12
  63. package/dist/index249.js.map +1 -1
  64. package/dist/index25.js +1 -1
  65. package/dist/index250.js +9 -29
  66. package/dist/index250.js.map +1 -1
  67. package/dist/index251.js +18 -12
  68. package/dist/index251.js.map +1 -1
  69. package/dist/index252.js +20 -25
  70. package/dist/index252.js.map +1 -1
  71. package/dist/index253.js +12 -5
  72. package/dist/index253.js.map +1 -1
  73. package/dist/index260.js +2 -2
  74. package/dist/index273.js +1 -1
  75. package/dist/index277.js +25 -20
  76. package/dist/index277.js.map +1 -1
  77. package/dist/index278.js +24 -62
  78. package/dist/index278.js.map +1 -1
  79. package/dist/index279.js +16 -6
  80. package/dist/index279.js.map +1 -1
  81. package/dist/index28.js +1 -1
  82. package/dist/index280.js +20 -6
  83. package/dist/index280.js.map +1 -1
  84. package/dist/index281.js +66 -11
  85. package/dist/index281.js.map +1 -1
  86. package/dist/index282.js +6 -3
  87. package/dist/index282.js.map +1 -1
  88. package/dist/index283.js +5 -50
  89. package/dist/index283.js.map +1 -1
  90. package/dist/index284.js +12 -4
  91. package/dist/index284.js.map +1 -1
  92. package/dist/index285.js +3 -29
  93. package/dist/index285.js.map +1 -1
  94. package/dist/index286.js +49 -15
  95. package/dist/index286.js.map +1 -1
  96. package/dist/index287.js +4 -6
  97. package/dist/index287.js.map +1 -1
  98. package/dist/index288.js +28 -20
  99. package/dist/index288.js.map +1 -1
  100. package/dist/index289.js +15 -52
  101. package/dist/index289.js.map +1 -1
  102. package/dist/index29.js +3 -56
  103. package/dist/index29.js.map +1 -1
  104. package/dist/index290.js +5 -20
  105. package/dist/index290.js.map +1 -1
  106. package/dist/index291.js +21 -41
  107. package/dist/index291.js.map +1 -1
  108. package/dist/index292.js +53 -39
  109. package/dist/index292.js.map +1 -1
  110. package/dist/index293.js +21 -46
  111. package/dist/index293.js.map +1 -1
  112. package/dist/index294.js +40 -19
  113. package/dist/index294.js.map +1 -1
  114. package/dist/index295.js +38 -69
  115. package/dist/index295.js.map +1 -1
  116. package/dist/index296.js +46 -18
  117. package/dist/index296.js.map +1 -1
  118. package/dist/index297.js +20 -3
  119. package/dist/index297.js.map +1 -1
  120. package/dist/index298.js +69 -10
  121. package/dist/index298.js.map +1 -1
  122. package/dist/index299.js +16 -12
  123. package/dist/index299.js.map +1 -1
  124. package/dist/index3.js +2 -2
  125. package/dist/index30.js +242 -3
  126. package/dist/index30.js.map +1 -1
  127. package/dist/index300.js +3 -18
  128. package/dist/index300.js.map +1 -1
  129. package/dist/index301.js +11 -36
  130. package/dist/index301.js.map +1 -1
  131. package/dist/index302.js +12 -238
  132. package/dist/index302.js.map +1 -1
  133. package/dist/index303.js +15 -249
  134. package/dist/index303.js.map +1 -1
  135. package/dist/index304.js +35 -67
  136. package/dist/index304.js.map +1 -1
  137. package/dist/index305.js +233 -93
  138. package/dist/index305.js.map +1 -1
  139. package/dist/index306.js +243 -74
  140. package/dist/index306.js.map +1 -1
  141. package/dist/index307.js +68 -3
  142. package/dist/index307.js.map +1 -1
  143. package/dist/index308.js +96 -26
  144. package/dist/index308.js.map +1 -1
  145. package/dist/index309.js +83 -16
  146. package/dist/index309.js.map +1 -1
  147. package/dist/index31.js +21 -239
  148. package/dist/index31.js.map +1 -1
  149. package/dist/index310.js +4 -35
  150. package/dist/index310.js.map +1 -1
  151. package/dist/index311.js +28 -16
  152. package/dist/index311.js.map +1 -1
  153. package/dist/index312.js +16 -3
  154. package/dist/index312.js.map +1 -1
  155. package/dist/index313.js +35 -27
  156. package/dist/index313.js.map +1 -1
  157. package/dist/index314.js +17 -28
  158. package/dist/index314.js.map +1 -1
  159. package/dist/index315.js +4 -4
  160. package/dist/index315.js.map +1 -1
  161. package/dist/index316.js +23 -75
  162. package/dist/index316.js.map +1 -1
  163. package/dist/index317.js +25 -269
  164. package/dist/index317.js.map +1 -1
  165. package/dist/index318.js +4 -12
  166. package/dist/index318.js.map +1 -1
  167. package/dist/index319.js +79 -11
  168. package/dist/index319.js.map +1 -1
  169. package/dist/index32.js +4 -23
  170. package/dist/index32.js.map +1 -1
  171. package/dist/index320.js +270 -23
  172. package/dist/index320.js.map +1 -1
  173. package/dist/index321.js +11 -16
  174. package/dist/index321.js.map +1 -1
  175. package/dist/index322.js +10 -125
  176. package/dist/index322.js.map +1 -1
  177. package/dist/index323.js +24 -4
  178. package/dist/index323.js.map +1 -1
  179. package/dist/index324.js +16 -65
  180. package/dist/index324.js.map +1 -1
  181. package/dist/index325.js +125 -13
  182. package/dist/index325.js.map +1 -1
  183. package/dist/index326.js +5 -7
  184. package/dist/index326.js.map +1 -1
  185. package/dist/index327.js +65 -5
  186. package/dist/index327.js.map +1 -1
  187. package/dist/index328.js +14 -4
  188. package/dist/index328.js.map +1 -1
  189. package/dist/index329.js +7 -10
  190. package/dist/index329.js.map +1 -1
  191. package/dist/index33.js +6 -3
  192. package/dist/index33.js.map +1 -1
  193. package/dist/index330.js +5 -7
  194. package/dist/index330.js.map +1 -1
  195. package/dist/index331.js +3 -133
  196. package/dist/index331.js.map +1 -1
  197. package/dist/index332.js +9 -398
  198. package/dist/index332.js.map +1 -1
  199. package/dist/index333.js +8 -5
  200. package/dist/index333.js.map +1 -1
  201. package/dist/index334.js +131 -50
  202. package/dist/index334.js.map +1 -1
  203. package/dist/index335.js +399 -11
  204. package/dist/index335.js.map +1 -1
  205. package/dist/index336.js +5 -28
  206. package/dist/index336.js.map +1 -1
  207. package/dist/index337.js +52 -11
  208. package/dist/index337.js.map +1 -1
  209. package/dist/index338.js +11 -24
  210. package/dist/index338.js.map +1 -1
  211. package/dist/index339.js +27 -28
  212. package/dist/index339.js.map +1 -1
  213. package/dist/index34.js +38 -8
  214. package/dist/index34.js.map +1 -1
  215. package/dist/index340.js +11 -16
  216. package/dist/index340.js.map +1 -1
  217. package/dist/index341.js +1 -1
  218. package/dist/index348.js +5 -51
  219. package/dist/index348.js.map +1 -1
  220. package/dist/index349.js +51 -5
  221. package/dist/index349.js.map +1 -1
  222. package/dist/index35.js +74 -35
  223. package/dist/index35.js.map +1 -1
  224. package/dist/index350.js +3 -3
  225. package/dist/index358.js +5 -5
  226. package/dist/index359.js +1 -1
  227. package/dist/index36.js +20 -74
  228. package/dist/index36.js.map +1 -1
  229. package/dist/index363.js +5 -5
  230. package/dist/index368.js +11 -5
  231. package/dist/index368.js.map +1 -1
  232. package/dist/index369.js +6 -3
  233. package/dist/index369.js.map +1 -1
  234. package/dist/index37.js +33 -18
  235. package/dist/index37.js.map +1 -1
  236. package/dist/index370.js +3 -12
  237. package/dist/index370.js.map +1 -1
  238. package/dist/index372.js +1 -1
  239. package/dist/index375.js +2 -2
  240. package/dist/index376.js +3 -3
  241. package/dist/index377.js +8 -8
  242. package/dist/index379.js +5 -5
  243. package/dist/index38.js +26 -36
  244. package/dist/index38.js.map +1 -1
  245. package/dist/index380.js +3 -3
  246. package/dist/index382.js +1 -1
  247. package/dist/index384.js +1 -1
  248. package/dist/index385.js +2 -2
  249. package/dist/index386.js +1 -1
  250. package/dist/index388.js +2 -2
  251. package/dist/index389.js +2 -2
  252. package/dist/index39.js +21 -26
  253. package/dist/index39.js.map +1 -1
  254. package/dist/index399.js +2 -2
  255. package/dist/index4.js +2 -2
  256. package/dist/index40.js +56 -20
  257. package/dist/index40.js.map +1 -1
  258. package/dist/index41.js +51 -59
  259. package/dist/index41.js.map +1 -1
  260. package/dist/index411.js +3 -15
  261. package/dist/index411.js.map +1 -1
  262. package/dist/index412.js +15 -3
  263. package/dist/index412.js.map +1 -1
  264. package/dist/index413.js +1 -1
  265. package/dist/index414.js +68 -5
  266. package/dist/index414.js.map +1 -1
  267. package/dist/index415.js +30 -55
  268. package/dist/index415.js.map +1 -1
  269. package/dist/index416.js +9 -68
  270. package/dist/index416.js.map +1 -1
  271. package/dist/index417.js +148 -26
  272. package/dist/index417.js.map +1 -1
  273. package/dist/index418.js +108 -9
  274. package/dist/index418.js.map +1 -1
  275. package/dist/index419.js +5 -153
  276. package/dist/index419.js.map +1 -1
  277. package/dist/index42.js +21 -50
  278. package/dist/index42.js.map +1 -1
  279. package/dist/index420.js +54 -106
  280. package/dist/index420.js.map +1 -1
  281. package/dist/index43.js +127 -18
  282. package/dist/index43.js.map +1 -1
  283. package/dist/index44.js +39 -122
  284. package/dist/index44.js.map +1 -1
  285. package/dist/index45.js +85 -42
  286. package/dist/index45.js.map +1 -1
  287. package/dist/index46.js +123 -87
  288. package/dist/index46.js.map +1 -1
  289. package/dist/index47.js +5 -126
  290. package/dist/index47.js.map +1 -1
  291. package/dist/index48.js +332 -5
  292. package/dist/index48.js.map +1 -1
  293. package/dist/index49.js +245 -320
  294. package/dist/index49.js.map +1 -1
  295. package/dist/index5.js +2 -2
  296. package/dist/index50.js +23 -254
  297. package/dist/index50.js.map +1 -1
  298. package/dist/index51.js +129 -25
  299. package/dist/index51.js.map +1 -1
  300. package/dist/index52.js +24 -129
  301. package/dist/index52.js.map +1 -1
  302. package/dist/index53.js +19 -22
  303. package/dist/index53.js.map +1 -1
  304. package/dist/index54.js +134 -19
  305. package/dist/index54.js.map +1 -1
  306. package/dist/index55.js +30 -133
  307. package/dist/index55.js.map +1 -1
  308. package/dist/index56.js +24 -30
  309. package/dist/index56.js.map +1 -1
  310. package/dist/index57.js +38 -26
  311. package/dist/index57.js.map +1 -1
  312. package/dist/index58.js +19 -39
  313. package/dist/index58.js.map +1 -1
  314. package/dist/index59.js +133 -18
  315. package/dist/index59.js.map +1 -1
  316. package/dist/index6.js +4 -4
  317. package/dist/index60.js +49 -134
  318. package/dist/index60.js.map +1 -1
  319. package/dist/index61.js +25 -48
  320. package/dist/index61.js.map +1 -1
  321. package/dist/index62.js +57 -28
  322. package/dist/index62.js.map +1 -1
  323. package/dist/index63.js +56 -57
  324. package/dist/index63.js.map +1 -1
  325. package/dist/index64.js +5 -5
  326. package/dist/index64.js.map +1 -1
  327. package/dist/index66.js +23 -11
  328. package/dist/index66.js.map +1 -1
  329. package/dist/index67.js +232 -17
  330. package/dist/index67.js.map +1 -1
  331. package/dist/index68.js +5 -5
  332. package/dist/index68.js.map +1 -1
  333. package/dist/index7.js +11 -11
  334. package/dist/index70.js +11 -23
  335. package/dist/index70.js.map +1 -1
  336. package/dist/index71.js +17 -232
  337. package/dist/index71.js.map +1 -1
  338. package/dist/index72.js +6 -2
  339. package/dist/index72.js.map +1 -1
  340. package/dist/index73.js +8 -2
  341. package/dist/index73.js.map +1 -1
  342. package/dist/index74.js +6 -2
  343. package/dist/index74.js.map +1 -1
  344. package/dist/index75.js +2 -2
  345. package/dist/index76.js +2 -6
  346. package/dist/index76.js.map +1 -1
  347. package/dist/index77.js +2 -8
  348. package/dist/index77.js.map +1 -1
  349. package/dist/index78.js +2 -6
  350. package/dist/index78.js.map +1 -1
  351. package/dist/index8.js +2 -2
  352. package/dist/index9.js +1 -1
  353. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index337.js","sources":["../../../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs"],"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":"index337.js","sources":["../../../node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useCompositeListContext } from \"./CompositeListContext.mjs\";\nexport let IndexGuessBehavior = /*#__PURE__*/function (IndexGuessBehavior) {\n IndexGuessBehavior[IndexGuessBehavior[\"None\"] = 0] = \"None\";\n IndexGuessBehavior[IndexGuessBehavior[\"GuessFromOrder\"] = 1] = \"GuessFromOrder\";\n return IndexGuessBehavior;\n}({});\n\n/**\n * Used to register a list item and its index (DOM position) in the `CompositeList`.\n */\nexport function useCompositeListItem(params = {}) {\n const {\n label,\n metadata,\n textRef,\n indexGuessBehavior,\n index: externalIndex\n } = params;\n const {\n register,\n unregister,\n subscribeMapChange,\n elementsRef,\n labelsRef,\n nextIndexRef\n } = useCompositeListContext();\n const indexRef = React.useRef(-1);\n const [index, setIndex] = React.useState(externalIndex ?? (indexGuessBehavior === IndexGuessBehavior.GuessFromOrder ? () => {\n if (indexRef.current === -1) {\n const newIndex = nextIndexRef.current;\n nextIndexRef.current += 1;\n indexRef.current = newIndex;\n }\n return indexRef.current;\n } : -1));\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index !== -1 && node !== null) {\n elementsRef.current[index] = node;\n if (labelsRef) {\n const isLabelDefined = label !== undefined;\n labelsRef.current[index] = isLabelDefined ? label : textRef?.current?.textContent ?? node.textContent;\n }\n }\n }, [index, elementsRef, labelsRef, label, textRef]);\n useIsoLayoutEffect(() => {\n if (externalIndex != null) {\n return undefined;\n }\n const node = componentRef.current;\n if (node) {\n register(node, metadata);\n return () => {\n unregister(node);\n };\n }\n return undefined;\n }, [externalIndex, register, unregister, metadata]);\n useIsoLayoutEffect(() => {\n if (externalIndex != null) {\n return undefined;\n }\n return subscribeMapChange(map => {\n const i = componentRef.current ? map.get(componentRef.current)?.index : null;\n if (i != null) {\n setIndex(i);\n }\n });\n }, [externalIndex, subscribeMapChange, setIndex]);\n return {\n ref,\n index\n };\n}"],"names":["IndexGuessBehavior","useCompositeListItem","params","label","metadata","textRef","indexGuessBehavior","externalIndex","register","unregister","subscribeMapChange","elementsRef","labelsRef","nextIndexRef","useCompositeListContext","indexRef","React","index","setIndex","newIndex","componentRef","ref","node","isLabelDefined","useIsoLayoutEffect","map","i"],"mappings":";;;AAKU,IAACA,IAAkC,0BAAUA,GAAoB;AACzE,SAAAA,EAAmBA,EAAmB,OAAU,CAAC,IAAI,QACrDA,EAAmBA,EAAmB,iBAAoB,CAAC,IAAI,kBACxDA;AACT,GAAE,CAAA,CAAE;AAKG,SAASC,EAAqBC,IAAS,IAAI;AAChD,QAAM;AAAA,IACJ,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,OAAOC;AAAA,EACX,IAAML,GACE;AAAA,IACJ,UAAAM;AAAA,IACA,YAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMC,EAAuB,GACrBC,IAAWC,EAAM,OAAO,EAAE,GAC1B,CAACC,GAAOC,CAAQ,IAAIF,EAAM,SAAST,MAAkBD,MAAuBN,EAAmB,iBAAiB,MAAM;AAC1H,QAAIe,EAAS,YAAY,IAAI;AAC3B,YAAMI,IAAWN,EAAa;AAC9B,MAAAA,EAAa,WAAW,GACxBE,EAAS,UAAUI;AAAA,IACrB;AACA,WAAOJ,EAAS;AAAA,EAClB,IAAI,GAAG,GACDK,IAAeJ,EAAM,OAAO,IAAI,GAChCK,IAAML,EAAM,YAAY,CAAAM,MAAQ;AAEpC,QADAF,EAAa,UAAUE,GACnBL,MAAU,MAAMK,MAAS,SAC3BX,EAAY,QAAQM,CAAK,IAAIK,GACzBV,IAAW;AACb,YAAMW,IAAiBpB,MAAU;AACjC,MAAAS,EAAU,QAAQK,CAAK,IAAIM,IAAiBpB,IAAQE,GAAS,SAAS,eAAeiB,EAAK;AAAA,IAC5F;AAAA,EAEJ,GAAG,CAACL,GAAON,GAAaC,GAAWT,GAAOE,CAAO,CAAC;AAClD,SAAAmB,EAAmB,MAAM;AACvB,QAAIjB,KAAiB;AACnB;AAEF,UAAMe,IAAOF,EAAa;AAC1B,QAAIE;AACF,aAAAd,EAASc,GAAMlB,CAAQ,GAChB,MAAM;AACX,QAAAK,EAAWa,CAAI;AAAA,MACjB;AAAA,EAGJ,GAAG,CAACf,GAAeC,GAAUC,GAAYL,CAAQ,CAAC,GAClDoB,EAAmB,MAAM;AACvB,QAAIjB,KAAiB;AAGrB,aAAOG,EAAmB,CAAAe,MAAO;AAC/B,cAAMC,IAAIN,EAAa,UAAUK,EAAI,IAAIL,EAAa,OAAO,GAAG,QAAQ;AACxE,QAAIM,KAAK,QACPR,EAASQ,CAAC;AAAA,MAEd,CAAC;AAAA,EACH,GAAG,CAACnB,GAAeG,GAAoBQ,CAAQ,CAAC,GACzC;AAAA,IACL,KAAAG;AAAA,IACA,OAAAJ;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
package/dist/index338.js CHANGED
@@ -1,28 +1,15 @@
1
- import v, { getCountryCallingCode as b } from "./index163.js";
2
- import u from "./index272.js";
3
- import N from "./index273.js";
4
- import h from "./index165.js";
5
- function C(r, i, e, o, l) {
6
- if (!(i || e || o))
7
- return {
8
- number: r
9
- };
10
- var t = i || e ? b(i || e, l) : o;
11
- if (r.indexOf(t) === 0) {
12
- var n = new v(l);
13
- n.selectNumberingPlan(i || e || o);
14
- var m = r.slice(t.length), c = N(m, void 0, n), g = c.nationalNumber, a = N(r, void 0, n), f = a.nationalNumber;
15
- if (!u(f, n.nationalNumberPattern()) && u(g, n.nationalNumberPattern()) || h(f, void 0, n) === "TOO_LONG")
16
- return {
17
- countryCallingCode: t,
18
- number: m
19
- };
20
- }
21
- return {
22
- number: r
23
- };
1
+ import n from "./index190.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;
24
10
  }
25
11
  export {
26
- C as default
12
+ o as SelectItemContext,
13
+ s as useSelectItemContext
27
14
  };
28
15
  //# sourceMappingURL=index338.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index338.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js"],"sourcesContent":["import Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nimport extractNationalNumber from './extractNationalNumber.js';\nimport checkNumberLength from './checkNumberLength.js';\nimport getCountryCallingCode from '../getCountryCallingCode.js';\n\n/**\r\n * Sometimes some people incorrectly input international phone numbers\r\n * without the leading `+`. This function corrects such input.\r\n * @param {string} number — Phone number digits (only digits, no `+`).\r\n * @param {string} [country] — Exact country of the phone number.\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {object} metadataJson\r\n * @return {object} `{ countryCallingCode: string?, number: string }`, where `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code.\r\n */\nexport default function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadataJson) {\n // Validate arguments.\n // The `number` is known to be in a non-international form\n // because there's no leading \"+\" character.\n // Therefore, there must be either `country` or `defaultCountry` or `defaultCallingCode`.\n // Otherwise, there'd be no source for the calling code to search for in the `number`.\n if (!(country || defaultCountry || defaultCallingCode)) {\n // There's no source for the calling code to search for in the `number`.\n return {\n number: number\n };\n }\n var countryCallingCode = country || defaultCountry ? getCountryCallingCode(country || defaultCountry, metadataJson) : defaultCallingCode;\n if (number.indexOf(countryCallingCode) === 0) {\n var metadata = new Metadata(metadataJson);\n metadata.selectNumberingPlan(country || defaultCountry || defaultCallingCode);\n var possibleShorterNumber = number.slice(countryCallingCode.length);\n var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, undefined, metadata),\n possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;\n var _extractNationalNumbe2 = extractNationalNumber(number, undefined, metadata),\n nationalNumber = _extractNationalNumbe2.nationalNumber;\n\n // If the number was not valid before but is valid now,\n // or if it was too long before, we consider the number\n // with the country calling code stripped to be a better result\n // and keep that instead.\n // For example, in Germany (+49), `49` is a valid area code,\n // so if a number starts with `49`, it could be both a valid\n // national German number or an international number without\n // a leading `+`.\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, undefined, metadata) === 'TOO_LONG') {\n return {\n countryCallingCode: countryCallingCode,\n number: possibleShorterNumber\n };\n }\n }\n return {\n number: number\n };\n}\n//# sourceMappingURL=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map"],"names":["extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","number","country","defaultCountry","defaultCallingCode","metadataJson","countryCallingCode","getCountryCallingCode","metadata","Metadata","possibleShorterNumber","_extractNationalNumbe","extractNationalNumber","possibleShorterNationalNumber","_extractNationalNumbe2","nationalNumber","matchesEntirely","checkNumberLength"],"mappings":";;;;AAgBe,SAASA,EAAgEC,GAAQC,GAASC,GAAgBC,GAAoBC,GAAc;AAMzJ,MAAI,EAAEH,KAAWC,KAAkBC;AAEjC,WAAO;AAAA,MACL,QAAQH;AAAA,IACd;AAEE,MAAIK,IAAqBJ,KAAWC,IAAiBI,EAAsBL,KAAWC,GAAgBE,CAAY,IAAID;AACtH,MAAIH,EAAO,QAAQK,CAAkB,MAAM,GAAG;AAC5C,QAAIE,IAAW,IAAIC,EAASJ,CAAY;AACxC,IAAAG,EAAS,oBAAoBN,KAAWC,KAAkBC,CAAkB;AAC5E,QAAIM,IAAwBT,EAAO,MAAMK,EAAmB,MAAM,GAC9DK,IAAwBC,EAAsBF,GAAuB,QAAWF,CAAQ,GAC1FK,IAAgCF,EAAsB,gBACpDG,IAAyBF,EAAsBX,GAAQ,QAAWO,CAAQ,GAC5EO,IAAiBD,EAAuB;AAU1C,QAAI,CAACE,EAAgBD,GAAgBP,EAAS,sBAAqB,CAAE,KAAKQ,EAAgBH,GAA+BL,EAAS,sBAAqB,CAAE,KAAKS,EAAkBF,GAAgB,QAAWP,CAAQ,MAAM;AACvN,aAAO;AAAA,QACL,oBAAoBF;AAAA,QACpB,QAAQI;AAAA,MAChB;AAAA,EAEE;AACA,SAAO;AAAA,IACL,QAAQT;AAAA,EACZ;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index338.js","sources":["../../../node_modules/@base-ui/react/select/item/SelectItemContext.mjs"],"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]}
package/dist/index339.js CHANGED
@@ -1,32 +1,31 @@
1
- function F(l, i) {
2
- if (l && i.numberingPlan.nationalPrefixForParsing()) {
3
- var g = new RegExp("^(?:" + i.numberingPlan.nationalPrefixForParsing() + ")"), n = g.exec(l);
4
- if (n) {
5
- var r, P, v = n.length - 1, e = v > 0 && n[v];
6
- if (i.nationalPrefixTransformRule() && e)
7
- r = l.replace(g, i.nationalPrefixTransformRule()), v > 1 && (P = n[1]);
8
- else {
9
- var o = n[0];
10
- r = l.slice(o.length), e && (P = n[1]);
11
- }
12
- var f;
13
- if (e) {
14
- var s = l.indexOf(n[1]), a = l.slice(0, s);
15
- a === i.numberingPlan.nationalPrefix() && (f = i.numberingPlan.nationalPrefix());
16
- } else
17
- f = n[0];
18
- return {
19
- nationalNumber: r,
20
- nationalPrefix: f,
21
- carrierCode: P
22
- };
23
- }
24
- }
25
- return {
26
- nationalNumber: l
27
- };
1
+ import { android as r } from "./index357.js";
2
+ import { jsdom as o } from "./index370.js";
3
+ function p(i) {
4
+ i.preventDefault(), i.stopPropagation();
5
+ }
6
+ function e(i) {
7
+ return "nativeEvent" in i;
8
+ }
9
+ function c(i) {
10
+ return i.pointerType === "" && i.isTrusted ? !0 : r && i.pointerType ? i.type === "click" && i.buttons === 1 : i.detail === 0 && !i.pointerType;
11
+ }
12
+ function a(i) {
13
+ return o ? !1 : !r && i.width === 0 && i.height === 0 || r && i.width === 1 && i.height === 1 && i.pressure === 0 && i.detail === 0 && i.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
14
+ i.width < 1 && i.height < 1 && i.pressure === 0 && i.detail === 0 && i.pointerType === "touch";
15
+ }
16
+ function l(i, t) {
17
+ return ["mouse", "pen"].includes(i);
18
+ }
19
+ function d(i) {
20
+ const t = i.type;
21
+ return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
28
22
  }
29
23
  export {
30
- F as default
24
+ d as isClickLikeEvent,
25
+ l as isMouseLikePointerType,
26
+ e as isReactEvent,
27
+ c as isVirtualClick,
28
+ a as isVirtualPointerEvent,
29
+ p as stopEvent
31
30
  };
32
31
  //# sourceMappingURL=index339.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index339.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js"],"sourcesContent":["/**\r\n * Strips any national prefix (such as 0, 1) present in a\r\n * (possibly incomplete) number provided.\r\n * \"Carrier codes\" are only used in Colombia and Brazil,\r\n * and only when dialing within those countries from a mobile phone to a fixed line number.\r\n * Sometimes it won't actually strip national prefix\r\n * and will instead prepend some digits to the `number`:\r\n * for example, when number `2345678` is passed with `VI` country selected,\r\n * it will return `{ number: \"3402345678\" }`, because `340` area code is prepended.\r\n * @param {string} number — National number digits.\r\n * @param {object} metadata — Metadata with country selected.\r\n * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.\r\n */\nexport default function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {\n if (number && metadata.numberingPlan.nationalPrefixForParsing()) {\n // See METADATA.md for the description of\n // `national_prefix_for_parsing` and `national_prefix_transform_rule`.\n // Attempt to parse the first digits as a national prefix.\n var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');\n var prefixMatch = prefixPattern.exec(number);\n if (prefixMatch) {\n var nationalNumber;\n var carrierCode;\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n // If a `national_prefix_for_parsing` has any \"capturing groups\"\n // then it means that the national (significant) number is equal to\n // those \"capturing groups\" transformed via `national_prefix_transform_rule`,\n // and nothing could be said about the actual national prefix:\n // what is it and was it even there.\n // If a `national_prefix_for_parsing` doesn't have any \"capturing groups\",\n // then everything it matches is a national prefix.\n // To determine whether `national_prefix_for_parsing` matched any\n // \"capturing groups\", the value of the result of calling `.exec()`\n // is looked at, and if it has non-undefined values where there're\n // \"capturing groups\" in the regular expression, then it means\n // that \"capturing groups\" have been matched.\n // It's not possible to tell whether there'll be any \"capturing gropus\"\n // before the matching process, because a `national_prefix_for_parsing`\n // could exhibit both behaviors.\n var capturedGroupsCount = prefixMatch.length - 1;\n var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];\n if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {\n nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule());\n // If there's more than one captured group,\n // then carrier code is the second one.\n if (capturedGroupsCount > 1) {\n carrierCode = prefixMatch[1];\n }\n }\n // If there're no \"capturing groups\",\n // or if there're \"capturing groups\" but no\n // `national_prefix_transform_rule`,\n // then just strip the national prefix from the number,\n // and possibly a carrier code.\n // Seems like there could be more.\n else {\n // `prefixBeforeNationalNumber` is the whole substring matched by\n // the `national_prefix_for_parsing` regular expression.\n // There seem to be no guarantees that it's just a national prefix.\n // For example, if there's a carrier code, it's gonna be a\n // part of `prefixBeforeNationalNumber` too.\n var prefixBeforeNationalNumber = prefixMatch[0];\n nationalNumber = number.slice(prefixBeforeNationalNumber.length);\n // If there's at least one captured group,\n // then carrier code is the first one.\n if (hasCapturedGroups) {\n carrierCode = prefixMatch[1];\n }\n }\n // Tries to guess whether a national prefix was present in the input.\n // This is not something copy-pasted from Google's library:\n // they don't seem to have an equivalent for that.\n // So this isn't an \"officially approved\" way of doing something like that.\n // But since there seems no other existing method, this library uses it.\n var nationalPrefix;\n if (hasCapturedGroups) {\n var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);\n var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup);\n // Example: an Argentinian (AR) phone number `0111523456789`.\n // `prefixMatch[0]` is `01115`, and `$1` is `11`,\n // and the rest of the phone number is `23456789`.\n // The national number is transformed via `9$1` to `91123456789`.\n // National prefix `0` is detected being present at the start.\n // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {\n if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {\n nationalPrefix = metadata.numberingPlan.nationalPrefix();\n }\n } else {\n nationalPrefix = prefixMatch[0];\n }\n return {\n nationalNumber: nationalNumber,\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode\n };\n }\n }\n return {\n nationalNumber: number\n };\n}\n//# sourceMappingURL=extractNationalNumberFromPossiblyIncompleteNumber.js.map"],"names":["extractNationalNumberFromPossiblyIncompleteNumber","number","metadata","prefixPattern","prefixMatch","nationalNumber","carrierCode","capturedGroupsCount","hasCapturedGroups","prefixBeforeNationalNumber","nationalPrefix","possiblePositionOfTheFirstCapturedGroup","possibleNationalPrefix"],"mappings":"AAae,SAASA,EAAkDC,GAAQC,GAAU;AAC1F,MAAID,KAAUC,EAAS,cAAc,yBAAwB,GAAI;AAI/D,QAAIC,IAAgB,IAAI,OAAO,SAASD,EAAS,cAAc,yBAAwB,IAAK,GAAG,GAC3FE,IAAcD,EAAc,KAAKF,CAAM;AAC3C,QAAIG,GAAa;AACf,UAAIC,GACAC,GAiBAC,IAAsBH,EAAY,SAAS,GAC3CI,IAAoBD,IAAsB,KAAKH,EAAYG,CAAmB;AAClF,UAAIL,EAAS,4BAA2B,KAAMM;AAC5C,QAAAH,IAAiBJ,EAAO,QAAQE,GAAeD,EAAS,4BAA2B,CAAE,GAGjFK,IAAsB,MACxBD,IAAcF,EAAY,CAAC;AAAA,WAS1B;AAMH,YAAIK,IAA6BL,EAAY,CAAC;AAC9C,QAAAC,IAAiBJ,EAAO,MAAMQ,EAA2B,MAAM,GAG3DD,MACFF,IAAcF,EAAY,CAAC;AAAA,MAE/B;AAMA,UAAIM;AACJ,UAAIF,GAAmB;AACrB,YAAIG,IAA0CV,EAAO,QAAQG,EAAY,CAAC,CAAC,GACvEQ,IAAyBX,EAAO,MAAM,GAAGU,CAAuC;AAOpF,QAAIC,MAA2BV,EAAS,cAAc,eAAc,MAClEQ,IAAiBR,EAAS,cAAc,eAAc;AAAA,MAE1D;AACE,QAAAQ,IAAiBN,EAAY,CAAC;AAEhC,aAAO;AAAA,QACL,gBAAgBC;AAAA,QAChB,gBAAgBK;AAAA,QAChB,aAAaJ;AAAA,MACrB;AAAA,IACI;AAAA,EACF;AACA,SAAO;AAAA,IACL,gBAAgBL;AAAA,EACpB;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index339.js","sources":["../../../node_modules/@base-ui/react/floating-ui-react/utils/event.mjs"],"sourcesContent":["import { platform } from '@base-ui/utils/platform';\nexport function stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nexport function isReactEvent(event) {\n return 'nativeEvent' in event;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/utils/src/isVirtualEvent.ts\nexport function isVirtualClick(event) {\n if (event.pointerType === '' && event.isTrusted) {\n return true;\n }\n if (platform.os.android && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nexport function isVirtualPointerEvent(event) {\n if (platform.env.jsdom) {\n return false;\n }\n return !platform.os.android && event.width === 0 && event.height === 0 || platform.os.android && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nexport function isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\nexport function isClickLikeEvent(event) {\n const type = event.type;\n return type === 'click' || type === 'mousedown' || type === 'keydown' || type === 'keyup';\n}"],"names":["stopEvent","event","isReactEvent","isVirtualClick","platform.os.android","isVirtualPointerEvent","platform.env.jsdom","isMouseLikePointerType","pointerType","strict","isClickLikeEvent","type"],"mappings":";;AACO,SAASA,EAAUC,GAAO;AAC/B,EAAAA,EAAM,eAAc,GACpBA,EAAM,gBAAe;AACvB;AACO,SAASC,EAAaD,GAAO;AAClC,SAAO,iBAAiBA;AAC1B;AAGO,SAASE,EAAeF,GAAO;AACpC,SAAIA,EAAM,gBAAgB,MAAMA,EAAM,YAC7B,KAELG,KAAuBH,EAAM,cACxBA,EAAM,SAAS,WAAWA,EAAM,YAAY,IAE9CA,EAAM,WAAW,KAAK,CAACA,EAAM;AACtC;AACO,SAASI,EAAsBJ,GAAO;AAC3C,SAAIK,IACK,KAEF,CAACF,KAAuBH,EAAM,UAAU,KAAKA,EAAM,WAAW,KAAKG,KAAuBH,EAAM,UAAU,KAAKA,EAAM,WAAW,KAAKA,EAAM,aAAa,KAAKA,EAAM,WAAW,KAAKA,EAAM,gBAAgB;AAAA,EAEhNA,EAAM,QAAQ,KAAKA,EAAM,SAAS,KAAKA,EAAM,aAAa,KAAKA,EAAM,WAAW,KAAKA,EAAM,gBAAgB;AAC7G;AACO,SAASM,EAAuBC,GAAaC,GAAQ;AAO1D,SAJe,CAAC,SAAS,KAAK,EAIhB,SAASD,CAAW;AACpC;AACO,SAASE,EAAiBT,GAAO;AACtC,QAAMU,IAAOV,EAAM;AACnB,SAAOU,MAAS,WAAWA,MAAS,eAAeA,MAAS,aAAaA,MAAS;AACpF;","x_google_ignoreList":[0]}
package/dist/index34.js CHANGED
@@ -1,11 +1,41 @@
1
- import * as t from "react";
2
- import { IsDrawerContext as e } from "./index171.js";
3
- import { useRenderDialogRoot as a } from "./index189.js";
4
- function n(o) {
5
- const r = t.useContext(e) ? "drawer" : "dialog";
6
- return a(o, r);
7
- }
1
+ import * as p from "react";
2
+ import { useDialogRootContext as u } from "./index171.js";
3
+ import { useRenderElement as d } from "./index172.js";
4
+ import { createChangeEventDetails as C } from "./index175.js";
5
+ import { useButton as g } from "./index176.js";
6
+ import { closePress as v } from "./index177.js";
7
+ const D = /* @__PURE__ */ p.forwardRef(function(e, n) {
8
+ const {
9
+ render: R,
10
+ className: N,
11
+ style: b,
12
+ disabled: t = !1,
13
+ nativeButton: s = !0,
14
+ ...r
15
+ } = e, {
16
+ store: o
17
+ } = u(), a = o.useState("open"), {
18
+ getButtonProps: i,
19
+ buttonRef: l
20
+ } = g({
21
+ disabled: t,
22
+ native: s
23
+ }), f = {
24
+ disabled: t
25
+ };
26
+ function c(m) {
27
+ a && o.setOpen(!1, C(v, m.nativeEvent));
28
+ }
29
+ return d("button", e, {
30
+ state: f,
31
+ ref: [n, l],
32
+ props: [{
33
+ onClick: c
34
+ }, r, i]
35
+ });
36
+ });
37
+ process.env.NODE_ENV !== "production" && (D.displayName = "DialogClose");
8
38
  export {
9
- n as DialogRoot
39
+ D as DialogClose
10
40
  };
11
41
  //# sourceMappingURL=index34.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index34.js","sources":["../../../node_modules/@base-ui/react/dialog/root/DialogRoot.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { IsDrawerContext } from \"./DialogRootContext.mjs\";\nimport { useRenderDialogRoot } from \"./useRenderDialogRoot.mjs\";\n\n/**\n * Groups all parts of the dialog.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport function DialogRoot(props) {\n const mode = React.useContext(IsDrawerContext) ? 'drawer' : 'dialog';\n return useRenderDialogRoot(props, mode);\n}"],"names":["DialogRoot","props","mode","React","IsDrawerContext","useRenderDialogRoot"],"mappings":";;;AAYO,SAASA,EAAWC,GAAO;AAChC,QAAMC,IAAOC,EAAM,WAAWC,CAAe,IAAI,WAAW;AAC5D,SAAOC,EAAoBJ,GAAOC,CAAI;AACxC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index34.js","sources":["../../../node_modules/@base-ui/react/dialog/close/DialogClose.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\n\n/**\n * A button that closes the dialog.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogClose = /*#__PURE__*/React.forwardRef(function DialogClose(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled = false,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const open = store.useState('open');\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = {\n disabled\n };\n function handleClick(event) {\n if (open) {\n store.setOpen(false, createChangeEventDetails(REASONS.closePress, event.nativeEvent));\n }\n }\n return useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef],\n props: [{\n onClick: handleClick\n }, elementProps, getButtonProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogClose.displayName = \"DialogClose\";"],"names":["DialogClose","React","componentProps","forwardedRef","render","className","style","disabled","nativeButton","elementProps","store","useDialogRootContext","open","getButtonProps","buttonRef","useButton","state","handleClick","event","createChangeEventDetails","REASONS.closePress","useRenderElement"],"mappings":";;;;;;AAeY,MAACA,IAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,cAAAC,IAAe;AAAA,IACf,GAAGC;AAAA,EACP,IAAMP,GACE;AAAA,IACJ,OAAAQ;AAAA,EACJ,IAAMC,EAAoB,GAClBC,IAAOF,EAAM,SAAS,MAAM,GAC5B;AAAA,IACJ,gBAAAG;AAAA,IACA,WAAAC;AAAA,EACJ,IAAMC,EAAU;AAAA,IACZ,UAAAR;AAAA,IACA,QAAQC;AAAA,EACZ,CAAG,GACKQ,IAAQ;AAAA,IACZ,UAAAT;AAAA,EACJ;AACE,WAASU,EAAYC,GAAO;AAC1B,IAAIN,KACFF,EAAM,QAAQ,IAAOS,EAAyBC,GAAoBF,EAAM,WAAW,CAAC;AAAA,EAExF;AACA,SAAOG,EAAiB,UAAUnB,GAAgB;AAAA,IAChD,OAAAc;AAAA,IACA,KAAK,CAACb,GAAcW,CAAS;AAAA,IAC7B,OAAO,CAAC;AAAA,MACN,SAASG;AAAA,IACf,GAAOR,GAAcI,CAAc;AAAA,EACnC,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcb,EAAY,cAAc;","x_google_ignoreList":[0]}
package/dist/index340.js CHANGED
@@ -1,20 +1,15 @@
1
- import I from "./index163.js";
2
- import { VALID_DIGITS as l } from "./index159.js";
3
- var p = new RegExp("([" + l + "])");
4
- function c(t, r, f, n) {
5
- if (r) {
6
- var a = new I(n);
7
- a.selectNumberingPlan(r || f);
8
- var i = new RegExp(a.IDDPrefix());
9
- if (t.search(i) === 0) {
10
- t = t.slice(t.match(i)[0].length);
11
- var e = t.match(p);
12
- if (!(e && e[1] != null && e[1].length > 0 && e[1] === "0"))
13
- return t;
14
- }
15
- }
1
+ import r from "./index190.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;
16
10
  }
17
11
  export {
18
- c as default
12
+ o as SelectGroupContext,
13
+ s as useSelectGroupContext
19
14
  };
20
15
  //# sourceMappingURL=index340.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index340.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\nimport { VALID_DIGITS } from '../constants.js';\nvar CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');\nexport default function stripIddPrefix(number, country, callingCode, metadataJson) {\n if (!country) {\n return;\n }\n\n // Get the IDD prefix pattern.\n var metadata = new Metadata(metadataJson);\n metadata.selectNumberingPlan(country || callingCode);\n var IDDPrefixPattern = new RegExp(metadata.IDDPrefix());\n\n // Check if the number is IDD-prefixed.\n if (number.search(IDDPrefixPattern) !== 0) {\n return;\n }\n\n // Strip IDD prefix.\n number = number.slice(number.match(IDDPrefixPattern)[0].length);\n\n // If there're any digits after an IDD prefix,\n // then those digits are a country calling code.\n // Since no country code starts with a `0`,\n // the code below validates that the next digit (if present) is not `0`.\n var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);\n if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n if (matchedGroups[1] === '0') {\n return;\n }\n }\n return number;\n}\n//# sourceMappingURL=stripIddPrefix.js.map"],"names":["CAPTURING_DIGIT_PATTERN","VALID_DIGITS","stripIddPrefix","number","country","callingCode","metadataJson","metadata","Metadata","IDDPrefixPattern","matchedGroups"],"mappings":";;AAEA,IAAIA,IAA0B,IAAI,OAAO,OAAOC,IAAe,IAAI;AACpD,SAASC,EAAeC,GAAQC,GAASC,GAAaC,GAAc;AACjF,MAAKF,GAKL;AAAA,QAAIG,IAAW,IAAIC,EAASF,CAAY;AACxC,IAAAC,EAAS,oBAAoBH,KAAWC,CAAW;AACnD,QAAII,IAAmB,IAAI,OAAOF,EAAS,UAAS,CAAE;AAGtD,QAAIJ,EAAO,OAAOM,CAAgB,MAAM,GAKxC;AAAA,MAAAN,IAASA,EAAO,MAAMA,EAAO,MAAMM,CAAgB,EAAE,CAAC,EAAE,MAAM;AAM9D,UAAIC,IAAgBP,EAAO,MAAMH,CAAuB;AACxD,UAAI,EAAAU,KAAiBA,EAAc,CAAC,KAAK,QAAQA,EAAc,CAAC,EAAE,SAAS,KACrEA,EAAc,CAAC,MAAM;AAI3B,eAAOP;AAAA;AAAA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index340.js","sources":["../../../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs"],"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]}
package/dist/index341.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as n from "react";
2
- import { isReactVersionAtLeast as o } from "./index349.js";
2
+ import { isReactVersionAtLeast as o } from "./index348.js";
3
3
  function s(t) {
4
4
  if (!/* @__PURE__ */ n.isValidElement(t))
5
5
  return null;
package/dist/index348.js CHANGED
@@ -1,55 +1,9 @@
1
- import * as l from "react-dom";
2
- import { useAnimationFrame as b } from "./index324.js";
3
- import { useStableCallback as A } from "./index285.js";
4
- import { resolveRef as d } from "./index387.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 t from "react";
2
+ const e = parseInt(t.version, 10);
3
+ function o(r) {
4
+ return e >= r;
51
5
  }
52
6
  export {
53
- y as useAnimationsFinished
7
+ o as isReactVersionAtLeast
54
8
  };
55
9
  //# sourceMappingURL=index348.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index348.js","sources":["../../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs"],"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.mjs\";\nimport { TransitionStatusDataAttributes } from \"./stateAttributesMapping.mjs\";\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":"index348.js","sources":["../../../node_modules/@base-ui/utils/reactVersion.mjs"],"sourcesContent":["import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}"],"names":["majorVersion","React","isReactVersionAtLeast","reactVersionToCheck"],"mappings":";AACA,MAAMA,IAAe,SAASC,EAAM,SAAS,EAAE;AACxC,SAASC,EAAsBC,GAAqB;AACzD,SAAOH,KAAgBG;AACzB;","x_google_ignoreList":[0]}
package/dist/index349.js CHANGED
@@ -1,9 +1,55 @@
1
- import * as t from "react";
2
- const e = parseInt(t.version, 10);
3
- function o(r) {
4
- return e >= r;
1
+ import * as l from "react-dom";
2
+ import { useAnimationFrame as b } from "./index327.js";
3
+ import { useStableCallback as A } from "./index288.js";
4
+ import { resolveRef as d } from "./index387.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
+ });
5
51
  }
6
52
  export {
7
- o as isReactVersionAtLeast
53
+ y as useAnimationsFinished
8
54
  };
9
55
  //# sourceMappingURL=index349.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index349.js","sources":["../../../node_modules/@base-ui/utils/reactVersion.mjs"],"sourcesContent":["import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}"],"names":["majorVersion","React","isReactVersionAtLeast","reactVersionToCheck"],"mappings":";AACA,MAAMA,IAAe,SAASC,EAAM,SAAS,EAAE;AACxC,SAASC,EAAsBC,GAAqB;AACzD,SAAOH,KAAgBG;AACzB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index349.js","sources":["../../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs"],"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.mjs\";\nimport { TransitionStatusDataAttributes } from \"./stateAttributesMapping.mjs\";\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/index35.js CHANGED
@@ -1,41 +1,80 @@
1
- import * as p from "react";
2
- import { useDialogRootContext as u } from "./index171.js";
3
- import { useRenderElement as d } from "./index172.js";
4
- import { createChangeEventDetails as C } from "./index175.js";
5
- import { useButton as g } from "./index176.js";
6
- import { closePress as v } from "./index177.js";
7
- const D = /* @__PURE__ */ p.forwardRef(function(e, n) {
8
- const {
9
- render: R,
10
- className: N,
11
- style: b,
12
- disabled: t = !1,
13
- nativeButton: s = !0,
14
- ...r
15
- } = e, {
16
- store: o
17
- } = u(), a = o.useState("open"), {
18
- getButtonProps: i,
19
- buttonRef: l
20
- } = g({
21
- disabled: t,
22
- native: s
23
- }), f = {
24
- disabled: t
25
- };
26
- function c(m) {
27
- a && o.setOpen(!1, C(v, m.nativeEvent));
1
+ import * as y from "react";
2
+ import { useDialogRootContext as h } from "./index171.js";
3
+ import { useRenderElement as M } from "./index172.js";
4
+ import { popupStateMapping as N } from "./index173.js";
5
+ import { transitionStatusMapping as _ } from "./index174.js";
6
+ import { DialogPopupCssVars as j } from "./index179.js";
7
+ import { DialogPopupDataAttributes as A } from "./index180.js";
8
+ import { useDialogPortalContext as v } from "./index181.js";
9
+ import { useOpenChangeComplete as w } from "./index182.js";
10
+ import { COMPOSITE_KEYS as K } from "./index183.js";
11
+ import { j as T } from "./index28.js";
12
+ import { createDefaultInitialFocus as U, FOCUSABLE_POPUP_PROPS as V } from "./index184.js";
13
+ import { FloatingFocusManager as k } from "./index185.js";
14
+ const B = {
15
+ ...N,
16
+ ..._,
17
+ nestedDialogOpen(o) {
18
+ return o ? {
19
+ [A.nestedDialogOpen]: ""
20
+ } : null;
28
21
  }
29
- return d("button", e, {
30
- state: f,
31
- ref: [n, l],
32
- props: [{
33
- onClick: c
34
- }, r, i]
22
+ }, L = /* @__PURE__ */ y.forwardRef(function(n, l) {
23
+ const {
24
+ render: Y,
25
+ className: q,
26
+ style: z,
27
+ finalFocus: c,
28
+ initialFocus: s,
29
+ ...i
30
+ } = n, {
31
+ store: t
32
+ } = h(), d = t.useState("descriptionElementId"), m = t.useState("disablePointerDismissal"), a = t.useState("floatingRootContext"), f = t.useState("popupProps"), g = t.useState("modal"), p = t.useState("mounted"), S = t.useState("nested"), r = t.useState("nestedOpenDialogCount"), e = t.useState("open"), D = t.useState("openMethod"), P = t.useState("titleElementId"), O = t.useState("transitionStatus"), C = t.useState("role"), x = a.useState("floatingId"), E = i.id ?? x;
33
+ v(), w({
34
+ open: e,
35
+ ref: t.context.popupRef,
36
+ onComplete() {
37
+ e && t.context.onOpenChangeComplete?.(!0);
38
+ }
39
+ });
40
+ const F = s === void 0 ? U(t.context.popupRef) : s, I = r > 0, R = t.useStateSetter("popupElement"), b = M("div", n, {
41
+ state: {
42
+ open: e,
43
+ nested: S,
44
+ transitionStatus: O,
45
+ nestedDialogOpen: I
46
+ },
47
+ props: [f, {
48
+ id: E,
49
+ "aria-labelledby": P ?? void 0,
50
+ "aria-describedby": d ?? void 0,
51
+ role: C,
52
+ ...V,
53
+ hidden: !p,
54
+ onKeyDown(u) {
55
+ K.has(u.key) && u.stopPropagation();
56
+ },
57
+ style: {
58
+ [j.nestedDialogs]: r
59
+ }
60
+ }, i],
61
+ ref: [l, t.context.popupRef, R],
62
+ stateAttributesMapping: B
63
+ });
64
+ return /* @__PURE__ */ T.jsx(k, {
65
+ context: a,
66
+ openInteractionType: D,
67
+ disabled: !p,
68
+ closeOnFocusOut: !m,
69
+ initialFocus: F,
70
+ returnFocus: c,
71
+ modal: g !== !1,
72
+ restoreFocus: "popup",
73
+ children: b
35
74
  });
36
75
  });
37
- process.env.NODE_ENV !== "production" && (D.displayName = "DialogClose");
76
+ process.env.NODE_ENV !== "production" && (L.displayName = "DialogPopup");
38
77
  export {
39
- D as DialogClose
78
+ L as DialogPopup
40
79
  };
41
80
  //# sourceMappingURL=index35.js.map