@react-aria/color 3.0.0-beta.13 → 3.0.0-beta.14
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/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {useGlobalListeners as $7KHxM$useGlobalListeners, focusWithoutScrolling as $7KHxM$focusWithoutScrolling, mergeProps as $7KHxM$mergeProps, isIOS as $7KHxM$isIOS, isAndroid as $7KHxM$isAndroid, useLabels as $7KHxM$useLabels, useId as $7KHxM$useId} from "@react-aria/utils";
|
|
2
2
|
import {useRef as $7KHxM$useRef, useCallback as $7KHxM$useCallback, useMemo as $7KHxM$useMemo, useState as $7KHxM$useState} from "react";
|
|
3
3
|
import {useKeyboard as $7KHxM$useKeyboard, useMove as $7KHxM$useMove, useFocusWithin as $7KHxM$useFocusWithin, useFocus as $7KHxM$useFocus, useScrollWheel as $7KHxM$useScrollWheel} from "@react-aria/interactions";
|
|
4
|
-
import {
|
|
4
|
+
import {useLocalizedStringFormatter as $7KHxM$useLocalizedStringFormatter, useLocale as $7KHxM$useLocale} from "@react-aria/i18n";
|
|
5
5
|
import {useVisuallyHidden as $7KHxM$useVisuallyHidden} from "@react-aria/visually-hidden";
|
|
6
6
|
import {useSlider as $7KHxM$useSlider, useSliderThumb as $7KHxM$useSliderThumb} from "@react-aria/slider";
|
|
7
7
|
import {useFormattedTextField as $7KHxM$useFormattedTextField} from "@react-aria/textfield";
|
|
@@ -10,148 +10,379 @@ import {useSpinButton as $7KHxM$useSpinButton} from "@react-aria/spinbutton";
|
|
|
10
10
|
function $parcel$interopDefault(a) {
|
|
11
11
|
return a && a.__esModule ? a.default : a;
|
|
12
12
|
}
|
|
13
|
-
function $parcel$export(e, n, v, s) {
|
|
14
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
-
}
|
|
16
|
-
var $60bd7d6e45dcddfa$exports = {};
|
|
17
|
-
|
|
18
|
-
$parcel$export($60bd7d6e45dcddfa$exports, "useColorArea", () => $60bd7d6e45dcddfa$export$2f92a7a615a014f6);
|
|
19
13
|
|
|
20
14
|
var $052cfdf4c32eb7c3$exports = {};
|
|
21
15
|
var $eccab2b0118aef08$exports = {};
|
|
22
|
-
$eccab2b0118aef08$exports =
|
|
16
|
+
$eccab2b0118aef08$exports = {
|
|
17
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
18
|
+
,
|
|
19
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
20
|
+
,
|
|
21
|
+
"colorPicker": `أداة انتقاء اللون`,
|
|
22
|
+
"twoDimensionalSlider": `مُنزلق 2D`
|
|
23
|
+
};
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
var $bf2b4507594e3d45$exports = {};
|
|
26
|
-
$bf2b4507594e3d45$exports =
|
|
27
|
+
$bf2b4507594e3d45$exports = {
|
|
28
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
29
|
+
,
|
|
30
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
31
|
+
,
|
|
32
|
+
"colorPicker": `Средство за избиране на цвят`,
|
|
33
|
+
"twoDimensionalSlider": `2D плъзгач`
|
|
34
|
+
};
|
|
27
35
|
|
|
28
36
|
|
|
29
37
|
var $01c08487af7ecd14$exports = {};
|
|
30
|
-
$01c08487af7ecd14$exports =
|
|
38
|
+
$01c08487af7ecd14$exports = {
|
|
39
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
40
|
+
,
|
|
41
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
42
|
+
,
|
|
43
|
+
"colorPicker": `Výběr barvy`,
|
|
44
|
+
"twoDimensionalSlider": `2D posuvník`
|
|
45
|
+
};
|
|
31
46
|
|
|
32
47
|
|
|
33
48
|
var $5e997db6ea0d10f6$exports = {};
|
|
34
|
-
$5e997db6ea0d10f6$exports =
|
|
49
|
+
$5e997db6ea0d10f6$exports = {
|
|
50
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
51
|
+
,
|
|
52
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
53
|
+
,
|
|
54
|
+
"colorPicker": `Farvevælger`,
|
|
55
|
+
"twoDimensionalSlider": `2D-skyder`
|
|
56
|
+
};
|
|
35
57
|
|
|
36
58
|
|
|
37
59
|
var $fe5998f640a79fd2$exports = {};
|
|
38
|
-
$fe5998f640a79fd2$exports =
|
|
60
|
+
$fe5998f640a79fd2$exports = {
|
|
61
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
62
|
+
,
|
|
63
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
64
|
+
,
|
|
65
|
+
"colorPicker": `Farbwähler`,
|
|
66
|
+
"twoDimensionalSlider": `2D-Schieberegler`
|
|
67
|
+
};
|
|
39
68
|
|
|
40
69
|
|
|
41
70
|
var $18e4d1d5b500a9ee$exports = {};
|
|
42
|
-
$18e4d1d5b500a9ee$exports =
|
|
71
|
+
$18e4d1d5b500a9ee$exports = {
|
|
72
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
73
|
+
,
|
|
74
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
75
|
+
,
|
|
76
|
+
"colorPicker": `Επιλογέας χρωμάτων`,
|
|
77
|
+
"twoDimensionalSlider": `Ρυθμιστικό 2D`
|
|
78
|
+
};
|
|
43
79
|
|
|
44
80
|
|
|
45
81
|
var $bf90a11a7a42a0f7$exports = {};
|
|
46
|
-
$bf90a11a7a42a0f7$exports =
|
|
82
|
+
$bf90a11a7a42a0f7$exports = {
|
|
83
|
+
"colorPicker": `Color picker`,
|
|
84
|
+
"twoDimensionalSlider": `2D slider`,
|
|
85
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
86
|
+
,
|
|
87
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
88
|
+
};
|
|
47
89
|
|
|
48
90
|
|
|
49
91
|
var $dd0d25f885b5c5f3$exports = {};
|
|
50
|
-
$dd0d25f885b5c5f3$exports =
|
|
92
|
+
$dd0d25f885b5c5f3$exports = {
|
|
93
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
94
|
+
,
|
|
95
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
96
|
+
,
|
|
97
|
+
"colorPicker": `Selector de color`,
|
|
98
|
+
"twoDimensionalSlider": `Regulador 2D`
|
|
99
|
+
};
|
|
51
100
|
|
|
52
101
|
|
|
53
102
|
var $d950967017e3485b$exports = {};
|
|
54
|
-
$d950967017e3485b$exports =
|
|
103
|
+
$d950967017e3485b$exports = {
|
|
104
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
105
|
+
,
|
|
106
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
107
|
+
,
|
|
108
|
+
"colorPicker": `Värvivalija`,
|
|
109
|
+
"twoDimensionalSlider": `2D-liugur`
|
|
110
|
+
};
|
|
55
111
|
|
|
56
112
|
|
|
57
113
|
var $00a415a3f0ab315a$exports = {};
|
|
58
|
-
$00a415a3f0ab315a$exports =
|
|
114
|
+
$00a415a3f0ab315a$exports = {
|
|
115
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
116
|
+
,
|
|
117
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
118
|
+
,
|
|
119
|
+
"colorPicker": `Värimuokkain`,
|
|
120
|
+
"twoDimensionalSlider": `2D-liukusäädin`
|
|
121
|
+
};
|
|
59
122
|
|
|
60
123
|
|
|
61
124
|
var $d80f30fe86c95741$exports = {};
|
|
62
|
-
$d80f30fe86c95741$exports =
|
|
125
|
+
$d80f30fe86c95741$exports = {
|
|
126
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
127
|
+
,
|
|
128
|
+
"colorNameAndValue": (args)=>`${args.name} : ${args.value}`
|
|
129
|
+
,
|
|
130
|
+
"colorPicker": `Sélecteur de couleurs`,
|
|
131
|
+
"twoDimensionalSlider": `Curseur 2D`
|
|
132
|
+
};
|
|
63
133
|
|
|
64
134
|
|
|
65
135
|
var $6912afb584340a2e$exports = {};
|
|
66
|
-
$6912afb584340a2e$exports =
|
|
136
|
+
$6912afb584340a2e$exports = {
|
|
137
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
138
|
+
,
|
|
139
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
140
|
+
,
|
|
141
|
+
"colorPicker": `בוחר הצבעים`,
|
|
142
|
+
"twoDimensionalSlider": `מחוון דו מימדי`
|
|
143
|
+
};
|
|
67
144
|
|
|
68
145
|
|
|
69
146
|
var $7b97fcacd84ec90f$exports = {};
|
|
70
|
-
$7b97fcacd84ec90f$exports =
|
|
147
|
+
$7b97fcacd84ec90f$exports = {
|
|
148
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
149
|
+
,
|
|
150
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
151
|
+
,
|
|
152
|
+
"colorPicker": `Odabir boje`,
|
|
153
|
+
"twoDimensionalSlider": `2D klizač`
|
|
154
|
+
};
|
|
71
155
|
|
|
72
156
|
|
|
73
157
|
var $da9b443e89eebc6b$exports = {};
|
|
74
|
-
$da9b443e89eebc6b$exports =
|
|
158
|
+
$da9b443e89eebc6b$exports = {
|
|
159
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
160
|
+
,
|
|
161
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
162
|
+
,
|
|
163
|
+
"colorPicker": `Színválasztó`,
|
|
164
|
+
"twoDimensionalSlider": `2D-csúszka`
|
|
165
|
+
};
|
|
75
166
|
|
|
76
167
|
|
|
77
168
|
var $35f135b45eb4d95b$exports = {};
|
|
78
|
-
$35f135b45eb4d95b$exports =
|
|
169
|
+
$35f135b45eb4d95b$exports = {
|
|
170
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
171
|
+
,
|
|
172
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
173
|
+
,
|
|
174
|
+
"colorPicker": `Selettore colore`,
|
|
175
|
+
"twoDimensionalSlider": `Cursore 2D`
|
|
176
|
+
};
|
|
79
177
|
|
|
80
178
|
|
|
81
179
|
var $760b09448e39c6cd$exports = {};
|
|
82
|
-
$760b09448e39c6cd$exports =
|
|
180
|
+
$760b09448e39c6cd$exports = {
|
|
181
|
+
"colorInputLabel": (args)=>`${args.label}、${args.channelLabel}`
|
|
182
|
+
,
|
|
183
|
+
"colorNameAndValue": (args)=>`${args.name} : ${args.value}`
|
|
184
|
+
,
|
|
185
|
+
"colorPicker": `カラーピッカー`,
|
|
186
|
+
"twoDimensionalSlider": `2D スライダー`
|
|
187
|
+
};
|
|
83
188
|
|
|
84
189
|
|
|
85
190
|
var $fc7b7d43be9703ec$exports = {};
|
|
86
|
-
$fc7b7d43be9703ec$exports =
|
|
191
|
+
$fc7b7d43be9703ec$exports = {
|
|
192
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
193
|
+
,
|
|
194
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
195
|
+
,
|
|
196
|
+
"colorPicker": `색상 피커`,
|
|
197
|
+
"twoDimensionalSlider": `2D 슬라이더`
|
|
198
|
+
};
|
|
87
199
|
|
|
88
200
|
|
|
89
201
|
var $74918a1664156912$exports = {};
|
|
90
|
-
$74918a1664156912$exports =
|
|
202
|
+
$74918a1664156912$exports = {
|
|
203
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
204
|
+
,
|
|
205
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
206
|
+
,
|
|
207
|
+
"colorPicker": `Spalvų parinkiklis`,
|
|
208
|
+
"twoDimensionalSlider": `2D slankiklis`
|
|
209
|
+
};
|
|
91
210
|
|
|
92
211
|
|
|
93
212
|
var $4e6cde11c2bc9840$exports = {};
|
|
94
|
-
$4e6cde11c2bc9840$exports =
|
|
213
|
+
$4e6cde11c2bc9840$exports = {
|
|
214
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
215
|
+
,
|
|
216
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
217
|
+
,
|
|
218
|
+
"colorPicker": `Krāsu atlasītājs`,
|
|
219
|
+
"twoDimensionalSlider": `2D slīdnis`
|
|
220
|
+
};
|
|
95
221
|
|
|
96
222
|
|
|
97
223
|
var $6faa3defebc3eb72$exports = {};
|
|
98
|
-
$6faa3defebc3eb72$exports =
|
|
224
|
+
$6faa3defebc3eb72$exports = {
|
|
225
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
226
|
+
,
|
|
227
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
228
|
+
,
|
|
229
|
+
"colorPicker": `Fargevelger`,
|
|
230
|
+
"twoDimensionalSlider": `2D-glidebryter`
|
|
231
|
+
};
|
|
99
232
|
|
|
100
233
|
|
|
101
234
|
var $6ac9b6b1b7e3ca12$exports = {};
|
|
102
|
-
$6ac9b6b1b7e3ca12$exports =
|
|
235
|
+
$6ac9b6b1b7e3ca12$exports = {
|
|
236
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
237
|
+
,
|
|
238
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
239
|
+
,
|
|
240
|
+
"colorPicker": `Kleurkiezer`,
|
|
241
|
+
"twoDimensionalSlider": `2D-schuifregelaar`
|
|
242
|
+
};
|
|
103
243
|
|
|
104
244
|
|
|
105
245
|
var $1be8b0ee8841f1e7$exports = {};
|
|
106
|
-
$1be8b0ee8841f1e7$exports =
|
|
246
|
+
$1be8b0ee8841f1e7$exports = {
|
|
247
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
248
|
+
,
|
|
249
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
250
|
+
,
|
|
251
|
+
"colorPicker": `Próbnik kolorów`,
|
|
252
|
+
"twoDimensionalSlider": `Suwak 2D`
|
|
253
|
+
};
|
|
107
254
|
|
|
108
255
|
|
|
109
256
|
var $f9507c2d404ed689$exports = {};
|
|
110
|
-
$f9507c2d404ed689$exports =
|
|
257
|
+
$f9507c2d404ed689$exports = {
|
|
258
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
259
|
+
,
|
|
260
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
261
|
+
,
|
|
262
|
+
"colorPicker": `Seletor de cores`,
|
|
263
|
+
"twoDimensionalSlider": `Controle deslizante 2D`
|
|
264
|
+
};
|
|
111
265
|
|
|
112
266
|
|
|
113
267
|
var $8f872ea59c02d67e$exports = {};
|
|
114
|
-
$8f872ea59c02d67e$exports =
|
|
268
|
+
$8f872ea59c02d67e$exports = {
|
|
269
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
270
|
+
,
|
|
271
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
272
|
+
,
|
|
273
|
+
"colorPicker": `Seletor de cores`,
|
|
274
|
+
"twoDimensionalSlider": `Controle deslizante 2D`
|
|
275
|
+
};
|
|
115
276
|
|
|
116
277
|
|
|
117
278
|
var $b03b45b62a7ccae4$exports = {};
|
|
118
|
-
$b03b45b62a7ccae4$exports =
|
|
279
|
+
$b03b45b62a7ccae4$exports = {
|
|
280
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
281
|
+
,
|
|
282
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
283
|
+
,
|
|
284
|
+
"colorPicker": `Selector de culori`,
|
|
285
|
+
"twoDimensionalSlider": `Glisor 2D`
|
|
286
|
+
};
|
|
119
287
|
|
|
120
288
|
|
|
121
289
|
var $f1107d94c09df9b8$exports = {};
|
|
122
|
-
$f1107d94c09df9b8$exports =
|
|
290
|
+
$f1107d94c09df9b8$exports = {
|
|
291
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
292
|
+
,
|
|
293
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
294
|
+
,
|
|
295
|
+
"colorPicker": `Палитра цветов`,
|
|
296
|
+
"twoDimensionalSlider": `Ползунок 2D`
|
|
297
|
+
};
|
|
123
298
|
|
|
124
299
|
|
|
125
300
|
var $b61325f242fafc7c$exports = {};
|
|
126
|
-
$b61325f242fafc7c$exports =
|
|
301
|
+
$b61325f242fafc7c$exports = {
|
|
302
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
303
|
+
,
|
|
304
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
305
|
+
,
|
|
306
|
+
"colorPicker": `Výber farieb`,
|
|
307
|
+
"twoDimensionalSlider": `2D jazdec`
|
|
308
|
+
};
|
|
127
309
|
|
|
128
310
|
|
|
129
311
|
var $f44b7cf39ac8f315$exports = {};
|
|
130
|
-
$f44b7cf39ac8f315$exports =
|
|
312
|
+
$f44b7cf39ac8f315$exports = {
|
|
313
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
314
|
+
,
|
|
315
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
316
|
+
,
|
|
317
|
+
"colorPicker": `Izbirnik barv`,
|
|
318
|
+
"twoDimensionalSlider": `2D drsnik`
|
|
319
|
+
};
|
|
131
320
|
|
|
132
321
|
|
|
133
322
|
var $aa8cd83fc8d4982b$exports = {};
|
|
134
|
-
$aa8cd83fc8d4982b$exports =
|
|
323
|
+
$aa8cd83fc8d4982b$exports = {
|
|
324
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
325
|
+
,
|
|
326
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
327
|
+
,
|
|
328
|
+
"colorPicker": `Birač boja`,
|
|
329
|
+
"twoDimensionalSlider": `2D klizač`
|
|
330
|
+
};
|
|
135
331
|
|
|
136
332
|
|
|
137
333
|
var $7c4f4e5bb7c06f1e$exports = {};
|
|
138
|
-
$7c4f4e5bb7c06f1e$exports =
|
|
334
|
+
$7c4f4e5bb7c06f1e$exports = {
|
|
335
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
336
|
+
,
|
|
337
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
338
|
+
,
|
|
339
|
+
"colorPicker": `Färgväljaren`,
|
|
340
|
+
"twoDimensionalSlider": `2D-reglage`
|
|
341
|
+
};
|
|
139
342
|
|
|
140
343
|
|
|
141
344
|
var $8045cf930ef745aa$exports = {};
|
|
142
|
-
$8045cf930ef745aa$exports =
|
|
345
|
+
$8045cf930ef745aa$exports = {
|
|
346
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
347
|
+
,
|
|
348
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
349
|
+
,
|
|
350
|
+
"colorPicker": `Renk Seçici`,
|
|
351
|
+
"twoDimensionalSlider": `2D sürgü`
|
|
352
|
+
};
|
|
143
353
|
|
|
144
354
|
|
|
145
355
|
var $ee2044a77f24b118$exports = {};
|
|
146
|
-
$ee2044a77f24b118$exports =
|
|
356
|
+
$ee2044a77f24b118$exports = {
|
|
357
|
+
"colorInputLabel": (args)=>`${args.label}, ${args.channelLabel}`
|
|
358
|
+
,
|
|
359
|
+
"colorNameAndValue": (args)=>`${args.name}: ${args.value}`
|
|
360
|
+
,
|
|
361
|
+
"colorPicker": `Палітра кольорів`,
|
|
362
|
+
"twoDimensionalSlider": `Повзунок 2D`
|
|
363
|
+
};
|
|
147
364
|
|
|
148
365
|
|
|
149
366
|
var $4e1dbc65a687dd93$exports = {};
|
|
150
|
-
$4e1dbc65a687dd93$exports =
|
|
367
|
+
$4e1dbc65a687dd93$exports = {
|
|
368
|
+
"colorInputLabel": (args)=>`${args.label}、${args.channelLabel}`
|
|
369
|
+
,
|
|
370
|
+
"colorNameAndValue": (args)=>`${args.name}:${args.value}`
|
|
371
|
+
,
|
|
372
|
+
"colorPicker": `拾色器`,
|
|
373
|
+
"twoDimensionalSlider": `2D 滑块`
|
|
374
|
+
};
|
|
151
375
|
|
|
152
376
|
|
|
153
377
|
var $b0fef28529309aa6$exports = {};
|
|
154
|
-
$b0fef28529309aa6$exports =
|
|
378
|
+
$b0fef28529309aa6$exports = {
|
|
379
|
+
"colorInputLabel": (args)=>`${args.label},${args.channelLabel}`
|
|
380
|
+
,
|
|
381
|
+
"colorNameAndValue": (args)=>`${args.name}:${args.value}`
|
|
382
|
+
,
|
|
383
|
+
"colorPicker": `檢色器`,
|
|
384
|
+
"twoDimensionalSlider": `2D 滑桿`
|
|
385
|
+
};
|
|
155
386
|
|
|
156
387
|
|
|
157
388
|
$052cfdf4c32eb7c3$exports = {
|
|
@@ -370,17 +601,22 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction , stat
|
|
|
370
601
|
}
|
|
371
602
|
let { x: x , y: y } = state.getThumbPosition();
|
|
372
603
|
if (direction === 'rtl') x = 1 - x;
|
|
604
|
+
let forcedColorAdjustNoneStyle = {
|
|
605
|
+
forcedColorAdjust: 'none'
|
|
606
|
+
};
|
|
373
607
|
return {
|
|
374
608
|
colorAreaStyleProps: {
|
|
375
609
|
style: {
|
|
376
610
|
position: 'relative',
|
|
377
611
|
touchAction: 'none',
|
|
612
|
+
...forcedColorAdjustNoneStyle,
|
|
378
613
|
...background.colorAreaStyles
|
|
379
614
|
}
|
|
380
615
|
},
|
|
381
616
|
gradientStyleProps: {
|
|
382
617
|
style: {
|
|
383
618
|
touchAction: 'none',
|
|
619
|
+
...forcedColorAdjustNoneStyle,
|
|
384
620
|
...background.gradientStyles
|
|
385
621
|
}
|
|
386
622
|
},
|
|
@@ -390,7 +626,8 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction , stat
|
|
|
390
626
|
left: `${x * 100}%`,
|
|
391
627
|
top: `${y * 100}%`,
|
|
392
628
|
transform: 'translate(0%, 0%)',
|
|
393
|
-
touchAction: 'none'
|
|
629
|
+
touchAction: 'none',
|
|
630
|
+
...forcedColorAdjustNoneStyle
|
|
394
631
|
}
|
|
395
632
|
}
|
|
396
633
|
};
|
|
@@ -410,7 +647,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction , stat
|
|
|
410
647
|
|
|
411
648
|
function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
412
649
|
let { isDisabled: isDisabled , inputXRef: inputXRef , inputYRef: inputYRef , containerRef: containerRef , 'aria-label': ariaLabel } = props;
|
|
413
|
-
let
|
|
650
|
+
let stringFormatter = $7KHxM$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($052cfdf4c32eb7c3$exports)));
|
|
414
651
|
let { addGlobalListener: addGlobalListener , removeGlobalListener: removeGlobalListener } = $7KHxM$useGlobalListeners();
|
|
415
652
|
let { direction: direction , locale: locale } = $7KHxM$useLocale();
|
|
416
653
|
let focusedInputRef = $7KHxM$useRef(null);
|
|
@@ -627,40 +864,40 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
627
864
|
});
|
|
628
865
|
let isMobile = $7KHxM$isIOS() || $7KHxM$isAndroid();
|
|
629
866
|
function getAriaValueTextForChannel(channel) {
|
|
630
|
-
return valueChangedViaKeyboard.current ?
|
|
867
|
+
return valueChangedViaKeyboard.current ? stringFormatter.format('colorNameAndValue', {
|
|
631
868
|
name: state.value.getChannelName(channel, locale),
|
|
632
869
|
value: state.value.formatChannelValue(channel, locale)
|
|
633
870
|
}) : [
|
|
634
|
-
|
|
871
|
+
stringFormatter.format('colorNameAndValue', {
|
|
635
872
|
name: state.value.getChannelName(channel, locale),
|
|
636
873
|
value: state.value.formatChannelValue(channel, locale)
|
|
637
874
|
}),
|
|
638
|
-
|
|
875
|
+
stringFormatter.format('colorNameAndValue', {
|
|
639
876
|
name: state.value.getChannelName(channel === yChannel ? xChannel : yChannel, locale),
|
|
640
877
|
value: state.value.formatChannelValue(channel === yChannel ? xChannel : yChannel, locale)
|
|
641
878
|
})
|
|
642
879
|
].join(', ');
|
|
643
880
|
}
|
|
644
|
-
let colorPickerLabel =
|
|
881
|
+
let colorPickerLabel = stringFormatter.format('colorPicker');
|
|
645
882
|
let xInputLabellingProps = $7KHxM$useLabels({
|
|
646
883
|
...props,
|
|
647
|
-
'aria-label': ariaLabel ?
|
|
884
|
+
'aria-label': ariaLabel ? stringFormatter.format('colorInputLabel', {
|
|
648
885
|
label: ariaLabel,
|
|
649
886
|
channelLabel: colorPickerLabel
|
|
650
887
|
}) : colorPickerLabel
|
|
651
888
|
});
|
|
652
889
|
let yInputLabellingProps = $7KHxM$useLabels({
|
|
653
890
|
...props,
|
|
654
|
-
'aria-label': ariaLabel ?
|
|
891
|
+
'aria-label': ariaLabel ? stringFormatter.format('colorInputLabel', {
|
|
655
892
|
label: ariaLabel,
|
|
656
893
|
channelLabel: colorPickerLabel
|
|
657
894
|
}) : colorPickerLabel
|
|
658
895
|
});
|
|
659
|
-
let
|
|
896
|
+
let colorAreaLabellingProps = $7KHxM$useLabels({
|
|
660
897
|
...props,
|
|
661
|
-
'aria-label': ariaLabel ? `${ariaLabel} ${colorPickerLabel}` : undefined
|
|
898
|
+
'aria-label': ariaLabel ? `${ariaLabel}, ${colorPickerLabel}` : undefined
|
|
662
899
|
}, isMobile ? colorPickerLabel : undefined);
|
|
663
|
-
let ariaRoleDescription =
|
|
900
|
+
let ariaRoleDescription = stringFormatter.format('twoDimensionalSlider');
|
|
664
901
|
let { visuallyHiddenProps: visuallyHiddenProps } = $7KHxM$useVisuallyHidden({
|
|
665
902
|
style: {
|
|
666
903
|
opacity: '0.0001',
|
|
@@ -678,7 +915,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
678
915
|
});
|
|
679
916
|
return {
|
|
680
917
|
colorAreaProps: {
|
|
681
|
-
...
|
|
918
|
+
...colorAreaLabellingProps,
|
|
682
919
|
...colorAreaInteractions,
|
|
683
920
|
...colorAreaStyleProps,
|
|
684
921
|
role: 'group'
|
|
@@ -709,7 +946,7 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
709
946
|
So that only a single "2d slider" control shows up when listing form elements for screen readers,
|
|
710
947
|
add aria-hidden="true" to the unfocused control when the value has not changed via the keyboard,
|
|
711
948
|
but remove aria-hidden to reveal the input for each channel when the value has changed with the keyboard.
|
|
712
|
-
*/ 'aria-hidden':
|
|
949
|
+
*/ 'aria-hidden': isMobile || !focusedInputRef.current || focusedInputRef.current === inputXRef.current || valueChangedViaKeyboard.current ? undefined : 'true',
|
|
713
950
|
onChange: (e)=>{
|
|
714
951
|
state.setXValue(parseFloat(e.target.value));
|
|
715
952
|
}
|
|
@@ -727,12 +964,12 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
727
964
|
'aria-orientation': 'vertical',
|
|
728
965
|
disabled: isDisabled,
|
|
729
966
|
value: state.value.getChannelValue(yChannel),
|
|
730
|
-
tabIndex: isMobile || focusedInputRef.current === inputYRef.current ? undefined : -1,
|
|
967
|
+
tabIndex: isMobile || focusedInputRef.current && focusedInputRef.current === inputYRef.current ? undefined : -1,
|
|
731
968
|
/*
|
|
732
969
|
So that only a single "2d slider" control shows up when listing form elements for screen readers,
|
|
733
970
|
add aria-hidden="true" to the unfocused input when the value has not changed via the keyboard,
|
|
734
971
|
but remove aria-hidden to reveal the input for each channel when the value has changed with the keyboard.
|
|
735
|
-
*/ 'aria-hidden': isMobile || focusedInputRef.current === inputYRef.current || valueChangedViaKeyboard.current ? undefined : 'true',
|
|
972
|
+
*/ 'aria-hidden': isMobile || focusedInputRef.current && focusedInputRef.current === inputYRef.current || valueChangedViaKeyboard.current ? undefined : 'true',
|
|
736
973
|
onChange: (e)=>{
|
|
737
974
|
state.setYValue(parseFloat(e.target.value));
|
|
738
975
|
}
|
|
@@ -741,9 +978,6 @@ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
|
|
|
741
978
|
}
|
|
742
979
|
|
|
743
980
|
|
|
744
|
-
var $40af666d6c251e36$exports = {};
|
|
745
|
-
|
|
746
|
-
$parcel$export($40af666d6c251e36$exports, "useColorSlider", () => $40af666d6c251e36$export$106b7a4e66508f66);
|
|
747
981
|
|
|
748
982
|
|
|
749
983
|
|
|
@@ -799,14 +1033,15 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
799
1033
|
throw new Error('Unknown color channel: ' + channel);
|
|
800
1034
|
}
|
|
801
1035
|
};
|
|
802
|
-
let
|
|
803
|
-
|
|
1036
|
+
let forcedColorAdjustNoneStyle = {
|
|
1037
|
+
forcedColorAdjust: 'none'
|
|
1038
|
+
};
|
|
804
1039
|
return {
|
|
805
1040
|
trackProps: {
|
|
806
1041
|
...$7KHxM$mergeProps(groupProps, trackProps),
|
|
807
1042
|
style: {
|
|
808
|
-
|
|
809
|
-
|
|
1043
|
+
...trackProps.style,
|
|
1044
|
+
...forcedColorAdjustNoneStyle,
|
|
810
1045
|
background: generateBackground()
|
|
811
1046
|
}
|
|
812
1047
|
},
|
|
@@ -814,10 +1049,8 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
814
1049
|
thumbProps: {
|
|
815
1050
|
...thumbProps,
|
|
816
1051
|
style: {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
[orientation === 'vertical' ? 'top' : 'left']: `${thumbPosition * 100}%`,
|
|
820
|
-
transform: 'translate(-50%, -50%)'
|
|
1052
|
+
...thumbProps.style,
|
|
1053
|
+
...forcedColorAdjustNoneStyle
|
|
821
1054
|
}
|
|
822
1055
|
},
|
|
823
1056
|
labelProps: labelProps,
|
|
@@ -826,9 +1059,6 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
|
|
|
826
1059
|
}
|
|
827
1060
|
|
|
828
1061
|
|
|
829
|
-
var $b4a0a4fdc900495e$exports = {};
|
|
830
|
-
|
|
831
|
-
$parcel$export($b4a0a4fdc900495e$exports, "useColorWheel", () => $b4a0a4fdc900495e$export$9064ff4e44b3729a);
|
|
832
1062
|
|
|
833
1063
|
|
|
834
1064
|
|
|
@@ -1005,6 +1235,9 @@ function $b4a0a4fdc900495e$export$9064ff4e44b3729a(props, state, inputRef) {
|
|
|
1005
1235
|
'aria-label': ariaLabel
|
|
1006
1236
|
});
|
|
1007
1237
|
let { minValue: minValue , maxValue: maxValue , step: step } = state.value.getChannelRange('hue');
|
|
1238
|
+
let forcedColorAdjustNoneStyle = {
|
|
1239
|
+
forcedColorAdjust: 'none'
|
|
1240
|
+
};
|
|
1008
1241
|
return {
|
|
1009
1242
|
trackProps: {
|
|
1010
1243
|
...trackInteractions,
|
|
@@ -1031,7 +1264,8 @@ function $b4a0a4fdc900495e$export$9064ff4e44b3729a(props, state, inputRef) {
|
|
|
1031
1264
|
hsl(360, 100%, 50%)
|
|
1032
1265
|
)
|
|
1033
1266
|
`,
|
|
1034
|
-
clipPath: `path(evenodd, "${$b4a0a4fdc900495e$var$circlePath(outerRadius, outerRadius, outerRadius)} ${$b4a0a4fdc900495e$var$circlePath(outerRadius, outerRadius, innerRadius)}")
|
|
1267
|
+
clipPath: `path(evenodd, "${$b4a0a4fdc900495e$var$circlePath(outerRadius, outerRadius, outerRadius)} ${$b4a0a4fdc900495e$var$circlePath(outerRadius, outerRadius, innerRadius)}")`,
|
|
1268
|
+
...forcedColorAdjustNoneStyle
|
|
1035
1269
|
}
|
|
1036
1270
|
},
|
|
1037
1271
|
thumbProps: {
|
|
@@ -1041,7 +1275,8 @@ function $b4a0a4fdc900495e$export$9064ff4e44b3729a(props, state, inputRef) {
|
|
|
1041
1275
|
left: '50%',
|
|
1042
1276
|
top: '50%',
|
|
1043
1277
|
transform: `translate(calc(${x1}px - 50%), calc(${y1}px - 50%))`,
|
|
1044
|
-
touchAction: 'none'
|
|
1278
|
+
touchAction: 'none',
|
|
1279
|
+
...forcedColorAdjustNoneStyle
|
|
1045
1280
|
}
|
|
1046
1281
|
},
|
|
1047
1282
|
inputProps: $7KHxM$mergeProps(inputLabellingProps, {
|
|
@@ -1064,9 +1299,6 @@ function $b4a0a4fdc900495e$var$circlePath(cx, cy, r) {
|
|
|
1064
1299
|
}
|
|
1065
1300
|
|
|
1066
1301
|
|
|
1067
|
-
var $f6896b05b2ecad12$exports = {};
|
|
1068
|
-
|
|
1069
|
-
$parcel$export($f6896b05b2ecad12$exports, "useColorField", () => $f6896b05b2ecad12$export$77e32ca575a28fdf);
|
|
1070
1302
|
|
|
1071
1303
|
|
|
1072
1304
|
|