@react-spectrum/color 3.1.7 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +9 -11
- package/dist/main.js +18 -20
- package/dist/main.js.map +1 -1
- package/dist/module.js +9 -11
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +16 -0
- package/package.json +14 -41
- package/src/index.ts +17 -15
- package/dist/ColorArea.main.js +0 -95
- package/dist/ColorArea.main.js.map +0 -1
- package/dist/ColorArea.mjs +0 -90
- package/dist/ColorArea.module.js +0 -90
- package/dist/ColorArea.module.js.map +0 -1
- package/dist/ColorEditor.main.js +0 -113
- package/dist/ColorEditor.main.js.map +0 -1
- package/dist/ColorEditor.mjs +0 -108
- package/dist/ColorEditor.module.js +0 -108
- package/dist/ColorEditor.module.js.map +0 -1
- package/dist/ColorField.main.js +0 -105
- package/dist/ColorField.main.js.map +0 -1
- package/dist/ColorField.mjs +0 -100
- package/dist/ColorField.module.js +0 -100
- package/dist/ColorField.module.js.map +0 -1
- package/dist/ColorPicker.main.js +0 -123
- package/dist/ColorPicker.main.js.map +0 -1
- package/dist/ColorPicker.mjs +0 -114
- package/dist/ColorPicker.module.js +0 -114
- package/dist/ColorPicker.module.js.map +0 -1
- package/dist/ColorSlider.main.js +0 -126
- package/dist/ColorSlider.main.js.map +0 -1
- package/dist/ColorSlider.mjs +0 -121
- package/dist/ColorSlider.module.js +0 -121
- package/dist/ColorSlider.module.js.map +0 -1
- package/dist/ColorSwatch.main.js +0 -91
- package/dist/ColorSwatch.main.js.map +0 -1
- package/dist/ColorSwatch.mjs +0 -81
- package/dist/ColorSwatch.module.js +0 -81
- package/dist/ColorSwatch.module.js.map +0 -1
- package/dist/ColorSwatchPicker.main.js +0 -112
- package/dist/ColorSwatchPicker.main.js.map +0 -1
- package/dist/ColorSwatchPicker.mjs +0 -103
- package/dist/ColorSwatchPicker.module.js +0 -103
- package/dist/ColorSwatchPicker.module.js.map +0 -1
- package/dist/ColorThumb.main.js +0 -146
- package/dist/ColorThumb.main.js.map +0 -1
- package/dist/ColorThumb.mjs +0 -141
- package/dist/ColorThumb.module.js +0 -141
- package/dist/ColorThumb.module.js.map +0 -1
- package/dist/ColorWheel.main.js +0 -114
- package/dist/ColorWheel.main.js.map +0 -1
- package/dist/ColorWheel.mjs +0 -109
- package/dist/ColorWheel.module.js +0 -109
- package/dist/ColorWheel.module.js.map +0 -1
- package/dist/ar-AE.main.js +0 -10
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -12
- package/dist/ar-AE.module.js +0 -12
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -10
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -12
- package/dist/bg-BG.module.js +0 -12
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/color.0da417e8.css +0 -93
- package/dist/color.0da417e8.css.map +0 -1
- package/dist/color.4034864f.css +0 -120
- package/dist/color.4034864f.css.map +0 -1
- package/dist/color.51750948.css +0 -356
- package/dist/color.51750948.css.map +0 -1
- package/dist/color.6dfdb0cd.css +0 -260
- package/dist/color.6dfdb0cd.css.map +0 -1
- package/dist/color.85d29c28.css +0 -12
- package/dist/color.85d29c28.css.map +0 -1
- package/dist/color.8e3b650f.css +0 -93
- package/dist/color.8e3b650f.css.map +0 -1
- package/dist/color.a5310285.css +0 -206
- package/dist/color.a5310285.css.map +0 -1
- package/dist/color.decac5a6.css +0 -20
- package/dist/color.decac5a6.css.map +0 -1
- package/dist/color.f801bfa3.css +0 -75
- package/dist/color.f801bfa3.css.map +0 -1
- package/dist/color.ff589589.css +0 -41
- package/dist/color.ff589589.css.map +0 -1
- package/dist/colorarea_vars_css.main.js +0 -29
- package/dist/colorarea_vars_css.main.js.map +0 -1
- package/dist/colorarea_vars_css.mjs +0 -31
- package/dist/colorarea_vars_css.module.js +0 -31
- package/dist/colorarea_vars_css.module.js.map +0 -1
- package/dist/colorfield_css.main.js +0 -11
- package/dist/colorfield_css.main.js.map +0 -1
- package/dist/colorfield_css.mjs +0 -13
- package/dist/colorfield_css.module.js +0 -13
- package/dist/colorfield_css.module.js.map +0 -1
- package/dist/colorhandle_vars_css.main.js +0 -26
- package/dist/colorhandle_vars_css.main.js.map +0 -1
- package/dist/colorhandle_vars_css.mjs +0 -28
- package/dist/colorhandle_vars_css.module.js +0 -28
- package/dist/colorhandle_vars_css.module.js.map +0 -1
- package/dist/colorloupe_vars_css.main.js +0 -23
- package/dist/colorloupe_vars_css.main.js.map +0 -1
- package/dist/colorloupe_vars_css.mjs +0 -25
- package/dist/colorloupe_vars_css.module.js +0 -25
- package/dist/colorloupe_vars_css.module.js.map +0 -1
- package/dist/colorslider_vars_css.main.js +0 -53
- package/dist/colorslider_vars_css.main.js.map +0 -1
- package/dist/colorslider_vars_css.mjs +0 -55
- package/dist/colorslider_vars_css.module.js +0 -55
- package/dist/colorslider_vars_css.module.js.map +0 -1
- package/dist/colorwheel_vars_css.main.js +0 -35
- package/dist/colorwheel_vars_css.main.js.map +0 -1
- package/dist/colorwheel_vars_css.mjs +0 -37
- package/dist/colorwheel_vars_css.module.js +0 -37
- package/dist/colorwheel_vars_css.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -10
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -12
- package/dist/cs-CZ.module.js +0 -12
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -10
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -12
- package/dist/da-DK.module.js +0 -12
- package/dist/da-DK.module.js.map +0 -1
- package/dist/de-DE.main.js +0 -10
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -12
- package/dist/de-DE.module.js +0 -12
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -10
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -12
- package/dist/el-GR.module.js +0 -12
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -10
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -12
- package/dist/en-US.module.js +0 -12
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -10
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -12
- package/dist/es-ES.module.js +0 -12
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -10
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -12
- package/dist/et-EE.module.js +0 -12
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -10
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -12
- package/dist/fi-FI.module.js +0 -12
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -10
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -12
- package/dist/fr-FR.module.js +0 -12
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -10
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -12
- package/dist/he-IL.module.js +0 -12
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -10
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -12
- package/dist/hr-HR.module.js +0 -12
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -10
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -12
- package/dist/hu-HU.module.js +0 -12
- package/dist/hu-HU.module.js.map +0 -1
- package/dist/intlStrings.main.js +0 -108
- package/dist/intlStrings.main.js.map +0 -1
- package/dist/intlStrings.mjs +0 -110
- package/dist/intlStrings.module.js +0 -110
- package/dist/intlStrings.module.js.map +0 -1
- package/dist/it-IT.main.js +0 -10
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -12
- package/dist/it-IT.module.js +0 -12
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -10
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -12
- package/dist/ja-JP.module.js +0 -12
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -10
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -12
- package/dist/ko-KR.module.js +0 -12
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -10
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -12
- package/dist/lt-LT.module.js +0 -12
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -10
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -12
- package/dist/lv-LV.module.js +0 -12
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -10
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -12
- package/dist/nb-NO.module.js +0 -12
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -10
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -12
- package/dist/nl-NL.module.js +0 -12
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -10
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -12
- package/dist/pl-PL.module.js +0 -12
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -10
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -12
- package/dist/pt-BR.module.js +0 -12
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -10
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -12
- package/dist/pt-PT.module.js +0 -12
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -10
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -12
- package/dist/ro-RO.module.js +0 -12
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -10
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -12
- package/dist/ru-RU.module.js +0 -12
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -10
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -12
- package/dist/sk-SK.module.js +0 -12
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -10
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -12
- package/dist/sl-SI.module.js +0 -12
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -10
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -12
- package/dist/sr-SP.module.js +0 -12
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -10
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -12
- package/dist/sv-SE.module.js +0 -12
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -10
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -12
- package/dist/tr-TR.module.js +0 -12
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -96
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -10
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -12
- package/dist/uk-UA.module.js +0 -12
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -10
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -12
- package/dist/zh-CN.module.js +0 -12
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -10
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -12
- package/dist/zh-TW.module.js +0 -12
- package/dist/zh-TW.module.js.map +0 -1
- package/src/ColorArea.tsx +0 -87
- package/src/ColorEditor.tsx +0 -60
- package/src/ColorField.tsx +0 -111
- package/src/ColorPicker.tsx +0 -120
- package/src/ColorSlider.tsx +0 -142
- package/src/ColorSwatch.tsx +0 -99
- package/src/ColorSwatchPicker.tsx +0 -115
- package/src/ColorThumb.tsx +0 -114
- package/src/ColorWheel.tsx +0 -110
- package/src/colorfield.css +0 -18
package/dist/import.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {ColorArea as $
|
|
2
|
-
import {ColorWheel as $
|
|
3
|
-
import {ColorSlider as $
|
|
4
|
-
import {ColorField as $
|
|
5
|
-
import {ColorSwatch as $
|
|
6
|
-
import {ColorPicker as $
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {parseColor as $5cd3f969175c53c5$re_export$parseColor, getColorChannels as $5cd3f969175c53c5$re_export$getColorChannels} from "@react-stately/color";
|
|
1
|
+
import {ColorArea as $50d4f2e386f12dfe$re_export$ColorArea} from "@adobe/react-spectrum/ColorArea";
|
|
2
|
+
import {ColorWheel as $50d4f2e386f12dfe$re_export$ColorWheel} from "@adobe/react-spectrum/ColorWheel";
|
|
3
|
+
import {ColorSlider as $50d4f2e386f12dfe$re_export$ColorSlider} from "@adobe/react-spectrum/ColorSlider";
|
|
4
|
+
import {ColorField as $50d4f2e386f12dfe$re_export$ColorField} from "@adobe/react-spectrum/ColorField";
|
|
5
|
+
import {ColorSwatch as $50d4f2e386f12dfe$re_export$ColorSwatch} from "@adobe/react-spectrum/ColorSwatch";
|
|
6
|
+
import {ColorPicker as $50d4f2e386f12dfe$re_export$ColorPicker, ColorEditor as $50d4f2e386f12dfe$re_export$ColorEditor} from "@adobe/react-spectrum/ColorPicker";
|
|
7
|
+
import {ColorSwatchPicker as $50d4f2e386f12dfe$re_export$ColorSwatchPicker} from "@adobe/react-spectrum/ColorSwatchPicker";
|
|
8
|
+
import {parseColor as $50d4f2e386f12dfe$re_export$parseColor, getColorChannels as $50d4f2e386f12dfe$re_export$getColorChannels} from "react-stately/Color";
|
|
10
9
|
|
|
11
10
|
/*
|
|
12
11
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -29,6 +28,5 @@ import {parseColor as $5cd3f969175c53c5$re_export$parseColor, getColorChannels a
|
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
export {$40046aa1a7ccb226$export$b2103f68a961418e as ColorArea, $3aac1c27203f04b5$export$f80663f808113381 as ColorWheel, $3870e4ce67ed7ee1$export$44fd664bcca5b6fb as ColorSlider, $0077d47e004328f0$export$b865d4358897bb17 as ColorField, $d68786ae409fa722$export$cae13e90592f246a as ColorSwatch, $d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 as ColorPicker, $49352c629f2d8349$export$5aa54fd21eb08d23 as ColorEditor, $4919bc07654f325c$export$b46792416e3d8515 as ColorSwatchPicker, $5cd3f969175c53c5$re_export$parseColor as parseColor, $5cd3f969175c53c5$re_export$getColorChannels as getColorChannels};
|
|
31
|
+
export {$50d4f2e386f12dfe$re_export$ColorArea as ColorArea, $50d4f2e386f12dfe$re_export$ColorWheel as ColorWheel, $50d4f2e386f12dfe$re_export$ColorSlider as ColorSlider, $50d4f2e386f12dfe$re_export$ColorField as ColorField, $50d4f2e386f12dfe$re_export$ColorSwatch as ColorSwatch, $50d4f2e386f12dfe$re_export$ColorPicker as ColorPicker, $50d4f2e386f12dfe$re_export$ColorEditor as ColorEditor, $50d4f2e386f12dfe$re_export$ColorSwatchPicker as ColorSwatchPicker, $50d4f2e386f12dfe$re_export$parseColor as parseColor, $50d4f2e386f12dfe$re_export$getColorChannels as getColorChannels};
|
|
34
32
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
9
|
-
var $aAzec$reactstatelycolor = require("@react-stately/color");
|
|
1
|
+
var $kMLBj$adobereactspectrumColorArea = require("@adobe/react-spectrum/ColorArea");
|
|
2
|
+
var $kMLBj$adobereactspectrumColorWheel = require("@adobe/react-spectrum/ColorWheel");
|
|
3
|
+
var $kMLBj$adobereactspectrumColorSlider = require("@adobe/react-spectrum/ColorSlider");
|
|
4
|
+
var $kMLBj$adobereactspectrumColorField = require("@adobe/react-spectrum/ColorField");
|
|
5
|
+
var $kMLBj$adobereactspectrumColorSwatch = require("@adobe/react-spectrum/ColorSwatch");
|
|
6
|
+
var $kMLBj$adobereactspectrumColorPicker = require("@adobe/react-spectrum/ColorPicker");
|
|
7
|
+
var $kMLBj$adobereactspectrumColorSwatchPicker = require("@adobe/react-spectrum/ColorSwatchPicker");
|
|
8
|
+
var $kMLBj$reactstatelyColor = require("react-stately/Color");
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
function $parcel$export(e, n, v, s) {
|
|
13
12
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
$parcel$export(module.exports, "ColorArea", ()
|
|
17
|
-
$parcel$export(module.exports, "ColorWheel", ()
|
|
18
|
-
$parcel$export(module.exports, "ColorSlider", ()
|
|
19
|
-
$parcel$export(module.exports, "ColorField", ()
|
|
20
|
-
$parcel$export(module.exports, "ColorSwatch", ()
|
|
21
|
-
$parcel$export(module.exports, "ColorPicker", ()
|
|
22
|
-
$parcel$export(module.exports, "ColorEditor", ()
|
|
23
|
-
$parcel$export(module.exports, "ColorSwatchPicker", ()
|
|
24
|
-
$parcel$export(module.exports, "parseColor", ()
|
|
25
|
-
$parcel$export(module.exports, "getColorChannels", ()
|
|
15
|
+
$parcel$export(module.exports, "ColorArea", function () { return $kMLBj$adobereactspectrumColorArea.ColorArea; });
|
|
16
|
+
$parcel$export(module.exports, "ColorWheel", function () { return $kMLBj$adobereactspectrumColorWheel.ColorWheel; });
|
|
17
|
+
$parcel$export(module.exports, "ColorSlider", function () { return $kMLBj$adobereactspectrumColorSlider.ColorSlider; });
|
|
18
|
+
$parcel$export(module.exports, "ColorField", function () { return $kMLBj$adobereactspectrumColorField.ColorField; });
|
|
19
|
+
$parcel$export(module.exports, "ColorSwatch", function () { return $kMLBj$adobereactspectrumColorSwatch.ColorSwatch; });
|
|
20
|
+
$parcel$export(module.exports, "ColorPicker", function () { return $kMLBj$adobereactspectrumColorPicker.ColorPicker; });
|
|
21
|
+
$parcel$export(module.exports, "ColorEditor", function () { return $kMLBj$adobereactspectrumColorPicker.ColorEditor; });
|
|
22
|
+
$parcel$export(module.exports, "ColorSwatchPicker", function () { return $kMLBj$adobereactspectrumColorSwatchPicker.ColorSwatchPicker; });
|
|
23
|
+
$parcel$export(module.exports, "parseColor", function () { return $kMLBj$reactstatelyColor.parseColor; });
|
|
24
|
+
$parcel$export(module.exports, "getColorChannels", function () { return $kMLBj$reactstatelyColor.getColorChannels; });
|
|
26
25
|
/*
|
|
27
26
|
* Copyright 2020 Adobe. All rights reserved.
|
|
28
27
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -44,5 +43,4 @@ $parcel$export(module.exports, "getColorChannels", () => $aAzec$reactstatelycolo
|
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
|
|
47
|
-
|
|
48
46
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/color/src/index.ts"],"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\" />\nexport {ColorArea} from '@adobe/react-spectrum/ColorArea';\n\nexport {ColorWheel} from '@adobe/react-spectrum/ColorWheel';\nexport {ColorSlider} from '@adobe/react-spectrum/ColorSlider';\nexport {ColorField} from '@adobe/react-spectrum/ColorField';\nexport {ColorSwatch} from '@adobe/react-spectrum/ColorSwatch';\nexport {ColorPicker, ColorEditor} from '@adobe/react-spectrum/ColorPicker';\nexport {ColorSwatchPicker} from '@adobe/react-spectrum/ColorSwatchPicker';\nexport type {SpectrumColorAreaProps} from '@adobe/react-spectrum/ColorArea';\nexport type {SpectrumColorFieldProps} from '@adobe/react-spectrum/ColorField';\nexport type {SpectrumColorSliderProps} from '@adobe/react-spectrum/ColorSlider';\nexport type {SpectrumColorWheelProps} from '@adobe/react-spectrum/ColorWheel';\nexport type {SpectrumColorSwatchProps} from '@adobe/react-spectrum/ColorSwatch';\nexport type {SpectrumColorPickerProps, SpectrumColorEditorProps} from '@adobe/react-spectrum/ColorPicker';\nexport type {SpectrumColorSwatchPickerProps} from '@adobe/react-spectrum/ColorSwatchPicker';\nexport {parseColor, getColorChannels} from 'react-stately/Color';\nexport type {Color, ColorSpace, ColorFormat} from 'react-stately/Color';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {ColorArea as $
|
|
2
|
-
import {ColorWheel as $
|
|
3
|
-
import {ColorSlider as $
|
|
4
|
-
import {ColorField as $
|
|
5
|
-
import {ColorSwatch as $
|
|
6
|
-
import {ColorPicker as $
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {parseColor as $5cd3f969175c53c5$re_export$parseColor, getColorChannels as $5cd3f969175c53c5$re_export$getColorChannels} from "@react-stately/color";
|
|
1
|
+
import {ColorArea as $50d4f2e386f12dfe$re_export$ColorArea} from "@adobe/react-spectrum/ColorArea";
|
|
2
|
+
import {ColorWheel as $50d4f2e386f12dfe$re_export$ColorWheel} from "@adobe/react-spectrum/ColorWheel";
|
|
3
|
+
import {ColorSlider as $50d4f2e386f12dfe$re_export$ColorSlider} from "@adobe/react-spectrum/ColorSlider";
|
|
4
|
+
import {ColorField as $50d4f2e386f12dfe$re_export$ColorField} from "@adobe/react-spectrum/ColorField";
|
|
5
|
+
import {ColorSwatch as $50d4f2e386f12dfe$re_export$ColorSwatch} from "@adobe/react-spectrum/ColorSwatch";
|
|
6
|
+
import {ColorPicker as $50d4f2e386f12dfe$re_export$ColorPicker, ColorEditor as $50d4f2e386f12dfe$re_export$ColorEditor} from "@adobe/react-spectrum/ColorPicker";
|
|
7
|
+
import {ColorSwatchPicker as $50d4f2e386f12dfe$re_export$ColorSwatchPicker} from "@adobe/react-spectrum/ColorSwatchPicker";
|
|
8
|
+
import {parseColor as $50d4f2e386f12dfe$re_export$parseColor, getColorChannels as $50d4f2e386f12dfe$re_export$getColorChannels} from "react-stately/Color";
|
|
10
9
|
|
|
11
10
|
/*
|
|
12
11
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -29,6 +28,5 @@ import {parseColor as $5cd3f969175c53c5$re_export$parseColor, getColorChannels a
|
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
export {$40046aa1a7ccb226$export$b2103f68a961418e as ColorArea, $3aac1c27203f04b5$export$f80663f808113381 as ColorWheel, $3870e4ce67ed7ee1$export$44fd664bcca5b6fb as ColorSlider, $0077d47e004328f0$export$b865d4358897bb17 as ColorField, $d68786ae409fa722$export$cae13e90592f246a as ColorSwatch, $d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 as ColorPicker, $49352c629f2d8349$export$5aa54fd21eb08d23 as ColorEditor, $4919bc07654f325c$export$b46792416e3d8515 as ColorSwatchPicker, $5cd3f969175c53c5$re_export$parseColor as parseColor, $5cd3f969175c53c5$re_export$getColorChannels as getColorChannels};
|
|
31
|
+
export {$50d4f2e386f12dfe$re_export$ColorArea as ColorArea, $50d4f2e386f12dfe$re_export$ColorWheel as ColorWheel, $50d4f2e386f12dfe$re_export$ColorSlider as ColorSlider, $50d4f2e386f12dfe$re_export$ColorField as ColorField, $50d4f2e386f12dfe$re_export$ColorSwatch as ColorSwatch, $50d4f2e386f12dfe$re_export$ColorPicker as ColorPicker, $50d4f2e386f12dfe$re_export$ColorEditor as ColorEditor, $50d4f2e386f12dfe$re_export$ColorSwatchPicker as ColorSwatchPicker, $50d4f2e386f12dfe$re_export$parseColor as parseColor, $50d4f2e386f12dfe$re_export$getColorChannels as getColorChannels};
|
|
34
32
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/color/src/index.ts"],"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\" />\nexport {ColorArea} from '@adobe/react-spectrum/ColorArea';\n\nexport {ColorWheel} from '@adobe/react-spectrum/ColorWheel';\nexport {ColorSlider} from '@adobe/react-spectrum/ColorSlider';\nexport {ColorField} from '@adobe/react-spectrum/ColorField';\nexport {ColorSwatch} from '@adobe/react-spectrum/ColorSwatch';\nexport {ColorPicker, ColorEditor} from '@adobe/react-spectrum/ColorPicker';\nexport {ColorSwatchPicker} from '@adobe/react-spectrum/ColorSwatchPicker';\nexport type {SpectrumColorAreaProps} from '@adobe/react-spectrum/ColorArea';\nexport type {SpectrumColorFieldProps} from '@adobe/react-spectrum/ColorField';\nexport type {SpectrumColorSliderProps} from '@adobe/react-spectrum/ColorSlider';\nexport type {SpectrumColorWheelProps} from '@adobe/react-spectrum/ColorWheel';\nexport type {SpectrumColorSwatchProps} from '@adobe/react-spectrum/ColorSwatch';\nexport type {SpectrumColorPickerProps, SpectrumColorEditorProps} from '@adobe/react-spectrum/ColorPicker';\nexport type {SpectrumColorSwatchPickerProps} from '@adobe/react-spectrum/ColorSwatchPicker';\nexport {parseColor, getColorChannels} from 'react-stately/Color';\nexport type {Color, ColorSpace, ColorFormat} from 'react-stately/Color';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { ColorArea } from '@adobe/react-spectrum/ColorArea';
|
|
2
|
+
export { ColorWheel } from '@adobe/react-spectrum/ColorWheel';
|
|
3
|
+
export { ColorSlider } from '@adobe/react-spectrum/ColorSlider';
|
|
4
|
+
export { ColorField } from '@adobe/react-spectrum/ColorField';
|
|
5
|
+
export { ColorSwatch } from '@adobe/react-spectrum/ColorSwatch';
|
|
6
|
+
export { ColorPicker, ColorEditor } from '@adobe/react-spectrum/ColorPicker';
|
|
7
|
+
export { ColorSwatchPicker } from '@adobe/react-spectrum/ColorSwatchPicker';
|
|
8
|
+
export type { SpectrumColorAreaProps } from '@adobe/react-spectrum/ColorArea';
|
|
9
|
+
export type { SpectrumColorFieldProps } from '@adobe/react-spectrum/ColorField';
|
|
10
|
+
export type { SpectrumColorSliderProps } from '@adobe/react-spectrum/ColorSlider';
|
|
11
|
+
export type { SpectrumColorWheelProps } from '@adobe/react-spectrum/ColorWheel';
|
|
12
|
+
export type { SpectrumColorSwatchProps } from '@adobe/react-spectrum/ColorSwatch';
|
|
13
|
+
export type { SpectrumColorPickerProps, SpectrumColorEditorProps } from '@adobe/react-spectrum/ColorPicker';
|
|
14
|
+
export type { SpectrumColorSwatchPickerProps } from '@adobe/react-spectrum/ColorSwatchPicker';
|
|
15
|
+
export { parseColor, getColorChannels } from 'react-stately/Color';
|
|
16
|
+
export type { Color, ColorSpace, ColorFormat } from 'react-stately/Color';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/color",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,53 +24,26 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@react-aria/focus": "^3.21.5",
|
|
45
|
-
"@react-aria/i18n": "^3.12.16",
|
|
46
|
-
"@react-aria/interactions": "^3.27.1",
|
|
47
|
-
"@react-aria/utils": "^3.33.1",
|
|
48
|
-
"@react-spectrum/dialog": "^3.9.7",
|
|
49
|
-
"@react-spectrum/form": "^3.7.22",
|
|
50
|
-
"@react-spectrum/label": "^3.16.22",
|
|
51
|
-
"@react-spectrum/overlays": "^5.9.3",
|
|
52
|
-
"@react-spectrum/picker": "^3.16.7",
|
|
53
|
-
"@react-spectrum/textfield": "^3.14.5",
|
|
54
|
-
"@react-spectrum/utils": "^3.12.12",
|
|
55
|
-
"@react-spectrum/view": "^3.6.26",
|
|
56
|
-
"@react-stately/color": "^3.9.5",
|
|
57
|
-
"@react-types/color": "^3.1.4",
|
|
58
|
-
"@react-types/shared": "^3.33.1",
|
|
59
|
-
"@react-types/textfield": "^3.12.8",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
60
35
|
"@swc/helpers": "^0.5.0",
|
|
61
|
-
"react-
|
|
36
|
+
"react-stately": "3.46.0"
|
|
62
37
|
},
|
|
63
38
|
"devDependencies": {
|
|
64
|
-
"@
|
|
65
|
-
"@react-spectrum/style-macro-s1": "3.0.0-alpha.5"
|
|
39
|
+
"@react-spectrum/style-macro-s1": "3.0.0-alpha.6"
|
|
66
40
|
},
|
|
67
41
|
"peerDependencies": {
|
|
68
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
69
42
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
70
43
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
71
44
|
},
|
|
72
45
|
"publishConfig": {
|
|
73
46
|
"access": "public"
|
|
74
47
|
},
|
|
75
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
76
49
|
}
|
package/src/index.ts
CHANGED
|
@@ -11,18 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
|
-
export {ColorArea} from '
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {ColorEditor} from '
|
|
21
|
-
export {ColorSwatchPicker} from '
|
|
22
|
-
export {
|
|
23
|
-
export type {
|
|
24
|
-
export type {
|
|
25
|
-
export type {
|
|
26
|
-
export type {
|
|
27
|
-
export type {
|
|
28
|
-
export type {
|
|
14
|
+
export {ColorArea} from '@adobe/react-spectrum/ColorArea';
|
|
15
|
+
|
|
16
|
+
export {ColorWheel} from '@adobe/react-spectrum/ColorWheel';
|
|
17
|
+
export {ColorSlider} from '@adobe/react-spectrum/ColorSlider';
|
|
18
|
+
export {ColorField} from '@adobe/react-spectrum/ColorField';
|
|
19
|
+
export {ColorSwatch} from '@adobe/react-spectrum/ColorSwatch';
|
|
20
|
+
export {ColorPicker, ColorEditor} from '@adobe/react-spectrum/ColorPicker';
|
|
21
|
+
export {ColorSwatchPicker} from '@adobe/react-spectrum/ColorSwatchPicker';
|
|
22
|
+
export type {SpectrumColorAreaProps} from '@adobe/react-spectrum/ColorArea';
|
|
23
|
+
export type {SpectrumColorFieldProps} from '@adobe/react-spectrum/ColorField';
|
|
24
|
+
export type {SpectrumColorSliderProps} from '@adobe/react-spectrum/ColorSlider';
|
|
25
|
+
export type {SpectrumColorWheelProps} from '@adobe/react-spectrum/ColorWheel';
|
|
26
|
+
export type {SpectrumColorSwatchProps} from '@adobe/react-spectrum/ColorSwatch';
|
|
27
|
+
export type {SpectrumColorPickerProps, SpectrumColorEditorProps} from '@adobe/react-spectrum/ColorPicker';
|
|
28
|
+
export type {SpectrumColorSwatchPickerProps} from '@adobe/react-spectrum/ColorSwatchPicker';
|
|
29
|
+
export {parseColor, getColorChannels} from 'react-stately/Color';
|
|
30
|
+
export type {Color, ColorSpace, ColorFormat} from 'react-stately/Color';
|
package/dist/ColorArea.main.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
var $2b9adc23f6c7cae1$exports = require("./ColorThumb.main.js");
|
|
2
|
-
require("./color.8e3b650f.css");
|
|
3
|
-
var $d4b4e0a63f9ca8c1$exports = require("./colorarea_vars_css.main.js");
|
|
4
|
-
var $6Gwd1$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
-
var $6Gwd1$reactariacomponents = require("react-aria-components");
|
|
6
|
-
var $6Gwd1$reactariautils = require("@react-aria/utils");
|
|
7
|
-
var $6Gwd1$react = require("react");
|
|
8
|
-
var $6Gwd1$reactariacolor = require("@react-aria/color");
|
|
9
|
-
var $6Gwd1$reactstatelycolor = require("@react-stately/color");
|
|
10
|
-
var $6Gwd1$reactariafocus = require("@react-aria/focus");
|
|
11
|
-
var $6Gwd1$reactspectrumprovider = require("@react-spectrum/provider");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function $parcel$interopDefault(a) {
|
|
15
|
-
return a && a.__esModule ? a.default : a;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function $parcel$export(e, n, v, s) {
|
|
19
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$parcel$export(module.exports, "ColorArea", () => $5f016e950c2dc3a6$export$b2103f68a961418e);
|
|
23
|
-
/*
|
|
24
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
25
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
26
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
27
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
28
|
-
*
|
|
29
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
30
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
31
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
32
|
-
* governing permissions and limitations under the License.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const $5f016e950c2dc3a6$export$b2103f68a961418e = /*#__PURE__*/ (0, ($parcel$interopDefault($6Gwd1$react))).forwardRef(function ColorArea(props, ref) {
|
|
44
|
-
props = (0, $6Gwd1$reactspectrumprovider.useProviderProps)(props);
|
|
45
|
-
let inputXRef = (0, $6Gwd1$react.useRef)(null);
|
|
46
|
-
let inputYRef = (0, $6Gwd1$react.useRef)(null);
|
|
47
|
-
let containerRef = (0, $6Gwd1$reactspectrumutils.useFocusableRef)(ref, inputXRef);
|
|
48
|
-
[props, containerRef] = (0, $6Gwd1$reactariacomponents.useContextProps)(props, containerRef, (0, $6Gwd1$reactariacomponents.ColorAreaContext));
|
|
49
|
-
let { isDisabled: isDisabled } = props;
|
|
50
|
-
let size = props.size && (0, $6Gwd1$reactspectrumutils.dimensionValue)(props.size);
|
|
51
|
-
let { styleProps: styleProps } = (0, $6Gwd1$reactspectrumutils.useStyleProps)(props);
|
|
52
|
-
let state = (0, $6Gwd1$reactstatelycolor.useColorAreaState)(props);
|
|
53
|
-
let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $6Gwd1$reactariacolor.useColorArea)({
|
|
54
|
-
...props,
|
|
55
|
-
inputXRef: inputXRef,
|
|
56
|
-
inputYRef: inputYRef,
|
|
57
|
-
containerRef: containerRef
|
|
58
|
-
}, state);
|
|
59
|
-
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $6Gwd1$reactariafocus.useFocusRing)();
|
|
60
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($6Gwd1$react))).createElement("div", {
|
|
61
|
-
...colorAreaProps,
|
|
62
|
-
className: (0, $6Gwd1$reactspectrumutils.classNames)((0, ($parcel$interopDefault($d4b4e0a63f9ca8c1$exports))), 'spectrum-ColorArea', {
|
|
63
|
-
'is-disabled': isDisabled
|
|
64
|
-
}, styleProps.className),
|
|
65
|
-
ref: containerRef,
|
|
66
|
-
style: {
|
|
67
|
-
...isDisabled ? {} : colorAreaProps.style,
|
|
68
|
-
...styleProps.style,
|
|
69
|
-
// Workaround around https://github.com/adobe/spectrum-css/issues/1032
|
|
70
|
-
width: size,
|
|
71
|
-
height: size
|
|
72
|
-
}
|
|
73
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($6Gwd1$react))).createElement((0, $2b9adc23f6c7cae1$exports.ColorThumb), {
|
|
74
|
-
value: state.getDisplayColor(),
|
|
75
|
-
isFocused: isFocusVisible,
|
|
76
|
-
isDisabled: isDisabled,
|
|
77
|
-
isDragging: state.isDragging,
|
|
78
|
-
containerRef: containerRef,
|
|
79
|
-
className: (0, $6Gwd1$reactspectrumutils.classNames)((0, ($parcel$interopDefault($d4b4e0a63f9ca8c1$exports))), 'spectrum-ColorArea-handle'),
|
|
80
|
-
...thumbProps
|
|
81
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($6Gwd1$react))).createElement("div", {
|
|
82
|
-
role: "presentation"
|
|
83
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($6Gwd1$react))).createElement("input", {
|
|
84
|
-
className: (0, $6Gwd1$reactspectrumutils.classNames)((0, ($parcel$interopDefault($d4b4e0a63f9ca8c1$exports))), 'spectrum-ColorArea-slider'),
|
|
85
|
-
...(0, $6Gwd1$reactariautils.mergeProps)(xInputProps, focusProps),
|
|
86
|
-
ref: inputXRef
|
|
87
|
-
}), /*#__PURE__*/ (0, ($parcel$interopDefault($6Gwd1$react))).createElement("input", {
|
|
88
|
-
className: (0, $6Gwd1$reactspectrumutils.classNames)((0, ($parcel$interopDefault($d4b4e0a63f9ca8c1$exports))), 'spectrum-ColorArea-slider'),
|
|
89
|
-
...(0, $6Gwd1$reactariautils.mergeProps)(yInputProps, focusProps),
|
|
90
|
-
ref: inputYRef
|
|
91
|
-
}))));
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=ColorArea.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkBM,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,UAAU,KAA6B,EAAE,GAAiC;IAC3H,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,eAAe,CAAA,GAAA,yCAAc,EAAE,KAAK;IACxC,CAAC,OAAO,aAAa,GAAG,CAAA,GAAA,0CAAc,EAAE,OAAO,cAAc,CAAA,GAAA,2CAAe;IAE5E,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,OAAO,MAAM,IAAI,IAAI,CAAA,GAAA,wCAAa,EAAE,MAAM,IAAI;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAGjC,IAAI,QAAQ,CAAA,GAAA,0CAAgB,EAAE;IAE9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,kCAAW,EAAE;QAAC,GAAG,KAAK;mBAAE;mBAAW;sBAAW;IAAY,GAAG;IACjE,IAAI,cAAC,UAAU,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,kCAAW;IAE9C,qBACE,0DAAC;QACE,GAAG,cAAc;QAClB,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,sBACA;YACE,eAAe;QACjB,GACA,WAAW,SAAS;QAGxB,KAAK;QACL,OAAO;YACL,GAAI,aAAa,CAAC,IAAI,eAAe,KAAK;YAC1C,GAAG,WAAW,KAAK;YACnB,sEAAsE;YACtE,OAAO;YACP,QAAQ;QACV;qBACA,0DAAC,CAAA,GAAA,oCAAS;QACR,OAAO,MAAM,eAAe;QAC5B,WAAW;QACX,YAAY;QACZ,YAAY,MAAM,UAAU;QAC5B,cAAc;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC7B,GAAG,UAAU;qBACd,0DAAC;QAAI,MAAK;qBACR,0DAAC;QAAM,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAA+B,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,WAAW;QAAE,KAAK;sBACjH,0DAAC;QAAM,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAA+B,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,WAAW;QAAE,KAAK;;AAK3H","sources":["packages/@react-spectrum/color/src/ColorArea.tsx"],"sourcesContent":["/*\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 {ColorAreaContext, useContextProps} from 'react-aria-components';\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\n/**\n * ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = React.forwardRef(function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputXRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorAreaContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let state = useColorAreaState(props);\n\n let {\n colorAreaProps,\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 ...(isDisabled ? {} : colorAreaProps.style),\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n width: size,\n height: size\n }}>\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\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}) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ColorArea.main.js.map"}
|
package/dist/ColorArea.mjs
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import {ColorThumb as $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc} from "./ColorThumb.mjs";
|
|
2
|
-
import "./color.8e3b650f.css";
|
|
3
|
-
import $4eSry$colorarea_vars_cssmodulejs from "./colorarea_vars_css.mjs";
|
|
4
|
-
import {useFocusableRef as $4eSry$useFocusableRef, dimensionValue as $4eSry$dimensionValue, useStyleProps as $4eSry$useStyleProps, classNames as $4eSry$classNames} from "@react-spectrum/utils";
|
|
5
|
-
import {useContextProps as $4eSry$useContextProps, ColorAreaContext as $4eSry$ColorAreaContext} from "react-aria-components";
|
|
6
|
-
import {mergeProps as $4eSry$mergeProps} from "@react-aria/utils";
|
|
7
|
-
import $4eSry$react, {useRef as $4eSry$useRef} from "react";
|
|
8
|
-
import {useColorArea as $4eSry$useColorArea} from "@react-aria/color";
|
|
9
|
-
import {useColorAreaState as $4eSry$useColorAreaState} from "@react-stately/color";
|
|
10
|
-
import {useFocusRing as $4eSry$useFocusRing} from "@react-aria/focus";
|
|
11
|
-
import {useProviderProps as $4eSry$useProviderProps} from "@react-spectrum/provider";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function $parcel$interopDefault(a) {
|
|
15
|
-
return a && a.__esModule ? a.default : a;
|
|
16
|
-
}
|
|
17
|
-
/*
|
|
18
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
19
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
-
* governing permissions and limitations under the License.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const $40046aa1a7ccb226$export$b2103f68a961418e = /*#__PURE__*/ (0, $4eSry$react).forwardRef(function ColorArea(props, ref) {
|
|
38
|
-
props = (0, $4eSry$useProviderProps)(props);
|
|
39
|
-
let inputXRef = (0, $4eSry$useRef)(null);
|
|
40
|
-
let inputYRef = (0, $4eSry$useRef)(null);
|
|
41
|
-
let containerRef = (0, $4eSry$useFocusableRef)(ref, inputXRef);
|
|
42
|
-
[props, containerRef] = (0, $4eSry$useContextProps)(props, containerRef, (0, $4eSry$ColorAreaContext));
|
|
43
|
-
let { isDisabled: isDisabled } = props;
|
|
44
|
-
let size = props.size && (0, $4eSry$dimensionValue)(props.size);
|
|
45
|
-
let { styleProps: styleProps } = (0, $4eSry$useStyleProps)(props);
|
|
46
|
-
let state = (0, $4eSry$useColorAreaState)(props);
|
|
47
|
-
let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $4eSry$useColorArea)({
|
|
48
|
-
...props,
|
|
49
|
-
inputXRef: inputXRef,
|
|
50
|
-
inputYRef: inputYRef,
|
|
51
|
-
containerRef: containerRef
|
|
52
|
-
}, state);
|
|
53
|
-
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $4eSry$useFocusRing)();
|
|
54
|
-
return /*#__PURE__*/ (0, $4eSry$react).createElement("div", {
|
|
55
|
-
...colorAreaProps,
|
|
56
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea', {
|
|
57
|
-
'is-disabled': isDisabled
|
|
58
|
-
}, styleProps.className),
|
|
59
|
-
ref: containerRef,
|
|
60
|
-
style: {
|
|
61
|
-
...isDisabled ? {} : colorAreaProps.style,
|
|
62
|
-
...styleProps.style,
|
|
63
|
-
// Workaround around https://github.com/adobe/spectrum-css/issues/1032
|
|
64
|
-
width: size,
|
|
65
|
-
height: size
|
|
66
|
-
}
|
|
67
|
-
}, /*#__PURE__*/ (0, $4eSry$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
|
|
68
|
-
value: state.getDisplayColor(),
|
|
69
|
-
isFocused: isFocusVisible,
|
|
70
|
-
isDisabled: isDisabled,
|
|
71
|
-
isDragging: state.isDragging,
|
|
72
|
-
containerRef: containerRef,
|
|
73
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea-handle'),
|
|
74
|
-
...thumbProps
|
|
75
|
-
}, /*#__PURE__*/ (0, $4eSry$react).createElement("div", {
|
|
76
|
-
role: "presentation"
|
|
77
|
-
}, /*#__PURE__*/ (0, $4eSry$react).createElement("input", {
|
|
78
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea-slider'),
|
|
79
|
-
...(0, $4eSry$mergeProps)(xInputProps, focusProps),
|
|
80
|
-
ref: inputXRef
|
|
81
|
-
}), /*#__PURE__*/ (0, $4eSry$react).createElement("input", {
|
|
82
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea-slider'),
|
|
83
|
-
...(0, $4eSry$mergeProps)(yInputProps, focusProps),
|
|
84
|
-
ref: inputYRef
|
|
85
|
-
}))));
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export {$40046aa1a7ccb226$export$b2103f68a961418e as ColorArea};
|
|
90
|
-
//# sourceMappingURL=ColorArea.module.js.map
|
package/dist/ColorArea.module.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import {ColorThumb as $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc} from "./ColorThumb.module.js";
|
|
2
|
-
import "./color.8e3b650f.css";
|
|
3
|
-
import $4eSry$colorarea_vars_cssmodulejs from "./colorarea_vars_css.module.js";
|
|
4
|
-
import {useFocusableRef as $4eSry$useFocusableRef, dimensionValue as $4eSry$dimensionValue, useStyleProps as $4eSry$useStyleProps, classNames as $4eSry$classNames} from "@react-spectrum/utils";
|
|
5
|
-
import {useContextProps as $4eSry$useContextProps, ColorAreaContext as $4eSry$ColorAreaContext} from "react-aria-components";
|
|
6
|
-
import {mergeProps as $4eSry$mergeProps} from "@react-aria/utils";
|
|
7
|
-
import $4eSry$react, {useRef as $4eSry$useRef} from "react";
|
|
8
|
-
import {useColorArea as $4eSry$useColorArea} from "@react-aria/color";
|
|
9
|
-
import {useColorAreaState as $4eSry$useColorAreaState} from "@react-stately/color";
|
|
10
|
-
import {useFocusRing as $4eSry$useFocusRing} from "@react-aria/focus";
|
|
11
|
-
import {useProviderProps as $4eSry$useProviderProps} from "@react-spectrum/provider";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function $parcel$interopDefault(a) {
|
|
15
|
-
return a && a.__esModule ? a.default : a;
|
|
16
|
-
}
|
|
17
|
-
/*
|
|
18
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
19
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
-
* governing permissions and limitations under the License.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const $40046aa1a7ccb226$export$b2103f68a961418e = /*#__PURE__*/ (0, $4eSry$react).forwardRef(function ColorArea(props, ref) {
|
|
38
|
-
props = (0, $4eSry$useProviderProps)(props);
|
|
39
|
-
let inputXRef = (0, $4eSry$useRef)(null);
|
|
40
|
-
let inputYRef = (0, $4eSry$useRef)(null);
|
|
41
|
-
let containerRef = (0, $4eSry$useFocusableRef)(ref, inputXRef);
|
|
42
|
-
[props, containerRef] = (0, $4eSry$useContextProps)(props, containerRef, (0, $4eSry$ColorAreaContext));
|
|
43
|
-
let { isDisabled: isDisabled } = props;
|
|
44
|
-
let size = props.size && (0, $4eSry$dimensionValue)(props.size);
|
|
45
|
-
let { styleProps: styleProps } = (0, $4eSry$useStyleProps)(props);
|
|
46
|
-
let state = (0, $4eSry$useColorAreaState)(props);
|
|
47
|
-
let { colorAreaProps: colorAreaProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $4eSry$useColorArea)({
|
|
48
|
-
...props,
|
|
49
|
-
inputXRef: inputXRef,
|
|
50
|
-
inputYRef: inputYRef,
|
|
51
|
-
containerRef: containerRef
|
|
52
|
-
}, state);
|
|
53
|
-
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $4eSry$useFocusRing)();
|
|
54
|
-
return /*#__PURE__*/ (0, $4eSry$react).createElement("div", {
|
|
55
|
-
...colorAreaProps,
|
|
56
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea', {
|
|
57
|
-
'is-disabled': isDisabled
|
|
58
|
-
}, styleProps.className),
|
|
59
|
-
ref: containerRef,
|
|
60
|
-
style: {
|
|
61
|
-
...isDisabled ? {} : colorAreaProps.style,
|
|
62
|
-
...styleProps.style,
|
|
63
|
-
// Workaround around https://github.com/adobe/spectrum-css/issues/1032
|
|
64
|
-
width: size,
|
|
65
|
-
height: size
|
|
66
|
-
}
|
|
67
|
-
}, /*#__PURE__*/ (0, $4eSry$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
|
|
68
|
-
value: state.getDisplayColor(),
|
|
69
|
-
isFocused: isFocusVisible,
|
|
70
|
-
isDisabled: isDisabled,
|
|
71
|
-
isDragging: state.isDragging,
|
|
72
|
-
containerRef: containerRef,
|
|
73
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea-handle'),
|
|
74
|
-
...thumbProps
|
|
75
|
-
}, /*#__PURE__*/ (0, $4eSry$react).createElement("div", {
|
|
76
|
-
role: "presentation"
|
|
77
|
-
}, /*#__PURE__*/ (0, $4eSry$react).createElement("input", {
|
|
78
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea-slider'),
|
|
79
|
-
...(0, $4eSry$mergeProps)(xInputProps, focusProps),
|
|
80
|
-
ref: inputXRef
|
|
81
|
-
}), /*#__PURE__*/ (0, $4eSry$react).createElement("input", {
|
|
82
|
-
className: (0, $4eSry$classNames)((0, ($parcel$interopDefault($4eSry$colorarea_vars_cssmodulejs))), 'spectrum-ColorArea-slider'),
|
|
83
|
-
...(0, $4eSry$mergeProps)(yInputProps, focusProps),
|
|
84
|
-
ref: inputYRef
|
|
85
|
-
}))));
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export {$40046aa1a7ccb226$export$b2103f68a961418e as ColorArea};
|
|
90
|
-
//# sourceMappingURL=ColorArea.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkBM,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,UAAU,KAA6B,EAAE,GAAiC;IAC3H,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,eAAe,CAAA,GAAA,sBAAc,EAAE,KAAK;IACxC,CAAC,OAAO,aAAa,GAAG,CAAA,GAAA,sBAAc,EAAE,OAAO,cAAc,CAAA,GAAA,uBAAe;IAE5E,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,OAAO,MAAM,IAAI,IAAI,CAAA,GAAA,qBAAa,EAAE,MAAM,IAAI;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAGjC,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;IAE9B,IAAI,kBACF,cAAc,eACd,WAAW,eACX,WAAW,cACX,UAAU,EACX,GAAG,CAAA,GAAA,mBAAW,EAAE;QAAC,GAAG,KAAK;mBAAE;mBAAW;sBAAW;IAAY,GAAG;IACjE,IAAI,cAAC,UAAU,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IAE9C,qBACE,gCAAC;QACE,GAAG,cAAc;QAClB,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,2DAAK,GACL,sBACA;YACE,eAAe;QACjB,GACA,WAAW,SAAS;QAGxB,KAAK;QACL,OAAO;YACL,GAAI,aAAa,CAAC,IAAI,eAAe,KAAK;YAC1C,GAAG,WAAW,KAAK;YACnB,sEAAsE;YACtE,OAAO;YACP,QAAQ;QACV;qBACA,gCAAC,CAAA,GAAA,wCAAS;QACR,OAAO,MAAM,eAAe;QAC5B,WAAW;QACX,YAAY;QACZ,YAAY,MAAM,UAAU;QAC5B,cAAc;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;QAC7B,GAAG,UAAU;qBACd,gCAAC;QAAI,MAAK;qBACR,gCAAC;QAAM,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;QAA+B,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QAAE,KAAK;sBACjH,gCAAC;QAAM,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;QAA+B,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QAAE,KAAK;;AAK3H","sources":["packages/@react-spectrum/color/src/ColorArea.tsx"],"sourcesContent":["/*\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 {ColorAreaContext, useContextProps} from 'react-aria-components';\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\n/**\n * ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = React.forwardRef(function ColorArea(props: SpectrumColorAreaProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputXRef = useRef(null);\n let inputYRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputXRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorAreaContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let state = useColorAreaState(props);\n\n let {\n colorAreaProps,\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 ...(isDisabled ? {} : colorAreaProps.style),\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n width: size,\n height: size\n }}>\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\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}) as (props: SpectrumColorAreaProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ColorArea.module.js.map"}
|