@react-spectrum/color 3.0.0-nightly.3173 → 3.0.0-nightly.3183

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.
package/dist/main.js CHANGED
@@ -1,15 +1,15 @@
1
1
  require("./main.css");
2
2
  var $aAzec$reactspectrumutils = require("@react-spectrum/utils");
3
- var $aAzec$reactariacolor = require("@react-aria/color");
4
3
  var $aAzec$reactariautils = require("@react-aria/utils");
5
4
  var $aAzec$react = require("react");
5
+ var $aAzec$reactariacolor = require("@react-aria/color");
6
6
  var $aAzec$reactstatelycolor = require("@react-stately/color");
7
7
  var $aAzec$reactariafocus = require("@react-aria/focus");
8
- var $aAzec$reactariai18n = require("@react-aria/i18n");
9
8
  var $aAzec$reactspectrumprovider = require("@react-spectrum/provider");
10
9
  var $aAzec$reactspectrumlayout = require("@react-spectrum/layout");
11
10
  var $aAzec$reactspectrumlabel = require("@react-spectrum/label");
12
11
  var $aAzec$reactariainteractions = require("@react-aria/interactions");
12
+ var $aAzec$reactariai18n = require("@react-aria/i18n");
13
13
  var $aAzec$reactspectrumtextfield = require("@react-spectrum/textfield");
14
14
 
15
15
  function $parcel$exportWildcard(dest, source) {
@@ -141,7 +141,6 @@ function $2b9adc23f6c7cae1$export$a3cc47cee1c1ccc(props) {
141
141
 
142
142
 
143
143
 
144
-
145
144
  var $d4b4e0a63f9ca8c1$exports = {};
146
145
 
147
146
  $parcel$export($d4b4e0a63f9ca8c1$exports, "spectrum-ColorArea", () => $d4b4e0a63f9ca8c1$export$bb6257a55a3c1efc, (v) => $d4b4e0a63f9ca8c1$export$bb6257a55a3c1efc = v);
@@ -183,21 +182,12 @@ function $5f016e950c2dc3a6$var$ColorArea(props, ref) {
183
182
  let inputYRef = $aAzec$react.useRef();
184
183
  let containerRef = $aAzec$reactspectrumutils.useFocusableRef(ref, inputXRef);
185
184
  let state = $aAzec$reactstatelycolor.useColorAreaState(props);
186
- let { channels: { xChannel: xChannel , zChannel: zChannel } } = state;
187
185
  let { colorAreaProps: colorAreaProps , gradientProps: gradientProps , xInputProps: xInputProps , yInputProps: yInputProps , thumbProps: thumbProps } = $aAzec$reactariacolor.useColorArea({
188
186
  ...props,
189
187
  inputXRef: inputXRef,
190
188
  inputYRef: inputYRef,
191
189
  containerRef: containerRef
192
190
  }, state);
193
- let { direction: direction } = $aAzec$reactariai18n.useLocale();
194
- let { colorAreaStyleProps: colorAreaStyleProps , gradientStyleProps: gradientStyleProps , thumbStyleProps: thumbStyleProps } = $5f016e950c2dc3a6$var$useGradients({
195
- direction: direction,
196
- state: state,
197
- xChannel: xChannel,
198
- zChannel: zChannel,
199
- isDisabled: props.isDisabled
200
- });
201
191
  let { focusProps: focusProps , isFocusVisible: isFocusVisible } = $aAzec$reactariafocus.useFocusRing();
202
192
  return(/*#__PURE__*/ ($parcel$interopDefault($aAzec$react)).createElement("div", {
203
193
  ...colorAreaProps,
@@ -206,7 +196,7 @@ function $5f016e950c2dc3a6$var$ColorArea(props, ref) {
206
196
  }, styleProps.className),
207
197
  ref: containerRef,
208
198
  style: {
209
- ...colorAreaStyleProps.style,
199
+ ...colorAreaProps.style,
210
200
  ...styleProps.style,
211
201
  // Workaround around https://github.com/adobe/spectrum-css/issues/1032
212
202
  width: size,
@@ -214,7 +204,6 @@ function $5f016e950c2dc3a6$var$ColorArea(props, ref) {
214
204
  }
215
205
  }, /*#__PURE__*/ ($parcel$interopDefault($aAzec$react)).createElement("div", {
216
206
  ...gradientProps,
217
- ...gradientStyleProps,
218
207
  className: $aAzec$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($d4b4e0a63f9ca8c1$exports)), 'spectrum-ColorArea-gradient')
219
208
  }), /*#__PURE__*/ ($parcel$interopDefault($aAzec$react)).createElement($2b9adc23f6c7cae1$export$a3cc47cee1c1ccc, {
220
209
  value: state.getDisplayColor(),
@@ -222,8 +211,7 @@ function $5f016e950c2dc3a6$var$ColorArea(props, ref) {
222
211
  isDisabled: isDisabled,
223
212
  isDragging: state.isDragging,
224
213
  className: $aAzec$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($d4b4e0a63f9ca8c1$exports)), 'spectrum-ColorArea-handle'),
225
- ...thumbProps,
226
- ...thumbStyleProps
214
+ ...thumbProps
227
215
  }, /*#__PURE__*/ ($parcel$interopDefault($aAzec$react)).createElement("div", {
228
216
  role: "presentation"
229
217
  }, /*#__PURE__*/ ($parcel$interopDefault($aAzec$react)).createElement("input", {
@@ -237,81 +225,6 @@ function $5f016e950c2dc3a6$var$ColorArea(props, ref) {
237
225
  })))));
238
226
  }
239
227
  let $5f016e950c2dc3a6$export$b2103f68a961418e = /*#__PURE__*/ ($parcel$interopDefault($aAzec$react)).forwardRef($5f016e950c2dc3a6$var$ColorArea);
240
- function $5f016e950c2dc3a6$var$useGradients({ direction: direction , state: state , zChannel: zChannel , xChannel: xChannel , isDisabled: isDisabled }) {
241
- let orientation = [
242
- 'top',
243
- direction === 'rtl' ? 'left' : 'right'
244
- ];
245
- let dir = false;
246
- let background = {
247
- colorAreaStyles: {
248
- },
249
- gradientStyles: {
250
- }
251
- };
252
- let zValue = state.value.getChannelValue(zChannel);
253
- let { minValue: zMin , maxValue: zMax } = state.value.getChannelRange(zChannel);
254
- let alphaValue = (zValue - zMin) / (zMax - zMin);
255
- let isHSL = state.value.getColorSpace() === 'hsl';
256
- if (!isDisabled) switch(zChannel){
257
- case 'red':
258
- dir = xChannel === 'green';
259
- background = $aAzec$reactariacolor.generateRGB_R(orientation, dir, zValue);
260
- break;
261
- case 'green':
262
- dir = xChannel === 'red';
263
- background = $aAzec$reactariacolor.generateRGB_G(orientation, dir, zValue);
264
- break;
265
- case 'blue':
266
- dir = xChannel === 'red';
267
- background = $aAzec$reactariacolor.generateRGB_B(orientation, dir, zValue);
268
- break;
269
- case 'hue':
270
- dir = xChannel !== 'saturation';
271
- if (isHSL) background = $aAzec$reactariacolor.generateHSL_H(orientation, dir, zValue);
272
- else background = $aAzec$reactariacolor.generateHSB_H(orientation, dir, zValue);
273
- break;
274
- case 'saturation':
275
- dir = xChannel === 'hue';
276
- if (isHSL) background = $aAzec$reactariacolor.generateHSL_S(orientation, dir, alphaValue);
277
- else background = $aAzec$reactariacolor.generateHSB_S(orientation, dir, alphaValue);
278
- break;
279
- case 'brightness':
280
- dir = xChannel === 'hue';
281
- background = $aAzec$reactariacolor.generateHSB_B(orientation, dir, alphaValue);
282
- break;
283
- case 'lightness':
284
- dir = xChannel === 'hue';
285
- background = $aAzec$reactariacolor.generateHSL_L(orientation, dir, zValue);
286
- break;
287
- }
288
- let { x: x , y: y } = state.getThumbPosition();
289
- if (direction === 'rtl') x = 1 - x;
290
- return {
291
- colorAreaStyleProps: {
292
- style: {
293
- position: 'relative',
294
- touchAction: 'none',
295
- ...background.colorAreaStyles
296
- }
297
- },
298
- gradientStyleProps: {
299
- style: {
300
- touchAction: 'none',
301
- ...background.gradientStyles
302
- }
303
- },
304
- thumbStyleProps: {
305
- style: {
306
- position: 'absolute',
307
- left: `${x * 100}%`,
308
- top: `${y * 100}%`,
309
- transform: 'translate(0%, 0%)',
310
- touchAction: 'none'
311
- }
312
- }
313
- };
314
- }
315
228
 
316
229
 
317
230
  var $63a2864687444ae1$exports = {};
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAsC;AACtC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4C;AAJ5C,yCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;AACpD,yCAA4C,GAAG,CAAmC;;;;;;;;;;ACJlF,GAAqC;AACrC,GAAyB;AACzB,GAA2C;AAC3C,GAAsD;AACtD,GAAmD;AAJnD,yCAAqC,GAAG,CAA4B;AACpE,yCAAyB,GAAG,CAAgB;AAC5C,yCAA2C,GAAG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AAG,mCAAa,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ;IAE7C,MAAM,oEACH,2CAAa;WACR,UAAU;QACd,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAiC;;AAE1E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,sCAAK,CAAC,UAAU,CAAC,gCAAU;;","sources":["packages/@react-spectrum/color/src/index.ts","packages/@react-spectrum/color/src/ColorArea.tsx","packages/@react-spectrum/color/src/ColorThumb.tsx","packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css","packages/@adobe/spectrum-css-temp/components/colorloupe/vars.css","packages/@adobe/spectrum-css-temp/components/colorarea/vars.css","packages/@react-spectrum/color/src/ColorWheel.tsx","packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css","packages/@react-spectrum/color/src/ColorSlider.tsx","packages/@adobe/spectrum-css-temp/components/colorslider/vars.css","packages/@react-spectrum/color/src/ColorField.tsx","packages/@react-spectrum/color/src/colorfield.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/// <reference types=\"css-module-types\" />\n\nexport * from './ColorArea';\nexport * from './ColorWheel';\nexport * from './ColorSlider';\nexport * from './ColorField';\n","/*\n * Copyright 2021 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 {FocusableRef} from '@react-types/shared';\nimport {\n generateHSB_B,\n generateHSB_H,\n generateHSB_S,\n generateHSL_H,\n generateHSL_L,\n generateHSL_S,\n generateRGB_B,\n generateRGB_G,\n generateRGB_R,\n useColorArea\n} from '@react-aria/color';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {CSSProperties, ReactElement, useRef} from 'react';\nimport {SpectrumColorAreaProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorarea/vars.css';\nimport {useColorAreaState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputXRef = useRef();\n let inputYRef = useRef();\n let containerRef = useFocusableRef(ref, inputXRef);\n\n let state = useColorAreaState(props);\n\n let {channels: {xChannel, zChannel}} = state;\n let {\n colorAreaProps,\n gradientProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({...props, inputXRef, inputYRef, containerRef}, state);\n let {direction} = useLocale();\n let {colorAreaStyleProps, gradientStyleProps, thumbStyleProps} = useGradients({direction, state, xChannel, zChannel, isDisabled: props.isDisabled});\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n {...colorAreaProps}\n className={\n classNames(\n styles,\n 'spectrum-ColorArea',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...colorAreaStyleProps.style,\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n width: size,\n height: size\n }}>\n <div {...gradientProps} {...gradientStyleProps} className={classNames(styles, 'spectrum-ColorArea-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n className={classNames(styles, 'spectrum-ColorArea-handle')}\n {...thumbProps}\n {...thumbStyleProps}>\n <div role=\"presentation\">\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(xInputProps, focusProps)} ref={inputXRef} />\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(yInputProps, focusProps)} ref={inputYRef} />\n </div>\n </ColorThumb>\n </div>\n );\n}\n\nlet _ColorArea = React.forwardRef(ColorArea) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\nexport {_ColorArea as ColorArea};\n\ninterface Gradients {\n colorAreaStyleProps: {\n style: CSSProperties\n },\n gradientStyleProps: {\n style: CSSProperties\n },\n thumbStyleProps: {\n style: CSSProperties\n }\n}\n\nfunction useGradients({direction, state, zChannel, xChannel, isDisabled}): Gradients {\n let orientation = ['top', direction === 'rtl' ? 'left' : 'right'];\n let dir = false;\n let background = {colorAreaStyles: {}, gradientStyles: {}};\n let zValue = state.value.getChannelValue(zChannel);\n let {minValue: zMin, maxValue: zMax} = state.value.getChannelRange(zChannel);\n let alphaValue = (zValue - zMin) / (zMax - zMin);\n let isHSL = state.value.getColorSpace() === 'hsl';\n if (!isDisabled) {\n switch (zChannel) {\n case 'red': {\n dir = xChannel === 'green';\n background = generateRGB_R(orientation, dir, zValue);\n break;\n }\n case 'green': {\n dir = xChannel === 'red';\n background = generateRGB_G(orientation, dir, zValue);\n break;\n }\n case 'blue': {\n dir = xChannel === 'red';\n background = generateRGB_B(orientation, dir, zValue);\n break;\n }\n case 'hue': {\n dir = xChannel !== 'saturation';\n if (isHSL) {\n background = generateHSL_H(orientation, dir, zValue);\n } else {\n background = generateHSB_H(orientation, dir, zValue);\n }\n break;\n }\n case 'saturation': {\n dir = xChannel === 'hue';\n if (isHSL) {\n background = generateHSL_S(orientation, dir, alphaValue);\n } else {\n background = generateHSB_S(orientation, dir, alphaValue);\n }\n break;\n }\n case 'brightness': {\n dir = xChannel === 'hue';\n background = generateHSB_B(orientation, dir, alphaValue);\n break;\n }\n case 'lightness': {\n dir = xChannel === 'hue';\n background = generateHSL_L(orientation, dir, zValue);\n break;\n }\n }\n }\n\n let {x, y} = state.getThumbPosition();\n\n if (direction === 'rtl') {\n x = 1 - x;\n }\n\n return {\n colorAreaStyleProps: {\n style: {\n position: 'relative',\n touchAction: 'none',\n ...background.colorAreaStyles\n }\n },\n gradientStyleProps: {\n style: {\n touchAction: 'none',\n ...background.gradientStyles\n }\n },\n thumbStyleProps: {\n style: {\n position: 'absolute',\n left: `${x * 100}%`,\n top: `${y * 100}%`,\n transform: 'translate(0%, 0%)',\n touchAction: 'none'\n }\n }\n };\n}\n","/*\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} from '@react-types/shared';\nimport React, {ReactElement} 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} 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}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', ...otherProps} = props;\n\n let patternId = useId();\n\n let valueCSS = value.toString('css');\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <svg className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isDragging})} 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 {children}\n </div>\n );\n}\n\nexport {ColorThumb};\n","/*\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","/*\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","/*\n * Copyright 2021 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","/*\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 {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\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n\n let [wheelRadius, setWheelRadius] = useState<number | null>(null);\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 == null) {\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 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","/*\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","/*\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {Flex} from '@react-spectrum/layout';\nimport {FocusableRef} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport React, {useRef, useState} from 'react';\nimport {SpectrumColorSliderProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorslider/vars.css';\nimport {useColorSlider} from '@react-aria/color';\nimport {useColorSliderState} from '@react-stately/color';\nimport {useFocus, useFocusVisible} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorSlider(props: SpectrumColorSliderProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n isDisabled,\n channel,\n orientation,\n label,\n showValueLabel,\n 'aria-label': ariaLabel\n } = props;\n let vertical = orientation === 'vertical';\n\n let {styleProps} = useStyleProps(props);\n let {locale} = useLocale();\n\n let inputRef = useRef();\n let trackRef = useRef();\n let domRef = useFocusableRef(ref, inputRef);\n\n let state = useColorSliderState({...props, locale});\n\n // If vertical and a label is provided, use it as an aria-label instead.\n if (vertical && label) {\n ariaLabel = ariaLabel || (typeof label === 'string' ? label : null);\n label = null;\n }\n\n // If no external label, aria-label or aria-labelledby is provided,\n // default to displaying the localized channel value.\n // Specifically check if label is undefined. If label is `null` then display no visible label.\n // A default aria-label is provided by useColorSlider in that case.\n if (label === undefined && !ariaLabel && !props['aria-labelledby'] && !vertical) {\n label = state.value.getChannelName(channel, locale);\n }\n\n // Show the value label by default if there is a visible label\n if (showValueLabel == null) {\n showValueLabel = !!label;\n }\n\n let {inputProps, thumbProps, trackProps, labelProps, outputProps} = useColorSlider({\n ...props,\n label,\n 'aria-label': ariaLabel,\n trackRef,\n inputRef\n }, state);\n\n let {isFocusVisible} = useFocusVisible();\n let [isFocused, setIsFocused] = useState(false);\n let {focusProps} = useFocus({\n isDisabled,\n onFocusChange: setIsFocused\n });\n\n let alignLabel;\n if (vertical) {\n alignLabel = 'center';\n } else if (label != null && showValueLabel) {\n alignLabel = 'space-between';\n } else if (label != null) {\n alignLabel = 'flex-start';\n } else if (showValueLabel) {\n alignLabel = 'flex-end';\n }\n\n return (\n <div\n ref={domRef}\n {...styleProps}\n className={classNames(\n styles,\n {\n 'spectrum-ColorSlider-container--horizontal': !vertical,\n 'spectrum-ColorSlider-container--vertical': vertical\n }\n )}>\n {label &&\n <Flex direction=\"row\" justifyContent={alignLabel}>\n <Label {...labelProps}>{label}</Label>\n {showValueLabel && <Label elementType=\"span\"><output {...outputProps}>{state.value.formatChannelValue(channel, locale)}</output></Label>}\n </Flex>\n }\n <div\n {...trackProps}\n ref={trackRef}\n className={classNames(\n styles,\n 'spectrum-ColorSlider', {\n 'is-disabled': isDisabled,\n 'spectrum-ColorSlider--vertical': vertical\n }\n )\n }>\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocused && isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isThumbDragging(0)}\n className={classNames(styles, 'spectrum-ColorSlider-handle')}\n {...thumbProps}>\n <input {...inputProps} {...focusProps} ref={inputRef} className={classNames(styles, 'spectrum-ColorSlider-slider')} />\n </ColorThumb>\n </div>\n </div>\n );\n}\n\n/**\n * ColorSliders allow users to adjust an individual channel of a color value.\n */\nlet _ColorSlider = React.forwardRef(ColorSlider);\nexport {_ColorSlider as ColorSlider};\n","/*\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","/*\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 React, {RefObject, useRef} from 'react';\nimport {SpectrumColorFieldProps} from '@react-types/color';\nimport styles from './colorfield.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useColorField} from '@react-aria/color';\nimport {useColorFieldState} from '@react-stately/color';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorField(props: SpectrumColorFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n // These disabled props are handled by the state hook\n value, // eslint-disable-line @typescript-eslint/no-unused-vars\n defaultValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n onChange, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...otherProps\n } = props;\n let state = useColorFieldState(props);\n let inputRef = useRef<HTMLInputElement & HTMLTextAreaElement>();\n let {\n labelProps,\n inputProps\n } = useColorField(otherProps, state, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n inputClassName={classNames(styles, 'react-spectrum-ColorField-input')} />\n );\n}\n\n/**\n * ColorFields allow users to enter a color in #rrggbb hexadecimal format.\n */\nconst _ColorField = React.forwardRef(ColorField);\nexport {_ColorField as ColorField};\n","/*\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.react-spectrum-ColorField-input {\n direction: ltr;\n text-align: start;\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAsC;AACtC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4C;AAJ5C,yCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;AACpD,yCAA4C,GAAG,CAAmC;;;;;;;;;;ACJlF,GAAqC;AACrC,GAAyB;AACzB,GAA2C;AAC3C,GAAsD;AACtD,GAAmD;AAJnD,yCAAqC,GAAG,CAA4B;AACpE,yCAAyB,GAAG,CAAgB;AAC5C,yCAA2C,GAAG,CAAkC;AAChF,yCAAsD,GAAG,CAA6C;AACtG,yCAAmD,GAAG,CAA0C;;;;SFyBvF,wCAAU,CAAC,KAAsB,EAAE,CAAC;IAC3C,GAAG,CAAC,CAAC,QAAA,KAAK,eAAE,UAAU,eAAE,UAAU,cAAE,SAAS,aAAE,QAAQ,cAAE,SAAS,GAAG,CAAE,OAAK,UAAU,CAAA,CAAC,GAAG,KAAK;IAE/F,GAAG,CAAC,SAAS,GAAG,2BAAK;IAErB,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAK;IAEnC,MAAM,oEACH,CAAG;QAAC,SAAS,EAAE,oCAAU,CAAC,gEAAY,EAAE,CAAsB,uBAAE,CAAC;YAAA,CAAY,aAAE,SAAS;YAAE,CAAa,cAAE,UAAU;QAAA,CAAC,IAAI,CAAG,KAAG,SAAS;WAAM,UAAU;0EACrJ,CAAG;QAAC,SAAS,EAAE,oCAAU,CAAC,gEAAY,EAAE,CAA4B;QAAG,KAAK,EAAE,CAAC;YAAA,eAAe,EAAE,QAAQ;QAAA,CAAC;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AAa,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ;IAE7C,MAAM,oEACH,2CAAa;WACR,UAAU;QACd,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAiC;;AAE1E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,sCAAK,CAAC,UAAU,CAAC,gCAAU;;","sources":["packages/@react-spectrum/color/src/index.ts","packages/@react-spectrum/color/src/ColorArea.tsx","packages/@react-spectrum/color/src/ColorThumb.tsx","packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css","packages/@adobe/spectrum-css-temp/components/colorloupe/vars.css","packages/@adobe/spectrum-css-temp/components/colorarea/vars.css","packages/@react-spectrum/color/src/ColorWheel.tsx","packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css","packages/@react-spectrum/color/src/ColorSlider.tsx","packages/@adobe/spectrum-css-temp/components/colorslider/vars.css","packages/@react-spectrum/color/src/ColorField.tsx","packages/@react-spectrum/color/src/colorfield.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/// <reference types=\"css-module-types\" />\n\nexport * from './ColorArea';\nexport * from './ColorWheel';\nexport * from './ColorSlider';\nexport * from './ColorField';\n","/*\n * Copyright 2021 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 {FocusableRef} from '@react-types/shared';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useRef} from 'react';\nimport {SpectrumColorAreaProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorarea/vars.css';\nimport {useColorArea} from '@react-aria/color';\nimport {useColorAreaState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputXRef = useRef();\n let inputYRef = useRef();\n let containerRef = useFocusableRef(ref, inputXRef);\n\n let state = useColorAreaState(props);\n\n let {\n colorAreaProps,\n gradientProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({...props, inputXRef, inputYRef, containerRef}, state);\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n {...colorAreaProps}\n className={\n classNames(\n styles,\n 'spectrum-ColorArea',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...colorAreaProps.style,\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n width: size,\n height: size\n }}>\n <div {...gradientProps} className={classNames(styles, 'spectrum-ColorArea-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n className={classNames(styles, 'spectrum-ColorArea-handle')}\n {...thumbProps}>\n <div role=\"presentation\">\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(xInputProps, focusProps)} ref={inputXRef} />\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(yInputProps, focusProps)} ref={inputYRef} />\n </div>\n </ColorThumb>\n </div>\n );\n}\n\nlet _ColorArea = React.forwardRef(ColorArea) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\nexport {_ColorArea as ColorArea};\n","/*\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} from '@react-types/shared';\nimport React, {ReactElement} 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} 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}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', ...otherProps} = props;\n\n let patternId = useId();\n\n let valueCSS = value.toString('css');\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <svg className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isDragging})} 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 {children}\n </div>\n );\n}\n\nexport {ColorThumb};\n","/*\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","/*\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","/*\n * Copyright 2021 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","/*\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 {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\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n\n let [wheelRadius, setWheelRadius] = useState<number | null>(null);\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 == null) {\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 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","/*\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","/*\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {Flex} from '@react-spectrum/layout';\nimport {FocusableRef} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport React, {useRef, useState} from 'react';\nimport {SpectrumColorSliderProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorslider/vars.css';\nimport {useColorSlider} from '@react-aria/color';\nimport {useColorSliderState} from '@react-stately/color';\nimport {useFocus, useFocusVisible} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorSlider(props: SpectrumColorSliderProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n isDisabled,\n channel,\n orientation,\n label,\n showValueLabel,\n 'aria-label': ariaLabel\n } = props;\n let vertical = orientation === 'vertical';\n\n let {styleProps} = useStyleProps(props);\n let {locale} = useLocale();\n\n let inputRef = useRef();\n let trackRef = useRef();\n let domRef = useFocusableRef(ref, inputRef);\n\n let state = useColorSliderState({...props, locale});\n\n // If vertical and a label is provided, use it as an aria-label instead.\n if (vertical && label) {\n ariaLabel = ariaLabel || (typeof label === 'string' ? label : null);\n label = null;\n }\n\n // If no external label, aria-label or aria-labelledby is provided,\n // default to displaying the localized channel value.\n // Specifically check if label is undefined. If label is `null` then display no visible label.\n // A default aria-label is provided by useColorSlider in that case.\n if (label === undefined && !ariaLabel && !props['aria-labelledby'] && !vertical) {\n label = state.value.getChannelName(channel, locale);\n }\n\n // Show the value label by default if there is a visible label\n if (showValueLabel == null) {\n showValueLabel = !!label;\n }\n\n let {inputProps, thumbProps, trackProps, labelProps, outputProps} = useColorSlider({\n ...props,\n label,\n 'aria-label': ariaLabel,\n trackRef,\n inputRef\n }, state);\n\n let {isFocusVisible} = useFocusVisible();\n let [isFocused, setIsFocused] = useState(false);\n let {focusProps} = useFocus({\n isDisabled,\n onFocusChange: setIsFocused\n });\n\n let alignLabel;\n if (vertical) {\n alignLabel = 'center';\n } else if (label != null && showValueLabel) {\n alignLabel = 'space-between';\n } else if (label != null) {\n alignLabel = 'flex-start';\n } else if (showValueLabel) {\n alignLabel = 'flex-end';\n }\n\n return (\n <div\n ref={domRef}\n {...styleProps}\n className={classNames(\n styles,\n {\n 'spectrum-ColorSlider-container--horizontal': !vertical,\n 'spectrum-ColorSlider-container--vertical': vertical\n }\n )}>\n {label &&\n <Flex direction=\"row\" justifyContent={alignLabel}>\n <Label {...labelProps}>{label}</Label>\n {showValueLabel && <Label elementType=\"span\"><output {...outputProps}>{state.value.formatChannelValue(channel, locale)}</output></Label>}\n </Flex>\n }\n <div\n {...trackProps}\n ref={trackRef}\n className={classNames(\n styles,\n 'spectrum-ColorSlider', {\n 'is-disabled': isDisabled,\n 'spectrum-ColorSlider--vertical': vertical\n }\n )\n }>\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocused && isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isThumbDragging(0)}\n className={classNames(styles, 'spectrum-ColorSlider-handle')}\n {...thumbProps}>\n <input {...inputProps} {...focusProps} ref={inputRef} className={classNames(styles, 'spectrum-ColorSlider-slider')} />\n </ColorThumb>\n </div>\n </div>\n );\n}\n\n/**\n * ColorSliders allow users to adjust an individual channel of a color value.\n */\nlet _ColorSlider = React.forwardRef(ColorSlider);\nexport {_ColorSlider as ColorSlider};\n","/*\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","/*\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 React, {RefObject, useRef} from 'react';\nimport {SpectrumColorFieldProps} from '@react-types/color';\nimport styles from './colorfield.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useColorField} from '@react-aria/color';\nimport {useColorFieldState} from '@react-stately/color';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorField(props: SpectrumColorFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n // These disabled props are handled by the state hook\n value, // eslint-disable-line @typescript-eslint/no-unused-vars\n defaultValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n onChange, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...otherProps\n } = props;\n let state = useColorFieldState(props);\n let inputRef = useRef<HTMLInputElement & HTMLTextAreaElement>();\n let {\n labelProps,\n inputProps\n } = useColorField(otherProps, state, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n inputClassName={classNames(styles, 'react-spectrum-ColorField-input')} />\n );\n}\n\n/**\n * ColorFields allow users to enter a color in #rrggbb hexadecimal format.\n */\nconst _ColorField = React.forwardRef(ColorField);\nexport {_ColorField as ColorField};\n","/*\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.react-spectrum-ColorField-input {\n direction: ltr;\n text-align: start;\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import "./main.css";
2
2
  import {dimensionValue as $kF0Zw$dimensionValue, useStyleProps as $kF0Zw$useStyleProps, useFocusableRef as $kF0Zw$useFocusableRef, classNames as $kF0Zw$classNames} from "@react-spectrum/utils";
3
- import {useColorArea as $kF0Zw$useColorArea, generateRGB_R as $kF0Zw$generateRGB_R, generateRGB_G as $kF0Zw$generateRGB_G, generateRGB_B as $kF0Zw$generateRGB_B, generateHSL_H as $kF0Zw$generateHSL_H, generateHSB_H as $kF0Zw$generateHSB_H, generateHSL_S as $kF0Zw$generateHSL_S, generateHSB_S as $kF0Zw$generateHSB_S, generateHSB_B as $kF0Zw$generateHSB_B, generateHSL_L as $kF0Zw$generateHSL_L, useColorWheel as $kF0Zw$useColorWheel, useColorSlider as $kF0Zw$useColorSlider, useColorField as $kF0Zw$useColorField} from "@react-aria/color";
4
3
  import {mergeProps as $kF0Zw$mergeProps, useId as $kF0Zw$useId, useResizeObserver as $kF0Zw$useResizeObserver} from "@react-aria/utils";
5
4
  import $kF0Zw$react, {useRef as $kF0Zw$useRef, useState as $kF0Zw$useState, useCallback as $kF0Zw$useCallback, useEffect as $kF0Zw$useEffect} from "react";
5
+ import {useColorArea as $kF0Zw$useColorArea, useColorWheel as $kF0Zw$useColorWheel, useColorSlider as $kF0Zw$useColorSlider, useColorField as $kF0Zw$useColorField} from "@react-aria/color";
6
6
  import {useColorAreaState as $kF0Zw$useColorAreaState, useColorWheelState as $kF0Zw$useColorWheelState, useColorSliderState as $kF0Zw$useColorSliderState, useColorFieldState as $kF0Zw$useColorFieldState} from "@react-stately/color";
7
7
  import {useFocusRing as $kF0Zw$useFocusRing} from "@react-aria/focus";
8
- import {useLocale as $kF0Zw$useLocale} from "@react-aria/i18n";
9
8
  import {useProviderProps as $kF0Zw$useProviderProps} from "@react-spectrum/provider";
10
9
  import {Flex as $kF0Zw$Flex} from "@react-spectrum/layout";
11
10
  import {Label as $kF0Zw$Label} from "@react-spectrum/label";
12
11
  import {useFocusVisible as $kF0Zw$useFocusVisible, useFocus as $kF0Zw$useFocus} from "@react-aria/interactions";
12
+ import {useLocale as $kF0Zw$useLocale} from "@react-aria/i18n";
13
13
  import {TextFieldBase as $kF0Zw$TextFieldBase} from "@react-spectrum/textfield";
14
14
 
15
15
  function $parcel$interopDefault(a) {
@@ -125,7 +125,6 @@ function $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc(props) {
125
125
 
126
126
 
127
127
 
128
-
129
128
  var $7d12200010f0192e$exports = {};
130
129
 
131
130
  $parcel$export($7d12200010f0192e$exports, "spectrum-ColorArea", () => $7d12200010f0192e$export$bb6257a55a3c1efc, (v) => $7d12200010f0192e$export$bb6257a55a3c1efc = v);
@@ -167,21 +166,12 @@ function $40046aa1a7ccb226$var$ColorArea(props, ref) {
167
166
  let inputYRef = $kF0Zw$useRef();
168
167
  let containerRef = $kF0Zw$useFocusableRef(ref, inputXRef);
169
168
  let state = $kF0Zw$useColorAreaState(props);
170
- let { channels: { xChannel: xChannel , zChannel: zChannel } } = state;
171
169
  let { colorAreaProps: colorAreaProps , gradientProps: gradientProps , xInputProps: xInputProps , yInputProps: yInputProps , thumbProps: thumbProps } = $kF0Zw$useColorArea({
172
170
  ...props,
173
171
  inputXRef: inputXRef,
174
172
  inputYRef: inputYRef,
175
173
  containerRef: containerRef
176
174
  }, state);
177
- let { direction: direction } = $kF0Zw$useLocale();
178
- let { colorAreaStyleProps: colorAreaStyleProps , gradientStyleProps: gradientStyleProps , thumbStyleProps: thumbStyleProps } = $40046aa1a7ccb226$var$useGradients({
179
- direction: direction,
180
- state: state,
181
- xChannel: xChannel,
182
- zChannel: zChannel,
183
- isDisabled: props.isDisabled
184
- });
185
175
  let { focusProps: focusProps , isFocusVisible: isFocusVisible } = $kF0Zw$useFocusRing();
186
176
  return(/*#__PURE__*/ $kF0Zw$react.createElement("div", {
187
177
  ...colorAreaProps,
@@ -190,7 +180,7 @@ function $40046aa1a7ccb226$var$ColorArea(props, ref) {
190
180
  }, styleProps.className),
191
181
  ref: containerRef,
192
182
  style: {
193
- ...colorAreaStyleProps.style,
183
+ ...colorAreaProps.style,
194
184
  ...styleProps.style,
195
185
  // Workaround around https://github.com/adobe/spectrum-css/issues/1032
196
186
  width: size,
@@ -198,7 +188,6 @@ function $40046aa1a7ccb226$var$ColorArea(props, ref) {
198
188
  }
199
189
  }, /*#__PURE__*/ $kF0Zw$react.createElement("div", {
200
190
  ...gradientProps,
201
- ...gradientStyleProps,
202
191
  className: $kF0Zw$classNames((/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports)), 'spectrum-ColorArea-gradient')
203
192
  }), /*#__PURE__*/ $kF0Zw$react.createElement($3a90e89d07d7bbd5$export$a3cc47cee1c1ccc, {
204
193
  value: state.getDisplayColor(),
@@ -206,8 +195,7 @@ function $40046aa1a7ccb226$var$ColorArea(props, ref) {
206
195
  isDisabled: isDisabled,
207
196
  isDragging: state.isDragging,
208
197
  className: $kF0Zw$classNames((/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports)), 'spectrum-ColorArea-handle'),
209
- ...thumbProps,
210
- ...thumbStyleProps
198
+ ...thumbProps
211
199
  }, /*#__PURE__*/ $kF0Zw$react.createElement("div", {
212
200
  role: "presentation"
213
201
  }, /*#__PURE__*/ $kF0Zw$react.createElement("input", {
@@ -221,81 +209,6 @@ function $40046aa1a7ccb226$var$ColorArea(props, ref) {
221
209
  })))));
222
210
  }
223
211
  let $40046aa1a7ccb226$export$b2103f68a961418e = /*#__PURE__*/ $kF0Zw$react.forwardRef($40046aa1a7ccb226$var$ColorArea);
224
- function $40046aa1a7ccb226$var$useGradients({ direction: direction , state: state , zChannel: zChannel , xChannel: xChannel , isDisabled: isDisabled }) {
225
- let orientation = [
226
- 'top',
227
- direction === 'rtl' ? 'left' : 'right'
228
- ];
229
- let dir = false;
230
- let background = {
231
- colorAreaStyles: {
232
- },
233
- gradientStyles: {
234
- }
235
- };
236
- let zValue = state.value.getChannelValue(zChannel);
237
- let { minValue: zMin , maxValue: zMax } = state.value.getChannelRange(zChannel);
238
- let alphaValue = (zValue - zMin) / (zMax - zMin);
239
- let isHSL = state.value.getColorSpace() === 'hsl';
240
- if (!isDisabled) switch(zChannel){
241
- case 'red':
242
- dir = xChannel === 'green';
243
- background = $kF0Zw$generateRGB_R(orientation, dir, zValue);
244
- break;
245
- case 'green':
246
- dir = xChannel === 'red';
247
- background = $kF0Zw$generateRGB_G(orientation, dir, zValue);
248
- break;
249
- case 'blue':
250
- dir = xChannel === 'red';
251
- background = $kF0Zw$generateRGB_B(orientation, dir, zValue);
252
- break;
253
- case 'hue':
254
- dir = xChannel !== 'saturation';
255
- if (isHSL) background = $kF0Zw$generateHSL_H(orientation, dir, zValue);
256
- else background = $kF0Zw$generateHSB_H(orientation, dir, zValue);
257
- break;
258
- case 'saturation':
259
- dir = xChannel === 'hue';
260
- if (isHSL) background = $kF0Zw$generateHSL_S(orientation, dir, alphaValue);
261
- else background = $kF0Zw$generateHSB_S(orientation, dir, alphaValue);
262
- break;
263
- case 'brightness':
264
- dir = xChannel === 'hue';
265
- background = $kF0Zw$generateHSB_B(orientation, dir, alphaValue);
266
- break;
267
- case 'lightness':
268
- dir = xChannel === 'hue';
269
- background = $kF0Zw$generateHSL_L(orientation, dir, zValue);
270
- break;
271
- }
272
- let { x: x , y: y } = state.getThumbPosition();
273
- if (direction === 'rtl') x = 1 - x;
274
- return {
275
- colorAreaStyleProps: {
276
- style: {
277
- position: 'relative',
278
- touchAction: 'none',
279
- ...background.colorAreaStyles
280
- }
281
- },
282
- gradientStyleProps: {
283
- style: {
284
- touchAction: 'none',
285
- ...background.gradientStyles
286
- }
287
- },
288
- thumbStyleProps: {
289
- style: {
290
- position: 'absolute',
291
- left: `${x * 100}%`,
292
- top: `${y * 100}%`,
293
- transform: 'translate(0%, 0%)',
294
- touchAction: 'none'
295
- }
296
- }
297
- };
298
- }
299
212
 
300
213
 
301
214
  var $3aac1c27203f04b5$exports = {};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAsC;AACtC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4C;AAJ5C,yCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAA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ACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,KAAK,GAAG,yBAAkB,CAAC,KAAK;IACpC,GAAG,CAAC,QAAQ,GAAG,aAAM;IACrB,GAAG,CAAC,CAAC,aACH,UAAU,eACV,UAAU,EACZ,CAAC,GAAG,oBAAa,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ;IAE7C,MAAM,0CACH,oBAAa;WACR,UAAU;QACd,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,cAAc,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAiC;;AAE1E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,YAAK,CAAC,UAAU,CAAC,gCAAU;;","sources":["packages/@react-spectrum/color/src/index.ts","packages/@react-spectrum/color/src/ColorArea.tsx","packages/@react-spectrum/color/src/ColorThumb.tsx","packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css","packages/@adobe/spectrum-css-temp/components/colorloupe/vars.css","packages/@adobe/spectrum-css-temp/components/colorarea/vars.css","packages/@react-spectrum/color/src/ColorWheel.tsx","packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css","packages/@react-spectrum/color/src/ColorSlider.tsx","packages/@adobe/spectrum-css-temp/components/colorslider/vars.css","packages/@react-spectrum/color/src/ColorField.tsx","packages/@react-spectrum/color/src/colorfield.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/// <reference types=\"css-module-types\" />\n\nexport * from './ColorArea';\nexport * from './ColorWheel';\nexport * from './ColorSlider';\nexport * from './ColorField';\n","/*\n * Copyright 2021 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 {FocusableRef} from '@react-types/shared';\nimport {\n generateHSB_B,\n generateHSB_H,\n generateHSB_S,\n generateHSL_H,\n generateHSL_L,\n generateHSL_S,\n generateRGB_B,\n generateRGB_G,\n generateRGB_R,\n useColorArea\n} from '@react-aria/color';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {CSSProperties, ReactElement, useRef} from 'react';\nimport {SpectrumColorAreaProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorarea/vars.css';\nimport {useColorAreaState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputXRef = useRef();\n let inputYRef = useRef();\n let containerRef = useFocusableRef(ref, inputXRef);\n\n let state = useColorAreaState(props);\n\n let {channels: {xChannel, zChannel}} = state;\n let {\n colorAreaProps,\n gradientProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({...props, inputXRef, inputYRef, containerRef}, state);\n let {direction} = useLocale();\n let {colorAreaStyleProps, gradientStyleProps, thumbStyleProps} = useGradients({direction, state, xChannel, zChannel, isDisabled: props.isDisabled});\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n {...colorAreaProps}\n className={\n classNames(\n styles,\n 'spectrum-ColorArea',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...colorAreaStyleProps.style,\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n width: size,\n height: size\n }}>\n <div {...gradientProps} {...gradientStyleProps} className={classNames(styles, 'spectrum-ColorArea-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n className={classNames(styles, 'spectrum-ColorArea-handle')}\n {...thumbProps}\n {...thumbStyleProps}>\n <div role=\"presentation\">\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(xInputProps, focusProps)} ref={inputXRef} />\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(yInputProps, focusProps)} ref={inputYRef} />\n </div>\n </ColorThumb>\n </div>\n );\n}\n\nlet _ColorArea = React.forwardRef(ColorArea) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\nexport {_ColorArea as ColorArea};\n\ninterface Gradients {\n colorAreaStyleProps: {\n style: CSSProperties\n },\n gradientStyleProps: {\n style: CSSProperties\n },\n thumbStyleProps: {\n style: CSSProperties\n }\n}\n\nfunction useGradients({direction, state, zChannel, xChannel, isDisabled}): Gradients {\n let orientation = ['top', direction === 'rtl' ? 'left' : 'right'];\n let dir = false;\n let background = {colorAreaStyles: {}, gradientStyles: {}};\n let zValue = state.value.getChannelValue(zChannel);\n let {minValue: zMin, maxValue: zMax} = state.value.getChannelRange(zChannel);\n let alphaValue = (zValue - zMin) / (zMax - zMin);\n let isHSL = state.value.getColorSpace() === 'hsl';\n if (!isDisabled) {\n switch (zChannel) {\n case 'red': {\n dir = xChannel === 'green';\n background = generateRGB_R(orientation, dir, zValue);\n break;\n }\n case 'green': {\n dir = xChannel === 'red';\n background = generateRGB_G(orientation, dir, zValue);\n break;\n }\n case 'blue': {\n dir = xChannel === 'red';\n background = generateRGB_B(orientation, dir, zValue);\n break;\n }\n case 'hue': {\n dir = xChannel !== 'saturation';\n if (isHSL) {\n background = generateHSL_H(orientation, dir, zValue);\n } else {\n background = generateHSB_H(orientation, dir, zValue);\n }\n break;\n }\n case 'saturation': {\n dir = xChannel === 'hue';\n if (isHSL) {\n background = generateHSL_S(orientation, dir, alphaValue);\n } else {\n background = generateHSB_S(orientation, dir, alphaValue);\n }\n break;\n }\n case 'brightness': {\n dir = xChannel === 'hue';\n background = generateHSB_B(orientation, dir, alphaValue);\n break;\n }\n case 'lightness': {\n dir = xChannel === 'hue';\n background = generateHSL_L(orientation, dir, zValue);\n break;\n }\n }\n }\n\n let {x, y} = state.getThumbPosition();\n\n if (direction === 'rtl') {\n x = 1 - x;\n }\n\n return {\n colorAreaStyleProps: {\n style: {\n position: 'relative',\n touchAction: 'none',\n ...background.colorAreaStyles\n }\n },\n gradientStyleProps: {\n style: {\n touchAction: 'none',\n ...background.gradientStyles\n }\n },\n thumbStyleProps: {\n style: {\n position: 'absolute',\n left: `${x * 100}%`,\n top: `${y * 100}%`,\n transform: 'translate(0%, 0%)',\n touchAction: 'none'\n }\n }\n };\n}\n","/*\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} from '@react-types/shared';\nimport React, {ReactElement} 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} 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}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', ...otherProps} = props;\n\n let patternId = useId();\n\n let valueCSS = value.toString('css');\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <svg className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isDragging})} 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 {children}\n </div>\n );\n}\n\nexport {ColorThumb};\n","/*\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","/*\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","/*\n * Copyright 2021 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","/*\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 {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\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n\n let [wheelRadius, setWheelRadius] = useState<number | null>(null);\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 == null) {\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 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","/*\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","/*\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {Flex} from '@react-spectrum/layout';\nimport {FocusableRef} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport React, {useRef, useState} from 'react';\nimport {SpectrumColorSliderProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorslider/vars.css';\nimport {useColorSlider} from '@react-aria/color';\nimport {useColorSliderState} from '@react-stately/color';\nimport {useFocus, useFocusVisible} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorSlider(props: SpectrumColorSliderProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n isDisabled,\n channel,\n orientation,\n label,\n showValueLabel,\n 'aria-label': ariaLabel\n } = props;\n let vertical = orientation === 'vertical';\n\n let {styleProps} = useStyleProps(props);\n let {locale} = useLocale();\n\n let inputRef = useRef();\n let trackRef = useRef();\n let domRef = useFocusableRef(ref, inputRef);\n\n let state = useColorSliderState({...props, locale});\n\n // If vertical and a label is provided, use it as an aria-label instead.\n if (vertical && label) {\n ariaLabel = ariaLabel || (typeof label === 'string' ? label : null);\n label = null;\n }\n\n // If no external label, aria-label or aria-labelledby is provided,\n // default to displaying the localized channel value.\n // Specifically check if label is undefined. If label is `null` then display no visible label.\n // A default aria-label is provided by useColorSlider in that case.\n if (label === undefined && !ariaLabel && !props['aria-labelledby'] && !vertical) {\n label = state.value.getChannelName(channel, locale);\n }\n\n // Show the value label by default if there is a visible label\n if (showValueLabel == null) {\n showValueLabel = !!label;\n }\n\n let {inputProps, thumbProps, trackProps, labelProps, outputProps} = useColorSlider({\n ...props,\n label,\n 'aria-label': ariaLabel,\n trackRef,\n inputRef\n }, state);\n\n let {isFocusVisible} = useFocusVisible();\n let [isFocused, setIsFocused] = useState(false);\n let {focusProps} = useFocus({\n isDisabled,\n onFocusChange: setIsFocused\n });\n\n let alignLabel;\n if (vertical) {\n alignLabel = 'center';\n } else if (label != null && showValueLabel) {\n alignLabel = 'space-between';\n } else if (label != null) {\n alignLabel = 'flex-start';\n } else if (showValueLabel) {\n alignLabel = 'flex-end';\n }\n\n return (\n <div\n ref={domRef}\n {...styleProps}\n className={classNames(\n styles,\n {\n 'spectrum-ColorSlider-container--horizontal': !vertical,\n 'spectrum-ColorSlider-container--vertical': vertical\n }\n )}>\n {label &&\n <Flex direction=\"row\" justifyContent={alignLabel}>\n <Label {...labelProps}>{label}</Label>\n {showValueLabel && <Label elementType=\"span\"><output {...outputProps}>{state.value.formatChannelValue(channel, locale)}</output></Label>}\n </Flex>\n }\n <div\n {...trackProps}\n ref={trackRef}\n className={classNames(\n styles,\n 'spectrum-ColorSlider', {\n 'is-disabled': isDisabled,\n 'spectrum-ColorSlider--vertical': vertical\n }\n )\n }>\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocused && isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isThumbDragging(0)}\n className={classNames(styles, 'spectrum-ColorSlider-handle')}\n {...thumbProps}>\n <input {...inputProps} {...focusProps} ref={inputRef} className={classNames(styles, 'spectrum-ColorSlider-slider')} />\n </ColorThumb>\n </div>\n </div>\n );\n}\n\n/**\n * ColorSliders allow users to adjust an individual channel of a color value.\n */\nlet _ColorSlider = React.forwardRef(ColorSlider);\nexport {_ColorSlider as ColorSlider};\n","/*\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","/*\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 React, {RefObject, useRef} from 'react';\nimport {SpectrumColorFieldProps} from '@react-types/color';\nimport styles from './colorfield.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useColorField} from '@react-aria/color';\nimport {useColorFieldState} from '@react-stately/color';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorField(props: SpectrumColorFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n // These disabled props are handled by the state hook\n value, // eslint-disable-line @typescript-eslint/no-unused-vars\n defaultValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n onChange, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...otherProps\n } = props;\n let state = useColorFieldState(props);\n let inputRef = useRef<HTMLInputElement & HTMLTextAreaElement>();\n let {\n labelProps,\n inputProps\n } = useColorField(otherProps, state, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n inputClassName={classNames(styles, 'react-spectrum-ColorField-input')} />\n );\n}\n\n/**\n * ColorFields allow users to enter a color in #rrggbb hexadecimal format.\n */\nconst _ColorField = React.forwardRef(ColorField);\nexport {_ColorField as ColorField};\n","/*\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.react-spectrum-ColorField-input {\n direction: ltr;\n text-align: start;\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAsC;AACtC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4C;AAJ5C,yCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;AACpD,yCAA4C,GAAG,CAAmC;;;;;;;;;;ACJlF,GAAqC;AACrC,GAAyB;AACzB,GAA2C;AAC3C,GAAsD;AACtD,GAAmD;AAJnD,yCAAqC,GAAG,CAA4B;AACpE,yCAAyB,GAAG,CAAgB;AAC5C,yCAA2C,GAAG,CAAkC;AAChF,yCAAsD,GAAG,CAA6C;AACtG,yCAAmD,GAAG,CAA0C;;;;SFyBvF,wCAAU,CAAC,KAAsB,EAAE,CAAC;IAC3C,GAAG,CAAC,CAAC,QAAA,KAAK,eAAE,UAAU,eAAE,UAAU,cAAE,SAAS,aAAE,QAAQ,cAAE,SAAS,GAAG,CAAE,OAAK,UAAU,CAAA,CAAC,GAAG,KAAK;IAE/F,GAAG,CAAC,SAAS,GAAG,YAAK;IAErB,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAK;IAEnC,MAAM,0CACH,CAAG;QAAC,SAAS,EAAE,iBAAU,CAAC,gEAAY,EAAE,CAAsB,uBAAE,CAAC;YAAA,CAAY,aAAE,SAAS;YAAE,CAAa,cAAE,UAAU;QAAA,CAAC,IAAI,CAAG,KAAG,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G,yBAAkB,CAAC,KAAK;IACpC,GAAG,CAAC,QAAQ,GAAG,aAAM;IACrB,GAAG,CAAC,CAAC,aACH,UAAU,eACV,UAAU,EACZ,CAAC,GAAG,oBAAa,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ;IAE7C,MAAM,0CACH,oBAAa;WACR,UAAU;QACd,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,cAAc,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAiC;;AAE1E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAW,iBAAG,YAAK,CAAC,UAAU,CAAC,gCAAU;;","sources":["packages/@react-spectrum/color/src/index.ts","packages/@react-spectrum/color/src/ColorArea.tsx","packages/@react-spectrum/color/src/ColorThumb.tsx","packages/@adobe/spectrum-css-temp/components/colorhandle/vars.css","packages/@adobe/spectrum-css-temp/components/colorloupe/vars.css","packages/@adobe/spectrum-css-temp/components/colorarea/vars.css","packages/@react-spectrum/color/src/ColorWheel.tsx","packages/@adobe/spectrum-css-temp/components/colorwheel/vars.css","packages/@react-spectrum/color/src/ColorSlider.tsx","packages/@adobe/spectrum-css-temp/components/colorslider/vars.css","packages/@react-spectrum/color/src/ColorField.tsx","packages/@react-spectrum/color/src/colorfield.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/// <reference types=\"css-module-types\" />\n\nexport * from './ColorArea';\nexport * from './ColorWheel';\nexport * from './ColorSlider';\nexport * from './ColorField';\n","/*\n * Copyright 2021 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 {FocusableRef} from '@react-types/shared';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useRef} from 'react';\nimport {SpectrumColorAreaProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorarea/vars.css';\nimport {useColorArea} from '@react-aria/color';\nimport {useColorAreaState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputXRef = useRef();\n let inputYRef = useRef();\n let containerRef = useFocusableRef(ref, inputXRef);\n\n let state = useColorAreaState(props);\n\n let {\n colorAreaProps,\n gradientProps,\n xInputProps,\n yInputProps,\n thumbProps\n } = useColorArea({...props, inputXRef, inputYRef, containerRef}, state);\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n {...colorAreaProps}\n className={\n classNames(\n styles,\n 'spectrum-ColorArea',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...colorAreaProps.style,\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n width: size,\n height: size\n }}>\n <div {...gradientProps} className={classNames(styles, 'spectrum-ColorArea-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n className={classNames(styles, 'spectrum-ColorArea-handle')}\n {...thumbProps}>\n <div role=\"presentation\">\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(xInputProps, focusProps)} ref={inputXRef} />\n <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(yInputProps, focusProps)} ref={inputYRef} />\n </div>\n </ColorThumb>\n </div>\n );\n}\n\nlet _ColorArea = React.forwardRef(ColorArea) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\nexport {_ColorArea as ColorArea};\n","/*\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} from '@react-types/shared';\nimport React, {ReactElement} 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} 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}\n\nfunction ColorThumb(props: ColorThumbProps) {\n let {value, isDisabled, isDragging, isFocused, children, className = '', ...otherProps} = props;\n\n let patternId = useId();\n\n let valueCSS = value.toString('css');\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <svg className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isDragging})} 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 {children}\n </div>\n );\n}\n\nexport {ColorThumb};\n","/*\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","/*\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","/*\n * Copyright 2021 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","/*\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 {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\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n\n let [wheelRadius, setWheelRadius] = useState<number | null>(null);\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 == null) {\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 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","/*\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","/*\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, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {Flex} from '@react-spectrum/layout';\nimport {FocusableRef} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport React, {useRef, useState} from 'react';\nimport {SpectrumColorSliderProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorslider/vars.css';\nimport {useColorSlider} from '@react-aria/color';\nimport {useColorSliderState} from '@react-stately/color';\nimport {useFocus, useFocusVisible} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorSlider(props: SpectrumColorSliderProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n isDisabled,\n channel,\n orientation,\n label,\n showValueLabel,\n 'aria-label': ariaLabel\n } = props;\n let vertical = orientation === 'vertical';\n\n let {styleProps} = useStyleProps(props);\n let {locale} = useLocale();\n\n let inputRef = useRef();\n let trackRef = useRef();\n let domRef = useFocusableRef(ref, inputRef);\n\n let state = useColorSliderState({...props, locale});\n\n // If vertical and a label is provided, use it as an aria-label instead.\n if (vertical && label) {\n ariaLabel = ariaLabel || (typeof label === 'string' ? label : null);\n label = null;\n }\n\n // If no external label, aria-label or aria-labelledby is provided,\n // default to displaying the localized channel value.\n // Specifically check if label is undefined. If label is `null` then display no visible label.\n // A default aria-label is provided by useColorSlider in that case.\n if (label === undefined && !ariaLabel && !props['aria-labelledby'] && !vertical) {\n label = state.value.getChannelName(channel, locale);\n }\n\n // Show the value label by default if there is a visible label\n if (showValueLabel == null) {\n showValueLabel = !!label;\n }\n\n let {inputProps, thumbProps, trackProps, labelProps, outputProps} = useColorSlider({\n ...props,\n label,\n 'aria-label': ariaLabel,\n trackRef,\n inputRef\n }, state);\n\n let {isFocusVisible} = useFocusVisible();\n let [isFocused, setIsFocused] = useState(false);\n let {focusProps} = useFocus({\n isDisabled,\n onFocusChange: setIsFocused\n });\n\n let alignLabel;\n if (vertical) {\n alignLabel = 'center';\n } else if (label != null && showValueLabel) {\n alignLabel = 'space-between';\n } else if (label != null) {\n alignLabel = 'flex-start';\n } else if (showValueLabel) {\n alignLabel = 'flex-end';\n }\n\n return (\n <div\n ref={domRef}\n {...styleProps}\n className={classNames(\n styles,\n {\n 'spectrum-ColorSlider-container--horizontal': !vertical,\n 'spectrum-ColorSlider-container--vertical': vertical\n }\n )}>\n {label &&\n <Flex direction=\"row\" justifyContent={alignLabel}>\n <Label {...labelProps}>{label}</Label>\n {showValueLabel && <Label elementType=\"span\"><output {...outputProps}>{state.value.formatChannelValue(channel, locale)}</output></Label>}\n </Flex>\n }\n <div\n {...trackProps}\n ref={trackRef}\n className={classNames(\n styles,\n 'spectrum-ColorSlider', {\n 'is-disabled': isDisabled,\n 'spectrum-ColorSlider--vertical': vertical\n }\n )\n }>\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocused && isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isThumbDragging(0)}\n className={classNames(styles, 'spectrum-ColorSlider-handle')}\n {...thumbProps}>\n <input {...inputProps} {...focusProps} ref={inputRef} className={classNames(styles, 'spectrum-ColorSlider-slider')} />\n </ColorThumb>\n </div>\n </div>\n );\n}\n\n/**\n * ColorSliders allow users to adjust an individual channel of a color value.\n */\nlet _ColorSlider = React.forwardRef(ColorSlider);\nexport {_ColorSlider as ColorSlider};\n","/*\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","/*\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 React, {RefObject, useRef} from 'react';\nimport {SpectrumColorFieldProps} from '@react-types/color';\nimport styles from './colorfield.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useColorField} from '@react-aria/color';\nimport {useColorFieldState} from '@react-stately/color';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ColorField(props: SpectrumColorFieldProps, ref: RefObject<TextFieldRef>) {\n props = useProviderProps(props);\n let {\n // These disabled props are handled by the state hook\n value, // eslint-disable-line @typescript-eslint/no-unused-vars\n defaultValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n onChange, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...otherProps\n } = props;\n let state = useColorFieldState(props);\n let inputRef = useRef<HTMLInputElement & HTMLTextAreaElement>();\n let {\n labelProps,\n inputProps\n } = useColorField(otherProps, state, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps}\n ref={ref}\n inputRef={inputRef}\n labelProps={labelProps}\n inputProps={inputProps}\n inputClassName={classNames(styles, 'react-spectrum-ColorField-input')} />\n );\n}\n\n/**\n * ColorFields allow users to enter a color in #rrggbb hexadecimal format.\n */\nconst _ColorField = React.forwardRef(ColorField);\nexport {_ColorField as ColorField};\n","/*\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.react-spectrum-ColorField-input {\n direction: ltr;\n text-align: start;\n}\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;ACqGA,OAAA,IAAI,mBAAoD,sBAAsB,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACKvI;;GAEG;AACH,OAAA,IAAI,2KAA0C,CAAC;AC0B/C;;GAEG;AACH,OAAA,IAAI,6KAA4C,CAAC;ACzFjD;;GAEG;AACH,OAAA,MAAM,wGAA0C,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/index.ts","packages/@react-spectrum/color/src/index.ts"],"sourcesContent":[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\" />\n\nexport * from './ColorArea';\nexport * from './ColorWheel';\nexport * from './ColorSlider';\nexport * from './ColorField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;ACoFA,OAAA,IAAI,mBAAoD,sBAAsB,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACsBvI;;GAEG;AACH,OAAA,IAAI,2KAA0C,CAAC;AC0B/C;;GAEG;AACH,OAAA,IAAI,6KAA4C,CAAC;ACzFjD;;GAEG;AACH,OAAA,MAAM,wGAA0C,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/index.ts","packages/@react-spectrum/color/src/index.ts"],"sourcesContent":[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\" />\n\nexport * from './ColorArea';\nexport * from './ColorWheel';\nexport * from './ColorSlider';\nexport * from './ColorField';\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.3173+fe4148bea",
3
+ "version": "3.0.0-nightly.3183+7f2896a53",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,26 +32,26 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/color": "3.0.0-nightly.3173+fe4148bea",
36
- "@react-aria/focus": "3.0.0-nightly.1474+fe4148bea",
37
- "@react-aria/i18n": "3.0.0-nightly.1474+fe4148bea",
38
- "@react-aria/interactions": "3.0.0-nightly.1474+fe4148bea",
39
- "@react-aria/slider": "3.0.7-nightly.3173+fe4148bea",
40
- "@react-aria/utils": "3.0.0-nightly.1474+fe4148bea",
41
- "@react-spectrum/label": "3.4.5-nightly.3173+fe4148bea",
42
- "@react-spectrum/layout": "3.2.5-nightly.3173+fe4148bea",
43
- "@react-spectrum/textfield": "3.0.0-nightly.1474+fe4148bea",
44
- "@react-spectrum/utils": "3.0.0-nightly.1474+fe4148bea",
45
- "@react-stately/color": "3.0.0-nightly.3173+fe4148bea",
46
- "@react-stately/slider": "3.0.7-nightly.3173+fe4148bea",
47
- "@react-stately/utils": "3.0.0-nightly.1474+fe4148bea",
48
- "@react-types/color": "3.0.0-nightly.3173+fe4148bea",
49
- "@react-types/shared": "3.0.0-nightly.1474+fe4148bea",
50
- "@react-types/slider": "3.0.6-nightly.3173+fe4148bea",
51
- "@react-types/textfield": "3.0.0-nightly.1474+fe4148bea"
35
+ "@react-aria/color": "3.0.0-nightly.3183+7f2896a53",
36
+ "@react-aria/focus": "3.0.0-nightly.1484+7f2896a53",
37
+ "@react-aria/i18n": "3.0.0-nightly.1484+7f2896a53",
38
+ "@react-aria/interactions": "3.0.0-nightly.1484+7f2896a53",
39
+ "@react-aria/slider": "3.0.8-nightly.3183+7f2896a53",
40
+ "@react-aria/utils": "3.0.0-nightly.1484+7f2896a53",
41
+ "@react-spectrum/label": "3.4.6-nightly.3183+7f2896a53",
42
+ "@react-spectrum/layout": "3.2.6-nightly.3183+7f2896a53",
43
+ "@react-spectrum/textfield": "3.0.0-nightly.1484+7f2896a53",
44
+ "@react-spectrum/utils": "3.0.0-nightly.1484+7f2896a53",
45
+ "@react-stately/color": "3.0.0-nightly.3183+7f2896a53",
46
+ "@react-stately/slider": "3.0.8-nightly.3183+7f2896a53",
47
+ "@react-stately/utils": "3.0.0-nightly.1484+7f2896a53",
48
+ "@react-types/color": "3.0.0-nightly.3183+7f2896a53",
49
+ "@react-types/shared": "3.0.0-nightly.1484+7f2896a53",
50
+ "@react-types/slider": "3.0.6-nightly.3183+7f2896a53",
51
+ "@react-types/textfield": "3.0.0-nightly.1484+7f2896a53"
52
52
  },
53
53
  "devDependencies": {
54
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1474+fe4148bea"
54
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1484+7f2896a53"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@react-spectrum/provider": "^3.0.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "fe4148beaf7f63a1ea486aecc139747a666f8c3a"
64
+ "gitHead": "7f2896a53fc4696962b4f6beb0796116a83561ee"
65
65
  }
package/src/ColorArea.tsx CHANGED
@@ -13,25 +13,13 @@
13
13
  import {classNames, dimensionValue, useFocusableRef, useStyleProps} from '@react-spectrum/utils';
14
14
  import {ColorThumb} from './ColorThumb';
15
15
  import {FocusableRef} from '@react-types/shared';
16
- import {
17
- generateHSB_B,
18
- generateHSB_H,
19
- generateHSB_S,
20
- generateHSL_H,
21
- generateHSL_L,
22
- generateHSL_S,
23
- generateRGB_B,
24
- generateRGB_G,
25
- generateRGB_R,
26
- useColorArea
27
- } from '@react-aria/color';
28
16
  import {mergeProps} from '@react-aria/utils';
29
- import React, {CSSProperties, ReactElement, useRef} from 'react';
17
+ import React, {ReactElement, useRef} from 'react';
30
18
  import {SpectrumColorAreaProps} from '@react-types/color';
31
19
  import styles from '@adobe/spectrum-css-temp/components/colorarea/vars.css';
20
+ import {useColorArea} from '@react-aria/color';
32
21
  import {useColorAreaState} from '@react-stately/color';
33
22
  import {useFocusRing} from '@react-aria/focus';
34
- import {useLocale} from '@react-aria/i18n';
35
23
  import {useProviderProps} from '@react-spectrum/provider';
36
24
 
37
25
  function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {
@@ -47,7 +35,6 @@ function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivEleme
47
35
 
48
36
  let state = useColorAreaState(props);
49
37
 
50
- let {channels: {xChannel, zChannel}} = state;
51
38
  let {
52
39
  colorAreaProps,
53
40
  gradientProps,
@@ -55,9 +42,6 @@ function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivEleme
55
42
  yInputProps,
56
43
  thumbProps
57
44
  } = useColorArea({...props, inputXRef, inputYRef, containerRef}, state);
58
- let {direction} = useLocale();
59
- let {colorAreaStyleProps, gradientStyleProps, thumbStyleProps} = useGradients({direction, state, xChannel, zChannel, isDisabled: props.isDisabled});
60
-
61
45
  let {focusProps, isFocusVisible} = useFocusRing();
62
46
 
63
47
  return (
@@ -75,21 +59,20 @@ function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivEleme
75
59
  }
76
60
  ref={containerRef}
77
61
  style={{
78
- ...colorAreaStyleProps.style,
62
+ ...colorAreaProps.style,
79
63
  ...styleProps.style,
80
64
  // Workaround around https://github.com/adobe/spectrum-css/issues/1032
81
65
  width: size,
82
66
  height: size
83
67
  }}>
84
- <div {...gradientProps} {...gradientStyleProps} className={classNames(styles, 'spectrum-ColorArea-gradient')} />
68
+ <div {...gradientProps} className={classNames(styles, 'spectrum-ColorArea-gradient')} />
85
69
  <ColorThumb
86
70
  value={state.getDisplayColor()}
87
71
  isFocused={isFocusVisible}
88
72
  isDisabled={isDisabled}
89
73
  isDragging={state.isDragging}
90
74
  className={classNames(styles, 'spectrum-ColorArea-handle')}
91
- {...thumbProps}
92
- {...thumbStyleProps}>
75
+ {...thumbProps}>
93
76
  <div role="presentation">
94
77
  <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(xInputProps, focusProps)} ref={inputXRef} />
95
78
  <input className={classNames(styles, 'spectrum-ColorArea-slider')} {...mergeProps(yInputProps, focusProps)} ref={inputYRef} />
@@ -101,103 +84,3 @@ function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivEleme
101
84
 
102
85
  let _ColorArea = React.forwardRef(ColorArea) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;
103
86
  export {_ColorArea as ColorArea};
104
-
105
- interface Gradients {
106
- colorAreaStyleProps: {
107
- style: CSSProperties
108
- },
109
- gradientStyleProps: {
110
- style: CSSProperties
111
- },
112
- thumbStyleProps: {
113
- style: CSSProperties
114
- }
115
- }
116
-
117
- function useGradients({direction, state, zChannel, xChannel, isDisabled}): Gradients {
118
- let orientation = ['top', direction === 'rtl' ? 'left' : 'right'];
119
- let dir = false;
120
- let background = {colorAreaStyles: {}, gradientStyles: {}};
121
- let zValue = state.value.getChannelValue(zChannel);
122
- let {minValue: zMin, maxValue: zMax} = state.value.getChannelRange(zChannel);
123
- let alphaValue = (zValue - zMin) / (zMax - zMin);
124
- let isHSL = state.value.getColorSpace() === 'hsl';
125
- if (!isDisabled) {
126
- switch (zChannel) {
127
- case 'red': {
128
- dir = xChannel === 'green';
129
- background = generateRGB_R(orientation, dir, zValue);
130
- break;
131
- }
132
- case 'green': {
133
- dir = xChannel === 'red';
134
- background = generateRGB_G(orientation, dir, zValue);
135
- break;
136
- }
137
- case 'blue': {
138
- dir = xChannel === 'red';
139
- background = generateRGB_B(orientation, dir, zValue);
140
- break;
141
- }
142
- case 'hue': {
143
- dir = xChannel !== 'saturation';
144
- if (isHSL) {
145
- background = generateHSL_H(orientation, dir, zValue);
146
- } else {
147
- background = generateHSB_H(orientation, dir, zValue);
148
- }
149
- break;
150
- }
151
- case 'saturation': {
152
- dir = xChannel === 'hue';
153
- if (isHSL) {
154
- background = generateHSL_S(orientation, dir, alphaValue);
155
- } else {
156
- background = generateHSB_S(orientation, dir, alphaValue);
157
- }
158
- break;
159
- }
160
- case 'brightness': {
161
- dir = xChannel === 'hue';
162
- background = generateHSB_B(orientation, dir, alphaValue);
163
- break;
164
- }
165
- case 'lightness': {
166
- dir = xChannel === 'hue';
167
- background = generateHSL_L(orientation, dir, zValue);
168
- break;
169
- }
170
- }
171
- }
172
-
173
- let {x, y} = state.getThumbPosition();
174
-
175
- if (direction === 'rtl') {
176
- x = 1 - x;
177
- }
178
-
179
- return {
180
- colorAreaStyleProps: {
181
- style: {
182
- position: 'relative',
183
- touchAction: 'none',
184
- ...background.colorAreaStyles
185
- }
186
- },
187
- gradientStyleProps: {
188
- style: {
189
- touchAction: 'none',
190
- ...background.gradientStyles
191
- }
192
- },
193
- thumbStyleProps: {
194
- style: {
195
- position: 'absolute',
196
- left: `${x * 100}%`,
197
- top: `${y * 100}%`,
198
- transform: 'translate(0%, 0%)',
199
- touchAction: 'none'
200
- }
201
- }
202
- };
203
- }