@react-spectrum/color 3.0.0-beta.7 → 3.0.0-beta.8
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/module.js +181 -181
- package/package.json +19 -19
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 $6dbr2$reactspectrumutils = require("@react-spectrum/utils");
|
|
3
|
+
var $6dbr2$react = require("react");
|
|
4
|
+
var $6dbr2$reactariacolor = require("@react-aria/color");
|
|
5
|
+
var $6dbr2$reactstatelycolor = require("@react-stately/color");
|
|
6
|
+
var $6dbr2$reactariafocus = require("@react-aria/focus");
|
|
7
|
+
var $6dbr2$reactspectrumprovider = require("@react-spectrum/provider");
|
|
8
|
+
var $6dbr2$reactariautils = require("@react-aria/utils");
|
|
9
|
+
var $6dbr2$reactspectrumlayout = require("@react-spectrum/layout");
|
|
10
|
+
var $6dbr2$reactspectrumlabel = require("@react-spectrum/label");
|
|
11
|
+
var $6dbr2$reactariainteractions = require("@react-aria/interactions");
|
|
12
|
+
var $6dbr2$reactariai18n = require("@react-aria/i18n");
|
|
13
|
+
var $6dbr2$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 $f00a0c22f0ab122d$exports = {};
|
|
38
38
|
|
|
39
|
-
$parcel$export($
|
|
39
|
+
$parcel$export($f00a0c22f0ab122d$exports, "ColorWheel", () => $f00a0c22f0ab122d$export$f80663f808113381);
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var $
|
|
43
|
+
var $b035b8ac4e94bbaa$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($b035b8ac4e94bbaa$exports, "spectrum-ColorHandle", () => $b035b8ac4e94bbaa$export$cd9afaa621b6216f, (v) => $b035b8ac4e94bbaa$export$cd9afaa621b6216f = v);
|
|
46
|
+
$parcel$export($b035b8ac4e94bbaa$exports, "is-focused", () => $b035b8ac4e94bbaa$export$e7dc768d35940237, (v) => $b035b8ac4e94bbaa$export$e7dc768d35940237 = v);
|
|
47
|
+
$parcel$export($b035b8ac4e94bbaa$exports, "focus-ring", () => $b035b8ac4e94bbaa$export$f39a09f249340e2a, (v) => $b035b8ac4e94bbaa$export$f39a09f249340e2a = v);
|
|
48
|
+
$parcel$export($b035b8ac4e94bbaa$exports, "is-disabled", () => $b035b8ac4e94bbaa$export$d35bc1e505d1ebbf, (v) => $b035b8ac4e94bbaa$export$d35bc1e505d1ebbf = v);
|
|
49
|
+
$parcel$export($b035b8ac4e94bbaa$exports, "spectrum-ColorHandle-color", () => $b035b8ac4e94bbaa$export$afe4c366ed4e659c, (v) => $b035b8ac4e94bbaa$export$afe4c366ed4e659c = v);
|
|
50
|
+
var $b035b8ac4e94bbaa$export$cd9afaa621b6216f;
|
|
51
|
+
var $b035b8ac4e94bbaa$export$e7dc768d35940237;
|
|
52
|
+
var $b035b8ac4e94bbaa$export$f39a09f249340e2a;
|
|
53
|
+
var $b035b8ac4e94bbaa$export$d35bc1e505d1ebbf;
|
|
54
|
+
var $b035b8ac4e94bbaa$export$afe4c366ed4e659c;
|
|
55
|
+
$b035b8ac4e94bbaa$export$cd9afaa621b6216f = "spectrum-ColorHandle_5a9f41";
|
|
56
|
+
$b035b8ac4e94bbaa$export$e7dc768d35940237 = "is-focused_5a9f41";
|
|
57
|
+
$b035b8ac4e94bbaa$export$f39a09f249340e2a = "focus-ring_5a9f41";
|
|
58
|
+
$b035b8ac4e94bbaa$export$d35bc1e505d1ebbf = "is-disabled_5a9f41";
|
|
59
|
+
$b035b8ac4e94bbaa$export$afe4c366ed4e659c = "spectrum-ColorHandle-color_5a9f41";
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var $
|
|
62
|
+
var $819600d618952232$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($819600d618952232$exports, "spectrum-ColorLoupe", () => $819600d618952232$export$88d6ed2576b21809, (v) => $819600d618952232$export$88d6ed2576b21809 = v);
|
|
65
|
+
$parcel$export($819600d618952232$exports, "is-open", () => $819600d618952232$export$a9781837241c946d, (v) => $819600d618952232$export$a9781837241c946d = v);
|
|
66
|
+
$parcel$export($819600d618952232$exports, "spectrum-ColorLoupe-outer", () => $819600d618952232$export$d6ad38291e8aca9c, (v) => $819600d618952232$export$d6ad38291e8aca9c = v);
|
|
67
|
+
$parcel$export($819600d618952232$exports, "spectrum-ColorLoupe-inner-background", () => $819600d618952232$export$397af82b48750fe5, (v) => $819600d618952232$export$397af82b48750fe5 = v);
|
|
68
|
+
$parcel$export($819600d618952232$exports, "spectrum-ColorLoupe-inner-checker", () => $819600d618952232$export$f9a2a02e0b271024, (v) => $819600d618952232$export$f9a2a02e0b271024 = v);
|
|
69
|
+
var $819600d618952232$export$88d6ed2576b21809;
|
|
70
|
+
var $819600d618952232$export$a9781837241c946d;
|
|
71
|
+
var $819600d618952232$export$d6ad38291e8aca9c;
|
|
72
|
+
var $819600d618952232$export$397af82b48750fe5;
|
|
73
|
+
var $819600d618952232$export$f9a2a02e0b271024;
|
|
74
|
+
$819600d618952232$export$88d6ed2576b21809 = "spectrum-ColorLoupe_c818a8";
|
|
75
|
+
$819600d618952232$export$a9781837241c946d = "is-open_c818a8";
|
|
76
|
+
$819600d618952232$export$d6ad38291e8aca9c = "spectrum-ColorLoupe-outer_c818a8";
|
|
77
|
+
$819600d618952232$export$397af82b48750fe5 = "spectrum-ColorLoupe-inner-background_c818a8";
|
|
78
|
+
$819600d618952232$export$f9a2a02e0b271024 = "spectrum-ColorLoupe-inner-checker_c818a8";
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
function $
|
|
82
|
+
function $82f82b4e17fa88fc$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 = $6dbr2$reactariautils.useId();
|
|
85
85
|
let valueCSS = value.toString('css');
|
|
86
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($
|
|
87
|
-
className: $
|
|
86
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("div", {
|
|
87
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($b035b8ac4e94bbaa$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($6dbr2$react)).createElement("div", {
|
|
93
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($b035b8ac4e94bbaa$exports)), 'spectrum-ColorHandle-color'),
|
|
94
94
|
style: {
|
|
95
95
|
backgroundColor: valueCSS
|
|
96
96
|
}
|
|
97
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
|
98
|
-
className: $
|
|
97
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("svg", {
|
|
98
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$exports)), 'spectrum-ColorLoupe', {
|
|
99
99
|
'is-open': isDragging
|
|
100
100
|
}),
|
|
101
101
|
"aria-hidden": "true"
|
|
102
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
102
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$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($6dbr2$react)).createElement("rect", {
|
|
110
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$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($6dbr2$react)).createElement("rect", {
|
|
116
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$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($6dbr2$react)).createElement("rect", {
|
|
122
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$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($6dbr2$react)).createElement("path", {
|
|
128
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$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($6dbr2$react)).createElement("path", {
|
|
132
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$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($6dbr2$react)).createElement("path", {
|
|
136
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($819600d618952232$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 $9f20e70f17979f6a$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($9f20e70f17979f6a$exports, "spectrum-ColorWheel", () => $9f20e70f17979f6a$export$b70a5ca28702fbc6, (v) => $9f20e70f17979f6a$export$b70a5ca28702fbc6 = v);
|
|
146
|
+
$parcel$export($9f20e70f17979f6a$exports, "is-focused", () => $9f20e70f17979f6a$export$e7dc768d35940237, (v) => $9f20e70f17979f6a$export$e7dc768d35940237 = v);
|
|
147
|
+
$parcel$export($9f20e70f17979f6a$exports, "spectrum-ColorWheel-handle", () => $9f20e70f17979f6a$export$4cd23920eb8ac056, (v) => $9f20e70f17979f6a$export$4cd23920eb8ac056 = v);
|
|
148
|
+
$parcel$export($9f20e70f17979f6a$exports, "spectrum-ColorWheel-slider", () => $9f20e70f17979f6a$export$f476ddda713d62b, (v) => $9f20e70f17979f6a$export$f476ddda713d62b = v);
|
|
149
|
+
$parcel$export($9f20e70f17979f6a$exports, "is-disabled", () => $9f20e70f17979f6a$export$d35bc1e505d1ebbf, (v) => $9f20e70f17979f6a$export$d35bc1e505d1ebbf = v);
|
|
150
|
+
$parcel$export($9f20e70f17979f6a$exports, "is-dragged", () => $9f20e70f17979f6a$export$8778c911bed6c759, (v) => $9f20e70f17979f6a$export$8778c911bed6c759 = v);
|
|
151
|
+
$parcel$export($9f20e70f17979f6a$exports, "spectrum-ColorWheel-gradient", () => $9f20e70f17979f6a$export$9afaa791d7500a9b, (v) => $9f20e70f17979f6a$export$9afaa791d7500a9b = v);
|
|
152
|
+
$parcel$export($9f20e70f17979f6a$exports, "spectrum-ColorWheel-segment", () => $9f20e70f17979f6a$export$ada9fbffdaa4f10, (v) => $9f20e70f17979f6a$export$ada9fbffdaa4f10 = v);
|
|
153
|
+
var $9f20e70f17979f6a$export$b70a5ca28702fbc6;
|
|
154
|
+
var $9f20e70f17979f6a$export$e7dc768d35940237;
|
|
155
|
+
var $9f20e70f17979f6a$export$4cd23920eb8ac056;
|
|
156
|
+
var $9f20e70f17979f6a$export$f476ddda713d62b;
|
|
157
|
+
var $9f20e70f17979f6a$export$d35bc1e505d1ebbf;
|
|
158
|
+
var $9f20e70f17979f6a$export$8778c911bed6c759;
|
|
159
|
+
var $9f20e70f17979f6a$export$9afaa791d7500a9b;
|
|
160
|
+
var $9f20e70f17979f6a$export$ada9fbffdaa4f10;
|
|
161
|
+
$9f20e70f17979f6a$export$b70a5ca28702fbc6 = "spectrum-ColorWheel_31462a";
|
|
162
|
+
$9f20e70f17979f6a$export$e7dc768d35940237 = "is-focused_31462a";
|
|
163
|
+
$9f20e70f17979f6a$export$4cd23920eb8ac056 = "spectrum-ColorWheel-handle_31462a";
|
|
164
|
+
$9f20e70f17979f6a$export$f476ddda713d62b = "spectrum-ColorWheel-slider_31462a";
|
|
165
|
+
$9f20e70f17979f6a$export$d35bc1e505d1ebbf = "is-disabled_31462a";
|
|
166
|
+
$9f20e70f17979f6a$export$8778c911bed6c759 = "is-dragged_31462a";
|
|
167
|
+
$9f20e70f17979f6a$export$9afaa791d7500a9b = "spectrum-ColorWheel-gradient_31462a";
|
|
168
|
+
$9f20e70f17979f6a$export$ada9fbffdaa4f10 = "spectrum-ColorWheel-segment_31462a";
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
|
|
@@ -173,17 +173,17 @@ $7fc903f202b8a29a$export$ada9fbffdaa4f10 = "spectrum-ColorWheel-segment_31462a";
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
const $
|
|
177
|
-
function $
|
|
178
|
-
props = $
|
|
176
|
+
const $f00a0c22f0ab122d$var$WHEEL_THICKNESS = 24;
|
|
177
|
+
function $f00a0c22f0ab122d$var$ColorWheel(props, ref) {
|
|
178
|
+
props = $6dbr2$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 && $6dbr2$reactspectrumutils.dimensionValue(props.size);
|
|
181
|
+
let { styleProps: styleProps } = $6dbr2$reactspectrumutils.useStyleProps(props);
|
|
182
|
+
let inputRef = $6dbr2$react.useRef(null);
|
|
183
|
+
let containerRef = $6dbr2$reactspectrumutils.useFocusableRef(ref, inputRef);
|
|
184
|
+
let [wheelRadius, setWheelRadius] = $6dbr2$react.useState(null);
|
|
185
|
+
let [wheelThickness, setWheelThickness] = $6dbr2$react.useState($f00a0c22f0ab122d$var$WHEEL_THICKNESS);
|
|
186
|
+
let resizeHandler = $6dbr2$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 $0738156f1768a796$var$ColorWheel(props, ref) {
|
|
|
194
194
|
setWheelRadius,
|
|
195
195
|
setWheelThickness
|
|
196
196
|
]);
|
|
197
|
-
$
|
|
197
|
+
$6dbr2$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
|
+
$6dbr2$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 = $6dbr2$reactstatelycolor.useColorWheelState(props);
|
|
209
|
+
let { trackProps: trackProps , inputProps: inputProps , thumbProps: thumbProps } = $6dbr2$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 } = $6dbr2$reactariafocus.useFocusRing();
|
|
215
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("div", {
|
|
216
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f20e70f17979f6a$exports)), 'spectrum-ColorWheel', {
|
|
217
217
|
'is-disabled': isDisabled
|
|
218
218
|
}, styleProps.className),
|
|
219
219
|
ref: containerRef,
|
|
@@ -224,62 +224,62 @@ function $0738156f1768a796$var$ColorWheel(props, ref) {
|
|
|
224
224
|
'width': size,
|
|
225
225
|
'height': size
|
|
226
226
|
}
|
|
227
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
227
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("div", {
|
|
228
228
|
...trackProps,
|
|
229
|
-
className: $
|
|
230
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($
|
|
229
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f20e70f17979f6a$exports)), 'spectrum-ColorWheel-gradient')
|
|
230
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement($82f82b4e17fa88fc$export$a3cc47cee1c1ccc, {
|
|
231
231
|
value: state.getDisplayColor(),
|
|
232
232
|
isFocused: isFocusVisible,
|
|
233
233
|
isDisabled: isDisabled,
|
|
234
234
|
isDragging: state.isDragging,
|
|
235
|
-
className: $
|
|
235
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f20e70f17979f6a$exports)), 'spectrum-ColorWheel-handle'),
|
|
236
236
|
...thumbProps
|
|
237
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
237
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("input", {
|
|
238
238
|
...focusProps,
|
|
239
|
-
className: $
|
|
239
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($9f20e70f17979f6a$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 $f00a0c22f0ab122d$export$f80663f808113381 = /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).forwardRef($f00a0c22f0ab122d$var$ColorWheel);
|
|
247
247
|
|
|
248
248
|
|
|
249
|
-
var $
|
|
249
|
+
var $af506a747656f558$exports = {};
|
|
250
250
|
|
|
251
|
-
$parcel$export($
|
|
251
|
+
$parcel$export($af506a747656f558$exports, "ColorSlider", () => $af506a747656f558$export$44fd664bcca5b6fb);
|
|
252
252
|
|
|
253
253
|
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
|
|
257
|
-
var $
|
|
257
|
+
var $15e5047f7a7cdf93$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($15e5047f7a7cdf93$exports, "spectrum-ColorSlider", () => $15e5047f7a7cdf93$export$a5f8b0989b27a604, (v) => $15e5047f7a7cdf93$export$a5f8b0989b27a604 = v);
|
|
260
|
+
$parcel$export($15e5047f7a7cdf93$exports, "is-focused", () => $15e5047f7a7cdf93$export$e7dc768d35940237, (v) => $15e5047f7a7cdf93$export$e7dc768d35940237 = v);
|
|
261
|
+
$parcel$export($15e5047f7a7cdf93$exports, "spectrum-ColorSlider-handle", () => $15e5047f7a7cdf93$export$8c273ba92fabe1f1, (v) => $15e5047f7a7cdf93$export$8c273ba92fabe1f1 = v);
|
|
262
|
+
$parcel$export($15e5047f7a7cdf93$exports, "spectrum-ColorSlider-slider", () => $15e5047f7a7cdf93$export$2f08b72944af536, (v) => $15e5047f7a7cdf93$export$2f08b72944af536 = v);
|
|
263
|
+
$parcel$export($15e5047f7a7cdf93$exports, "spectrum-ColorSlider-container--horizontal", () => $15e5047f7a7cdf93$export$33e97914f6746614, (v) => $15e5047f7a7cdf93$export$33e97914f6746614 = v);
|
|
264
|
+
$parcel$export($15e5047f7a7cdf93$exports, "spectrum-ColorSlider-container--vertical", () => $15e5047f7a7cdf93$export$cd1c093289104c66, (v) => $15e5047f7a7cdf93$export$cd1c093289104c66 = v);
|
|
265
|
+
$parcel$export($15e5047f7a7cdf93$exports, "is-disabled", () => $15e5047f7a7cdf93$export$d35bc1e505d1ebbf, (v) => $15e5047f7a7cdf93$export$d35bc1e505d1ebbf = v);
|
|
266
|
+
$parcel$export($15e5047f7a7cdf93$exports, "spectrum-ColorSlider--vertical", () => $15e5047f7a7cdf93$export$83dcf61b398bfaf1, (v) => $15e5047f7a7cdf93$export$83dcf61b398bfaf1 = v);
|
|
267
|
+
var $15e5047f7a7cdf93$export$a5f8b0989b27a604;
|
|
268
|
+
var $15e5047f7a7cdf93$export$e7dc768d35940237;
|
|
269
|
+
var $15e5047f7a7cdf93$export$8c273ba92fabe1f1;
|
|
270
|
+
var $15e5047f7a7cdf93$export$2f08b72944af536;
|
|
271
|
+
var $15e5047f7a7cdf93$export$33e97914f6746614;
|
|
272
|
+
var $15e5047f7a7cdf93$export$cd1c093289104c66;
|
|
273
|
+
var $15e5047f7a7cdf93$export$d35bc1e505d1ebbf;
|
|
274
|
+
var $15e5047f7a7cdf93$export$83dcf61b398bfaf1;
|
|
275
|
+
$15e5047f7a7cdf93$export$a5f8b0989b27a604 = "spectrum-ColorSlider_a5bb06";
|
|
276
|
+
$15e5047f7a7cdf93$export$e7dc768d35940237 = "is-focused_a5bb06";
|
|
277
|
+
$15e5047f7a7cdf93$export$8c273ba92fabe1f1 = "spectrum-ColorSlider-handle_a5bb06";
|
|
278
|
+
$15e5047f7a7cdf93$export$2f08b72944af536 = "spectrum-ColorSlider-slider_a5bb06";
|
|
279
|
+
$15e5047f7a7cdf93$export$33e97914f6746614 = "spectrum-ColorSlider-container--horizontal_a5bb06";
|
|
280
|
+
$15e5047f7a7cdf93$export$cd1c093289104c66 = "spectrum-ColorSlider-container--vertical_a5bb06";
|
|
281
|
+
$15e5047f7a7cdf93$export$d35bc1e505d1ebbf = "is-disabled_a5bb06";
|
|
282
|
+
$15e5047f7a7cdf93$export$83dcf61b398bfaf1 = "spectrum-ColorSlider--vertical_a5bb06";
|
|
283
283
|
|
|
284
284
|
|
|
285
285
|
|
|
@@ -287,16 +287,16 @@ $44eee705e8da50be$export$83dcf61b398bfaf1 = "spectrum-ColorSlider--vertical_a5bb
|
|
|
287
287
|
|
|
288
288
|
|
|
289
289
|
|
|
290
|
-
function $
|
|
291
|
-
props = $
|
|
290
|
+
function $af506a747656f558$var$ColorSlider(props, ref) {
|
|
291
|
+
props = $6dbr2$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 } = $6dbr2$reactspectrumutils.useStyleProps(props);
|
|
295
|
+
let { locale: locale } = $6dbr2$reactariai18n.useLocale();
|
|
296
|
+
let inputRef = $6dbr2$react.useRef();
|
|
297
|
+
let trackRef = $6dbr2$react.useRef();
|
|
298
|
+
let domRef = $6dbr2$reactspectrumutils.useFocusableRef(ref, inputRef);
|
|
299
|
+
let state = $6dbr2$reactstatelycolor.useColorSliderState({
|
|
300
300
|
...props,
|
|
301
301
|
locale: locale
|
|
302
302
|
});
|
|
@@ -312,16 +312,16 @@ function $0305008af1e712c1$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 } = $6dbr2$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 } = $6dbr2$reactariainteractions.useFocusVisible();
|
|
323
|
+
let [isFocused, setIsFocused] = $6dbr2$react.useState(false);
|
|
324
|
+
let { focusProps: focusProps } = $6dbr2$reactariainteractions.useFocus({
|
|
325
325
|
isDisabled: isDisabled,
|
|
326
326
|
onFocusChange: setIsFocused
|
|
327
327
|
});
|
|
@@ -330,84 +330,84 @@ function $0305008af1e712c1$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($6dbr2$react)).createElement("div", {
|
|
334
334
|
ref: domRef,
|
|
335
335
|
...styleProps,
|
|
336
|
-
className: $
|
|
336
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($15e5047f7a7cdf93$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($6dbr2$react)).createElement($6dbr2$reactspectrumlayout.Flex, {
|
|
341
341
|
direction: "row",
|
|
342
342
|
justifyContent: alignLabel
|
|
343
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
343
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement($6dbr2$reactspectrumlabel.Label, labelProps, label), showValueLabel && /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement($6dbr2$reactspectrumlabel.Label, {
|
|
344
344
|
elementType: "span"
|
|
345
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
345
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("output", outputProps, state.value.formatChannelValue(channel, locale)))), /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("div", {
|
|
346
346
|
...trackProps,
|
|
347
347
|
ref: trackRef,
|
|
348
|
-
className: $
|
|
348
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($15e5047f7a7cdf93$exports)), 'spectrum-ColorSlider', {
|
|
349
349
|
'is-disabled': isDisabled,
|
|
350
350
|
'spectrum-ColorSlider--vertical': vertical
|
|
351
351
|
})
|
|
352
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
352
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement($82f82b4e17fa88fc$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: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($15e5047f7a7cdf93$exports)), 'spectrum-ColorSlider-handle'),
|
|
358
358
|
...thumbProps
|
|
359
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
359
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement("input", {
|
|
360
360
|
...inputProps,
|
|
361
361
|
...focusProps,
|
|
362
362
|
ref: inputRef,
|
|
363
|
-
className: $
|
|
363
|
+
className: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($15e5047f7a7cdf93$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 $af506a747656f558$export$44fd664bcca5b6fb = /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).forwardRef($af506a747656f558$var$ColorSlider);
|
|
369
369
|
|
|
370
370
|
|
|
371
|
-
var $
|
|
371
|
+
var $e04dd755f2c76018$exports = {};
|
|
372
372
|
|
|
373
|
-
$parcel$export($
|
|
373
|
+
$parcel$export($e04dd755f2c76018$exports, "ColorField", () => $e04dd755f2c76018$export$b865d4358897bb17);
|
|
374
374
|
|
|
375
375
|
|
|
376
|
-
var $
|
|
376
|
+
var $661ca19ffa6607ae$exports = {};
|
|
377
377
|
|
|
378
|
-
$parcel$export($
|
|
379
|
-
var $
|
|
380
|
-
$
|
|
378
|
+
$parcel$export($661ca19ffa6607ae$exports, "react-spectrum-ColorField-input", () => $661ca19ffa6607ae$export$7d80c6630a750b1, (v) => $661ca19ffa6607ae$export$7d80c6630a750b1 = v);
|
|
379
|
+
var $661ca19ffa6607ae$export$7d80c6630a750b1;
|
|
380
|
+
$661ca19ffa6607ae$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 $e04dd755f2c76018$var$ColorField(props, ref) {
|
|
388
|
+
props = $6dbr2$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 = $6dbr2$reactstatelycolor.useColorFieldState(props);
|
|
392
|
+
let inputRef = $6dbr2$react.useRef();
|
|
393
|
+
let { labelProps: labelProps , inputProps: inputProps } = $6dbr2$reactariacolor.useColorField(otherProps, state, inputRef);
|
|
394
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).createElement($6dbr2$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: $6dbr2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($661ca19ffa6607ae$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 $e04dd755f2c76018$export$b865d4358897bb17 = /*#__PURE__*/ ($parcel$interopDefault($6dbr2$react)).forwardRef($e04dd755f2c76018$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, $f00a0c22f0ab122d$exports);
|
|
409
|
+
$parcel$exportWildcard(module.exports, $af506a747656f558$exports);
|
|
410
|
+
$parcel$exportWildcard(module.exports, $e04dd755f2c76018$exports);
|
|
411
411
|
|
|
412
412
|
|
|
413
413
|
//# sourceMappingURL=main.js.map
|