@react-spectrum/color 3.0.0-nightly.3085 → 3.0.0-nightly.3086
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -1
- package/dist/main.js +183 -183
- package/dist/main.js.map +1 -1
- package/dist/module.js +181 -181
- package/dist/module.js.map +1 -1
- package/package.json +20 -20
package/dist/main.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
require("./main.css");
|
2
|
-
var $
|
3
|
-
var $
|
4
|
-
var $
|
5
|
-
var $
|
6
|
-
var $
|
7
|
-
var $
|
8
|
-
var $
|
9
|
-
var $
|
10
|
-
var $
|
11
|
-
var $
|
12
|
-
var $
|
13
|
-
var $
|
2
|
+
var $avQWG$reactspectrumutils = require("@react-spectrum/utils");
|
3
|
+
var $avQWG$react = require("react");
|
4
|
+
var $avQWG$reactariacolor = require("@react-aria/color");
|
5
|
+
var $avQWG$reactstatelycolor = require("@react-stately/color");
|
6
|
+
var $avQWG$reactariafocus = require("@react-aria/focus");
|
7
|
+
var $avQWG$reactspectrumprovider = require("@react-spectrum/provider");
|
8
|
+
var $avQWG$reactariautils = require("@react-aria/utils");
|
9
|
+
var $avQWG$reactspectrumlayout = require("@react-spectrum/layout");
|
10
|
+
var $avQWG$reactspectrumlabel = require("@react-spectrum/label");
|
11
|
+
var $avQWG$reactariainteractions = require("@react-aria/interactions");
|
12
|
+
var $avQWG$reactariai18n = require("@react-aria/i18n");
|
13
|
+
var $avQWG$reactspectrumtextfield = require("@react-spectrum/textfield");
|
14
14
|
|
15
15
|
function $parcel$exportWildcard(dest, source) {
|
16
16
|
Object.keys(source).forEach(function(key) {
|
@@ -34,138 +34,138 @@ function $parcel$interopDefault(a) {
|
|
34
34
|
function $parcel$export(e, n, v, s) {
|
35
35
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
36
36
|
}
|
37
|
-
var $
|
37
|
+
var $0738156f1768a796$exports = {};
|
38
38
|
|
39
|
-
$parcel$export($
|
39
|
+
$parcel$export($0738156f1768a796$exports, "ColorWheel", () => $0738156f1768a796$export$f80663f808113381);
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
-
var $
|
43
|
+
var $e714641401baf106$exports = {};
|
44
44
|
|
45
|
-
$parcel$export($
|
46
|
-
$parcel$export($
|
47
|
-
$parcel$export($
|
48
|
-
$parcel$export($
|
49
|
-
$parcel$export($
|
50
|
-
var $
|
51
|
-
var $
|
52
|
-
var $
|
53
|
-
var $
|
54
|
-
var $
|
55
|
-
$
|
56
|
-
$
|
57
|
-
$
|
58
|
-
$
|
59
|
-
$
|
45
|
+
$parcel$export($e714641401baf106$exports, "spectrum-ColorHandle", () => $e714641401baf106$export$cd9afaa621b6216f, (v) => $e714641401baf106$export$cd9afaa621b6216f = v);
|
46
|
+
$parcel$export($e714641401baf106$exports, "is-focused", () => $e714641401baf106$export$e7dc768d35940237, (v) => $e714641401baf106$export$e7dc768d35940237 = v);
|
47
|
+
$parcel$export($e714641401baf106$exports, "focus-ring", () => $e714641401baf106$export$f39a09f249340e2a, (v) => $e714641401baf106$export$f39a09f249340e2a = v);
|
48
|
+
$parcel$export($e714641401baf106$exports, "is-disabled", () => $e714641401baf106$export$d35bc1e505d1ebbf, (v) => $e714641401baf106$export$d35bc1e505d1ebbf = v);
|
49
|
+
$parcel$export($e714641401baf106$exports, "spectrum-ColorHandle-color", () => $e714641401baf106$export$afe4c366ed4e659c, (v) => $e714641401baf106$export$afe4c366ed4e659c = v);
|
50
|
+
var $e714641401baf106$export$cd9afaa621b6216f;
|
51
|
+
var $e714641401baf106$export$e7dc768d35940237;
|
52
|
+
var $e714641401baf106$export$f39a09f249340e2a;
|
53
|
+
var $e714641401baf106$export$d35bc1e505d1ebbf;
|
54
|
+
var $e714641401baf106$export$afe4c366ed4e659c;
|
55
|
+
$e714641401baf106$export$cd9afaa621b6216f = "spectrum-ColorHandle_5a9f41";
|
56
|
+
$e714641401baf106$export$e7dc768d35940237 = "is-focused_5a9f41";
|
57
|
+
$e714641401baf106$export$f39a09f249340e2a = "focus-ring_5a9f41";
|
58
|
+
$e714641401baf106$export$d35bc1e505d1ebbf = "is-disabled_5a9f41";
|
59
|
+
$e714641401baf106$export$afe4c366ed4e659c = "spectrum-ColorHandle-color_5a9f41";
|
60
60
|
|
61
61
|
|
62
|
-
var $
|
62
|
+
var $e5f20e8f18b3096c$exports = {};
|
63
63
|
|
64
|
-
$parcel$export($
|
65
|
-
$parcel$export($
|
66
|
-
$parcel$export($
|
67
|
-
$parcel$export($
|
68
|
-
$parcel$export($
|
69
|
-
var $
|
70
|
-
var $
|
71
|
-
var $
|
72
|
-
var $
|
73
|
-
var $
|
74
|
-
$
|
75
|
-
$
|
76
|
-
$
|
77
|
-
$
|
78
|
-
$
|
64
|
+
$parcel$export($e5f20e8f18b3096c$exports, "spectrum-ColorLoupe", () => $e5f20e8f18b3096c$export$88d6ed2576b21809, (v) => $e5f20e8f18b3096c$export$88d6ed2576b21809 = v);
|
65
|
+
$parcel$export($e5f20e8f18b3096c$exports, "is-open", () => $e5f20e8f18b3096c$export$a9781837241c946d, (v) => $e5f20e8f18b3096c$export$a9781837241c946d = v);
|
66
|
+
$parcel$export($e5f20e8f18b3096c$exports, "spectrum-ColorLoupe-outer", () => $e5f20e8f18b3096c$export$d6ad38291e8aca9c, (v) => $e5f20e8f18b3096c$export$d6ad38291e8aca9c = v);
|
67
|
+
$parcel$export($e5f20e8f18b3096c$exports, "spectrum-ColorLoupe-inner-background", () => $e5f20e8f18b3096c$export$397af82b48750fe5, (v) => $e5f20e8f18b3096c$export$397af82b48750fe5 = v);
|
68
|
+
$parcel$export($e5f20e8f18b3096c$exports, "spectrum-ColorLoupe-inner-checker", () => $e5f20e8f18b3096c$export$f9a2a02e0b271024, (v) => $e5f20e8f18b3096c$export$f9a2a02e0b271024 = v);
|
69
|
+
var $e5f20e8f18b3096c$export$88d6ed2576b21809;
|
70
|
+
var $e5f20e8f18b3096c$export$a9781837241c946d;
|
71
|
+
var $e5f20e8f18b3096c$export$d6ad38291e8aca9c;
|
72
|
+
var $e5f20e8f18b3096c$export$397af82b48750fe5;
|
73
|
+
var $e5f20e8f18b3096c$export$f9a2a02e0b271024;
|
74
|
+
$e5f20e8f18b3096c$export$88d6ed2576b21809 = "spectrum-ColorLoupe_c818a8";
|
75
|
+
$e5f20e8f18b3096c$export$a9781837241c946d = "is-open_c818a8";
|
76
|
+
$e5f20e8f18b3096c$export$d6ad38291e8aca9c = "spectrum-ColorLoupe-outer_c818a8";
|
77
|
+
$e5f20e8f18b3096c$export$397af82b48750fe5 = "spectrum-ColorLoupe-inner-background_c818a8";
|
78
|
+
$e5f20e8f18b3096c$export$f9a2a02e0b271024 = "spectrum-ColorLoupe-inner-checker_c818a8";
|
79
79
|
|
80
80
|
|
81
81
|
|
82
|
-
function $
|
82
|
+
function $1dc35f6528c39993$export$a3cc47cee1c1ccc(props) {
|
83
83
|
let { value: value , isDisabled: isDisabled , isDragging: isDragging , isFocused: isFocused , children: children , className: className = '' , ...otherProps } = props;
|
84
|
-
let patternId = $
|
84
|
+
let patternId = $avQWG$reactariautils.useId();
|
85
85
|
let valueCSS = value.toString('css');
|
86
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($
|
87
|
-
className: $
|
86
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("div", {
|
87
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e714641401baf106$exports)), 'spectrum-ColorHandle', {
|
88
88
|
'is-focused': isFocused,
|
89
89
|
'is-disabled': isDisabled
|
90
90
|
}) + ' ' + className,
|
91
91
|
...otherProps
|
92
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
93
|
-
className: $
|
92
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("div", {
|
93
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e714641401baf106$exports)), 'spectrum-ColorHandle-color'),
|
94
94
|
style: {
|
95
95
|
backgroundColor: valueCSS
|
96
96
|
}
|
97
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
98
|
-
className: $
|
97
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("svg", {
|
98
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe', {
|
99
99
|
'is-open': isDragging
|
100
100
|
}),
|
101
101
|
"aria-hidden": "true"
|
102
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
102
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("pattern", {
|
103
103
|
id: patternId,
|
104
104
|
x: "0",
|
105
105
|
y: "0",
|
106
106
|
width: "16",
|
107
107
|
height: "16",
|
108
108
|
patternUnits: "userSpaceOnUse"
|
109
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
110
|
-
className: $
|
109
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("rect", {
|
110
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe-inner-background'),
|
111
111
|
x: "0",
|
112
112
|
y: "0",
|
113
113
|
width: "16",
|
114
114
|
height: "16"
|
115
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
116
|
-
className: $
|
115
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("rect", {
|
116
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe-inner-checker'),
|
117
117
|
x: "0",
|
118
118
|
y: "0",
|
119
119
|
width: "8",
|
120
120
|
height: "8"
|
121
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
122
|
-
className: $
|
121
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("rect", {
|
122
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe-inner-checker'),
|
123
123
|
x: "8",
|
124
124
|
y: "8",
|
125
125
|
width: "8",
|
126
126
|
height: "8"
|
127
|
-
})), /*#__PURE__*/ ($parcel$interopDefault($
|
128
|
-
className: $
|
127
|
+
})), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("path", {
|
128
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe-inner'),
|
129
129
|
d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
|
130
130
|
fill: `url(#${patternId})`
|
131
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
132
|
-
className: $
|
131
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("path", {
|
132
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe-inner'),
|
133
133
|
d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
|
134
134
|
fill: valueCSS
|
135
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
136
|
-
className: $
|
135
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("path", {
|
136
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e5f20e8f18b3096c$exports)), 'spectrum-ColorLoupe-outer'),
|
137
137
|
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"
|
138
138
|
})), children));
|
139
139
|
}
|
140
140
|
|
141
141
|
|
142
142
|
|
143
|
-
var $
|
143
|
+
var $7fc903f202b8a29a$exports = {};
|
144
144
|
|
145
|
-
$parcel$export($
|
146
|
-
$parcel$export($
|
147
|
-
$parcel$export($
|
148
|
-
$parcel$export($
|
149
|
-
$parcel$export($
|
150
|
-
$parcel$export($
|
151
|
-
$parcel$export($
|
152
|
-
$parcel$export($
|
153
|
-
var $
|
154
|
-
var $
|
155
|
-
var $
|
156
|
-
var $
|
157
|
-
var $
|
158
|
-
var $
|
159
|
-
var $
|
160
|
-
var $
|
161
|
-
$
|
162
|
-
$
|
163
|
-
$
|
164
|
-
$
|
165
|
-
$
|
166
|
-
$
|
167
|
-
$
|
168
|
-
$
|
145
|
+
$parcel$export($7fc903f202b8a29a$exports, "spectrum-ColorWheel", () => $7fc903f202b8a29a$export$b70a5ca28702fbc6, (v) => $7fc903f202b8a29a$export$b70a5ca28702fbc6 = v);
|
146
|
+
$parcel$export($7fc903f202b8a29a$exports, "is-focused", () => $7fc903f202b8a29a$export$e7dc768d35940237, (v) => $7fc903f202b8a29a$export$e7dc768d35940237 = v);
|
147
|
+
$parcel$export($7fc903f202b8a29a$exports, "spectrum-ColorWheel-handle", () => $7fc903f202b8a29a$export$4cd23920eb8ac056, (v) => $7fc903f202b8a29a$export$4cd23920eb8ac056 = v);
|
148
|
+
$parcel$export($7fc903f202b8a29a$exports, "spectrum-ColorWheel-slider", () => $7fc903f202b8a29a$export$f476ddda713d62b, (v) => $7fc903f202b8a29a$export$f476ddda713d62b = v);
|
149
|
+
$parcel$export($7fc903f202b8a29a$exports, "is-disabled", () => $7fc903f202b8a29a$export$d35bc1e505d1ebbf, (v) => $7fc903f202b8a29a$export$d35bc1e505d1ebbf = v);
|
150
|
+
$parcel$export($7fc903f202b8a29a$exports, "is-dragged", () => $7fc903f202b8a29a$export$8778c911bed6c759, (v) => $7fc903f202b8a29a$export$8778c911bed6c759 = v);
|
151
|
+
$parcel$export($7fc903f202b8a29a$exports, "spectrum-ColorWheel-gradient", () => $7fc903f202b8a29a$export$9afaa791d7500a9b, (v) => $7fc903f202b8a29a$export$9afaa791d7500a9b = v);
|
152
|
+
$parcel$export($7fc903f202b8a29a$exports, "spectrum-ColorWheel-segment", () => $7fc903f202b8a29a$export$ada9fbffdaa4f10, (v) => $7fc903f202b8a29a$export$ada9fbffdaa4f10 = v);
|
153
|
+
var $7fc903f202b8a29a$export$b70a5ca28702fbc6;
|
154
|
+
var $7fc903f202b8a29a$export$e7dc768d35940237;
|
155
|
+
var $7fc903f202b8a29a$export$4cd23920eb8ac056;
|
156
|
+
var $7fc903f202b8a29a$export$f476ddda713d62b;
|
157
|
+
var $7fc903f202b8a29a$export$d35bc1e505d1ebbf;
|
158
|
+
var $7fc903f202b8a29a$export$8778c911bed6c759;
|
159
|
+
var $7fc903f202b8a29a$export$9afaa791d7500a9b;
|
160
|
+
var $7fc903f202b8a29a$export$ada9fbffdaa4f10;
|
161
|
+
$7fc903f202b8a29a$export$b70a5ca28702fbc6 = "spectrum-ColorWheel_31462a";
|
162
|
+
$7fc903f202b8a29a$export$e7dc768d35940237 = "is-focused_31462a";
|
163
|
+
$7fc903f202b8a29a$export$4cd23920eb8ac056 = "spectrum-ColorWheel-handle_31462a";
|
164
|
+
$7fc903f202b8a29a$export$f476ddda713d62b = "spectrum-ColorWheel-slider_31462a";
|
165
|
+
$7fc903f202b8a29a$export$d35bc1e505d1ebbf = "is-disabled_31462a";
|
166
|
+
$7fc903f202b8a29a$export$8778c911bed6c759 = "is-dragged_31462a";
|
167
|
+
$7fc903f202b8a29a$export$9afaa791d7500a9b = "spectrum-ColorWheel-gradient_31462a";
|
168
|
+
$7fc903f202b8a29a$export$ada9fbffdaa4f10 = "spectrum-ColorWheel-segment_31462a";
|
169
169
|
|
170
170
|
|
171
171
|
|
@@ -173,17 +173,17 @@ $155195a08d34c5d8$export$ada9fbffdaa4f10 = "_spectrum-ColorWheel-segment_31462a"
|
|
173
173
|
|
174
174
|
|
175
175
|
|
176
|
-
const $
|
177
|
-
function $
|
178
|
-
props = $
|
176
|
+
const $0738156f1768a796$var$WHEEL_THICKNESS = 24;
|
177
|
+
function $0738156f1768a796$var$ColorWheel(props, ref) {
|
178
|
+
props = $avQWG$reactspectrumprovider.useProviderProps(props);
|
179
179
|
let { isDisabled: isDisabled } = props;
|
180
|
-
let size = props.size && $
|
181
|
-
let { styleProps: styleProps } = $
|
182
|
-
let inputRef = $
|
183
|
-
let containerRef = $
|
184
|
-
let [wheelRadius, setWheelRadius] = $
|
185
|
-
let [wheelThickness, setWheelThickness] = $
|
186
|
-
let resizeHandler = $
|
180
|
+
let size = props.size && $avQWG$reactspectrumutils.dimensionValue(props.size);
|
181
|
+
let { styleProps: styleProps } = $avQWG$reactspectrumutils.useStyleProps(props);
|
182
|
+
let inputRef = $avQWG$react.useRef(null);
|
183
|
+
let containerRef = $avQWG$reactspectrumutils.useFocusableRef(ref, inputRef);
|
184
|
+
let [wheelRadius, setWheelRadius] = $avQWG$react.useState(null);
|
185
|
+
let [wheelThickness, setWheelThickness] = $avQWG$react.useState($0738156f1768a796$var$WHEEL_THICKNESS);
|
186
|
+
let resizeHandler = $avQWG$react.useCallback(()=>{
|
187
187
|
if (containerRef.current) {
|
188
188
|
setWheelRadius(containerRef.current.offsetWidth / 2);
|
189
189
|
let thickness = window.getComputedStyle(containerRef.current).getPropertyValue('--spectrum-colorwheel-track-thickness');
|
@@ -194,26 +194,26 @@ function $38dc4cfa8cb7ace6$var$ColorWheel(props, ref) {
|
|
194
194
|
setWheelRadius,
|
195
195
|
setWheelThickness
|
196
196
|
]);
|
197
|
-
$
|
197
|
+
$avQWG$react.useEffect(()=>{
|
198
198
|
// the size observer's fallback to the window resize event doesn't fire on mount
|
199
199
|
if (wheelRadius == null) resizeHandler();
|
200
200
|
}, [
|
201
201
|
wheelRadius,
|
202
202
|
resizeHandler
|
203
203
|
]);
|
204
|
-
$
|
204
|
+
$avQWG$reactariautils.useResizeObserver({
|
205
205
|
ref: containerRef,
|
206
206
|
onResize: resizeHandler
|
207
207
|
});
|
208
|
-
let state = $
|
209
|
-
let { trackProps: trackProps , inputProps: inputProps , thumbProps: thumbProps } = $
|
208
|
+
let state = $avQWG$reactstatelycolor.useColorWheelState(props);
|
209
|
+
let { trackProps: trackProps , inputProps: inputProps , thumbProps: thumbProps } = $avQWG$reactariacolor.useColorWheel({
|
210
210
|
...props,
|
211
211
|
innerRadius: wheelRadius - wheelThickness,
|
212
212
|
outerRadius: wheelRadius
|
213
213
|
}, state, inputRef);
|
214
|
-
let { focusProps: focusProps , isFocusVisible: isFocusVisible } = $
|
215
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($
|
216
|
-
className: $
|
214
|
+
let { focusProps: focusProps , isFocusVisible: isFocusVisible } = $avQWG$reactariafocus.useFocusRing();
|
215
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("div", {
|
216
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($7fc903f202b8a29a$exports)), 'spectrum-ColorWheel', {
|
217
217
|
'is-disabled': isDisabled
|
218
218
|
}, styleProps.className),
|
219
219
|
ref: containerRef,
|
@@ -224,62 +224,62 @@ function $38dc4cfa8cb7ace6$var$ColorWheel(props, ref) {
|
|
224
224
|
'width': size,
|
225
225
|
'height': size
|
226
226
|
}
|
227
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
227
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("div", {
|
228
228
|
...trackProps,
|
229
|
-
className: $
|
230
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
229
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($7fc903f202b8a29a$exports)), 'spectrum-ColorWheel-gradient')
|
230
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement($1dc35f6528c39993$export$a3cc47cee1c1ccc, {
|
231
231
|
value: state.getDisplayColor(),
|
232
232
|
isFocused: isFocusVisible,
|
233
233
|
isDisabled: isDisabled,
|
234
234
|
isDragging: state.isDragging,
|
235
|
-
className: $
|
235
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($7fc903f202b8a29a$exports)), 'spectrum-ColorWheel-handle'),
|
236
236
|
...thumbProps
|
237
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
237
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("input", {
|
238
238
|
...focusProps,
|
239
|
-
className: $
|
239
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($7fc903f202b8a29a$exports)), 'spectrum-ColorWheel-slider'),
|
240
240
|
...inputProps,
|
241
241
|
ref: inputRef
|
242
242
|
}))));
|
243
243
|
}
|
244
244
|
/**
|
245
245
|
* ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.
|
246
|
-
*/ let $
|
246
|
+
*/ let $0738156f1768a796$export$f80663f808113381 = /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).forwardRef($0738156f1768a796$var$ColorWheel);
|
247
247
|
|
248
248
|
|
249
|
-
var $
|
249
|
+
var $0305008af1e712c1$exports = {};
|
250
250
|
|
251
|
-
$parcel$export($
|
251
|
+
$parcel$export($0305008af1e712c1$exports, "ColorSlider", () => $0305008af1e712c1$export$44fd664bcca5b6fb);
|
252
252
|
|
253
253
|
|
254
254
|
|
255
255
|
|
256
256
|
|
257
|
-
var $
|
257
|
+
var $44eee705e8da50be$exports = {};
|
258
258
|
|
259
|
-
$parcel$export($
|
260
|
-
$parcel$export($
|
261
|
-
$parcel$export($
|
262
|
-
$parcel$export($
|
263
|
-
$parcel$export($
|
264
|
-
$parcel$export($
|
265
|
-
$parcel$export($
|
266
|
-
$parcel$export($
|
267
|
-
var $
|
268
|
-
var $
|
269
|
-
var $
|
270
|
-
var $
|
271
|
-
var $
|
272
|
-
var $
|
273
|
-
var $
|
274
|
-
var $
|
275
|
-
$
|
276
|
-
$
|
277
|
-
$
|
278
|
-
$
|
279
|
-
$
|
280
|
-
$
|
281
|
-
$
|
282
|
-
$
|
259
|
+
$parcel$export($44eee705e8da50be$exports, "spectrum-ColorSlider", () => $44eee705e8da50be$export$a5f8b0989b27a604, (v) => $44eee705e8da50be$export$a5f8b0989b27a604 = v);
|
260
|
+
$parcel$export($44eee705e8da50be$exports, "is-focused", () => $44eee705e8da50be$export$e7dc768d35940237, (v) => $44eee705e8da50be$export$e7dc768d35940237 = v);
|
261
|
+
$parcel$export($44eee705e8da50be$exports, "spectrum-ColorSlider-handle", () => $44eee705e8da50be$export$8c273ba92fabe1f1, (v) => $44eee705e8da50be$export$8c273ba92fabe1f1 = v);
|
262
|
+
$parcel$export($44eee705e8da50be$exports, "spectrum-ColorSlider-slider", () => $44eee705e8da50be$export$2f08b72944af536, (v) => $44eee705e8da50be$export$2f08b72944af536 = v);
|
263
|
+
$parcel$export($44eee705e8da50be$exports, "spectrum-ColorSlider-container--horizontal", () => $44eee705e8da50be$export$33e97914f6746614, (v) => $44eee705e8da50be$export$33e97914f6746614 = v);
|
264
|
+
$parcel$export($44eee705e8da50be$exports, "spectrum-ColorSlider-container--vertical", () => $44eee705e8da50be$export$cd1c093289104c66, (v) => $44eee705e8da50be$export$cd1c093289104c66 = v);
|
265
|
+
$parcel$export($44eee705e8da50be$exports, "is-disabled", () => $44eee705e8da50be$export$d35bc1e505d1ebbf, (v) => $44eee705e8da50be$export$d35bc1e505d1ebbf = v);
|
266
|
+
$parcel$export($44eee705e8da50be$exports, "spectrum-ColorSlider--vertical", () => $44eee705e8da50be$export$83dcf61b398bfaf1, (v) => $44eee705e8da50be$export$83dcf61b398bfaf1 = v);
|
267
|
+
var $44eee705e8da50be$export$a5f8b0989b27a604;
|
268
|
+
var $44eee705e8da50be$export$e7dc768d35940237;
|
269
|
+
var $44eee705e8da50be$export$8c273ba92fabe1f1;
|
270
|
+
var $44eee705e8da50be$export$2f08b72944af536;
|
271
|
+
var $44eee705e8da50be$export$33e97914f6746614;
|
272
|
+
var $44eee705e8da50be$export$cd1c093289104c66;
|
273
|
+
var $44eee705e8da50be$export$d35bc1e505d1ebbf;
|
274
|
+
var $44eee705e8da50be$export$83dcf61b398bfaf1;
|
275
|
+
$44eee705e8da50be$export$a5f8b0989b27a604 = "spectrum-ColorSlider_a5bb06";
|
276
|
+
$44eee705e8da50be$export$e7dc768d35940237 = "is-focused_a5bb06";
|
277
|
+
$44eee705e8da50be$export$8c273ba92fabe1f1 = "spectrum-ColorSlider-handle_a5bb06";
|
278
|
+
$44eee705e8da50be$export$2f08b72944af536 = "spectrum-ColorSlider-slider_a5bb06";
|
279
|
+
$44eee705e8da50be$export$33e97914f6746614 = "spectrum-ColorSlider-container--horizontal_a5bb06";
|
280
|
+
$44eee705e8da50be$export$cd1c093289104c66 = "spectrum-ColorSlider-container--vertical_a5bb06";
|
281
|
+
$44eee705e8da50be$export$d35bc1e505d1ebbf = "is-disabled_a5bb06";
|
282
|
+
$44eee705e8da50be$export$83dcf61b398bfaf1 = "spectrum-ColorSlider--vertical_a5bb06";
|
283
283
|
|
284
284
|
|
285
285
|
|
@@ -287,16 +287,16 @@ $0395a726ccae0692$export$83dcf61b398bfaf1 = "_spectrum-ColorSlider--vertical_a5b
|
|
287
287
|
|
288
288
|
|
289
289
|
|
290
|
-
function $
|
291
|
-
props = $
|
290
|
+
function $0305008af1e712c1$var$ColorSlider(props, ref) {
|
291
|
+
props = $avQWG$reactspectrumprovider.useProviderProps(props);
|
292
292
|
let { isDisabled: isDisabled , channel: channel , orientation: orientation , label: label , showValueLabel: showValueLabel , 'aria-label': ariaLabel } = props;
|
293
293
|
let vertical = orientation === 'vertical';
|
294
|
-
let { styleProps: styleProps } = $
|
295
|
-
let { locale: locale } = $
|
296
|
-
let inputRef = $
|
297
|
-
let trackRef = $
|
298
|
-
let domRef = $
|
299
|
-
let state = $
|
294
|
+
let { styleProps: styleProps } = $avQWG$reactspectrumutils.useStyleProps(props);
|
295
|
+
let { locale: locale } = $avQWG$reactariai18n.useLocale();
|
296
|
+
let inputRef = $avQWG$react.useRef();
|
297
|
+
let trackRef = $avQWG$react.useRef();
|
298
|
+
let domRef = $avQWG$reactspectrumutils.useFocusableRef(ref, inputRef);
|
299
|
+
let state = $avQWG$reactstatelycolor.useColorSliderState({
|
300
300
|
...props,
|
301
301
|
locale: locale
|
302
302
|
});
|
@@ -312,16 +312,16 @@ function $b3c0cf7643c25d02$var$ColorSlider(props, ref) {
|
|
312
312
|
if (label === undefined && !ariaLabel && !props['aria-labelledby'] && !vertical) label = state.value.getChannelName(channel, locale);
|
313
313
|
// Show the value label by default if there is a visible label
|
314
314
|
if (showValueLabel == null) showValueLabel = !!label;
|
315
|
-
let { inputProps: inputProps , thumbProps: thumbProps , trackProps: trackProps , labelProps: labelProps , outputProps: outputProps } = $
|
315
|
+
let { inputProps: inputProps , thumbProps: thumbProps , trackProps: trackProps , labelProps: labelProps , outputProps: outputProps } = $avQWG$reactariacolor.useColorSlider({
|
316
316
|
...props,
|
317
317
|
label: label,
|
318
318
|
'aria-label': ariaLabel,
|
319
319
|
trackRef: trackRef,
|
320
320
|
inputRef: inputRef
|
321
321
|
}, state);
|
322
|
-
let { isFocusVisible: isFocusVisible } = $
|
323
|
-
let [isFocused, setIsFocused] = $
|
324
|
-
let { focusProps: focusProps } = $
|
322
|
+
let { isFocusVisible: isFocusVisible } = $avQWG$reactariainteractions.useFocusVisible();
|
323
|
+
let [isFocused, setIsFocused] = $avQWG$react.useState(false);
|
324
|
+
let { focusProps: focusProps } = $avQWG$reactariainteractions.useFocus({
|
325
325
|
isDisabled: isDisabled,
|
326
326
|
onFocusChange: setIsFocused
|
327
327
|
});
|
@@ -330,84 +330,84 @@ function $b3c0cf7643c25d02$var$ColorSlider(props, ref) {
|
|
330
330
|
else if (label != null && showValueLabel) alignLabel = 'space-between';
|
331
331
|
else if (label != null) alignLabel = 'flex-start';
|
332
332
|
else if (showValueLabel) alignLabel = 'flex-end';
|
333
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($
|
333
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("div", {
|
334
334
|
ref: domRef,
|
335
335
|
...styleProps,
|
336
|
-
className: $
|
336
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($44eee705e8da50be$exports)), {
|
337
337
|
'spectrum-ColorSlider-container--horizontal': !vertical,
|
338
338
|
'spectrum-ColorSlider-container--vertical': vertical
|
339
339
|
})
|
340
|
-
}, label && /*#__PURE__*/ ($parcel$interopDefault($
|
340
|
+
}, label && /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement($avQWG$reactspectrumlayout.Flex, {
|
341
341
|
direction: "row",
|
342
342
|
justifyContent: alignLabel
|
343
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
343
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement($avQWG$reactspectrumlabel.Label, labelProps, label), showValueLabel && /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement($avQWG$reactspectrumlabel.Label, {
|
344
344
|
elementType: "span"
|
345
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
345
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("output", outputProps, state.value.formatChannelValue(channel, locale)))), /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("div", {
|
346
346
|
...trackProps,
|
347
347
|
ref: trackRef,
|
348
|
-
className: $
|
348
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($44eee705e8da50be$exports)), 'spectrum-ColorSlider', {
|
349
349
|
'is-disabled': isDisabled,
|
350
350
|
'spectrum-ColorSlider--vertical': vertical
|
351
351
|
})
|
352
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
352
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement($1dc35f6528c39993$export$a3cc47cee1c1ccc, {
|
353
353
|
value: state.getDisplayColor(),
|
354
354
|
isFocused: isFocused && isFocusVisible,
|
355
355
|
isDisabled: isDisabled,
|
356
356
|
isDragging: state.isThumbDragging(0),
|
357
|
-
className: $
|
357
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($44eee705e8da50be$exports)), 'spectrum-ColorSlider-handle'),
|
358
358
|
...thumbProps
|
359
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
359
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement("input", {
|
360
360
|
...inputProps,
|
361
361
|
...focusProps,
|
362
362
|
ref: inputRef,
|
363
|
-
className: $
|
363
|
+
className: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($44eee705e8da50be$exports)), 'spectrum-ColorSlider-slider')
|
364
364
|
})))));
|
365
365
|
}
|
366
366
|
/**
|
367
367
|
* ColorSliders allow users to adjust an individual channel of a color value.
|
368
|
-
*/ let $
|
368
|
+
*/ let $0305008af1e712c1$export$44fd664bcca5b6fb = /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).forwardRef($0305008af1e712c1$var$ColorSlider);
|
369
369
|
|
370
370
|
|
371
|
-
var $
|
371
|
+
var $a378ae6f24cb296e$exports = {};
|
372
372
|
|
373
|
-
$parcel$export($
|
373
|
+
$parcel$export($a378ae6f24cb296e$exports, "ColorField", () => $a378ae6f24cb296e$export$b865d4358897bb17);
|
374
374
|
|
375
375
|
|
376
|
-
var $
|
376
|
+
var $5ac18361b86aa59c$exports = {};
|
377
377
|
|
378
|
-
$parcel$export($
|
379
|
-
var $
|
380
|
-
$
|
378
|
+
$parcel$export($5ac18361b86aa59c$exports, "react-spectrum-ColorField-input", () => $5ac18361b86aa59c$export$7d80c6630a750b1, (v) => $5ac18361b86aa59c$export$7d80c6630a750b1 = v);
|
379
|
+
var $5ac18361b86aa59c$export$7d80c6630a750b1;
|
380
|
+
$5ac18361b86aa59c$export$7d80c6630a750b1 = "react-spectrum-ColorField-input_7bde3a";
|
381
381
|
|
382
382
|
|
383
383
|
|
384
384
|
|
385
385
|
|
386
386
|
|
387
|
-
function $
|
388
|
-
props = $
|
387
|
+
function $a378ae6f24cb296e$var$ColorField(props, ref) {
|
388
|
+
props = $avQWG$reactspectrumprovider.useProviderProps(props);
|
389
389
|
let { value: // These disabled props are handled by the state hook
|
390
390
|
value , defaultValue: defaultValue , onChange: onChange , ...otherProps } = props;
|
391
|
-
let state = $
|
392
|
-
let inputRef = $
|
393
|
-
let { labelProps: labelProps , inputProps: inputProps } = $
|
394
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($
|
391
|
+
let state = $avQWG$reactstatelycolor.useColorFieldState(props);
|
392
|
+
let inputRef = $avQWG$react.useRef();
|
393
|
+
let { labelProps: labelProps , inputProps: inputProps } = $avQWG$reactariacolor.useColorField(otherProps, state, inputRef);
|
394
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).createElement($avQWG$reactspectrumtextfield.TextFieldBase, {
|
395
395
|
...otherProps,
|
396
396
|
ref: ref,
|
397
397
|
inputRef: inputRef,
|
398
398
|
labelProps: labelProps,
|
399
399
|
inputProps: inputProps,
|
400
|
-
inputClassName: $
|
400
|
+
inputClassName: $avQWG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($5ac18361b86aa59c$exports)), 'react-spectrum-ColorField-input')
|
401
401
|
}));
|
402
402
|
}
|
403
403
|
/**
|
404
404
|
* ColorFields allow users to enter a color in #rrggbb hexadecimal format.
|
405
|
-
*/ const $
|
405
|
+
*/ const $a378ae6f24cb296e$export$b865d4358897bb17 = /*#__PURE__*/ ($parcel$interopDefault($avQWG$react)).forwardRef($a378ae6f24cb296e$var$ColorField);
|
406
406
|
|
407
407
|
|
408
|
-
$parcel$exportWildcard(module.exports, $
|
409
|
-
$parcel$exportWildcard(module.exports, $
|
410
|
-
$parcel$exportWildcard(module.exports, $
|
408
|
+
$parcel$exportWildcard(module.exports, $0738156f1768a796$exports);
|
409
|
+
$parcel$exportWildcard(module.exports, $0305008af1e712c1$exports);
|
410
|
+
$parcel$exportWildcard(module.exports, $a378ae6f24cb296e$exports);
|
411
411
|
|
412
412
|
|
413
413
|
//# sourceMappingURL=main.js.map
|