react-aria-components 1.17.0 → 1.18.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 +19 -2
  242. package/dist/private/GridList.cjs.map +1 -1
  243. package/dist/private/GridList.js +20 -3
  244. package/dist/private/GridList.js.map +1 -1
  245. package/dist/private/GridList.mjs +20 -3
  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 +44 -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;;;;;;;;;;AA8BM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,yCAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,yCAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ChildrenOrFunction, Provider, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport {Color} from 'react-stately/Color';\n\nimport {ColorAreaContext} from './ColorArea';\n\nimport {ColorFieldContext} from './ColorField';\nimport {\n ColorPickerState,\n ColorPickerProps as StatelyColorPickerProps,\n useColorPickerState\n} from 'react-stately/useColorPickerState';\nimport {ColorSliderContext} from './ColorSlider';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {ColorWheelContext} from './ColorWheel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, JSX} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {\n /** The children of the component. A function may be provided to alter the children based on component state. */\n children: ChildrenOrFunction<ColorPickerRenderProps>\n}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAwCM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,yCAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,yCAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 ChildrenOrFunction,\n Provider,\n SlotProps,\n SlottedContextValue,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Color} from 'react-stately/Color';\n\nimport {ColorAreaContext} from './ColorArea';\n\nimport {ColorFieldContext} from './ColorField';\nimport {\n ColorPickerState,\n ColorPickerProps as StatelyColorPickerProps,\n useColorPickerState\n} from 'react-stately/useColorPickerState';\nimport {ColorSliderContext} from './ColorSlider';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {ColorWheelContext} from './ColorWheel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, JSX} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color;\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {\n /**\n * The children of the component. A function may be provided to alter the children based on\n * component state.\n */\n children: ChildrenOrFunction<ColorPickerRenderProps>;\n}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA8BM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,yCAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,yCAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ChildrenOrFunction, Provider, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport {Color} from 'react-stately/Color';\n\nimport {ColorAreaContext} from './ColorArea';\n\nimport {ColorFieldContext} from './ColorField';\nimport {\n ColorPickerState,\n ColorPickerProps as StatelyColorPickerProps,\n useColorPickerState\n} from 'react-stately/useColorPickerState';\nimport {ColorSliderContext} from './ColorSlider';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {ColorWheelContext} from './ColorWheel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, JSX} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {\n /** The children of the component. A function may be provided to alter the children based on component state. */\n children: ChildrenOrFunction<ColorPickerRenderProps>\n}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAwCM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,yCAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,yCAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 ChildrenOrFunction,\n Provider,\n SlotProps,\n SlottedContextValue,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Color} from 'react-stately/Color';\n\nimport {ColorAreaContext} from './ColorArea';\n\nimport {ColorFieldContext} from './ColorField';\nimport {\n ColorPickerState,\n ColorPickerProps as StatelyColorPickerProps,\n useColorPickerState\n} from 'react-stately/useColorPickerState';\nimport {ColorSliderContext} from './ColorSlider';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {ColorWheelContext} from './ColorWheel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, JSX} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color;\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {\n /**\n * The children of the component. A function may be provided to alter the children based on\n * component state.\n */\n children: ChildrenOrFunction<ColorPickerRenderProps>;\n}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA2D;AAClG,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,sCAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0DAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,sCAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,sCAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,cACV,UAAU,eACV,WAAW,EACZ,GAAG,CAAA,GAAA,6CAAa,EAAE;QACjB,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,6CAAkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, useColorSlider} from 'react-aria/useColorSlider';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderState, useColorSliderState} from 'react-stately/useColorSliderState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, 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-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderContext = createContext<ContextValue<Partial<ColorSliderProps>, HTMLDivElement>>(null);\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDO,MAAM,0DACX,CAAA,GAAA,0BAAY,EAA2D;AAClE,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,sCAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0DAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,sCAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,sCAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM,EAAE,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IACjF,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,6CAAa,EAC/E;QACE,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GACA;IAGF,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,6CAAkB;gBAAG;aAAY;YAClC;gBACE,CAAA,GAAA,sCAAW;gBACX;oBACE,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aACD;YACD;gBACE,CAAA,GAAA,mDAAwB;gBACxB;2BACE;gCACA;oBACA,WAAW;oBACX,aAAa;oBACb,YAAY,MAAM,UAAU;gBAC9B;aACD;SACF;qBACD,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAI3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, useColorSlider} from 'react-aria/useColorSlider';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderState, useColorSliderState} from 'react-stately/useColorSliderState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n *\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation;\n /**\n * Whether the color slider is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the color slider.\n */\n state: ColorSliderState;\n}\n\nexport interface ColorSliderProps\n extends\n Omit<AriaColorSliderProps, 'label'>,\n RenderProps<ColorSliderRenderProps>,\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-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>;\n}\n\nexport const ColorSliderContext =\n createContext<ContextValue<Partial<ColorSliderProps>, HTMLDivElement>>(null);\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(\n props: ColorSliderProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {trackProps, thumbProps, inputProps, labelProps, outputProps} = useColorSlider(\n {\n ...props,\n label,\n trackRef,\n inputRef\n },\n state\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [\n LabelContext,\n {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }\n ],\n [\n InternalColorThumbContext,\n {\n state,\n thumbProps,\n inputXRef: inputRef,\n xInputProps: inputProps,\n isDisabled: props.isDisabled\n }\n ]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined}\n />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AA+CO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA2D;AAClG,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,cACV,UAAU,eACV,WAAW,EACZ,GAAG,CAAA,GAAA,qBAAa,EAAE;QACjB,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, useColorSlider} from 'react-aria/useColorSlider';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderState, useColorSliderState} from 'react-stately/useColorSliderState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, 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-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderContext = createContext<ContextValue<Partial<ColorSliderProps>, HTMLDivElement>>(null);\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAwDO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA2D;AAClE,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAAE,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IACjF,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,qBAAa,EAC/E;QACE,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GACA;IAGF,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAkB;gBAAG;aAAY;YAClC;gBACE,CAAA,GAAA,yCAAW;gBACX;oBACE,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aACD;YACD;gBACE,CAAA,GAAA,yCAAwB;gBACxB;2BACE;gCACA;oBACA,WAAW;oBACX,aAAa;oBACb,YAAY,MAAM,UAAU;gBAC9B;aACD;SACF;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAI3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, useColorSlider} from 'react-aria/useColorSlider';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderState, useColorSliderState} from 'react-stately/useColorSliderState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n *\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation;\n /**\n * Whether the color slider is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the color slider.\n */\n state: ColorSliderState;\n}\n\nexport interface ColorSliderProps\n extends\n Omit<AriaColorSliderProps, 'label'>,\n RenderProps<ColorSliderRenderProps>,\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-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>;\n}\n\nexport const ColorSliderContext =\n createContext<ContextValue<Partial<ColorSliderProps>, HTMLDivElement>>(null);\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(\n props: ColorSliderProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {trackProps, thumbProps, inputProps, labelProps, outputProps} = useColorSlider(\n {\n ...props,\n label,\n trackRef,\n inputRef\n },\n state\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [\n LabelContext,\n {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }\n ],\n [\n InternalColorThumbContext,\n {\n state,\n thumbProps,\n inputXRef: inputRef,\n xInputProps: inputProps,\n isDisabled: props.isDisabled\n }\n ]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined}\n />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AA+CO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA2D;AAClG,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,cACV,UAAU,eACV,WAAW,EACZ,GAAG,CAAA,GAAA,qBAAa,EAAE;QACjB,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, useColorSlider} from 'react-aria/useColorSlider';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderState, useColorSliderState} from 'react-stately/useColorSliderState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, 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-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderContext = createContext<ContextValue<Partial<ColorSliderProps>, HTMLDivElement>>(null);\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAwDO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA2D;AAClE,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAAE,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IACjF,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,qBAAa,EAC/E;QACE,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GACA;IAGF,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAkB;gBAAG;aAAY;YAClC;gBACE,CAAA,GAAA,yCAAW;gBACX;oBACE,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aACD;YACD;gBACE,CAAA,GAAA,yCAAwB;gBACxB;2BACE;gCACA;oBACA,WAAW;oBACX,aAAa;oBACb,YAAY,MAAM,UAAU;gBAC9B;aACD;SACF;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAI3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, useColorSlider} from 'react-aria/useColorSlider';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderState, useColorSliderState} from 'react-stately/useColorSliderState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n *\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation;\n /**\n * Whether the color slider is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the color slider.\n */\n state: ColorSliderState;\n}\n\nexport interface ColorSliderProps\n extends\n Omit<AriaColorSliderProps, 'label'>,\n RenderProps<ColorSliderRenderProps>,\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-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>;\n}\n\nexport const ColorSliderContext =\n createContext<ContextValue<Partial<ColorSliderProps>, HTMLDivElement>>(null);\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(\n props: ColorSliderProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {trackProps, thumbProps, inputProps, labelProps, outputProps} = useColorSlider(\n {\n ...props,\n label,\n trackRef,\n inputRef\n },\n state\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [\n LabelContext,\n {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }\n ],\n [\n InternalColorThumbContext,\n {\n state,\n thumbProps,\n inputXRef: inputRef,\n xInputProps: inputProps,\n isDisabled: props.isDisabled\n }\n ]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined}\n />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,6CAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,qCAAS,EAAE,UAAU,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria/useColorSwatch';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, 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-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <dom.div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAkD;AAKzD,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,6CAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,qCAAS,EAAE,UAAU,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAGX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria/useColorSwatch';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color;\n}\n\nexport interface ColorSwatchProps\n extends\n AriaColorSwatchProps,\n StyleRenderProps<ColorSwatchRenderProps>,\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-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>;\n}\n\nexport const ColorSwatchContext =\n createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(\n props: ColorSwatchProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref}\n />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AA6BO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;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,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria/useColorSwatch';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, 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-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <dom.div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAoCO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAkD;AAKzD,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;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,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAGX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria/useColorSwatch';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color;\n}\n\nexport interface ColorSwatchProps\n extends\n AriaColorSwatchProps,\n StyleRenderProps<ColorSwatchRenderProps>,\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-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>;\n}\n\nexport const ColorSwatchContext =\n createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(\n props: ColorSwatchProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref}\n />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AA6BO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;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,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria/useColorSwatch';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, 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-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <dom.div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;AAoCO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAkD;AAKzD,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;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,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAGX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria/useColorSwatch';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color;\n}\n\nexport interface ColorSwatchProps\n extends\n AriaColorSwatchProps,\n StyleRenderProps<ColorSwatchRenderProps>,\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-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>;\n}\n\nexport const ColorSwatchContext =\n createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(\n props: ColorSwatchProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref}\n />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAAwD;AAC5G,MAAM,sDAAkB,CAAA,GAAA,0BAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,uBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0DAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAE1D,qBACE,0DAAC,CAAA,GAAA,iCAAM;QACJ,GAAG,CAAA,GAAA,6CAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAAM,KAAK;QAClB,cAAY,KAAK,CAAC,aAAa,IAAK,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAuB,SAAQ;QAChH,QAAQ,MAAM,MAAM,IAAI;QACxB,eAAc;QACd,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAC;YAClB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,0DAAC,sCAAgB,QAAQ;QAAC,OAAO;OAC9B,MAAM,QAAQ;AAIvB;AAmBO,MAAM,0DAAwB,CAAA,GAAA,uBAAS,EAAE,SAAS,sBAAsB,KAAiC,EAAE,GAAiC;IACjJ,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,oBAAM,EAAE,IAAM,OAAO,cAAc,WAAW,CAAA,GAAA,mCAAS,EAAE,aAAa,WAAW;QAAC;KAAU;IACxG,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,sCAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAC;QACV,IAAI,OAAO,MAAM,YACf,OAAO,CAAC,cAAgB,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAElD,OAAO;IACT;IAEA,qBACE,0DAAC,CAAA,GAAA,qCAAU;QACR,GAAG,KAAK;QACT,yCAAyC;QACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,4CAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,0DAAC,CAAA,GAAA,4CAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WACvC;AAKX","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, PressEvents, ValueBase} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\n// @ts-ignore\nimport {parseColor} from 'react-stately/Color';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useColorPickerState} from 'react-stately/useColorPickerState';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, 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-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, '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-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DO,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAwD;AACtE,MAAM,sDAAkB,CAAA,GAAA,0BAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,uBAAS,EAAE,SAAS,kBACnD,KAA6B,EAC7B,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0DAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAE1D,qBACE,0DAAC,CAAA,GAAA,iCAAM;QACJ,GAAG,CAAA,GAAA,6CAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAAM,KAAK;QAClB,cACE,KAAK,CAAC,aAAa,IAClB,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAuB,SAAQ;QAE/E,QAAQ,MAAM,MAAM,IAAI;QACxB,eAAc;QACd,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAA;YACjB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,0DAAC,sCAAgB,QAAQ;QAAC,OAAO;OAAW,MAAM,QAAQ;AAGhE;AA6BO,MAAM,0DAAwB,CAAA,GAAA,uBAAS,EAAE,SAAS,sBACvD,KAAiC,EACjC,GAAiC;IAEjC,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,oBAAM,EAChB,IAAO,OAAO,cAAc,WAAW,CAAA,GAAA,mCAAS,EAAE,aAAa,WAC/D;QAAC;KAAU;IAEb,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,sCAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAA;QACT,IAAI,OAAO,MAAM,YACf,OAAO,CAAA,cAAe,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAEhD,OAAO;IACT;IAEA,qBACE,0DAAC,CAAA,GAAA,qCAAU;QACR,GAAG,KAAK;QACT,yCAAyC;QACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,4CAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,0DAAC,CAAA,GAAA,4CAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WAAI;AAItD","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {\n AriaLabelingProps,\n GlobalDOMAttributes,\n HoverEvents,\n PressEvents,\n ValueBase\n} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\n// @ts-ignore\nimport {parseColor} from 'react-stately/Color';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n ReactNode,\n useContext,\n useEffect,\n useMemo\n} from 'react';\nimport {useColorPickerState} from 'react-stately/useColorPickerState';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps\n extends\n ValueBase<string | Color, Color>,\n AriaLabelingProps,\n StyleRenderProps<ColorSwatchPickerRenderProps>,\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-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>;\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'grid'\n */\n layout?: 'grid' | 'stack';\n}\n\nexport const ColorSwatchPickerContext =\n createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(\n props: ColorSwatchPickerProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={\n props['aria-label'] ||\n (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)\n }\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={keys => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>{props.children}</ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<\n ListBoxItemRenderProps,\n 'selectionMode' | 'selectionBehavior'\n> {\n /** The color of the swatch. */\n color: Color;\n}\n\nexport interface ColorSwatchPickerItemProps\n extends\n RenderProps<ColorSwatchPickerItemRenderProps>,\n HoverEvents,\n PressEvents,\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-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>;\n /** The color of the swatch. */\n color: string | Color;\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean;\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(\n props: ColorSwatchPickerItemProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let propColor = props.color || '#0000';\n let color = useMemo(\n () => (typeof propColor === 'string' ? parseColor(propColor) : propColor),\n [propColor]\n );\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = v => {\n if (typeof v === 'function') {\n return renderProps => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>{children}</ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAwD;AAC5G,MAAM,sDAAkB,CAAA,GAAA,oBAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAE1D,qBACE,gCAAC,CAAA,GAAA,yCAAM;QACJ,GAAG,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAAM,KAAK;QAClB,cAAY,KAAK,CAAC,aAAa,IAAK,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAuB,SAAQ;QAChH,QAAQ,MAAM,MAAM,IAAI;QACxB,eAAc;QACd,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAC;YAClB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,gCAAC,sCAAgB,QAAQ;QAAC,OAAO;OAC9B,MAAM,QAAQ;AAIvB;AAmBO,MAAM,0DAAwB,CAAA,GAAA,iBAAS,EAAE,SAAS,sBAAsB,KAAiC,EAAE,GAAiC;IACjJ,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,cAAM,EAAE,IAAM,OAAO,cAAc,WAAW,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QAAC;KAAU;IACxG,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAC;QACV,IAAI,OAAO,MAAM,YACf,OAAO,CAAC,cAAgB,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAElD,OAAO;IACT;IAEA,qBACE,gCAAC,CAAA,GAAA,wCAAU;QACR,GAAG,KAAK;QACT,yCAAyC;QACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,yCAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,gCAAC,CAAA,GAAA,yCAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WACvC;AAKX","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, PressEvents, ValueBase} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\n// @ts-ignore\nimport {parseColor} from 'react-stately/Color';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useColorPickerState} from 'react-stately/useColorPickerState';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, 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-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, '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-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2DO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAwD;AACtE,MAAM,sDAAkB,CAAA,GAAA,oBAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBACnD,KAA6B,EAC7B,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAE1D,qBACE,gCAAC,CAAA,GAAA,yCAAM;QACJ,GAAG,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAAM,KAAK;QAClB,cACE,KAAK,CAAC,aAAa,IAClB,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAuB,SAAQ;QAE/E,QAAQ,MAAM,MAAM,IAAI;QACxB,eAAc;QACd,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAA;YACjB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,gCAAC,sCAAgB,QAAQ;QAAC,OAAO;OAAW,MAAM,QAAQ;AAGhE;AA6BO,MAAM,0DAAwB,CAAA,GAAA,iBAAS,EAAE,SAAS,sBACvD,KAAiC,EACjC,GAAiC;IAEjC,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,cAAM,EAChB,IAAO,OAAO,cAAc,WAAW,CAAA,GAAA,iBAAS,EAAE,aAAa,WAC/D;QAAC;KAAU;IAEb,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAA;QACT,IAAI,OAAO,MAAM,YACf,OAAO,CAAA,cAAe,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAEhD,OAAO;IACT;IAEA,qBACE,gCAAC,CAAA,GAAA,wCAAU;QACR,GAAG,KAAK;QACT,yCAAyC;QACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,yCAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,gCAAC,CAAA,GAAA,yCAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WAAI;AAItD","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {\n AriaLabelingProps,\n GlobalDOMAttributes,\n HoverEvents,\n PressEvents,\n ValueBase\n} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\n// @ts-ignore\nimport {parseColor} from 'react-stately/Color';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n ReactNode,\n useContext,\n useEffect,\n useMemo\n} from 'react';\nimport {useColorPickerState} from 'react-stately/useColorPickerState';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps\n extends\n ValueBase<string | Color, Color>,\n AriaLabelingProps,\n StyleRenderProps<ColorSwatchPickerRenderProps>,\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-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>;\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'grid'\n */\n layout?: 'grid' | 'stack';\n}\n\nexport const ColorSwatchPickerContext =\n createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(\n props: ColorSwatchPickerProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={\n props['aria-label'] ||\n (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)\n }\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={keys => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>{props.children}</ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<\n ListBoxItemRenderProps,\n 'selectionMode' | 'selectionBehavior'\n> {\n /** The color of the swatch. */\n color: Color;\n}\n\nexport interface ColorSwatchPickerItemProps\n extends\n RenderProps<ColorSwatchPickerItemRenderProps>,\n HoverEvents,\n PressEvents,\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-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>;\n /** The color of the swatch. */\n color: string | Color;\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean;\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(\n props: ColorSwatchPickerItemProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let propColor = props.color || '#0000';\n let color = useMemo(\n () => (typeof propColor === 'string' ? parseColor(propColor) : propColor),\n [propColor]\n );\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = v => {\n if (typeof v === 'function') {\n return renderProps => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>{children}</ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAwD;AAC5G,MAAM,sDAAkB,CAAA,GAAA,oBAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAE1D,qBACE,gCAAC,CAAA,GAAA,yCAAM;QACJ,GAAG,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAAM,KAAK;QAClB,cAAY,KAAK,CAAC,aAAa,IAAK,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAuB,SAAQ;QAChH,QAAQ,MAAM,MAAM,IAAI;QACxB,eAAc;QACd,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAC;YAClB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,gCAAC,sCAAgB,QAAQ;QAAC,OAAO;OAC9B,MAAM,QAAQ;AAIvB;AAmBO,MAAM,0DAAwB,CAAA,GAAA,iBAAS,EAAE,SAAS,sBAAsB,KAAiC,EAAE,GAAiC;IACjJ,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,cAAM,EAAE,IAAM,OAAO,cAAc,WAAW,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QAAC;KAAU;IACxG,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAC;QACV,IAAI,OAAO,MAAM,YACf,OAAO,CAAC,cAAgB,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAElD,OAAO;IACT;IAEA,qBACE,gCAAC,CAAA,GAAA,wCAAU;QACR,GAAG,KAAK;QACT,yCAAyC;QACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,yCAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,gCAAC,CAAA,GAAA,yCAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WACvC;AAKX","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, PressEvents, ValueBase} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\n// @ts-ignore\nimport {parseColor} from 'react-stately/Color';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useColorPickerState} from 'react-stately/useColorPickerState';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, 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-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, '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-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2DO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAwD;AACtE,MAAM,sDAAkB,CAAA,GAAA,oBAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBACnD,KAA6B,EAC7B,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAE1D,qBACE,gCAAC,CAAA,GAAA,yCAAM;QACJ,GAAG,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAAM,KAAK;QAClB,cACE,KAAK,CAAC,aAAa,IAClB,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAuB,SAAQ;QAE/E,QAAQ,MAAM,MAAM,IAAI;QACxB,eAAc;QACd,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAA;YACjB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,gCAAC,sCAAgB,QAAQ;QAAC,OAAO;OAAW,MAAM,QAAQ;AAGhE;AA6BO,MAAM,0DAAwB,CAAA,GAAA,iBAAS,EAAE,SAAS,sBACvD,KAAiC,EACjC,GAAiC;IAEjC,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,cAAM,EAChB,IAAO,OAAO,cAAc,WAAW,CAAA,GAAA,iBAAS,EAAE,aAAa,WAC/D;QAAC;KAAU;IAEb,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAA;QACT,IAAI,OAAO,MAAM,YACf,OAAO,CAAA,cAAe,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAEhD,OAAO;IACT;IAEA,qBACE,gCAAC,CAAA,GAAA,wCAAU;QACR,GAAG,KAAK;QACT,yCAAyC;QACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,yCAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,gCAAC,CAAA,GAAA,yCAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WAAI;AAItD","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {\n AriaLabelingProps,\n GlobalDOMAttributes,\n HoverEvents,\n PressEvents,\n ValueBase\n} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\n// @ts-ignore\nimport {parseColor} from 'react-stately/Color';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n ReactNode,\n useContext,\n useEffect,\n useMemo\n} from 'react';\nimport {useColorPickerState} from 'react-stately/useColorPickerState';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps\n extends\n ValueBase<string | Color, Color>,\n AriaLabelingProps,\n StyleRenderProps<ColorSwatchPickerRenderProps>,\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-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>;\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'grid'\n */\n layout?: 'grid' | 'stack';\n}\n\nexport const ColorSwatchPickerContext =\n createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(\n props: ColorSwatchPickerProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={\n props['aria-label'] ||\n (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)\n }\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={keys => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>{props.children}</ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<\n ListBoxItemRenderProps,\n 'selectionMode' | 'selectionBehavior'\n> {\n /** The color of the swatch. */\n color: Color;\n}\n\nexport interface ColorSwatchPickerItemProps\n extends\n RenderProps<ColorSwatchPickerItemRenderProps>,\n HoverEvents,\n PressEvents,\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-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>;\n /** The color of the swatch. */\n color: string | Color;\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean;\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(\n props: ColorSwatchPickerItemProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let propColor = props.color || '#0000';\n let color = useMemo(\n () => (typeof propColor === 'string' ? parseColor(propColor) : propColor),\n [propColor]\n );\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = v => {\n if (typeof v === 'function') {\n return renderProps => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>{children}</ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAyC;AA6CvF,MAAM,yDAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,uBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,qCAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,0DAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,0DAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, 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-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAyC;AAsDvF,MAAM,yDAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAAiC;IAEjC,IAAI,SACF,KAAK,cACL,UAAU,aACV,SAAS,aACT,SAAS,eACT,WAAW,eACX,WAAW,cACX,aAAa,OACd,GAAG,CAAA,GAAA,uBAAS,EAAE;IACf,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,qCAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,0DAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,0DAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n useContext\n} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\ninterface ColorState {\n getDisplayColor(): Color;\n isDragging: boolean;\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState;\n thumbProps: HTMLAttributes<HTMLElement>;\n inputXRef: RefObject<HTMLInputElement | null>;\n inputYRef?: RefObject<HTMLInputElement | null>;\n xInputProps: InputHTMLAttributes<HTMLInputElement>;\n yInputProps?: InputHTMLAttributes<HTMLInputElement>;\n isDisabled?: boolean;\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color;\n /**\n * Whether this thumb is currently being dragged.\n *\n * @selector [data-dragging]\n */\n isDragging: boolean;\n /**\n * Whether the thumb is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the thumb is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the thumb is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the thumb is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n}\n\nexport interface ColorThumbProps\n extends HoverEvents, RenderProps<ColorThumbRenderProps>, 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-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>;\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to\n * adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(\n props: ColorThumbProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {\n state,\n thumbProps,\n inputXRef,\n inputYRef,\n xInputProps,\n yInputProps,\n isDisabled = false\n } = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAwBO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AA6CvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,iBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, 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-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AA+BO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AAsDvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAAiC;IAEjC,IAAI,SACF,KAAK,cACL,UAAU,aACV,SAAS,aACT,SAAS,eACT,WAAW,eACX,WAAW,cACX,aAAa,OACd,GAAG,CAAA,GAAA,iBAAS,EAAE;IACf,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n useContext\n} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\ninterface ColorState {\n getDisplayColor(): Color;\n isDragging: boolean;\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState;\n thumbProps: HTMLAttributes<HTMLElement>;\n inputXRef: RefObject<HTMLInputElement | null>;\n inputYRef?: RefObject<HTMLInputElement | null>;\n xInputProps: InputHTMLAttributes<HTMLInputElement>;\n yInputProps?: InputHTMLAttributes<HTMLInputElement>;\n isDisabled?: boolean;\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color;\n /**\n * Whether this thumb is currently being dragged.\n *\n * @selector [data-dragging]\n */\n isDragging: boolean;\n /**\n * Whether the thumb is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the thumb is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the thumb is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the thumb is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n}\n\nexport interface ColorThumbProps\n extends HoverEvents, RenderProps<ColorThumbRenderProps>, 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-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>;\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to\n * adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(\n props: ColorThumbProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {\n state,\n thumbProps,\n inputXRef,\n inputYRef,\n xInputProps,\n yInputProps,\n isDisabled = false\n } = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAwBO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AA6CvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,iBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, 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-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;AA+BO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AAsDvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAAiC;IAEjC,IAAI,SACF,KAAK,cACL,UAAU,aACV,SAAS,aACT,SAAS,eACT,WAAW,eACX,WAAW,cACX,aAAa,OACd,GAAG,CAAA,GAAA,iBAAS,EAAE;IACf,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately/Color';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n useContext\n} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\ninterface ColorState {\n getDisplayColor(): Color;\n isDragging: boolean;\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState;\n thumbProps: HTMLAttributes<HTMLElement>;\n inputXRef: RefObject<HTMLInputElement | null>;\n inputYRef?: RefObject<HTMLInputElement | null>;\n xInputProps: InputHTMLAttributes<HTMLInputElement>;\n yInputProps?: InputHTMLAttributes<HTMLInputElement>;\n isDisabled?: boolean;\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color;\n /**\n * Whether this thumb is currently being dragged.\n *\n * @selector [data-dragging]\n */\n isDragging: boolean;\n /**\n * Whether the thumb is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the thumb is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the thumb is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the thumb is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n}\n\nexport interface ColorThumbProps\n extends HoverEvents, RenderProps<ColorThumbRenderProps>, 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-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>;\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to\n * adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(\n props: ColorThumbProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {\n state,\n thumbProps,\n inputXRef,\n inputYRef,\n xInputProps,\n yInputProps,\n isDisabled = false\n } = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCO,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA0D;AAChG,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,wDAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,2CAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;OACA,YAAY,QAAQ;AAI7B;AAYO,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA6D;AAKxG,MAAM,0DAAkB,CAAA,GAAA,uBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,uBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria/useColorWheel';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorWheelState, useColorWheelState} from 'react-stately/useColorWheelState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, 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-ColorWheel'\n */\n className?: ClassNameOrFunction<ColorWheelRenderProps>\n}\n\nexport const ColorWheelContext = createContext<ContextValue<Partial<ColorWheelProps>, HTMLDivElement>>(null);\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps>, 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-ColorWheelTrack'\n */\n className?: ClassNameOrFunction<ColorWheelTrackRenderProps>\n}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <dom.div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDO,MAAM,0DACX,CAAA,GAAA,0BAAY,EAA0D;AACjE,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,wDAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,2CAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBACE,CAAA,GAAA,mDAAwB;gBACxB;2BACE;gCACA;oBACA,WAAW;oBACX,aAAa;oBACb,YAAY,MAAM,UAAU;gBAC9B;aACD;SACF;OACA,YAAY,QAAQ;AAI7B;AAkBO,MAAM,0DACX,CAAA,GAAA,0BAAY,EAA6D;AAKpE,MAAM,0DAAkB,CAAA,GAAA,uBAAS,EAAE,SAAS,gBACjD,KAA2B,EAC3B,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,uBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QAAE,GAAG,IAAI;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,iBAAe,MAAM,UAAU,IAAI;;AAErF","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria/useColorWheel';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorWheelState, useColorWheelState} from 'react-stately/useColorWheelState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n useContext,\n useRef\n} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the color wheel.\n */\n state: ColorWheelState;\n}\n\nexport interface ColorWheelProps\n extends\n AriaColorWheelOptions,\n RenderProps<ColorWheelRenderProps>,\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-ColorWheel'\n */\n className?: ClassNameOrFunction<ColorWheelRenderProps>;\n}\n\nexport const ColorWheelContext =\n createContext<ContextValue<Partial<ColorWheelProps>, HTMLDivElement>>(null);\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(\n props: ColorWheelProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [\n InternalColorThumbContext,\n {\n state,\n thumbProps,\n inputXRef: inputRef,\n xInputProps: inputProps,\n isDisabled: props.isDisabled\n }\n ]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps\n extends StyleRenderProps<ColorWheelTrackRenderProps>, 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-ColorWheelTrack'\n */\n className?: ClassNameOrFunction<ColorWheelTrackRenderProps>;\n}\ninterface ColorWheelTrackContextValue\n extends\n Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>,\n StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext =\n createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(\n props: ColorWheelTrackProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <dom.div {...rest} {...renderProps} ref={ref} data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAsCO,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA0D;AAChG,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;OACA,YAAY,QAAQ;AAI7B;AAYO,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA6D;AAKxG,MAAM,0DAAkB,CAAA,GAAA,iBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,iBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria/useColorWheel';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorWheelState, useColorWheelState} from 'react-stately/useColorWheelState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, 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-ColorWheel'\n */\n className?: ClassNameOrFunction<ColorWheelRenderProps>\n}\n\nexport const ColorWheelContext = createContext<ContextValue<Partial<ColorWheelProps>, HTMLDivElement>>(null);\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps>, 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-ColorWheelTrack'\n */\n className?: ClassNameOrFunction<ColorWheelTrackRenderProps>\n}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <dom.div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAqDO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA0D;AACjE,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBACE,CAAA,GAAA,yCAAwB;gBACxB;2BACE;gCACA;oBACA,WAAW;oBACX,aAAa;oBACb,YAAY,MAAM,UAAU;gBAC9B;aACD;SACF;OACA,YAAY,QAAQ;AAI7B;AAkBO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA6D;AAKpE,MAAM,0DAAkB,CAAA,GAAA,iBAAS,EAAE,SAAS,gBACjD,KAA2B,EAC3B,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,iBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAE,GAAG,IAAI;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,iBAAe,MAAM,UAAU,IAAI;;AAErF","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria/useColorWheel';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorWheelState, useColorWheelState} from 'react-stately/useColorWheelState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n useContext,\n useRef\n} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the color wheel.\n */\n state: ColorWheelState;\n}\n\nexport interface ColorWheelProps\n extends\n AriaColorWheelOptions,\n RenderProps<ColorWheelRenderProps>,\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-ColorWheel'\n */\n className?: ClassNameOrFunction<ColorWheelRenderProps>;\n}\n\nexport const ColorWheelContext =\n createContext<ContextValue<Partial<ColorWheelProps>, HTMLDivElement>>(null);\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(\n props: ColorWheelProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [\n InternalColorThumbContext,\n {\n state,\n thumbProps,\n inputXRef: inputRef,\n xInputProps: inputProps,\n isDisabled: props.isDisabled\n }\n ]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps\n extends StyleRenderProps<ColorWheelTrackRenderProps>, 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-ColorWheelTrack'\n */\n className?: ClassNameOrFunction<ColorWheelTrackRenderProps>;\n}\ninterface ColorWheelTrackContextValue\n extends\n Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>,\n StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext =\n createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(\n props: ColorWheelTrackProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <dom.div {...rest} {...renderProps} ref={ref} data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAsCO,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA0D;AAChG,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;OACA,YAAY,QAAQ;AAI7B;AAYO,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA6D;AAKxG,MAAM,0DAAkB,CAAA,GAAA,iBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,iBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria/useColorWheel';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorWheelState, useColorWheelState} from 'react-stately/useColorWheelState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, 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-ColorWheel'\n */\n className?: ClassNameOrFunction<ColorWheelRenderProps>\n}\n\nexport const ColorWheelContext = createContext<ContextValue<Partial<ColorWheelProps>, HTMLDivElement>>(null);\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps>, 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-ColorWheelTrack'\n */\n className?: ClassNameOrFunction<ColorWheelTrackRenderProps>\n}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <dom.div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAqDO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA0D;AACjE,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBACE,CAAA,GAAA,yCAAwB;gBACxB;2BACE;gCACA;oBACA,WAAW;oBACX,aAAa;oBACb,YAAY,MAAM,UAAU;gBAC9B;aACD;SACF;OACA,YAAY,QAAQ;AAI7B;AAkBO,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA6D;AAKpE,MAAM,0DAAkB,CAAA,GAAA,iBAAS,EAAE,SAAS,gBACjD,KAA2B,EAC3B,GAAiC;IAEjC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,iBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAE,GAAG,IAAI;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,iBAAe,MAAM,UAAU,IAAI;;AAErF","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria/useColorWheel';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorWheelState, useColorWheelState} from 'react-stately/useColorWheelState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n useContext,\n useRef\n} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the color wheel.\n */\n state: ColorWheelState;\n}\n\nexport interface ColorWheelProps\n extends\n AriaColorWheelOptions,\n RenderProps<ColorWheelRenderProps>,\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-ColorWheel'\n */\n className?: ClassNameOrFunction<ColorWheelRenderProps>;\n}\n\nexport const ColorWheelContext =\n createContext<ContextValue<Partial<ColorWheelProps>, HTMLDivElement>>(null);\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(\n props: ColorWheelProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [\n InternalColorThumbContext,\n {\n state,\n thumbProps,\n inputXRef: inputRef,\n xInputProps: inputProps,\n isDisabled: props.isDisabled\n }\n ]\n ]}>\n {renderProps.children}\n </Provider>\n </dom.div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps\n extends StyleRenderProps<ColorWheelTrackRenderProps>, 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-ColorWheelTrack'\n */\n className?: ClassNameOrFunction<ColorWheelTrackRenderProps>;\n}\ninterface ColorWheelTrackContextValue\n extends\n Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>,\n StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext =\n createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(\n props: ColorWheelTrackProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <dom.div {...rest} {...renderProps} ref={ref} data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.mjs.map"}