react-aria-components 1.17.0 → 1.19.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 (478) hide show
  1. package/dist/exports/Autocomplete.cjs.map +1 -1
  2. package/dist/exports/Autocomplete.js.map +1 -1
  3. package/dist/exports/Autocomplete.mjs.map +1 -1
  4. package/dist/exports/Calendar.cjs +3 -0
  5. package/dist/exports/Calendar.cjs.map +1 -1
  6. package/dist/exports/Calendar.js +2 -2
  7. package/dist/exports/Calendar.js.map +1 -1
  8. package/dist/exports/Calendar.mjs +2 -2
  9. package/dist/exports/Calendar.mjs.map +1 -1
  10. package/dist/exports/Checkbox.cjs +8 -0
  11. package/dist/exports/Checkbox.cjs.map +1 -1
  12. package/dist/exports/Checkbox.js +6 -2
  13. package/dist/exports/Checkbox.js.map +1 -1
  14. package/dist/exports/Checkbox.mjs +6 -2
  15. package/dist/exports/Checkbox.mjs.map +1 -1
  16. package/dist/exports/CheckboxGroup.cjs.map +1 -1
  17. package/dist/exports/CheckboxGroup.js.map +1 -1
  18. package/dist/exports/CheckboxGroup.mjs.map +1 -1
  19. package/dist/exports/CollectionBuilder.cjs.map +1 -1
  20. package/dist/exports/CollectionBuilder.js.map +1 -1
  21. package/dist/exports/CollectionBuilder.mjs.map +1 -1
  22. package/dist/exports/ColorArea.cjs.map +1 -1
  23. package/dist/exports/ColorArea.js.map +1 -1
  24. package/dist/exports/ColorArea.mjs.map +1 -1
  25. package/dist/exports/ColorField.cjs.map +1 -1
  26. package/dist/exports/ColorField.js.map +1 -1
  27. package/dist/exports/ColorField.mjs.map +1 -1
  28. package/dist/exports/ColorPicker.cjs.map +1 -1
  29. package/dist/exports/ColorPicker.js.map +1 -1
  30. package/dist/exports/ColorPicker.mjs.map +1 -1
  31. package/dist/exports/ColorSlider.cjs.map +1 -1
  32. package/dist/exports/ColorSlider.js.map +1 -1
  33. package/dist/exports/ColorSlider.mjs.map +1 -1
  34. package/dist/exports/ColorSwatch.cjs.map +1 -1
  35. package/dist/exports/ColorSwatch.js.map +1 -1
  36. package/dist/exports/ColorSwatch.mjs.map +1 -1
  37. package/dist/exports/ColorSwatchPicker.cjs.map +1 -1
  38. package/dist/exports/ColorSwatchPicker.js.map +1 -1
  39. package/dist/exports/ColorSwatchPicker.mjs.map +1 -1
  40. package/dist/exports/ColorThumb.cjs.map +1 -1
  41. package/dist/exports/ColorThumb.js.map +1 -1
  42. package/dist/exports/ColorThumb.mjs.map +1 -1
  43. package/dist/exports/ColorWheel.cjs.map +1 -1
  44. package/dist/exports/ColorWheel.js.map +1 -1
  45. package/dist/exports/ColorWheel.mjs.map +1 -1
  46. package/dist/exports/ComboBox.cjs.map +1 -1
  47. package/dist/exports/ComboBox.js.map +1 -1
  48. package/dist/exports/ComboBox.mjs.map +1 -1
  49. package/dist/exports/DateField.cjs.map +1 -1
  50. package/dist/exports/DateField.js.map +1 -1
  51. package/dist/exports/DateField.mjs.map +1 -1
  52. package/dist/exports/DatePicker.cjs.map +1 -1
  53. package/dist/exports/DatePicker.js.map +1 -1
  54. package/dist/exports/DatePicker.mjs.map +1 -1
  55. package/dist/exports/DateRangePicker.cjs.map +1 -1
  56. package/dist/exports/DateRangePicker.js.map +1 -1
  57. package/dist/exports/DateRangePicker.mjs.map +1 -1
  58. package/dist/exports/Disclosure.cjs.map +1 -1
  59. package/dist/exports/Disclosure.js.map +1 -1
  60. package/dist/exports/Disclosure.mjs.map +1 -1
  61. package/dist/exports/DisclosureGroup.cjs.map +1 -1
  62. package/dist/exports/DisclosureGroup.js.map +1 -1
  63. package/dist/exports/DisclosureGroup.mjs.map +1 -1
  64. package/dist/exports/GridList.cjs.map +1 -1
  65. package/dist/exports/GridList.js.map +1 -1
  66. package/dist/exports/GridList.mjs.map +1 -1
  67. package/dist/exports/ListBox.cjs.map +1 -1
  68. package/dist/exports/ListBox.js.map +1 -1
  69. package/dist/exports/ListBox.mjs.map +1 -1
  70. package/dist/exports/Menu.cjs.map +1 -1
  71. package/dist/exports/Menu.js.map +1 -1
  72. package/dist/exports/Menu.mjs.map +1 -1
  73. package/dist/exports/RadioGroup.cjs +3 -0
  74. package/dist/exports/RadioGroup.cjs.map +1 -1
  75. package/dist/exports/RadioGroup.js +2 -2
  76. package/dist/exports/RadioGroup.js.map +1 -1
  77. package/dist/exports/RadioGroup.mjs +2 -2
  78. package/dist/exports/RadioGroup.mjs.map +1 -1
  79. package/dist/exports/RangeCalendar.cjs +3 -0
  80. package/dist/exports/RangeCalendar.cjs.map +1 -1
  81. package/dist/exports/RangeCalendar.js +2 -2
  82. package/dist/exports/RangeCalendar.js.map +1 -1
  83. package/dist/exports/RangeCalendar.mjs +2 -2
  84. package/dist/exports/RangeCalendar.mjs.map +1 -1
  85. package/dist/exports/Select.cjs.map +1 -1
  86. package/dist/exports/Select.js.map +1 -1
  87. package/dist/exports/Select.mjs.map +1 -1
  88. package/dist/exports/SharedElementTransition.cjs.map +1 -1
  89. package/dist/exports/SharedElementTransition.js.map +1 -1
  90. package/dist/exports/SharedElementTransition.mjs.map +1 -1
  91. package/dist/exports/Slider.cjs +2 -0
  92. package/dist/exports/Slider.cjs.map +1 -1
  93. package/dist/exports/Slider.js +2 -2
  94. package/dist/exports/Slider.js.map +1 -1
  95. package/dist/exports/Slider.mjs +2 -2
  96. package/dist/exports/Slider.mjs.map +1 -1
  97. package/dist/exports/Switch.cjs +8 -0
  98. package/dist/exports/Switch.cjs.map +1 -1
  99. package/dist/exports/Switch.js +6 -2
  100. package/dist/exports/Switch.js.map +1 -1
  101. package/dist/exports/Switch.mjs +6 -2
  102. package/dist/exports/Switch.mjs.map +1 -1
  103. package/dist/exports/Table.cjs +1 -0
  104. package/dist/exports/Table.cjs.map +1 -1
  105. package/dist/exports/Table.js +2 -2
  106. package/dist/exports/Table.js.map +1 -1
  107. package/dist/exports/Table.mjs +2 -2
  108. package/dist/exports/Table.mjs.map +1 -1
  109. package/dist/exports/Tabs.cjs.map +1 -1
  110. package/dist/exports/Tabs.js.map +1 -1
  111. package/dist/exports/Tabs.mjs.map +1 -1
  112. package/dist/exports/TagGroup.cjs.map +1 -1
  113. package/dist/exports/TagGroup.js.map +1 -1
  114. package/dist/exports/TagGroup.mjs.map +1 -1
  115. package/dist/exports/TimeField.cjs.map +1 -1
  116. package/dist/exports/TimeField.js.map +1 -1
  117. package/dist/exports/TimeField.mjs.map +1 -1
  118. package/dist/exports/Toast.cjs.map +1 -1
  119. package/dist/exports/Toast.js.map +1 -1
  120. package/dist/exports/Toast.mjs.map +1 -1
  121. package/dist/exports/ToggleButtonGroup.cjs.map +1 -1
  122. package/dist/exports/ToggleButtonGroup.js.map +1 -1
  123. package/dist/exports/ToggleButtonGroup.mjs.map +1 -1
  124. package/dist/exports/Tree.cjs.map +1 -1
  125. package/dist/exports/Tree.js.map +1 -1
  126. package/dist/exports/Tree.mjs.map +1 -1
  127. package/dist/exports/Virtualizer.cjs.map +1 -1
  128. package/dist/exports/Virtualizer.js.map +1 -1
  129. package/dist/exports/Virtualizer.mjs.map +1 -1
  130. package/dist/exports/index.cjs +19 -1
  131. package/dist/exports/index.cjs.map +1 -1
  132. package/dist/exports/index.js +11 -8
  133. package/dist/exports/index.js.map +1 -1
  134. package/dist/exports/index.mjs +11 -8
  135. package/dist/exports/index.mjs.map +1 -1
  136. package/dist/exports/useAsyncList.cjs.map +1 -1
  137. package/dist/exports/useAsyncList.js.map +1 -1
  138. package/dist/exports/useAsyncList.mjs.map +1 -1
  139. package/dist/exports/useDragAndDrop.cjs.map +1 -1
  140. package/dist/exports/useDragAndDrop.js.map +1 -1
  141. package/dist/exports/useDragAndDrop.mjs.map +1 -1
  142. package/dist/exports/useDrop.cjs.map +1 -1
  143. package/dist/exports/useDrop.js.map +1 -1
  144. package/dist/exports/useDrop.mjs.map +1 -1
  145. package/dist/private/Autocomplete.cjs.map +1 -1
  146. package/dist/private/Autocomplete.js.map +1 -1
  147. package/dist/private/Autocomplete.mjs.map +1 -1
  148. package/dist/private/Breadcrumbs.cjs.map +1 -1
  149. package/dist/private/Breadcrumbs.js.map +1 -1
  150. package/dist/private/Breadcrumbs.mjs.map +1 -1
  151. package/dist/private/Button.cjs.map +1 -1
  152. package/dist/private/Button.js.map +1 -1
  153. package/dist/private/Button.mjs.map +1 -1
  154. package/dist/private/Calendar.cjs +34 -2
  155. package/dist/private/Calendar.cjs.map +1 -1
  156. package/dist/private/Calendar.js +34 -5
  157. package/dist/private/Calendar.js.map +1 -1
  158. package/dist/private/Calendar.mjs +34 -5
  159. package/dist/private/Calendar.mjs.map +1 -1
  160. package/dist/private/Checkbox.cjs +104 -17
  161. package/dist/private/Checkbox.cjs.map +1 -1
  162. package/dist/private/Checkbox.js +102 -18
  163. package/dist/private/Checkbox.js.map +1 -1
  164. package/dist/private/Checkbox.mjs +102 -18
  165. package/dist/private/Checkbox.mjs.map +1 -1
  166. package/dist/private/Collection.cjs.map +1 -1
  167. package/dist/private/Collection.js.map +1 -1
  168. package/dist/private/Collection.mjs.map +1 -1
  169. package/dist/private/ColorArea.cjs.map +1 -1
  170. package/dist/private/ColorArea.js.map +1 -1
  171. package/dist/private/ColorArea.mjs.map +1 -1
  172. package/dist/private/ColorField.cjs.map +1 -1
  173. package/dist/private/ColorField.js.map +1 -1
  174. package/dist/private/ColorField.mjs.map +1 -1
  175. package/dist/private/ColorPicker.cjs.map +1 -1
  176. package/dist/private/ColorPicker.js.map +1 -1
  177. package/dist/private/ColorPicker.mjs.map +1 -1
  178. package/dist/private/ColorSlider.cjs.map +1 -1
  179. package/dist/private/ColorSlider.js.map +1 -1
  180. package/dist/private/ColorSlider.mjs.map +1 -1
  181. package/dist/private/ColorSwatch.cjs.map +1 -1
  182. package/dist/private/ColorSwatch.js.map +1 -1
  183. package/dist/private/ColorSwatch.mjs.map +1 -1
  184. package/dist/private/ColorSwatchPicker.cjs.map +1 -1
  185. package/dist/private/ColorSwatchPicker.js.map +1 -1
  186. package/dist/private/ColorSwatchPicker.mjs.map +1 -1
  187. package/dist/private/ColorThumb.cjs.map +1 -1
  188. package/dist/private/ColorThumb.js.map +1 -1
  189. package/dist/private/ColorThumb.mjs.map +1 -1
  190. package/dist/private/ColorWheel.cjs.map +1 -1
  191. package/dist/private/ColorWheel.js.map +1 -1
  192. package/dist/private/ColorWheel.mjs.map +1 -1
  193. package/dist/private/ComboBox.cjs +15 -3
  194. package/dist/private/ComboBox.cjs.map +1 -1
  195. package/dist/private/ComboBox.js +16 -4
  196. package/dist/private/ComboBox.js.map +1 -1
  197. package/dist/private/ComboBox.mjs +16 -4
  198. package/dist/private/ComboBox.mjs.map +1 -1
  199. package/dist/private/DateField.cjs.map +1 -1
  200. package/dist/private/DateField.js.map +1 -1
  201. package/dist/private/DateField.mjs.map +1 -1
  202. package/dist/private/DatePicker.cjs +0 -26
  203. package/dist/private/DatePicker.cjs.map +1 -1
  204. package/dist/private/DatePicker.js +1 -27
  205. package/dist/private/DatePicker.js.map +1 -1
  206. package/dist/private/DatePicker.mjs +1 -27
  207. package/dist/private/DatePicker.mjs.map +1 -1
  208. package/dist/private/Dialog.cjs +1 -17
  209. package/dist/private/Dialog.cjs.map +1 -1
  210. package/dist/private/Dialog.js +2 -18
  211. package/dist/private/Dialog.js.map +1 -1
  212. package/dist/private/Dialog.mjs +2 -18
  213. package/dist/private/Dialog.mjs.map +1 -1
  214. package/dist/private/Disclosure.cjs.map +1 -1
  215. package/dist/private/Disclosure.js.map +1 -1
  216. package/dist/private/Disclosure.mjs.map +1 -1
  217. package/dist/private/DragAndDrop.cjs +3 -3
  218. package/dist/private/DragAndDrop.cjs.map +1 -1
  219. package/dist/private/DragAndDrop.js +3 -3
  220. package/dist/private/DragAndDrop.js.map +1 -1
  221. package/dist/private/DragAndDrop.mjs +3 -3
  222. package/dist/private/DragAndDrop.mjs.map +1 -1
  223. package/dist/private/DropZone.cjs.map +1 -1
  224. package/dist/private/DropZone.js.map +1 -1
  225. package/dist/private/DropZone.mjs.map +1 -1
  226. package/dist/private/FieldError.cjs.map +1 -1
  227. package/dist/private/FieldError.js.map +1 -1
  228. package/dist/private/FieldError.mjs.map +1 -1
  229. package/dist/private/FileTrigger.cjs.map +1 -1
  230. package/dist/private/FileTrigger.js.map +1 -1
  231. package/dist/private/FileTrigger.mjs.map +1 -1
  232. package/dist/private/Form.cjs.map +1 -1
  233. package/dist/private/Form.js.map +1 -1
  234. package/dist/private/Form.mjs.map +1 -1
  235. package/dist/private/GridLayout.cjs +37 -0
  236. package/dist/private/GridLayout.cjs.map +1 -0
  237. package/dist/private/GridLayout.js +32 -0
  238. package/dist/private/GridLayout.js.map +1 -0
  239. package/dist/private/GridLayout.mjs +32 -0
  240. package/dist/private/GridLayout.mjs.map +1 -0
  241. package/dist/private/GridList.cjs +23 -5
  242. package/dist/private/GridList.cjs.map +1 -1
  243. package/dist/private/GridList.js +24 -6
  244. package/dist/private/GridList.js.map +1 -1
  245. package/dist/private/GridList.mjs +24 -6
  246. package/dist/private/GridList.mjs.map +1 -1
  247. package/dist/private/Group.cjs.map +1 -1
  248. package/dist/private/Group.js.map +1 -1
  249. package/dist/private/Group.mjs.map +1 -1
  250. package/dist/private/Header.cjs.map +1 -1
  251. package/dist/private/Header.js.map +1 -1
  252. package/dist/private/Header.mjs.map +1 -1
  253. package/dist/private/Heading.cjs.map +1 -1
  254. package/dist/private/Heading.js.map +1 -1
  255. package/dist/private/Heading.mjs.map +1 -1
  256. package/dist/private/HiddenDateInput.cjs +3 -3
  257. package/dist/private/HiddenDateInput.cjs.map +1 -1
  258. package/dist/private/HiddenDateInput.js +3 -3
  259. package/dist/private/HiddenDateInput.js.map +1 -1
  260. package/dist/private/HiddenDateInput.mjs +3 -3
  261. package/dist/private/HiddenDateInput.mjs.map +1 -1
  262. package/dist/private/Input.cjs.map +1 -1
  263. package/dist/private/Input.js.map +1 -1
  264. package/dist/private/Input.mjs.map +1 -1
  265. package/dist/private/Keyboard.cjs.map +1 -1
  266. package/dist/private/Keyboard.js.map +1 -1
  267. package/dist/private/Keyboard.mjs.map +1 -1
  268. package/dist/private/Label.cjs.map +1 -1
  269. package/dist/private/Label.js.map +1 -1
  270. package/dist/private/Label.mjs.map +1 -1
  271. package/dist/private/Link.cjs.map +1 -1
  272. package/dist/private/Link.js.map +1 -1
  273. package/dist/private/Link.mjs.map +1 -1
  274. package/dist/private/ListBox.cjs +6 -5
  275. package/dist/private/ListBox.cjs.map +1 -1
  276. package/dist/private/ListBox.js +6 -5
  277. package/dist/private/ListBox.js.map +1 -1
  278. package/dist/private/ListBox.mjs +6 -5
  279. package/dist/private/ListBox.mjs.map +1 -1
  280. package/dist/private/Menu.cjs +5 -15
  281. package/dist/private/Menu.cjs.map +1 -1
  282. package/dist/private/Menu.js +6 -16
  283. package/dist/private/Menu.js.map +1 -1
  284. package/dist/private/Menu.mjs +6 -16
  285. package/dist/private/Menu.mjs.map +1 -1
  286. package/dist/private/Meter.cjs.map +1 -1
  287. package/dist/private/Meter.js.map +1 -1
  288. package/dist/private/Meter.mjs.map +1 -1
  289. package/dist/private/Modal.cjs.map +1 -1
  290. package/dist/private/Modal.js.map +1 -1
  291. package/dist/private/Modal.mjs.map +1 -1
  292. package/dist/private/NumberField.cjs.map +1 -1
  293. package/dist/private/NumberField.js.map +1 -1
  294. package/dist/private/NumberField.mjs.map +1 -1
  295. package/dist/private/OverlayArrow.cjs.map +1 -1
  296. package/dist/private/OverlayArrow.js.map +1 -1
  297. package/dist/private/OverlayArrow.mjs.map +1 -1
  298. package/dist/private/Popover.cjs +17 -1
  299. package/dist/private/Popover.cjs.map +1 -1
  300. package/dist/private/Popover.js +19 -2
  301. package/dist/private/Popover.js.map +1 -1
  302. package/dist/private/Popover.mjs +18 -2
  303. package/dist/private/Popover.mjs.map +1 -1
  304. package/dist/private/ProgressBar.cjs.map +1 -1
  305. package/dist/private/ProgressBar.js.map +1 -1
  306. package/dist/private/ProgressBar.mjs.map +1 -1
  307. package/dist/private/RadioGroup.cjs +87 -7
  308. package/dist/private/RadioGroup.cjs.map +1 -1
  309. package/dist/private/RadioGroup.js +86 -9
  310. package/dist/private/RadioGroup.js.map +1 -1
  311. package/dist/private/RadioGroup.mjs +86 -9
  312. package/dist/private/RadioGroup.mjs.map +1 -1
  313. package/dist/private/SearchField.cjs.map +1 -1
  314. package/dist/private/SearchField.js.map +1 -1
  315. package/dist/private/SearchField.mjs.map +1 -1
  316. package/dist/private/Select.cjs +1 -17
  317. package/dist/private/Select.cjs.map +1 -1
  318. package/dist/private/Select.js +2 -18
  319. package/dist/private/Select.js.map +1 -1
  320. package/dist/private/Select.mjs +2 -18
  321. package/dist/private/Select.mjs.map +1 -1
  322. package/dist/private/SelectionIndicator.cjs.map +1 -1
  323. package/dist/private/SelectionIndicator.js.map +1 -1
  324. package/dist/private/SelectionIndicator.mjs.map +1 -1
  325. package/dist/private/Separator.cjs.map +1 -1
  326. package/dist/private/Separator.js.map +1 -1
  327. package/dist/private/Separator.mjs.map +1 -1
  328. package/dist/private/SharedElementTransition.cjs.map +1 -1
  329. package/dist/private/SharedElementTransition.js.map +1 -1
  330. package/dist/private/SharedElementTransition.mjs.map +1 -1
  331. package/dist/private/Slider.cjs +51 -1
  332. package/dist/private/Slider.cjs.map +1 -1
  333. package/dist/private/Slider.js +50 -2
  334. package/dist/private/Slider.js.map +1 -1
  335. package/dist/private/Slider.mjs +50 -2
  336. package/dist/private/Slider.mjs.map +1 -1
  337. package/dist/private/Switch.cjs +118 -4
  338. package/dist/private/Switch.cjs.map +1 -1
  339. package/dist/private/Switch.js +119 -7
  340. package/dist/private/Switch.js.map +1 -1
  341. package/dist/private/Switch.mjs +118 -7
  342. package/dist/private/Switch.mjs.map +1 -1
  343. package/dist/private/Table.cjs +115 -24
  344. package/dist/private/Table.cjs.map +1 -1
  345. package/dist/private/Table.js +116 -26
  346. package/dist/private/Table.js.map +1 -1
  347. package/dist/private/Table.mjs +116 -26
  348. package/dist/private/Table.mjs.map +1 -1
  349. package/dist/private/TableLayout.cjs.map +1 -1
  350. package/dist/private/TableLayout.js.map +1 -1
  351. package/dist/private/TableLayout.mjs.map +1 -1
  352. package/dist/private/Tabs.cjs +4 -3
  353. package/dist/private/Tabs.cjs.map +1 -1
  354. package/dist/private/Tabs.js +4 -3
  355. package/dist/private/Tabs.js.map +1 -1
  356. package/dist/private/Tabs.mjs +4 -3
  357. package/dist/private/Tabs.mjs.map +1 -1
  358. package/dist/private/TagGroup.cjs.map +1 -1
  359. package/dist/private/TagGroup.js.map +1 -1
  360. package/dist/private/TagGroup.mjs.map +1 -1
  361. package/dist/private/Text.cjs.map +1 -1
  362. package/dist/private/Text.js.map +1 -1
  363. package/dist/private/Text.mjs.map +1 -1
  364. package/dist/private/TextArea.cjs.map +1 -1
  365. package/dist/private/TextArea.js.map +1 -1
  366. package/dist/private/TextArea.mjs.map +1 -1
  367. package/dist/private/TextField.cjs.map +1 -1
  368. package/dist/private/TextField.js.map +1 -1
  369. package/dist/private/TextField.mjs.map +1 -1
  370. package/dist/private/Toast.cjs +2 -1
  371. package/dist/private/Toast.cjs.map +1 -1
  372. package/dist/private/Toast.js +2 -1
  373. package/dist/private/Toast.js.map +1 -1
  374. package/dist/private/Toast.mjs +2 -1
  375. package/dist/private/Toast.mjs.map +1 -1
  376. package/dist/private/ToggleButton.cjs.map +1 -1
  377. package/dist/private/ToggleButton.js.map +1 -1
  378. package/dist/private/ToggleButton.mjs.map +1 -1
  379. package/dist/private/ToggleButtonGroup.cjs.map +1 -1
  380. package/dist/private/ToggleButtonGroup.js.map +1 -1
  381. package/dist/private/ToggleButtonGroup.mjs.map +1 -1
  382. package/dist/private/Toolbar.cjs.map +1 -1
  383. package/dist/private/Toolbar.js.map +1 -1
  384. package/dist/private/Toolbar.mjs.map +1 -1
  385. package/dist/private/Tooltip.cjs.map +1 -1
  386. package/dist/private/Tooltip.js.map +1 -1
  387. package/dist/private/Tooltip.mjs.map +1 -1
  388. package/dist/private/Tree.cjs +18 -6
  389. package/dist/private/Tree.cjs.map +1 -1
  390. package/dist/private/Tree.js +19 -7
  391. package/dist/private/Tree.js.map +1 -1
  392. package/dist/private/Tree.mjs +19 -7
  393. package/dist/private/Tree.mjs.map +1 -1
  394. package/dist/private/TreeDropTargetDelegate.cjs +9 -4
  395. package/dist/private/TreeDropTargetDelegate.cjs.map +1 -1
  396. package/dist/private/TreeDropTargetDelegate.js +10 -4
  397. package/dist/private/TreeDropTargetDelegate.js.map +1 -1
  398. package/dist/private/TreeDropTargetDelegate.mjs +9 -4
  399. package/dist/private/TreeDropTargetDelegate.mjs.map +1 -1
  400. package/dist/private/Virtualizer.cjs.map +1 -1
  401. package/dist/private/Virtualizer.js.map +1 -1
  402. package/dist/private/Virtualizer.mjs.map +1 -1
  403. package/dist/private/useDragAndDrop.cjs.map +1 -1
  404. package/dist/private/useDragAndDrop.js.map +1 -1
  405. package/dist/private/useDragAndDrop.mjs.map +1 -1
  406. package/dist/private/utils.cjs.map +1 -1
  407. package/dist/private/utils.js.map +1 -1
  408. package/dist/private/utils.mjs.map +1 -1
  409. package/dist/types/exports/Calendar.d.ts +4 -3
  410. package/dist/types/exports/Checkbox.d.ts +7 -2
  411. package/dist/types/exports/RadioGroup.d.ts +2 -2
  412. package/dist/types/exports/RangeCalendar.d.ts +3 -2
  413. package/dist/types/exports/Slider.d.ts +2 -2
  414. package/dist/types/exports/Switch.d.ts +7 -2
  415. package/dist/types/exports/Table.d.ts +2 -2
  416. package/dist/types/exports/index.d.ts +15 -13
  417. package/dist/types/exports/useDragAndDrop.d.ts +1 -1
  418. package/dist/types/src/Autocomplete.d.ts +1 -1
  419. package/dist/types/src/Breadcrumbs.d.ts +13 -4
  420. package/dist/types/src/Button.d.ts +9 -1
  421. package/dist/types/src/Calendar.d.ts +93 -33
  422. package/dist/types/src/Checkbox.d.ts +93 -2
  423. package/dist/types/src/Collection.d.ts +17 -4
  424. package/dist/types/src/ColorArea.d.ts +6 -2
  425. package/dist/types/src/ColorField.d.ts +8 -1
  426. package/dist/types/src/ColorPicker.d.ts +4 -1
  427. package/dist/types/src/ColorSlider.d.ts +5 -1
  428. package/dist/types/src/ColorSwatch.d.ts +3 -1
  429. package/dist/types/src/ColorSwatchPicker.d.ts +7 -2
  430. package/dist/types/src/ColorThumb.d.ts +10 -2
  431. package/dist/types/src/ColorWheel.d.ts +7 -2
  432. package/dist/types/src/ComboBox.d.ts +24 -11
  433. package/dist/types/src/DateField.d.ts +29 -4
  434. package/dist/types/src/DatePicker.d.ts +15 -3
  435. package/dist/types/src/Dialog.d.ts +3 -1
  436. package/dist/types/src/Disclosure.d.ts +21 -5
  437. package/dist/types/src/DragAndDrop.d.ts +6 -2
  438. package/dist/types/src/DropZone.d.ts +8 -1
  439. package/dist/types/src/FieldError.d.ts +4 -1
  440. package/dist/types/src/FileTrigger.d.ts +2 -1
  441. package/dist/types/src/Form.d.ts +4 -1
  442. package/dist/types/src/GridLayout.d.ts +5 -0
  443. package/dist/types/src/GridList.d.ts +51 -13
  444. package/dist/types/src/Group.d.ts +9 -1
  445. package/dist/types/src/Heading.d.ts +12 -0
  446. package/dist/types/src/HiddenDateInput.d.ts +2 -1
  447. package/dist/types/src/Input.d.ts +8 -1
  448. package/dist/types/src/Link.d.ts +9 -1
  449. package/dist/types/src/ListBox.d.ts +35 -12
  450. package/dist/types/src/Menu.d.ts +22 -10
  451. package/dist/types/src/Meter.d.ts +4 -1
  452. package/dist/types/src/Modal.d.ts +9 -3
  453. package/dist/types/src/NumberField.d.ts +9 -2
  454. package/dist/types/src/OverlayArrow.d.ts +4 -1
  455. package/dist/types/src/Popover.d.ts +12 -3
  456. package/dist/types/src/ProgressBar.d.ts +5 -1
  457. package/dist/types/src/RadioGroup.d.ts +88 -2
  458. package/dist/types/src/SearchField.d.ts +8 -1
  459. package/dist/types/src/Select.d.ts +19 -6
  460. package/dist/types/src/SelectionIndicator.d.ts +7 -2
  461. package/dist/types/src/Separator.d.ts +5 -2
  462. package/dist/types/src/SharedElementTransition.d.ts +2 -0
  463. package/dist/types/src/Slider.d.ts +48 -4
  464. package/dist/types/src/Switch.d.ts +100 -3
  465. package/dist/types/src/Table.d.ts +138 -31
  466. package/dist/types/src/Tabs.d.ts +37 -12
  467. package/dist/types/src/TagGroup.d.ts +18 -7
  468. package/dist/types/src/TextArea.d.ts +3 -1
  469. package/dist/types/src/TextField.d.ts +7 -1
  470. package/dist/types/src/Toast.d.ts +13 -3
  471. package/dist/types/src/ToggleButton.d.ts +10 -3
  472. package/dist/types/src/ToggleButtonGroup.d.ts +7 -2
  473. package/dist/types/src/Toolbar.d.ts +6 -3
  474. package/dist/types/src/Tooltip.d.ts +13 -4
  475. package/dist/types/src/Tree.d.ts +52 -16
  476. package/dist/types/src/useDragAndDrop.d.ts +10 -4
  477. package/dist/types/src/utils.d.ts +109 -17
  478. package/package.json +9 -7
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA8CM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAMzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,sBACX,kBAAkB,OACnB,GAAG;IACJ,QAAQ,CAAA,GAAA,YAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,oBACF,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,qBAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAEnC,0DAA0D;IAC1D,IAAI,aAAa,kBAAkB,YAAY,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAK;IAE5F,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,WAAW,gBAAgB,CAAC,iBAAiB;6BAC7C;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,iBAAiB;QAAE,KAAK;QAAK,MAAM,MAAM,IAAI,IAAI;qBAC9F,gCAAC,CAAA,GAAA,yCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;YAAE,KAAK;YAAU,aAAa;QAAM;OAC7E,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaProgressBarProps, useProgressBar} from 'react-aria/useProgressBar';\n\nimport {clamp} from 'react-stately/private/utils/number';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'label'>, RenderProps<ProgressBarRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ProgressBar'\n */\n className?: ClassNameOrFunction<ProgressBarRenderProps>\n}\n\nexport interface ProgressBarRenderProps {\n /**\n * The value as a percentage between the minimum and maximum.\n */\n percentage: number | undefined,\n /**\n * A formatted version of the value.\n * @selector [aria-valuetext]\n */\n valueText: string | undefined,\n /**\n * Whether the progress bar is indeterminate.\n * @selector :not([aria-valuenow])\n */\n isIndeterminate: boolean\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, HTMLDivElement>>(null);\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n */\nexport const ProgressBar = forwardRef(function ProgressBar(props: ProgressBarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ProgressBarContext);\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n isIndeterminate = false\n } = props;\n value = clamp(value, minValue, maxValue);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n progressBarProps,\n labelProps\n } = useProgressBar({...props, label});\n\n // Calculate the width of the progress bar as a percentage\n let percentage = isIndeterminate ? undefined : (value - minValue) / (maxValue - minValue) * 100;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ProgressBar',\n values: {\n percentage,\n valueText: progressBarProps['aria-valuetext'],\n isIndeterminate\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, progressBarProps)} ref={ref} slot={props.slot || undefined}>\n <LabelContext.Provider value={{...labelProps, ref: labelRef, elementType: 'span'}}>\n {renderProps.children}\n </LabelContext.Provider>\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ProgressBar.mjs.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuDM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAkD;AAMzD,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,SAAC,QAAQ,aAAG,WAAW,aAAG,WAAW,sBAAK,kBAAkB,OAAM,GAAG;IACzE,QAAQ,CAAA,GAAA,YAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAAE,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IACjF,IAAI,oBAAC,gBAAgB,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAEpE,0DAA0D;IAC1D,IAAI,aAAa,kBAAkB,YAAY,AAAE,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAM;IAE9F,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,WAAW,gBAAgB,CAAC,iBAAiB;6BAC7C;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,iBAAiB;QACvD,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;qBACpB,gCAAC,CAAA,GAAA,yCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;YAAE,KAAK;YAAU,aAAa;QAAM;OAC7E,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaProgressBarProps, useProgressBar} from 'react-aria/useProgressBar';\n\nimport {clamp} from 'react-stately/private/utils/number';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ProgressBarProps\n extends\n Omit<AriaProgressBarProps, 'label'>,\n RenderProps<ProgressBarRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-ProgressBar'\n */\n className?: ClassNameOrFunction<ProgressBarRenderProps>;\n}\n\nexport interface ProgressBarRenderProps {\n /**\n * The value as a percentage between the minimum and maximum.\n */\n percentage: number | undefined;\n /**\n * A formatted version of the value.\n *\n * @selector [aria-valuetext]\n */\n valueText: string | undefined;\n /**\n * Whether the progress bar is indeterminate.\n *\n * @selector :not([aria-valuenow])\n */\n isIndeterminate: boolean;\n}\n\nexport const ProgressBarContext =\n createContext<ContextValue<ProgressBarProps, HTMLDivElement>>(null);\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n */\nexport const ProgressBar = forwardRef(function ProgressBar(\n props: ProgressBarProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ProgressBarContext);\n let {value = 0, minValue = 0, maxValue = 100, isIndeterminate = false} = props;\n value = clamp(value, minValue, maxValue);\n\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {progressBarProps, labelProps} = useProgressBar({...props, label});\n\n // Calculate the width of the progress bar as a percentage\n let percentage = isIndeterminate ? undefined : ((value - minValue) / (maxValue - minValue)) * 100;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ProgressBar',\n values: {\n percentage,\n valueText: progressBarProps['aria-valuetext'],\n isIndeterminate\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, progressBarProps)}\n ref={ref}\n slot={props.slot || undefined}>\n <LabelContext.Provider value={{...labelProps, ref: labelRef, elementType: 'span'}}>\n {renderProps.children}\n </LabelContext.Provider>\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ProgressBar.mjs.map"}
@@ -27,9 +27,12 @@ function $parcel$export(e, n, v, s) {
27
27
 
28
28
  $parcel$export(module.exports, "RadioGroupContext", function () { return $ecfe484c0a342e33$export$a79eda4ff50e30b6; });
29
29
  $parcel$export(module.exports, "RadioContext", function () { return $ecfe484c0a342e33$export$b118023277d4a5c3; });
30
+ $parcel$export(module.exports, "RadioFieldContext", function () { return $ecfe484c0a342e33$export$29c6814b341e632b; });
30
31
  $parcel$export(module.exports, "RadioGroupStateContext", function () { return $ecfe484c0a342e33$export$29d84393af70866c; });
31
32
  $parcel$export(module.exports, "RadioGroup", function () { return $ecfe484c0a342e33$export$a98f0dcb43a68a25; });
32
33
  $parcel$export(module.exports, "Radio", function () { return $ecfe484c0a342e33$export$d7b12c4107be0d61; });
34
+ $parcel$export(module.exports, "RadioButton", function () { return $ecfe484c0a342e33$export$f4422ae58352e179; });
35
+ $parcel$export(module.exports, "RadioField", function () { return $ecfe484c0a342e33$export$4aaf0c609b3e241e; });
33
36
  /*
34
37
  * Copyright 2022 Adobe. All rights reserved.
35
38
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -59,6 +62,7 @@ $parcel$export(module.exports, "Radio", function () { return $ecfe484c0a342e33$e
59
62
 
60
63
  const $ecfe484c0a342e33$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $kyCvN$react.createContext)(null);
61
64
  const $ecfe484c0a342e33$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $kyCvN$react.createContext)(null);
65
+ const $ecfe484c0a342e33$export$29c6814b341e632b = /*#__PURE__*/ (0, $kyCvN$react.createContext)(null);
62
66
  const $ecfe484c0a342e33$export$29d84393af70866c = /*#__PURE__*/ (0, $kyCvN$react.createContext)(null);
63
67
  const $ecfe484c0a342e33$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $kyCvN$react.forwardRef)(function RadioGroup(props, ref) {
64
68
  [props, ref] = (0, $048d76b84370f141$exports.useContextProps)(props, ref, $ecfe484c0a342e33$export$a79eda4ff50e30b6);
@@ -136,11 +140,91 @@ const $ecfe484c0a342e33$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $kyCvN$react
136
140
  userProvidedInputRef,
137
141
  props.inputRef
138
142
  ]));
139
- let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed } = (0, $kyCvN$reactariauseRadioGroup.useRadio)({
143
+ let aria = (0, $kyCvN$reactariauseRadioGroup.useRadio)({
140
144
  ...(0, $048d76b84370f141$exports.removeDataAttributes)(props),
141
145
  // ReactNode type doesn't allow function children.
142
146
  children: typeof props.children === 'function' ? true : props.children
143
147
  }, state, inputRef);
148
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($kyCvN$react))).createElement($ecfe484c0a342e33$var$InternalRadioContext.Provider, {
149
+ value: {
150
+ ...aria,
151
+ inputRef: inputRef,
152
+ defaultClassName: 'react-aria-Radio'
153
+ }
154
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($kyCvN$react))).createElement($ecfe484c0a342e33$export$f4422ae58352e179, {
155
+ ...props,
156
+ ref: ref
157
+ }));
158
+ });
159
+ const $ecfe484c0a342e33$var$InternalRadioContext = /*#__PURE__*/ (0, $kyCvN$react.createContext)(null);
160
+ const $ecfe484c0a342e33$export$4aaf0c609b3e241e = /*#__PURE__*/ (0, $kyCvN$react.forwardRef)(function RadioField(props, ref) {
161
+ let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
162
+ [props, ref] = (0, $048d76b84370f141$exports.useContextProps)(otherProps, ref, $ecfe484c0a342e33$export$29c6814b341e632b);
163
+ let state = (0, ($parcel$interopDefault($kyCvN$react))).useContext($ecfe484c0a342e33$export$29d84393af70866c);
164
+ let inputRef = (0, $kyCvN$reactariauseObjectRef.useObjectRef)((0, $kyCvN$react.useMemo)(()=>(0, $kyCvN$reactariamergeRefs.mergeRefs)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [
165
+ userProvidedInputRef,
166
+ props.inputRef
167
+ ]));
168
+ let aria = (0, $kyCvN$reactariauseRadioGroup.useRadio)({
169
+ ...(0, $048d76b84370f141$exports.removeDataAttributes)(props),
170
+ // ReactNode type doesn't allow function children.
171
+ children: typeof props.children === 'function' ? true : props.children
172
+ }, state, inputRef);
173
+ let { descriptionProps: descriptionProps, isSelected: isSelected, isDisabled: isDisabled } = aria;
174
+ let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
175
+ ...props,
176
+ defaultClassName: 'react-aria-RadioField',
177
+ values: {
178
+ isSelected: isSelected,
179
+ isDisabled: isDisabled,
180
+ isReadOnly: state.isReadOnly,
181
+ isInvalid: state.isInvalid,
182
+ isRequired: state.isRequired
183
+ }
184
+ });
185
+ let DOMProps = (0, $kyCvN$reactariafilterDOMProps.filterDOMProps)(props, {
186
+ global: true
187
+ });
188
+ delete DOMProps.id;
189
+ delete DOMProps.onClick;
190
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($kyCvN$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
191
+ ...(0, $kyCvN$reactariamergeProps.mergeProps)(DOMProps, renderProps),
192
+ ref: ref,
193
+ "data-selected": isSelected || undefined,
194
+ "data-disabled": isDisabled || undefined,
195
+ "data-readonly": state.isReadOnly || undefined,
196
+ "data-invalid": state.isInvalid || undefined,
197
+ "data-required": state.isRequired || undefined
198
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($kyCvN$react))).createElement((0, $048d76b84370f141$exports.Provider), {
199
+ values: [
200
+ [
201
+ (0, $61557b2a9b2862a8$exports.SelectionIndicatorContext),
202
+ {
203
+ isSelected: isSelected
204
+ }
205
+ ],
206
+ [
207
+ $ecfe484c0a342e33$var$InternalRadioContext,
208
+ {
209
+ ...aria,
210
+ inputRef: inputRef,
211
+ defaultClassName: 'react-aria-RadioButton'
212
+ }
213
+ ],
214
+ [
215
+ (0, $cab7d9a238d19c33$exports.TextContext),
216
+ {
217
+ slots: {
218
+ description: descriptionProps
219
+ }
220
+ }
221
+ ]
222
+ ]
223
+ }, renderProps.children));
224
+ });
225
+ const $ecfe484c0a342e33$export$f4422ae58352e179 = /*#__PURE__*/ (0, $kyCvN$react.forwardRef)(function RadioButton(props, ref) {
226
+ let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed, defaultClassName: defaultClassName, inputRef: inputRef } = (0, $kyCvN$react.useContext)($ecfe484c0a342e33$var$InternalRadioContext);
227
+ let state = (0, ($parcel$interopDefault($kyCvN$react))).useContext($ecfe484c0a342e33$export$29d84393af70866c);
144
228
  let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $kyCvN$reactariauseFocusRing.useFocusRing)();
145
229
  let interactionDisabled = isDisabled || state.isReadOnly;
146
230
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $kyCvN$reactariauseHover.useHover)({
@@ -149,7 +233,7 @@ const $ecfe484c0a342e33$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $kyCvN$react
149
233
  });
150
234
  let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
151
235
  ...props,
152
- defaultClassName: 'react-aria-Radio',
236
+ defaultClassName: defaultClassName,
153
237
  values: {
154
238
  isSelected: isSelected,
155
239
  isPressed: isPressed,
@@ -184,11 +268,7 @@ const $ecfe484c0a342e33$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $kyCvN$react
184
268
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($kyCvN$react))).createElement("input", {
185
269
  ...(0, $kyCvN$reactariamergeProps.mergeProps)(inputProps, focusProps),
186
270
  ref: inputRef
187
- })), /*#__PURE__*/ (0, ($parcel$interopDefault($kyCvN$react))).createElement((0, $61557b2a9b2862a8$exports.SelectionIndicatorContext).Provider, {
188
- value: {
189
- isSelected: isSelected
190
- }
191
- }, renderProps.children));
271
+ })), renderProps.children);
192
272
  });
193
273
 
194
274
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;AAuIM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAiD;AACvF,MAAM,0DAAe,CAAA,GAAA,0BAAY,EAAuD;AACxF,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAClJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA,GAAA,qCAAU,MAAM,CAAC;IACtF,IAAI,qBAAqB,MAAM,kBAAkB,IAAI,0BAA0B;IAC/E,IAAI,QAAQ,CAAA,GAAA,wDAAiB,EAAE;QAC7B,GAAG,KAAK;4BACR;IACF;IAEA,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,mBAAC,eAAe,cAAE,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GAAA,qCAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,6CAAa;QAAE,aAAY;qBAC1B,0DAAC;QAAO,GAAG,CAAA,GAAA,qCAAS,EAAE,YAAY,WAAW;QAAE,KAAK;uBAEtD,0DAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;QAAC,OAAO;wBAAC;QAAU;OACnD,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaRadioGroupProps, AriaRadioProps, useRadio, useRadioGroup} from 'react-aria/useRadioGroup';\n\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot,\n useSlottedContext\n} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared';\nimport {HoverEvents, Orientation} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {RadioGroupState, useRadioGroupState} from 'react-stately/useRadioGroupState';\nimport React, {createContext, ForwardedRef, forwardRef, useMemo} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<RadioGroupRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-RadioGroup'\n */\n className?: ClassNameOrFunction<RadioGroupRenderProps>\n}\nexport interface RadioProps extends Omit<AriaRadioProps, 'children'>, HoverEvents, RenderProps<RadioRenderProps, 'label'>, SlotProps, Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Radio'\n */\n className?: ClassNameOrFunction<RadioRenderProps>,\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface RadioGroupRenderProps {\n /**\n * The orientation of the radio group.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the radio group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the radio group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the radio group.\n */\n state: RadioGroupState\n}\n\nexport interface RadioRenderProps {\n /**\n * Whether the radio is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the radio is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the radio is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the radio is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the radio is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the radio is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\nexport const RadioContext = createContext<ContextValue<Partial<RadioProps>, HTMLLabelElement>>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n */\nexport const RadioGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioGroup(props: RadioGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useRadioGroupState({\n ...props,\n validationBehavior\n });\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useRadioGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, radioGroupProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'vertical'}\n data-invalid={state.isInvalid || undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [RadioGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <SharedElementTransition>\n {renderProps.children}\n </SharedElementTransition>\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A radio represents an individual option within a radio group.\n */\nexport const Radio = /*#__PURE__*/ (forwardRef as forwardRefType)(function Radio(props: RadioProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, RadioContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(useMemo(() => mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [userProvidedInputRef, props.inputRef]));\n let {labelProps, inputProps, isSelected, isDisabled, isPressed} = useRadio({\n ...removeDataAttributes<RadioProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, state, inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let interactionDisabled = isDisabled || state.isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: interactionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Radio',\n values: {\n isSelected,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <dom.label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n <SelectionIndicatorContext.Provider value={{isSelected}}>\n {renderProps.children}\n </SelectionIndicatorContext.Provider>\n </dom.label>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;AAuPM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAiD;AACvF,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAuD;AAC9D,MAAM,0DACX,CAAA,GAAA,0BAAY,EAA0D;AACjE,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,WAC9E,KAAsB,EACtB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA,GAAA,qCAAU,MAAM,CAAC;IACtF,IAAI,qBAAqB,MAAM,kBAAkB,IAA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MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,6CAAa;QAAE,aAAY;qBAC1B,0DAAC;QAAO,GAAG,CAAA,GAAA,qCAAS,EAAE,YAAY,WAAW;QAAE,KAAK;SAErD,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AriaRadioGroupProps,\n AriaRadioProps,\n RadioAria,\n useRadio,\n useRadioGroup\n} from 'react-aria/useRadioGroup';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot,\n useSlottedContext\n} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared';\nimport {HoverEvents, Orientation} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {RadioGroupState, useRadioGroupState} from 'react-stately/useRadioGroupState';\nimport React, {createContext, ForwardedRef, forwardRef, useContext, useMemo} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface RadioGroupProps\n extends\n Omit<\n AriaRadioGroupProps,\n | 'children'\n | 'label'\n | 'description'\n | 'errorMessage'\n | 'validationState'\n | 'validationBehavior'\n >,\n RACValidation,\n RenderProps<RadioGroupRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RadioGroup'\n */\n className?: ClassNameOrFunction<RadioGroupRenderProps>;\n}\nexport interface RadioProps\n extends\n Omit<AriaRadioProps, 'children'>,\n HoverEvents,\n RenderProps<RadioRenderProps, 'label'>,\n SlotProps,\n Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Radio'\n */\n className?: ClassNameOrFunction<RadioRenderProps>;\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>;\n}\n\nexport interface RadioFieldProps\n extends\n Omit<AriaRadioProps, 'children'>,\n RenderProps<RadioFieldRenderProps>,\n SlotProps,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RadioField'\n */\n className?: ClassNameOrFunction<RadioFieldRenderProps>;\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>;\n}\n\nexport interface RadioButtonProps\n extends\n HoverEvents,\n RenderProps<RadioButtonRenderProps, 'label'>,\n SlotProps,\n Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RadioButton'\n */\n className?: ClassNameOrFunction<RadioButtonRenderProps>;\n}\n\nexport interface RadioGroupRenderProps {\n /**\n * The orientation of the radio group.\n *\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation;\n /**\n * Whether the radio group is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the radio group is read only.\n *\n * @selector [data-readonly]\n */\n isReadOnly: boolean;\n /**\n * Whether the radio group is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n /**\n * Whether the radio group is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * State of the radio group.\n */\n state: RadioGroupState;\n}\n\nexport interface RadioRenderProps {\n /**\n * Whether the radio is selected.\n *\n * @selector [data-selected]\n */\n isSelected: boolean;\n /**\n * Whether the radio is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the radio is currently in a pressed state.\n *\n * @selector [data-pressed]\n */\n isPressed: boolean;\n /**\n * Whether the radio is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the radio is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the radio is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the radio is read only.\n *\n * @selector [data-readonly]\n */\n isReadOnly: boolean;\n /**\n * Whether the radio is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the checkbox is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n}\n\nexport interface RadioFieldRenderProps {\n /**\n * Whether the radio is selected.\n *\n * @selector [data-selected]\n */\n isSelected: boolean;\n /**\n * Whether the radio is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the radio is read only.\n *\n * @selector [data-readonly]\n */\n isReadOnly: boolean;\n /**\n * Whether the radio is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the checkbox is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n}\n\nexport interface RadioButtonRenderProps extends RadioRenderProps {}\n\nexport const RadioGroupContext = createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\nexport const RadioContext =\n createContext<ContextValue<Partial<RadioProps>, HTMLLabelElement>>(null);\nexport const RadioFieldContext =\n createContext<ContextValue<Partial<RadioFieldProps>, HTMLDivElement>>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n */\nexport const RadioGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioGroup(\n props: RadioGroupProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useRadioGroupState({\n ...props,\n validationBehavior\n });\n\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation} =\n useRadioGroup(\n {\n ...props,\n label,\n validationBehavior\n },\n state\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, radioGroupProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'vertical'}\n data-invalid={state.isInvalid || undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [RadioGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }\n ],\n [FieldErrorContext, validation]\n ]}>\n <SharedElementTransition>{renderProps.children}</SharedElementTransition>\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A radio represents an individual option within a radio group.\n *\n * @deprecated Use RadioField + RadioButton instead.\n */\nexport const Radio = /*#__PURE__*/ (forwardRef as forwardRefType)(function Radio(\n props: RadioProps,\n ref: ForwardedRef<HTMLLabelElement>\n) {\n let {inputRef: userProvidedInputRef = null, ...otherProps} = props;\n [props, ref] = useContextProps(otherProps, ref, RadioContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(\n useMemo(\n () => mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null),\n [userProvidedInputRef, props.inputRef]\n )\n );\n let aria = useRadio(\n {\n ...removeDataAttributes<RadioProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n },\n state,\n inputRef\n );\n\n return (\n <InternalRadioContext.Provider\n value={{...aria, inputRef, defaultClassName: 'react-aria-Radio'}}>\n <RadioButton {...props} ref={ref} />\n </InternalRadioContext.Provider>\n );\n});\n\ninterface InternalRadioContextValue extends RadioAria {\n inputRef: RefObject<HTMLInputElement | null>;\n defaultClassName: string;\n}\n\nconst InternalRadioContext = createContext<InternalRadioContextValue | null>(null);\n\n/**\n * A RadioField represents an individual option within a radio group, containing a RadioButton and\n * optional description.\n */\nexport const RadioField = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioField(\n props: RadioFieldProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {inputRef: userProvidedInputRef = null, ...otherProps} = props;\n [props, ref] = useContextProps(otherProps, ref, RadioFieldContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(\n useMemo(\n () => mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null),\n [userProvidedInputRef, props.inputRef]\n )\n );\n let aria = useRadio(\n {\n ...removeDataAttributes<RadioFieldProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n },\n state,\n inputRef\n );\n let {descriptionProps, isSelected, isDisabled} = aria;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-RadioField',\n values: {\n isSelected,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [SelectionIndicatorContext, {isSelected}],\n [\n InternalRadioContext,\n {\n ...aria,\n inputRef,\n defaultClassName: 'react-aria-RadioButton'\n }\n ],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps\n }\n }\n ]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A RadioButton is the clickable area of a radio, including the indicator and label.\n */\nexport const RadioButton = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioButton(\n props: RadioButtonProps,\n ref: ForwardedRef<HTMLLabelElement>\n) {\n let {labelProps, inputProps, isSelected, isDisabled, isPressed, defaultClassName, inputRef} =\n useContext(InternalRadioContext)!;\n let state = React.useContext(RadioGroupStateContext)!;\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let interactionDisabled = isDisabled || state.isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: interactionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName,\n values: {\n isSelected,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <dom.label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </dom.label>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.cjs.map"}
@@ -10,7 +10,7 @@ import {filterDOMProps as $kK41C$filterDOMProps} from "react-aria/filterDOMProps
10
10
  import {mergeProps as $kK41C$mergeProps} from "react-aria/mergeProps";
11
11
  import {mergeRefs as $kK41C$mergeRefs} from "react-aria/mergeRefs";
12
12
  import {useRadioGroupState as $kK41C$useRadioGroupState} from "react-stately/useRadioGroupState";
13
- import $kK41C$react, {createContext as $kK41C$createContext, forwardRef as $kK41C$forwardRef, useMemo as $kK41C$useMemo} from "react";
13
+ import $kK41C$react, {createContext as $kK41C$createContext, forwardRef as $kK41C$forwardRef, useMemo as $kK41C$useMemo, useContext as $kK41C$useContext} from "react";
14
14
  import {useFocusRing as $kK41C$useFocusRing} from "react-aria/useFocusRing";
15
15
  import {useHover as $kK41C$useHover} from "react-aria/useHover";
16
16
  import {useObjectRef as $kK41C$useObjectRef} from "react-aria/useObjectRef";
@@ -45,6 +45,7 @@ import {VisuallyHidden as $kK41C$VisuallyHidden} from "react-aria/VisuallyHidden
45
45
 
46
46
  const $0ff6aa0fd4e52420$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $kK41C$createContext)(null);
47
47
  const $0ff6aa0fd4e52420$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $kK41C$createContext)(null);
48
+ const $0ff6aa0fd4e52420$export$29c6814b341e632b = /*#__PURE__*/ (0, $kK41C$createContext)(null);
48
49
  const $0ff6aa0fd4e52420$export$29d84393af70866c = /*#__PURE__*/ (0, $kK41C$createContext)(null);
49
50
  const $0ff6aa0fd4e52420$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $kK41C$forwardRef)(function RadioGroup(props, ref) {
50
51
  [props, ref] = (0, $b7b7a92703138c9b$export$29f1550f4b0d4415)(props, ref, $0ff6aa0fd4e52420$export$a79eda4ff50e30b6);
@@ -123,11 +124,91 @@ const $0ff6aa0fd4e52420$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $kK41C$forwa
123
124
  userProvidedInputRef,
124
125
  props.inputRef
125
126
  ]));
126
- let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed } = (0, $kK41C$useRadio)({
127
+ let aria = (0, $kK41C$useRadio)({
127
128
  ...(0, $b7b7a92703138c9b$export$ef03459518577ad4)(props),
128
129
  // ReactNode type doesn't allow function children.
129
130
  children: typeof props.children === 'function' ? true : props.children
130
131
  }, state, inputRef);
132
+ return /*#__PURE__*/ (0, $kK41C$react).createElement($0ff6aa0fd4e52420$var$InternalRadioContext.Provider, {
133
+ value: {
134
+ ...aria,
135
+ inputRef: inputRef,
136
+ defaultClassName: 'react-aria-Radio'
137
+ }
138
+ }, /*#__PURE__*/ (0, $kK41C$react).createElement($0ff6aa0fd4e52420$export$f4422ae58352e179, {
139
+ ...props,
140
+ ref: ref
141
+ }));
142
+ });
143
+ const $0ff6aa0fd4e52420$var$InternalRadioContext = /*#__PURE__*/ (0, $kK41C$createContext)(null);
144
+ const $0ff6aa0fd4e52420$export$4aaf0c609b3e241e = /*#__PURE__*/ (0, $kK41C$forwardRef)(function RadioField(props, ref) {
145
+ let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
146
+ [props, ref] = (0, $b7b7a92703138c9b$export$29f1550f4b0d4415)(otherProps, ref, $0ff6aa0fd4e52420$export$29c6814b341e632b);
147
+ let state = (0, $kK41C$react).useContext($0ff6aa0fd4e52420$export$29d84393af70866c);
148
+ let inputRef = (0, $kK41C$useObjectRef)((0, $kK41C$useMemo)(()=>(0, $kK41C$mergeRefs)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [
149
+ userProvidedInputRef,
150
+ props.inputRef
151
+ ]));
152
+ let aria = (0, $kK41C$useRadio)({
153
+ ...(0, $b7b7a92703138c9b$export$ef03459518577ad4)(props),
154
+ // ReactNode type doesn't allow function children.
155
+ children: typeof props.children === 'function' ? true : props.children
156
+ }, state, inputRef);
157
+ let { descriptionProps: descriptionProps, isSelected: isSelected, isDisabled: isDisabled } = aria;
158
+ let renderProps = (0, $b7b7a92703138c9b$export$4d86445c2cf5e3)({
159
+ ...props,
160
+ defaultClassName: 'react-aria-RadioField',
161
+ values: {
162
+ isSelected: isSelected,
163
+ isDisabled: isDisabled,
164
+ isReadOnly: state.isReadOnly,
165
+ isInvalid: state.isInvalid,
166
+ isRequired: state.isRequired
167
+ }
168
+ });
169
+ let DOMProps = (0, $kK41C$filterDOMProps)(props, {
170
+ global: true
171
+ });
172
+ delete DOMProps.id;
173
+ delete DOMProps.onClick;
174
+ return /*#__PURE__*/ (0, $kK41C$react).createElement((0, $b7b7a92703138c9b$export$df3a06d6289f983e).div, {
175
+ ...(0, $kK41C$mergeProps)(DOMProps, renderProps),
176
+ ref: ref,
177
+ "data-selected": isSelected || undefined,
178
+ "data-disabled": isDisabled || undefined,
179
+ "data-readonly": state.isReadOnly || undefined,
180
+ "data-invalid": state.isInvalid || undefined,
181
+ "data-required": state.isRequired || undefined
182
+ }, /*#__PURE__*/ (0, $kK41C$react).createElement((0, $b7b7a92703138c9b$export$2881499e37b75b9a), {
183
+ values: [
184
+ [
185
+ (0, $0d6f83ad40839938$export$c9549807523555e0),
186
+ {
187
+ isSelected: isSelected
188
+ }
189
+ ],
190
+ [
191
+ $0ff6aa0fd4e52420$var$InternalRadioContext,
192
+ {
193
+ ...aria,
194
+ inputRef: inputRef,
195
+ defaultClassName: 'react-aria-RadioButton'
196
+ }
197
+ ],
198
+ [
199
+ (0, $20d769b1e2b13352$export$9afb8bc826b033ea),
200
+ {
201
+ slots: {
202
+ description: descriptionProps
203
+ }
204
+ }
205
+ ]
206
+ ]
207
+ }, renderProps.children));
208
+ });
209
+ const $0ff6aa0fd4e52420$export$f4422ae58352e179 = /*#__PURE__*/ (0, $kK41C$forwardRef)(function RadioButton(props, ref) {
210
+ let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed, defaultClassName: defaultClassName, inputRef: inputRef } = (0, $kK41C$useContext)($0ff6aa0fd4e52420$var$InternalRadioContext);
211
+ let state = (0, $kK41C$react).useContext($0ff6aa0fd4e52420$export$29d84393af70866c);
131
212
  let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $kK41C$useFocusRing)();
132
213
  let interactionDisabled = isDisabled || state.isReadOnly;
133
214
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $kK41C$useHover)({
@@ -136,7 +217,7 @@ const $0ff6aa0fd4e52420$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $kK41C$forwa
136
217
  });
137
218
  let renderProps = (0, $b7b7a92703138c9b$export$4d86445c2cf5e3)({
138
219
  ...props,
139
- defaultClassName: 'react-aria-Radio',
220
+ defaultClassName: defaultClassName,
140
221
  values: {
141
222
  isSelected: isSelected,
142
223
  isPressed: isPressed,
@@ -171,13 +252,9 @@ const $0ff6aa0fd4e52420$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $kK41C$forwa
171
252
  }, /*#__PURE__*/ (0, $kK41C$react).createElement("input", {
172
253
  ...(0, $kK41C$mergeProps)(inputProps, focusProps),
173
254
  ref: inputRef
174
- })), /*#__PURE__*/ (0, $kK41C$react).createElement((0, $0d6f83ad40839938$export$c9549807523555e0).Provider, {
175
- value: {
176
- isSelected: isSelected
177
- }
178
- }, renderProps.children));
255
+ })), renderProps.children);
179
256
  });
180
257
 
181
258
 
182
- export {$0ff6aa0fd4e52420$export$a79eda4ff50e30b6 as RadioGroupContext, $0ff6aa0fd4e52420$export$b118023277d4a5c3 as RadioContext, $0ff6aa0fd4e52420$export$29d84393af70866c as RadioGroupStateContext, $0ff6aa0fd4e52420$export$a98f0dcb43a68a25 as RadioGroup, $0ff6aa0fd4e52420$export$d7b12c4107be0d61 as Radio};
259
+ export {$0ff6aa0fd4e52420$export$a79eda4ff50e30b6 as RadioGroupContext, $0ff6aa0fd4e52420$export$b118023277d4a5c3 as RadioContext, $0ff6aa0fd4e52420$export$29c6814b341e632b as RadioFieldContext, $0ff6aa0fd4e52420$export$29d84393af70866c as RadioGroupStateContext, $0ff6aa0fd4e52420$export$a98f0dcb43a68a25 as RadioGroup, $0ff6aa0fd4e52420$export$d7b12c4107be0d61 as Radio, $0ff6aa0fd4e52420$export$f4422ae58352e179 as RadioButton, $0ff6aa0fd4e52420$export$4aaf0c609b3e241e as RadioField};
183
260
  //# sourceMappingURL=RadioGroup.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;AAuIM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAiD;AACvF,MAAM,0DAAe,CAAA,GAAA,oBAAY,EAAuD;AACxF,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAClJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE,CAAA,GAAA,yCAA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,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;uBACA;uBACA;uBACA;4BACA;wBACA;YACA,YAAY,MAAM,UAAU;YAC5B,WAAW,MAAM,SAAS;YAC1B,YAAY,MAAM,UAAU;QAC9B;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAClB,OAAO,SAAS,OAAO;IAEvB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,KAAK;QACP,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,qBAAa;QAAE,aAAY;qBAC1B,gCAAC;QAAO,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,WAAW;QAAE,KAAK;uBAEtD,gCAAC,CAAA,GAAA,yCAAwB,EAAE,QAAQ;QAAC,OAAO;wBAAC;QAAU;OACnD,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaRadioGroupProps, AriaRadioProps, useRadio, useRadioGroup} from 'react-aria/useRadioGroup';\n\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot,\n useSlottedContext\n} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared';\nimport {HoverEvents, Orientation} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {RadioGroupState, useRadioGroupState} from 'react-stately/useRadioGroupState';\nimport React, {createContext, ForwardedRef, forwardRef, useMemo} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<RadioGroupRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-RadioGroup'\n */\n className?: ClassNameOrFunction<RadioGroupRenderProps>\n}\nexport interface RadioProps extends Omit<AriaRadioProps, 'children'>, HoverEvents, RenderProps<RadioRenderProps, 'label'>, SlotProps, Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Radio'\n */\n className?: ClassNameOrFunction<RadioRenderProps>,\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface RadioGroupRenderProps {\n /**\n * The orientation of the radio group.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the radio group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the radio group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the radio group.\n */\n state: RadioGroupState\n}\n\nexport interface RadioRenderProps {\n /**\n * Whether the radio is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the radio is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the radio is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the radio is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the radio is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the radio is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\nexport const RadioContext = createContext<ContextValue<Partial<RadioProps>, HTMLLabelElement>>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n */\nexport const RadioGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioGroup(props: RadioGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useRadioGroupState({\n ...props,\n validationBehavior\n });\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useRadioGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, radioGroupProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'vertical'}\n data-invalid={state.isInvalid || undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [RadioGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <SharedElementTransition>\n {renderProps.children}\n </SharedElementTransition>\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A radio represents an individual option within a radio group.\n */\nexport const Radio = /*#__PURE__*/ (forwardRef as forwardRefType)(function Radio(props: RadioProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, RadioContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(useMemo(() => mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [userProvidedInputRef, props.inputRef]));\n let {labelProps, inputProps, isSelected, isDisabled, isPressed} = useRadio({\n ...removeDataAttributes<RadioProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, state, inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let interactionDisabled = isDisabled || state.isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: interactionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Radio',\n values: {\n isSelected,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <dom.label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n <SelectionIndicatorContext.Provider value={{isSelected}}>\n {renderProps.children}\n </SelectionIndicatorContext.Provider>\n </dom.label>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;AAuPM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAiD;AACvF,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAuD;AAC9D,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA0D;AACjE,MAAM,0DAAyB,CA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,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAClB,OAAO,SAAS,OAAO;IAEvB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,KAAK;QACP,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,qBAAa;QAAE,aAAY;qBAC1B,gCAAC;QAAO,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,WAAW;QAAE,KAAK;SAErD,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AriaRadioGroupProps,\n AriaRadioProps,\n RadioAria,\n useRadio,\n useRadioGroup\n} from 'react-aria/useRadioGroup';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot,\n useSlottedContext\n} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared';\nimport {HoverEvents, Orientation} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {mergeRefs} from 'react-aria/mergeRefs';\nimport {RadioGroupState, useRadioGroupState} from 'react-stately/useRadioGroupState';\nimport React, {createContext, ForwardedRef, forwardRef, useContext, useMemo} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface RadioGroupProps\n extends\n Omit<\n AriaRadioGroupProps,\n | 'children'\n | 'label'\n | 'description'\n | 'errorMessage'\n | 'validationState'\n | 'validationBehavior'\n >,\n RACValidation,\n RenderProps<RadioGroupRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RadioGroup'\n */\n className?: ClassNameOrFunction<RadioGroupRenderProps>;\n}\nexport interface RadioProps\n extends\n Omit<AriaRadioProps, 'children'>,\n HoverEvents,\n RenderProps<RadioRenderProps, 'label'>,\n SlotProps,\n Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Radio'\n */\n className?: ClassNameOrFunction<RadioRenderProps>;\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>;\n}\n\nexport interface RadioFieldProps\n extends\n Omit<AriaRadioProps, 'children'>,\n RenderProps<RadioFieldRenderProps>,\n SlotProps,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RadioField'\n */\n className?: ClassNameOrFunction<RadioFieldRenderProps>;\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>;\n}\n\nexport interface RadioButtonProps\n extends\n HoverEvents,\n RenderProps<RadioButtonRenderProps, 'label'>,\n SlotProps,\n Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RadioButton'\n */\n className?: ClassNameOrFunction<RadioButtonRenderProps>;\n}\n\nexport interface RadioGroupRenderProps {\n /**\n * The orientation of the radio group.\n *\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation;\n /**\n * Whether the radio group is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the radio group is read only.\n *\n * @selector [data-readonly]\n */\n isReadOnly: boolean;\n /**\n * Whether the radio group is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n /**\n * Whether the radio group is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * State of the radio group.\n */\n state: RadioGroupState;\n}\n\nexport interface RadioRenderProps {\n /**\n * Whether the radio is selected.\n *\n * @selector [data-selected]\n */\n isSelected: boolean;\n /**\n * Whether the radio is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the radio is currently in a pressed state.\n *\n * @selector [data-pressed]\n */\n isPressed: boolean;\n /**\n * Whether the radio is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the radio is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the radio is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the radio is read only.\n *\n * @selector [data-readonly]\n */\n isReadOnly: boolean;\n /**\n * Whether the radio is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the checkbox is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n}\n\nexport interface RadioFieldRenderProps {\n /**\n * Whether the radio is selected.\n *\n * @selector [data-selected]\n */\n isSelected: boolean;\n /**\n * Whether the radio is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the radio is read only.\n *\n * @selector [data-readonly]\n */\n isReadOnly: boolean;\n /**\n * Whether the radio is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the checkbox is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n}\n\nexport interface RadioButtonRenderProps extends RadioRenderProps {}\n\nexport const RadioGroupContext = createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\nexport const RadioContext =\n createContext<ContextValue<Partial<RadioProps>, HTMLLabelElement>>(null);\nexport const RadioFieldContext =\n createContext<ContextValue<Partial<RadioFieldProps>, HTMLDivElement>>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n */\nexport const RadioGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioGroup(\n props: RadioGroupProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useRadioGroupState({\n ...props,\n validationBehavior\n });\n\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation} =\n useRadioGroup(\n {\n ...props,\n label,\n validationBehavior\n },\n state\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, radioGroupProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'vertical'}\n data-invalid={state.isInvalid || undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [RadioGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }\n ],\n [FieldErrorContext, validation]\n ]}>\n <SharedElementTransition>{renderProps.children}</SharedElementTransition>\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A radio represents an individual option within a radio group.\n *\n * @deprecated Use RadioField + RadioButton instead.\n */\nexport const Radio = /*#__PURE__*/ (forwardRef as forwardRefType)(function Radio(\n props: RadioProps,\n ref: ForwardedRef<HTMLLabelElement>\n) {\n let {inputRef: userProvidedInputRef = null, ...otherProps} = props;\n [props, ref] = useContextProps(otherProps, ref, RadioContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(\n useMemo(\n () => mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null),\n [userProvidedInputRef, props.inputRef]\n )\n );\n let aria = useRadio(\n {\n ...removeDataAttributes<RadioProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n },\n state,\n inputRef\n );\n\n return (\n <InternalRadioContext.Provider\n value={{...aria, inputRef, defaultClassName: 'react-aria-Radio'}}>\n <RadioButton {...props} ref={ref} />\n </InternalRadioContext.Provider>\n );\n});\n\ninterface InternalRadioContextValue extends RadioAria {\n inputRef: RefObject<HTMLInputElement | null>;\n defaultClassName: string;\n}\n\nconst InternalRadioContext = createContext<InternalRadioContextValue | null>(null);\n\n/**\n * A RadioField represents an individual option within a radio group, containing a RadioButton and\n * optional description.\n */\nexport const RadioField = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioField(\n props: RadioFieldProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {inputRef: userProvidedInputRef = null, ...otherProps} = props;\n [props, ref] = useContextProps(otherProps, ref, RadioFieldContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(\n useMemo(\n () => mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null),\n [userProvidedInputRef, props.inputRef]\n )\n );\n let aria = useRadio(\n {\n ...removeDataAttributes<RadioFieldProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n },\n state,\n inputRef\n );\n let {descriptionProps, isSelected, isDisabled} = aria;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-RadioField',\n values: {\n isSelected,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [SelectionIndicatorContext, {isSelected}],\n [\n InternalRadioContext,\n {\n ...aria,\n inputRef,\n defaultClassName: 'react-aria-RadioButton'\n }\n ],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps\n }\n }\n ]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A RadioButton is the clickable area of a radio, including the indicator and label.\n */\nexport const RadioButton = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioButton(\n props: RadioButtonProps,\n ref: ForwardedRef<HTMLLabelElement>\n) {\n let {labelProps, inputProps, isSelected, isDisabled, isPressed, defaultClassName, inputRef} =\n useContext(InternalRadioContext)!;\n let state = React.useContext(RadioGroupStateContext)!;\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let interactionDisabled = isDisabled || state.isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: interactionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName,\n values: {\n isSelected,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <dom.label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </dom.label>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.js.map"}
@@ -10,7 +10,7 @@ import {filterDOMProps as $64B8K$filterDOMProps} from "react-aria/filterDOMProps
10
10
  import {mergeProps as $64B8K$mergeProps} from "react-aria/mergeProps";
11
11
  import {mergeRefs as $64B8K$mergeRefs} from "react-aria/mergeRefs";
12
12
  import {useRadioGroupState as $64B8K$useRadioGroupState} from "react-stately/useRadioGroupState";
13
- import $64B8K$react, {createContext as $64B8K$createContext, forwardRef as $64B8K$forwardRef, useMemo as $64B8K$useMemo} from "react";
13
+ import $64B8K$react, {createContext as $64B8K$createContext, forwardRef as $64B8K$forwardRef, useMemo as $64B8K$useMemo, useContext as $64B8K$useContext} from "react";
14
14
  import {useFocusRing as $64B8K$useFocusRing} from "react-aria/useFocusRing";
15
15
  import {useHover as $64B8K$useHover} from "react-aria/useHover";
16
16
  import {useObjectRef as $64B8K$useObjectRef} from "react-aria/useObjectRef";
@@ -45,6 +45,7 @@ import {VisuallyHidden as $64B8K$VisuallyHidden} from "react-aria/VisuallyHidden
45
45
 
46
46
  const $fe21c36db05242bb$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $64B8K$createContext)(null);
47
47
  const $fe21c36db05242bb$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $64B8K$createContext)(null);
48
+ const $fe21c36db05242bb$export$29c6814b341e632b = /*#__PURE__*/ (0, $64B8K$createContext)(null);
48
49
  const $fe21c36db05242bb$export$29d84393af70866c = /*#__PURE__*/ (0, $64B8K$createContext)(null);
49
50
  const $fe21c36db05242bb$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $64B8K$forwardRef)(function RadioGroup(props, ref) {
50
51
  [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, $fe21c36db05242bb$export$a79eda4ff50e30b6);
@@ -122,11 +123,91 @@ const $fe21c36db05242bb$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $64B8K$forwa
122
123
  userProvidedInputRef,
123
124
  props.inputRef
124
125
  ]));
125
- let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed } = (0, $64B8K$useRadio)({
126
+ let aria = (0, $64B8K$useRadio)({
126
127
  ...(0, $7230ffa83bc0c2cf$export$ef03459518577ad4)(props),
127
128
  // ReactNode type doesn't allow function children.
128
129
  children: typeof props.children === 'function' ? true : props.children
129
130
  }, state, inputRef);
131
+ return /*#__PURE__*/ (0, $64B8K$react).createElement($fe21c36db05242bb$var$InternalRadioContext.Provider, {
132
+ value: {
133
+ ...aria,
134
+ inputRef: inputRef,
135
+ defaultClassName: 'react-aria-Radio'
136
+ }
137
+ }, /*#__PURE__*/ (0, $64B8K$react).createElement($fe21c36db05242bb$export$f4422ae58352e179, {
138
+ ...props,
139
+ ref: ref
140
+ }));
141
+ });
142
+ const $fe21c36db05242bb$var$InternalRadioContext = /*#__PURE__*/ (0, $64B8K$createContext)(null);
143
+ const $fe21c36db05242bb$export$4aaf0c609b3e241e = /*#__PURE__*/ (0, $64B8K$forwardRef)(function RadioField(props, ref) {
144
+ let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
145
+ [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(otherProps, ref, $fe21c36db05242bb$export$29c6814b341e632b);
146
+ let state = (0, $64B8K$react).useContext($fe21c36db05242bb$export$29d84393af70866c);
147
+ let inputRef = (0, $64B8K$useObjectRef)((0, $64B8K$useMemo)(()=>(0, $64B8K$mergeRefs)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [
148
+ userProvidedInputRef,
149
+ props.inputRef
150
+ ]));
151
+ let aria = (0, $64B8K$useRadio)({
152
+ ...(0, $7230ffa83bc0c2cf$export$ef03459518577ad4)(props),
153
+ // ReactNode type doesn't allow function children.
154
+ children: typeof props.children === 'function' ? true : props.children
155
+ }, state, inputRef);
156
+ let { descriptionProps: descriptionProps, isSelected: isSelected, isDisabled: isDisabled } = aria;
157
+ let renderProps = (0, $7230ffa83bc0c2cf$export$4d86445c2cf5e3)({
158
+ ...props,
159
+ defaultClassName: 'react-aria-RadioField',
160
+ values: {
161
+ isSelected: isSelected,
162
+ isDisabled: isDisabled,
163
+ isReadOnly: state.isReadOnly,
164
+ isInvalid: state.isInvalid,
165
+ isRequired: state.isRequired
166
+ }
167
+ });
168
+ let DOMProps = (0, $64B8K$filterDOMProps)(props, {
169
+ global: true
170
+ });
171
+ delete DOMProps.id;
172
+ delete DOMProps.onClick;
173
+ return /*#__PURE__*/ (0, $64B8K$react).createElement((0, $7230ffa83bc0c2cf$export$df3a06d6289f983e).div, {
174
+ ...(0, $64B8K$mergeProps)(DOMProps, renderProps),
175
+ ref: ref,
176
+ "data-selected": isSelected || undefined,
177
+ "data-disabled": isDisabled || undefined,
178
+ "data-readonly": state.isReadOnly || undefined,
179
+ "data-invalid": state.isInvalid || undefined,
180
+ "data-required": state.isRequired || undefined
181
+ }, /*#__PURE__*/ (0, $64B8K$react).createElement((0, $7230ffa83bc0c2cf$export$2881499e37b75b9a), {
182
+ values: [
183
+ [
184
+ (0, $91fe5e721c7f36c1$export$c9549807523555e0),
185
+ {
186
+ isSelected: isSelected
187
+ }
188
+ ],
189
+ [
190
+ $fe21c36db05242bb$var$InternalRadioContext,
191
+ {
192
+ ...aria,
193
+ inputRef: inputRef,
194
+ defaultClassName: 'react-aria-RadioButton'
195
+ }
196
+ ],
197
+ [
198
+ (0, $efe09c6d1c304b50$export$9afb8bc826b033ea),
199
+ {
200
+ slots: {
201
+ description: descriptionProps
202
+ }
203
+ }
204
+ ]
205
+ ]
206
+ }, renderProps.children));
207
+ });
208
+ const $fe21c36db05242bb$export$f4422ae58352e179 = /*#__PURE__*/ (0, $64B8K$forwardRef)(function RadioButton(props, ref) {
209
+ let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed, defaultClassName: defaultClassName, inputRef: inputRef } = (0, $64B8K$useContext)($fe21c36db05242bb$var$InternalRadioContext);
210
+ let state = (0, $64B8K$react).useContext($fe21c36db05242bb$export$29d84393af70866c);
130
211
  let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $64B8K$useFocusRing)();
131
212
  let interactionDisabled = isDisabled || state.isReadOnly;
132
213
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $64B8K$useHover)({
@@ -135,7 +216,7 @@ const $fe21c36db05242bb$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $64B8K$forwa
135
216
  });
136
217
  let renderProps = (0, $7230ffa83bc0c2cf$export$4d86445c2cf5e3)({
137
218
  ...props,
138
- defaultClassName: 'react-aria-Radio',
219
+ defaultClassName: defaultClassName,
139
220
  values: {
140
221
  isSelected: isSelected,
141
222
  isPressed: isPressed,
@@ -170,13 +251,9 @@ const $fe21c36db05242bb$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $64B8K$forwa
170
251
  }, /*#__PURE__*/ (0, $64B8K$react).createElement("input", {
171
252
  ...(0, $64B8K$mergeProps)(inputProps, focusProps),
172
253
  ref: inputRef
173
- })), /*#__PURE__*/ (0, $64B8K$react).createElement((0, $91fe5e721c7f36c1$export$c9549807523555e0).Provider, {
174
- value: {
175
- isSelected: isSelected
176
- }
177
- }, renderProps.children));
254
+ })), renderProps.children);
178
255
  });
179
256
 
180
257
 
181
- export {$fe21c36db05242bb$export$a79eda4ff50e30b6 as RadioGroupContext, $fe21c36db05242bb$export$b118023277d4a5c3 as RadioContext, $fe21c36db05242bb$export$29d84393af70866c as RadioGroupStateContext, $fe21c36db05242bb$export$a98f0dcb43a68a25 as RadioGroup, $fe21c36db05242bb$export$d7b12c4107be0d61 as Radio};
258
+ export {$fe21c36db05242bb$export$a79eda4ff50e30b6 as RadioGroupContext, $fe21c36db05242bb$export$b118023277d4a5c3 as RadioContext, $fe21c36db05242bb$export$29c6814b341e632b as RadioFieldContext, $fe21c36db05242bb$export$29d84393af70866c as RadioGroupStateContext, $fe21c36db05242bb$export$a98f0dcb43a68a25 as RadioGroup, $fe21c36db05242bb$export$d7b12c4107be0d61 as Radio, $fe21c36db05242bb$export$f4422ae58352e179 as RadioButton, $fe21c36db05242bb$export$4aaf0c609b3e241e as RadioField};
182
259
  //# sourceMappingURL=RadioGroup.mjs.map