react-aria-components 1.14.0 → 1.15.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 (333) hide show
  1. package/dist/Breadcrumbs.main.js +3 -2
  2. package/dist/Breadcrumbs.main.js.map +1 -1
  3. package/dist/Breadcrumbs.mjs +4 -3
  4. package/dist/Breadcrumbs.module.js +4 -3
  5. package/dist/Breadcrumbs.module.js.map +1 -1
  6. package/dist/Button.main.js +1 -1
  7. package/dist/Button.main.js.map +1 -1
  8. package/dist/Button.mjs +2 -2
  9. package/dist/Button.module.js +2 -2
  10. package/dist/Button.module.js.map +1 -1
  11. package/dist/Calendar.main.js +11 -7
  12. package/dist/Calendar.main.js.map +1 -1
  13. package/dist/Calendar.mjs +12 -8
  14. package/dist/Calendar.module.js +12 -8
  15. package/dist/Calendar.module.js.map +1 -1
  16. package/dist/Checkbox.main.js +2 -2
  17. package/dist/Checkbox.main.js.map +1 -1
  18. package/dist/Checkbox.mjs +3 -3
  19. package/dist/Checkbox.module.js +3 -3
  20. package/dist/Checkbox.module.js.map +1 -1
  21. package/dist/ColorArea.main.js +1 -1
  22. package/dist/ColorArea.main.js.map +1 -1
  23. package/dist/ColorArea.mjs +2 -2
  24. package/dist/ColorArea.module.js +2 -2
  25. package/dist/ColorArea.module.js.map +1 -1
  26. package/dist/ColorField.main.js +7 -3
  27. package/dist/ColorField.main.js.map +1 -1
  28. package/dist/ColorField.mjs +8 -4
  29. package/dist/ColorField.module.js +8 -4
  30. package/dist/ColorField.module.js.map +1 -1
  31. package/dist/ColorSlider.main.js +1 -1
  32. package/dist/ColorSlider.main.js.map +1 -1
  33. package/dist/ColorSlider.mjs +2 -2
  34. package/dist/ColorSlider.module.js +2 -2
  35. package/dist/ColorSlider.module.js.map +1 -1
  36. package/dist/ColorSwatch.main.js +1 -1
  37. package/dist/ColorSwatch.main.js.map +1 -1
  38. package/dist/ColorSwatch.mjs +2 -2
  39. package/dist/ColorSwatch.module.js +2 -2
  40. package/dist/ColorSwatch.module.js.map +1 -1
  41. package/dist/ColorSwatchPicker.main.js +2 -0
  42. package/dist/ColorSwatchPicker.main.js.map +1 -1
  43. package/dist/ColorSwatchPicker.mjs +2 -0
  44. package/dist/ColorSwatchPicker.module.js +2 -0
  45. package/dist/ColorSwatchPicker.module.js.map +1 -1
  46. package/dist/ColorThumb.main.js +1 -1
  47. package/dist/ColorThumb.main.js.map +1 -1
  48. package/dist/ColorThumb.mjs +2 -2
  49. package/dist/ColorThumb.module.js +2 -2
  50. package/dist/ColorThumb.module.js.map +1 -1
  51. package/dist/ColorWheel.main.js +2 -2
  52. package/dist/ColorWheel.main.js.map +1 -1
  53. package/dist/ColorWheel.mjs +3 -3
  54. package/dist/ColorWheel.module.js +3 -3
  55. package/dist/ColorWheel.module.js.map +1 -1
  56. package/dist/ComboBox.main.js +2 -2
  57. package/dist/ComboBox.main.js.map +1 -1
  58. package/dist/ComboBox.mjs +3 -3
  59. package/dist/ComboBox.module.js +3 -3
  60. package/dist/ComboBox.module.js.map +1 -1
  61. package/dist/DateField.main.js +3 -3
  62. package/dist/DateField.main.js.map +1 -1
  63. package/dist/DateField.mjs +4 -4
  64. package/dist/DateField.module.js +4 -4
  65. package/dist/DateField.module.js.map +1 -1
  66. package/dist/DatePicker.main.js +2 -2
  67. package/dist/DatePicker.main.js.map +1 -1
  68. package/dist/DatePicker.mjs +3 -3
  69. package/dist/DatePicker.module.js +3 -3
  70. package/dist/DatePicker.module.js.map +1 -1
  71. package/dist/Dialog.main.js +2 -1
  72. package/dist/Dialog.main.js.map +1 -1
  73. package/dist/Dialog.mjs +3 -2
  74. package/dist/Dialog.module.js +3 -2
  75. package/dist/Dialog.module.js.map +1 -1
  76. package/dist/Disclosure.main.js +3 -3
  77. package/dist/Disclosure.main.js.map +1 -1
  78. package/dist/Disclosure.mjs +4 -4
  79. package/dist/Disclosure.module.js +4 -4
  80. package/dist/Disclosure.module.js.map +1 -1
  81. package/dist/DropZone.main.js +2 -3
  82. package/dist/DropZone.main.js.map +1 -1
  83. package/dist/DropZone.mjs +4 -5
  84. package/dist/DropZone.module.js +4 -5
  85. package/dist/DropZone.module.js.map +1 -1
  86. package/dist/Form.main.js +1 -1
  87. package/dist/Form.main.js.map +1 -1
  88. package/dist/Form.mjs +2 -2
  89. package/dist/Form.module.js +2 -2
  90. package/dist/Form.module.js.map +1 -1
  91. package/dist/GridList.main.js +16 -13
  92. package/dist/GridList.main.js.map +1 -1
  93. package/dist/GridList.mjs +17 -14
  94. package/dist/GridList.module.js +17 -14
  95. package/dist/GridList.module.js.map +1 -1
  96. package/dist/Group.main.js +1 -1
  97. package/dist/Group.main.js.map +1 -1
  98. package/dist/Group.mjs +2 -2
  99. package/dist/Group.module.js +2 -2
  100. package/dist/Group.module.js.map +1 -1
  101. package/dist/Header.main.js +1 -1
  102. package/dist/Header.main.js.map +1 -1
  103. package/dist/Header.mjs +2 -2
  104. package/dist/Header.module.js +2 -2
  105. package/dist/Header.module.js.map +1 -1
  106. package/dist/Heading.main.js +2 -2
  107. package/dist/Heading.main.js.map +1 -1
  108. package/dist/Heading.mjs +2 -2
  109. package/dist/Heading.module.js +2 -2
  110. package/dist/Heading.module.js.map +1 -1
  111. package/dist/HiddenDateInput.main.js +5 -1
  112. package/dist/HiddenDateInput.main.js.map +1 -1
  113. package/dist/HiddenDateInput.mjs +6 -2
  114. package/dist/HiddenDateInput.module.js +6 -2
  115. package/dist/HiddenDateInput.module.js.map +1 -1
  116. package/dist/Input.main.js +1 -1
  117. package/dist/Input.main.js.map +1 -1
  118. package/dist/Input.mjs +2 -2
  119. package/dist/Input.module.js +2 -2
  120. package/dist/Input.module.js.map +1 -1
  121. package/dist/Keyboard.main.js +1 -1
  122. package/dist/Keyboard.main.js.map +1 -1
  123. package/dist/Keyboard.mjs +2 -2
  124. package/dist/Keyboard.module.js +2 -2
  125. package/dist/Keyboard.module.js.map +1 -1
  126. package/dist/Label.main.js +2 -1
  127. package/dist/Label.main.js.map +1 -1
  128. package/dist/Label.mjs +3 -2
  129. package/dist/Label.module.js +3 -2
  130. package/dist/Label.module.js.map +1 -1
  131. package/dist/Link.main.js +3 -2
  132. package/dist/Link.main.js.map +1 -1
  133. package/dist/Link.mjs +4 -3
  134. package/dist/Link.module.js +4 -3
  135. package/dist/Link.module.js.map +1 -1
  136. package/dist/ListBox.main.js +13 -14
  137. package/dist/ListBox.main.js.map +1 -1
  138. package/dist/ListBox.mjs +14 -15
  139. package/dist/ListBox.module.js +14 -15
  140. package/dist/ListBox.module.js.map +1 -1
  141. package/dist/Menu.main.js +21 -8
  142. package/dist/Menu.main.js.map +1 -1
  143. package/dist/Menu.mjs +22 -9
  144. package/dist/Menu.module.js +22 -9
  145. package/dist/Menu.module.js.map +1 -1
  146. package/dist/Meter.main.js +1 -1
  147. package/dist/Meter.main.js.map +1 -1
  148. package/dist/Meter.mjs +2 -2
  149. package/dist/Meter.module.js +2 -2
  150. package/dist/Meter.module.js.map +1 -1
  151. package/dist/Modal.main.js +2 -2
  152. package/dist/Modal.main.js.map +1 -1
  153. package/dist/Modal.mjs +3 -3
  154. package/dist/Modal.module.js +3 -3
  155. package/dist/Modal.module.js.map +1 -1
  156. package/dist/NumberField.main.js +1 -1
  157. package/dist/NumberField.main.js.map +1 -1
  158. package/dist/NumberField.mjs +2 -2
  159. package/dist/NumberField.module.js +2 -2
  160. package/dist/NumberField.module.js.map +1 -1
  161. package/dist/OverlayArrow.main.js +1 -1
  162. package/dist/OverlayArrow.main.js.map +1 -1
  163. package/dist/OverlayArrow.mjs +2 -2
  164. package/dist/OverlayArrow.module.js +2 -2
  165. package/dist/OverlayArrow.module.js.map +1 -1
  166. package/dist/Popover.main.js +2 -2
  167. package/dist/Popover.main.js.map +1 -1
  168. package/dist/Popover.mjs +4 -4
  169. package/dist/Popover.module.js +4 -4
  170. package/dist/Popover.module.js.map +1 -1
  171. package/dist/ProgressBar.main.js +1 -1
  172. package/dist/ProgressBar.main.js.map +1 -1
  173. package/dist/ProgressBar.mjs +2 -2
  174. package/dist/ProgressBar.module.js +2 -2
  175. package/dist/ProgressBar.module.js.map +1 -1
  176. package/dist/RadioGroup.main.js +2 -2
  177. package/dist/RadioGroup.main.js.map +1 -1
  178. package/dist/RadioGroup.mjs +3 -3
  179. package/dist/RadioGroup.module.js +3 -3
  180. package/dist/RadioGroup.module.js.map +1 -1
  181. package/dist/SearchField.main.js +1 -1
  182. package/dist/SearchField.main.js.map +1 -1
  183. package/dist/SearchField.mjs +2 -2
  184. package/dist/SearchField.module.js +2 -2
  185. package/dist/SearchField.module.js.map +1 -1
  186. package/dist/Select.main.js +2 -2
  187. package/dist/Select.main.js.map +1 -1
  188. package/dist/Select.mjs +3 -3
  189. package/dist/Select.module.js +3 -3
  190. package/dist/Select.module.js.map +1 -1
  191. package/dist/Separator.main.js +3 -1
  192. package/dist/Separator.main.js.map +1 -1
  193. package/dist/Separator.mjs +4 -2
  194. package/dist/Separator.module.js +4 -2
  195. package/dist/Separator.module.js.map +1 -1
  196. package/dist/SharedElementTransition.main.js +3 -2
  197. package/dist/SharedElementTransition.main.js.map +1 -1
  198. package/dist/SharedElementTransition.mjs +4 -3
  199. package/dist/SharedElementTransition.module.js +4 -3
  200. package/dist/SharedElementTransition.module.js.map +1 -1
  201. package/dist/Slider.main.js +6 -5
  202. package/dist/Slider.main.js.map +1 -1
  203. package/dist/Slider.mjs +7 -6
  204. package/dist/Slider.module.js +7 -6
  205. package/dist/Slider.module.js.map +1 -1
  206. package/dist/Switch.main.js +1 -1
  207. package/dist/Switch.main.js.map +1 -1
  208. package/dist/Switch.mjs +2 -2
  209. package/dist/Switch.module.js +2 -2
  210. package/dist/Switch.module.js.map +1 -1
  211. package/dist/Table.main.js +30 -25
  212. package/dist/Table.main.js.map +1 -1
  213. package/dist/Table.mjs +31 -26
  214. package/dist/Table.module.js +31 -26
  215. package/dist/Table.module.js.map +1 -1
  216. package/dist/Tabs.main.js +13 -6
  217. package/dist/Tabs.main.js.map +1 -1
  218. package/dist/Tabs.mjs +14 -7
  219. package/dist/Tabs.module.js +14 -7
  220. package/dist/Tabs.module.js.map +1 -1
  221. package/dist/TagGroup.main.js +6 -5
  222. package/dist/TagGroup.main.js.map +1 -1
  223. package/dist/TagGroup.mjs +7 -6
  224. package/dist/TagGroup.module.js +7 -6
  225. package/dist/TagGroup.module.js.map +1 -1
  226. package/dist/Text.main.js +2 -1
  227. package/dist/Text.main.js.map +1 -1
  228. package/dist/Text.mjs +3 -2
  229. package/dist/Text.module.js +3 -2
  230. package/dist/Text.module.js.map +1 -1
  231. package/dist/TextArea.main.js +1 -1
  232. package/dist/TextArea.main.js.map +1 -1
  233. package/dist/TextArea.mjs +2 -2
  234. package/dist/TextArea.module.js +2 -2
  235. package/dist/TextArea.module.js.map +1 -1
  236. package/dist/TextField.main.js +1 -1
  237. package/dist/TextField.main.js.map +1 -1
  238. package/dist/TextField.mjs +2 -2
  239. package/dist/TextField.module.js +2 -2
  240. package/dist/TextField.module.js.map +1 -1
  241. package/dist/Toast.main.js +6 -4
  242. package/dist/Toast.main.js.map +1 -1
  243. package/dist/Toast.mjs +7 -5
  244. package/dist/Toast.module.js +7 -5
  245. package/dist/Toast.module.js.map +1 -1
  246. package/dist/ToggleButton.main.js +5 -2
  247. package/dist/ToggleButton.main.js.map +1 -1
  248. package/dist/ToggleButton.mjs +6 -3
  249. package/dist/ToggleButton.module.js +6 -3
  250. package/dist/ToggleButton.module.js.map +1 -1
  251. package/dist/ToggleButtonGroup.main.js +1 -1
  252. package/dist/ToggleButtonGroup.main.js.map +1 -1
  253. package/dist/ToggleButtonGroup.mjs +2 -2
  254. package/dist/ToggleButtonGroup.module.js +2 -2
  255. package/dist/ToggleButtonGroup.module.js.map +1 -1
  256. package/dist/Toolbar.main.js +1 -1
  257. package/dist/Toolbar.main.js.map +1 -1
  258. package/dist/Toolbar.mjs +2 -2
  259. package/dist/Toolbar.module.js +2 -2
  260. package/dist/Toolbar.module.js.map +1 -1
  261. package/dist/Tooltip.main.js +1 -1
  262. package/dist/Tooltip.main.js.map +1 -1
  263. package/dist/Tooltip.mjs +2 -2
  264. package/dist/Tooltip.module.js +2 -2
  265. package/dist/Tooltip.module.js.map +1 -1
  266. package/dist/Tree.main.js +6 -6
  267. package/dist/Tree.main.js.map +1 -1
  268. package/dist/Tree.mjs +7 -7
  269. package/dist/Tree.module.js +7 -7
  270. package/dist/Tree.module.js.map +1 -1
  271. package/dist/types.d.ts +122 -63
  272. package/dist/types.d.ts.map +1 -1
  273. package/dist/utils.main.js +41 -3
  274. package/dist/utils.main.js.map +1 -1
  275. package/dist/utils.mjs +42 -5
  276. package/dist/utils.module.js +42 -5
  277. package/dist/utils.module.js.map +1 -1
  278. package/package.json +24 -24
  279. package/src/Breadcrumbs.tsx +9 -6
  280. package/src/Button.tsx +4 -3
  281. package/src/Calendar.tsx +26 -20
  282. package/src/Checkbox.tsx +7 -6
  283. package/src/ColorArea.tsx +3 -2
  284. package/src/ColorField.tsx +18 -3
  285. package/src/ColorSlider.tsx +2 -1
  286. package/src/ColorSwatch.tsx +2 -1
  287. package/src/ColorSwatchPicker.tsx +2 -0
  288. package/src/ColorThumb.tsx +3 -3
  289. package/src/ColorWheel.tsx +4 -3
  290. package/src/ComboBox.tsx +3 -2
  291. package/src/DateField.tsx +5 -4
  292. package/src/DatePicker.tsx +3 -2
  293. package/src/Dialog.tsx +5 -4
  294. package/src/Disclosure.tsx +7 -6
  295. package/src/DropZone.tsx +5 -5
  296. package/src/Form.tsx +4 -4
  297. package/src/GridList.tsx +30 -23
  298. package/src/Group.tsx +10 -9
  299. package/src/Header.tsx +7 -5
  300. package/src/Heading.tsx +4 -4
  301. package/src/HiddenDateInput.tsx +10 -3
  302. package/src/Input.tsx +3 -2
  303. package/src/Keyboard.tsx +4 -2
  304. package/src/Label.tsx +4 -3
  305. package/src/Link.tsx +15 -12
  306. package/src/ListBox.tsx +23 -22
  307. package/src/Menu.tsx +32 -17
  308. package/src/Meter.tsx +3 -2
  309. package/src/Modal.tsx +5 -4
  310. package/src/NumberField.tsx +2 -1
  311. package/src/OverlayArrow.tsx +3 -2
  312. package/src/Popover.tsx +5 -4
  313. package/src/ProgressBar.tsx +3 -2
  314. package/src/RadioGroup.tsx +6 -5
  315. package/src/SearchField.tsx +3 -2
  316. package/src/Select.tsx +6 -5
  317. package/src/Separator.tsx +8 -5
  318. package/src/SharedElementTransition.tsx +4 -3
  319. package/src/Slider.tsx +9 -7
  320. package/src/Switch.tsx +11 -10
  321. package/src/Table.tsx +47 -36
  322. package/src/Tabs.tsx +23 -18
  323. package/src/TagGroup.tsx +16 -13
  324. package/src/Text.tsx +4 -3
  325. package/src/TextArea.tsx +3 -2
  326. package/src/TextField.tsx +4 -3
  327. package/src/Toast.tsx +15 -11
  328. package/src/ToggleButton.tsx +5 -4
  329. package/src/ToggleButtonGroup.tsx +3 -2
  330. package/src/Toolbar.tsx +3 -2
  331. package/src/Tooltip.tsx +3 -2
  332. package/src/Tree.tsx +18 -17
  333. package/src/utils.tsx +97 -11
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAiEM,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,2CAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,0DAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,0DAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,6CAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;I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,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA4EM,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,2CAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,0DAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,0DAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,6CAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,qCAAmB,EAAE;QACvB,GAAG,CAAA,GAAA,8CAAmB,EAAE,MAAM;eAC9B;QACA,oBAAoB,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B;IAClD,GAAG,OAAO;IAEV,qBACE,sHACG,kCACC,OACA,OACA,MAAM,YAAY,EAClB,YACA,UACA,YACA,UACA,kBACA,mBACA,aAED,M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EA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,MAAM;oBAAgB,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YAC9G;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;aAAW;SAChC;qBACD,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,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;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the color field is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the color field is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || 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 <dom.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 data-readonly={props.isReadOnly || undefined}\n data-required={props.isRequired || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.main.js.map"}
@@ -1,4 +1,4 @@
1
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
2
2
  import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.mjs";
3
3
  import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.mjs";
4
4
  import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.mjs";
@@ -88,7 +88,9 @@ function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputR
88
88
  state: state,
89
89
  channel: props.channel || 'hex',
90
90
  isDisabled: props.isDisabled || false,
91
- isInvalid: validation.isInvalid || false
91
+ isInvalid: validation.isInvalid || false,
92
+ isReadOnly: props.isReadOnly || false,
93
+ isRequired: props.isRequired || false
92
94
  },
93
95
  defaultClassName: 'react-aria-ColorField'
94
96
  });
@@ -138,14 +140,16 @@ function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputR
138
140
  validation
139
141
  ]
140
142
  ]
141
- }, /*#__PURE__*/ (0, $kjuGe$react).createElement("div", {
143
+ }, /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
142
144
  ...DOMProps,
143
145
  ...renderProps,
144
146
  ref: ref,
145
147
  slot: props.slot || undefined,
146
148
  "data-channel": props.channel || 'hex',
147
149
  "data-disabled": props.isDisabled || undefined,
148
- "data-invalid": validation.isInvalid || undefined
150
+ "data-invalid": validation.isInvalid || undefined,
151
+ "data-readonly": props.isReadOnly || undefined,
152
+ "data-required": props.isRequired || undefined
149
153
  }));
150
154
  }
151
155
 
@@ -1,4 +1,4 @@
1
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, 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";
2
2
  import {ColorFieldContext as $4e85f108e88277b8$export$44644b8a16031b5b} from "./RSPContexts.module.js";
3
3
  import {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from "./FieldError.module.js";
4
4
  import {GroupContext as $a049562f99e7db0e$export$f9c6924e160136d1} from "./Group.module.js";
@@ -88,7 +88,9 @@ function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputR
88
88
  state: state,
89
89
  channel: props.channel || 'hex',
90
90
  isDisabled: props.isDisabled || false,
91
- isInvalid: validation.isInvalid || false
91
+ isInvalid: validation.isInvalid || false,
92
+ isReadOnly: props.isReadOnly || false,
93
+ isRequired: props.isRequired || false
92
94
  },
93
95
  defaultClassName: 'react-aria-ColorField'
94
96
  });
@@ -138,14 +140,16 @@ function $3ada01a82feafb94$var$useChildren(props, state, ref, inputProps, inputR
138
140
  validation
139
141
  ]
140
142
  ]
141
- }, /*#__PURE__*/ (0, $kjuGe$react).createElement("div", {
143
+ }, /*#__PURE__*/ (0, $kjuGe$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
142
144
  ...DOMProps,
143
145
  ...renderProps,
144
146
  ref: ref,
145
147
  slot: props.slot || undefined,
146
148
  "data-channel": props.channel || 'hex',
147
149
  "data-disabled": props.isDisabled || undefined,
148
- "data-invalid": validation.isInvalid || undefined
150
+ "data-invalid": validation.isInvalid || undefined,
151
+ "data-readonly": props.isReadOnly || undefined,
152
+ "data-required": props.isRequired || undefined
149
153
  }));
150
154
  }
151
155
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAiEM,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,gCAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,gCAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,2BAAmB,EAAE;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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,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,MAAM;oBAAgB,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YAC9G;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [GroupContext, {role: 'presentation', isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA4EM,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,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AG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,MAAM;oBAAgB,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YAC9G;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,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;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the color field is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the color field is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorField'\n */\n className?: ClassNameOrFunction<ColorFieldRenderProps>,\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} form={props.form} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || 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 <dom.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 data-readonly={props.isReadOnly || undefined}\n data-required={props.isRequired || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
@@ -98,7 +98,7 @@ const $037f8448dff48149$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $cPSMR$react
98
98
  }
99
99
  ]
100
100
  ]
101
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($cPSMR$react))).createElement("div", {
101
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($cPSMR$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
102
102
  ...DOMProps,
103
103
  ...renderProps,
104
104
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;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AkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CO,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO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;aAAE;YACF;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.main.js.map"}
@@ -1,4 +1,4 @@
1
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
2
2
  import {ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53} from "./RSPContexts.mjs";
3
3
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.mjs";
4
4
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.mjs";
@@ -87,7 +87,7 @@ const $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $bYfIo$forwa
87
87
  }
88
88
  ]
89
89
  ]
90
- }, /*#__PURE__*/ (0, $bYfIo$react).createElement("div", {
90
+ }, /*#__PURE__*/ (0, $bYfIo$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
91
91
  ...DOMProps,
92
92
  ...renderProps,
93
93
  ref: ref,
@@ -1,4 +1,4 @@
1
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
2
2
  import {ColorSliderContext as $4e85f108e88277b8$export$717b2c0a523a0b53} from "./RSPContexts.module.js";
3
3
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.module.js";
4
4
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
@@ -87,7 +87,7 @@ const $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $bYfIo$forwa
87
87
  }
88
88
  ]
89
89
  ]
90
- }, /*#__PURE__*/ (0, $bYfIo$react).createElement("div", {
90
+ }, /*#__PURE__*/ (0, $bYfIo$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
91
91
  ...DOMProps,
92
92
  ...renderProps,
93
93
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AA4CO,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAiB;IAC5D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,cACV,UAAU,eACV,WAAW,EACZ,GAAG,CAAA,GAAA,qBAAa,EAAE;QACjB,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orient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,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {\n ClassNameOrFunction,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot\n} from './utils';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSlider'\n */\n className?: ClassNameOrFunction<ColorSliderRenderProps>\n}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <dom.div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.module.js.map"}
@@ -33,7 +33,7 @@ const $804cfb3beb27b520$export$cae13e90592f246a = /*#__PURE__*/ (0, $8RzkX$react
33
33
  let DOMProps = (0, $8RzkX$reactariautils.filterDOMProps)(props, {
34
34
  global: true
35
35
  });
36
- return /*#__PURE__*/ (0, ($parcel$interopDefault($8RzkX$react))).createElement("div", {
36
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($8RzkX$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
37
37
  ...(0, $8RzkX$reactariautils.mergeProps)(DOMProps, colorSwatchProps, renderProps),
38
38
  slot: props.slot || undefined,
39
39
  ref: ref
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AA2BO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,+BAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';\nimport {\n ClassNameOrFunction,\n ContextValue,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AA4BO,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,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <dom.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,4 +1,4 @@
1
- import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
2
  import {useColorSwatch as $dfXrE$useColorSwatch} from "react-aria";
3
3
  import {filterDOMProps as $dfXrE$filterDOMProps, mergeProps as $dfXrE$mergeProps} from "@react-aria/utils";
4
4
  import $dfXrE$react, {createContext as $dfXrE$createContext, forwardRef as $dfXrE$forwardRef} from "react";
@@ -22,7 +22,7 @@ const $251c695a52d94a8d$export$cae13e90592f246a = /*#__PURE__*/ (0, $dfXrE$forwa
22
22
  let DOMProps = (0, $dfXrE$filterDOMProps)(props, {
23
23
  global: true
24
24
  });
25
- return /*#__PURE__*/ (0, $dfXrE$react).createElement("div", {
25
+ return /*#__PURE__*/ (0, $dfXrE$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
26
26
  ...(0, $dfXrE$mergeProps)(DOMProps, colorSwatchProps, renderProps),
27
27
  slot: props.slot || undefined,
28
28
  ref: ref
@@ -1,4 +1,4 @@
1
- import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, 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
3
  import {filterDOMProps as $dfXrE$filterDOMProps, mergeProps as $dfXrE$mergeProps} from "@react-aria/utils";
4
4
  import $dfXrE$react, {createContext as $dfXrE$createContext, forwardRef as $dfXrE$forwardRef} from "react";
@@ -22,7 +22,7 @@ const $251c695a52d94a8d$export$cae13e90592f246a = /*#__PURE__*/ (0, $dfXrE$forwa
22
22
  let DOMProps = (0, $dfXrE$filterDOMProps)(props, {
23
23
  global: true
24
24
  });
25
- return /*#__PURE__*/ (0, $dfXrE$react).createElement("div", {
25
+ return /*#__PURE__*/ (0, $dfXrE$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
26
26
  ...(0, $dfXrE$mergeProps)(DOMProps, colorSwatchProps, renderProps),
27
27
  slot: props.slot || undefined,
28
28
  ref: ref
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AA2BO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';\nimport {\n ClassNameOrFunction,\n ContextValue,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <div\n {...mergeProps(DOMProps, colorSwatchProps, renderProps)}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.module.js.map"}
1
+ {"mappings":";;;;;;;;;AA4BO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,kBAAkB,YAAY;QACvD,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Color} from 'react-stately';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatch'\n */\n className?: ClassNameOrFunction<ColorSwatchRenderProps>\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n \n return (\n <dom.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"}
@@ -84,6 +84,8 @@ const $4adbbc5a2d33d279$export$abcd89c27081c2ef = /*#__PURE__*/ (0, $1ahOz$react
84
84
  };
85
85
  return /*#__PURE__*/ (0, ($parcel$interopDefault($1ahOz$react))).createElement((0, $a03b42240404b420$exports.ListBoxItem), {
86
86
  ...props,
87
+ // ColorSwatchPickerItem is never a link.
88
+ render: props.render,
87
89
  ref: ref,
88
90
  id: color.toString('hexa'),
89
91
  textValue: color.getColorName(locale),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCO,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,CAAA,CAAC,KAAK,CAAC,kBAAkB,GAAG,UAAU,MAAM,CAAC,uBAAu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4CAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WACvC;AAKX","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, PressEvents, ValueBase} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCO,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,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,y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"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, PressEvents, ValueBase} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.main.js.map"}
@@ -76,6 +76,8 @@ const $0bb41941cfe72bd4$export$abcd89c27081c2ef = /*#__PURE__*/ (0, $jTaLw$forwa
76
76
  };
77
77
  return /*#__PURE__*/ (0, $jTaLw$react).createElement((0, $eed445e0843c11d0$export$a11e76429ed99b4), {
78
78
  ...props,
79
+ // ColorSwatchPickerItem is never a link.
80
+ render: props.render,
79
81
  ref: ref,
80
82
  id: color.toString('hexa'),
81
83
  textValue: color.getColorName(locale),
@@ -76,6 +76,8 @@ const $0bb41941cfe72bd4$export$abcd89c27081c2ef = /*#__PURE__*/ (0, $jTaLw$forwa
76
76
  };
77
77
  return /*#__PURE__*/ (0, $jTaLw$react).createElement((0, $eed445e0843c11d0$export$a11e76429ed99b4), {
78
78
  ...props,
79
+ // ColorSwatchPickerItem is never a link.
80
+ render: props.render,
79
81
  ref: ref,
80
82
  id: color.toString('hexa'),
81
83
  textValue: color.getColorName(locale),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCO,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAwD;AAC5G,MAAM,sDAAkB,CAAA,GAAA,oBAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAA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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 {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCO,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAwD;AAC5G,MAAM,sDAAkB,CAAA,GAAA,oBAAY,EAA6B;AAK1D,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,OAAO,EAAE;IAC1C,IAAI,YAAY,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAE1D,qBACE,gCAAC,CAAA,GAAA,yCAAM;QACJ,GAAG,CAAA,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ACzC,QAAQ,MAAM,MAAM;QACpB,KAAK;QACL,IAAI,MAAM,QAAQ,CAAC;QACnB,WAAW,MAAM,YAAY,CAAC;QAC9B,WAAW,KAAK,MAAM,SAAS,IAAI;QACnC,OAAO,KAAK,MAAM,KAAK;OACtB,CAAA,GAAA,yCAAiB,EAAE,KAAK,MAAM,QAAQ,GAAG,CAAA,yBACxC,gCAAC,CAAA,GAAA,yCAAiB,EAAE,QAAQ;YAAC,OAAO;uBAAC;YAAK;WACvC;AAKX","sources":["packages/react-aria-components/src/ColorSwatchPicker.tsx"],"sourcesContent":["import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, PressEvents, ValueBase} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n composeRenderProps,\n ContextValue,\n RenderProps,\n StyleRenderProps,\n useContextProps\n} from './utils';\nimport {Color, parseColor, useColorPickerState} from 'react-stately';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps} from './ListBox';\nimport React, {createContext, ForwardedRef, forwardRef, ReactNode, useContext, useEffect, useMemo} from 'react';\nimport {useLocale, useLocalizedStringFormatter} from 'react-aria';\n\nexport interface ColorSwatchPickerRenderProps extends Omit<ListBoxRenderProps, 'isDropTarget'> {}\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps, StyleRenderProps<ColorSwatchPickerRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPicker'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerRenderProps>,\n /** The children of the ColorSwatchPicker. */\n children?: ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'grid'\n */\n layout?: 'grid' | 'stack'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<ColorSwatchPickerProps, HTMLDivElement>>(null);\nconst ColorMapContext = createContext<Map<string, Color> | null>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchPickerContext);\n let state = useColorPickerState(props);\n let colorMap = useMemo(() => new Map(), []);\n let formatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n return (\n <ListBox\n {...filterDOMProps(props, {labelable: true})}\n ref={ref}\n className={props.className || 'react-aria-ColorSwatchPicker'}\n style={props.style}\n aria-label={props['aria-label'] || (!props['aria-labelledby'] ? formatter.format('colorSwatchPicker') : undefined)}\n layout={props.layout || 'grid'}\n selectionMode=\"single\"\n selectedKeys={[state.color.toString('hexa')]}\n onSelectionChange={(keys) => {\n // single select, 'all' cannot occur. appease typescript.\n if (keys !== 'all') {\n state.setColor(colorMap.get([...keys][0]));\n }\n }}\n disallowEmptySelection>\n <ColorMapContext.Provider value={colorMap}>\n {props.children}\n </ColorMapContext.Provider>\n </ListBox>\n );\n});\n\nexport interface ColorSwatchPickerItemRenderProps extends Omit<ListBoxItemRenderProps, 'selectionMode' | 'selectionBehavior'> {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchPickerItemProps extends RenderProps<ColorSwatchPickerItemRenderProps>, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorSwatchPickerItem'\n */\n className?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>,\n /** The color of the swatch. */\n color: string | Color,\n /** Whether the color swatch is disabled. */\n isDisabled?: boolean\n}\n\nexport const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps, ref: ForwardedRef<HTMLDivElement>) {\n let propColor = props.color || '#0000';\n let color = useMemo(() => typeof propColor === 'string' ? parseColor(propColor) : propColor, [propColor]);\n let {locale} = useLocale();\n let map = useContext(ColorMapContext)!;\n useEffect(() => {\n let key = color.toString('hexa');\n map.set(key, color);\n return () => {\n map.delete(key);\n };\n }, [color, map]);\n\n let wrap = (v) => {\n if (typeof v === 'function') {\n return (renderProps) => v({...renderProps, color});\n }\n return v;\n };\n\n return (\n <ListBoxItem\n {...props}\n // ColorSwatchPickerItem is never a link.\n render={props.render as any}\n ref={ref}\n id={color.toString('hexa')}\n textValue={color.getColorName(locale)}\n className={wrap(props.className || 'react-aria-ColorSwatchPickerItem')}\n style={wrap(props.style)}>\n {composeRenderProps(wrap(props.children), children => (\n <ColorSwatchContext.Provider value={{color}}>\n {children}\n </ColorSwatchContext.Provider>\n ))}\n </ListBoxItem>\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatchPicker.module.js.map"}
@@ -43,7 +43,7 @@ const $9775047c98afa2ef$export$a3cc47cee1c1ccc = /*#__PURE__*/ (0, $3jWEE$react.
43
43
  global: true
44
44
  });
45
45
  delete DOMProps.id;
46
- return /*#__PURE__*/ (0, ($parcel$interopDefault($3jWEE$react))).createElement("div", {
46
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($3jWEE$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
47
47
  ...(0, $3jWEE$reactaria.mergeProps)(thumbProps, hoverProps, DOMProps),
48
48
  ...renderProps,
49
49
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAyC;AA6CvF,MAAM,yDAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,uBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,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 {ClassNameOrFunction, RenderProps, useRenderProps} from './utils';\nimport {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';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <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;AA6CvF,MAAM,yDAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,uBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,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,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,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 {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {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';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.main.js.map"}
@@ -1,4 +1,4 @@
1
- import {useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
2
  import {filterDOMProps as $1Ipl1$filterDOMProps} from "@react-aria/utils";
3
3
  import {useFocusRing as $1Ipl1$useFocusRing, useHover as $1Ipl1$useHover, mergeProps as $1Ipl1$mergeProps} from "react-aria";
4
4
  import $1Ipl1$react, {createContext as $1Ipl1$createContext, forwardRef as $1Ipl1$forwardRef, useContext as $1Ipl1$useContext} from "react";
@@ -32,7 +32,7 @@ const $e2b71ec1d6016406$export$a3cc47cee1c1ccc = /*#__PURE__*/ (0, $1Ipl1$forwar
32
32
  global: true
33
33
  });
34
34
  delete DOMProps.id;
35
- return /*#__PURE__*/ (0, $1Ipl1$react).createElement("div", {
35
+ return /*#__PURE__*/ (0, $1Ipl1$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
36
36
  ...(0, $1Ipl1$mergeProps)(thumbProps, hoverProps, DOMProps),
37
37
  ...renderProps,
38
38
  ref: ref,
@@ -1,4 +1,4 @@
1
- import {useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
2
2
  import {filterDOMProps as $1Ipl1$filterDOMProps} from "@react-aria/utils";
3
3
  import {useFocusRing as $1Ipl1$useFocusRing, useHover as $1Ipl1$useHover, mergeProps as $1Ipl1$mergeProps} from "react-aria";
4
4
  import $1Ipl1$react, {createContext as $1Ipl1$createContext, forwardRef as $1Ipl1$forwardRef, useContext as $1Ipl1$useContext} from "react";
@@ -32,7 +32,7 @@ const $e2b71ec1d6016406$export$a3cc47cee1c1ccc = /*#__PURE__*/ (0, $1Ipl1$forwar
32
32
  global: true
33
33
  });
34
34
  delete DOMProps.id;
35
- return /*#__PURE__*/ (0, $1Ipl1$react).createElement("div", {
35
+ return /*#__PURE__*/ (0, $1Ipl1$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
36
36
  ...(0, $1Ipl1$mergeProps)(thumbProps, hoverProps, DOMProps),
37
37
  ...renderProps,
38
38
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAsBO,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyC;AA6CvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,iBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;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 {ClassNameOrFunction, RenderProps, useRenderProps} from './utils';\nimport {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';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <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;AA6CvF,MAAM,yDAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,IAAI,SAAC,KAAK,cAAE,UAAU,aAAE,SAAS,aAAE,SAAS,eAAE,WAAW,eAAE,WAAW,cAAE,aAAa,OAAM,GAAG,CAAA,GAAA,iBAAS,EAAE;IACzG,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc;YACZ,GAAG,WAAW,KAAK;YACnB,iBAAiB,MAAM,eAAe,GAAG,QAAQ;QACnD;QACA,QAAQ;YACN,OAAO,MAAM,eAAe;uBAC5B;YACA,YAAY,MAAM,UAAU;uBAC5B;4BACA;wBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,YAAY,SAAS;QAC/C,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;qBAC7B,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrD,6BAAe,gCAAC;QAAM,KAAK;QAAY,GAAG,WAAW;QAAG,GAAG,UAAU;QACrE,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorThumb.tsx"],"sourcesContent":["import {ClassNameOrFunction, dom, RenderProps, useRenderProps} from './utils';\nimport {Color} from 'react-stately';\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';\n\ninterface ColorState {\n getDisplayColor(): Color,\n isDragging: boolean\n}\n\ninterface InternalColorThumbContextValue {\n state: ColorState,\n thumbProps: HTMLAttributes<HTMLElement>,\n inputXRef: RefObject<HTMLInputElement | null>,\n inputYRef?: RefObject<HTMLInputElement | null>,\n xInputProps: InputHTMLAttributes<HTMLInputElement>,\n yInputProps?: InputHTMLAttributes<HTMLInputElement>,\n isDisabled?: boolean\n}\n\nexport const InternalColorThumbContext = createContext<InternalColorThumbContextValue | null>(null);\n\nexport interface ColorThumbRenderProps {\n /**\n * The selected color, excluding the alpha channel.\n */\n color: Color,\n /**\n * Whether this thumb is currently being dragged.\n * @selector [data-dragging]\n */\n isDragging: boolean,\n /**\n * Whether the thumb is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the thumb is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the thumb is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the thumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface ColorThumbProps extends HoverEvents, RenderProps<ColorThumbRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-ColorThumb'\n */\n className?: ClassNameOrFunction<ColorThumbRenderProps>\n}\n\n/**\n * A color thumb appears within a ColorArea, ColorSlider, or ColorWheel and allows a user to drag to adjust the color value.\n */\nexport const ColorThumb = forwardRef(function ColorThumb(props: ColorThumbProps, ref: ForwardedRef<HTMLDivElement>) {\n let {state, thumbProps, inputXRef, inputYRef, xInputProps, yInputProps, isDisabled = false} = useContext(InternalColorThumbContext)!;\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorThumb',\n defaultStyle: {\n ...thumbProps.style,\n backgroundColor: state.getDisplayColor().toString()\n },\n values: {\n color: state.getDisplayColor(),\n isHovered,\n isDragging: state.isDragging,\n isFocused,\n isFocusVisible,\n isDisabled\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(thumbProps, hoverProps, DOMProps)}\n {...renderProps}\n ref={ref}\n data-hovered={isHovered || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}>\n <input ref={inputXRef} {...xInputProps} {...focusProps} />\n {yInputProps && <input ref={inputYRef} {...yInputProps} {...focusProps} />}\n {renderProps.children}\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"ColorThumb.module.js.map"}
@@ -47,7 +47,7 @@ const $85ae22f3b2559b04$export$f80663f808113381 = /*#__PURE__*/ (0, $k1tmY$react
47
47
  global: true
48
48
  });
49
49
  delete DOMProps.id;
50
- return /*#__PURE__*/ (0, ($parcel$interopDefault($k1tmY$react))).createElement("div", {
50
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($k1tmY$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
51
51
  ...DOMProps,
52
52
  ...renderProps,
53
53
  ref: ref,
@@ -90,7 +90,7 @@ const $85ae22f3b2559b04$export$aaae3dd1f909c692 = /*#__PURE__*/ (0, $k1tmY$react
90
90
  state: state
91
91
  }
92
92
  });
93
- return /*#__PURE__*/ (0, ($parcel$interopDefault($k1tmY$react))).createElement("div", {
93
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($k1tmY$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
94
94
  ...rest,
95
95
  ...renderProps,
96
96
  ref: ref,