react-aria-components 3.0.0-nightly-527c98a84-250305 → 3.0.0-nightly-b4695c8fd-250307

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 (77) hide show
  1. package/dist/ColorArea.main.js +4 -4
  2. package/dist/ColorArea.main.js.map +1 -1
  3. package/dist/ColorArea.mjs +2 -2
  4. package/dist/ColorArea.module.js +2 -2
  5. package/dist/ColorArea.module.js.map +1 -1
  6. package/dist/ColorField.main.js +6 -8
  7. package/dist/ColorField.main.js.map +1 -1
  8. package/dist/ColorField.mjs +2 -4
  9. package/dist/ColorField.module.js +2 -4
  10. package/dist/ColorField.module.js.map +1 -1
  11. package/dist/ColorPicker.main.js +2 -2
  12. package/dist/ColorPicker.main.js.map +1 -1
  13. package/dist/ColorPicker.mjs +1 -1
  14. package/dist/ColorPicker.module.js +1 -1
  15. package/dist/ColorPicker.module.js.map +1 -1
  16. package/dist/ColorSlider.main.js +4 -6
  17. package/dist/ColorSlider.main.js.map +1 -1
  18. package/dist/ColorSlider.mjs +2 -4
  19. package/dist/ColorSlider.module.js +2 -4
  20. package/dist/ColorSlider.module.js.map +1 -1
  21. package/dist/ColorSwatch.main.js +2 -2
  22. package/dist/ColorSwatch.main.js.map +1 -1
  23. package/dist/ColorSwatch.mjs +1 -1
  24. package/dist/ColorSwatch.module.js +1 -1
  25. package/dist/ColorSwatch.module.js.map +1 -1
  26. package/dist/ColorSwatchPicker.main.js +3 -3
  27. package/dist/ColorSwatchPicker.main.js.map +1 -1
  28. package/dist/ColorSwatchPicker.mjs +1 -1
  29. package/dist/ColorSwatchPicker.module.js +1 -1
  30. package/dist/ColorSwatchPicker.module.js.map +1 -1
  31. package/dist/ColorThumb.main.js +2 -6
  32. package/dist/ColorThumb.main.js.map +1 -1
  33. package/dist/ColorThumb.mjs +1 -5
  34. package/dist/ColorThumb.module.js +1 -5
  35. package/dist/ColorThumb.module.js.map +1 -1
  36. package/dist/ColorWheel.main.js +4 -4
  37. package/dist/ColorWheel.main.js.map +1 -1
  38. package/dist/ColorWheel.mjs +2 -2
  39. package/dist/ColorWheel.module.js +2 -2
  40. package/dist/ColorWheel.module.js.map +1 -1
  41. package/dist/Disclosure.main.js +5 -7
  42. package/dist/Disclosure.main.js.map +1 -1
  43. package/dist/Disclosure.mjs +2 -4
  44. package/dist/Disclosure.module.js +2 -4
  45. package/dist/Disclosure.module.js.map +1 -1
  46. package/dist/Menu.main.js +3 -7
  47. package/dist/Menu.main.js.map +1 -1
  48. package/dist/Menu.mjs +3 -7
  49. package/dist/Menu.module.js +3 -7
  50. package/dist/Menu.module.js.map +1 -1
  51. package/dist/Toast.main.js +2 -2
  52. package/dist/Toast.main.js.map +1 -1
  53. package/dist/Toast.mjs +1 -1
  54. package/dist/Toast.module.js +1 -1
  55. package/dist/Toast.module.js.map +1 -1
  56. package/dist/import.mjs +1 -5
  57. package/dist/main.js +3 -7
  58. package/dist/main.js.map +1 -1
  59. package/dist/module.js +1 -5
  60. package/dist/module.js.map +1 -1
  61. package/dist/types.d.ts +7 -18
  62. package/dist/types.d.ts.map +1 -1
  63. package/i18n/index.js +1 -1
  64. package/i18n/index.mjs +1 -1
  65. package/package.json +24 -32
  66. package/src/ColorArea.tsx +2 -3
  67. package/src/ColorField.tsx +2 -4
  68. package/src/ColorPicker.tsx +1 -2
  69. package/src/ColorSlider.tsx +2 -4
  70. package/src/ColorSwatch.tsx +2 -2
  71. package/src/ColorSwatchPicker.tsx +1 -1
  72. package/src/ColorThumb.tsx +2 -4
  73. package/src/ColorWheel.tsx +2 -2
  74. package/src/Disclosure.tsx +2 -3
  75. package/src/Menu.tsx +3 -5
  76. package/src/Toast.tsx +1 -1
  77. package/src/index.ts +2 -6
@@ -1,10 +1,10 @@
1
1
  var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
2
  var $9775047c98afa2ef$exports = require("./ColorThumb.main.js");
3
3
  var $c5ccf687772c0422$exports = require("./utils.main.js");
4
- var $hLuah$reactstatelycolor = require("@react-stately/color");
4
+ var $hLuah$reactaria = require("react-aria");
5
+ var $hLuah$reactstately = require("react-stately");
5
6
  var $hLuah$reactariautils = require("@react-aria/utils");
6
7
  var $hLuah$react = require("react");
7
- var $hLuah$reactariacolor = require("@react-aria/color");
8
8
 
9
9
 
10
10
  function $parcel$interopDefault(a) {
@@ -29,8 +29,8 @@ const $4b8ff932b8d77df7$export$b2103f68a961418e = /*#__PURE__*/ (0, $hLuah$react
29
29
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, (0, $525402dfec7da5bc$exports.ColorAreaContext));
30
30
  let inputXRef = (0, $hLuah$react.useRef)(null);
31
31
  let inputYRef = (0, $hLuah$react.useRef)(null);
32
- let state = (0, $hLuah$reactstatelycolor.useColorAreaState)(props);
33
- let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $hLuah$reactariacolor.useColorArea)({
32
+ let state = (0, $hLuah$reactstately.useColorAreaState)(props);
33
+ let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $hLuah$reactaria.useColorArea)({
34
34
  ...props,
35
35
  inputXRef: inputXRef,
36
36
  inputYRef: inputYRef,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,yDAAwB,CAAA,GAAA,0BAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,0CAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,0CAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,kCAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACC,KAAK;QACJ,GAAG,cAAc;QACjB,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps} from '@react-types/color';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from '@react-stately/color';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\nimport {useColorArea} from '@react-aria/color';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...colorAreaProps}\n {...DOMProps}\n {...renderProps}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,yDAAwB,CAAA,GAAA,0BAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,0CAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,qCAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,6BAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACC,KAAK;QACJ,GAAG,cAAc;QACjB,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...colorAreaProps}\n {...DOMProps}\n {...renderProps}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.main.js.map"}
@@ -1,10 +1,10 @@
1
1
  import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed} from "./RSPContexts.mjs";
2
2
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.mjs";
3
3
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
4
- import {useColorAreaState as $xv8AM$useColorAreaState} from "@react-stately/color";
4
+ import {useColorArea as $xv8AM$useColorArea} from "react-aria";
5
+ import {useColorAreaState as $xv8AM$useColorAreaState} from "react-stately";
5
6
  import {filterDOMProps as $xv8AM$filterDOMProps} from "@react-aria/utils";
6
7
  import $xv8AM$react, {createContext as $xv8AM$createContext, forwardRef as $xv8AM$forwardRef, useRef as $xv8AM$useRef} from "react";
7
- import {useColorArea as $xv8AM$useColorArea} from "@react-aria/color";
8
8
 
9
9
 
10
10
 
@@ -1,10 +1,10 @@
1
1
  import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed} from "./RSPContexts.module.js";
2
2
  import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846} from "./ColorThumb.module.js";
3
3
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
4
- import {useColorAreaState as $xv8AM$useColorAreaState} from "@react-stately/color";
4
+ import {useColorArea as $xv8AM$useColorArea} from "react-aria";
5
+ import {useColorAreaState as $xv8AM$useColorAreaState} from "react-stately";
5
6
  import {filterDOMProps as $xv8AM$filterDOMProps} from "@react-aria/utils";
6
7
  import $xv8AM$react, {createContext as $xv8AM$createContext, forwardRef as $xv8AM$forwardRef, useRef as $xv8AM$useRef} from "react";
7
- import {useColorArea as $xv8AM$useColorArea} from "@react-aria/color";
8
8
 
9
9
 
10
10
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAuBO,MAAM,yDAAwB,CAAA,GAAA,oBAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,mBAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACC,KAAK;QACJ,GAAG,cAAc;QACjB,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps} from '@react-types/color';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from '@react-stately/color';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\nimport {useColorArea} from '@react-aria/color';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...colorAreaProps}\n {...DOMProps}\n {...renderProps}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAsBO,MAAM,yDAAwB,CAAA,GAAA,oBAAY,EAAyB;AAKnE,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAAiC;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAe;IAC1D,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;IAC9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,mBAAW,EAAE;QACf,GAAG,KAAK;mBACR;mBACA;QACA,cAAc;IAChB,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,eAAe,KAAK;QAClC,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;QAClC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACC,KAAK;QACJ,GAAG,cAAc;QACjB,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;aAAM;YAC9B;gBAAC,CAAA,GAAA,yCAAwB;gBAAG;2BAAC;gCAAO;+BAAY;iCAAW;+BAAa;iCAAW;oBAAa,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC/H;OACA,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ColorArea.tsx"],"sourcesContent":["import {AriaColorAreaProps, useColorArea} from 'react-aria';\nimport {ColorAreaContext} from './RSPContexts';\nimport {ColorAreaState, useColorAreaState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\n\nexport interface ColorAreaRenderProps {\n /**\n * Whether the color area is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color area.\n */\n state: ColorAreaState\n}\n\nexport interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps {}\n\nexport const ColorAreaStateContext = createContext<ColorAreaState | null>(null);\n\n/**\n * A color area allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorAreaContext);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n\n let state = useColorAreaState(props);\n let {\n colorAreaProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({\n ...props,\n inputXRef,\n inputYRef,\n containerRef: ref\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorArea',\n defaultStyle: colorAreaProps.style,\n values: {\n state,\n isDisabled: props.isDisabled || false\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <div\n ref={ref}\n {...colorAreaProps}\n {...DOMProps}\n {...renderProps}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}>\n <Provider\n values={[\n [ColorAreaStateContext, state],\n [InternalColorThumbContext, {state, thumbProps, inputXRef, xInputProps, inputYRef, yInputProps, isDisabled: props.isDisabled}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.module.js.map"}
@@ -4,11 +4,10 @@ var $1bcfcef5af644e13$exports = require("./Input.main.js");
4
4
  var $84ae0bf5bd8e2a5f$exports = require("./Label.main.js");
5
5
  var $c5ccf687772c0422$exports = require("./utils.main.js");
6
6
  var $a8a589c28affdc40$exports = require("./Text.main.js");
7
- var $jBBea$reactariacolor = require("@react-aria/color");
8
- var $jBBea$reactstatelycolor = require("@react-stately/color");
7
+ var $jBBea$reactaria = require("react-aria");
8
+ var $jBBea$reactstately = require("react-stately");
9
9
  var $jBBea$reactariautils = require("@react-aria/utils");
10
10
  var $jBBea$react = require("react");
11
- var $jBBea$reactaria = require("react-aria");
12
11
 
13
12
 
14
13
  function $parcel$interopDefault(a) {
@@ -41,7 +40,6 @@ $parcel$export(module.exports, "ColorField", () => $266025a3ea7f6c3b$export$b865
41
40
 
42
41
 
43
42
 
44
-
45
43
  const $266025a3ea7f6c3b$export$96b6d32b05a1a8ed = /*#__PURE__*/ (0, $jBBea$react.createContext)(null);
46
44
  const $266025a3ea7f6c3b$export$b865d4358897bb17 = /*#__PURE__*/ (0, $jBBea$react.forwardRef)(function ColorField(props, ref) {
47
45
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, (0, $525402dfec7da5bc$exports.ColorFieldContext));
@@ -57,14 +55,14 @@ const $266025a3ea7f6c3b$export$b865d4358897bb17 = /*#__PURE__*/ (0, $jBBea$react
57
55
  });
58
56
  function $266025a3ea7f6c3b$var$ColorChannelField(props) {
59
57
  let { locale: locale } = (0, $jBBea$reactaria.useLocale)();
60
- let state = (0, $jBBea$reactstatelycolor.useColorChannelFieldState)({
58
+ let state = (0, $jBBea$reactstately.useColorChannelFieldState)({
61
59
  ...props,
62
60
  locale: locale
63
61
  });
64
62
  let inputRef = (0, $jBBea$react.useRef)(null);
65
63
  let [labelRef, label] = (0, $c5ccf687772c0422$exports.useSlot)(!props['aria-label'] && !props['aria-labelledby']);
66
64
  var _props_validationBehavior;
67
- let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $jBBea$reactariacolor.useColorChannelField)({
65
+ let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $jBBea$reactaria.useColorChannelField)({
68
66
  ...(0, $c5ccf687772c0422$exports.removeDataAttributes)(props),
69
67
  label: label,
70
68
  validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : 'native'
@@ -77,14 +75,14 @@ function $266025a3ea7f6c3b$var$ColorChannelField(props) {
77
75
  }
78
76
  function $266025a3ea7f6c3b$var$HexColorField(props) {
79
77
  var _props_validationBehavior;
80
- let state = (0, $jBBea$reactstatelycolor.useColorFieldState)({
78
+ let state = (0, $jBBea$reactstately.useColorFieldState)({
81
79
  ...props,
82
80
  validationBehavior: (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : 'native'
83
81
  });
84
82
  let inputRef = (0, $jBBea$react.useRef)(null);
85
83
  let [labelRef, label] = (0, $c5ccf687772c0422$exports.useSlot)(!props['aria-label'] && !props['aria-labelledby']);
86
84
  var _props_validationBehavior1;
87
- let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $jBBea$reactariacolor.useColorField)({
85
+ let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $jBBea$reactaria.useColorField)({
88
86
  ...(0, $c5ccf687772c0422$exports.removeDataAttributes)(props),
89
87
  label: label,
90
88
  validationBehavior: (_props_validationBehavior1 = props.validationBehavior) !== null && _props_validationBehavior1 !== void 0 ? _props_validationBehavior1 : 'native'
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAmDM,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,kDAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAA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ACtB,KAAsB,EACtB,GAAiC,EACjC,UAA4C,EAC5C,QAA+B,EAC/B,UAAiD,EACjD,QAA+B,EAC/B,gBAA6C,EAC7C,iBAA8C,EAC9C,UAA4B;IAE5B,IAAI,cAAc,CAAA,GAAA,wCAAa,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,oCAAa,EAAE;IAC9B,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,qCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;aAAW;SAChC;qBACD,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField} from '@react-aria/color';\nimport {ColorChannel, ColorSpace} from '@react-types/color';\nimport {ColorFieldContext} from './RSPContexts';\nimport {ColorFieldState, useColorChannelFieldState, useColorFieldState} from '@react-stately/color';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InputContext} from './Input';\nimport {InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\nimport {useLocale} from 'react-aria';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps {\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiDM,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;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Ac,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InputContext} from './Input';\nimport {InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps {\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.main.js.map"}
@@ -4,11 +4,10 @@ import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input
4
4
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.mjs";
5
5
  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";
6
6
  import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.mjs";
7
- import {useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "@react-aria/color";
8
- import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "@react-stately/color";
7
+ import {useLocale as $kjuGe$useLocale, useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "react-aria";
8
+ import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "react-stately";
9
9
  import {filterDOMProps as $kjuGe$filterDOMProps} from "@react-aria/utils";
10
10
  import $kjuGe$react, {createContext as $kjuGe$createContext, forwardRef as $kjuGe$forwardRef, useRef as $kjuGe$useRef} from "react";
11
- import {useLocale as $kjuGe$useLocale} from "react-aria";
12
11
 
13
12
  /*
14
13
  * Copyright 2022 Adobe. All rights reserved.
@@ -30,7 +29,6 @@ import {useLocale as $kjuGe$useLocale} from "react-aria";
30
29
 
31
30
 
32
31
 
33
-
34
32
  const $3ada01a82feafb94$export$96b6d32b05a1a8ed = /*#__PURE__*/ (0, $kjuGe$createContext)(null);
35
33
  const $3ada01a82feafb94$export$b865d4358897bb17 = /*#__PURE__*/ (0, $kjuGe$forwardRef)(function ColorField(props, ref) {
36
34
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, (0, $4e85f108e88277b8$export$44644b8a16031b5b));
@@ -4,11 +4,10 @@ import {InputContext as $3985021b0ad6602f$export$37fb8590cf2c088c} from "./Input
4
4
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
5
5
  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";
6
6
  import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.module.js";
7
- import {useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "@react-aria/color";
8
- import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "@react-stately/color";
7
+ import {useLocale as $kjuGe$useLocale, useColorChannelField as $kjuGe$useColorChannelField, useColorField as $kjuGe$useColorField} from "react-aria";
8
+ import {useColorChannelFieldState as $kjuGe$useColorChannelFieldState, useColorFieldState as $kjuGe$useColorFieldState} from "react-stately";
9
9
  import {filterDOMProps as $kjuGe$filterDOMProps} from "@react-aria/utils";
10
10
  import $kjuGe$react, {createContext as $kjuGe$createContext, forwardRef as $kjuGe$forwardRef, useRef as $kjuGe$useRef} from "react";
11
- import {useLocale as $kjuGe$useLocale} from "react-aria";
12
11
 
13
12
  /*
14
13
  * Copyright 2022 Adobe. All rights reserved.
@@ -30,7 +29,6 @@ import {useLocale as $kjuGe$useLocale} from "react-aria";
30
29
 
31
30
 
32
31
 
33
-
34
32
  const $3ada01a82feafb94$export$96b6d32b05a1a8ed = /*#__PURE__*/ (0, $kjuGe$createContext)(null);
35
33
  const $3ada01a82feafb94$export$b865d4358897bb17 = /*#__PURE__*/ (0, $kjuGe$forwardRef)(function ColorField(props, ref) {
36
34
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, (0, $4e85f108e88277b8$export$44644b8a16031b5b));
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAmDM,MAAM,0DAAyB,CAAA,GAAA,oBAAY,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;YAC9C;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField} from '@react-aria/color';\nimport {ColorChannel, ColorSpace} from '@react-types/color';\nimport {ColorFieldContext} from './RSPContexts';\nimport {ColorFieldState, useColorChannelFieldState, useColorFieldState} from '@react-stately/color';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InputContext} from './Input';\nimport {InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\nimport {useLocale} from 'react-aria';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps {\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiDM,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAKrE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAChH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAgB;IAC3D,IAAI,MAAM,OAAO,EACf,qBAAO,gCAAC;QAAmB,GAAG,KAAK;QAAE,SAAS,MAAM,OAAO;QAAE,cAAc;;SAE3E,qBAAO,gCAAC;QAAe,GAAG,KAAK;QAAE,cAAc;;AAEnD;AAOA,SAAS,wCAAkB,KAA6B;IACtD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;gBACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;QAW7B;IATtB,IAAI,cACF,UAAU,cACV,UAAU,oBACV,gBAAgB,qBAChB,iBAAiB,EACjB,GAAG,YACJ,GAAG,CAAA,GAAA,2BAAmB,EAAE;QACvB,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;eAC9B;QACA,oBAAoB,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B;IAClD,GAAG,OAAO;IAEV,qBACE,kEACG,kCACC,OACA,OACA,MAAM,YAAY,EAClB,YACA,UACA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AS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAwB;aAAM;YAC/B;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,OAAO,IAAI;QAC/B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;;AAG9C","sources":["packages/react-aria-components/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';\nimport {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';\nimport {ColorFieldContext} from './RSPContexts';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InputContext} from './Input';\nimport {InputDOMProps, ValidationResult} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ColorFieldRenderProps {\n /**\n * Whether the color field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the color field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The color channel that this field edits, or \"hex\" if no `channel` prop is set.\n * @selector [data-channel=\"hex | hue | saturation | ...\"]\n */\n channel: ColorChannel | 'hex',\n /**\n * State of the color field.\n */\n state: ColorFieldState\n}\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps {\n /**\n * The color channel that this field edits. If not provided, \n * the color is edited as a hex value.\n */\n channel?: ColorChannel,\n /**\n * The color space that the color field operates in if a `channel` prop is provided.\n * If no `channel` is provided, the color field always displays the color as an RGB hex value.\n */\n colorSpace?: ColorSpace\n}\n\nexport const ColorFieldStateContext = createContext<ColorFieldState | null>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorFieldContext);\n if (props.channel) {\n return <ColorChannelField {...props} channel={props.channel} forwardedRef={ref} />;\n } else {\n return <HexColorField {...props} forwardedRef={ref} />;\n }\n});\n\ninterface ColorChannelFieldProps extends Omit<ColorFieldProps, 'channel'> {\n channel: ColorChannel,\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction ColorChannelField(props: ColorChannelFieldProps) {\n let {locale} = useLocale();\n let state = useColorChannelFieldState({\n ...props,\n locale\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorChannelField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return (\n <>\n {useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n )}\n {props.name && <input type=\"hidden\" name={props.name} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </>\n );\n}\n\ninterface HexColorFieldProps extends ColorFieldProps {\n forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction HexColorField(props: HexColorFieldProps) {\n let state = useColorFieldState({\n ...props,\n validationBehavior: props.validationBehavior ?? 'native'\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n labelProps,\n inputProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useColorField({\n ...removeDataAttributes(props),\n label,\n validationBehavior: props.validationBehavior ?? 'native'\n }, state, inputRef);\n\n return useChildren(\n props,\n state,\n props.forwardedRef,\n inputProps,\n inputRef,\n labelProps,\n labelRef,\n descriptionProps,\n errorMessageProps,\n validation\n );\n}\n\nfunction useChildren(\n props: ColorFieldProps,\n state: ColorFieldState,\n ref: ForwardedRef<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLElement>,\n inputRef: Ref<HTMLInputElement>,\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n labelRef: Ref<HTMLLabelElement>,\n descriptionProps: HTMLAttributes<HTMLElement>,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n validation: ValidationResult\n) {\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n channel: props.channel || 'hex',\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false\n },\n defaultClassName: 'react-aria-ColorField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-channel={props.channel || 'hex'}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined} />\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorField.module.js.map"}
@@ -2,7 +2,7 @@ var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
2
  var $804cfb3beb27b520$exports = require("./ColorSwatch.main.js");
3
3
  var $4adbbc5a2d33d279$exports = require("./ColorSwatchPicker.main.js");
4
4
  var $c5ccf687772c0422$exports = require("./utils.main.js");
5
- var $lvYpl$reactstatelycolor = require("@react-stately/color");
5
+ var $lvYpl$reactstately = require("react-stately");
6
6
  var $lvYpl$reactaria = require("react-aria");
7
7
  var $lvYpl$react = require("react");
8
8
 
@@ -40,7 +40,7 @@ const $34f42c35e4f8c327$export$2c14261be40a385f = /*#__PURE__*/ (0, $lvYpl$react
40
40
  function $34f42c35e4f8c327$export$9feb1bc2e5f1ccb3(props) {
41
41
  let ctx = (0, $c5ccf687772c0422$exports.useSlottedContext)($34f42c35e4f8c327$export$cfac98503b32f6d6, props.slot);
42
42
  props = (0, $lvYpl$reactaria.mergeProps)(ctx, props);
43
- let state = (0, $lvYpl$reactstatelycolor.useColorPickerState)(props);
43
+ let state = (0, $lvYpl$reactstately.useColorPickerState)(props);
44
44
  let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
45
45
  ...props,
46
46
  values: {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,2BAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,4CAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,0CAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,kDAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color} from '@react-types/color';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from '@react-stately/color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport React, {createContext} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps, Pick<RenderProps<ColorPickerRenderProps>, 'children'> {}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps) {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker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* Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport React, {createContext} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps, Pick<RenderProps<ColorPickerRenderProps>, 'children'> {}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps) {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.main.js.map"}
@@ -2,7 +2,7 @@ import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed, ColorFiel
2
2
  import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.mjs";
3
3
  import {ColorSwatchPickerContext as $0bb41941cfe72bd4$export$7214f50881fc1eaf} from "./ColorSwatchPicker.mjs";
4
4
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
5
- import {useColorPickerState as $arEth$useColorPickerState} from "@react-stately/color";
5
+ import {useColorPickerState as $arEth$useColorPickerState} from "react-stately";
6
6
  import {mergeProps as $arEth$mergeProps} from "react-aria";
7
7
  import $arEth$react, {createContext as $arEth$createContext} from "react";
8
8
 
@@ -2,7 +2,7 @@ import {ColorAreaContext as $4e85f108e88277b8$export$ebe63fadcdce34ed, ColorFiel
2
2
  import {ColorSwatchContext as $251c695a52d94a8d$export$83cc445538396800} from "./ColorSwatch.module.js";
3
3
  import {ColorSwatchPickerContext as $0bb41941cfe72bd4$export$7214f50881fc1eaf} from "./ColorSwatchPicker.module.js";
4
4
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
5
- import {useColorPickerState as $arEth$useColorPickerState} from "@react-stately/color";
5
+ import {useColorPickerState as $arEth$useColorPickerState} from "react-stately";
6
6
  import {mergeProps as $arEth$mergeProps} from "react-aria";
7
7
  import $arEth$react, {createContext as $arEth$createContext} from "react";
8
8
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyC;AAChF,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAMvE,SAAS,0CAAY,KAAuB;IACjD,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAoB,MAAM,IAAI;IAC1D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,OAAO,MAAM,KAAK;QACpB;IACF;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACpE;gBAAC,CAAA,GAAA,yCAAe;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YAClE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;YACnE;gBAAC,CAAA,GAAA,yCAAiB;gBAAG;oBAAC,OAAO,MAAM,KAAK;gBAAA;aAAE;YAC1C;gBAAC,CAAA,GAAA,yCAAuB;gBAAG;oBAAC,OAAO,MAAM,KAAK;oBAAE,UAAU,MAAM,QAAQ;gBAAA;aAAE;SAC3E;OACA,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color} from '@react-types/color';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from '@react-stately/color';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport React, {createContext} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps, Pick<RenderProps<ColorPickerRenderProps>, 'children'> {}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps) {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider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.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';\nimport {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';\nimport {ColorSwatchContext} from './ColorSwatch';\nimport {ColorSwatchPickerContext} from './ColorSwatchPicker';\nimport {mergeProps} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';\nimport React, {createContext} from 'react';\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color\n}\n\nexport interface ColorPickerProps extends StatelyColorPickerProps, SlotProps, Pick<RenderProps<ColorPickerRenderProps>, 'children'> {}\n\nexport const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);\nexport const ColorPickerStateContext = createContext<ColorPickerState | null>(null);\n\n/**\n * A ColorPicker synchronizes a color value between multiple React Aria color components.\n * It simplifies building color pickers with customizable layouts via composition.\n */\nexport function ColorPicker(props: ColorPickerProps) {\n let ctx = useSlottedContext(ColorPickerContext, props.slot);\n props = mergeProps(ctx, props);\n let state = useColorPickerState(props);\n let renderProps = useRenderProps({\n ...props,\n values: {\n color: state.color\n }\n });\n\n return (\n <Provider\n values={[\n [ColorPickerStateContext, state],\n [ColorSliderContext, {value: state.color, onChange: state.setColor}],\n [ColorAreaContext, {value: state.color, onChange: state.setColor}],\n [ColorWheelContext, {value: state.color, onChange: state.setColor}],\n [ColorFieldContext, {value: state.color, onChange: state.setColor}],\n [ColorSwatchContext, {color: state.color}],\n [ColorSwatchPickerContext, {value: state.color, onChange: state.setColor}]\n ]}>\n {renderProps.children}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ColorPicker.module.js.map"}
@@ -3,11 +3,10 @@ var $9775047c98afa2ef$exports = require("./ColorThumb.main.js");
3
3
  var $84ae0bf5bd8e2a5f$exports = require("./Label.main.js");
4
4
  var $c5ccf687772c0422$exports = require("./utils.main.js");
5
5
  var $b7152ce4839d0838$exports = require("./Slider.main.js");
6
- var $cPSMR$reactstatelycolor = require("@react-stately/color");
7
- var $cPSMR$reactariautils = require("@react-aria/utils");
8
6
  var $cPSMR$reactaria = require("react-aria");
7
+ var $cPSMR$reactstately = require("react-stately");
8
+ var $cPSMR$reactariautils = require("@react-aria/utils");
9
9
  var $cPSMR$react = require("react");
10
- var $cPSMR$reactariacolor = require("@react-aria/color");
11
10
 
12
11
 
13
12
  function $parcel$interopDefault(a) {
@@ -29,19 +28,18 @@ $parcel$export(module.exports, "ColorSlider", () => $037f8448dff48149$export$44f
29
28
 
30
29
 
31
30
 
32
-
33
31
  const $037f8448dff48149$export$c7fad7ea00194428 = /*#__PURE__*/ (0, $cPSMR$react.createContext)(null);
34
32
  const $037f8448dff48149$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $cPSMR$react.forwardRef)(function ColorSlider(props, ref) {
35
33
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, (0, $525402dfec7da5bc$exports.ColorSliderContext));
36
34
  let { locale: locale } = (0, $cPSMR$reactaria.useLocale)();
37
- let state = (0, $cPSMR$reactstatelycolor.useColorSliderState)({
35
+ let state = (0, $cPSMR$reactstately.useColorSliderState)({
38
36
  ...props,
39
37
  locale: locale
40
38
  });
41
39
  let trackRef = (0, ($parcel$interopDefault($cPSMR$react))).useRef(null);
42
40
  let inputRef = (0, ($parcel$interopDefault($cPSMR$react))).useRef(null);
43
41
  let [labelRef, label] = (0, $c5ccf687772c0422$exports.useSlot)(!props['aria-label'] && !props['aria-labelledby']);
44
- let { trackProps: trackProps, thumbProps: thumbProps, inputProps: inputProps, labelProps: labelProps, outputProps: outputProps } = (0, $cPSMR$reactariacolor.useColorSlider)({
42
+ let { trackProps: trackProps, thumbProps: thumbProps, inputProps: inputProps, labelProps: labelProps, outputProps: outputProps } = (0, $cPSMR$reactaria.useColorSlider)({
45
43
  ...props,
46
44
  label: label,
47
45
  trackRef: trackRef,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,4CAAiB;IAC5D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,0BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,4CAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,sCAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA,GAAA,sCAAI,EAAE,MAAM,CAAC;IAE5B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM,EAC5B,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB;IAEnD,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,cACV,UAAU,eACV,WAAW,EACZ,GAAG,CAAA,GAAA,oCAAa,EAAE;QACjB,GAAG,KAAK;eACR;kBACA;kBACA;IACF,GAAG;IAEH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YACN,aAAa,MAAM,WAAW;YAC9B,YAAY,MAAM,UAAU;mBAC5B;QACF;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAyB;aAAM;YAChC;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;aAAM;YAC3B;gBAAC,CAAA,GAAA,4CAAiB;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YACpD;gBAAC,CAAA,GAAA,6CAAkB;gBAAG;aAAY;YAClC;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBACb,GAAG,UAAU;oBACb,KAAK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps} from '@react-types/color';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from '@react-stately/color';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation, useLocale} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useColorSlider} from '@react-aria/color';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps {}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,0DAA0B,CAAA,GAAA,0BAAY,EAA2B;A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AK;oBACL,UAAU,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;gBACtD;aAAE;YACF;gBAAC,CAAA,GAAA,mDAAwB;gBAAG;2BAAC;gCAAO;oBAAY,WAAW;oBAAU,aAAa;oBAAY,YAAY,MAAM,UAAU;gBAAA;aAAE;SAC7H;qBACD,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW;QACnC,iBAAe,MAAM,UAAU,IAAI;;AAG3C","sources":["packages/react-aria-components/src/ColorSlider.tsx"],"sourcesContent":["import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps {}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.main.js.map"}
@@ -3,12 +3,10 @@ import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846}
3
3
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.mjs";
4
4
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.mjs";
5
5
  import {SliderOutputContext as $6f909507e6374d18$export$6189c2744041d8f8, SliderStateContext as $6f909507e6374d18$export$1e7083018727fa60, SliderTrackContext as $6f909507e6374d18$export$f1fce0420cc6d8ee} from "./Slider.mjs";
6
- import {useColorSliderState as $bYfIo$useColorSliderState} from "@react-stately/color";
6
+ import {useLocale as $bYfIo$useLocale, useColorSlider as $bYfIo$useColorSlider} from "react-aria";
7
+ import {useColorSliderState as $bYfIo$useColorSliderState} from "react-stately";
7
8
  import {filterDOMProps as $bYfIo$filterDOMProps} from "@react-aria/utils";
8
- import {useLocale as $bYfIo$useLocale} from "react-aria";
9
9
  import $bYfIo$react, {createContext as $bYfIo$createContext, forwardRef as $bYfIo$forwardRef} from "react";
10
- import {useColorSlider as $bYfIo$useColorSlider} from "@react-aria/color";
11
-
12
10
 
13
11
 
14
12
 
@@ -3,12 +3,10 @@ import {InternalColorThumbContext as $e2b71ec1d6016406$export$c80c0ea2ca5cb846}
3
3
  import {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from "./Label.module.js";
4
4
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8} from "./utils.module.js";
5
5
  import {SliderOutputContext as $6f909507e6374d18$export$6189c2744041d8f8, SliderStateContext as $6f909507e6374d18$export$1e7083018727fa60, SliderTrackContext as $6f909507e6374d18$export$f1fce0420cc6d8ee} from "./Slider.module.js";
6
- import {useColorSliderState as $bYfIo$useColorSliderState} from "@react-stately/color";
6
+ import {useLocale as $bYfIo$useLocale, useColorSlider as $bYfIo$useColorSlider} from "react-aria";
7
+ import {useColorSliderState as $bYfIo$useColorSliderState} from "react-stately";
7
8
  import {filterDOMProps as $bYfIo$filterDOMProps} from "@react-aria/utils";
8
- import {useLocale as $bYfIo$useLocale} from "react-aria";
9
9
  import $bYfIo$react, {createContext as $bYfIo$createContext, forwardRef as $bYfIo$forwardRef} from "react";
10
- import {useColorSlider as $bYfIo$useColorSlider} from "@react-aria/color";
11
-
12
10
 
13
11
 
14
12
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BO,MAAM,0DAA0B,CAAA,GAAA,o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AU;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} from '@react-types/color';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from '@react-stately/color';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Orientation, useLocale} from 'react-aria';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\nimport {useColorSlider} from '@react-aria/color';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps {}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AA6BO,MAAM,0DAA0B,CAAA,GAAA,oBAAY,EAA2B;AAKvE,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAAiB;IAC5D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;QAAC,GAAG,KAAK;gBAAE;IAAM;IACjD,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,MAAM,CAAC;IAC5B,IAAI,WAAW,CAAA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Slider.tsx"],"sourcesContent":["import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';\nimport {ColorSliderContext} from './RSPContexts';\nimport {ColorSliderState, useColorSliderState} from 'react-stately';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {InternalColorThumbContext} from './ColorThumb';\nimport {LabelContext} from './Label';\nimport {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';\n\nexport interface ColorSliderRenderProps {\n /**\n * The orientation of the color slider.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the color slider is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the color slider.\n */\n state: ColorSliderState\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps {}\n\nexport const ColorSliderStateContext = createContext<ColorSliderState | null>(null);\n\n/**\n * A color slider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSliderContext);\n let {locale} = useLocale();\n let state = useColorSliderState({...props, locale});\n let trackRef = React.useRef(null);\n let inputRef = React.useRef(null);\n\n let [labelRef, label] = useSlot(\n !props['aria-label'] && !props['aria-labelledby']\n );\n let {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n outputProps\n } = useColorSlider({\n ...props,\n label,\n trackRef,\n inputRef\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: state.orientation,\n isDisabled: state.isDisabled,\n state\n },\n defaultClassName: 'react-aria-ColorSlider'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ColorSliderStateContext, state],\n [SliderStateContext, state],\n [SliderTrackContext, {...trackProps, ref: trackRef}],\n [SliderOutputContext, outputProps],\n [LabelContext, {\n ...labelProps,\n ref: labelRef,\n children: state.value.getChannelName(props.channel, locale)\n }],\n [InternalColorThumbContext, {state, thumbProps, inputXRef: inputRef, xInputProps: inputProps, isDisabled: props.isDisabled}]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={state.orientation}\n data-disabled={state.isDisabled || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.module.js.map"}
@@ -1,5 +1,5 @@
1
1
  var $c5ccf687772c0422$exports = require("./utils.main.js");
2
- var $8RzkX$reactariacolor = require("@react-aria/color");
2
+ var $8RzkX$reactaria = require("react-aria");
3
3
  var $8RzkX$react = require("react");
4
4
 
5
5
 
@@ -19,7 +19,7 @@ $parcel$export(module.exports, "ColorSwatch", () => $804cfb3beb27b520$export$cae
19
19
  const $804cfb3beb27b520$export$83cc445538396800 = /*#__PURE__*/ (0, $8RzkX$react.createContext)(null);
20
20
  const $804cfb3beb27b520$export$cae13e90592f246a = /*#__PURE__*/ (0, $8RzkX$react.forwardRef)(function ColorSwatch(props, ref) {
21
21
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $804cfb3beb27b520$export$83cc445538396800);
22
- let { colorSwatchProps: colorSwatchProps, color: color } = (0, $8RzkX$reactariacolor.useColorSwatch)(props);
22
+ let { colorSwatchProps: colorSwatchProps, color: color } = (0, $8RzkX$reactaria.useColorSwatch)(props);
23
23
  let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
24
24
  ...props,
25
25
  defaultClassName: 'react-aria-ColorSwatch',
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAYO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,oCAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,qBACE,0DAAC;QACE,GAAG,gBAAgB;QACnB,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from '@react-aria/color';\nimport {Color} from '@react-types/color';\nimport {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps {}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n \n return (\n <div\n {...colorSwatchProps}\n {...renderProps}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAYO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,+BAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,qBACE,0DAAC;QACE,GAAG,gBAAgB;QACnB,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';\nimport {Color} from 'react-stately';\nimport {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps {}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n \n return (\n <div\n {...colorSwatchProps}\n {...renderProps}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.main.js.map"}
@@ -1,5 +1,5 @@
1
1
  import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
- import {useColorSwatch as $dfXrE$useColorSwatch} from "@react-aria/color";
2
+ import {useColorSwatch as $dfXrE$useColorSwatch} from "react-aria";
3
3
  import $dfXrE$react, {createContext as $dfXrE$createContext, forwardRef as $dfXrE$forwardRef} from "react";
4
4
 
5
5
 
@@ -1,5 +1,5 @@
1
1
  import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
2
- import {useColorSwatch as $dfXrE$useColorSwatch} from "@react-aria/color";
2
+ import {useColorSwatch as $dfXrE$useColorSwatch} from "react-aria";
3
3
  import $dfXrE$react, {createContext as $dfXrE$createContext, forwardRef as $dfXrE$forwardRef} from "react";
4
4
 
5
5
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAYO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,qBACE,gCAAC;QACE,GAAG,gBAAgB;QACnB,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from '@react-aria/color';\nimport {Color} from '@react-types/color';\nimport {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps {}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n \n return (\n <div\n {...colorSwatchProps}\n {...renderProps}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.module.js.map"}
1
+ {"mappings":";;;;;;;AAYO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAC/C,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,cAAc,iBAAiB,KAAK;QACpC,QAAQ;mBACN;QACF;IACF;IAEA,qBACE,gCAAC;QACE,GAAG,gBAAgB;QACnB,GAAG,WAAW;QACf,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;;AAEX","sources":["packages/react-aria-components/src/ColorSwatch.tsx"],"sourcesContent":["import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';\nimport {Color} from 'react-stately';\nimport {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ColorSwatchRenderProps {\n /** The color of the swatch. */\n color: Color\n}\n\nexport interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps {}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ColorSwatchContext);\n let {colorSwatchProps, color} = useColorSwatch(props);\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ColorSwatch',\n defaultStyle: colorSwatchProps.style,\n values: {\n color\n }\n });\n \n return (\n <div\n {...colorSwatchProps}\n {...renderProps}\n slot={props.slot || undefined}\n ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"ColorSwatch.module.js.map"}
@@ -2,7 +2,7 @@ var $804cfb3beb27b520$exports = require("./ColorSwatch.main.js");
2
2
  var $c5ccf687772c0422$exports = require("./utils.main.js");
3
3
  var $d72d752ea1c67b9a$exports = require("./intlStrings.main.js");
4
4
  var $a03b42240404b420$exports = require("./ListBox.main.js");
5
- var $1ahOz$reactstatelycolor = require("@react-stately/color");
5
+ var $1ahOz$reactstately = require("react-stately");
6
6
  var $1ahOz$reactariautils = require("@react-aria/utils");
7
7
  var $1ahOz$react = require("react");
8
8
  var $1ahOz$reactaria = require("react-aria");
@@ -31,7 +31,7 @@ const $4adbbc5a2d33d279$export$7214f50881fc1eaf = /*#__PURE__*/ (0, $1ahOz$react
31
31
  const $4adbbc5a2d33d279$var$ColorMapContext = /*#__PURE__*/ (0, $1ahOz$react.createContext)(null);
32
32
  const $4adbbc5a2d33d279$export$b46792416e3d8515 = /*#__PURE__*/ (0, $1ahOz$react.forwardRef)(function ColorSwatchPicker(props, ref) {
33
33
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $4adbbc5a2d33d279$export$7214f50881fc1eaf);
34
- let state = (0, $1ahOz$reactstatelycolor.useColorPickerState)(props);
34
+ let state = (0, $1ahOz$reactstately.useColorPickerState)(props);
35
35
  let colorMap = (0, $1ahOz$react.useMemo)(()=>new Map(), []);
36
36
  let formatter = (0, $1ahOz$reactaria.useLocalizedStringFormatter)((0, ($parcel$interopDefault($d72d752ea1c67b9a$exports))), 'react-aria-components');
37
37
  return /*#__PURE__*/ (0, ($parcel$interopDefault($1ahOz$react))).createElement((0, $a03b42240404b420$exports.ListBox), {
@@ -60,7 +60,7 @@ const $4adbbc5a2d33d279$export$b46792416e3d8515 = /*#__PURE__*/ (0, $1ahOz$react
60
60
  });
61
61
  const $4adbbc5a2d33d279$export$abcd89c27081c2ef = /*#__PURE__*/ (0, $1ahOz$react.forwardRef)(function ColorSwatchPickerItem(props, ref) {
62
62
  let propColor = props.color || '#0000';
63
- let color = (0, $1ahOz$react.useMemo)(()=>typeof propColor === 'string' ? (0, $1ahOz$reactstatelycolor.parseColor)(propColor) : propColor, [
63
+ let color = (0, $1ahOz$react.useMemo)(()=>typeof propColor === 'string' ? (0, $1ahOz$reactstately.parseColor)(propColor) : propColor, [
64
64
  propColor
65
65
  ]);
66
66
  let { locale: locale } = (0, $1ahOz$reactaria.useLocale)();