@react-spectrum/color 3.0.0-nightly-3f44370de-241118 → 3.0.0-nightly-b3a4d6c11-241119

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.
@@ -3,10 +3,10 @@ var $f61d632765728b2e$exports = require("./colorhandle_vars_css.main.js");
3
3
  require("./vars.a2a1e25f.css");
4
4
  var $f65977ae56facfaa$exports = require("./colorloupe_vars_css.main.js");
5
5
  var $bRwD9$reactspectrumutils = require("@react-spectrum/utils");
6
+ var $bRwD9$reactspectrumprovider = require("@react-spectrum/provider");
6
7
  var $bRwD9$reactspectrumoverlays = require("@react-spectrum/overlays");
7
8
  var $bRwD9$react = require("react");
8
9
  var $bRwD9$reactariautils = require("@react-aria/utils");
9
- var $bRwD9$reactspectrumprovider = require("@react-spectrum/provider");
10
10
 
11
11
 
12
12
  function $parcel$interopDefault(a) {
@@ -39,7 +39,7 @@ function $2b9adc23f6c7cae1$export$a3cc47cee1c1ccc(props) {
39
39
  let { value: value, isDisabled: isDisabled, isDragging: isDragging, isFocused: isFocused, children: children, className: className = '', style: style, containerRef: containerRef, ...otherProps } = props;
40
40
  let valueCSS = value.toString('css');
41
41
  let loupeRef = (0, $bRwD9$react.useRef)(null);
42
- let provider = (0, $bRwD9$reactspectrumprovider.useProvider)();
42
+ let provider = (0, $bRwD9$react.useContext)((0, $bRwD9$reactspectrumprovider.Context));
43
43
  return /*#__PURE__*/ (0, ($parcel$interopDefault($bRwD9$react))).createElement("div", {
44
44
  className: (0, $bRwD9$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f61d632765728b2e$exports))), 'spectrum-ColorHandle', {
45
45
  'is-focused': isFocused,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,SAAS,yCAAW,KAAsB;IACxC,IAAI,SAAC,KAAK,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,YAAE,QAAQ,aAAE,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M;sBACR,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QACnC,GAAE;;AAGV","sources":["packages/@react-spectrum/color/src/ColorThumb.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames} from '@react-spectrum/utils';\nimport {Color} from '@react-types/color';\nimport {DOMProps, RefObject} from '@react-types/shared';\nimport {Overlay} from '@react-spectrum/overlays';\nimport React, {CSSProperties, ReactElement, useRef, useState} from 'react';\nimport stylesHandle from '@adobe/spectrum-css-temp/components/colorhandle/vars.css';\nimport stylesLoupe from '@adobe/spectrum-css-temp/components/colorloupe/vars.css';\nimport {useId, useLayoutEffect} from '@react-aria/utils';\nimport {useProvider} from '@react-spectrum/provider';\n\ninterface ColorThumbProps extends DOMProps {\n value: Color,\n isDisabled?: boolean,\n isDragging?: boolean, // shows the color loupe\n isFocused?: boolean, // makes the circle larger\n className?: string,\n children?: ReactElement,\n style?: CSSProperties,\n containerRef?: RefObject<HTMLElement | null>\n}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', style, containerRef, ...otherProps} = props;\n\n let valueCSS = value.toString('css');\n let loupeRef = useRef<HTMLElement | null>(null);\n let provider = useProvider();\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} style={style} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <Overlay isOpen={isDragging && provider != null} nodeRef={loupeRef}>\n <ColorLoupe valueCSS={valueCSS} containerRef={containerRef} loupeRef={loupeRef} style={style} />\n </Overlay>\n {children}\n </div>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupe({isOpen, valueCSS, containerRef, loupeRef, style}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let thumbTop = style.top || '50%';\n if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) {\n thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;\n }\n\n let thumbLeft = style.left || '50%';\n if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) {\n thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;\n }\n\n return (\n <svg\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isOpen})}\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft\n }}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-background')} x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={valueCSS} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-outer')}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n\nexport {ColorThumb};\n"],"names":[],"version":3,"file":"ColorThumb.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,SAAS,yCAAW,KAAsB;IACxC,IAAI,SAAC,KAAK,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,YAAE,QAAQ,aAAE,YAAY,WAAI,KAAK,gBAAE,YAAY,EAAE,GAAG,YAAW,GAAG;IAE/G,IAAI,WAAW,MAAM,QAAQ,CAAC;IAC9B,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAsB;IAC1C,IAAI,WAAW,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,oCAAM;IAEhC,qBACE,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAW,GAAG,wBAAwB;YAAC,cAAc;YAAW,eAAe;QAAU,KAAK,MAAM;QAAW,OAAO;QAAQ,GAAG,UAAU;qBACpK,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAW,GAAG;QAA+B,OAAO;YAAC,iBAAiB;QAAQ;sBACzG,0DAAC,CA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YACzB,MAAM,cAAc,IAAI,GAAG;QAC7B;QACA,KAAK;QACL,eAAY;qBACZ,0DAAC;QAAQ,IAAI;QAAW,GAAE;QAAI,GAAE;QAAI,OAAM;QAAK,QAAO;QAAK,cAAa;qBACtE,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QAAyC,GAAE;QAAI,GAAE;QAAI,OAAM;QAAK,QAAO;sBAChH,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QAAsC,GAAE;QAAI,GAAE;QAAI,OAAM;QAAI,QAAO;sBAC5G,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QAAsC,GAAE;QAAI,GAAE;QAAI,OAAM;QAAI,QAAO;uBAE9G,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QACnC,GAAE;QACF,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;sBAC5B,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QACnC,GAAE;QACF,MAAM;sBACR,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;QACnC,GAAE;;AAGV","sources":["packages/@react-spectrum/color/src/ColorThumb.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames} from '@react-spectrum/utils';\nimport {Color} from '@react-types/color';\nimport {Context} from '@react-spectrum/provider';\nimport {DOMProps, RefObject} from '@react-types/shared';\nimport {Overlay} from '@react-spectrum/overlays';\nimport React, {CSSProperties, ReactElement, useContext, useRef, useState} from 'react';\nimport stylesHandle from '@adobe/spectrum-css-temp/components/colorhandle/vars.css';\nimport stylesLoupe from '@adobe/spectrum-css-temp/components/colorloupe/vars.css';\nimport {useId, useLayoutEffect} from '@react-aria/utils';\n\ninterface ColorThumbProps extends DOMProps {\n value: Color,\n isDisabled?: boolean,\n isDragging?: boolean, // shows the color loupe\n isFocused?: boolean, // makes the circle larger\n className?: string,\n children?: ReactElement,\n style?: CSSProperties,\n containerRef?: RefObject<HTMLElement | null>\n}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', style, containerRef, ...otherProps} = props;\n\n let valueCSS = value.toString('css');\n let loupeRef = useRef<HTMLElement | null>(null);\n let provider = useContext(Context);\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} style={style} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <Overlay isOpen={isDragging && provider != null} nodeRef={loupeRef}>\n <ColorLoupe valueCSS={valueCSS} containerRef={containerRef} loupeRef={loupeRef} style={style} />\n </Overlay>\n {children}\n </div>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupe({isOpen, valueCSS, containerRef, loupeRef, style}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let thumbTop = style.top || '50%';\n if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) {\n thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;\n }\n\n let thumbLeft = style.left || '50%';\n if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) {\n thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;\n }\n\n return (\n <svg\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isOpen})}\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft\n }}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-background')} x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={valueCSS} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-outer')}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n\nexport {ColorThumb};\n"],"names":[],"version":3,"file":"ColorThumb.main.js.map"}
@@ -3,10 +3,10 @@ import $1UQoL$colorhandle_vars_cssmodulejs from "./colorhandle_vars_css.mjs";
3
3
  import "./vars.a2a1e25f.css";
4
4
  import $1UQoL$colorloupe_vars_cssmodulejs from "./colorloupe_vars_css.mjs";
5
5
  import {classNames as $1UQoL$classNames} from "@react-spectrum/utils";
6
+ import {Context as $1UQoL$Context} from "@react-spectrum/provider";
6
7
  import {Overlay as $1UQoL$Overlay} from "@react-spectrum/overlays";
7
- import $1UQoL$react, {useRef as $1UQoL$useRef, useState as $1UQoL$useState} from "react";
8
+ import $1UQoL$react, {useRef as $1UQoL$useRef, useContext as $1UQoL$useContext, useState as $1UQoL$useState} from "react";
8
9
  import {useId as $1UQoL$useId, useLayoutEffect as $1UQoL$useLayoutEffect} from "@react-aria/utils";
9
- import {useProvider as $1UQoL$useProvider} from "@react-spectrum/provider";
10
10
 
11
11
 
12
12
  function $parcel$interopDefault(a) {
@@ -33,7 +33,7 @@ function $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc(props) {
33
33
  let { value: value, isDisabled: isDisabled, isDragging: isDragging, isFocused: isFocused, children: children, className: className = '', style: style, containerRef: containerRef, ...otherProps } = props;
34
34
  let valueCSS = value.toString('css');
35
35
  let loupeRef = (0, $1UQoL$useRef)(null);
36
- let provider = (0, $1UQoL$useProvider)();
36
+ let provider = (0, $1UQoL$useContext)((0, $1UQoL$Context));
37
37
  return /*#__PURE__*/ (0, $1UQoL$react).createElement("div", {
38
38
  className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorhandle_vars_cssmodulejs))), 'spectrum-ColorHandle', {
39
39
  'is-focused': isFocused,
@@ -3,10 +3,10 @@ import $1UQoL$colorhandle_vars_cssmodulejs from "./colorhandle_vars_css.module.j
3
3
  import "./vars.a2a1e25f.css";
4
4
  import $1UQoL$colorloupe_vars_cssmodulejs from "./colorloupe_vars_css.module.js";
5
5
  import {classNames as $1UQoL$classNames} from "@react-spectrum/utils";
6
+ import {Context as $1UQoL$Context} from "@react-spectrum/provider";
6
7
  import {Overlay as $1UQoL$Overlay} from "@react-spectrum/overlays";
7
- import $1UQoL$react, {useRef as $1UQoL$useRef, useState as $1UQoL$useState} from "react";
8
+ import $1UQoL$react, {useRef as $1UQoL$useRef, useContext as $1UQoL$useContext, useState as $1UQoL$useState} from "react";
8
9
  import {useId as $1UQoL$useId, useLayoutEffect as $1UQoL$useLayoutEffect} from "@react-aria/utils";
9
- import {useProvider as $1UQoL$useProvider} from "@react-spectrum/provider";
10
10
 
11
11
 
12
12
  function $parcel$interopDefault(a) {
@@ -33,7 +33,7 @@ function $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc(props) {
33
33
  let { value: value, isDisabled: isDisabled, isDragging: isDragging, isFocused: isFocused, children: children, className: className = '', style: style, containerRef: containerRef, ...otherProps } = props;
34
34
  let valueCSS = value.toString('css');
35
35
  let loupeRef = (0, $1UQoL$useRef)(null);
36
- let provider = (0, $1UQoL$useProvider)();
36
+ let provider = (0, $1UQoL$useContext)((0, $1UQoL$Context));
37
37
  return /*#__PURE__*/ (0, $1UQoL$react).createElement("div", {
38
38
  className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorhandle_vars_cssmodulejs))), 'spectrum-ColorHandle', {
39
39
  'is-focused': isFocused,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,SAAS,yCAAW,KAAsB;IACxC,IAAI,SAAC,KAAK,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,YAAE,QAAQ,aAAE,YAAY,WAAI,KAAK,gBAAE,YAAY,EAAE,GAAG,YAAW,GAAG;IAE/G,IAAI,WAAW,MAAM,QAAQ,CAAC;IAC9B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAsB;IAC1C,IAAI,WAAW,CAAA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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 {classNames} from '@react-spectrum/utils';\nimport {Color} from '@react-types/color';\nimport {DOMProps, RefObject} from '@react-types/shared';\nimport {Overlay} from '@react-spectrum/overlays';\nimport React, {CSSProperties, ReactElement, useRef, useState} from 'react';\nimport stylesHandle from '@adobe/spectrum-css-temp/components/colorhandle/vars.css';\nimport stylesLoupe from '@adobe/spectrum-css-temp/components/colorloupe/vars.css';\nimport {useId, useLayoutEffect} from '@react-aria/utils';\nimport {useProvider} from '@react-spectrum/provider';\n\ninterface ColorThumbProps extends DOMProps {\n value: Color,\n isDisabled?: boolean,\n isDragging?: boolean, // shows the color loupe\n isFocused?: boolean, // makes the circle larger\n className?: string,\n children?: ReactElement,\n style?: CSSProperties,\n containerRef?: RefObject<HTMLElement | null>\n}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', style, containerRef, ...otherProps} = props;\n\n let valueCSS = value.toString('css');\n let loupeRef = useRef<HTMLElement | null>(null);\n let provider = useProvider();\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} style={style} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <Overlay isOpen={isDragging && provider != null} nodeRef={loupeRef}>\n <ColorLoupe valueCSS={valueCSS} containerRef={containerRef} loupeRef={loupeRef} style={style} />\n </Overlay>\n {children}\n </div>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupe({isOpen, valueCSS, containerRef, loupeRef, style}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let thumbTop = style.top || '50%';\n if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) {\n thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;\n }\n\n let thumbLeft = style.left || '50%';\n if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) {\n thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;\n }\n\n return (\n <svg\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isOpen})}\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft\n }}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-background')} x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={valueCSS} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-outer')}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n\nexport {ColorThumb};\n"],"names":[],"version":3,"file":"ColorThumb.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,SAAS,yCAAW,KAAsB;IACxC,IAAI,SAAC,KAAK,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,YAAE,QAAQ,aAAE,YAAY,WAAI,KAAK,gBAAE,YAAY,EAAE,GAAG,YAAW,GAAG;IAE/G,IAAI,WAAW,MAAM,QAAQ,CAAC;IAC9B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAsB;IAC1C,IAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,cAAM;IAEhC,qBACE,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,6DAAW,GAAG,wBAAwB;YAAC,cAAc;YAAW,eAAe;QAAU,KAAK,MAAM;QAAW,OAAO;QAAQ,GAAG,UAAU;qBACpK,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,6DAAW,GAAG;QAA+B,OAAO;YAAC,iBAAiB;QAAQ;sBACzG,gCAAC,CAAA,GAAA,cAAM;QAAE,QAAQ,cAAc,YAAY;QAAM,SAAS;qBACxD,gCAAC;QAAW,UAAU;QAAU,cAAc;QAAc,UAAU;QAAU,OAAO;SAExF;AAGP;AAEA,4GAA4G;AAC5G,SAAS,iCAAW,UAAC,MAAM,YA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AAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;QAAyC,GAAE;QAAI,GAAE;QAAI,OAAM;QAAK,QAAO;sBAChH,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;QAAsC,GAAE;QAAI,GAAE;QAAI,OAAM;QAAI,QAAO;sBAC5G,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;QAAsC,GAAE;QAAI,GAAE;QAAI,OAAM;QAAI,QAAO;uBAE9G,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;QACnC,GAAE;QACF,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;sBAC5B,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;QACnC,GAAE;QACF,MAAM;sBACR,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;QACnC,GAAE;;AAGV","sources":["packages/@react-spectrum/color/src/ColorThumb.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames} from '@react-spectrum/utils';\nimport {Color} from '@react-types/color';\nimport {Context} from '@react-spectrum/provider';\nimport {DOMProps, RefObject} from '@react-types/shared';\nimport {Overlay} from '@react-spectrum/overlays';\nimport React, {CSSProperties, ReactElement, useContext, useRef, useState} from 'react';\nimport stylesHandle from '@adobe/spectrum-css-temp/components/colorhandle/vars.css';\nimport stylesLoupe from '@adobe/spectrum-css-temp/components/colorloupe/vars.css';\nimport {useId, useLayoutEffect} from '@react-aria/utils';\n\ninterface ColorThumbProps extends DOMProps {\n value: Color,\n isDisabled?: boolean,\n isDragging?: boolean, // shows the color loupe\n isFocused?: boolean, // makes the circle larger\n className?: string,\n children?: ReactElement,\n style?: CSSProperties,\n containerRef?: RefObject<HTMLElement | null>\n}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', style, containerRef, ...otherProps} = props;\n\n let valueCSS = value.toString('css');\n let loupeRef = useRef<HTMLElement | null>(null);\n let provider = useContext(Context);\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} style={style} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <Overlay isOpen={isDragging && provider != null} nodeRef={loupeRef}>\n <ColorLoupe valueCSS={valueCSS} containerRef={containerRef} loupeRef={loupeRef} style={style} />\n </Overlay>\n {children}\n </div>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupe({isOpen, valueCSS, containerRef, loupeRef, style}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let thumbTop = style.top || '50%';\n if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) {\n thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;\n }\n\n let thumbLeft = style.left || '50%';\n if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) {\n thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;\n }\n\n return (\n <svg\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isOpen})}\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft\n }}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-background')} x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={valueCSS} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-outer')}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n\nexport {ColorThumb};\n"],"names":[],"version":3,"file":"ColorThumb.module.js.map"}
@@ -88,7 +88,6 @@ function $63a2864687444ae1$var$ColorWheel(props, ref) {
88
88
  style: {
89
89
  ...styleProps.style,
90
90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AAE;IAE/B,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mCAAY,EAAE;QACvD,GAAG,KAAK;QACR,aAAa,cAAc;QAC3B,aAAa;IACf,GAAG,OAAO;IAEV,IAAI,cAAC,UAAU,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,kCAAW;IAE9C,qBACE,0DAAC;QACC,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,uBACA;YACE,eAAe;QACjB,GACA,WAAW,SAAS;QAGxB,KAAK;QACL,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,sEAAsE;YACtE,aAAa;YACb,SAAS;YACT,UAAU;QACZ;qBACA,0DAAC;QAAK,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBACnD,0DAAC,CAAA,GAAA,oCAAS;QACR,OAAO,MAAM,eAAe;QAC5B,WAAW;QACX,YAAY;QACZ,YAAY,MAAM,UAAU;QAC5B,cAAc;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC7B,GAAG,UAAU;qBACd,0DAAC;QAAO,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAAgC,GAAG,UAAU;QAAE,KAAK;;AAIjH;AAEA;;CAEC,GACD,IAAI,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/color/src/ColorWheel.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames, dimensionValue, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {ColorWheelContext, useContextProps} from 'react-aria-components';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {SpectrumColorWheelProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorwheel/vars.css';\nimport {useColorWheel} from '@react-aria/color';\nimport {useColorWheelState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useResizeObserver} from '@react-aria/utils';\n\nconst WHEEL_THICKNESS = 24;\n\nfunction ColorWheel(props: SpectrumColorWheelProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorWheelContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let [wheelRadius, setWheelRadius] = useState<number>(0);\n let [wheelThickness, setWheelThickness] = useState(WHEEL_THICKNESS);\n\n let resizeHandler = useCallback(() => {\n if (containerRef.current) {\n setWheelRadius(containerRef.current.offsetWidth / 2);\n let thickness = window.getComputedStyle(containerRef.current)\n .getPropertyValue('--spectrum-colorwheel-track-thickness');\n if (thickness) {\n setWheelThickness(parseInt(thickness, 10));\n }\n }\n }, [containerRef, setWheelRadius, setWheelThickness]);\n\n useEffect(() => {\n // the size observer's fallback to the window resize event doesn't fire on mount\n if (wheelRadius === 0) {\n resizeHandler();\n }\n }, [wheelRadius, resizeHandler]);\n\n useResizeObserver({\n ref: containerRef,\n onResize: resizeHandler\n });\n\n let state = useColorWheelState(props);\n\n let {trackProps, inputProps, thumbProps} = useColorWheel({\n ...props,\n innerRadius: wheelRadius - wheelThickness,\n outerRadius: wheelRadius\n }, state, inputRef);\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-ColorWheel',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n // @ts-ignore\n 'width': size,\n 'height': size\n }}>\n <div {...trackProps} className={classNames(styles, 'spectrum-ColorWheel-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\n className={classNames(styles, 'spectrum-ColorWheel-handle')}\n {...thumbProps}>\n <input {...focusProps} className={classNames(styles, 'spectrum-ColorWheel-slider')} {...inputProps} ref={inputRef} />\n </ColorThumb>\n </div>\n );\n}\n\n/**\n * ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nlet _ColorWheel = React.forwardRef(ColorWheel);\nexport {_ColorWheel as ColorWheel};\n"],"names":[],"version":3,"file":"ColorWheel.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAeD,MAAM,wCAAkB;AAExB,SAAS,iCAAW,KAA8B,EAAE,GAAiC;IACnF,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,eAAe,CAAA,GAAA,yCAAc,EAAE,KAAK;IACxC,CAAC,OAAO,aAAa,GAAG,CAAA,GAAA,0CAAc,EAAE,OAAO,cAAc,CAAA,GAAA,4CAAgB;IAE7E,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,OAAO,MAAM,IAAI,IAAI,CAAA,GAAA,wCAAa,EAAE,MAAM,IAAI;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAGjC,IAAI,CAAC,aAAa,eAAe,GAAG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AA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC7B,GAAG,UAAU;qBACd,0DAAC;QAAO,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAAgC,GAAG,UAAU;QAAE,KAAK;;AAIjH;AAEA;;CAEC,GACD,IAAI,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/color/src/ColorWheel.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames, dimensionValue, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {ColorWheelContext, useContextProps} from 'react-aria-components';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {SpectrumColorWheelProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorwheel/vars.css';\nimport {useColorWheel} from '@react-aria/color';\nimport {useColorWheelState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useResizeObserver} from '@react-aria/utils';\n\nconst WHEEL_THICKNESS = 24;\n\nfunction ColorWheel(props: SpectrumColorWheelProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorWheelContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let [wheelRadius, setWheelRadius] = useState<number>(0);\n let [wheelThickness, setWheelThickness] = useState(WHEEL_THICKNESS);\n\n let resizeHandler = useCallback(() => {\n if (containerRef.current) {\n setWheelRadius(containerRef.current.offsetWidth / 2);\n let thickness = window.getComputedStyle(containerRef.current)\n .getPropertyValue('--spectrum-colorwheel-track-thickness');\n if (thickness) {\n setWheelThickness(parseInt(thickness, 10));\n }\n }\n }, [containerRef, setWheelRadius, setWheelThickness]);\n\n useEffect(() => {\n // the size observer's fallback to the window resize event doesn't fire on mount\n if (wheelRadius === 0) {\n resizeHandler();\n }\n }, [wheelRadius, resizeHandler]);\n\n useResizeObserver({\n ref: containerRef,\n onResize: resizeHandler\n });\n\n let state = useColorWheelState(props);\n\n let {trackProps, inputProps, thumbProps} = useColorWheel({\n ...props,\n innerRadius: wheelRadius - wheelThickness,\n outerRadius: wheelRadius\n }, state, inputRef);\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-ColorWheel',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n 'width': size,\n 'height': size\n }}>\n <div {...trackProps} className={classNames(styles, 'spectrum-ColorWheel-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\n className={classNames(styles, 'spectrum-ColorWheel-handle')}\n {...thumbProps}>\n <input {...focusProps} className={classNames(styles, 'spectrum-ColorWheel-slider')} {...inputProps} ref={inputRef} />\n </ColorThumb>\n </div>\n );\n}\n\n/**\n * ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nlet _ColorWheel = React.forwardRef(ColorWheel);\nexport {_ColorWheel as ColorWheel};\n"],"names":[],"version":3,"file":"ColorWheel.main.js.map"}
@@ -82,7 +82,6 @@ function $3aac1c27203f04b5$var$ColorWheel(props, ref) {
82
82
  style: {
83
83
  ...styleProps.style,
84
84
  // Workaround around https://github.com/adobe/spectrum-css/issues/1032
85
- // @ts-ignore
86
85
  'width': size,
87
86
  'height': size
88
87
  }
@@ -82,7 +82,6 @@ function $3aac1c27203f04b5$var$ColorWheel(props, ref) {
82
82
  style: {
83
83
  ...styleProps.style,
84
84
  // Workaround around https://github.com/adobe/spectrum-css/issues/1032
85
- // @ts-ignore
86
85
  'width': size,
87
86
  'height': size
88
87
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAeD,MAAM,wCAAkB;AAExB,SAAS,iCAAW,KAA8B,EAAE,GAAiC;IACnF,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,eAAe,CAAA,GAAA,sBAAc,EAAE,KAAK;IACxC,CAAC,OAAO,aAAa,GAAG,CAAA,GAAA,sBAAc,EAAE,OAAO,cAAc,CAAA,GAAA,wBAAgB;IAE7E,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,OAAO,MAAM,IAAI,IAAI,CAAA,GAAA,qBAAa,EAAE,MAAM,IAAI;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAGjC,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,eAAO,EAAU;IACrD,IAAI,CAAC,gBAAgB,kBAAkB,GAAG,CAAA,GAAA,eAAO,EAAE;IAEnD,IAAI,gBAAgB,CAAA,GAAA,kBAAU,EAAE;QAC9B,IAAI,aAAa,OAAO,EAAE;YACxB,eAAe,aAAa,OAAO,CAAC,WAAW,GAAG;YAClD,IAAI,YAAY,OAAO,gBAAgB,CAAC,aAAa,OAAO,EACzD,gBAAgB,CAAC;YACpB,IAAI,WACF,kBAAkB,SAAS,WAAW;QAE1C;IACF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* Copyright 2020 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 {classNames, dimensionValue, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {ColorWheelContext, useContextProps} from 'react-aria-components';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {SpectrumColorWheelProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorwheel/vars.css';\nimport {useColorWheel} from '@react-aria/color';\nimport {useColorWheelState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useResizeObserver} from '@react-aria/utils';\n\nconst WHEEL_THICKNESS = 24;\n\nfunction ColorWheel(props: SpectrumColorWheelProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorWheelContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let [wheelRadius, setWheelRadius] = useState<number>(0);\n let [wheelThickness, setWheelThickness] = useState(WHEEL_THICKNESS);\n\n let resizeHandler = useCallback(() => {\n if (containerRef.current) {\n setWheelRadius(containerRef.current.offsetWidth / 2);\n let thickness = window.getComputedStyle(containerRef.current)\n .getPropertyValue('--spectrum-colorwheel-track-thickness');\n if (thickness) {\n setWheelThickness(parseInt(thickness, 10));\n }\n }\n }, [containerRef, setWheelRadius, setWheelThickness]);\n\n useEffect(() => {\n // the size observer's fallback to the window resize event doesn't fire on mount\n if (wheelRadius === 0) {\n resizeHandler();\n }\n }, [wheelRadius, resizeHandler]);\n\n useResizeObserver({\n ref: containerRef,\n onResize: resizeHandler\n });\n\n let state = useColorWheelState(props);\n\n let {trackProps, inputProps, thumbProps} = useColorWheel({\n ...props,\n innerRadius: wheelRadius - wheelThickness,\n outerRadius: wheelRadius\n }, state, inputRef);\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-ColorWheel',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n // @ts-ignore\n 'width': size,\n 'height': size\n }}>\n <div {...trackProps} className={classNames(styles, 'spectrum-ColorWheel-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\n className={classNames(styles, 'spectrum-ColorWheel-handle')}\n {...thumbProps}>\n <input {...focusProps} className={classNames(styles, 'spectrum-ColorWheel-slider')} {...inputProps} ref={inputRef} />\n </ColorThumb>\n </div>\n );\n}\n\n/**\n * ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nlet _ColorWheel = React.forwardRef(ColorWheel);\nexport {_ColorWheel as ColorWheel};\n"],"names":[],"version":3,"file":"ColorWheel.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAeD,MAAM,wCAAkB;AAExB,SAAS,iCAAW,KAA8B,EAAE,GAAiC;IACnF,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,eAAe,CAAA,GAAA,sBAAc,EAAE,KAAK;IACxC,CAAC,OAAO,aAAa,GAAG,CAAA,GAAA,sBAAc,EAAE,OAAO,cA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ACZ;qBACA,gCAAC;QAAK,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;sBACnD,gCAAC,CAAA,GAAA,wCAAS;QACR,OAAO,MAAM,eAAe;QAC5B,WAAW;QACX,YAAY;QACZ,YAAY,MAAM,UAAU;QAC5B,cAAc;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;QAC7B,GAAG,UAAU;qBACd,gCAAC;QAAO,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;QAAgC,GAAG,UAAU;QAAE,KAAK;;AAIjH;AAEA;;CAEC,GACD,IAAI,0DAAc,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/color/src/ColorWheel.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames, dimensionValue, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {ColorWheelContext, useContextProps} from 'react-aria-components';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {useCallback, useEffect, useRef, useState} from 'react';\nimport {SpectrumColorWheelProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorwheel/vars.css';\nimport {useColorWheel} from '@react-aria/color';\nimport {useColorWheelState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useResizeObserver} from '@react-aria/utils';\n\nconst WHEEL_THICKNESS = 24;\n\nfunction ColorWheel(props: SpectrumColorWheelProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorWheelContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let [wheelRadius, setWheelRadius] = useState<number>(0);\n let [wheelThickness, setWheelThickness] = useState(WHEEL_THICKNESS);\n\n let resizeHandler = useCallback(() => {\n if (containerRef.current) {\n setWheelRadius(containerRef.current.offsetWidth / 2);\n let thickness = window.getComputedStyle(containerRef.current)\n .getPropertyValue('--spectrum-colorwheel-track-thickness');\n if (thickness) {\n setWheelThickness(parseInt(thickness, 10));\n }\n }\n }, [containerRef, setWheelRadius, setWheelThickness]);\n\n useEffect(() => {\n // the size observer's fallback to the window resize event doesn't fire on mount\n if (wheelRadius === 0) {\n resizeHandler();\n }\n }, [wheelRadius, resizeHandler]);\n\n useResizeObserver({\n ref: containerRef,\n onResize: resizeHandler\n });\n\n let state = useColorWheelState(props);\n\n let {trackProps, inputProps, thumbProps} = useColorWheel({\n ...props,\n innerRadius: wheelRadius - wheelThickness,\n outerRadius: wheelRadius\n }, state, inputRef);\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-ColorWheel',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n 'width': size,\n 'height': size\n }}>\n <div {...trackProps} className={classNames(styles, 'spectrum-ColorWheel-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\n className={classNames(styles, 'spectrum-ColorWheel-handle')}\n {...thumbProps}>\n <input {...focusProps} className={classNames(styles, 'spectrum-ColorWheel-slider')} {...inputProps} ref={inputRef} />\n </ColorThumb>\n </div>\n );\n}\n\n/**\n * ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nlet _ColorWheel = React.forwardRef(ColorWheel);\nexport {_ColorWheel as ColorWheel};\n"],"names":[],"version":3,"file":"ColorWheel.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAA0D,CAAC,4CAA4C,CAAC;AACxG,4CAA+B,CAAC,kBAAkB,EAAE,0CAAwD,CAAC;AAC7G,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,kBAAkB,EAAE,0CAAwD,CAAC;AAC7G,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA+C,CAAC,iCAAiC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorhandle_vars_css.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAA0D,CAAC,4CAA4C,CAAC;AACxG,4CAA+B,CAAC,kBAAkB,EAAE,2CAAyD;AAC7G,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,kBAAkB,EAAE,2CAAyD;AAC7G,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA+C,CAAC,iCAAiC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorhandle_vars_css.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAA0D,CAAC,4CAA4C,CAAC;AACxG,4CAA+B,CAAC,kBAAkB,EAAE,0CAAwD,CAAC;AAC7G,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,kBAAkB,EAAE,0CAAwD,CAAC;AAC7G,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA+C,CAAC,iCAAiC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorhandle_vars_css.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAA0D,CAAC,4CAA4C,CAAC;AACxG,4CAA+B,CAAC,kBAAkB,EAAE,2CAAyD;AAC7G,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,kBAAkB,EAAE,2CAAyD;AAC7G,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA+C,CAAC,iCAAiC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorhandle_vars_css.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAdA,0CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAA+D,CAAC,iDAAiD,CAAC;AAClH,4CAA6D,CAAC,+CAA+C,CAAC;AAC9G,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,2CAAgD,CAAC,mCAAmC,EAAE,0CAAoD,CAAC;AAC3I,4CAAoD,CAAC,sCAAsC,CAAC;AAC5F,4CAA0B,CAAC,YAAY,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorslider/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorslider_vars_css.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAdA,0CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAA+D,CAAC,iDAAiD,CAAC;AAClH,4CAA6D,CAAC,+CAA+C,CAAC;AAC9G,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,2CAAgD,CAAC,mCAAmC,EAAE,2CAAqD;AAC3I,4CAAoD,CAAC,sCAAsC,CAAC;AAC5F,4CAA0B,CAAC,YAAY,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorslider/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorslider_vars_css.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAdA,0CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAA+D,CAAC,iDAAiD,CAAC;AAClH,4CAA6D,CAAC,+CAA+C,CAAC;AAC9G,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,2CAAgD,CAAC,mCAAmC,EAAE,0CAAoD,CAAC;AAC3I,4CAAoD,CAAC,sCAAsC,CAAC;AAC5F,4CAA0B,CAAC,YAAY,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorslider/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorslider_vars_css.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAdA,0CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAA+D,CAAC,iDAAiD,CAAC;AAClH,4CAA6D,CAAC,+CAA+C,CAAC;AAC9G,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAAwD,CAAC,0CAA0C,CAAC;AACpG,2CAAgD,CAAC,mCAAmC,EAAE,2CAAqD;AAC3I,4CAAoD,CAAC,sCAAsC,CAAC;AAC5F,4CAA0B,CAAC,YAAY,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorslider/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorslider_vars_css.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AARA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAA+C,CAAC,iCAAiC,CAAC;AAClF,2CAAgD,CAAC,kCAAkC,CAAC;AACpF,2CAA+C,CAAC,kCAAkC,EAAE,0CAAoD,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorwheel_vars_css.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AARA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAA+C,CAAC,iCAAiC,CAAC;AAClF,2CAAgD,CAAC,kCAAkC,CAAC;AACpF,2CAA+C,CAAC,kCAAkC,EAAE,2CAAqD","sources":["packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorwheel_vars_css.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AARA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAA+C,CAAC,iCAAiC,CAAC;AAClF,2CAAgD,CAAC,kCAAkC,CAAC;AACpF,2CAA+C,CAAC,kCAAkC,EAAE,0CAAoD,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorwheel_vars_css.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AARA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAA+C,CAAC,iCAAiC,CAAC;AAClF,2CAAgD,CAAC,kCAAkC,CAAC;AACpF,2CAA+C,CAAC,kCAAkC,EAAE,2CAAqD","sources":["packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"colorwheel_vars_css.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;ACqFA;;GAEG;AACH,OAAA,IAAI,WAA4C,CAAC,KAAK,EAAE,sBAAsB,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACqBvI;;GAEG;AACH,OAAA,IAAI,6IAA0C,CAAC;AC2B/C;;GAEG;AACH,OAAA,IAAI,+IAA4C,CAAC;ACtGjD;;GAEG;AACH,OAAA,MAAM,0HAA0C,CAAC;ACvBjD,yCAA0C,SAAQ,oBAAoB,EAAE,UAAU;IAChF;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;CACvC;AAkED;;GAEG;AACH,OAAA,IAAI,yHAAsC,CAAC;AC9E3C,yCAA0C,SAAQ,UAAU,MAAM,GAAG,KAAK,EAAE,KAAK,CAAC,EAAE,iBAAiB;IACnG,2CAA2C;IAC3C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;CACvC;AAiFD;;GAEG;AACH,OAAA,IAAI,qJAA4C,CAAC;AC3GjD;IACE,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAyCD;;GAEG;AACH,OAAA,IAAI,yHAA4C,CAAC;ACzCjD,+CAAgD,SAAQ,UAAU,MAAM,GAAG,OAAK,EAAE,OAAK,CAAC,EAAE,UAAU;IAClG,sDAAsD;IACtD,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAA;CACvC;AAmCD;;GAEG;AACH,OAAA,IAAI,qIAAkD,CAAC;ACvDvD,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAClE,YAAY,EAAC,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,oBAAoB,CAAC;AAK3I,YAAY,EAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorThumb.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorArea.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorWheel.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorSlider.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorField.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorSwatch.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorPicker.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorEditor.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorSwatchPicker.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/index.ts","packages/@react-spectrum/color/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 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\n/// <reference types=\"css-module-types\" />\nexport {ColorArea} from './ColorArea';\nexport {ColorWheel} from './ColorWheel';\nexport {ColorSlider} from './ColorSlider';\nexport {ColorField} from './ColorField';\nexport {ColorSwatch} from './ColorSwatch';\nexport {ColorPicker} from './ColorPicker';\nexport {ColorEditor} from './ColorEditor';\nexport {ColorSwatchPicker} from './ColorSwatchPicker';\nexport {parseColor, getColorChannels} from '@react-stately/color';\nexport type {SpectrumColorAreaProps, SpectrumColorFieldProps, SpectrumColorSliderProps, SpectrumColorWheelProps} from '@react-types/color';\nexport type {SpectrumColorSwatchProps} from './ColorSwatch';\nexport type {SpectrumColorPickerProps} from './ColorPicker';\nexport type {SpectrumColorEditorProps} from './ColorEditor';\nexport type {SpectrumColorSwatchPickerProps} from './ColorSwatchPicker';\nexport type {Color, ColorSpace, ColorFormat} from '@react-types/color';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;;;ACqFA;;GAEG;AACH,OAAA,IAAI,WAA4C,CAAC,KAAK,EAAE,sBAAsB,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACoBvI;;GAEG;AACH,OAAA,IAAI,6IAA0C,CAAC;AC4B/C;;GAEG;AACH,OAAA,IAAI,+IAA4C,CAAC;ACtGjD;;GAEG;AACH,OAAA,MAAM,0HAA0C,CAAC;ACvBjD,yCAA0C,SAAQ,oBAAoB,EAAE,UAAU;IAChF;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,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AAY,EAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorThumb.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorArea.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorWheel.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorSlider.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorField.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorSwatch.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorPicker.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorEditor.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/ColorSwatchPicker.tsx","packages/@react-spectrum/color/src/packages/@react-spectrum/color/src/index.ts","packages/@react-spectrum/color/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 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\n/// <reference types=\"css-module-types\" />\nexport {ColorArea} from './ColorArea';\nexport {ColorWheel} from './ColorWheel';\nexport {ColorSlider} from './ColorSlider';\nexport {ColorField} from './ColorField';\nexport {ColorSwatch} from './ColorSwatch';\nexport {ColorPicker} from './ColorPicker';\nexport {ColorEditor} from './ColorEditor';\nexport {ColorSwatchPicker} from './ColorSwatchPicker';\nexport {parseColor, getColorChannels} from '@react-stately/color';\nexport type {SpectrumColorAreaProps, SpectrumColorFieldProps, SpectrumColorSliderProps, SpectrumColorWheelProps} from '@react-types/color';\nexport type {SpectrumColorSwatchProps} from './ColorSwatch';\nexport type {SpectrumColorPickerProps} from './ColorPicker';\nexport type {SpectrumColorEditorProps} from './ColorEditor';\nexport type {SpectrumColorSwatchPickerProps} from './ColorSwatchPicker';\nexport type {Color, ColorSpace, ColorFormat} from '@react-types/color';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/color",
3
- "version": "3.0.0-nightly-3f44370de-241118",
3
+ "version": "3.0.0-nightly-b3a4d6c11-241119",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,34 +36,34 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/color": "^3.0.0-nightly-3f44370de-241118",
40
- "@react-aria/focus": "^3.0.0-nightly-3f44370de-241118",
41
- "@react-aria/i18n": "^3.0.0-nightly-3f44370de-241118",
42
- "@react-aria/interactions": "^3.0.0-nightly-3f44370de-241118",
43
- "@react-aria/utils": "^3.0.0-nightly-3f44370de-241118",
44
- "@react-spectrum/dialog": "^3.0.0-nightly-3f44370de-241118",
45
- "@react-spectrum/form": "^3.0.0-nightly-3f44370de-241118",
46
- "@react-spectrum/label": "^3.0.0-nightly-3f44370de-241118",
47
- "@react-spectrum/overlays": "^3.0.0-nightly-3f44370de-241118",
48
- "@react-spectrum/picker": "^3.0.0-nightly-3f44370de-241118",
49
- "@react-spectrum/textfield": "^3.0.0-nightly-3f44370de-241118",
50
- "@react-spectrum/utils": "^3.0.0-nightly-3f44370de-241118",
51
- "@react-spectrum/view": "^3.0.0-nightly-3f44370de-241118",
52
- "@react-stately/color": "^3.0.0-nightly-3f44370de-241118",
53
- "@react-types/color": "^3.0.0-nightly-3f44370de-241118",
54
- "@react-types/shared": "^3.0.0-nightly-3f44370de-241118",
55
- "@react-types/textfield": "^3.0.0-nightly-3f44370de-241118",
39
+ "@react-aria/color": "^3.0.0-nightly-b3a4d6c11-241119",
40
+ "@react-aria/focus": "^3.0.0-nightly-b3a4d6c11-241119",
41
+ "@react-aria/i18n": "^3.0.0-nightly-b3a4d6c11-241119",
42
+ "@react-aria/interactions": "^3.0.0-nightly-b3a4d6c11-241119",
43
+ "@react-aria/utils": "^3.0.0-nightly-b3a4d6c11-241119",
44
+ "@react-spectrum/dialog": "^3.0.0-nightly-b3a4d6c11-241119",
45
+ "@react-spectrum/form": "^3.0.0-nightly-b3a4d6c11-241119",
46
+ "@react-spectrum/label": "^3.0.0-nightly-b3a4d6c11-241119",
47
+ "@react-spectrum/overlays": "^3.0.0-nightly-b3a4d6c11-241119",
48
+ "@react-spectrum/picker": "^3.0.0-nightly-b3a4d6c11-241119",
49
+ "@react-spectrum/textfield": "^3.0.0-nightly-b3a4d6c11-241119",
50
+ "@react-spectrum/utils": "^3.0.0-nightly-b3a4d6c11-241119",
51
+ "@react-spectrum/view": "^3.0.0-nightly-b3a4d6c11-241119",
52
+ "@react-stately/color": "^3.0.0-nightly-b3a4d6c11-241119",
53
+ "@react-types/color": "^3.0.0-nightly-b3a4d6c11-241119",
54
+ "@react-types/shared": "^3.0.0-nightly-b3a4d6c11-241119",
55
+ "@react-types/textfield": "^3.0.0-nightly-b3a4d6c11-241119",
56
56
  "@swc/helpers": "^0.5.0",
57
- "react-aria-components": "^3.0.0-nightly-3f44370de-241118"
57
+ "react-aria-components": "^3.0.0-nightly-b3a4d6c11-241119"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1",
61
- "@react-spectrum/style-macro-s1": "3.0.0-nightly-3f44370de-241118"
61
+ "@react-spectrum/style-macro-s1": "3.0.0-nightly-b3a4d6c11-241119"
62
62
  },
63
63
  "peerDependencies": {
64
- "@react-spectrum/provider": "^3.0.0-nightly-3f44370de-241118",
65
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0",
66
- "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
64
+ "@react-spectrum/provider": "^3.0.0-nightly-b3a4d6c11-241119",
65
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
66
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
67
67
  },
68
68
  "publishConfig": {
69
69
  "access": "public"
@@ -12,13 +12,13 @@
12
12
 
13
13
  import {classNames} from '@react-spectrum/utils';
14
14
  import {Color} from '@react-types/color';
15
+ import {Context} from '@react-spectrum/provider';
15
16
  import {DOMProps, RefObject} from '@react-types/shared';
16
17
  import {Overlay} from '@react-spectrum/overlays';
17
- import React, {CSSProperties, ReactElement, useRef, useState} from 'react';
18
+ import React, {CSSProperties, ReactElement, useContext, useRef, useState} from 'react';
18
19
  import stylesHandle from '@adobe/spectrum-css-temp/components/colorhandle/vars.css';
19
20
  import stylesLoupe from '@adobe/spectrum-css-temp/components/colorloupe/vars.css';
20
21
  import {useId, useLayoutEffect} from '@react-aria/utils';
21
- import {useProvider} from '@react-spectrum/provider';
22
22
 
23
23
  interface ColorThumbProps extends DOMProps {
24
24
  value: Color,
@@ -36,7 +36,7 @@ function ColorThumb(props: ColorThumbProps) {
36
36
 
37
37
  let valueCSS = value.toString('css');
38
38
  let loupeRef = useRef<HTMLElement | null>(null);
39
- let provider = useProvider();
39
+ let provider = useContext(Context);
40
40
 
41
41
  return (
42
42
  <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} style={style} {...otherProps}>
@@ -88,7 +88,6 @@ function ColorWheel(props: SpectrumColorWheelProps, ref: FocusableRef<HTMLDivEle
88
88
  style={{
89
89
  ...styleProps.style,
90
90
  // Workaround around https://github.com/adobe/spectrum-css/issues/1032
91
- // @ts-ignore
92
91
  'width': size,
93
92
  'height': size
94
93
  }}>