react-aria-components 1.10.0 → 1.11.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 (302) hide show
  1. package/dist/Breadcrumbs.main.js +9 -2
  2. package/dist/Breadcrumbs.main.js.map +1 -1
  3. package/dist/Breadcrumbs.mjs +10 -3
  4. package/dist/Breadcrumbs.module.js +10 -3
  5. package/dist/Breadcrumbs.module.js.map +1 -1
  6. package/dist/Button.main.js +7 -17
  7. package/dist/Button.main.js.map +1 -1
  8. package/dist/Button.mjs +7 -17
  9. package/dist/Button.module.js +7 -17
  10. package/dist/Button.module.js.map +1 -1
  11. package/dist/Calendar.main.js +36 -14
  12. package/dist/Calendar.main.js.map +1 -1
  13. package/dist/Calendar.mjs +38 -16
  14. package/dist/Calendar.module.js +38 -16
  15. package/dist/Calendar.module.js.map +1 -1
  16. package/dist/Checkbox.main.js +8 -3
  17. package/dist/Checkbox.main.js.map +1 -1
  18. package/dist/Checkbox.mjs +10 -5
  19. package/dist/Checkbox.module.js +10 -5
  20. package/dist/Checkbox.module.js.map +1 -1
  21. package/dist/Collection.main.js.map +1 -1
  22. package/dist/Collection.module.js.map +1 -1
  23. package/dist/ColorArea.main.js +4 -4
  24. package/dist/ColorArea.main.js.map +1 -1
  25. package/dist/ColorArea.mjs +5 -5
  26. package/dist/ColorArea.module.js +5 -5
  27. package/dist/ColorArea.module.js.map +1 -1
  28. package/dist/ColorField.main.js +14 -1
  29. package/dist/ColorField.main.js.map +1 -1
  30. package/dist/ColorField.mjs +14 -1
  31. package/dist/ColorField.module.js +14 -1
  32. package/dist/ColorField.module.js.map +1 -1
  33. package/dist/ColorSlider.main.js +3 -1
  34. package/dist/ColorSlider.main.js.map +1 -1
  35. package/dist/ColorSlider.mjs +3 -1
  36. package/dist/ColorSlider.module.js +3 -1
  37. package/dist/ColorSlider.module.js.map +1 -1
  38. package/dist/ColorSwatch.main.js +6 -2
  39. package/dist/ColorSwatch.main.js.map +1 -1
  40. package/dist/ColorSwatch.mjs +6 -2
  41. package/dist/ColorSwatch.module.js +6 -2
  42. package/dist/ColorSwatch.module.js.map +1 -1
  43. package/dist/ColorSwatchPicker.main.js.map +1 -1
  44. package/dist/ColorSwatchPicker.module.js.map +1 -1
  45. package/dist/ColorThumb.main.js +3 -1
  46. package/dist/ColorThumb.main.js.map +1 -1
  47. package/dist/ColorThumb.mjs +3 -1
  48. package/dist/ColorThumb.module.js +3 -1
  49. package/dist/ColorThumb.module.js.map +1 -1
  50. package/dist/ColorWheel.main.js +3 -1
  51. package/dist/ColorWheel.main.js.map +1 -1
  52. package/dist/ColorWheel.mjs +3 -1
  53. package/dist/ColorWheel.module.js +3 -1
  54. package/dist/ColorWheel.module.js.map +1 -1
  55. package/dist/ComboBox.main.js +4 -1
  56. package/dist/ComboBox.main.js.map +1 -1
  57. package/dist/ComboBox.mjs +4 -1
  58. package/dist/ComboBox.module.js +4 -1
  59. package/dist/ComboBox.module.js.map +1 -1
  60. package/dist/DateField.main.js +16 -3
  61. package/dist/DateField.main.js.map +1 -1
  62. package/dist/DateField.mjs +16 -3
  63. package/dist/DateField.module.js +16 -3
  64. package/dist/DateField.module.js.map +1 -1
  65. package/dist/DatePicker.main.js +15 -8
  66. package/dist/DatePicker.main.js.map +1 -1
  67. package/dist/DatePicker.mjs +16 -9
  68. package/dist/DatePicker.module.js +16 -9
  69. package/dist/DatePicker.module.js.map +1 -1
  70. package/dist/Dialog.main.js +4 -3
  71. package/dist/Dialog.main.js.map +1 -1
  72. package/dist/Dialog.mjs +5 -4
  73. package/dist/Dialog.module.js +5 -4
  74. package/dist/Dialog.module.js.map +1 -1
  75. package/dist/Disclosure.main.js +12 -10
  76. package/dist/Disclosure.main.js.map +1 -1
  77. package/dist/Disclosure.mjs +13 -11
  78. package/dist/Disclosure.module.js +13 -11
  79. package/dist/Disclosure.module.js.map +1 -1
  80. package/dist/DragAndDrop.main.js +31 -3
  81. package/dist/DragAndDrop.main.js.map +1 -1
  82. package/dist/DragAndDrop.mjs +31 -3
  83. package/dist/DragAndDrop.module.js +31 -3
  84. package/dist/DragAndDrop.module.js.map +1 -1
  85. package/dist/DropZone.main.js +4 -3
  86. package/dist/DropZone.main.js.map +1 -1
  87. package/dist/DropZone.mjs +4 -3
  88. package/dist/DropZone.module.js +4 -3
  89. package/dist/DropZone.module.js.map +1 -1
  90. package/dist/FieldError.main.js +3 -1
  91. package/dist/FieldError.main.js.map +1 -1
  92. package/dist/FieldError.mjs +3 -1
  93. package/dist/FieldError.module.js +3 -1
  94. package/dist/FieldError.module.js.map +1 -1
  95. package/dist/FileTrigger.main.js +3 -1
  96. package/dist/FileTrigger.main.js.map +1 -1
  97. package/dist/FileTrigger.mjs +3 -1
  98. package/dist/FileTrigger.module.js +3 -1
  99. package/dist/FileTrigger.module.js.map +1 -1
  100. package/dist/Form.main.js.map +1 -1
  101. package/dist/Form.module.js.map +1 -1
  102. package/dist/GridList.main.js +20 -13
  103. package/dist/GridList.main.js.map +1 -1
  104. package/dist/GridList.mjs +21 -14
  105. package/dist/GridList.module.js +21 -14
  106. package/dist/GridList.module.js.map +1 -1
  107. package/dist/HiddenDateInput.main.js +118 -0
  108. package/dist/HiddenDateInput.main.js.map +1 -0
  109. package/dist/HiddenDateInput.mjs +109 -0
  110. package/dist/HiddenDateInput.module.js +109 -0
  111. package/dist/HiddenDateInput.module.js.map +1 -0
  112. package/dist/Link.main.js +7 -1
  113. package/dist/Link.main.js.map +1 -1
  114. package/dist/Link.mjs +7 -1
  115. package/dist/Link.module.js +7 -1
  116. package/dist/Link.module.js.map +1 -1
  117. package/dist/ListBox.main.js +22 -19
  118. package/dist/ListBox.main.js.map +1 -1
  119. package/dist/ListBox.mjs +23 -20
  120. package/dist/ListBox.module.js +23 -20
  121. package/dist/ListBox.module.js.map +1 -1
  122. package/dist/Menu.main.js +15 -8
  123. package/dist/Menu.main.js.map +1 -1
  124. package/dist/Menu.mjs +16 -9
  125. package/dist/Menu.module.js +16 -9
  126. package/dist/Menu.module.js.map +1 -1
  127. package/dist/Meter.main.js +6 -2
  128. package/dist/Meter.main.js.map +1 -1
  129. package/dist/Meter.mjs +6 -2
  130. package/dist/Meter.module.js +6 -2
  131. package/dist/Meter.module.js.map +1 -1
  132. package/dist/Modal.main.js +31 -6
  133. package/dist/Modal.main.js.map +1 -1
  134. package/dist/Modal.mjs +31 -6
  135. package/dist/Modal.module.js +31 -6
  136. package/dist/Modal.module.js.map +1 -1
  137. package/dist/NumberField.main.js +4 -1
  138. package/dist/NumberField.main.js.map +1 -1
  139. package/dist/NumberField.mjs +4 -1
  140. package/dist/NumberField.module.js +4 -1
  141. package/dist/NumberField.module.js.map +1 -1
  142. package/dist/Popover.main.js +3 -1
  143. package/dist/Popover.main.js.map +1 -1
  144. package/dist/Popover.mjs +3 -1
  145. package/dist/Popover.module.js +3 -1
  146. package/dist/Popover.module.js.map +1 -1
  147. package/dist/ProgressBar.main.js +6 -2
  148. package/dist/ProgressBar.main.js.map +1 -1
  149. package/dist/ProgressBar.mjs +6 -2
  150. package/dist/ProgressBar.module.js +6 -2
  151. package/dist/ProgressBar.module.js.map +1 -1
  152. package/dist/RadioGroup.main.js +8 -3
  153. package/dist/RadioGroup.main.js.map +1 -1
  154. package/dist/RadioGroup.mjs +9 -4
  155. package/dist/RadioGroup.module.js +9 -4
  156. package/dist/RadioGroup.module.js.map +1 -1
  157. package/dist/SearchField.main.js +3 -1
  158. package/dist/SearchField.main.js.map +1 -1
  159. package/dist/SearchField.mjs +3 -1
  160. package/dist/SearchField.module.js +3 -1
  161. package/dist/SearchField.module.js.map +1 -1
  162. package/dist/Select.main.js +12 -14
  163. package/dist/Select.main.js.map +1 -1
  164. package/dist/Select.mjs +13 -15
  165. package/dist/Select.module.js +13 -15
  166. package/dist/Select.module.js.map +1 -1
  167. package/dist/Separator.main.js +4 -2
  168. package/dist/Separator.main.js.map +1 -1
  169. package/dist/Separator.mjs +5 -3
  170. package/dist/Separator.module.js +5 -3
  171. package/dist/Separator.module.js.map +1 -1
  172. package/dist/Slider.main.js +7 -5
  173. package/dist/Slider.main.js.map +1 -1
  174. package/dist/Slider.mjs +8 -6
  175. package/dist/Slider.module.js +8 -6
  176. package/dist/Slider.module.js.map +1 -1
  177. package/dist/Switch.main.js +4 -1
  178. package/dist/Switch.main.js.map +1 -1
  179. package/dist/Switch.mjs +4 -1
  180. package/dist/Switch.module.js +4 -1
  181. package/dist/Switch.module.js.map +1 -1
  182. package/dist/Table.main.js +47 -26
  183. package/dist/Table.main.js.map +1 -1
  184. package/dist/Table.mjs +48 -27
  185. package/dist/Table.module.js +48 -27
  186. package/dist/Table.module.js.map +1 -1
  187. package/dist/Tabs.main.js +22 -11
  188. package/dist/Tabs.main.js.map +1 -1
  189. package/dist/Tabs.mjs +23 -12
  190. package/dist/Tabs.module.js +23 -12
  191. package/dist/Tabs.module.js.map +1 -1
  192. package/dist/TagGroup.main.js +14 -8
  193. package/dist/TagGroup.main.js.map +1 -1
  194. package/dist/TagGroup.mjs +14 -8
  195. package/dist/TagGroup.module.js +14 -8
  196. package/dist/TagGroup.module.js.map +1 -1
  197. package/dist/TextField.main.js +13 -1
  198. package/dist/TextField.main.js.map +1 -1
  199. package/dist/TextField.mjs +13 -1
  200. package/dist/TextField.module.js +13 -1
  201. package/dist/TextField.module.js.map +1 -1
  202. package/dist/Toast.main.js +9 -5
  203. package/dist/Toast.main.js.map +1 -1
  204. package/dist/Toast.mjs +9 -5
  205. package/dist/Toast.module.js +9 -5
  206. package/dist/Toast.module.js.map +1 -1
  207. package/dist/ToggleButton.main.js +8 -2
  208. package/dist/ToggleButton.main.js.map +1 -1
  209. package/dist/ToggleButton.mjs +8 -2
  210. package/dist/ToggleButton.module.js +8 -2
  211. package/dist/ToggleButton.module.js.map +1 -1
  212. package/dist/ToggleButtonGroup.main.js +6 -2
  213. package/dist/ToggleButtonGroup.main.js.map +1 -1
  214. package/dist/ToggleButtonGroup.mjs +6 -2
  215. package/dist/ToggleButtonGroup.module.js +6 -2
  216. package/dist/ToggleButtonGroup.module.js.map +1 -1
  217. package/dist/Toolbar.main.js +4 -3
  218. package/dist/Toolbar.main.js.map +1 -1
  219. package/dist/Toolbar.mjs +4 -3
  220. package/dist/Toolbar.module.js +4 -3
  221. package/dist/Toolbar.module.js.map +1 -1
  222. package/dist/Tooltip.main.js +5 -3
  223. package/dist/Tooltip.main.js.map +1 -1
  224. package/dist/Tooltip.mjs +5 -3
  225. package/dist/Tooltip.module.js +5 -3
  226. package/dist/Tooltip.module.js.map +1 -1
  227. package/dist/Tree.main.js +73 -26
  228. package/dist/Tree.main.js.map +1 -1
  229. package/dist/Tree.mjs +74 -27
  230. package/dist/Tree.module.js +74 -27
  231. package/dist/Tree.module.js.map +1 -1
  232. package/dist/TreeDropTargetDelegate.main.js +8 -5
  233. package/dist/TreeDropTargetDelegate.main.js.map +1 -1
  234. package/dist/TreeDropTargetDelegate.mjs +8 -5
  235. package/dist/TreeDropTargetDelegate.module.js +8 -5
  236. package/dist/TreeDropTargetDelegate.module.js.map +1 -1
  237. package/dist/import.mjs +5 -5
  238. package/dist/main.js +4 -4
  239. package/dist/main.js.map +1 -1
  240. package/dist/module.js +5 -5
  241. package/dist/module.js.map +1 -1
  242. package/dist/types.d.ts +212 -203
  243. package/dist/types.d.ts.map +1 -1
  244. package/dist/useDragAndDrop.main.js.map +1 -1
  245. package/dist/useDragAndDrop.module.js.map +1 -1
  246. package/dist/utils.main.js.map +1 -1
  247. package/dist/utils.module.js.map +1 -1
  248. package/i18n/de-DE.js +1 -1
  249. package/i18n/de-DE.mjs +1 -1
  250. package/package.json +25 -25
  251. package/src/Breadcrumbs.tsx +10 -6
  252. package/src/Button.tsx +8 -30
  253. package/src/Calendar.tsx +41 -24
  254. package/src/Checkbox.tsx +8 -6
  255. package/src/Collection.tsx +2 -2
  256. package/src/ColorArea.tsx +5 -6
  257. package/src/ColorField.tsx +6 -4
  258. package/src/ColorSlider.tsx +3 -2
  259. package/src/ColorSwatch.tsx +6 -3
  260. package/src/ColorSwatchPicker.tsx +3 -3
  261. package/src/ColorThumb.tsx +3 -3
  262. package/src/ColorWheel.tsx +6 -5
  263. package/src/ComboBox.tsx +4 -4
  264. package/src/DateField.tsx +15 -10
  265. package/src/DatePicker.tsx +14 -12
  266. package/src/Dialog.tsx +6 -6
  267. package/src/Disclosure.tsx +10 -14
  268. package/src/DragAndDrop.tsx +31 -1
  269. package/src/DropZone.tsx +4 -5
  270. package/src/FieldError.tsx +3 -3
  271. package/src/FileTrigger.tsx +4 -3
  272. package/src/Form.tsx +2 -1
  273. package/src/GridList.tsx +25 -18
  274. package/src/HiddenDateInput.tsx +142 -0
  275. package/src/Link.tsx +7 -3
  276. package/src/ListBox.tsx +30 -26
  277. package/src/Menu.tsx +15 -12
  278. package/src/Meter.tsx +6 -3
  279. package/src/Modal.tsx +16 -5
  280. package/src/NumberField.tsx +4 -4
  281. package/src/Popover.tsx +3 -3
  282. package/src/ProgressBar.tsx +6 -2
  283. package/src/RadioGroup.tsx +8 -6
  284. package/src/SearchField.tsx +3 -2
  285. package/src/Select.tsx +13 -16
  286. package/src/Separator.tsx +6 -4
  287. package/src/Slider.tsx +9 -11
  288. package/src/Switch.tsx +4 -3
  289. package/src/Table.tsx +58 -56
  290. package/src/Tabs.tsx +20 -16
  291. package/src/TagGroup.tsx +13 -12
  292. package/src/TextField.tsx +5 -2
  293. package/src/Toast.tsx +10 -8
  294. package/src/ToggleButton.tsx +8 -4
  295. package/src/ToggleButtonGroup.tsx +6 -4
  296. package/src/Toolbar.tsx +4 -5
  297. package/src/Tooltip.tsx +6 -5
  298. package/src/Tree.tsx +90 -42
  299. package/src/TreeDropTargetDelegate.ts +5 -1
  300. package/src/index.ts +8 -8
  301. package/src/useDragAndDrop.tsx +2 -2
  302. package/src/utils.tsx +9 -9
@@ -1,5 +1,6 @@
1
1
  import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.module.js";
2
2
  import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.module.js";
3
+ import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.module.js";
3
4
  import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input.module.js";
4
5
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
5
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";
@@ -29,6 +30,7 @@ import $kjuGe$react, {createContext as $kjuGe$createContext, forwardRef as $kjuG
29
30
 
30
31
 
31
32
 
33
+
32
34
  const $3ada01a82feafb94$export$96b6d32b05a1a8ed = /*#__PURE__*/ (0, $kjuGe$createContext)(null);
33
35
  const $3ada01a82feafb94$export$b865d4358897bb17 = /*#__PURE__*/ (0, $kjuGe$forwardRef)(function ColorField(props, ref) {
34
36
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, (0, $4e85f108e88277b8$export$44644b8a16031b5b));
@@ -59,6 +61,7 @@ function $3ada01a82feafb94$var$ColorChannelField(props) {
59
61
  return /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $kjuGe$react).Fragment, null, $3ada01a82feafb94$var$useChildren(props, state, props.forwardedRef, inputProps, inputRef, labelProps, labelRef, descriptionProps, errorMessageProps, validation), props.name && /*#__PURE__*/ (0, $kjuGe$react).createElement("input", {
60
62
  type: "hidden",
61
63
  name: props.name,
64
+ form: props.form,
62
65
  value: isNaN(state.numberValue) ? '' : state.numberValue
63
66
  }));
64
67
  }
@@ -89,7 +92,9 @@ function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputR
89
92
  },
90
93
  defaultClassName: 'react-aria-ColorField'
91
94
  });
92
- let DOMProps = (0, $kjuGe$filterDOMProps)(props);
95
+ let DOMProps = (0, $kjuGe$filterDOMProps)(props, {
96
+ global: true
97
+ });
93
98
  delete DOMProps.id;
94
99
  return /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
95
100
  values: [
@@ -111,6 +116,14 @@ function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputR
111
116
  ref: labelRef
112
117
  }
113
118
  ],
119
+ [
120
+ (0, $a049562f99e7db0e$export$f9c6924e160136d1),
121
+ {
122
+ role: 'presentation',
123
+ isInvalid: validation.isInvalid,
124
+ isDisabled: props.isDisabled || false
125
+ }
126
+ ],
114
127
  [
115
128
  (0, $514c0188e459b4c0$export$9afb8bc826b033ea),
116
129
  {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiDM,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,kBAAk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D,EACjD,QAA+B,EAC/B,gBAA6C,EAC7C,iBAA8C,EAC9C,UAA4B;IAE5B,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/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;IAC9B,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,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 {InputContext} from './Input';\nimport {InputDOMProps, ValidationResult} from '@react-types/shared';\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 {\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} 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);\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 [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;;;;;;;;;;;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,IA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AM,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"}
@@ -54,7 +54,9 @@ const $037f8448dff48149$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $cPSMR$react
54
54
  },
55
55
  defaultClassName: 'react-aria-ColorSlider'
56
56
  });
57
- let DOMProps = (0, $cPSMR$reactariautils.filterDOMProps)(props);
57
+ let DOMProps = (0, $cPSMR$reactariautils.filterDOMProps)(props, {
58
+ global: true
59
+ });
58
60
  delete DOMProps.id;
59
61
  return /*#__PURE__*/ (0, ($parcel$interopDefault($cPSMR$react))).createElement((0, $c5ccf687772c0422$exports.Provider), {
60
62
  values: [
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,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;IAC9B,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 {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 {}\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);\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G;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"}
@@ -43,7 +43,9 @@ const $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $bYfIo$forwa
43
43
  },
44
44
  defaultClassName: 'react-aria-ColorSlider'
45
45
  });
46
- let DOMProps = (0, $bYfIo$filterDOMProps)(props);
46
+ let DOMProps = (0, $bYfIo$filterDOMProps)(props, {
47
+ global: true
48
+ });
47
49
  delete DOMProps.id;
48
50
  return /*#__PURE__*/ (0, $bYfIo$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
49
51
  values: [
@@ -43,7 +43,9 @@ const $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $bYfIo$forwa
43
43
  },
44
44
  defaultClassName: 'react-aria-ColorSlider'
45
45
  });
46
- let DOMProps = (0, $bYfIo$filterDOMProps)(props);
46
+ let DOMProps = (0, $bYfIo$filterDOMProps)(props, {
47
+ global: true
48
+ });
47
49
  delete DOMProps.id;
48
50
  return /*#__PURE__*/ (0, $bYfIo$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
49
51
  values: [
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AA6BO,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;IAC9B,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 {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 {}\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);\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":";;;;;;;;;;;;;;;;;;;AA8BO,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA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,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,5 +1,6 @@
1
1
  var $c5ccf687772c0422$exports = require("./utils.main.js");
2
2
  var $8RzkX$reactaria = require("react-aria");
3
+ var $8RzkX$reactariautils = require("@react-aria/utils");
3
4
  var $8RzkX$react = require("react");
4
5
 
5
6
 
@@ -16,6 +17,7 @@ $parcel$export(module.exports, "ColorSwatch", () => $804cfb3beb27b520$export$cae
16
17
 
17
18
 
18
19
 
20
+
19
21
  const $804cfb3beb27b520$export$83cc445538396800 = /*#__PURE__*/ (0, $8RzkX$react.createContext)(null);
20
22
  const $804cfb3beb27b520$export$cae13e90592f246a = /*#__PURE__*/ (0, $8RzkX$react.forwardRef)(function ColorSwatch(props, ref) {
21
23
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $804cfb3beb27b520$export$83cc445538396800);
@@ -28,9 +30,11 @@ const $804cfb3beb27b520$export$cae13e90592f246a = /*#__PURE__*/ (0, $8RzkX$react
28
30
  color: color
29
31
  }
30
32
  });
33
+ let DOMProps = (0, $8RzkX$reactariautils.filterDOMProps)(props, {
34
+ global: true
35
+ });
31
36
  return /*#__PURE__*/ (0, ($parcel$interopDefault($8RzkX$react))).createElement("div", {
32
- ...colorSwatchProps,
33
- ...renderProps,
37
+ ...(0, $8RzkX$reactariautils.mergeProps)(DOMProps, colorSwatchProps, renderProps),
34
38
  slot: props.slot || undefined,
35
39
  ref: ref
36
40
  });
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAYO,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,qBACE,0DAAC;QACE,GAAG,gBAAgB;QACnB,GAAG,WAAW;QACf,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 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 {}\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 return (\n <div\n {...colorSwatchProps}\n {...renderProps}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.main.js.map"}
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,10 +1,12 @@
1
1
  import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
2
  import {useColorSwatch as $dfXrE$useColorSwatch} from "react-aria";
3
+ import {filterDOMProps as $dfXrE$filterDOMProps, mergeProps as $dfXrE$mergeProps} from "@react-aria/utils";
3
4
  import $dfXrE$react, {createContext as $dfXrE$createContext, forwardRef as $dfXrE$forwardRef} from "react";
4
5
 
5
6
 
6
7
 
7
8
 
9
+
8
10
  const $251c695a52d94a8d$export$83cc445538396800 = /*#__PURE__*/ (0, $dfXrE$createContext)(null);
9
11
  const $251c695a52d94a8d$export$cae13e90592f246a = /*#__PURE__*/ (0, $dfXrE$forwardRef)(function ColorSwatch(props, ref) {
10
12
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $251c695a52d94a8d$export$83cc445538396800);
@@ -17,9 +19,11 @@ const $251c695a52d94a8d$export$cae13e90592f246a = /*#__PURE__*/ (0, $dfXrE$forwa
17
19
  color: color
18
20
  }
19
21
  });
22
+ let DOMProps = (0, $dfXrE$filterDOMProps)(props, {
23
+ global: true
24
+ });
20
25
  return /*#__PURE__*/ (0, $dfXrE$react).createElement("div", {
21
- ...colorSwatchProps,
22
- ...renderProps,
26
+ ...(0, $dfXrE$mergeProps)(DOMProps, colorSwatchProps, renderProps),
23
27
  slot: props.slot || undefined,
24
28
  ref: ref
25
29
  });
@@ -1,10 +1,12 @@
1
1
  import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
2
2
  import {useColorSwatch as $dfXrE$useColorSwatch} from "react-aria";
3
+ import {filterDOMProps as $dfXrE$filterDOMProps, mergeProps as $dfXrE$mergeProps} from "@react-aria/utils";
3
4
  import $dfXrE$react, {createContext as $dfXrE$createContext, forwardRef as $dfXrE$forwardRef} from "react";
4
5
 
5
6
 
6
7
 
7
8
 
9
+
8
10
  const $251c695a52d94a8d$export$83cc445538396800 = /*#__PURE__*/ (0, $dfXrE$createContext)(null);
9
11
  const $251c695a52d94a8d$export$cae13e90592f246a = /*#__PURE__*/ (0, $dfXrE$forwardRef)(function ColorSwatch(props, ref) {
10
12
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $251c695a52d94a8d$export$83cc445538396800);
@@ -17,9 +19,11 @@ const $251c695a52d94a8d$export$cae13e90592f246a = /*#__PURE__*/ (0, $dfXrE$forwa
17
19
  color: color
18
20
  }
19
21
  });
22
+ let DOMProps = (0, $dfXrE$filterDOMProps)(props, {
23
+ global: true
24
+ });
20
25
  return /*#__PURE__*/ (0, $dfXrE$react).createElement("div", {
21
- ...colorSwatchProps,
22
- ...renderProps,
26
+ ...(0, $dfXrE$mergeProps)(DOMProps, colorSwatchProps, renderProps),
23
27
  slot: props.slot || undefined,
24
28
  ref: ref
25
29
  });
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAYO,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,qBACE,gCAAC;QACE,GAAG,gBAAgB;QACnB,GAAG,WAAW;QACf,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 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 {}\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 return (\n <div\n {...colorSwatchProps}\n {...renderProps}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.module.js.map"}
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 +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,MAAM,KAAK;QAClB,cAAY,KAAK,CAAC,aAAa,IAAK,CA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,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, HoverEvents, 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> {\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 {\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
+ {"mappings":";;;;;;;;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W,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 {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.main.js.map"}
@@ -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,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,q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AA,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, HoverEvents, 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> {\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 {\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":";;;;;;;;;;;;;;;;;;;;;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,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,cAAc;YAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;SAAQ;QAC5C,mBAAmB,CAAC;YAClB,yDAAyD;YACzD,IAAI,SAAS,OACX,MAAM,QAAQ,CAAC,SAAS,GAAG,CAAC;mBAAI;aAAK,CAAC,EAAE;QAE5C;QACA,wBAAA;qBACA,gCAAC,sCAAgB,QAAQ;QAAC,OAAO;OAC9B,MAAM,QAAQ;AAIvB;AAcO,MAAM,0DAAwB,CAAA,GAAA,iBAAS,EAAE,SAAS,sBAAsB,KAAiC,EAAE,GAAiC;IACjJ,IAAI,YAAY,MAAM,KAAK,IAAI;IAC/B,IAAI,QAAQ,CAAA,GAAA,cAAM,EAAE,IAAM,OAAO,cAAc,WAAW,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QAAC;KAAU;IACxG,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,QAAQ,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK;QACb,OAAO;YACL,IAAI,MAAM,CAAC;QACb;IACF,GAAG;QAAC;QAAO;KAAI;IAEf,IAAI,OAAO,CAAC;QACV,IAAI,OAAO,MAAM,YACf,OAAO,CAAC,cAAgB,EAAE;gBAAC,GAAG,WAAW;uBAAE;YAAK;QAElD,OAAO;IACT;IAEA,qBACE,gCAAC,CAAA,GAAA,wCAAU;QACR,GAAG,KAAK;QACT,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"}
@@ -39,7 +39,9 @@ const $9775047c98afa2ef$export$a3cc47cee1c1ccc = /*#__PURE__*/ (0, $3jWEE$react.
39
39
  isDisabled: isDisabled
40
40
  }
41
41
  });
42
- let DOMProps = (0, $3jWEE$reactariautils.filterDOMProps)(props);
42
+ let DOMProps = (0, $3jWEE$reactariautils.filterDOMProps)(props, {
43
+ global: true
44
+ });
43
45
  delete DOMProps.id;
44
46
  return /*#__PURE__*/ (0, ($parcel$interopDefault($3jWEE$react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","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {Color} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps, useFocusRing, useHover} from 'react-aria';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps> {}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props as any);\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAyC;AAuCvF,MAAM,yDAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,uBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,6BAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yBAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,0DAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,0DAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {Color} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps, useFocusRing, useHover} from 'react-aria';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, GlobalDOMAttributes<HTMLDivElement> {}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.main.js.map"}
@@ -28,7 +28,9 @@ const $e2b71ec1d6016406$export$a3cc47cee1c1ccc = /*#__PURE__*/ (0, $1Ipl1$forwar
28
28
  isDisabled: isDisabled
29
29
  }
30
30
  });
31
- let DOMProps = (0, $1Ipl1$filterDOMProps)(props);
31
+ let DOMProps = (0, $1Ipl1$filterDOMProps)(props, {
32
+ global: true
33
+ });
32
34
  delete DOMProps.id;
33
35
  return /*#__PURE__*/ (0, $1Ipl1$react).createElement("div", {
34
36
  ...(0, $1Ipl1$mergeProps)(thumbProps, hoverProps, DOMProps),
@@ -28,7 +28,9 @@ const $e2b71ec1d6016406$export$a3cc47cee1c1ccc = /*#__PURE__*/ (0, $1Ipl1$forwar
28
28
  isDisabled: isDisabled
29
29
  }
30
30
  });
31
- let DOMProps = (0, $1Ipl1$filterDOMProps)(props);
31
+ let DOMProps = (0, $1Ipl1$filterDOMProps)(props, {
32
+ global: true
33
+ });
32
34
  delete DOMProps.id;
33
35
  return /*#__PURE__*/ (0, $1Ipl1$react).createElement("div", {
34
36
  ...(0, $1Ipl1$mergeProps)(thumbProps, hoverProps, DOMProps),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAsBO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AAuCvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,iBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {Color} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps, useFocusRing, useHover} from 'react-aria';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps> {}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props as any);\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.module.js.map"}
1
+ {"mappings":";;;;;;;;;AAsBO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AAuCvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,iBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {Color} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared';\nimport {mergeProps, useFocusRing, useHover} from 'react-aria';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, GlobalDOMAttributes<HTMLDivElement> {}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.module.js.map"}
@@ -43,7 +43,9 @@ const $85ae22f3b2559b04$export$f80663f808113381 = /*#__PURE__*/ (0, $k1tmY$react
43
43
  position: 'relative'
44
44
  }
45
45
  });
46
- let DOMProps = (0, $k1tmY$reactariautils.filterDOMProps)(props);
46
+ let DOMProps = (0, $k1tmY$reactariautils.filterDOMProps)(props, {
47
+ global: true
48
+ });
47
49
  delete DOMProps.id;
48
50
  return /*#__PURE__*/ (0, ($parcel$interopDefault($k1tmY$react))).createElement("div", {
49
51
  ...DOMProps,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,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,QAAQ,CAAA,GAAA,sCAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,8BAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;OACA,YAAY,QAAQ;AAI7B;AAMO,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA6D;AAKxG,MAAM,0DAAkB,CAAA,GAAA,uBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,uBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,0DAAC;QACE,GAAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria';\nimport {ColorWheelContext} from './RSPContexts';\nimport {ColorWheelState, useColorWheelState} from 'react-stately';\nimport {ContextValue, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, SlotProps {}\n\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps> {}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, ColorWheelTrackProps {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,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,QAAQ,CAAA,GAAA,sCAAiB,EAAE;IAC/B,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,8BAAY,EAAE,OAAO,OAAO;IAEvE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;QACA,kBAAkB;QAClB,cAAc;YACZ,UAAU;QACZ;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC;gBAAwB;aAAW;YACpC;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;OACA,YAAY,QAAQ;AAI7B;AAMO,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA6D;AAKxG,MAAM,0DAAkB,CAAA,GAAA,uBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,uBAAS,EAAE;IACvB,6DAA6D;IAC7D,IAAI,aAAC,SAAS,SAAE,KAAK,EAAE,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,0DAAC;QACE,GAAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria';\nimport {ColorWheelContext} from './RSPContexts';\nimport {ColorWheelState, useColorWheelState} from 'react-stately';\nimport {ContextValue, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {}\n\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps>, GlobalDOMAttributes<HTMLDivElement> {}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.main.js.map"}
@@ -30,7 +30,9 @@ const $66beab92e74e495f$export$f80663f808113381 = /*#__PURE__*/ (0, $fp8U1$forwa
30
30
  position: 'relative'
31
31
  }
32
32
  });
33
- let DOMProps = (0, $fp8U1$filterDOMProps)(props);
33
+ let DOMProps = (0, $fp8U1$filterDOMProps)(props, {
34
+ global: true
35
+ });
34
36
  delete DOMProps.id;
35
37
  return /*#__PURE__*/ (0, $fp8U1$react).createElement("div", {
36
38
  ...DOMProps,
@@ -30,7 +30,9 @@ const $66beab92e74e495f$export$f80663f808113381 = /*#__PURE__*/ (0, $fp8U1$forwa
30
30
  position: 'relative'
31
31
  }
32
32
  });
33
- let DOMProps = (0, $fp8U1$filterDOMProps)(props);
33
+ let DOMProps = (0, $fp8U1$filterDOMProps)(props, {
34
+ global: true
35
+ });
34
36
  delete DOMProps.id;
35
37
  return /*#__PURE__*/ (0, $fp8U1$react).createElement("div", {
36
38
  ...DOMProps,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAsBO,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,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E,GAAG,MAAK,GAAG;IAElC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,qBACE,gCAAC;QACE,GAAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria';\nimport {ColorWheelContext} from './RSPContexts';\nimport {ColorWheelState, useColorWheelState} from 'react-stately';\nimport {ContextValue, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, SlotProps {}\n\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps> {}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, ColorWheelTrackProps {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAuBO,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,QAAQ,CAAA,GAAA,yBAAiB,EAAE;IAC/B,IAAI,WAAW,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AAG,IAAI;QACP,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;;AAEzC","sources":["packages/react-aria-components/src/ColorWheel.tsx"],"sourcesContent":["import {AriaColorWheelOptions, useColorWheel} from 'react-aria';\nimport {ColorWheelContext} from './RSPContexts';\nimport {ColorWheelState, useColorWheelState} from 'react-stately';\nimport {ContextValue, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, useContext, useRef} from 'react';\n\nexport interface ColorWheelRenderProps {\n /**\n * Whether the color wheel is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color wheel.\n */\n state: ColorWheelState\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, RenderProps<ColorWheelRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {}\n\nexport const ColorWheelStateContext = createContext<ColorWheelState | null>(null);\n\n/**\n * A color wheel allows users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelContext);\n let state = useColorWheelState(props);\n let inputRef = useRef(null);\n let {trackProps, inputProps, thumbProps} = useColorWheel(props, state, inputRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false\n },\n defaultClassName: 'react-aria-ColorWheel',\n defaultStyle: {\n position: 'relative'\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorWheelStateContext, state],\n [ColorWheelTrackContext, trackProps],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\nexport interface ColorWheelTrackRenderProps extends ColorWheelRenderProps {}\nexport interface ColorWheelTrackProps extends StyleRenderProps<ColorWheelTrackRenderProps>, GlobalDOMAttributes<HTMLDivElement> {}\ninterface ColorWheelTrackContextValue extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>, StyleRenderProps<ColorWheelTrackRenderProps> {}\n\nexport const ColorWheelTrackContext = createContext<ContextValue<ColorWheelTrackContextValue, HTMLDivElement>>(null);\n\n/**\n * A color wheel track renders a circular gradient track.\n */\nexport const ColorWheelTrack = forwardRef(function ColorWheelTrack(props: ColorWheelTrackProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorWheelTrackContext);\n let state = useContext(ColorWheelStateContext)!;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {className, style, ...rest} = props;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorWheelTrack',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n return (\n <div\n {...rest}\n {...renderProps}\n ref={ref}\n data-disabled={state.isDisabled || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.module.js.map"}
@@ -165,7 +165,9 @@ function $1d716ce69f118fad$var$ComboBoxInner({ props: props, collection: collect
165
165
  values: renderPropsState,
166
166
  defaultClassName: 'react-aria-ComboBox'
167
167
  });
168
- let DOMProps = (0, $9obPC$reactariautils.filterDOMProps)(props);
168
+ let DOMProps = (0, $9obPC$reactariautils.filterDOMProps)(props, {
169
+ global: true
170
+ });
169
171
  delete DOMProps.id;
170
172
  var _state_selectedKey;
171
173
  return /*#__PURE__*/ (0, ($parcel$interopDefault($9obPC$react))).createElement((0, $c5ccf687772c0422$exports.Provider), {
@@ -260,6 +262,7 @@ function $1d716ce69f118fad$var$ComboBoxInner({ props: props, collection: collect
260
262
  }), name && formValue === 'key' && /*#__PURE__*/ (0, ($parcel$interopDefault($9obPC$react))).createElement("input", {
261
263
  type: "hidden",
262
264
  name: name,
265
+ form: props.form,
263
266
  value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ''
264
267
  }));
265
268
  }