@react-aria/color 3.0.0-beta.12 → 3.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +312 -92
- package/dist/main.js.map +1 -1
- package/dist/module.js +307 -75
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +29 -27
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -14
- package/src/index.ts +9 -5
- package/src/useColorArea.ts +30 -29
- package/src/useColorAreaGradient.ts +6 -1
- package/src/useColorField.ts +1 -1
- package/src/useColorSlider.ts +16 -20
- package/src/useColorWheel.ts +16 -8
package/dist/main.js
CHANGED
|
@@ -7,167 +7,390 @@ var $kZqDi$reactariaslider = require("@react-aria/slider");
|
|
|
7
7
|
var $kZqDi$reactariatextfield = require("@react-aria/textfield");
|
|
8
8
|
var $kZqDi$reactariaspinbutton = require("@react-aria/spinbutton");
|
|
9
9
|
|
|
10
|
-
function $parcel$
|
|
11
|
-
Object.
|
|
12
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
Object.defineProperty(dest, key, {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function get() {
|
|
19
|
-
return source[key];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
return dest;
|
|
10
|
+
function $parcel$export(e, n, v, s) {
|
|
11
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
25
12
|
}
|
|
26
13
|
function $parcel$interopDefault(a) {
|
|
27
14
|
return a && a.__esModule ? a.default : a;
|
|
28
15
|
}
|
|
29
|
-
function $parcel$export(e, n, v, s) {
|
|
30
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
31
|
-
}
|
|
32
|
-
var $47925bd68062ac17$exports = {};
|
|
33
16
|
|
|
34
|
-
$parcel$export(
|
|
17
|
+
$parcel$export(module.exports, "useColorArea", () => $47925bd68062ac17$export$2f92a7a615a014f6);
|
|
18
|
+
$parcel$export(module.exports, "useColorSlider", () => $afbb9647440a7f5b$export$106b7a4e66508f66);
|
|
19
|
+
$parcel$export(module.exports, "useColorWheel", () => $1d29bf243d4a9a53$export$9064ff4e44b3729a);
|
|
20
|
+
$parcel$export(module.exports, "useColorField", () => $58c850037bc7a7ce$export$77e32ca575a28fdf);
|
|
35
21
|
|
|
36
22
|
var $4f97b428b4cbcd4e$exports = {};
|
|
37
23
|
var $f141a15c3076a67b$exports = {};
|
|
38
|
-
$f141a15c3076a67b$exports =
|
|
24
|
+
$f141a15c3076a67b$exports = {
|
|
25
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
26
|
+
,
|
|
27
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
28
|
+
,
|
|
29
|
+
"colorPicker": `أداة انتقاء اللون`,
|
|
30
|
+
"twoDimensionalSlider": `مُنزلق 2D`
|
|
31
|
+
};
|
|
39
32
|
|
|
40
33
|
|
|
41
34
|
var $435ac2a9fdd2ae5e$exports = {};
|
|
42
|
-
$435ac2a9fdd2ae5e$exports =
|
|
35
|
+
$435ac2a9fdd2ae5e$exports = {
|
|
36
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
37
|
+
,
|
|
38
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
39
|
+
,
|
|
40
|
+
"colorPicker": `Средство за избиране на цвят`,
|
|
41
|
+
"twoDimensionalSlider": `2D плъзгач`
|
|
42
|
+
};
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
var $6b29758b432284f5$exports = {};
|
|
46
|
-
$6b29758b432284f5$exports =
|
|
46
|
+
$6b29758b432284f5$exports = {
|
|
47
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
48
|
+
,
|
|
49
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
50
|
+
,
|
|
51
|
+
"colorPicker": `Výběr barvy`,
|
|
52
|
+
"twoDimensionalSlider": `2D posuvník`
|
|
53
|
+
};
|
|
47
54
|
|
|
48
55
|
|
|
49
56
|
var $357597bcf4afd6fb$exports = {};
|
|
50
|
-
$357597bcf4afd6fb$exports =
|
|
57
|
+
$357597bcf4afd6fb$exports = {
|
|
58
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
59
|
+
,
|
|
60
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
61
|
+
,
|
|
62
|
+
"colorPicker": `Farvevælger`,
|
|
63
|
+
"twoDimensionalSlider": `2D-skyder`
|
|
64
|
+
};
|
|
51
65
|
|
|
52
66
|
|
|
53
67
|
var $ddc6333960e2b591$exports = {};
|
|
54
|
-
$ddc6333960e2b591$exports =
|
|
68
|
+
$ddc6333960e2b591$exports = {
|
|
69
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
70
|
+
,
|
|
71
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
72
|
+
,
|
|
73
|
+
"colorPicker": `Farbwähler`,
|
|
74
|
+
"twoDimensionalSlider": `2D-Schieberegler`
|
|
75
|
+
};
|
|
55
76
|
|
|
56
77
|
|
|
57
78
|
var $417ee93d3ca474c0$exports = {};
|
|
58
|
-
$417ee93d3ca474c0$exports =
|
|
79
|
+
$417ee93d3ca474c0$exports = {
|
|
80
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
81
|
+
,
|
|
82
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
83
|
+
,
|
|
84
|
+
"colorPicker": `Επιλογέας χρωμάτων`,
|
|
85
|
+
"twoDimensionalSlider": `Ρυθμιστικό 2D`
|
|
86
|
+
};
|
|
59
87
|
|
|
60
88
|
|
|
61
89
|
var $519561bc6dcff98b$exports = {};
|
|
62
|
-
$519561bc6dcff98b$exports =
|
|
90
|
+
$519561bc6dcff98b$exports = {
|
|
91
|
+
"colorPicker": `Color picker`,
|
|
92
|
+
"twoDimensionalSlider": `2D slider`,
|
|
93
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
94
|
+
,
|
|
95
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
96
|
+
};
|
|
63
97
|
|
|
64
98
|
|
|
65
99
|
var $7a34c3fcc03402b8$exports = {};
|
|
66
|
-
$7a34c3fcc03402b8$exports =
|
|
100
|
+
$7a34c3fcc03402b8$exports = {
|
|
101
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
102
|
+
,
|
|
103
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
104
|
+
,
|
|
105
|
+
"colorPicker": `Selector de color`,
|
|
106
|
+
"twoDimensionalSlider": `Regulador 2D`
|
|
107
|
+
};
|
|
67
108
|
|
|
68
109
|
|
|
69
110
|
var $860f86d6eae22cba$exports = {};
|
|
70
|
-
$860f86d6eae22cba$exports =
|
|
111
|
+
$860f86d6eae22cba$exports = {
|
|
112
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
113
|
+
,
|
|
114
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
115
|
+
,
|
|
116
|
+
"colorPicker": `Värvivalija`,
|
|
117
|
+
"twoDimensionalSlider": `2D-liugur`
|
|
118
|
+
};
|
|
71
119
|
|
|
72
120
|
|
|
73
121
|
var $8525d3c77b8a51b0$exports = {};
|
|
74
|
-
$8525d3c77b8a51b0$exports =
|
|
122
|
+
$8525d3c77b8a51b0$exports = {
|
|
123
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
124
|
+
,
|
|
125
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
126
|
+
,
|
|
127
|
+
"colorPicker": `Värimuokkain`,
|
|
128
|
+
"twoDimensionalSlider": `2D-liukusäädin`
|
|
129
|
+
};
|
|
75
130
|
|
|
76
131
|
|
|
77
132
|
var $8240fe6825e900ec$exports = {};
|
|
78
|
-
$8240fe6825e900ec$exports =
|
|
133
|
+
$8240fe6825e900ec$exports = {
|
|
134
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
135
|
+
,
|
|
136
|
+
"colorNameAndValue": (args)=>`${args.name} : ${args.value}`
|
|
137
|
+
,
|
|
138
|
+
"colorPicker": `Sélecteur de couleurs`,
|
|
139
|
+
"twoDimensionalSlider": `Curseur 2D`
|
|
140
|
+
};
|
|
79
141
|
|
|
80
142
|
|
|
81
143
|
var $377849238307c673$exports = {};
|
|
82
|
-
$377849238307c673$exports =
|
|
144
|
+
$377849238307c673$exports = {
|
|
145
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
146
|
+
,
|
|
147
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
148
|
+
,
|
|
149
|
+
"colorPicker": `בוחר הצבעים`,
|
|
150
|
+
"twoDimensionalSlider": `מחוון דו מימדי`
|
|
151
|
+
};
|
|
83
152
|
|
|
84
153
|
|
|
85
154
|
var $5a6f44e0ec14b083$exports = {};
|
|
86
|
-
$5a6f44e0ec14b083$exports =
|
|
155
|
+
$5a6f44e0ec14b083$exports = {
|
|
156
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
157
|
+
,
|
|
158
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
159
|
+
,
|
|
160
|
+
"colorPicker": `Odabir boje`,
|
|
161
|
+
"twoDimensionalSlider": `2D klizač`
|
|
162
|
+
};
|
|
87
163
|
|
|
88
164
|
|
|
89
165
|
var $82327d6e71e3e273$exports = {};
|
|
90
|
-
$82327d6e71e3e273$exports =
|
|
166
|
+
$82327d6e71e3e273$exports = {
|
|
167
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
168
|
+
,
|
|
169
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
170
|
+
,
|
|
171
|
+
"colorPicker": `Színválasztó`,
|
|
172
|
+
"twoDimensionalSlider": `2D-csúszka`
|
|
173
|
+
};
|
|
91
174
|
|
|
92
175
|
|
|
93
176
|
var $b1e297275c248ab8$exports = {};
|
|
94
|
-
$b1e297275c248ab8$exports =
|
|
177
|
+
$b1e297275c248ab8$exports = {
|
|
178
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
179
|
+
,
|
|
180
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
181
|
+
,
|
|
182
|
+
"colorPicker": `Selettore colore`,
|
|
183
|
+
"twoDimensionalSlider": `Cursore 2D`
|
|
184
|
+
};
|
|
95
185
|
|
|
96
186
|
|
|
97
187
|
var $b39c9f2638b4d2b9$exports = {};
|
|
98
|
-
$b39c9f2638b4d2b9$exports =
|
|
188
|
+
$b39c9f2638b4d2b9$exports = {
|
|
189
|
+
"colorInputLabel": (args)=>`${args.label}、${args.channelLabel}`
|
|
190
|
+
,
|
|
191
|
+
"colorNameAndValue": (args)=>`${args.name} : ${args.value}`
|
|
192
|
+
,
|
|
193
|
+
"colorPicker": `カラーピッカー`,
|
|
194
|
+
"twoDimensionalSlider": `2D スライダー`
|
|
195
|
+
};
|
|
99
196
|
|
|
100
197
|
|
|
101
198
|
var $2d2fbf4195848a62$exports = {};
|
|
102
|
-
$2d2fbf4195848a62$exports =
|
|
199
|
+
$2d2fbf4195848a62$exports = {
|
|
200
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
201
|
+
,
|
|
202
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
203
|
+
,
|
|
204
|
+
"colorPicker": `색상 피커`,
|
|
205
|
+
"twoDimensionalSlider": `2D 슬라이더`
|
|
206
|
+
};
|
|
103
207
|
|
|
104
208
|
|
|
105
209
|
var $ea88350d0828fa2c$exports = {};
|
|
106
|
-
$ea88350d0828fa2c$exports =
|
|
210
|
+
$ea88350d0828fa2c$exports = {
|
|
211
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
212
|
+
,
|
|
213
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
214
|
+
,
|
|
215
|
+
"colorPicker": `Spalvų parinkiklis`,
|
|
216
|
+
"twoDimensionalSlider": `2D slankiklis`
|
|
217
|
+
};
|
|
107
218
|
|
|
108
219
|
|
|
109
220
|
var $0e0acd541630120a$exports = {};
|
|
110
|
-
$0e0acd541630120a$exports =
|
|
221
|
+
$0e0acd541630120a$exports = {
|
|
222
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
223
|
+
,
|
|
224
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
225
|
+
,
|
|
226
|
+
"colorPicker": `Krāsu atlasītājs`,
|
|
227
|
+
"twoDimensionalSlider": `2D slīdnis`
|
|
228
|
+
};
|
|
111
229
|
|
|
112
230
|
|
|
113
231
|
var $952a458224052046$exports = {};
|
|
114
|
-
$952a458224052046$exports =
|
|
232
|
+
$952a458224052046$exports = {
|
|
233
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
234
|
+
,
|
|
235
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
236
|
+
,
|
|
237
|
+
"colorPicker": `Fargevelger`,
|
|
238
|
+
"twoDimensionalSlider": `2D-glidebryter`
|
|
239
|
+
};
|
|
115
240
|
|
|
116
241
|
|
|
117
242
|
var $2d8e195bc5683483$exports = {};
|
|
118
|
-
$2d8e195bc5683483$exports =
|
|
243
|
+
$2d8e195bc5683483$exports = {
|
|
244
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
245
|
+
,
|
|
246
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
247
|
+
,
|
|
248
|
+
"colorPicker": `Kleurkiezer`,
|
|
249
|
+
"twoDimensionalSlider": `2D-schuifregelaar`
|
|
250
|
+
};
|
|
119
251
|
|
|
120
252
|
|
|
121
253
|
var $750d83f83c5f38d4$exports = {};
|
|
122
|
-
$750d83f83c5f38d4$exports =
|
|
254
|
+
$750d83f83c5f38d4$exports = {
|
|
255
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
256
|
+
,
|
|
257
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
258
|
+
,
|
|
259
|
+
"colorPicker": `Próbnik kolorów`,
|
|
260
|
+
"twoDimensionalSlider": `Suwak 2D`
|
|
261
|
+
};
|
|
123
262
|
|
|
124
263
|
|
|
125
264
|
var $656b2846f611067c$exports = {};
|
|
126
|
-
$656b2846f611067c$exports =
|
|
265
|
+
$656b2846f611067c$exports = {
|
|
266
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
267
|
+
,
|
|
268
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
269
|
+
,
|
|
270
|
+
"colorPicker": `Seletor de cores`,
|
|
271
|
+
"twoDimensionalSlider": `Controle deslizante 2D`
|
|
272
|
+
};
|
|
127
273
|
|
|
128
274
|
|
|
129
275
|
var $58ce120874d069dd$exports = {};
|
|
130
|
-
$58ce120874d069dd$exports =
|
|
276
|
+
$58ce120874d069dd$exports = {
|
|
277
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
278
|
+
,
|
|
279
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
280
|
+
,
|
|
281
|
+
"colorPicker": `Seletor de cores`,
|
|
282
|
+
"twoDimensionalSlider": `Controle deslizante 2D`
|
|
283
|
+
};
|
|
131
284
|
|
|
132
285
|
|
|
133
286
|
var $fd6c85b4eba18825$exports = {};
|
|
134
|
-
$fd6c85b4eba18825$exports =
|
|
287
|
+
$fd6c85b4eba18825$exports = {
|
|
288
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
289
|
+
,
|
|
290
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
291
|
+
,
|
|
292
|
+
"colorPicker": `Selector de culori`,
|
|
293
|
+
"twoDimensionalSlider": `Glisor 2D`
|
|
294
|
+
};
|
|
135
295
|
|
|
136
296
|
|
|
137
297
|
var $8849a15ecc435984$exports = {};
|
|
138
|
-
$8849a15ecc435984$exports =
|
|
298
|
+
$8849a15ecc435984$exports = {
|
|
299
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
300
|
+
,
|
|
301
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
302
|
+
,
|
|
303
|
+
"colorPicker": `Палитра цветов`,
|
|
304
|
+
"twoDimensionalSlider": `Ползунок 2D`
|
|
305
|
+
};
|
|
139
306
|
|
|
140
307
|
|
|
141
308
|
var $5192372f064be783$exports = {};
|
|
142
|
-
$5192372f064be783$exports =
|
|
309
|
+
$5192372f064be783$exports = {
|
|
310
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
311
|
+
,
|
|
312
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
313
|
+
,
|
|
314
|
+
"colorPicker": `Výber farieb`,
|
|
315
|
+
"twoDimensionalSlider": `2D jazdec`
|
|
316
|
+
};
|
|
143
317
|
|
|
144
318
|
|
|
145
319
|
var $094525f9176df65d$exports = {};
|
|
146
|
-
$094525f9176df65d$exports =
|
|
320
|
+
$094525f9176df65d$exports = {
|
|
321
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
322
|
+
,
|
|
323
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
324
|
+
,
|
|
325
|
+
"colorPicker": `Izbirnik barv`,
|
|
326
|
+
"twoDimensionalSlider": `2D drsnik`
|
|
327
|
+
};
|
|
147
328
|
|
|
148
329
|
|
|
149
330
|
var $9795aa59b4ad40ed$exports = {};
|
|
150
|
-
$9795aa59b4ad40ed$exports =
|
|
331
|
+
$9795aa59b4ad40ed$exports = {
|
|
332
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
333
|
+
,
|
|
334
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
335
|
+
,
|
|
336
|
+
"colorPicker": `Birač boja`,
|
|
337
|
+
"twoDimensionalSlider": `2D klizač`
|
|
338
|
+
};
|
|
151
339
|
|
|
152
340
|
|
|
153
341
|
var $9ebaa0b485f13e4d$exports = {};
|
|
154
|
-
$9ebaa0b485f13e4d$exports =
|
|
342
|
+
$9ebaa0b485f13e4d$exports = {
|
|
343
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
344
|
+
,
|
|
345
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
346
|
+
,
|
|
347
|
+
"colorPicker": `Färgväljaren`,
|
|
348
|
+
"twoDimensionalSlider": `2D-reglage`
|
|
349
|
+
};
|
|
155
350
|
|
|
156
351
|
|
|
157
352
|
var $ad58e2e4e0f2e750$exports = {};
|
|
158
|
-
$ad58e2e4e0f2e750$exports =
|
|
353
|
+
$ad58e2e4e0f2e750$exports = {
|
|
354
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
355
|
+
,
|
|
356
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
357
|
+
,
|
|
358
|
+
"colorPicker": `Renk Seçici`,
|
|
359
|
+
"twoDimensionalSlider": `2D sürgü`
|
|
360
|
+
};
|
|
159
361
|
|
|
160
362
|
|
|
161
363
|
var $dafc19306f8b2dfc$exports = {};
|
|
162
|
-
$dafc19306f8b2dfc$exports =
|
|
364
|
+
$dafc19306f8b2dfc$exports = {
|
|
365
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
366
|
+
,
|
|
367
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
368
|
+
,
|
|
369
|
+
"colorPicker": `Палітра кольорів`,
|
|
370
|
+
"twoDimensionalSlider": `Повзунок 2D`
|
|
371
|
+
};
|
|
163
372
|
|
|
164
373
|
|
|
165
374
|
var $d31a8b80af5acc16$exports = {};
|
|
166
|
-
$d31a8b80af5acc16$exports =
|
|
375
|
+
$d31a8b80af5acc16$exports = {
|
|
376
|
+
"colorInputLabel": (args)=>`${args.label}、${args.channelLabel}`
|
|
377
|
+
,
|
|
378
|
+
"colorNameAndValue": (args)=>`${args.name}:${args.value}`
|
|
379
|
+
,
|
|
380
|
+
"colorPicker": `拾色器`,
|
|
381
|
+
"twoDimensionalSlider": `2D 滑块`
|
|
382
|
+
};
|
|
167
383
|
|
|
168
384
|
|
|
169
385
|
var $7377d28aec5fa200$exports = {};
|
|
170
|
-
$7377d28aec5fa200$exports =
|
|
386
|
+
$7377d28aec5fa200$exports = {
|
|
387
|
+
"colorInputLabel": (args)=>`${args.label},${args.channelLabel}`
|
|
388
|
+
,
|
|
389
|
+
"colorNameAndValue": (args)=>`${args.name}:${args.value}`
|
|
390
|
+
,
|
|
391
|
+
"colorPicker": `檢色器`,
|
|
392
|
+
"twoDimensionalSlider": `2D 滑桿`
|
|
393
|
+
};
|
|
171
394
|
|
|
172
395
|
|
|
173
396
|
$4f97b428b4cbcd4e$exports = {
|
|
@@ -386,17 +609,22 @@ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction , stat
|
|
|
386
609
|
}
|
|
387
610
|
let { x: x , y: y } = state.getThumbPosition();
|
|
388
611
|
if (direction === 'rtl') x = 1 - x;
|
|
612
|
+
let forcedColorAdjustNoneStyle = {
|
|
613
|
+
forcedColorAdjust: 'none'
|
|
614
|
+
};
|
|
389
615
|
return {
|
|
390
616
|
colorAreaStyleProps: {
|
|
391
617
|
style: {
|
|
392
618
|
position: 'relative',
|
|
393
619
|
touchAction: 'none',
|
|
620
|
+
...forcedColorAdjustNoneStyle,
|
|
394
621
|
...background.colorAreaStyles
|
|
395
622
|
}
|
|
396
623
|
},
|
|
397
624
|
gradientStyleProps: {
|
|
398
625
|
style: {
|
|
399
626
|
touchAction: 'none',
|
|
627
|
+
...forcedColorAdjustNoneStyle,
|
|
400
628
|
...background.gradientStyles
|
|
401
629
|
}
|
|
402
630
|
},
|
|
@@ -406,7 +634,8 @@ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction , stat
|
|
|
406
634
|
left: `${x * 100}%`,
|
|
407
635
|
top: `${y * 100}%`,
|
|
408
636
|
transform: 'translate(0%, 0%)',
|
|
409
|
-
touchAction: 'none'
|
|
637
|
+
touchAction: 'none',
|
|
638
|
+
...forcedColorAdjustNoneStyle
|
|
410
639
|
}
|
|
411
640
|
}
|
|
412
641
|
};
|
|
@@ -426,7 +655,7 @@ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction , stat
|
|
|
426
655
|
|
|
427
656
|
function $47925bd68062ac17$export$2f92a7a615a014f6(props, state) {
|
|
428
657
|
let { isDisabled: isDisabled , inputXRef: inputXRef , inputYRef: inputYRef , containerRef: containerRef , 'aria-label': ariaLabel } = props;
|
|
429
|
-
let
|
|
658
|
+
let stringFormatter = $kZqDi$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($4f97b428b4cbcd4e$exports)));
|
|
430
659
|
let { addGlobalListener: addGlobalListener , removeGlobalListener: removeGlobalListener } = $kZqDi$reactariautils.useGlobalListeners();
|
|
431
660
|
let { direction: direction , locale: locale } = $kZqDi$reactariai18n.useLocale();
|
|
432
661
|
let focusedInputRef = $kZqDi$react.useRef(null);
|
|
@@ -643,40 +872,40 @@ function $47925bd68062ac17$export$2f92a7a615a014f6(props, state) {
|
|
|
643
872
|
});
|
|
644
873
|
let isMobile = $kZqDi$reactariautils.isIOS() || $kZqDi$reactariautils.isAndroid();
|
|
645
874
|
function getAriaValueTextForChannel(channel) {
|
|
646
|
-
return valueChangedViaKeyboard.current ?
|
|
875
|
+
return valueChangedViaKeyboard.current ? stringFormatter.format('colorNameAndValue', {
|
|
647
876
|
name: state.value.getChannelName(channel, locale),
|
|
648
877
|
value: state.value.formatChannelValue(channel, locale)
|
|
649
878
|
}) : [
|
|
650
|
-
|
|
879
|
+
stringFormatter.format('colorNameAndValue', {
|
|
651
880
|
name: state.value.getChannelName(channel, locale),
|
|
652
881
|
value: state.value.formatChannelValue(channel, locale)
|
|
653
882
|
}),
|
|
654
|
-
|
|
883
|
+
stringFormatter.format('colorNameAndValue', {
|
|
655
884
|
name: state.value.getChannelName(channel === yChannel ? xChannel : yChannel, locale),
|
|
656
885
|
value: state.value.formatChannelValue(channel === yChannel ? xChannel : yChannel, locale)
|
|
657
886
|
})
|
|
658
887
|
].join(', ');
|
|
659
888
|
}
|
|
660
|
-
let colorPickerLabel =
|
|
889
|
+
let colorPickerLabel = stringFormatter.format('colorPicker');
|
|
661
890
|
let xInputLabellingProps = $kZqDi$reactariautils.useLabels({
|
|
662
891
|
...props,
|
|
663
|
-
'aria-label': ariaLabel ?
|
|
892
|
+
'aria-label': ariaLabel ? stringFormatter.format('colorInputLabel', {
|
|
664
893
|
label: ariaLabel,
|
|
665
894
|
channelLabel: colorPickerLabel
|
|
666
895
|
}) : colorPickerLabel
|
|
667
896
|
});
|
|
668
897
|
let yInputLabellingProps = $kZqDi$reactariautils.useLabels({
|
|
669
898
|
...props,
|
|
670
|
-
'aria-label': ariaLabel ?
|
|
899
|
+
'aria-label': ariaLabel ? stringFormatter.format('colorInputLabel', {
|
|
671
900
|
label: ariaLabel,
|
|
672
901
|
channelLabel: colorPickerLabel
|
|
673
902
|
}) : colorPickerLabel
|
|
674
903
|
});
|
|
675
|
-
let
|
|
904
|
+
let colorAreaLabellingProps = $kZqDi$reactariautils.useLabels({
|
|
676
905
|
...props,
|
|
677
|
-
'aria-label': ariaLabel ? `${ariaLabel} ${colorPickerLabel}` : undefined
|
|
906
|
+
'aria-label': ariaLabel ? `${ariaLabel}, ${colorPickerLabel}` : undefined
|
|
678
907
|
}, isMobile ? colorPickerLabel : undefined);
|
|
679
|
-
let ariaRoleDescription =
|
|
908
|
+
let ariaRoleDescription = stringFormatter.format('twoDimensionalSlider');
|
|
680
909
|
let { visuallyHiddenProps: visuallyHiddenProps } = $kZqDi$reactariavisuallyhidden.useVisuallyHidden({
|
|
681
910
|
style: {
|
|
682
911
|
opacity: '0.0001',
|
|
@@ -694,7 +923,7 @@ function $47925bd68062ac17$export$2f92a7a615a014f6(props, state) {
|
|
|
694
923
|
});
|
|
695
924
|
return {
|
|
696
925
|
colorAreaProps: {
|
|
697
|
-
...
|
|
926
|
+
...colorAreaLabellingProps,
|
|
698
927
|
...colorAreaInteractions,
|
|
699
928
|
...colorAreaStyleProps,
|
|
700
929
|
role: 'group'
|
|
@@ -725,7 +954,7 @@ function $47925bd68062ac17$export$2f92a7a615a014f6(props, state) {
|
|
|
725
954
|
So that only a single "2d slider" control shows up when listing form elements for screen readers,
|
|
726
955
|
add aria-hidden="true" to the unfocused control when the value has not changed via the keyboard,
|
|
727
956
|
but remove aria-hidden to reveal the input for each channel when the value has changed with the keyboard.
|
|
728
|
-
*/ 'aria-hidden':
|
|
957
|
+
*/ 'aria-hidden': isMobile || !focusedInputRef.current || focusedInputRef.current === inputXRef.current || valueChangedViaKeyboard.current ? undefined : 'true',
|
|
729
958
|
onChange: (e)=>{
|
|
730
959
|
state.setXValue(parseFloat(e.target.value));
|
|
731
960
|
}
|
|
@@ -743,12 +972,12 @@ function $47925bd68062ac17$export$2f92a7a615a014f6(props, state) {
|
|
|
743
972
|
'aria-orientation': 'vertical',
|
|
744
973
|
disabled: isDisabled,
|
|
745
974
|
value: state.value.getChannelValue(yChannel),
|
|
746
|
-
tabIndex: isMobile || focusedInputRef.current === inputYRef.current ? undefined : -1,
|
|
975
|
+
tabIndex: isMobile || focusedInputRef.current && focusedInputRef.current === inputYRef.current ? undefined : -1,
|
|
747
976
|
/*
|
|
748
977
|
So that only a single "2d slider" control shows up when listing form elements for screen readers,
|
|
749
978
|
add aria-hidden="true" to the unfocused input when the value has not changed via the keyboard,
|
|
750
979
|
but remove aria-hidden to reveal the input for each channel when the value has changed with the keyboard.
|
|
751
|
-
*/ 'aria-hidden': isMobile || focusedInputRef.current === inputYRef.current || valueChangedViaKeyboard.current ? undefined : 'true',
|
|
980
|
+
*/ 'aria-hidden': isMobile || focusedInputRef.current && focusedInputRef.current === inputYRef.current || valueChangedViaKeyboard.current ? undefined : 'true',
|
|
752
981
|
onChange: (e)=>{
|
|
753
982
|
state.setYValue(parseFloat(e.target.value));
|
|
754
983
|
}
|
|
@@ -757,9 +986,6 @@ function $47925bd68062ac17$export$2f92a7a615a014f6(props, state) {
|
|
|
757
986
|
}
|
|
758
987
|
|
|
759
988
|
|
|
760
|
-
var $afbb9647440a7f5b$exports = {};
|
|
761
|
-
|
|
762
|
-
$parcel$export($afbb9647440a7f5b$exports, "useColorSlider", () => $afbb9647440a7f5b$export$106b7a4e66508f66);
|
|
763
989
|
|
|
764
990
|
|
|
765
991
|
|
|
@@ -815,14 +1041,15 @@ function $afbb9647440a7f5b$export$106b7a4e66508f66(props, state) {
|
|
|
815
1041
|
throw new Error('Unknown color channel: ' + channel);
|
|
816
1042
|
}
|
|
817
1043
|
};
|
|
818
|
-
let
|
|
819
|
-
|
|
1044
|
+
let forcedColorAdjustNoneStyle = {
|
|
1045
|
+
forcedColorAdjust: 'none'
|
|
1046
|
+
};
|
|
820
1047
|
return {
|
|
821
1048
|
trackProps: {
|
|
822
1049
|
...$kZqDi$reactariautils.mergeProps(groupProps, trackProps),
|
|
823
1050
|
style: {
|
|
824
|
-
|
|
825
|
-
|
|
1051
|
+
...trackProps.style,
|
|
1052
|
+
...forcedColorAdjustNoneStyle,
|
|
826
1053
|
background: generateBackground()
|
|
827
1054
|
}
|
|
828
1055
|
},
|
|
@@ -830,10 +1057,8 @@ function $afbb9647440a7f5b$export$106b7a4e66508f66(props, state) {
|
|
|
830
1057
|
thumbProps: {
|
|
831
1058
|
...thumbProps,
|
|
832
1059
|
style: {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
[orientation === 'vertical' ? 'top' : 'left']: `${thumbPosition * 100}%`,
|
|
836
|
-
transform: 'translate(-50%, -50%)'
|
|
1060
|
+
...thumbProps.style,
|
|
1061
|
+
...forcedColorAdjustNoneStyle
|
|
837
1062
|
}
|
|
838
1063
|
},
|
|
839
1064
|
labelProps: labelProps,
|
|
@@ -842,9 +1067,6 @@ function $afbb9647440a7f5b$export$106b7a4e66508f66(props, state) {
|
|
|
842
1067
|
}
|
|
843
1068
|
|
|
844
1069
|
|
|
845
|
-
var $1d29bf243d4a9a53$exports = {};
|
|
846
|
-
|
|
847
|
-
$parcel$export($1d29bf243d4a9a53$exports, "useColorWheel", () => $1d29bf243d4a9a53$export$9064ff4e44b3729a);
|
|
848
1070
|
|
|
849
1071
|
|
|
850
1072
|
|
|
@@ -1021,6 +1243,9 @@ function $1d29bf243d4a9a53$export$9064ff4e44b3729a(props, state, inputRef) {
|
|
|
1021
1243
|
'aria-label': ariaLabel
|
|
1022
1244
|
});
|
|
1023
1245
|
let { minValue: minValue , maxValue: maxValue , step: step } = state.value.getChannelRange('hue');
|
|
1246
|
+
let forcedColorAdjustNoneStyle = {
|
|
1247
|
+
forcedColorAdjust: 'none'
|
|
1248
|
+
};
|
|
1024
1249
|
return {
|
|
1025
1250
|
trackProps: {
|
|
1026
1251
|
...trackInteractions,
|
|
@@ -1047,7 +1272,8 @@ function $1d29bf243d4a9a53$export$9064ff4e44b3729a(props, state, inputRef) {
|
|
|
1047
1272
|
hsl(360, 100%, 50%)
|
|
1048
1273
|
)
|
|
1049
1274
|
`,
|
|
1050
|
-
clipPath: `path(evenodd, "${$1d29bf243d4a9a53$var$circlePath(outerRadius, outerRadius, outerRadius)} ${$1d29bf243d4a9a53$var$circlePath(outerRadius, outerRadius, innerRadius)}")
|
|
1275
|
+
clipPath: `path(evenodd, "${$1d29bf243d4a9a53$var$circlePath(outerRadius, outerRadius, outerRadius)} ${$1d29bf243d4a9a53$var$circlePath(outerRadius, outerRadius, innerRadius)}")`,
|
|
1276
|
+
...forcedColorAdjustNoneStyle
|
|
1051
1277
|
}
|
|
1052
1278
|
},
|
|
1053
1279
|
thumbProps: {
|
|
@@ -1057,7 +1283,8 @@ function $1d29bf243d4a9a53$export$9064ff4e44b3729a(props, state, inputRef) {
|
|
|
1057
1283
|
left: '50%',
|
|
1058
1284
|
top: '50%',
|
|
1059
1285
|
transform: `translate(calc(${x1}px - 50%), calc(${y1}px - 50%))`,
|
|
1060
|
-
touchAction: 'none'
|
|
1286
|
+
touchAction: 'none',
|
|
1287
|
+
...forcedColorAdjustNoneStyle
|
|
1061
1288
|
}
|
|
1062
1289
|
},
|
|
1063
1290
|
inputProps: $kZqDi$reactariautils.mergeProps(inputLabellingProps, {
|
|
@@ -1080,9 +1307,6 @@ function $1d29bf243d4a9a53$var$circlePath(cx, cy, r) {
|
|
|
1080
1307
|
}
|
|
1081
1308
|
|
|
1082
1309
|
|
|
1083
|
-
var $58c850037bc7a7ce$exports = {};
|
|
1084
|
-
|
|
1085
|
-
$parcel$export($58c850037bc7a7ce$exports, "useColorField", () => $58c850037bc7a7ce$export$77e32ca575a28fdf);
|
|
1086
1310
|
|
|
1087
1311
|
|
|
1088
1312
|
|
|
@@ -1151,10 +1375,6 @@ function $58c850037bc7a7ce$export$77e32ca575a28fdf(props, state, ref) {
|
|
|
1151
1375
|
}
|
|
1152
1376
|
|
|
1153
1377
|
|
|
1154
|
-
$parcel$exportWildcard(module.exports, $47925bd68062ac17$exports);
|
|
1155
|
-
$parcel$exportWildcard(module.exports, $afbb9647440a7f5b$exports);
|
|
1156
|
-
$parcel$exportWildcard(module.exports, $1d29bf243d4a9a53$exports);
|
|
1157
|
-
$parcel$exportWildcard(module.exports, $58c850037bc7a7ce$exports);
|
|
1158
1378
|
|
|
1159
1379
|
|
|
1160
1380
|
//# sourceMappingURL=main.js.map
|