@react-aria/color 3.0.0-nightly.4552 → 3.0.0-nightly.4558

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/ar-AE.mjs +1 -1
  2. package/dist/bg-BG.mjs +1 -1
  3. package/dist/cs-CZ.mjs +1 -1
  4. package/dist/da-DK.mjs +1 -1
  5. package/dist/de-DE.mjs +1 -1
  6. package/dist/el-GR.mjs +1 -1
  7. package/dist/en-US.mjs +1 -1
  8. package/dist/es-ES.mjs +1 -1
  9. package/dist/et-EE.mjs +1 -1
  10. package/dist/fi-FI.mjs +1 -1
  11. package/dist/fr-FR.mjs +1 -1
  12. package/dist/he-IL.mjs +1 -1
  13. package/dist/hr-HR.mjs +1 -1
  14. package/dist/hu-HU.mjs +1 -1
  15. package/dist/import.mjs +4 -1144
  16. package/dist/intlStrings.main.js +108 -0
  17. package/dist/intlStrings.main.js.map +1 -0
  18. package/dist/intlStrings.mjs +110 -0
  19. package/dist/intlStrings.module.js +110 -0
  20. package/dist/intlStrings.module.js.map +1 -0
  21. package/dist/it-IT.mjs +1 -1
  22. package/dist/ja-JP.mjs +1 -1
  23. package/dist/ko-KR.mjs +1 -1
  24. package/dist/lt-LT.mjs +1 -1
  25. package/dist/lv-LV.mjs +1 -1
  26. package/dist/main.js +8 -1148
  27. package/dist/main.js.map +1 -1
  28. package/dist/module.js +4 -1144
  29. package/dist/module.js.map +1 -1
  30. package/dist/nb-NO.mjs +1 -1
  31. package/dist/nl-NL.mjs +1 -1
  32. package/dist/pl-PL.mjs +1 -1
  33. package/dist/pt-BR.mjs +1 -1
  34. package/dist/pt-PT.mjs +1 -1
  35. package/dist/ro-RO.mjs +1 -1
  36. package/dist/ru-RU.mjs +1 -1
  37. package/dist/sk-SK.mjs +1 -1
  38. package/dist/sl-SI.mjs +1 -1
  39. package/dist/sr-SP.mjs +1 -1
  40. package/dist/sv-SE.mjs +1 -1
  41. package/dist/tr-TR.mjs +1 -1
  42. package/dist/uk-UA.mjs +1 -1
  43. package/dist/useColorArea.main.js +404 -0
  44. package/dist/useColorArea.main.js.map +1 -0
  45. package/dist/useColorArea.mjs +399 -0
  46. package/dist/useColorArea.module.js +399 -0
  47. package/dist/useColorArea.module.js.map +1 -0
  48. package/dist/useColorAreaGradient.main.js +229 -0
  49. package/dist/useColorAreaGradient.main.js.map +1 -0
  50. package/dist/useColorAreaGradient.mjs +224 -0
  51. package/dist/useColorAreaGradient.module.js +224 -0
  52. package/dist/useColorAreaGradient.module.js.map +1 -0
  53. package/dist/useColorField.main.js +97 -0
  54. package/dist/useColorField.main.js.map +1 -0
  55. package/dist/useColorField.mjs +92 -0
  56. package/dist/useColorField.module.js +92 -0
  57. package/dist/useColorField.module.js.map +1 -0
  58. package/dist/useColorSlider.main.js +105 -0
  59. package/dist/useColorSlider.main.js.map +1 -0
  60. package/dist/useColorSlider.mjs +100 -0
  61. package/dist/useColorSlider.module.js +100 -0
  62. package/dist/useColorSlider.module.js.map +1 -0
  63. package/dist/useColorWheel.main.js +260 -0
  64. package/dist/useColorWheel.main.js.map +1 -0
  65. package/dist/useColorWheel.mjs +255 -0
  66. package/dist/useColorWheel.module.js +255 -0
  67. package/dist/useColorWheel.module.js.map +1 -0
  68. package/dist/zh-CN.mjs +1 -1
  69. package/dist/zh-TW.mjs +1 -1
  70. package/package.json +13 -13
@@ -0,0 +1,399 @@
1
+ import $8t1z9$intlStringsmodulejs from "./intlStrings.mjs";
2
+ import {useColorAreaGradient as $40297c24c53588e6$export$dd62420467d245ca} from "./useColorAreaGradient.mjs";
3
+ import {useGlobalListeners as $8t1z9$useGlobalListeners, focusWithoutScrolling as $8t1z9$focusWithoutScrolling, useFormReset as $8t1z9$useFormReset, mergeProps as $8t1z9$mergeProps, isIOS as $8t1z9$isIOS, isAndroid as $8t1z9$isAndroid, useLabels as $8t1z9$useLabels} from "@react-aria/utils";
4
+ import {useState as $8t1z9$useState, useCallback as $8t1z9$useCallback, useRef as $8t1z9$useRef} from "react";
5
+ import {useKeyboard as $8t1z9$useKeyboard, useMove as $8t1z9$useMove, useFocusWithin as $8t1z9$useFocusWithin, useFocus as $8t1z9$useFocus} from "@react-aria/interactions";
6
+ import {useLocalizedStringFormatter as $8t1z9$useLocalizedStringFormatter, useLocale as $8t1z9$useLocale} from "@react-aria/i18n";
7
+ import {useVisuallyHidden as $8t1z9$useVisuallyHidden} from "@react-aria/visually-hidden";
8
+
9
+
10
+ function $parcel$interopDefault(a) {
11
+ return a && a.__esModule ? a.default : a;
12
+ }
13
+ /*
14
+ * Copyright 2020 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */
24
+
25
+
26
+
27
+
28
+
29
+
30
+ function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(props, state) {
31
+ let { isDisabled: isDisabled, inputXRef: inputXRef, inputYRef: inputYRef, containerRef: containerRef, "aria-label": ariaLabel, xName: xName, yName: yName } = props;
32
+ let stringFormatter = (0, $8t1z9$useLocalizedStringFormatter)((0, ($parcel$interopDefault($8t1z9$intlStringsmodulejs))), "@react-aria/color");
33
+ let { addGlobalListener: addGlobalListener, removeGlobalListener: removeGlobalListener } = (0, $8t1z9$useGlobalListeners)();
34
+ let { direction: direction, locale: locale } = (0, $8t1z9$useLocale)();
35
+ let [focusedInput, setFocusedInput] = (0, $8t1z9$useState)(null);
36
+ let focusInput = (0, $8t1z9$useCallback)((inputRef = inputXRef)=>{
37
+ if (inputRef.current) (0, $8t1z9$focusWithoutScrolling)(inputRef.current);
38
+ }, [
39
+ inputXRef
40
+ ]);
41
+ (0, $8t1z9$useFormReset)(inputXRef, [
42
+ state.xValue,
43
+ state.yValue
44
+ ], ([x, y])=>{
45
+ let newColor = state.value.withChannelValue(state.channels.xChannel, x).withChannelValue(state.channels.yChannel, y);
46
+ state.setValue(newColor);
47
+ });
48
+ let [valueChangedViaKeyboard, setValueChangedViaKeyboard] = (0, $8t1z9$useState)(false);
49
+ let [valueChangedViaInputChangeEvent, setValueChangedViaInputChangeEvent] = (0, $8t1z9$useState)(false);
50
+ let { xChannel: xChannel, yChannel: yChannel, zChannel: zChannel } = state.channels;
51
+ let xChannelStep = state.xChannelStep;
52
+ let yChannelStep = state.yChannelStep;
53
+ let currentPosition = (0, $8t1z9$useRef)(null);
54
+ let { keyboardProps: keyboardProps } = (0, $8t1z9$useKeyboard)({
55
+ onKeyDown (e) {
56
+ // these are the cases that useMove doesn't handle
57
+ if (!/^(PageUp|PageDown|Home|End)$/.test(e.key)) {
58
+ e.continuePropagation();
59
+ return;
60
+ }
61
+ // same handling as useMove, don't need to stop propagation, useKeyboard will do that for us
62
+ e.preventDefault();
63
+ // remember to set this and unset it so that onChangeEnd is fired
64
+ state.setDragging(true);
65
+ setValueChangedViaKeyboard(true);
66
+ let dir;
67
+ switch(e.key){
68
+ case "PageUp":
69
+ state.incrementY(state.yChannelPageStep);
70
+ dir = "y";
71
+ break;
72
+ case "PageDown":
73
+ state.decrementY(state.yChannelPageStep);
74
+ dir = "y";
75
+ break;
76
+ case "Home":
77
+ direction === "rtl" ? state.incrementX(state.xChannelPageStep) : state.decrementX(state.xChannelPageStep);
78
+ dir = "x";
79
+ break;
80
+ case "End":
81
+ direction === "rtl" ? state.decrementX(state.xChannelPageStep) : state.incrementX(state.xChannelPageStep);
82
+ dir = "x";
83
+ break;
84
+ }
85
+ state.setDragging(false);
86
+ if (dir) {
87
+ let input = dir === "x" ? inputXRef : inputYRef;
88
+ focusInput(input);
89
+ setFocusedInput(dir);
90
+ }
91
+ }
92
+ });
93
+ let moveHandler = {
94
+ onMoveStart () {
95
+ currentPosition.current = null;
96
+ state.setDragging(true);
97
+ },
98
+ onMove ({ deltaX: deltaX, deltaY: deltaY, pointerType: pointerType, shiftKey: shiftKey }) {
99
+ var _containerRef_current;
100
+ let { incrementX: incrementX, decrementX: decrementX, incrementY: incrementY, decrementY: decrementY, xChannelPageStep: xChannelPageStep, xChannelStep: xChannelStep, yChannelPageStep: yChannelPageStep, yChannelStep: yChannelStep, getThumbPosition: getThumbPosition, setColorFromPoint: setColorFromPoint } = state;
101
+ if (currentPosition.current == null) currentPosition.current = getThumbPosition();
102
+ let { width: width, height: height } = ((_containerRef_current = containerRef.current) === null || _containerRef_current === void 0 ? void 0 : _containerRef_current.getBoundingClientRect()) || {
103
+ width: 0,
104
+ height: 0
105
+ };
106
+ let valueChanged = deltaX !== 0 || deltaY !== 0;
107
+ if (pointerType === "keyboard") {
108
+ let deltaXValue = shiftKey && xChannelPageStep > xChannelStep ? xChannelPageStep : xChannelStep;
109
+ let deltaYValue = shiftKey && yChannelPageStep > yChannelStep ? yChannelPageStep : yChannelStep;
110
+ if (deltaX > 0 && direction === "ltr" || deltaX < 0 && direction === "rtl") incrementX(deltaXValue);
111
+ else if (deltaX < 0 && direction === "ltr" || deltaX > 0 && direction === "rtl") decrementX(deltaXValue);
112
+ else if (deltaY > 0) decrementY(deltaYValue);
113
+ else if (deltaY < 0) incrementY(deltaYValue);
114
+ setValueChangedViaKeyboard(valueChanged);
115
+ // set the focused input based on which axis has the greater delta
116
+ focusedInput = valueChanged && Math.abs(deltaY) > Math.abs(deltaX) ? "y" : "x";
117
+ setFocusedInput(focusedInput);
118
+ } else {
119
+ currentPosition.current.x += (direction === "rtl" ? -1 : 1) * deltaX / width;
120
+ currentPosition.current.y += deltaY / height;
121
+ setColorFromPoint(currentPosition.current.x, currentPosition.current.y);
122
+ }
123
+ },
124
+ onMoveEnd () {
125
+ isOnColorArea.current = false;
126
+ state.setDragging(false);
127
+ let input = focusedInput === "x" ? inputXRef : inputYRef;
128
+ focusInput(input);
129
+ }
130
+ };
131
+ let { moveProps: movePropsThumb } = (0, $8t1z9$useMove)(moveHandler);
132
+ let { focusWithinProps: focusWithinProps } = (0, $8t1z9$useFocusWithin)({
133
+ onFocusWithinChange: (focusWithin)=>{
134
+ if (!focusWithin) {
135
+ setValueChangedViaKeyboard(false);
136
+ setValueChangedViaInputChangeEvent(false);
137
+ }
138
+ }
139
+ });
140
+ let currentPointer = (0, $8t1z9$useRef)(undefined);
141
+ let isOnColorArea = (0, $8t1z9$useRef)(false);
142
+ let { moveProps: movePropsContainer } = (0, $8t1z9$useMove)({
143
+ onMoveStart () {
144
+ if (isOnColorArea.current) moveHandler.onMoveStart();
145
+ },
146
+ onMove (e) {
147
+ if (isOnColorArea.current) moveHandler.onMove(e);
148
+ },
149
+ onMoveEnd () {
150
+ if (isOnColorArea.current) moveHandler.onMoveEnd();
151
+ }
152
+ });
153
+ let onThumbDown = (id)=>{
154
+ if (!state.isDragging) {
155
+ currentPointer.current = id;
156
+ setValueChangedViaKeyboard(false);
157
+ focusInput();
158
+ state.setDragging(true);
159
+ if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onThumbUp, false);
160
+ else {
161
+ addGlobalListener(window, "mouseup", onThumbUp, false);
162
+ addGlobalListener(window, "touchend", onThumbUp, false);
163
+ }
164
+ }
165
+ };
166
+ let onThumbUp = (e)=>{
167
+ var _e_changedTouches;
168
+ var _e_pointerId;
169
+ let id = (_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier;
170
+ if (id === currentPointer.current) {
171
+ setValueChangedViaKeyboard(false);
172
+ focusInput();
173
+ state.setDragging(false);
174
+ currentPointer.current = undefined;
175
+ isOnColorArea.current = false;
176
+ if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onThumbUp, false);
177
+ else {
178
+ removeGlobalListener(window, "mouseup", onThumbUp, false);
179
+ removeGlobalListener(window, "touchend", onThumbUp, false);
180
+ }
181
+ }
182
+ };
183
+ let onColorAreaDown = (colorArea, id, clientX, clientY)=>{
184
+ let rect = colorArea.getBoundingClientRect();
185
+ let { width: width, height: height } = rect;
186
+ let x = (clientX - rect.x) / width;
187
+ let y = (clientY - rect.y) / height;
188
+ if (direction === "rtl") x = 1 - x;
189
+ if (x >= 0 && x <= 1 && y >= 0 && y <= 1 && !state.isDragging && currentPointer.current === undefined) {
190
+ isOnColorArea.current = true;
191
+ setValueChangedViaKeyboard(false);
192
+ currentPointer.current = id;
193
+ state.setColorFromPoint(x, y);
194
+ focusInput();
195
+ state.setDragging(true);
196
+ if (typeof PointerEvent !== "undefined") addGlobalListener(window, "pointerup", onColorAreaUp, false);
197
+ else {
198
+ addGlobalListener(window, "mouseup", onColorAreaUp, false);
199
+ addGlobalListener(window, "touchend", onColorAreaUp, false);
200
+ }
201
+ }
202
+ };
203
+ let onColorAreaUp = (e)=>{
204
+ var _e_changedTouches;
205
+ var _e_pointerId;
206
+ let id = (_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier;
207
+ if (isOnColorArea.current && id === currentPointer.current) {
208
+ isOnColorArea.current = false;
209
+ setValueChangedViaKeyboard(false);
210
+ currentPointer.current = undefined;
211
+ state.setDragging(false);
212
+ focusInput();
213
+ if (typeof PointerEvent !== "undefined") removeGlobalListener(window, "pointerup", onColorAreaUp, false);
214
+ else {
215
+ removeGlobalListener(window, "mouseup", onColorAreaUp, false);
216
+ removeGlobalListener(window, "touchend", onColorAreaUp, false);
217
+ }
218
+ }
219
+ };
220
+ let colorAreaInteractions = isDisabled ? {} : (0, $8t1z9$mergeProps)({
221
+ ...typeof PointerEvent !== "undefined" ? {
222
+ onPointerDown: (e)=>{
223
+ if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
224
+ onColorAreaDown(e.currentTarget, e.pointerId, e.clientX, e.clientY);
225
+ }
226
+ } : {
227
+ onMouseDown: (e)=>{
228
+ if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
229
+ onColorAreaDown(e.currentTarget, undefined, e.clientX, e.clientY);
230
+ },
231
+ onTouchStart: (e)=>{
232
+ onColorAreaDown(e.currentTarget, e.changedTouches[0].identifier, e.changedTouches[0].clientX, e.changedTouches[0].clientY);
233
+ }
234
+ }
235
+ }, movePropsContainer);
236
+ let thumbInteractions = isDisabled ? {} : (0, $8t1z9$mergeProps)({
237
+ ...typeof PointerEvent !== "undefined" ? {
238
+ onPointerDown: (e)=>{
239
+ if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
240
+ onThumbDown(e.pointerId);
241
+ }
242
+ } : {
243
+ onMouseDown: (e)=>{
244
+ if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
245
+ onThumbDown(undefined);
246
+ },
247
+ onTouchStart: (e)=>{
248
+ onThumbDown(e.changedTouches[0].identifier);
249
+ }
250
+ }
251
+ }, focusWithinProps, keyboardProps, movePropsThumb);
252
+ let { focusProps: xInputFocusProps } = (0, $8t1z9$useFocus)({
253
+ onFocus: ()=>{
254
+ setFocusedInput("x");
255
+ }
256
+ });
257
+ let { focusProps: yInputFocusProps } = (0, $8t1z9$useFocus)({
258
+ onFocus: ()=>{
259
+ setFocusedInput("y");
260
+ }
261
+ });
262
+ const onChange = (e)=>{
263
+ const { target: target } = e;
264
+ setValueChangedViaInputChangeEvent(true);
265
+ if (target === inputXRef.current) state.setXValue(parseFloat(target.value));
266
+ else if (target === inputYRef.current) state.setYValue(parseFloat(target.value));
267
+ };
268
+ let isMobile = (0, $8t1z9$isIOS)() || (0, $8t1z9$isAndroid)();
269
+ let value = state.getDisplayColor();
270
+ const getAriaValueTextForChannel = (0, $8t1z9$useCallback)((channel)=>{
271
+ const isAfterInput = valueChangedViaInputChangeEvent || valueChangedViaKeyboard;
272
+ return `${isAfterInput ? stringFormatter.format("colorNameAndValue", {
273
+ name: value.getChannelName(channel, locale),
274
+ value: value.formatChannelValue(channel, locale)
275
+ }) : [
276
+ stringFormatter.format("colorNameAndValue", {
277
+ name: value.getChannelName(channel, locale),
278
+ value: value.formatChannelValue(channel, locale)
279
+ }),
280
+ stringFormatter.format("colorNameAndValue", {
281
+ name: value.getChannelName(channel === yChannel ? xChannel : yChannel, locale),
282
+ value: value.formatChannelValue(channel === yChannel ? xChannel : yChannel, locale)
283
+ }),
284
+ stringFormatter.format("colorNameAndValue", {
285
+ name: value.getChannelName(zChannel, locale),
286
+ value: value.formatChannelValue(zChannel, locale)
287
+ })
288
+ ].join(", ")}, ${value.getColorName(locale)}`;
289
+ }, [
290
+ locale,
291
+ value,
292
+ stringFormatter,
293
+ valueChangedViaInputChangeEvent,
294
+ valueChangedViaKeyboard,
295
+ xChannel,
296
+ yChannel,
297
+ zChannel
298
+ ]);
299
+ let colorPickerLabel = stringFormatter.format("colorPicker");
300
+ let xInputLabellingProps = (0, $8t1z9$useLabels)({
301
+ ...props,
302
+ "aria-label": ariaLabel ? stringFormatter.format("colorInputLabel", {
303
+ label: ariaLabel,
304
+ channelLabel: colorPickerLabel
305
+ }) : colorPickerLabel
306
+ });
307
+ let yInputLabellingProps = (0, $8t1z9$useLabels)({
308
+ ...props,
309
+ "aria-label": ariaLabel ? stringFormatter.format("colorInputLabel", {
310
+ label: ariaLabel,
311
+ channelLabel: colorPickerLabel
312
+ }) : colorPickerLabel
313
+ });
314
+ let colorAreaLabellingProps = (0, $8t1z9$useLabels)({
315
+ ...props,
316
+ "aria-label": ariaLabel ? `${ariaLabel}, ${colorPickerLabel}` : undefined
317
+ }, isMobile ? colorPickerLabel : undefined);
318
+ let ariaRoleDescription = stringFormatter.format("twoDimensionalSlider");
319
+ let { visuallyHiddenProps: visuallyHiddenProps } = (0, $8t1z9$useVisuallyHidden)({
320
+ style: {
321
+ opacity: "0.0001",
322
+ width: "100%",
323
+ height: "100%",
324
+ pointerEvents: "none"
325
+ }
326
+ });
327
+ let { colorAreaStyleProps: colorAreaStyleProps, gradientStyleProps: gradientStyleProps, thumbStyleProps: thumbStyleProps } = (0, $40297c24c53588e6$export$dd62420467d245ca)({
328
+ direction: direction,
329
+ state: state,
330
+ xChannel: xChannel,
331
+ zChannel: zChannel,
332
+ isDisabled: props.isDisabled
333
+ });
334
+ return {
335
+ colorAreaProps: {
336
+ ...colorAreaLabellingProps,
337
+ ...colorAreaInteractions,
338
+ ...colorAreaStyleProps,
339
+ role: "group"
340
+ },
341
+ gradientProps: {
342
+ ...gradientStyleProps,
343
+ role: "presentation"
344
+ },
345
+ thumbProps: {
346
+ ...thumbInteractions,
347
+ ...thumbStyleProps,
348
+ role: "presentation"
349
+ },
350
+ xInputProps: {
351
+ ...xInputLabellingProps,
352
+ ...visuallyHiddenProps,
353
+ ...xInputFocusProps,
354
+ type: "range",
355
+ min: state.value.getChannelRange(xChannel).minValue,
356
+ max: state.value.getChannelRange(xChannel).maxValue,
357
+ step: xChannelStep,
358
+ "aria-roledescription": ariaRoleDescription,
359
+ "aria-valuetext": getAriaValueTextForChannel(xChannel),
360
+ "aria-orientation": "horizontal",
361
+ disabled: isDisabled,
362
+ value: state.value.getChannelValue(xChannel),
363
+ name: xName,
364
+ tabIndex: isMobile || !focusedInput || focusedInput === "x" ? undefined : -1,
365
+ /*
366
+ So that only a single "2d slider" control shows up when listing form elements for screen readers,
367
+ add aria-hidden="true" to the unfocused control when the value has not changed via the keyboard,
368
+ but remove aria-hidden to reveal the input for each channel when the value has changed with the keyboard.
369
+ */ "aria-hidden": isMobile || !focusedInput || focusedInput === "x" || valueChangedViaKeyboard ? undefined : "true",
370
+ onChange: onChange
371
+ },
372
+ yInputProps: {
373
+ ...yInputLabellingProps,
374
+ ...visuallyHiddenProps,
375
+ ...yInputFocusProps,
376
+ type: "range",
377
+ min: state.value.getChannelRange(yChannel).minValue,
378
+ max: state.value.getChannelRange(yChannel).maxValue,
379
+ step: yChannelStep,
380
+ "aria-roledescription": ariaRoleDescription,
381
+ "aria-valuetext": getAriaValueTextForChannel(yChannel),
382
+ "aria-orientation": "vertical",
383
+ disabled: isDisabled,
384
+ value: state.value.getChannelValue(yChannel),
385
+ name: yName,
386
+ tabIndex: isMobile || focusedInput === "y" ? undefined : -1,
387
+ /*
388
+ So that only a single "2d slider" control shows up when listing form elements for screen readers,
389
+ add aria-hidden="true" to the unfocused input when the value has not changed via the keyboard,
390
+ but remove aria-hidden to reveal the input for each channel when the value has changed with the keyboard.
391
+ */ "aria-hidden": isMobile || focusedInput === "y" || valueChangedViaKeyboard ? undefined : "true",
392
+ onChange: onChange
393
+ }
394
+ };
395
+ }
396
+
397
+
398
+ export {$60bd7d6e45dcddfa$export$2f92a7a615a014f6 as useColorArea};
399
+ //# sourceMappingURL=useColorArea.mjs.map