react-aria-components 1.12.2 → 1.14.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 (370) hide show
  1. package/dist/Autocomplete.main.js +3 -3
  2. package/dist/Autocomplete.main.js.map +1 -1
  3. package/dist/Autocomplete.mjs +3 -3
  4. package/dist/Autocomplete.module.js +3 -3
  5. package/dist/Autocomplete.module.js.map +1 -1
  6. package/dist/Breadcrumbs.main.js +5 -3
  7. package/dist/Breadcrumbs.main.js.map +1 -1
  8. package/dist/Breadcrumbs.mjs +5 -3
  9. package/dist/Breadcrumbs.module.js +5 -3
  10. package/dist/Breadcrumbs.module.js.map +1 -1
  11. package/dist/Button.main.js +5 -11
  12. package/dist/Button.main.js.map +1 -1
  13. package/dist/Button.mjs +5 -11
  14. package/dist/Button.module.js +5 -11
  15. package/dist/Button.module.js.map +1 -1
  16. package/dist/Calendar.main.js +2 -2
  17. package/dist/Calendar.main.js.map +1 -1
  18. package/dist/Calendar.mjs +2 -2
  19. package/dist/Calendar.module.js +2 -2
  20. package/dist/Calendar.module.js.map +1 -1
  21. package/dist/Checkbox.main.js.map +1 -1
  22. package/dist/Checkbox.module.js.map +1 -1
  23. package/dist/Collection.main.js +1 -1
  24. package/dist/Collection.main.js.map +1 -1
  25. package/dist/Collection.mjs +1 -1
  26. package/dist/Collection.module.js +1 -1
  27. package/dist/Collection.module.js.map +1 -1
  28. package/dist/ColorArea.main.js +1 -1
  29. package/dist/ColorArea.main.js.map +1 -1
  30. package/dist/ColorArea.mjs +1 -1
  31. package/dist/ColorArea.module.js +1 -1
  32. package/dist/ColorArea.module.js.map +1 -1
  33. package/dist/ColorField.main.js +1 -1
  34. package/dist/ColorField.main.js.map +1 -1
  35. package/dist/ColorField.mjs +1 -1
  36. package/dist/ColorField.module.js +1 -1
  37. package/dist/ColorField.module.js.map +1 -1
  38. package/dist/ColorPicker.main.js +1 -1
  39. package/dist/ColorPicker.main.js.map +1 -1
  40. package/dist/ColorPicker.mjs +1 -1
  41. package/dist/ColorPicker.module.js +1 -1
  42. package/dist/ColorPicker.module.js.map +1 -1
  43. package/dist/ColorSlider.main.js +1 -1
  44. package/dist/ColorSlider.main.js.map +1 -1
  45. package/dist/ColorSlider.mjs +1 -1
  46. package/dist/ColorSlider.module.js +1 -1
  47. package/dist/ColorSlider.module.js.map +1 -1
  48. package/dist/ColorSwatch.main.js.map +1 -1
  49. package/dist/ColorSwatch.module.js.map +1 -1
  50. package/dist/ColorSwatchPicker.main.js +1 -1
  51. package/dist/ColorSwatchPicker.main.js.map +1 -1
  52. package/dist/ColorSwatchPicker.mjs +1 -1
  53. package/dist/ColorSwatchPicker.module.js +1 -1
  54. package/dist/ColorSwatchPicker.module.js.map +1 -1
  55. package/dist/ColorThumb.main.js.map +1 -1
  56. package/dist/ColorThumb.module.js.map +1 -1
  57. package/dist/ColorWheel.main.js +1 -1
  58. package/dist/ColorWheel.main.js.map +1 -1
  59. package/dist/ColorWheel.mjs +1 -1
  60. package/dist/ColorWheel.module.js +1 -1
  61. package/dist/ColorWheel.module.js.map +1 -1
  62. package/dist/ComboBox.main.js.map +1 -1
  63. package/dist/ComboBox.module.js.map +1 -1
  64. package/dist/DateField.main.js +15 -9
  65. package/dist/DateField.main.js.map +1 -1
  66. package/dist/DateField.mjs +15 -9
  67. package/dist/DateField.module.js +15 -9
  68. package/dist/DateField.module.js.map +1 -1
  69. package/dist/DatePicker.main.js +6 -2
  70. package/dist/DatePicker.main.js.map +1 -1
  71. package/dist/DatePicker.mjs +6 -2
  72. package/dist/DatePicker.module.js +6 -2
  73. package/dist/DatePicker.module.js.map +1 -1
  74. package/dist/Dialog.main.js.map +1 -1
  75. package/dist/Dialog.module.js.map +1 -1
  76. package/dist/Disclosure.main.js +2 -1
  77. package/dist/Disclosure.main.js.map +1 -1
  78. package/dist/Disclosure.mjs +2 -1
  79. package/dist/Disclosure.module.js +2 -1
  80. package/dist/Disclosure.module.js.map +1 -1
  81. package/dist/DragAndDrop.main.js.map +1 -1
  82. package/dist/DragAndDrop.module.js.map +1 -1
  83. package/dist/DropZone.main.js.map +1 -1
  84. package/dist/DropZone.module.js.map +1 -1
  85. package/dist/FieldError.main.js.map +1 -1
  86. package/dist/FieldError.module.js.map +1 -1
  87. package/dist/FileTrigger.main.js +1 -0
  88. package/dist/FileTrigger.main.js.map +1 -1
  89. package/dist/FileTrigger.mjs +1 -0
  90. package/dist/FileTrigger.module.js +1 -0
  91. package/dist/FileTrigger.module.js.map +1 -1
  92. package/dist/Form.main.js.map +1 -1
  93. package/dist/Form.module.js.map +1 -1
  94. package/dist/GridList.main.js +25 -22
  95. package/dist/GridList.main.js.map +1 -1
  96. package/dist/GridList.mjs +26 -24
  97. package/dist/GridList.module.js +26 -24
  98. package/dist/GridList.module.js.map +1 -1
  99. package/dist/Group.main.js +5 -4
  100. package/dist/Group.main.js.map +1 -1
  101. package/dist/Group.mjs +5 -4
  102. package/dist/Group.module.js +5 -4
  103. package/dist/Group.module.js.map +1 -1
  104. package/dist/HiddenDateInput.main.js +5 -3
  105. package/dist/HiddenDateInput.main.js.map +1 -1
  106. package/dist/HiddenDateInput.mjs +5 -3
  107. package/dist/HiddenDateInput.module.js +5 -3
  108. package/dist/HiddenDateInput.module.js.map +1 -1
  109. package/dist/Input.main.js +4 -1
  110. package/dist/Input.main.js.map +1 -1
  111. package/dist/Input.mjs +4 -1
  112. package/dist/Input.module.js +4 -1
  113. package/dist/Input.module.js.map +1 -1
  114. package/dist/Link.main.js.map +1 -1
  115. package/dist/Link.module.js.map +1 -1
  116. package/dist/ListBox.main.js +20 -7
  117. package/dist/ListBox.main.js.map +1 -1
  118. package/dist/ListBox.mjs +21 -8
  119. package/dist/ListBox.module.js +21 -8
  120. package/dist/ListBox.module.js.map +1 -1
  121. package/dist/Menu.main.js +17 -7
  122. package/dist/Menu.main.js.map +1 -1
  123. package/dist/Menu.mjs +17 -7
  124. package/dist/Menu.module.js +17 -7
  125. package/dist/Menu.module.js.map +1 -1
  126. package/dist/Meter.main.js.map +1 -1
  127. package/dist/Meter.module.js.map +1 -1
  128. package/dist/Modal.main.js +9 -1
  129. package/dist/Modal.main.js.map +1 -1
  130. package/dist/Modal.mjs +10 -2
  131. package/dist/Modal.module.js +10 -2
  132. package/dist/Modal.module.js.map +1 -1
  133. package/dist/NumberField.main.js +2 -1
  134. package/dist/NumberField.main.js.map +1 -1
  135. package/dist/NumberField.mjs +2 -1
  136. package/dist/NumberField.module.js +2 -1
  137. package/dist/NumberField.module.js.map +1 -1
  138. package/dist/OverlayArrow.main.js.map +1 -1
  139. package/dist/OverlayArrow.module.js.map +1 -1
  140. package/dist/Popover.main.js.map +1 -1
  141. package/dist/Popover.module.js.map +1 -1
  142. package/dist/ProgressBar.main.js.map +1 -1
  143. package/dist/ProgressBar.module.js.map +1 -1
  144. package/dist/RSPContexts.main.js +4 -0
  145. package/dist/RSPContexts.main.js.map +1 -1
  146. package/dist/RSPContexts.mjs +3 -1
  147. package/dist/RSPContexts.module.js +3 -1
  148. package/dist/RSPContexts.module.js.map +1 -1
  149. package/dist/RadioGroup.main.js +10 -2
  150. package/dist/RadioGroup.main.js.map +1 -1
  151. package/dist/RadioGroup.mjs +10 -2
  152. package/dist/RadioGroup.module.js +10 -2
  153. package/dist/RadioGroup.module.js.map +1 -1
  154. package/dist/SearchField.main.js +7 -3
  155. package/dist/SearchField.main.js.map +1 -1
  156. package/dist/SearchField.mjs +7 -3
  157. package/dist/SearchField.module.js +7 -3
  158. package/dist/SearchField.module.js.map +1 -1
  159. package/dist/Select.main.js +62 -22
  160. package/dist/Select.main.js.map +1 -1
  161. package/dist/Select.mjs +65 -25
  162. package/dist/Select.module.js +65 -25
  163. package/dist/Select.module.js.map +1 -1
  164. package/dist/SelectionIndicator.main.js +45 -0
  165. package/dist/SelectionIndicator.main.js.map +1 -0
  166. package/dist/SelectionIndicator.mjs +35 -0
  167. package/dist/SelectionIndicator.module.js +35 -0
  168. package/dist/SelectionIndicator.module.js.map +1 -0
  169. package/dist/Separator.main.js.map +1 -1
  170. package/dist/Separator.module.js.map +1 -1
  171. package/dist/SharedElementTransition.main.js +139 -0
  172. package/dist/SharedElementTransition.main.js.map +1 -0
  173. package/dist/SharedElementTransition.mjs +129 -0
  174. package/dist/SharedElementTransition.module.js +129 -0
  175. package/dist/SharedElementTransition.module.js.map +1 -0
  176. package/dist/Slider.main.js.map +1 -1
  177. package/dist/Slider.module.js.map +1 -1
  178. package/dist/Switch.main.js.map +1 -1
  179. package/dist/Switch.module.js.map +1 -1
  180. package/dist/Table.main.js +142 -53
  181. package/dist/Table.main.js.map +1 -1
  182. package/dist/Table.mjs +143 -54
  183. package/dist/Table.module.js +143 -54
  184. package/dist/Table.module.js.map +1 -1
  185. package/dist/Tabs.main.js +86 -9
  186. package/dist/Tabs.main.js.map +1 -1
  187. package/dist/Tabs.mjs +88 -12
  188. package/dist/Tabs.module.js +88 -12
  189. package/dist/Tabs.module.js.map +1 -1
  190. package/dist/TagGroup.main.js +29 -17
  191. package/dist/TagGroup.main.js.map +1 -1
  192. package/dist/TagGroup.mjs +29 -17
  193. package/dist/TagGroup.module.js +29 -17
  194. package/dist/TagGroup.module.js.map +1 -1
  195. package/dist/TextArea.main.js.map +1 -1
  196. package/dist/TextArea.module.js.map +1 -1
  197. package/dist/TextField.main.js +2 -2
  198. package/dist/TextField.main.js.map +1 -1
  199. package/dist/TextField.mjs +2 -2
  200. package/dist/TextField.module.js +2 -2
  201. package/dist/TextField.module.js.map +1 -1
  202. package/dist/Toast.main.js.map +1 -1
  203. package/dist/Toast.module.js.map +1 -1
  204. package/dist/ToggleButton.main.js +7 -1
  205. package/dist/ToggleButton.main.js.map +1 -1
  206. package/dist/ToggleButton.mjs +7 -1
  207. package/dist/ToggleButton.module.js +7 -1
  208. package/dist/ToggleButton.module.js.map +1 -1
  209. package/dist/ToggleButtonGroup.main.js +4 -1
  210. package/dist/ToggleButtonGroup.main.js.map +1 -1
  211. package/dist/ToggleButtonGroup.mjs +4 -1
  212. package/dist/ToggleButtonGroup.module.js +4 -1
  213. package/dist/ToggleButtonGroup.module.js.map +1 -1
  214. package/dist/Toolbar.main.js.map +1 -1
  215. package/dist/Toolbar.module.js.map +1 -1
  216. package/dist/Tooltip.main.js.map +1 -1
  217. package/dist/Tooltip.module.js.map +1 -1
  218. package/dist/Tree.main.js +16 -4
  219. package/dist/Tree.main.js.map +1 -1
  220. package/dist/Tree.mjs +16 -4
  221. package/dist/Tree.module.js +16 -4
  222. package/dist/Tree.module.js.map +1 -1
  223. package/dist/import.mjs +13 -7
  224. package/dist/main.js +23 -3
  225. package/dist/main.js.map +1 -1
  226. package/dist/module.js +13 -7
  227. package/dist/module.js.map +1 -1
  228. package/dist/types.d.ts +663 -58
  229. package/dist/types.d.ts.map +1 -1
  230. package/dist/utils.main.js +0 -1
  231. package/dist/utils.main.js.map +1 -1
  232. package/dist/utils.mjs +0 -1
  233. package/dist/utils.module.js +0 -1
  234. package/dist/utils.module.js.map +1 -1
  235. package/i18n/ar-AE.js +1 -1
  236. package/i18n/ar-AE.mjs +1 -1
  237. package/i18n/bg-BG.js +1 -1
  238. package/i18n/bg-BG.mjs +1 -1
  239. package/i18n/cs-CZ.js +1 -1
  240. package/i18n/cs-CZ.mjs +1 -1
  241. package/i18n/da-DK.js +1 -1
  242. package/i18n/da-DK.mjs +1 -1
  243. package/i18n/de-DE.js +1 -1
  244. package/i18n/de-DE.mjs +1 -1
  245. package/i18n/el-GR.js +1 -1
  246. package/i18n/el-GR.mjs +1 -1
  247. package/i18n/en-US.js +1 -1
  248. package/i18n/en-US.mjs +1 -1
  249. package/i18n/es-ES.js +1 -1
  250. package/i18n/es-ES.mjs +1 -1
  251. package/i18n/et-EE.js +1 -1
  252. package/i18n/et-EE.mjs +1 -1
  253. package/i18n/fi-FI.js +1 -1
  254. package/i18n/fi-FI.mjs +1 -1
  255. package/i18n/fr-FR.js +1 -1
  256. package/i18n/fr-FR.mjs +1 -1
  257. package/i18n/he-IL.js +1 -1
  258. package/i18n/he-IL.mjs +1 -1
  259. package/i18n/hr-HR.js +1 -1
  260. package/i18n/hr-HR.mjs +1 -1
  261. package/i18n/hu-HU.js +1 -1
  262. package/i18n/hu-HU.mjs +1 -1
  263. package/i18n/index.js +67 -67
  264. package/i18n/index.mjs +67 -67
  265. package/i18n/it-IT.js +1 -1
  266. package/i18n/it-IT.mjs +1 -1
  267. package/i18n/ja-JP.js +1 -1
  268. package/i18n/ja-JP.mjs +1 -1
  269. package/i18n/ko-KR.js +1 -1
  270. package/i18n/ko-KR.mjs +1 -1
  271. package/i18n/lt-LT.js +1 -1
  272. package/i18n/lt-LT.mjs +1 -1
  273. package/i18n/lv-LV.js +1 -1
  274. package/i18n/lv-LV.mjs +1 -1
  275. package/i18n/nb-NO.js +1 -1
  276. package/i18n/nb-NO.mjs +1 -1
  277. package/i18n/nl-NL.js +1 -1
  278. package/i18n/nl-NL.mjs +1 -1
  279. package/i18n/pl-PL.js +1 -1
  280. package/i18n/pl-PL.mjs +1 -1
  281. package/i18n/pt-BR.js +1 -1
  282. package/i18n/pt-BR.mjs +1 -1
  283. package/i18n/pt-PT.js +1 -1
  284. package/i18n/pt-PT.mjs +1 -1
  285. package/i18n/ro-RO.js +1 -1
  286. package/i18n/ro-RO.mjs +1 -1
  287. package/i18n/ru-RU.js +1 -1
  288. package/i18n/ru-RU.mjs +1 -1
  289. package/i18n/sk-SK.js +1 -1
  290. package/i18n/sk-SK.mjs +1 -1
  291. package/i18n/sl-SI.js +1 -1
  292. package/i18n/sl-SI.mjs +1 -1
  293. package/i18n/sr-SP.js +1 -1
  294. package/i18n/sr-SP.mjs +1 -1
  295. package/i18n/sv-SE.js +1 -1
  296. package/i18n/sv-SE.mjs +1 -1
  297. package/i18n/tr-TR.js +1 -1
  298. package/i18n/tr-TR.mjs +1 -1
  299. package/i18n/uk-UA.js +1 -1
  300. package/i18n/uk-UA.mjs +1 -1
  301. package/i18n/zh-CN.js +1 -1
  302. package/i18n/zh-CN.mjs +1 -1
  303. package/i18n/zh-TW.js +1 -1
  304. package/i18n/zh-TW.mjs +1 -1
  305. package/package.json +25 -25
  306. package/src/Autocomplete.tsx +2 -2
  307. package/src/Breadcrumbs.tsx +25 -6
  308. package/src/Button.tsx +15 -11
  309. package/src/Calendar.tsx +51 -6
  310. package/src/Checkbox.tsx +25 -2
  311. package/src/Collection.tsx +1 -1
  312. package/src/ColorArea.tsx +15 -2
  313. package/src/ColorField.tsx +16 -1
  314. package/src/ColorPicker.tsx +5 -2
  315. package/src/ColorSlider.tsx +16 -2
  316. package/src/ColorSwatch.tsx +15 -2
  317. package/src/ColorSwatchPicker.tsx +18 -1
  318. package/src/ColorThumb.tsx +8 -2
  319. package/src/ColorWheel.tsx +24 -3
  320. package/src/ComboBox.tsx +18 -1
  321. package/src/DateField.tsx +60 -16
  322. package/src/DatePicker.tsx +38 -5
  323. package/src/Dialog.tsx +5 -0
  324. package/src/Disclosure.tsx +30 -5
  325. package/src/DragAndDrop.tsx +8 -2
  326. package/src/DropZone.tsx +16 -2
  327. package/src/FieldError.tsx +8 -2
  328. package/src/FileTrigger.tsx +1 -0
  329. package/src/Form.tsx +5 -0
  330. package/src/GridList.tsx +66 -35
  331. package/src/Group.tsx +32 -18
  332. package/src/HiddenDateInput.tsx +6 -4
  333. package/src/Input.tsx +23 -3
  334. package/src/Link.tsx +15 -2
  335. package/src/ListBox.tsx +58 -14
  336. package/src/Menu.tsx +41 -8
  337. package/src/Meter.tsx +16 -2
  338. package/src/Modal.tsx +30 -3
  339. package/src/NumberField.tsx +21 -3
  340. package/src/OverlayArrow.tsx +14 -2
  341. package/src/Popover.tsx +13 -1
  342. package/src/ProgressBar.tsx +17 -3
  343. package/src/RSPContexts.ts +19 -0
  344. package/src/RadioGroup.tsx +33 -4
  345. package/src/SearchField.tsx +36 -4
  346. package/src/Select.tsx +100 -36
  347. package/src/SelectionIndicator.tsx +46 -0
  348. package/src/Separator.tsx +10 -1
  349. package/src/SharedElementTransition.tsx +185 -0
  350. package/src/Slider.tsx +35 -3
  351. package/src/Switch.tsx +18 -5
  352. package/src/Table.tsx +204 -83
  353. package/src/Tabs.tsx +158 -15
  354. package/src/TagGroup.tsx +60 -26
  355. package/src/TextArea.tsx +14 -2
  356. package/src/TextField.tsx +20 -2
  357. package/src/Toast.tsx +22 -2
  358. package/src/ToggleButton.tsx +19 -2
  359. package/src/ToggleButtonGroup.tsx +26 -4
  360. package/src/Toolbar.tsx +13 -1
  361. package/src/Tooltip.tsx +13 -1
  362. package/src/Tree.tsx +76 -40
  363. package/src/index.ts +17 -10
  364. package/src/utils.tsx +2 -3
  365. package/dist/context.main.js +0 -25
  366. package/dist/context.main.js.map +0 -1
  367. package/dist/context.mjs +0 -19
  368. package/dist/context.module.js +0 -19
  369. package/dist/context.module.js.map +0 -1
  370. package/src/context.tsx +0 -34
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAyFM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA8B;AAGjE,MAAM,4CAAU,WAAW,GAAG,CAAA,GAAA,4BAAoB,EAAE,WAAW,CAAmB,OAAwB,KAAgC;IAC/I,IAAI,QAAC,IAAI,UAAE,MAAM,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE;IAChC,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC3B,QAAQ,IAAI,CAAC,CAAC,qCAAqC,EAAE,KAAK,UAAU,CAAC;IAEvE,OAAO,OAAO,OAAO,KAAK,SAAS;AACrC;AAmCO,MAAM,4CAAgD;IAC3D,gBAAe,cAAC,UAAU,uBAAE,mBAAmB,EAAC;QAC9C,OAAO,0CAAoB,YAAY,MAAM;IAC/C;IACA,kBAAiB,cAAC,UAAU,UAAE,MAAM,uBAAE,mBAAmB,EAAC;QACxD,OAAO,0CAAoB,YAAY,QAAQ;IACjD;AACF;AAEA,SAAS,0CACP,UAAsC,EACtC,MAA4B,EAC5B,mBAA2D;IAE3D,OAAO,CAAA,GAAA,wBAAgB,EAAE;QACvB,OAAO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,IAAI,eAAC,CAAA,GAAA,mBAAW,EAAE,WAAW;gBAAC,KAAK,GAAG,QAAQ,GAAG,CAAC,MAAM,CAAC;YAAA;YAE3E,UAAU,QAAQ,SAAS,IAAI,OAAO,WAAW,OAAO,CAAC,QAAQ,SAAS,IAAI;QAChF;IACF;IAEA,OAAO;AACT;AAEO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAsB;AAGpE,SAAS,0CAAiB,UAAsB;IACrD,OAAO,CAAA,GAAA,cAAM,EAAE,IAAM,cAAc,OAAO,IAAI,IAAI;YAAC;SAAW,IAAI,MAAM;QAAC;KAAW;AACtF","sources":["packages/react-aria-components/src/Collection.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {CollectionBase, DropTargetDelegate, GlobalDOMAttributes, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared';\nimport {createBranchComponent, useCachedChildren} from '@react-aria/collections';\nimport {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately';\nimport React, {cloneElement, createContext, ForwardedRef, HTMLAttributes, isValidElement, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react';\nimport {StyleProps} from './utils';\n\nexport interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\nexport interface ItemRenderProps {\n /**\n * Whether the item is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the item is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the item is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the item is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the item is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may\n * not be focused. Dependent on `disabledKeys` and `disabledBehavior`.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * The type of selection that is allowed in the collection.\n * @selector [data-selection-mode=\"single | multiple\"]\n */\n selectionMode: SelectionMode,\n /** The selection behavior for the collection. */\n selectionBehavior: SelectionBehavior,\n /**\n * Whether the item allows dragging.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-allows-dragging]\n */\n allowsDragging?: boolean,\n /**\n * Whether the item is currently being dragged.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-dragging]\n */\n isDragging?: boolean,\n /**\n * Whether the item is currently an active drop target.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-drop-target]\n */\n isDropTarget?: boolean\n}\n\nexport interface SectionProps<T> extends Omit<SharedSectionProps<T>, 'children' | 'title'>, StyleProps, GlobalDOMAttributes<HTMLElement> {\n /** The unique id of the section. */\n id?: Key,\n /** The object value that this section represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** Static child items or a function to render children. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\ninterface SectionContextValue {\n name: string,\n render: (props: SectionProps<any>, ref: ForwardedRef<HTMLElement>, section: Node<any>, className?: string) => ReactElement\n}\n\nexport const SectionContext = createContext<SectionContextValue | null>(null);\n\n/** @deprecated */\nexport const Section = /*#__PURE__*/ createBranchComponent('section', <T extends object>(props: SectionProps<T>, ref: ForwardedRef<HTMLElement>, section: Node<T>): JSX.Element => {\n let {name, render} = useContext(SectionContext)!;\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`<Section> is deprecated. Please use <${name}> instead.`);\n }\n return render(props, ref, section, 'react-aria-Section');\n});\n\nexport interface CollectionBranchProps {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** The parent node of the items to render. */\n parent: Node<unknown>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRootProps extends HTMLAttributes<HTMLElement> {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** A set of keys for items that should always be persisted in the DOM. */\n persistedKeys?: Set<Key> | null,\n /** A ref to the scroll container for the collection. */\n scrollRef?: RefObject<HTMLElement | null>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRenderer {\n /** Whether this is a virtualized collection. */\n isVirtualized?: boolean,\n /** A delegate object that provides layout information for items in the collection. */\n layoutDelegate?: LayoutDelegate,\n /** A delegate object that provides drop targets for pointer coordinates within the collection. */\n dropTargetDelegate?: DropTargetDelegate,\n /** A component that renders the root collection items. */\n CollectionRoot: React.ComponentType<CollectionRootProps>,\n /** A component that renders the child collection items. */\n CollectionBranch: React.ComponentType<CollectionBranchProps>\n}\n\nexport const DefaultCollectionRenderer: CollectionRenderer = {\n CollectionRoot({collection, renderDropIndicator}) {\n return useCollectionRender(collection, null, renderDropIndicator);\n },\n CollectionBranch({collection, parent, renderDropIndicator}) {\n return useCollectionRender(collection, parent, renderDropIndicator);\n }\n};\n\nfunction useCollectionRender(\n collection: ICollection<Node<unknown>>,\n parent: Node<unknown> | null,\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n) {\n return useCachedChildren({\n items: parent ? collection.getChildren!(parent.key) : collection,\n dependencies: [renderDropIndicator],\n children(node) {\n let rendered = node.render!(node);\n if (!renderDropIndicator || node.type !== 'item') {\n return rendered;\n }\n\n return (\n <>\n {renderDropIndicator({type: 'item', key: node.key, dropPosition: 'before'})}\n {rendered}\n {renderAfterDropIndicators(collection, node, renderDropIndicator)}\n </>\n );\n }\n });\n}\n\nexport function renderAfterDropIndicators(collection: ICollection<Node<unknown>>, node: Node<unknown>, renderDropIndicator: (target: ItemDropTarget) => ReactNode): ReactNode {\n let key = node.key;\n let keyAfter = collection.getKeyAfter(key);\n let nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;\n while (nextItemInFlattenedCollection != null && nextItemInFlattenedCollection.type !== 'item') {\n keyAfter = collection.getKeyAfter(nextItemInFlattenedCollection.key);\n nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;\n }\n\n let nextItemInSameLevel = node.nextKey != null ? collection.getItem(node.nextKey) : null;\n while (nextItemInSameLevel != null && nextItemInSameLevel.type !== 'item') {\n nextItemInSameLevel = nextItemInSameLevel.nextKey != null ? collection.getItem(nextItemInSameLevel.nextKey) : null;\n }\n\n // Render one or more \"after\" drop indicators when the next item in the flattened collection\n // has a smaller level, is not an item, or there are no more items in the collection.\n // Otherwise, the \"after\" position is equivalent to the next item's \"before\" position.\n let afterIndicators: ReactNode[] = [];\n if (nextItemInSameLevel == null) {\n let current: Node<unknown> | null = node;\n while (current && (!nextItemInFlattenedCollection || (current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level))) {\n let indicator = renderDropIndicator({\n type: 'item',\n key: current.key,\n dropPosition: 'after'\n });\n if (isValidElement(indicator)) {\n afterIndicators.push(cloneElement(indicator, {key: `${current.key}-after`}));\n }\n current = current.parentKey != null ? collection.getItem(current.parentKey) : null;\n }\n }\n\n return afterIndicators;\n}\n\nexport const CollectionRendererContext = createContext<CollectionRenderer>(DefaultCollectionRenderer);\n\ntype PersistedKeysReturnValue = Set<Key> | null;\nexport function usePersistedKeys(focusedKey: Key | null): PersistedKeysReturnValue {\n return useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\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* Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {CollectionBase, DropTargetDelegate, GlobalDOMAttributes, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared';\nimport {createBranchComponent, useCachedChildren} from '@react-aria/collections';\nimport {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately';\nimport React, {cloneElement, createContext, ForwardedRef, HTMLAttributes, isValidElement, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react';\nimport {StyleProps} from './utils';\n\nexport interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\nexport interface ItemRenderProps {\n /**\n * Whether the item is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the item is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the item is currently selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the item is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the item is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may\n * not be focused. Dependent on `disabledKeys` and `disabledBehavior`.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * The type of selection that is allowed in the collection.\n * @selector [data-selection-mode=\"single | multiple\"]\n */\n selectionMode: SelectionMode,\n /** The selection behavior for the collection. */\n selectionBehavior: SelectionBehavior,\n /**\n * Whether the item allows dragging.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-allows-dragging]\n */\n allowsDragging?: boolean,\n /**\n * Whether the item is currently being dragged.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-dragging]\n */\n isDragging?: boolean,\n /**\n * Whether the item is currently an active drop target.\n * @note This property is only available in collection components that support drag and drop.\n * @selector [data-drop-target]\n */\n isDropTarget?: boolean\n}\n\nexport interface SectionProps<T> extends Omit<SharedSectionProps<T>, 'children' | 'title'>, StyleProps, GlobalDOMAttributes<HTMLElement> {\n /** The unique id of the section. */\n id?: Key,\n /** The object value that this section represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** Static child items or a function to render children. */\n children?: ReactNode | ((item: T) => ReactElement),\n /** Values that should invalidate the item cache when using dynamic collections. */\n dependencies?: ReadonlyArray<any>\n}\n\ninterface SectionContextValue {\n name: string,\n render: (props: SectionProps<any>, ref: ForwardedRef<HTMLElement>, section: Node<any>, className?: string) => ReactElement\n}\n\nexport const SectionContext = createContext<SectionContextValue | null>(null);\n\n/** @deprecated */\nexport const Section = /*#__PURE__*/ createBranchComponent('section', <T extends object>(props: SectionProps<T>, ref: ForwardedRef<HTMLElement>, section: Node<T>): JSX.Element => {\n let {name, render} = useContext(SectionContext)!;\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`<Section> is deprecated. Please use <${name}> instead.`);\n }\n return render(props, ref, section, 'react-aria-Section');\n});\n\nexport interface CollectionBranchProps {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** The parent node of the items to render. */\n parent: Node<unknown>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRootProps extends HTMLAttributes<HTMLElement> {\n /** The collection of items to render. */\n collection: ICollection<Node<unknown>>,\n /** A set of keys for items that should always be persisted in the DOM. */\n persistedKeys?: Set<Key> | null,\n /** A ref to the scroll container for the collection. */\n scrollRef?: RefObject<HTMLElement | null>,\n /** A function that renders a drop indicator between items. */\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n}\n\nexport interface CollectionRenderer {\n /** Whether this is a virtualized collection. */\n isVirtualized?: boolean,\n /** A delegate object that provides layout information for items in the collection. */\n layoutDelegate?: LayoutDelegate,\n /** A delegate object that provides drop targets for pointer coordinates within the collection. */\n dropTargetDelegate?: DropTargetDelegate,\n /** A component that renders the root collection items. */\n CollectionRoot: React.ComponentType<CollectionRootProps>,\n /** A component that renders the child collection items. */\n CollectionBranch: React.ComponentType<CollectionBranchProps>\n}\n\nexport const DefaultCollectionRenderer: CollectionRenderer = {\n CollectionRoot({collection, renderDropIndicator}) {\n return useCollectionRender(collection, null, renderDropIndicator);\n },\n CollectionBranch({collection, parent, renderDropIndicator}) {\n return useCollectionRender(collection, parent, renderDropIndicator);\n }\n};\n\nfunction useCollectionRender(\n collection: ICollection<Node<unknown>>,\n parent: Node<unknown> | null,\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode\n) {\n return useCachedChildren({\n items: parent ? collection.getChildren!(parent.key) : collection,\n dependencies: [renderDropIndicator],\n children(node) {\n let rendered = node.render!(node);\n if (!renderDropIndicator || node.type !== 'item') {\n return rendered;\n }\n\n return (\n <>\n {renderDropIndicator({type: 'item', key: node.key, dropPosition: 'before'})}\n {rendered}\n {renderAfterDropIndicators(collection, node, renderDropIndicator)}\n </>\n );\n }\n });\n}\n\nexport function renderAfterDropIndicators(collection: ICollection<Node<unknown>>, node: Node<unknown>, renderDropIndicator: (target: ItemDropTarget) => ReactNode): ReactNode {\n let key = node.key;\n let keyAfter = collection.getKeyAfter(key);\n let nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;\n while (nextItemInFlattenedCollection != null && nextItemInFlattenedCollection.type !== 'item') {\n keyAfter = collection.getKeyAfter(nextItemInFlattenedCollection.key);\n nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;\n }\n\n let nextItemInSameLevel = node.nextKey != null ? collection.getItem(node.nextKey) : null;\n while (nextItemInSameLevel != null && nextItemInSameLevel.type !== 'item') {\n nextItemInSameLevel = nextItemInSameLevel.nextKey != null ? collection.getItem(nextItemInSameLevel.nextKey) : null;\n }\n\n // Render one or more \"after\" drop indicators when the next item in the flattened collection\n // has a smaller level, is not an item, or there are no more items in the collection.\n // Otherwise, the \"after\" position is equivalent to the next item's \"before\" position.\n let afterIndicators: ReactNode[] = [];\n if (nextItemInSameLevel == null) {\n let current: Node<unknown> | null = node;\n while (current?.type === 'item' && (!nextItemInFlattenedCollection || (current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level))) {\n let indicator = renderDropIndicator({\n type: 'item',\n key: current.key,\n dropPosition: 'after'\n });\n if (isValidElement(indicator)) {\n afterIndicators.push(cloneElement(indicator, {key: `${current.key}-after`}));\n }\n current = current.parentKey != null ? collection.getItem(current.parentKey) : null;\n }\n }\n\n return afterIndicators;\n}\n\nexport const CollectionRendererContext = createContext<CollectionRenderer>(DefaultCollectionRenderer);\n\ntype PersistedKeysReturnValue = Set<Key> | null;\nexport function usePersistedKeys(focusedKey: Key | null): PersistedKeysReturnValue {\n return useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n}\n"],"names":[],"version":3,"file":"Collection.module.js.map"}
@@ -1,6 +1,6 @@
1
+ var $c5ccf687772c0422$exports = require("./utils.main.js");
1
2
  var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
3
  var $9775047c98afa2ef$exports = require("./ColorThumb.main.js");
3
- var $c5ccf687772c0422$exports = require("./utils.main.js");
4
4
  var $hLuah$reactaria = require("react-aria");
5
5
  var $hLuah$reactstately = require("react-stately");
6
6
  var $hLuah$reactariautils = require("@react-aria/utils");
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,yDAAwB,CAAA,GAAA,0BAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,0CAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,qCAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,6BAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,gBAAgB,YAAY;QACrD,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...mergeProps(DOMProps, colorAreaProps, renderProps)}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,yDAAwB,CAAA,GAAA,0BAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,0CAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,qCAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,6BAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,gBAAgB,YAAY;QACrD,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, 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-ColorArea'\n */\n className?: ClassNameOrFunction<ColorAreaRenderProps>\n}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...mergeProps(DOMProps, colorAreaProps, renderProps)}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.main.js.map"}
@@ -1,6 +1,6 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
1
2
  import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed} from "./RSPContexts.mjs";
2
3
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.mjs";
3
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
4
4
  import {useColorArea as $xv8AM$useColorArea} from "react-aria";
5
5
  import {useColorAreaState as $xv8AM$useColorAreaState} from "react-stately";
6
6
  import {filterDOMProps as $xv8AM$filterDOMProps, mergeProps as $xv8AM$mergeProps} from "@react-aria/utils";
@@ -1,6 +1,6 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
1
2
  import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed} from "./RSPContexts.module.js";
2
3
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.module.js";
3
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
4
4
  import {useColorArea as $xv8AM$useColorArea} from "react-aria";
5
5
  import {useColorAreaState as $xv8AM$useColorAreaState} from "react-stately";
6
6
  import {filterDOMProps as $xv8AM$filterDOMProps, mergeProps as $xv8AM$mergeProps} from "@react-aria/utils";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAuBO,MAAM,yDAAwB,CAAA,GAAA,oBAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,mBAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,gBAAgB,YAAY;QACrD,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...mergeProps(DOMProps, colorAreaProps, renderProps)}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAoCO,MAAM,yDAAwB,CAAA,GAAA,oBAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,mBAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,gBAAgB,YAAY;QACrD,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, 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-ColorArea'\n */\n className?: ClassNameOrFunction<ColorAreaRenderProps>\n}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...mergeProps(DOMProps, colorAreaProps, renderProps)}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.module.js.map"}
@@ -1,9 +1,9 @@
1
+ var $c5ccf687772c0422$exports = require("./utils.main.js");
1
2
  var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
3
  var $846a838139f2ac6b$exports = require("./FieldError.main.js");
3
4
  var $dcae72abc18c0045$exports = require("./Group.main.js");
4
5
  var $1bcfcef5af644e13$exports = require("./Input.main.js");
5
6
  var $84ae0bf5bd8e2a5f$exports = require("./Label.main.js");
6
- var $c5ccf687772c0422$exports = require("./utils.main.js");
7
7
  var $a8a589c28affdc40$exports = require("./Text.main.js");
8
8
  var $jBBea$reactaria = require("react-aria");
9
9
  var $jBBea$reactstately = require("react-stately");
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAkDM,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,CAAA,GAAA,2CAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,0DAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,0DAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AA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C;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAiEM,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,CAAA,GAAA,2CAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,0DAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,0DAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,6CAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,qCAAmB,EAAE;QACvB,GAAG,CAAA,GAAA,8CAAmB,EAAE,MAAM;eAC9B;QACA,oBAAoB,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B;IAClD,GAAG,OAAO;IAEV,qBACE,sHACG,kCACC,OACA,OACA,MAAM,YAAY,EAClB,YACA,UACA,YACA,UACA,kBACA,mBACA,aAED,MAAM,IAAI,kBAAI,0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AAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,MAAM;oBAAgB,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YAC9G;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;aAAW;SAChC;qBACD,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, 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-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.main.js.map"}
@@ -1,9 +1,9 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
1
2
  import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.mjs";
2
3
  import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.mjs";
3
4
  import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.mjs";
4
5
  import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.mjs";
5
6
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.mjs";
6
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
7
7
  import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.mjs";
8
8
  import {useLocale as $kjuGe$useLocale, useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "react-aria";
9
9
  import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "react-stately";
@@ -1,9 +1,9 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
1
2
  import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.module.js";
2
3
  import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.module.js";
3
4
  import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.module.js";
4
5
  import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.module.js";
5
6
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
6
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
7
7
  import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.module.js";
8
8
  import {useLocale as $kjuGe$useLocale, useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "react-aria";
9
9
  import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "react-stately";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAkDM,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,CAAA,GAAA,yCAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,gCAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,gCAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,2BAAmB,EAAE;QACvB,GAAG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B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,SAAS,MAAM,OAAO,IAAI;YAC1B,YAAY,MAAM,UAAU,IAAI;YAChC,WAAW,WAAW,SAAS,IAAI;QACrC;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;gBAAwB;aAAM;YAC/B;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,MAAM;oBAAgB,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YAC9G;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAiEM,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,CAAA,GAAA,yCAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,gCAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,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AChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, 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-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
@@ -1,7 +1,7 @@
1
+ var $c5ccf687772c0422$exports = require("./utils.main.js");
1
2
  var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
3
  var $804cfb3beb27b520$exports = require("./ColorSwatch.main.js");
3
4
  var $4adbbc5a2d33d279$exports = require("./ColorSwatchPicker.main.js");
4
- var $c5ccf687772c0422$exports = require("./utils.main.js");
5
5
  var $lvYpl$reactstately = require("react-stately");
6
6
  var $lvYpl$reactaria = require("react-aria");
7
7
  var $lvYpl$react = require("react");
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAiBM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,2BAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,uCAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,0CAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,kDAAuB;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 {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\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, Pick<RenderProps<ColorPickerRenderProps>, 'children'> {}\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.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,2BAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,uCAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,0CAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,kDAAuB;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, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\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.main.js.map"}
@@ -1,7 +1,7 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
1
2
  import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed, ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b, ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53, ColorWheelContext as $4e85f108e88277b8$export$265015d6dc85bf21} from "./RSPContexts.mjs";
2
3
  import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.mjs";
3
4
  import {ColorSwatchPickerContext as $0bb41941cfe72bd4$export$7214f50881fc1eaf} from "./ColorSwatchPicker.mjs";
4
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
5
5
  import {useColorPickerState as $arEth$useColorPickerState} from "react-stately";
6
6
  import {mergeProps as $arEth$mergeProps} from "react-aria";
7
7
  import $arEth$react, {createContext as $arEth$createContext} from "react";
@@ -1,7 +1,7 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
1
2
  import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed, ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b, ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53, ColorWheelContext as $4e85f108e88277b8$export$265015d6dc85bf21} from "./RSPContexts.module.js";
2
3
  import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.module.js";
3
4
  import {ColorSwatchPickerContext as $0bb41941cfe72bd4$export$7214f50881fc1eaf} from "./ColorSwatchPicker.module.js";
4
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
5
5
  import {useColorPickerState as $arEth$useColorPickerState} from "react-stately";
6
6
  import {mergeProps as $arEth$mergeProps} from "react-aria";
7
7
  import $arEth$react, {createContext as $arEth$createContext} from "react";
@@ -1 +1 @@
1
- {"mappings":";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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 {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\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, Pick<RenderProps<ColorPickerRenderProps>, 'children'> {}\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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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, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\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.module.js.map"}
@@ -1,7 +1,7 @@
1
+ var $c5ccf687772c0422$exports = require("./utils.main.js");
1
2
  var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
3
  var $9775047c98afa2ef$exports = require("./ColorThumb.main.js");
3
4
  var $84ae0bf5bd8e2a5f$exports = require("./Label.main.js");
4
- var $c5ccf687772c0422$exports = require("./utils.main.js");
5
5
  var $b7152ce4839d0838$exports = require("./Slider.main.js");
6
6
  var $cPSMR$reactaria = require("react-aria");
7
7
  var $cPSMR$reactstately = require("react-stately");
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BO,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,CAAA,GAAA,4CAAiB;IAC5D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,uCAAkB,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,+BAAa,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,oCAAa,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;QACE,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, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\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\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 <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.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CO,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,CAAA,GAAA,4CAAiB;IAC5D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,uCAAkB,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,+BAAa,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,oCAAa,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;QACE,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, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\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 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 <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.main.js.map"}
@@ -1,7 +1,7 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
1
2
  import {ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53} from "./RSPContexts.mjs";
2
3
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.mjs";
3
4
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.mjs";
4
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
5
5
  import {SliderOutputContext as $6f909507e6374d18$export$6189c2744041d8f8, SliderStateContext as $6f909507e6374d18$export$1e7083018727fa60, SliderTrackContext as $6f909507e6374d18$export$f1fce0420cc6d8ee} from "./Slider.mjs";
6
6
  import {useLocale as $bYfIo$useLocale, useColorSlider as $bYfIo$useColorSlider} from "react-aria";
7
7
  import {useColorSliderState as $bYfIo$useColorSliderState} from "react-stately";
@@ -1,7 +1,7 @@
1
+ import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
1
2
  import {ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53} from "./RSPContexts.module.js";
2
3
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.module.js";
3
4
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
4
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
5
5
  import {SliderOutputContext as $6f909507e6374d18$export$6189c2744041d8f8, SliderStateContext as $6f909507e6374d18$export$1e7083018727fa60, SliderTrackContext as $6f909507e6374d18$export$f1fce0420cc6d8ee} from "./Slider.module.js";
6
6
  import {useLocale as $bYfIo$useLocale, useColorSlider as $bYfIo$useColorSlider} from "react-aria";
7
7
  import {useColorSliderState as $bYfIo$useColorSliderState} from "react-stately";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AA8BO,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,CAAA,GAAA,yCAAiB;IAC5D,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;QACE,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, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\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\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 <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.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AA4CO,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,CAAA,GAAA,yCAAiB;IAC5D,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;QACE,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, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\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 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 <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.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAcO,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,+BAAa,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,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,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';\nimport {Color} from 'react-stately';\nimport {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\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\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 <div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AA2BO,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,+BAAa,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,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,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';\nimport {\n ClassNameOrFunction,\n ContextValue,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\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 <div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAcO,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;QACE,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';\nimport {Color} from 'react-stately';\nimport {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\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\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 <div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.module.js.map"}
1
+ {"mappings":";;;;;;;;;AA2BO,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;QACE,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';\nimport {\n ClassNameOrFunction,\n ContextValue,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\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 <div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.module.js.map"}
@@ -1,5 +1,5 @@
1
- var $804cfb3beb27b520$exports = require("./ColorSwatch.main.js");
2
1
  var $c5ccf687772c0422$exports = require("./utils.main.js");
2
+ var $804cfb3beb27b520$exports = require("./ColorSwatch.main.js");
3
3
  var $d72d752ea1c67b9a$exports = require("./intlStrings.main.js");
4
4
  var $a03b42240404b420$exports = require("./ListBox.main.js");
5
5
  var $1ahOz$reactstately = require("react-stately");
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,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,uCAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,4CAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAE1D,qBACE,0DAAC,CAAA,GAAA,iCAAM;QACJ,GAAG,CAAA,GAAA,oCAAa,EAAE,OAAO;YAAC,WAAW;QAAI,EAAE;QAC5C,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,OAAO,MAA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AK,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 {Color, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {composeRenderProps, ContextValue, RenderProps, StyleRenderProps, useContextProps} from './utils';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\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 /** 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 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 <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AAE,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,8BAAS,EAAE,aAAa,WAAW;QAAC;KAAU;IACxG,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;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,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, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\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 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.main.js.map"}
@@ -1,5 +1,5 @@
1
- import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.mjs";
2
1
  import {composeRenderProps as $64fa3d84918910a7$export$c245e6201fed2f75, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.mjs";
2
+ import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.mjs";
3
3
  import $jTaLw$intlStringsmodulejs from "./intlStrings.mjs";
4
4
  import {ListBox as $eed445e0843c11d0$export$41f133550aa26f48, ListBoxItem as $eed445e0843c11d0$export$a11e76429ed99b4} from "./ListBox.mjs";
5
5
  import {useColorPickerState as $jTaLw$useColorPickerState, parseColor as $jTaLw$parseColor} from "react-stately";
@@ -1,5 +1,5 @@
1
- import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.module.js";
2
1
  import {composeRenderProps as $64fa3d84918910a7$export$c245e6201fed2f75, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.module.js";
2
+ import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.module.js";
3
3
  import $jTaLw$intlStringsmodulejs from "./intlStrings.module.js";
4
4
  import {ListBox as $eed445e0843c11d0$export$41f133550aa26f48, ListBoxItem as $eed445e0843c11d0$export$a11e76429ed99b4} from "./ListBox.module.js";
5
5
  import {useColorPickerState as $jTaLw$useColorPickerState, parseColor as $jTaLw$parseColor} from "react-stately";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBO,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,0BAA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;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,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 {Color, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {composeRenderProps, ContextValue, RenderProps, StyleRenderProps, useContextProps} from './utils';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\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 /** 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 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.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCO,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,oDAAW,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,c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ources":["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, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\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 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.module.js.map"}