@react-spectrum/color 3.0.0-nightly.4552 → 3.0.0-nightly.4558
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/ColorArea.main.js +97 -0
- package/dist/ColorArea.main.js.map +1 -0
- package/dist/ColorArea.mjs +92 -0
- package/dist/ColorArea.module.js +92 -0
- package/dist/ColorArea.module.js.map +1 -0
- package/dist/ColorField.main.js +61 -0
- package/dist/ColorField.main.js.map +1 -0
- package/dist/ColorField.mjs +56 -0
- package/dist/ColorField.module.js +56 -0
- package/dist/ColorField.module.js.map +1 -0
- package/dist/ColorSlider.main.js +125 -0
- package/dist/ColorSlider.main.js.map +1 -0
- package/dist/ColorSlider.mjs +120 -0
- package/dist/ColorSlider.module.js +120 -0
- package/dist/ColorSlider.module.js.map +1 -0
- package/dist/ColorThumb.main.js +94 -0
- package/dist/ColorThumb.main.js.map +1 -0
- package/dist/ColorThumb.mjs +89 -0
- package/dist/ColorThumb.module.js +89 -0
- package/dist/ColorThumb.module.js.map +1 -0
- package/dist/ColorWheel.main.js +114 -0
- package/dist/ColorWheel.main.js.map +1 -0
- package/dist/ColorWheel.mjs +109 -0
- package/dist/ColorWheel.module.js +109 -0
- package/dist/ColorWheel.module.js.map +1 -0
- package/dist/colorarea_vars_css.main.js +32 -0
- package/dist/colorarea_vars_css.main.js.map +1 -0
- package/dist/colorarea_vars_css.mjs +34 -0
- package/dist/colorarea_vars_css.module.js +34 -0
- package/dist/colorarea_vars_css.module.js.map +1 -0
- package/dist/colorfield.faeff3c2.css +12 -0
- package/dist/colorfield.faeff3c2.css.map +1 -0
- package/dist/colorfield_css.main.js +11 -0
- package/dist/colorfield_css.main.js.map +1 -0
- package/dist/colorfield_css.mjs +13 -0
- package/dist/colorfield_css.module.js +13 -0
- package/dist/colorfield_css.module.js.map +1 -0
- package/dist/colorhandle_vars_css.main.js +26 -0
- package/dist/colorhandle_vars_css.main.js.map +1 -0
- package/dist/colorhandle_vars_css.mjs +28 -0
- package/dist/colorhandle_vars_css.module.js +28 -0
- package/dist/colorhandle_vars_css.module.js.map +1 -0
- package/dist/colorloupe_vars_css.main.js +23 -0
- package/dist/colorloupe_vars_css.main.js.map +1 -0
- package/dist/colorloupe_vars_css.mjs +25 -0
- package/dist/colorloupe_vars_css.module.js +25 -0
- package/dist/colorloupe_vars_css.module.js.map +1 -0
- package/dist/colorslider_vars_css.main.js +53 -0
- package/dist/colorslider_vars_css.main.js.map +1 -0
- package/dist/colorslider_vars_css.mjs +55 -0
- package/dist/colorslider_vars_css.module.js +55 -0
- package/dist/colorslider_vars_css.module.js.map +1 -0
- package/dist/colorwheel_vars_css.main.js +35 -0
- package/dist/colorwheel_vars_css.main.js.map +1 -0
- package/dist/colorwheel_vars_css.mjs +37 -0
- package/dist/colorwheel_vars_css.module.js +37 -0
- package/dist/colorwheel_vars_css.module.js.map +1 -0
- package/dist/import.mjs +4 -550
- package/dist/main.js +8 -550
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -550
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/vars.08ba4b4c.css +76 -0
- package/dist/vars.08ba4b4c.css.map +1 -0
- package/dist/vars.571f903e.css +120 -0
- package/dist/vars.571f903e.css.map +1 -0
- package/dist/vars.6f3d3943.css +105 -0
- package/dist/vars.6f3d3943.css.map +1 -0
- package/dist/vars.ac235018.css +93 -0
- package/dist/vars.ac235018.css.map +1 -0
- package/dist/vars.ef2c01b8.css +41 -0
- package/dist/vars.ef2c01b8.css.map +1 -0
- package/package.json +16 -16
- package/dist/main.css +0 -447
- package/dist/main.css.map +0 -1
- package/dist/module.css +0 -447
- package/dist/module.css.map +0 -1
package/dist/import.mjs
CHANGED
@@ -1,25 +1,8 @@
|
|
1
|
-
import "./
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import {useColorArea as $kF0Zw$useColorArea, useColorWheel as $kF0Zw$useColorWheel, useColorSlider as $kF0Zw$useColorSlider, useColorField as $kF0Zw$useColorField} from "@react-aria/color";
|
6
|
-
import {useColorAreaState as $kF0Zw$useColorAreaState, useColorWheelState as $kF0Zw$useColorWheelState, useColorSliderState as $kF0Zw$useColorSliderState, useColorFieldState as $kF0Zw$useColorFieldState} from "@react-stately/color";
|
7
|
-
import {useFocusRing as $kF0Zw$useFocusRing} from "@react-aria/focus";
|
8
|
-
import {useProviderProps as $kF0Zw$useProviderProps} from "@react-spectrum/provider";
|
9
|
-
import {Label as $kF0Zw$Label} from "@react-spectrum/label";
|
10
|
-
import {useFocusVisible as $kF0Zw$useFocusVisible, useFocus as $kF0Zw$useFocus} from "@react-aria/interactions";
|
11
|
-
import {useLocale as $kF0Zw$useLocale} from "@react-aria/i18n";
|
12
|
-
import {TextFieldBase as $kF0Zw$TextFieldBase} from "@react-spectrum/textfield";
|
13
|
-
import {useFormProps as $kF0Zw$useFormProps} from "@react-spectrum/form";
|
1
|
+
import {ColorArea as $40046aa1a7ccb226$export$b2103f68a961418e} from "./ColorArea.mjs";
|
2
|
+
import {ColorWheel as $3aac1c27203f04b5$export$f80663f808113381} from "./ColorWheel.mjs";
|
3
|
+
import {ColorSlider as $3870e4ce67ed7ee1$export$44fd664bcca5b6fb} from "./ColorSlider.mjs";
|
4
|
+
import {ColorField as $0077d47e004328f0$export$b865d4358897bb17} from "./ColorField.mjs";
|
14
5
|
|
15
|
-
|
16
|
-
function $parcel$interopDefault(a) {
|
17
|
-
return a && a.__esModule ? a.default : a;
|
18
|
-
}
|
19
|
-
|
20
|
-
function $parcel$export(e, n, v, s) {
|
21
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
22
|
-
}
|
23
6
|
/*
|
24
7
|
* Copyright 2020 Adobe. All rights reserved.
|
25
8
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
@@ -31,537 +14,8 @@ function $parcel$export(e, n, v, s) {
|
|
31
14
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
32
15
|
* governing permissions and limitations under the License.
|
33
16
|
*/ /// <reference types="css-module-types" />
|
34
|
-
/*
|
35
|
-
* Copyright 2021 Adobe. All rights reserved.
|
36
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
37
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
38
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
39
|
-
*
|
40
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
41
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
42
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
43
|
-
* governing permissions and limitations under the License.
|
44
|
-
*/
|
45
|
-
/*
|
46
|
-
* Copyright 2020 Adobe. All rights reserved.
|
47
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
48
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
49
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
50
|
-
*
|
51
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
52
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
53
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
54
|
-
* governing permissions and limitations under the License.
|
55
|
-
*/
|
56
|
-
|
57
|
-
var $9d103974e3e19727$exports = {};
|
58
|
-
|
59
|
-
$parcel$export($9d103974e3e19727$exports, "spectrum-ColorControl-handle--focused", () => $9d103974e3e19727$export$1dd67f16e0d58f73, (v) => $9d103974e3e19727$export$1dd67f16e0d58f73 = v);
|
60
|
-
$parcel$export($9d103974e3e19727$exports, "focus-ring", () => $9d103974e3e19727$export$f39a09f249340e2a, (v) => $9d103974e3e19727$export$f39a09f249340e2a = v);
|
61
|
-
$parcel$export($9d103974e3e19727$exports, "is-disabled", () => $9d103974e3e19727$export$d35bc1e505d1ebbf, (v) => $9d103974e3e19727$export$d35bc1e505d1ebbf = v);
|
62
|
-
$parcel$export($9d103974e3e19727$exports, "is-focused", () => $9d103974e3e19727$export$e7dc768d35940237, (v) => $9d103974e3e19727$export$e7dc768d35940237 = v);
|
63
|
-
$parcel$export($9d103974e3e19727$exports, "spectrum-ColorHandle", () => $9d103974e3e19727$export$cd9afaa621b6216f, (v) => $9d103974e3e19727$export$cd9afaa621b6216f = v);
|
64
|
-
$parcel$export($9d103974e3e19727$exports, "spectrum-ColorHandle-color", () => $9d103974e3e19727$export$afe4c366ed4e659c, (v) => $9d103974e3e19727$export$afe4c366ed4e659c = v);
|
65
|
-
var $9d103974e3e19727$export$1dd67f16e0d58f73;
|
66
|
-
var $9d103974e3e19727$export$f39a09f249340e2a;
|
67
|
-
var $9d103974e3e19727$export$d35bc1e505d1ebbf;
|
68
|
-
var $9d103974e3e19727$export$e7dc768d35940237;
|
69
|
-
var $9d103974e3e19727$export$cd9afaa621b6216f;
|
70
|
-
var $9d103974e3e19727$export$afe4c366ed4e659c;
|
71
|
-
$9d103974e3e19727$export$1dd67f16e0d58f73 = `hoc2UW_spectrum-ColorControl-handle--focused`;
|
72
|
-
$9d103974e3e19727$export$f39a09f249340e2a = `hoc2UW_focus-ring ${$9d103974e3e19727$export$1dd67f16e0d58f73}`;
|
73
|
-
$9d103974e3e19727$export$d35bc1e505d1ebbf = `hoc2UW_is-disabled`;
|
74
|
-
$9d103974e3e19727$export$e7dc768d35940237 = `hoc2UW_is-focused ${$9d103974e3e19727$export$1dd67f16e0d58f73}`;
|
75
|
-
$9d103974e3e19727$export$cd9afaa621b6216f = `hoc2UW_spectrum-ColorHandle`;
|
76
|
-
$9d103974e3e19727$export$afe4c366ed4e659c = `hoc2UW_spectrum-ColorHandle-color`;
|
77
|
-
|
78
|
-
|
79
|
-
var $f3cdcbdb4b87f010$exports = {};
|
80
|
-
|
81
|
-
$parcel$export($f3cdcbdb4b87f010$exports, "is-open", () => $f3cdcbdb4b87f010$export$a9781837241c946d, (v) => $f3cdcbdb4b87f010$export$a9781837241c946d = v);
|
82
|
-
$parcel$export($f3cdcbdb4b87f010$exports, "spectrum-ColorLoupe", () => $f3cdcbdb4b87f010$export$88d6ed2576b21809, (v) => $f3cdcbdb4b87f010$export$88d6ed2576b21809 = v);
|
83
|
-
$parcel$export($f3cdcbdb4b87f010$exports, "spectrum-ColorLoupe-inner-background", () => $f3cdcbdb4b87f010$export$397af82b48750fe5, (v) => $f3cdcbdb4b87f010$export$397af82b48750fe5 = v);
|
84
|
-
$parcel$export($f3cdcbdb4b87f010$exports, "spectrum-ColorLoupe-inner-checker", () => $f3cdcbdb4b87f010$export$f9a2a02e0b271024, (v) => $f3cdcbdb4b87f010$export$f9a2a02e0b271024 = v);
|
85
|
-
$parcel$export($f3cdcbdb4b87f010$exports, "spectrum-ColorLoupe-outer", () => $f3cdcbdb4b87f010$export$d6ad38291e8aca9c, (v) => $f3cdcbdb4b87f010$export$d6ad38291e8aca9c = v);
|
86
|
-
var $f3cdcbdb4b87f010$export$a9781837241c946d;
|
87
|
-
var $f3cdcbdb4b87f010$export$88d6ed2576b21809;
|
88
|
-
var $f3cdcbdb4b87f010$export$397af82b48750fe5;
|
89
|
-
var $f3cdcbdb4b87f010$export$f9a2a02e0b271024;
|
90
|
-
var $f3cdcbdb4b87f010$export$d6ad38291e8aca9c;
|
91
|
-
$f3cdcbdb4b87f010$export$a9781837241c946d = `HpWpfq_is-open`;
|
92
|
-
$f3cdcbdb4b87f010$export$88d6ed2576b21809 = `HpWpfq_spectrum-ColorLoupe`;
|
93
|
-
$f3cdcbdb4b87f010$export$397af82b48750fe5 = `HpWpfq_spectrum-ColorLoupe-inner-background`;
|
94
|
-
$f3cdcbdb4b87f010$export$f9a2a02e0b271024 = `HpWpfq_spectrum-ColorLoupe-inner-checker`;
|
95
|
-
$f3cdcbdb4b87f010$export$d6ad38291e8aca9c = `HpWpfq_spectrum-ColorLoupe-outer`;
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
function $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc(props) {
|
100
|
-
let { value: value, isDisabled: isDisabled, isDragging: isDragging, isFocused: isFocused, children: children, className: className = "", ...otherProps } = props;
|
101
|
-
let patternId = (0, $kF0Zw$useId)();
|
102
|
-
let valueCSS = value.toString("css");
|
103
|
-
return /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
104
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9d103974e3e19727$exports))), "spectrum-ColorHandle", {
|
105
|
-
"is-focused": isFocused,
|
106
|
-
"is-disabled": isDisabled
|
107
|
-
}) + " " + className,
|
108
|
-
...otherProps
|
109
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
110
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9d103974e3e19727$exports))), "spectrum-ColorHandle-color"),
|
111
|
-
style: {
|
112
|
-
backgroundColor: valueCSS
|
113
|
-
}
|
114
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement("svg", {
|
115
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe", {
|
116
|
-
"is-open": isDragging
|
117
|
-
}),
|
118
|
-
"aria-hidden": "true"
|
119
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("pattern", {
|
120
|
-
id: patternId,
|
121
|
-
x: "0",
|
122
|
-
y: "0",
|
123
|
-
width: "16",
|
124
|
-
height: "16",
|
125
|
-
patternUnits: "userSpaceOnUse"
|
126
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("rect", {
|
127
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe-inner-background"),
|
128
|
-
x: "0",
|
129
|
-
y: "0",
|
130
|
-
width: "16",
|
131
|
-
height: "16"
|
132
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement("rect", {
|
133
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe-inner-checker"),
|
134
|
-
x: "0",
|
135
|
-
y: "0",
|
136
|
-
width: "8",
|
137
|
-
height: "8"
|
138
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement("rect", {
|
139
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe-inner-checker"),
|
140
|
-
x: "8",
|
141
|
-
y: "8",
|
142
|
-
width: "8",
|
143
|
-
height: "8"
|
144
|
-
})), /*#__PURE__*/ (0, $kF0Zw$react).createElement("path", {
|
145
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe-inner"),
|
146
|
-
d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
|
147
|
-
fill: `url(#${patternId})`
|
148
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement("path", {
|
149
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe-inner"),
|
150
|
-
d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
|
151
|
-
fill: valueCSS
|
152
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement("path", {
|
153
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f3cdcbdb4b87f010$exports))), "spectrum-ColorLoupe-outer"),
|
154
|
-
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"
|
155
|
-
})), children);
|
156
|
-
}
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
var $7d12200010f0192e$exports = {};
|
162
|
-
|
163
|
-
$parcel$export($7d12200010f0192e$exports, "focus-ring", () => $7d12200010f0192e$export$f39a09f249340e2a, (v) => $7d12200010f0192e$export$f39a09f249340e2a = v);
|
164
|
-
$parcel$export($7d12200010f0192e$exports, "is-disabled", () => $7d12200010f0192e$export$d35bc1e505d1ebbf, (v) => $7d12200010f0192e$export$d35bc1e505d1ebbf = v);
|
165
|
-
$parcel$export($7d12200010f0192e$exports, "is-focused", () => $7d12200010f0192e$export$e7dc768d35940237, (v) => $7d12200010f0192e$export$e7dc768d35940237 = v);
|
166
|
-
$parcel$export($7d12200010f0192e$exports, "spectrum-ColorArea", () => $7d12200010f0192e$export$bb6257a55a3c1efc, (v) => $7d12200010f0192e$export$bb6257a55a3c1efc = v);
|
167
|
-
$parcel$export($7d12200010f0192e$exports, "spectrum-ColorArea-gradient", () => $7d12200010f0192e$export$40686f4fcb8a9916, (v) => $7d12200010f0192e$export$40686f4fcb8a9916 = v);
|
168
|
-
$parcel$export($7d12200010f0192e$exports, "spectrum-ColorArea-handle", () => $7d12200010f0192e$export$d8addbd273c4e00, (v) => $7d12200010f0192e$export$d8addbd273c4e00 = v);
|
169
|
-
$parcel$export($7d12200010f0192e$exports, "spectrum-ColorArea-slider", () => $7d12200010f0192e$export$7d727cacaa7cea1e, (v) => $7d12200010f0192e$export$7d727cacaa7cea1e = v);
|
170
|
-
$parcel$export($7d12200010f0192e$exports, "spectrum-ColorHandle-color", () => $7d12200010f0192e$export$afe4c366ed4e659c, (v) => $7d12200010f0192e$export$afe4c366ed4e659c = v);
|
171
|
-
var $7d12200010f0192e$export$f39a09f249340e2a;
|
172
|
-
var $7d12200010f0192e$export$d35bc1e505d1ebbf;
|
173
|
-
var $7d12200010f0192e$export$e7dc768d35940237;
|
174
|
-
var $7d12200010f0192e$export$bb6257a55a3c1efc;
|
175
|
-
var $7d12200010f0192e$export$40686f4fcb8a9916;
|
176
|
-
var $7d12200010f0192e$export$d8addbd273c4e00;
|
177
|
-
var $7d12200010f0192e$export$7d727cacaa7cea1e;
|
178
|
-
var $7d12200010f0192e$export$afe4c366ed4e659c;
|
179
|
-
$7d12200010f0192e$export$f39a09f249340e2a = `lm1DSq_focus-ring`;
|
180
|
-
$7d12200010f0192e$export$d35bc1e505d1ebbf = `lm1DSq_is-disabled`;
|
181
|
-
$7d12200010f0192e$export$e7dc768d35940237 = `lm1DSq_is-focused`;
|
182
|
-
$7d12200010f0192e$export$bb6257a55a3c1efc = `lm1DSq_spectrum-ColorArea`;
|
183
|
-
$7d12200010f0192e$export$40686f4fcb8a9916 = `lm1DSq_spectrum-ColorArea-gradient`;
|
184
|
-
$7d12200010f0192e$export$d8addbd273c4e00 = `lm1DSq_spectrum-ColorArea-handle`;
|
185
|
-
$7d12200010f0192e$export$7d727cacaa7cea1e = `lm1DSq_spectrum-ColorArea-slider`;
|
186
|
-
$7d12200010f0192e$export$afe4c366ed4e659c = `lm1DSq_spectrum-ColorHandle-color`;
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
function $40046aa1a7ccb226$var$ColorArea(props, ref) {
|
194
|
-
props = (0, $kF0Zw$useProviderProps)(props);
|
195
|
-
let { isDisabled: isDisabled } = props;
|
196
|
-
let size = props.size && (0, $kF0Zw$dimensionValue)(props.size);
|
197
|
-
let { styleProps: styleProps } = (0, $kF0Zw$useStyleProps)(props);
|
198
|
-
let inputXRef = (0, $kF0Zw$useRef)(null);
|
199
|
-
let inputYRef = (0, $kF0Zw$useRef)(null);
|
200
|
-
let containerRef = (0, $kF0Zw$useFocusableRef)(ref, inputXRef);
|
201
|
-
let state = (0, $kF0Zw$useColorAreaState)(props);
|
202
|
-
let { colorAreaProps: colorAreaProps, gradientProps: gradientProps, xInputProps: xInputProps, yInputProps: yInputProps, thumbProps: thumbProps } = (0, $kF0Zw$useColorArea)({
|
203
|
-
...props,
|
204
|
-
inputXRef: inputXRef,
|
205
|
-
inputYRef: inputYRef,
|
206
|
-
containerRef: containerRef
|
207
|
-
}, state);
|
208
|
-
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $kF0Zw$useFocusRing)();
|
209
|
-
return /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
210
|
-
...colorAreaProps,
|
211
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports))), "spectrum-ColorArea", {
|
212
|
-
"is-disabled": isDisabled
|
213
|
-
}, styleProps.className),
|
214
|
-
ref: containerRef,
|
215
|
-
style: {
|
216
|
-
...colorAreaProps.style,
|
217
|
-
...styleProps.style,
|
218
|
-
// Workaround around https://github.com/adobe/spectrum-css/issues/1032
|
219
|
-
width: size,
|
220
|
-
height: size
|
221
|
-
}
|
222
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
223
|
-
...gradientProps,
|
224
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports))), "spectrum-ColorArea-gradient")
|
225
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
|
226
|
-
value: state.getDisplayColor(),
|
227
|
-
isFocused: isFocusVisible,
|
228
|
-
isDisabled: isDisabled,
|
229
|
-
isDragging: state.isDragging,
|
230
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports))), "spectrum-ColorArea-handle"),
|
231
|
-
...thumbProps
|
232
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
233
|
-
role: "presentation"
|
234
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("input", {
|
235
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports))), "spectrum-ColorArea-slider"),
|
236
|
-
...(0, $kF0Zw$mergeProps)(xInputProps, focusProps),
|
237
|
-
ref: inputXRef
|
238
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement("input", {
|
239
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7d12200010f0192e$exports))), "spectrum-ColorArea-slider"),
|
240
|
-
...(0, $kF0Zw$mergeProps)(yInputProps, focusProps),
|
241
|
-
ref: inputYRef
|
242
|
-
}))));
|
243
|
-
}
|
244
|
-
/**
|
245
|
-
* ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.
|
246
|
-
*/ let $40046aa1a7ccb226$export$b2103f68a961418e = /*#__PURE__*/ (0, $kF0Zw$react).forwardRef($40046aa1a7ccb226$var$ColorArea);
|
247
|
-
|
248
|
-
|
249
|
-
/*
|
250
|
-
* Copyright 2020 Adobe. All rights reserved.
|
251
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
252
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
253
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
254
|
-
*
|
255
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
256
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
257
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
258
|
-
* governing permissions and limitations under the License.
|
259
|
-
*/
|
260
|
-
|
261
|
-
|
262
|
-
var $f60625fffea2b12e$exports = {};
|
263
|
-
|
264
|
-
$parcel$export($f60625fffea2b12e$exports, "is-disabled", () => $f60625fffea2b12e$export$d35bc1e505d1ebbf, (v) => $f60625fffea2b12e$export$d35bc1e505d1ebbf = v);
|
265
|
-
$parcel$export($f60625fffea2b12e$exports, "is-dragged", () => $f60625fffea2b12e$export$8778c911bed6c759, (v) => $f60625fffea2b12e$export$8778c911bed6c759 = v);
|
266
|
-
$parcel$export($f60625fffea2b12e$exports, "is-focused", () => $f60625fffea2b12e$export$e7dc768d35940237, (v) => $f60625fffea2b12e$export$e7dc768d35940237 = v);
|
267
|
-
$parcel$export($f60625fffea2b12e$exports, "spectrum-ColorControl-hiddenField", () => $f60625fffea2b12e$export$41ee4f903fc703f9, (v) => $f60625fffea2b12e$export$41ee4f903fc703f9 = v);
|
268
|
-
$parcel$export($f60625fffea2b12e$exports, "spectrum-ColorWheel", () => $f60625fffea2b12e$export$b70a5ca28702fbc6, (v) => $f60625fffea2b12e$export$b70a5ca28702fbc6 = v);
|
269
|
-
$parcel$export($f60625fffea2b12e$exports, "spectrum-ColorWheel-gradient", () => $f60625fffea2b12e$export$9afaa791d7500a9b, (v) => $f60625fffea2b12e$export$9afaa791d7500a9b = v);
|
270
|
-
$parcel$export($f60625fffea2b12e$exports, "spectrum-ColorWheel-handle", () => $f60625fffea2b12e$export$4cd23920eb8ac056, (v) => $f60625fffea2b12e$export$4cd23920eb8ac056 = v);
|
271
|
-
$parcel$export($f60625fffea2b12e$exports, "spectrum-ColorWheel-segment", () => $f60625fffea2b12e$export$ada9fbffdaa4f10, (v) => $f60625fffea2b12e$export$ada9fbffdaa4f10 = v);
|
272
|
-
$parcel$export($f60625fffea2b12e$exports, "spectrum-ColorWheel-slider", () => $f60625fffea2b12e$export$f476ddda713d62b, (v) => $f60625fffea2b12e$export$f476ddda713d62b = v);
|
273
|
-
var $f60625fffea2b12e$export$d35bc1e505d1ebbf;
|
274
|
-
var $f60625fffea2b12e$export$8778c911bed6c759;
|
275
|
-
var $f60625fffea2b12e$export$e7dc768d35940237;
|
276
|
-
var $f60625fffea2b12e$export$41ee4f903fc703f9;
|
277
|
-
var $f60625fffea2b12e$export$b70a5ca28702fbc6;
|
278
|
-
var $f60625fffea2b12e$export$9afaa791d7500a9b;
|
279
|
-
var $f60625fffea2b12e$export$4cd23920eb8ac056;
|
280
|
-
var $f60625fffea2b12e$export$ada9fbffdaa4f10;
|
281
|
-
var $f60625fffea2b12e$export$f476ddda713d62b;
|
282
|
-
$f60625fffea2b12e$export$d35bc1e505d1ebbf = `qPIMxa_is-disabled`;
|
283
|
-
$f60625fffea2b12e$export$8778c911bed6c759 = `qPIMxa_is-dragged`;
|
284
|
-
$f60625fffea2b12e$export$e7dc768d35940237 = `qPIMxa_is-focused`;
|
285
|
-
$f60625fffea2b12e$export$41ee4f903fc703f9 = `qPIMxa_spectrum-ColorControl-hiddenField`;
|
286
|
-
$f60625fffea2b12e$export$b70a5ca28702fbc6 = `qPIMxa_spectrum-ColorWheel`;
|
287
|
-
$f60625fffea2b12e$export$9afaa791d7500a9b = `qPIMxa_spectrum-ColorWheel-gradient`;
|
288
|
-
$f60625fffea2b12e$export$4cd23920eb8ac056 = `qPIMxa_spectrum-ColorWheel-handle`;
|
289
|
-
$f60625fffea2b12e$export$ada9fbffdaa4f10 = `qPIMxa_spectrum-ColorWheel-segment`;
|
290
|
-
$f60625fffea2b12e$export$f476ddda713d62b = `qPIMxa_spectrum-ColorWheel-slider ${$f60625fffea2b12e$export$41ee4f903fc703f9}`;
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
const $3aac1c27203f04b5$var$WHEEL_THICKNESS = 24;
|
299
|
-
function $3aac1c27203f04b5$var$ColorWheel(props, ref) {
|
300
|
-
props = (0, $kF0Zw$useProviderProps)(props);
|
301
|
-
let { isDisabled: isDisabled } = props;
|
302
|
-
let size = props.size && (0, $kF0Zw$dimensionValue)(props.size);
|
303
|
-
let { styleProps: styleProps } = (0, $kF0Zw$useStyleProps)(props);
|
304
|
-
let inputRef = (0, $kF0Zw$useRef)(null);
|
305
|
-
let containerRef = (0, $kF0Zw$useFocusableRef)(ref, inputRef);
|
306
|
-
let [wheelRadius, setWheelRadius] = (0, $kF0Zw$useState)(0);
|
307
|
-
let [wheelThickness, setWheelThickness] = (0, $kF0Zw$useState)($3aac1c27203f04b5$var$WHEEL_THICKNESS);
|
308
|
-
let resizeHandler = (0, $kF0Zw$useCallback)(()=>{
|
309
|
-
if (containerRef.current) {
|
310
|
-
setWheelRadius(containerRef.current.offsetWidth / 2);
|
311
|
-
let thickness = window.getComputedStyle(containerRef.current).getPropertyValue("--spectrum-colorwheel-track-thickness");
|
312
|
-
if (thickness) setWheelThickness(parseInt(thickness, 10));
|
313
|
-
}
|
314
|
-
}, [
|
315
|
-
containerRef,
|
316
|
-
setWheelRadius,
|
317
|
-
setWheelThickness
|
318
|
-
]);
|
319
|
-
(0, $kF0Zw$useEffect)(()=>{
|
320
|
-
// the size observer's fallback to the window resize event doesn't fire on mount
|
321
|
-
if (wheelRadius === 0) resizeHandler();
|
322
|
-
}, [
|
323
|
-
wheelRadius,
|
324
|
-
resizeHandler
|
325
|
-
]);
|
326
|
-
(0, $kF0Zw$useResizeObserver)({
|
327
|
-
ref: containerRef,
|
328
|
-
onResize: resizeHandler
|
329
|
-
});
|
330
|
-
let state = (0, $kF0Zw$useColorWheelState)(props);
|
331
|
-
let { trackProps: trackProps, inputProps: inputProps, thumbProps: thumbProps } = (0, $kF0Zw$useColorWheel)({
|
332
|
-
...props,
|
333
|
-
innerRadius: wheelRadius - wheelThickness,
|
334
|
-
outerRadius: wheelRadius
|
335
|
-
}, state, inputRef);
|
336
|
-
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $kF0Zw$useFocusRing)();
|
337
|
-
return /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
338
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f60625fffea2b12e$exports))), "spectrum-ColorWheel", {
|
339
|
-
"is-disabled": isDisabled
|
340
|
-
}, styleProps.className),
|
341
|
-
ref: containerRef,
|
342
|
-
style: {
|
343
|
-
...styleProps.style,
|
344
|
-
// Workaround around https://github.com/adobe/spectrum-css/issues/1032
|
345
|
-
// @ts-ignore
|
346
|
-
"width": size,
|
347
|
-
"height": size
|
348
|
-
}
|
349
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
350
|
-
...trackProps,
|
351
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f60625fffea2b12e$exports))), "spectrum-ColorWheel-gradient")
|
352
|
-
}), /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
|
353
|
-
value: state.getDisplayColor(),
|
354
|
-
isFocused: isFocusVisible,
|
355
|
-
isDisabled: isDisabled,
|
356
|
-
isDragging: state.isDragging,
|
357
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f60625fffea2b12e$exports))), "spectrum-ColorWheel-handle"),
|
358
|
-
...thumbProps
|
359
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("input", {
|
360
|
-
...focusProps,
|
361
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f60625fffea2b12e$exports))), "spectrum-ColorWheel-slider"),
|
362
|
-
...inputProps,
|
363
|
-
ref: inputRef
|
364
|
-
})));
|
365
|
-
}
|
366
|
-
/**
|
367
|
-
* ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.
|
368
|
-
*/ let $3aac1c27203f04b5$export$f80663f808113381 = /*#__PURE__*/ (0, $kF0Zw$react).forwardRef($3aac1c27203f04b5$var$ColorWheel);
|
369
|
-
|
370
|
-
|
371
|
-
/*
|
372
|
-
* Copyright 2020 Adobe. All rights reserved.
|
373
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
374
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
375
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
376
|
-
*
|
377
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
378
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
379
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
380
|
-
* governing permissions and limitations under the License.
|
381
|
-
*/
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
var $670e80c7e5915fb5$exports = {};
|
386
|
-
|
387
|
-
$parcel$export($670e80c7e5915fb5$exports, "contextualHelp", () => $670e80c7e5915fb5$export$4ba534aba1836d, (v) => $670e80c7e5915fb5$export$4ba534aba1836d = v);
|
388
|
-
$parcel$export($670e80c7e5915fb5$exports, "is-disabled", () => $670e80c7e5915fb5$export$d35bc1e505d1ebbf, (v) => $670e80c7e5915fb5$export$d35bc1e505d1ebbf = v);
|
389
|
-
$parcel$export($670e80c7e5915fb5$exports, "is-focused", () => $670e80c7e5915fb5$export$e7dc768d35940237, (v) => $670e80c7e5915fb5$export$e7dc768d35940237 = v);
|
390
|
-
$parcel$export($670e80c7e5915fb5$exports, "label", () => $670e80c7e5915fb5$export$1237798dc640739a, (v) => $670e80c7e5915fb5$export$1237798dc640739a = v);
|
391
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorControl-hiddenField", () => $670e80c7e5915fb5$export$41ee4f903fc703f9, (v) => $670e80c7e5915fb5$export$41ee4f903fc703f9 = v);
|
392
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider", () => $670e80c7e5915fb5$export$a5f8b0989b27a604, (v) => $670e80c7e5915fb5$export$a5f8b0989b27a604 = v);
|
393
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider--vertical", () => $670e80c7e5915fb5$export$83dcf61b398bfaf1, (v) => $670e80c7e5915fb5$export$83dcf61b398bfaf1 = v);
|
394
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-container--horizontal", () => $670e80c7e5915fb5$export$33e97914f6746614, (v) => $670e80c7e5915fb5$export$33e97914f6746614 = v);
|
395
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-container--vertical", () => $670e80c7e5915fb5$export$cd1c093289104c66, (v) => $670e80c7e5915fb5$export$cd1c093289104c66 = v);
|
396
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-contextualHelp", () => $670e80c7e5915fb5$export$26ffe4cf5a5aa53c, (v) => $670e80c7e5915fb5$export$26ffe4cf5a5aa53c = v);
|
397
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-handle", () => $670e80c7e5915fb5$export$8c273ba92fabe1f1, (v) => $670e80c7e5915fb5$export$8c273ba92fabe1f1 = v);
|
398
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-labelContainer", () => $670e80c7e5915fb5$export$65139e62047f0361, (v) => $670e80c7e5915fb5$export$65139e62047f0361 = v);
|
399
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-slider", () => $670e80c7e5915fb5$export$2f08b72944af536, (v) => $670e80c7e5915fb5$export$2f08b72944af536 = v);
|
400
|
-
$parcel$export($670e80c7e5915fb5$exports, "spectrum-ColorSlider-valueLabel", () => $670e80c7e5915fb5$export$c2fbec5a538c1f81, (v) => $670e80c7e5915fb5$export$c2fbec5a538c1f81 = v);
|
401
|
-
$parcel$export($670e80c7e5915fb5$exports, "value", () => $670e80c7e5915fb5$export$2ab9a8f9f1186f14, (v) => $670e80c7e5915fb5$export$2ab9a8f9f1186f14 = v);
|
402
|
-
var $670e80c7e5915fb5$export$4ba534aba1836d;
|
403
|
-
var $670e80c7e5915fb5$export$d35bc1e505d1ebbf;
|
404
|
-
var $670e80c7e5915fb5$export$e7dc768d35940237;
|
405
|
-
var $670e80c7e5915fb5$export$1237798dc640739a;
|
406
|
-
var $670e80c7e5915fb5$export$41ee4f903fc703f9;
|
407
|
-
var $670e80c7e5915fb5$export$a5f8b0989b27a604;
|
408
|
-
var $670e80c7e5915fb5$export$83dcf61b398bfaf1;
|
409
|
-
var $670e80c7e5915fb5$export$33e97914f6746614;
|
410
|
-
var $670e80c7e5915fb5$export$cd1c093289104c66;
|
411
|
-
var $670e80c7e5915fb5$export$26ffe4cf5a5aa53c;
|
412
|
-
var $670e80c7e5915fb5$export$8c273ba92fabe1f1;
|
413
|
-
var $670e80c7e5915fb5$export$65139e62047f0361;
|
414
|
-
var $670e80c7e5915fb5$export$2f08b72944af536;
|
415
|
-
var $670e80c7e5915fb5$export$c2fbec5a538c1f81;
|
416
|
-
var $670e80c7e5915fb5$export$2ab9a8f9f1186f14;
|
417
|
-
$670e80c7e5915fb5$export$4ba534aba1836d = `WJOmgG_contextualHelp`;
|
418
|
-
$670e80c7e5915fb5$export$d35bc1e505d1ebbf = `WJOmgG_is-disabled`;
|
419
|
-
$670e80c7e5915fb5$export$e7dc768d35940237 = `WJOmgG_is-focused`;
|
420
|
-
$670e80c7e5915fb5$export$1237798dc640739a = `WJOmgG_label`;
|
421
|
-
$670e80c7e5915fb5$export$41ee4f903fc703f9 = `WJOmgG_spectrum-ColorControl-hiddenField`;
|
422
|
-
$670e80c7e5915fb5$export$a5f8b0989b27a604 = `WJOmgG_spectrum-ColorSlider`;
|
423
|
-
$670e80c7e5915fb5$export$83dcf61b398bfaf1 = `WJOmgG_spectrum-ColorSlider--vertical`;
|
424
|
-
$670e80c7e5915fb5$export$33e97914f6746614 = `WJOmgG_spectrum-ColorSlider-container--horizontal`;
|
425
|
-
$670e80c7e5915fb5$export$cd1c093289104c66 = `WJOmgG_spectrum-ColorSlider-container--vertical`;
|
426
|
-
$670e80c7e5915fb5$export$26ffe4cf5a5aa53c = `WJOmgG_spectrum-ColorSlider-contextualHelp`;
|
427
|
-
$670e80c7e5915fb5$export$8c273ba92fabe1f1 = `WJOmgG_spectrum-ColorSlider-handle`;
|
428
|
-
$670e80c7e5915fb5$export$65139e62047f0361 = `WJOmgG_spectrum-ColorSlider-labelContainer`;
|
429
|
-
$670e80c7e5915fb5$export$2f08b72944af536 = `WJOmgG_spectrum-ColorSlider-slider ${$670e80c7e5915fb5$export$41ee4f903fc703f9}`;
|
430
|
-
$670e80c7e5915fb5$export$c2fbec5a538c1f81 = `WJOmgG_spectrum-ColorSlider-valueLabel`;
|
431
|
-
$670e80c7e5915fb5$export$2ab9a8f9f1186f14 = `WJOmgG_value`;
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
function $3870e4ce67ed7ee1$var$ColorSlider(props, ref) {
|
440
|
-
props = (0, $kF0Zw$useProviderProps)(props);
|
441
|
-
let { isDisabled: isDisabled, channel: channel, orientation: orientation, label: label, showValueLabel: showValueLabel, "aria-label": ariaLabel } = props;
|
442
|
-
let vertical = orientation === "vertical";
|
443
|
-
let { styleProps: styleProps } = (0, $kF0Zw$useStyleProps)(props);
|
444
|
-
let { locale: locale } = (0, $kF0Zw$useLocale)();
|
445
|
-
let inputRef = (0, $kF0Zw$useRef)(null);
|
446
|
-
let trackRef = (0, $kF0Zw$useRef)(null);
|
447
|
-
let domRef = (0, $kF0Zw$useFocusableRef)(ref, inputRef);
|
448
|
-
let state = (0, $kF0Zw$useColorSliderState)({
|
449
|
-
...props,
|
450
|
-
locale: locale
|
451
|
-
});
|
452
|
-
// If vertical and a label is provided, use it as an aria-label instead.
|
453
|
-
if (vertical && label) {
|
454
|
-
ariaLabel = ariaLabel || (typeof label === "string" ? label : undefined);
|
455
|
-
label = null;
|
456
|
-
}
|
457
|
-
// If no external label, aria-label or aria-labelledby is provided,
|
458
|
-
// default to displaying the localized channel value.
|
459
|
-
// Specifically check if label is undefined. If label is `null` then display no visible label.
|
460
|
-
// A default aria-label is provided by useColorSlider in that case.
|
461
|
-
if (label === undefined && !ariaLabel && !props["aria-labelledby"] && !vertical) label = state.value.getChannelName(channel, locale);
|
462
|
-
// Show the value label by default if there is a visible label
|
463
|
-
if (showValueLabel == null) showValueLabel = !!label;
|
464
|
-
let { inputProps: inputProps, thumbProps: thumbProps, trackProps: trackProps, labelProps: labelProps, outputProps: outputProps } = (0, $kF0Zw$useColorSlider)({
|
465
|
-
...props,
|
466
|
-
label: label,
|
467
|
-
"aria-label": ariaLabel,
|
468
|
-
trackRef: trackRef,
|
469
|
-
inputRef: inputRef
|
470
|
-
}, state);
|
471
|
-
let { isFocusVisible: isFocusVisible } = (0, $kF0Zw$useFocusVisible)();
|
472
|
-
let [isFocused, setIsFocused] = (0, $kF0Zw$useState)(false);
|
473
|
-
let { focusProps: focusProps } = (0, $kF0Zw$useFocus)({
|
474
|
-
isDisabled: isDisabled,
|
475
|
-
onFocusChange: setIsFocused
|
476
|
-
});
|
477
|
-
return /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
478
|
-
ref: domRef,
|
479
|
-
...styleProps,
|
480
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), {
|
481
|
-
"spectrum-ColorSlider-container--horizontal": !vertical,
|
482
|
-
"spectrum-ColorSlider-container--vertical": vertical
|
483
|
-
})
|
484
|
-
}, label && /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
485
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), "spectrum-ColorSlider-labelContainer")
|
486
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $kF0Zw$Label), labelProps, label), props.contextualHelp && /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $kF0Zw$SlotProvider), {
|
487
|
-
slots: {
|
488
|
-
actionButton: {
|
489
|
-
UNSAFE_className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), "spectrum-ColorSlider-contextualHelp")
|
490
|
-
}
|
491
|
-
}
|
492
|
-
}, props.contextualHelp), showValueLabel && /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $kF0Zw$Label), {
|
493
|
-
elementType: "span",
|
494
|
-
UNSAFE_className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), "spectrum-ColorSlider-valueLabel")
|
495
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("output", outputProps, state.value.formatChannelValue(channel, locale)))), /*#__PURE__*/ (0, $kF0Zw$react).createElement("div", {
|
496
|
-
...trackProps,
|
497
|
-
ref: trackRef,
|
498
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), "spectrum-ColorSlider", {
|
499
|
-
"is-disabled": isDisabled,
|
500
|
-
"spectrum-ColorSlider--vertical": vertical
|
501
|
-
})
|
502
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
|
503
|
-
value: state.getDisplayColor(),
|
504
|
-
isFocused: isFocused && isFocusVisible,
|
505
|
-
isDisabled: isDisabled,
|
506
|
-
isDragging: state.isThumbDragging(0),
|
507
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), "spectrum-ColorSlider-handle"),
|
508
|
-
...thumbProps
|
509
|
-
}, /*#__PURE__*/ (0, $kF0Zw$react).createElement("input", {
|
510
|
-
...inputProps,
|
511
|
-
...focusProps,
|
512
|
-
ref: inputRef,
|
513
|
-
className: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($670e80c7e5915fb5$exports))), "spectrum-ColorSlider-slider")
|
514
|
-
}))));
|
515
|
-
}
|
516
|
-
/**
|
517
|
-
* ColorSliders allow users to adjust an individual channel of a color value.
|
518
|
-
*/ let $3870e4ce67ed7ee1$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $kF0Zw$react).forwardRef($3870e4ce67ed7ee1$var$ColorSlider);
|
519
|
-
|
520
|
-
|
521
|
-
/*
|
522
|
-
* Copyright 2020 Adobe. All rights reserved.
|
523
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
524
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
525
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
526
|
-
*
|
527
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
528
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
529
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
530
|
-
* governing permissions and limitations under the License.
|
531
|
-
*/
|
532
|
-
|
533
|
-
var $9d47b39540b9e48a$exports = {};
|
534
|
-
|
535
|
-
$parcel$export($9d47b39540b9e48a$exports, "react-spectrum-ColorField-input", () => $9d47b39540b9e48a$export$7d80c6630a750b1, (v) => $9d47b39540b9e48a$export$7d80c6630a750b1 = v);
|
536
|
-
var $9d47b39540b9e48a$export$7d80c6630a750b1;
|
537
|
-
$9d47b39540b9e48a$export$7d80c6630a750b1 = `UccskW_react-spectrum-ColorField-input`;
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
17
|
|
544
18
|
|
545
|
-
function $0077d47e004328f0$var$ColorField(props, ref) {
|
546
|
-
props = (0, $kF0Zw$useProviderProps)(props);
|
547
|
-
props = (0, $kF0Zw$useFormProps)(props);
|
548
|
-
let { value: // These disabled props are handled by the state hook
|
549
|
-
value, defaultValue: defaultValue, onChange: onChange, ...otherProps } = props;
|
550
|
-
let state = (0, $kF0Zw$useColorFieldState)(props);
|
551
|
-
let inputRef = (0, $kF0Zw$useRef)(null);
|
552
|
-
let result = (0, $kF0Zw$useColorField)(otherProps, state, inputRef);
|
553
|
-
if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/ColorField.html#help-text");
|
554
|
-
return /*#__PURE__*/ (0, $kF0Zw$react).createElement((0, $kF0Zw$TextFieldBase), {
|
555
|
-
...otherProps,
|
556
|
-
ref: ref,
|
557
|
-
inputRef: inputRef,
|
558
|
-
...result,
|
559
|
-
inputClassName: (0, $kF0Zw$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9d47b39540b9e48a$exports))), "react-spectrum-ColorField-input")
|
560
|
-
});
|
561
|
-
}
|
562
|
-
/**
|
563
|
-
* ColorFields allow users to enter a color in #rrggbb hexadecimal format.
|
564
|
-
*/ const $0077d47e004328f0$export$b865d4358897bb17 = /*#__PURE__*/ (0, $kF0Zw$react).forwardRef($0077d47e004328f0$var$ColorField);
|
565
19
|
|
566
20
|
|
567
21
|
|