@react-aria/color 3.0.0-beta.32 → 3.0.0-beta.33

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 (189) hide show
  1. package/dist/ar-AE.main.js +3 -3
  2. package/dist/ar-AE.main.js.map +1 -1
  3. package/dist/ar-AE.mjs +4 -4
  4. package/dist/ar-AE.module.js +3 -3
  5. package/dist/ar-AE.module.js.map +1 -1
  6. package/dist/bg-BG.main.js +3 -3
  7. package/dist/bg-BG.main.js.map +1 -1
  8. package/dist/bg-BG.mjs +4 -4
  9. package/dist/bg-BG.module.js +3 -3
  10. package/dist/bg-BG.module.js.map +1 -1
  11. package/dist/cs-CZ.main.js +3 -3
  12. package/dist/cs-CZ.main.js.map +1 -1
  13. package/dist/cs-CZ.mjs +4 -4
  14. package/dist/cs-CZ.module.js +3 -3
  15. package/dist/cs-CZ.module.js.map +1 -1
  16. package/dist/da-DK.main.js +3 -3
  17. package/dist/da-DK.main.js.map +1 -1
  18. package/dist/da-DK.mjs +4 -4
  19. package/dist/da-DK.module.js +3 -3
  20. package/dist/da-DK.module.js.map +1 -1
  21. package/dist/de-DE.main.js +3 -3
  22. package/dist/de-DE.main.js.map +1 -1
  23. package/dist/de-DE.mjs +4 -4
  24. package/dist/de-DE.module.js +3 -3
  25. package/dist/de-DE.module.js.map +1 -1
  26. package/dist/el-GR.main.js +3 -3
  27. package/dist/el-GR.main.js.map +1 -1
  28. package/dist/el-GR.mjs +4 -4
  29. package/dist/el-GR.module.js +3 -3
  30. package/dist/el-GR.module.js.map +1 -1
  31. package/dist/en-US.mjs +1 -1
  32. package/dist/es-ES.main.js +3 -3
  33. package/dist/es-ES.main.js.map +1 -1
  34. package/dist/es-ES.mjs +4 -4
  35. package/dist/es-ES.module.js +3 -3
  36. package/dist/es-ES.module.js.map +1 -1
  37. package/dist/et-EE.main.js +3 -3
  38. package/dist/et-EE.main.js.map +1 -1
  39. package/dist/et-EE.mjs +4 -4
  40. package/dist/et-EE.module.js +3 -3
  41. package/dist/et-EE.module.js.map +1 -1
  42. package/dist/fi-FI.main.js +3 -3
  43. package/dist/fi-FI.main.js.map +1 -1
  44. package/dist/fi-FI.mjs +4 -4
  45. package/dist/fi-FI.module.js +3 -3
  46. package/dist/fi-FI.module.js.map +1 -1
  47. package/dist/fr-FR.main.js +3 -3
  48. package/dist/fr-FR.main.js.map +1 -1
  49. package/dist/fr-FR.mjs +4 -4
  50. package/dist/fr-FR.module.js +3 -3
  51. package/dist/fr-FR.module.js.map +1 -1
  52. package/dist/he-IL.main.js +3 -3
  53. package/dist/he-IL.main.js.map +1 -1
  54. package/dist/he-IL.mjs +4 -4
  55. package/dist/he-IL.module.js +3 -3
  56. package/dist/he-IL.module.js.map +1 -1
  57. package/dist/hr-HR.main.js +3 -3
  58. package/dist/hr-HR.main.js.map +1 -1
  59. package/dist/hr-HR.mjs +4 -4
  60. package/dist/hr-HR.module.js +3 -3
  61. package/dist/hr-HR.module.js.map +1 -1
  62. package/dist/hu-HU.main.js +3 -3
  63. package/dist/hu-HU.main.js.map +1 -1
  64. package/dist/hu-HU.mjs +4 -4
  65. package/dist/hu-HU.module.js +3 -3
  66. package/dist/hu-HU.module.js.map +1 -1
  67. package/dist/intlStrings.mjs +1 -1
  68. package/dist/it-IT.main.js +3 -3
  69. package/dist/it-IT.main.js.map +1 -1
  70. package/dist/it-IT.mjs +4 -4
  71. package/dist/it-IT.module.js +3 -3
  72. package/dist/it-IT.module.js.map +1 -1
  73. package/dist/ja-JP.main.js +3 -3
  74. package/dist/ja-JP.main.js.map +1 -1
  75. package/dist/ja-JP.mjs +4 -4
  76. package/dist/ja-JP.module.js +3 -3
  77. package/dist/ja-JP.module.js.map +1 -1
  78. package/dist/ko-KR.main.js +3 -3
  79. package/dist/ko-KR.main.js.map +1 -1
  80. package/dist/ko-KR.mjs +4 -4
  81. package/dist/ko-KR.module.js +3 -3
  82. package/dist/ko-KR.module.js.map +1 -1
  83. package/dist/lt-LT.main.js +3 -3
  84. package/dist/lt-LT.main.js.map +1 -1
  85. package/dist/lt-LT.mjs +4 -4
  86. package/dist/lt-LT.module.js +3 -3
  87. package/dist/lt-LT.module.js.map +1 -1
  88. package/dist/lv-LV.main.js +3 -3
  89. package/dist/lv-LV.main.js.map +1 -1
  90. package/dist/lv-LV.mjs +4 -4
  91. package/dist/lv-LV.module.js +3 -3
  92. package/dist/lv-LV.module.js.map +1 -1
  93. package/dist/nb-NO.main.js +3 -3
  94. package/dist/nb-NO.main.js.map +1 -1
  95. package/dist/nb-NO.mjs +4 -4
  96. package/dist/nb-NO.module.js +3 -3
  97. package/dist/nb-NO.module.js.map +1 -1
  98. package/dist/nl-NL.main.js +3 -3
  99. package/dist/nl-NL.main.js.map +1 -1
  100. package/dist/nl-NL.mjs +4 -4
  101. package/dist/nl-NL.module.js +3 -3
  102. package/dist/nl-NL.module.js.map +1 -1
  103. package/dist/pl-PL.main.js +3 -3
  104. package/dist/pl-PL.main.js.map +1 -1
  105. package/dist/pl-PL.mjs +4 -4
  106. package/dist/pl-PL.module.js +3 -3
  107. package/dist/pl-PL.module.js.map +1 -1
  108. package/dist/pt-BR.main.js +3 -3
  109. package/dist/pt-BR.main.js.map +1 -1
  110. package/dist/pt-BR.mjs +4 -4
  111. package/dist/pt-BR.module.js +3 -3
  112. package/dist/pt-BR.module.js.map +1 -1
  113. package/dist/pt-PT.main.js +3 -3
  114. package/dist/pt-PT.main.js.map +1 -1
  115. package/dist/pt-PT.mjs +4 -4
  116. package/dist/pt-PT.module.js +3 -3
  117. package/dist/pt-PT.module.js.map +1 -1
  118. package/dist/ro-RO.main.js +3 -3
  119. package/dist/ro-RO.main.js.map +1 -1
  120. package/dist/ro-RO.mjs +4 -4
  121. package/dist/ro-RO.module.js +3 -3
  122. package/dist/ro-RO.module.js.map +1 -1
  123. package/dist/ru-RU.main.js +3 -3
  124. package/dist/ru-RU.main.js.map +1 -1
  125. package/dist/ru-RU.mjs +4 -4
  126. package/dist/ru-RU.module.js +3 -3
  127. package/dist/ru-RU.module.js.map +1 -1
  128. package/dist/sk-SK.main.js +3 -3
  129. package/dist/sk-SK.main.js.map +1 -1
  130. package/dist/sk-SK.mjs +4 -4
  131. package/dist/sk-SK.module.js +3 -3
  132. package/dist/sk-SK.module.js.map +1 -1
  133. package/dist/sl-SI.main.js +3 -3
  134. package/dist/sl-SI.main.js.map +1 -1
  135. package/dist/sl-SI.mjs +4 -4
  136. package/dist/sl-SI.module.js +3 -3
  137. package/dist/sl-SI.module.js.map +1 -1
  138. package/dist/sr-SP.main.js +3 -3
  139. package/dist/sr-SP.main.js.map +1 -1
  140. package/dist/sr-SP.mjs +4 -4
  141. package/dist/sr-SP.module.js +3 -3
  142. package/dist/sr-SP.module.js.map +1 -1
  143. package/dist/sv-SE.main.js +3 -3
  144. package/dist/sv-SE.main.js.map +1 -1
  145. package/dist/sv-SE.mjs +4 -4
  146. package/dist/sv-SE.module.js +3 -3
  147. package/dist/sv-SE.module.js.map +1 -1
  148. package/dist/tr-TR.main.js +3 -3
  149. package/dist/tr-TR.main.js.map +1 -1
  150. package/dist/tr-TR.mjs +4 -4
  151. package/dist/tr-TR.module.js +3 -3
  152. package/dist/tr-TR.module.js.map +1 -1
  153. package/dist/uk-UA.main.js +3 -3
  154. package/dist/uk-UA.main.js.map +1 -1
  155. package/dist/uk-UA.mjs +4 -4
  156. package/dist/uk-UA.module.js +3 -3
  157. package/dist/uk-UA.module.js.map +1 -1
  158. package/dist/useColorArea.main.js +70 -70
  159. package/dist/useColorArea.mjs +71 -71
  160. package/dist/useColorArea.module.js +70 -70
  161. package/dist/useColorAreaGradient.main.js +26 -26
  162. package/dist/useColorAreaGradient.mjs +27 -27
  163. package/dist/useColorAreaGradient.module.js +26 -26
  164. package/dist/useColorChannelField.main.js +1 -1
  165. package/dist/useColorChannelField.mjs +2 -2
  166. package/dist/useColorChannelField.module.js +1 -1
  167. package/dist/useColorField.main.js +12 -12
  168. package/dist/useColorField.mjs +13 -13
  169. package/dist/useColorField.module.js +12 -12
  170. package/dist/useColorSlider.main.js +28 -28
  171. package/dist/useColorSlider.mjs +29 -29
  172. package/dist/useColorSlider.module.js +28 -28
  173. package/dist/useColorSwatch.main.js +12 -12
  174. package/dist/useColorSwatch.mjs +13 -13
  175. package/dist/useColorSwatch.module.js +12 -12
  176. package/dist/useColorWheel.main.js +38 -38
  177. package/dist/useColorWheel.mjs +39 -39
  178. package/dist/useColorWheel.module.js +38 -38
  179. package/dist/zh-CN.main.js +3 -3
  180. package/dist/zh-CN.main.js.map +1 -1
  181. package/dist/zh-CN.mjs +4 -4
  182. package/dist/zh-CN.module.js +3 -3
  183. package/dist/zh-CN.module.js.map +1 -1
  184. package/dist/zh-TW.main.js +3 -3
  185. package/dist/zh-TW.main.js.map +1 -1
  186. package/dist/zh-TW.mjs +4 -4
  187. package/dist/zh-TW.module.js +3 -3
  188. package/dist/zh-TW.module.js.map +1 -1
  189. package/package.json +14 -14
@@ -21,27 +21,27 @@ const $40297c24c53588e6$var$hue = (color)=>[
21
21
  240,
22
22
  300,
23
23
  360
24
- ].map((hue)=>color.withChannelValue("hue", hue).toString("css")).join(", ");
25
- const $40297c24c53588e6$var$saturation = (color)=>`${color.withChannelValue("saturation", 0)}, transparent`;
24
+ ].map((hue)=>color.withChannelValue('hue', hue).toString('css')).join(', ');
25
+ const $40297c24c53588e6$var$saturation = (color)=>`${color.withChannelValue('saturation', 0)}, transparent`;
26
26
  const $40297c24c53588e6$var$hslChannels = {
27
27
  hue: $40297c24c53588e6$var$hue,
28
28
  saturation: $40297c24c53588e6$var$saturation,
29
- lightness: ()=>"black, transparent, white"
29
+ lightness: ()=>'black, transparent, white'
30
30
  };
31
31
  const $40297c24c53588e6$var$hsbChannels = {
32
32
  hue: $40297c24c53588e6$var$hue,
33
33
  saturation: $40297c24c53588e6$var$saturation,
34
- brightness: ()=>"black, transparent"
34
+ brightness: ()=>'black, transparent'
35
35
  };
36
36
  function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state: state, zChannel: zChannel, xChannel: xChannel, yChannel: yChannel }) {
37
37
  let returnVal = (0, $hLqEt$useMemo)(()=>{
38
- let end = direction === "rtl" ? "left" : "right";
38
+ let end = direction === 'rtl' ? 'left' : 'right';
39
39
  let colorAreaStyles = {};
40
40
  let zValue = state.value.getChannelValue(zChannel);
41
41
  switch(state.value.getColorSpace()){
42
- case "rgb":
42
+ case 'rgb':
43
43
  {
44
- let rgb = (0, $hLqEt$parseColor)("rgb(0, 0, 0)");
44
+ let rgb = (0, $hLqEt$parseColor)('rgb(0, 0, 0)');
45
45
  colorAreaStyles = {
46
46
  background: [
47
47
  // The screen blend mode multiplies the inverse of each channel, e.g. 1 - (1 - a) * (1 - b).
@@ -50,55 +50,55 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state
50
50
  `linear-gradient(to ${end}, ${rgb.withChannelValue(xChannel, 0)}, ${rgb.withChannelValue(xChannel, 255)})`,
51
51
  `linear-gradient(to top, ${rgb.withChannelValue(yChannel, 0)}, ${rgb.withChannelValue(yChannel, 255)})`,
52
52
  rgb.withChannelValue(zChannel, zValue)
53
- ].join(","),
54
- backgroundBlendMode: "screen"
53
+ ].join(','),
54
+ backgroundBlendMode: 'screen'
55
55
  };
56
56
  break;
57
57
  }
58
- case "hsl":
58
+ case 'hsl':
59
59
  {
60
60
  let channels = state.value.getColorChannels();
61
- let value = (0, $hLqEt$parseColor)("hsl(0, 100%, 50%)").withChannelValue(zChannel, zValue);
62
- let bg = channels.filter((c)=>c !== zChannel).map((c)=>`linear-gradient(to ${c === xChannel ? end : "top"}, ${$40297c24c53588e6$var$hslChannels[c](value)})`).reverse();
63
- if (zChannel === "hue") bg.push(value.toString("css"));
61
+ let value = (0, $hLqEt$parseColor)('hsl(0, 100%, 50%)').withChannelValue(zChannel, zValue);
62
+ let bg = channels.filter((c)=>c !== zChannel).map((c)=>`linear-gradient(to ${c === xChannel ? end : 'top'}, ${$40297c24c53588e6$var$hslChannels[c](value)})`).reverse();
63
+ if (zChannel === 'hue') bg.push(value.toString('css'));
64
64
  colorAreaStyles = {
65
- background: bg.join(", ")
65
+ background: bg.join(', ')
66
66
  };
67
67
  break;
68
68
  }
69
- case "hsb":
69
+ case 'hsb':
70
70
  {
71
71
  let channels = state.value.getColorChannels();
72
- let value = (0, $hLqEt$parseColor)("hsb(0, 100%, 100%)").withChannelValue(zChannel, zValue);
73
- let bg = channels.filter((c)=>c !== zChannel).map((c)=>`linear-gradient(to ${c === xChannel ? end : "top"}, ${$40297c24c53588e6$var$hsbChannels[c](value)})`).reverse();
74
- if (zChannel === "hue") bg.push(value.toString("css"));
72
+ let value = (0, $hLqEt$parseColor)('hsb(0, 100%, 100%)').withChannelValue(zChannel, zValue);
73
+ let bg = channels.filter((c)=>c !== zChannel).map((c)=>`linear-gradient(to ${c === xChannel ? end : 'top'}, ${$40297c24c53588e6$var$hsbChannels[c](value)})`).reverse();
74
+ if (zChannel === 'hue') bg.push(value.toString('css'));
75
75
  colorAreaStyles = {
76
- background: bg.join(", ")
76
+ background: bg.join(', ')
77
77
  };
78
78
  break;
79
79
  }
80
80
  }
81
81
  let { x: x, y: y } = state.getThumbPosition();
82
- if (direction === "rtl") x = 1 - x;
82
+ if (direction === 'rtl') x = 1 - x;
83
83
  let forcedColorAdjustNoneStyle = {
84
- forcedColorAdjust: "none"
84
+ forcedColorAdjust: 'none'
85
85
  };
86
86
  return {
87
87
  colorAreaStyleProps: {
88
88
  style: {
89
- position: "relative",
90
- touchAction: "none",
89
+ position: 'relative',
90
+ touchAction: 'none',
91
91
  ...forcedColorAdjustNoneStyle,
92
92
  ...colorAreaStyles
93
93
  }
94
94
  },
95
95
  thumbStyleProps: {
96
96
  style: {
97
- position: "absolute",
97
+ position: 'absolute',
98
98
  left: `${x * 100}%`,
99
99
  top: `${y * 100}%`,
100
- transform: "translate(-50%, -50%)",
101
- touchAction: "none",
100
+ transform: 'translate(-50%, -50%)',
101
+ touchAction: 'none',
102
102
  ...forcedColorAdjustNoneStyle
103
103
  }
104
104
  }
@@ -28,7 +28,7 @@ function $d84c0c836f6e3601$export$e55dd820142d3131(props, state, inputRef) {
28
28
  onChange: undefined,
29
29
  validate: undefined,
30
30
  // Provide a default aria-label if no other label is provided.
31
- "aria-label": props["aria-label"] || (props.label || props["aria-labelledby"] ? undefined : state.colorValue.getChannelName(props.channel, locale))
31
+ 'aria-label': props['aria-label'] || (props.label || props['aria-labelledby'] ? undefined : state.colorValue.getChannelName(props.channel, locale))
32
32
  }, state, inputRef);
33
33
  }
34
34
 
@@ -22,10 +22,10 @@ function $5e632d1ff0188f00$export$e55dd820142d3131(props, state, inputRef) {
22
22
  onChange: undefined,
23
23
  validate: undefined,
24
24
  // Provide a default aria-label if no other label is provided.
25
- "aria-label": props["aria-label"] || (props.label || props["aria-labelledby"] ? undefined : state.colorValue.getChannelName(props.channel, locale))
25
+ 'aria-label': props['aria-label'] || (props.label || props['aria-labelledby'] ? undefined : state.colorValue.getChannelName(props.channel, locale))
26
26
  }, state, inputRef);
27
27
  }
28
28
 
29
29
 
30
30
  export {$5e632d1ff0188f00$export$e55dd820142d3131 as useColorChannelField};
31
- //# sourceMappingURL=useColorChannelField.mjs.map
31
+ //# sourceMappingURL=useColorChannelField.module.js.map
@@ -22,7 +22,7 @@ function $5e632d1ff0188f00$export$e55dd820142d3131(props, state, inputRef) {
22
22
  onChange: undefined,
23
23
  validate: undefined,
24
24
  // Provide a default aria-label if no other label is provided.
25
- "aria-label": props["aria-label"] || (props.label || props["aria-labelledby"] ? undefined : state.colorValue.getChannelName(props.channel, locale))
25
+ 'aria-label': props['aria-label'] || (props.label || props['aria-labelledby'] ? undefined : state.colorValue.getChannelName(props.channel, locale))
26
26
  }, state, inputRef);
27
27
  }
28
28
 
@@ -28,7 +28,7 @@ $parcel$export(module.exports, "useColorField", () => $58c850037bc7a7ce$export$7
28
28
 
29
29
 
30
30
  function $58c850037bc7a7ce$export$77e32ca575a28fdf(props, state, ref) {
31
- let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isWheelDisabled: isWheelDisabled, validationBehavior: validationBehavior = "aria" } = props;
31
+ let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isWheelDisabled: isWheelDisabled, validationBehavior: validationBehavior = 'aria' } = props;
32
32
  let { colorValue: colorValue, inputValue: inputValue, increment: increment, decrement: decrement, incrementToMax: incrementToMax, decrementToMin: decrementToMin, commit: commit } = state;
33
33
  let inputId = (0, $grujV$reactariautils.useId)();
34
34
  let { spinButtonProps: spinButtonProps } = (0, $grujV$reactariaspinbutton.useSpinButton)({
@@ -42,7 +42,7 @@ function $58c850037bc7a7ce$export$77e32ca575a28fdf(props, state, ref) {
42
42
  onDecrement: decrement,
43
43
  onDecrementToMin: decrementToMin,
44
44
  value: colorValue ? colorValue.toHexInt() : undefined,
45
- textValue: colorValue ? colorValue.toString("hex") : undefined
45
+ textValue: colorValue ? colorValue.toString('hex') : undefined
46
46
  });
47
47
  let [focusWithin, setFocusWithin] = (0, $grujV$react.useState)(false);
48
48
  let { focusWithinProps: focusWithinProps } = (0, $grujV$reactariainteractions.useFocusWithin)({
@@ -73,21 +73,21 @@ function $58c850037bc7a7ce$export$77e32ca575a28fdf(props, state, ref) {
73
73
  defaultValue: undefined,
74
74
  validate: undefined,
75
75
  [(0, $grujV$reactstatelyform.privateValidationStateProp)]: state,
76
- type: "text",
77
- autoComplete: "off",
76
+ type: 'text',
77
+ autoComplete: 'off',
78
78
  onChange: onChange
79
79
  }, state, ref);
80
80
  inputProps = (0, $grujV$reactariautils.mergeProps)(inputProps, spinButtonProps, focusWithinProps, {
81
- role: "textbox",
82
- "aria-valuemax": null,
83
- "aria-valuemin": null,
84
- "aria-valuenow": null,
85
- "aria-valuetext": null,
86
- autoCorrect: "off",
87
- spellCheck: "false",
81
+ role: 'textbox',
82
+ 'aria-valuemax': null,
83
+ 'aria-valuemin': null,
84
+ 'aria-valuenow': null,
85
+ 'aria-valuetext': null,
86
+ autoCorrect: 'off',
87
+ spellCheck: 'false',
88
88
  onBlur: commit
89
89
  });
90
- if (validationBehavior === "native") inputProps["aria-required"] = undefined;
90
+ if (validationBehavior === 'native') inputProps['aria-required'] = undefined;
91
91
  return {
92
92
  inputProps: inputProps,
93
93
  ...otherProps
@@ -22,7 +22,7 @@ import {useSpinButton as $f8mV7$useSpinButton} from "@react-aria/spinbutton";
22
22
 
23
23
 
24
24
  function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
25
- let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isWheelDisabled: isWheelDisabled, validationBehavior: validationBehavior = "aria" } = props;
25
+ let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isWheelDisabled: isWheelDisabled, validationBehavior: validationBehavior = 'aria' } = props;
26
26
  let { colorValue: colorValue, inputValue: inputValue, increment: increment, decrement: decrement, incrementToMax: incrementToMax, decrementToMin: decrementToMin, commit: commit } = state;
27
27
  let inputId = (0, $f8mV7$useId)();
28
28
  let { spinButtonProps: spinButtonProps } = (0, $f8mV7$useSpinButton)({
@@ -36,7 +36,7 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
36
36
  onDecrement: decrement,
37
37
  onDecrementToMin: decrementToMin,
38
38
  value: colorValue ? colorValue.toHexInt() : undefined,
39
- textValue: colorValue ? colorValue.toString("hex") : undefined
39
+ textValue: colorValue ? colorValue.toString('hex') : undefined
40
40
  });
41
41
  let [focusWithin, setFocusWithin] = (0, $f8mV7$useState)(false);
42
42
  let { focusWithinProps: focusWithinProps } = (0, $f8mV7$useFocusWithin)({
@@ -67,21 +67,21 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
67
67
  defaultValue: undefined,
68
68
  validate: undefined,
69
69
  [(0, $f8mV7$privateValidationStateProp)]: state,
70
- type: "text",
71
- autoComplete: "off",
70
+ type: 'text',
71
+ autoComplete: 'off',
72
72
  onChange: onChange
73
73
  }, state, ref);
74
74
  inputProps = (0, $f8mV7$mergeProps)(inputProps, spinButtonProps, focusWithinProps, {
75
- role: "textbox",
76
- "aria-valuemax": null,
77
- "aria-valuemin": null,
78
- "aria-valuenow": null,
79
- "aria-valuetext": null,
80
- autoCorrect: "off",
81
- spellCheck: "false",
75
+ role: 'textbox',
76
+ 'aria-valuemax': null,
77
+ 'aria-valuemin': null,
78
+ 'aria-valuenow': null,
79
+ 'aria-valuetext': null,
80
+ autoCorrect: 'off',
81
+ spellCheck: 'false',
82
82
  onBlur: commit
83
83
  });
84
- if (validationBehavior === "native") inputProps["aria-required"] = undefined;
84
+ if (validationBehavior === 'native') inputProps['aria-required'] = undefined;
85
85
  return {
86
86
  inputProps: inputProps,
87
87
  ...otherProps
@@ -90,4 +90,4 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
90
90
 
91
91
 
92
92
  export {$f6896b05b2ecad12$export$77e32ca575a28fdf as useColorField};
93
- //# sourceMappingURL=useColorField.mjs.map
93
+ //# sourceMappingURL=useColorField.module.js.map
@@ -22,7 +22,7 @@ import {useSpinButton as $f8mV7$useSpinButton} from "@react-aria/spinbutton";
22
22
 
23
23
 
24
24
  function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
25
- let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isWheelDisabled: isWheelDisabled, validationBehavior: validationBehavior = "aria" } = props;
25
+ let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isWheelDisabled: isWheelDisabled, validationBehavior: validationBehavior = 'aria' } = props;
26
26
  let { colorValue: colorValue, inputValue: inputValue, increment: increment, decrement: decrement, incrementToMax: incrementToMax, decrementToMin: decrementToMin, commit: commit } = state;
27
27
  let inputId = (0, $f8mV7$useId)();
28
28
  let { spinButtonProps: spinButtonProps } = (0, $f8mV7$useSpinButton)({
@@ -36,7 +36,7 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
36
36
  onDecrement: decrement,
37
37
  onDecrementToMin: decrementToMin,
38
38
  value: colorValue ? colorValue.toHexInt() : undefined,
39
- textValue: colorValue ? colorValue.toString("hex") : undefined
39
+ textValue: colorValue ? colorValue.toString('hex') : undefined
40
40
  });
41
41
  let [focusWithin, setFocusWithin] = (0, $f8mV7$useState)(false);
42
42
  let { focusWithinProps: focusWithinProps } = (0, $f8mV7$useFocusWithin)({
@@ -67,21 +67,21 @@ function $f6896b05b2ecad12$export$77e32ca575a28fdf(props, state, ref) {
67
67
  defaultValue: undefined,
68
68
  validate: undefined,
69
69
  [(0, $f8mV7$privateValidationStateProp)]: state,
70
- type: "text",
71
- autoComplete: "off",
70
+ type: 'text',
71
+ autoComplete: 'off',
72
72
  onChange: onChange
73
73
  }, state, ref);
74
74
  inputProps = (0, $f8mV7$mergeProps)(inputProps, spinButtonProps, focusWithinProps, {
75
- role: "textbox",
76
- "aria-valuemax": null,
77
- "aria-valuemin": null,
78
- "aria-valuenow": null,
79
- "aria-valuetext": null,
80
- autoCorrect: "off",
81
- spellCheck: "false",
75
+ role: 'textbox',
76
+ 'aria-valuemax': null,
77
+ 'aria-valuemin': null,
78
+ 'aria-valuenow': null,
79
+ 'aria-valuetext': null,
80
+ autoCorrect: 'off',
81
+ spellCheck: 'false',
82
82
  onBlur: commit
83
83
  });
84
- if (validationBehavior === "native") inputProps["aria-required"] = undefined;
84
+ if (validationBehavior === 'native') inputProps['aria-required'] = undefined;
85
85
  return {
86
86
  inputProps: inputProps,
87
87
  ...otherProps
@@ -24,14 +24,14 @@ $parcel$export(module.exports, "useColorSlider", () => $afbb9647440a7f5b$export$
24
24
 
25
25
 
26
26
  function $afbb9647440a7f5b$export$106b7a4e66508f66(props, state) {
27
- let { trackRef: trackRef, inputRef: inputRef, orientation: orientation, channel: channel, "aria-label": ariaLabel, name: name } = props;
27
+ let { trackRef: trackRef, inputRef: inputRef, orientation: orientation, channel: channel, 'aria-label': ariaLabel, name: name } = props;
28
28
  let { locale: locale, direction: direction } = (0, $edxco$reactariai18n.useLocale)();
29
29
  // Provide a default aria-label if there is no other label provided.
30
- if (!props.label && !ariaLabel && !props["aria-labelledby"]) ariaLabel = state.value.getChannelName(channel, locale);
30
+ if (!props.label && !ariaLabel && !props['aria-labelledby']) ariaLabel = state.value.getChannelName(channel, locale);
31
31
  // @ts-ignore - ignore unused incompatible props
32
32
  let { groupProps: groupProps, trackProps: trackProps, labelProps: labelProps, outputProps: outputProps } = (0, $edxco$reactariaslider.useSlider)({
33
33
  ...props,
34
- "aria-label": ariaLabel
34
+ 'aria-label': ariaLabel
35
35
  }, state, trackRef);
36
36
  let { inputProps: inputProps, thumbProps: thumbProps } = (0, $edxco$reactariaslider.useSliderThumb)({
37
37
  index: 0,
@@ -44,11 +44,11 @@ function $afbb9647440a7f5b$export$106b7a4e66508f66(props, state) {
44
44
  let value = state.getDisplayColor();
45
45
  let generateBackground = ()=>{
46
46
  let to;
47
- if (orientation === "vertical") to = "top";
48
- else if (direction === "ltr") to = "right";
49
- else to = "left";
47
+ if (orientation === 'vertical') to = 'top';
48
+ else if (direction === 'ltr') to = 'right';
49
+ else to = 'left';
50
50
  switch(channel){
51
- case "hue":
51
+ case 'hue':
52
52
  {
53
53
  let stops = [
54
54
  0,
@@ -58,46 +58,46 @@ function $afbb9647440a7f5b$export$106b7a4e66508f66(props, state) {
58
58
  240,
59
59
  300,
60
60
  360
61
- ].map((hue)=>value.withChannelValue("hue", hue).toString("css")).join(", ");
61
+ ].map((hue)=>value.withChannelValue('hue', hue).toString('css')).join(', ');
62
62
  return `linear-gradient(to ${to}, ${stops})`;
63
63
  }
64
- case "lightness":
64
+ case 'lightness':
65
65
  {
66
66
  // We have to add an extra color stop in the middle so that the hue shows up at all.
67
67
  // Otherwise it will always just be black to white.
68
68
  let min = state.getThumbMinValue(0);
69
69
  let max = state.getThumbMaxValue(0);
70
- let start = value.withChannelValue(channel, min).toString("css");
71
- let middle = value.withChannelValue(channel, (max - min) / 2).toString("css");
72
- let end = value.withChannelValue(channel, max).toString("css");
70
+ let start = value.withChannelValue(channel, min).toString('css');
71
+ let middle = value.withChannelValue(channel, (max - min) / 2).toString('css');
72
+ let end = value.withChannelValue(channel, max).toString('css');
73
73
  return `linear-gradient(to ${to}, ${start}, ${middle}, ${end})`;
74
74
  }
75
- case "saturation":
76
- case "brightness":
77
- case "red":
78
- case "green":
79
- case "blue":
80
- case "alpha":
75
+ case 'saturation':
76
+ case 'brightness':
77
+ case 'red':
78
+ case 'green':
79
+ case 'blue':
80
+ case 'alpha':
81
81
  {
82
- let start = value.withChannelValue(channel, state.getThumbMinValue(0)).toString("css");
83
- let end = value.withChannelValue(channel, state.getThumbMaxValue(0)).toString("css");
82
+ let start = value.withChannelValue(channel, state.getThumbMinValue(0)).toString('css');
83
+ let end = value.withChannelValue(channel, state.getThumbMaxValue(0)).toString('css');
84
84
  return `linear-gradient(to ${to}, ${start}, ${end})`;
85
85
  }
86
86
  default:
87
- throw new Error("Unknown color channel: " + channel);
87
+ throw new Error('Unknown color channel: ' + channel);
88
88
  }
89
89
  };
90
90
  let forcedColorAdjustNoneStyle = {
91
- forcedColorAdjust: "none"
91
+ forcedColorAdjust: 'none'
92
92
  };
93
- if (channel === "hue") inputProps["aria-valuetext"] += `, ${value.getHueName(locale)}`;
94
- else if (channel !== "alpha") inputProps["aria-valuetext"] += `, ${value.getColorName(locale)}`;
93
+ if (channel === 'hue') inputProps['aria-valuetext'] += `, ${value.getHueName(locale)}`;
94
+ else if (channel !== 'alpha') inputProps['aria-valuetext'] += `, ${value.getColorName(locale)}`;
95
95
  let { visuallyHiddenProps: visuallyHiddenProps } = (0, $edxco$reactariavisuallyhidden.useVisuallyHidden)({
96
96
  style: {
97
- opacity: "0.0001",
98
- width: "100%",
99
- height: "100%",
100
- pointerEvents: "none"
97
+ opacity: '0.0001',
98
+ width: '100%',
99
+ height: '100%',
100
+ pointerEvents: 'none'
101
101
  }
102
102
  });
103
103
  return {
@@ -18,14 +18,14 @@ import {useVisuallyHidden as $6WsjB$useVisuallyHidden} from "@react-aria/visuall
18
18
 
19
19
 
20
20
  function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
21
- let { trackRef: trackRef, inputRef: inputRef, orientation: orientation, channel: channel, "aria-label": ariaLabel, name: name } = props;
21
+ let { trackRef: trackRef, inputRef: inputRef, orientation: orientation, channel: channel, 'aria-label': ariaLabel, name: name } = props;
22
22
  let { locale: locale, direction: direction } = (0, $6WsjB$useLocale)();
23
23
  // Provide a default aria-label if there is no other label provided.
24
- if (!props.label && !ariaLabel && !props["aria-labelledby"]) ariaLabel = state.value.getChannelName(channel, locale);
24
+ if (!props.label && !ariaLabel && !props['aria-labelledby']) ariaLabel = state.value.getChannelName(channel, locale);
25
25
  // @ts-ignore - ignore unused incompatible props
26
26
  let { groupProps: groupProps, trackProps: trackProps, labelProps: labelProps, outputProps: outputProps } = (0, $6WsjB$useSlider)({
27
27
  ...props,
28
- "aria-label": ariaLabel
28
+ 'aria-label': ariaLabel
29
29
  }, state, trackRef);
30
30
  let { inputProps: inputProps, thumbProps: thumbProps } = (0, $6WsjB$useSliderThumb)({
31
31
  index: 0,
@@ -38,11 +38,11 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
38
38
  let value = state.getDisplayColor();
39
39
  let generateBackground = ()=>{
40
40
  let to;
41
- if (orientation === "vertical") to = "top";
42
- else if (direction === "ltr") to = "right";
43
- else to = "left";
41
+ if (orientation === 'vertical') to = 'top';
42
+ else if (direction === 'ltr') to = 'right';
43
+ else to = 'left';
44
44
  switch(channel){
45
- case "hue":
45
+ case 'hue':
46
46
  {
47
47
  let stops = [
48
48
  0,
@@ -52,46 +52,46 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
52
52
  240,
53
53
  300,
54
54
  360
55
- ].map((hue)=>value.withChannelValue("hue", hue).toString("css")).join(", ");
55
+ ].map((hue)=>value.withChannelValue('hue', hue).toString('css')).join(', ');
56
56
  return `linear-gradient(to ${to}, ${stops})`;
57
57
  }
58
- case "lightness":
58
+ case 'lightness':
59
59
  {
60
60
  // We have to add an extra color stop in the middle so that the hue shows up at all.
61
61
  // Otherwise it will always just be black to white.
62
62
  let min = state.getThumbMinValue(0);
63
63
  let max = state.getThumbMaxValue(0);
64
- let start = value.withChannelValue(channel, min).toString("css");
65
- let middle = value.withChannelValue(channel, (max - min) / 2).toString("css");
66
- let end = value.withChannelValue(channel, max).toString("css");
64
+ let start = value.withChannelValue(channel, min).toString('css');
65
+ let middle = value.withChannelValue(channel, (max - min) / 2).toString('css');
66
+ let end = value.withChannelValue(channel, max).toString('css');
67
67
  return `linear-gradient(to ${to}, ${start}, ${middle}, ${end})`;
68
68
  }
69
- case "saturation":
70
- case "brightness":
71
- case "red":
72
- case "green":
73
- case "blue":
74
- case "alpha":
69
+ case 'saturation':
70
+ case 'brightness':
71
+ case 'red':
72
+ case 'green':
73
+ case 'blue':
74
+ case 'alpha':
75
75
  {
76
- let start = value.withChannelValue(channel, state.getThumbMinValue(0)).toString("css");
77
- let end = value.withChannelValue(channel, state.getThumbMaxValue(0)).toString("css");
76
+ let start = value.withChannelValue(channel, state.getThumbMinValue(0)).toString('css');
77
+ let end = value.withChannelValue(channel, state.getThumbMaxValue(0)).toString('css');
78
78
  return `linear-gradient(to ${to}, ${start}, ${end})`;
79
79
  }
80
80
  default:
81
- throw new Error("Unknown color channel: " + channel);
81
+ throw new Error('Unknown color channel: ' + channel);
82
82
  }
83
83
  };
84
84
  let forcedColorAdjustNoneStyle = {
85
- forcedColorAdjust: "none"
85
+ forcedColorAdjust: 'none'
86
86
  };
87
- if (channel === "hue") inputProps["aria-valuetext"] += `, ${value.getHueName(locale)}`;
88
- else if (channel !== "alpha") inputProps["aria-valuetext"] += `, ${value.getColorName(locale)}`;
87
+ if (channel === 'hue') inputProps['aria-valuetext'] += `, ${value.getHueName(locale)}`;
88
+ else if (channel !== 'alpha') inputProps['aria-valuetext'] += `, ${value.getColorName(locale)}`;
89
89
  let { visuallyHiddenProps: visuallyHiddenProps } = (0, $6WsjB$useVisuallyHidden)({
90
90
  style: {
91
- opacity: "0.0001",
92
- width: "100%",
93
- height: "100%",
94
- pointerEvents: "none"
91
+ opacity: '0.0001',
92
+ width: '100%',
93
+ height: '100%',
94
+ pointerEvents: 'none'
95
95
  }
96
96
  });
97
97
  return {
@@ -124,4 +124,4 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
124
124
 
125
125
 
126
126
  export {$40af666d6c251e36$export$106b7a4e66508f66 as useColorSlider};
127
- //# sourceMappingURL=useColorSlider.mjs.map
127
+ //# sourceMappingURL=useColorSlider.module.js.map
@@ -18,14 +18,14 @@ import {useVisuallyHidden as $6WsjB$useVisuallyHidden} from "@react-aria/visuall
18
18
 
19
19
 
20
20
  function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
21
- let { trackRef: trackRef, inputRef: inputRef, orientation: orientation, channel: channel, "aria-label": ariaLabel, name: name } = props;
21
+ let { trackRef: trackRef, inputRef: inputRef, orientation: orientation, channel: channel, 'aria-label': ariaLabel, name: name } = props;
22
22
  let { locale: locale, direction: direction } = (0, $6WsjB$useLocale)();
23
23
  // Provide a default aria-label if there is no other label provided.
24
- if (!props.label && !ariaLabel && !props["aria-labelledby"]) ariaLabel = state.value.getChannelName(channel, locale);
24
+ if (!props.label && !ariaLabel && !props['aria-labelledby']) ariaLabel = state.value.getChannelName(channel, locale);
25
25
  // @ts-ignore - ignore unused incompatible props
26
26
  let { groupProps: groupProps, trackProps: trackProps, labelProps: labelProps, outputProps: outputProps } = (0, $6WsjB$useSlider)({
27
27
  ...props,
28
- "aria-label": ariaLabel
28
+ 'aria-label': ariaLabel
29
29
  }, state, trackRef);
30
30
  let { inputProps: inputProps, thumbProps: thumbProps } = (0, $6WsjB$useSliderThumb)({
31
31
  index: 0,
@@ -38,11 +38,11 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
38
38
  let value = state.getDisplayColor();
39
39
  let generateBackground = ()=>{
40
40
  let to;
41
- if (orientation === "vertical") to = "top";
42
- else if (direction === "ltr") to = "right";
43
- else to = "left";
41
+ if (orientation === 'vertical') to = 'top';
42
+ else if (direction === 'ltr') to = 'right';
43
+ else to = 'left';
44
44
  switch(channel){
45
- case "hue":
45
+ case 'hue':
46
46
  {
47
47
  let stops = [
48
48
  0,
@@ -52,46 +52,46 @@ function $40af666d6c251e36$export$106b7a4e66508f66(props, state) {
52
52
  240,
53
53
  300,
54
54
  360
55
- ].map((hue)=>value.withChannelValue("hue", hue).toString("css")).join(", ");
55
+ ].map((hue)=>value.withChannelValue('hue', hue).toString('css')).join(', ');
56
56
  return `linear-gradient(to ${to}, ${stops})`;
57
57
  }
58
- case "lightness":
58
+ case 'lightness':
59
59
  {
60
60
  // We have to add an extra color stop in the middle so that the hue shows up at all.
61
61
  // Otherwise it will always just be black to white.
62
62
  let min = state.getThumbMinValue(0);
63
63
  let max = state.getThumbMaxValue(0);
64
- let start = value.withChannelValue(channel, min).toString("css");
65
- let middle = value.withChannelValue(channel, (max - min) / 2).toString("css");
66
- let end = value.withChannelValue(channel, max).toString("css");
64
+ let start = value.withChannelValue(channel, min).toString('css');
65
+ let middle = value.withChannelValue(channel, (max - min) / 2).toString('css');
66
+ let end = value.withChannelValue(channel, max).toString('css');
67
67
  return `linear-gradient(to ${to}, ${start}, ${middle}, ${end})`;
68
68
  }
69
- case "saturation":
70
- case "brightness":
71
- case "red":
72
- case "green":
73
- case "blue":
74
- case "alpha":
69
+ case 'saturation':
70
+ case 'brightness':
71
+ case 'red':
72
+ case 'green':
73
+ case 'blue':
74
+ case 'alpha':
75
75
  {
76
- let start = value.withChannelValue(channel, state.getThumbMinValue(0)).toString("css");
77
- let end = value.withChannelValue(channel, state.getThumbMaxValue(0)).toString("css");
76
+ let start = value.withChannelValue(channel, state.getThumbMinValue(0)).toString('css');
77
+ let end = value.withChannelValue(channel, state.getThumbMaxValue(0)).toString('css');
78
78
  return `linear-gradient(to ${to}, ${start}, ${end})`;
79
79
  }
80
80
  default:
81
- throw new Error("Unknown color channel: " + channel);
81
+ throw new Error('Unknown color channel: ' + channel);
82
82
  }
83
83
  };
84
84
  let forcedColorAdjustNoneStyle = {
85
- forcedColorAdjust: "none"
85
+ forcedColorAdjust: 'none'
86
86
  };
87
- if (channel === "hue") inputProps["aria-valuetext"] += `, ${value.getHueName(locale)}`;
88
- else if (channel !== "alpha") inputProps["aria-valuetext"] += `, ${value.getColorName(locale)}`;
87
+ if (channel === 'hue') inputProps['aria-valuetext'] += `, ${value.getHueName(locale)}`;
88
+ else if (channel !== 'alpha') inputProps['aria-valuetext'] += `, ${value.getColorName(locale)}`;
89
89
  let { visuallyHiddenProps: visuallyHiddenProps } = (0, $6WsjB$useVisuallyHidden)({
90
90
  style: {
91
- opacity: "0.0001",
92
- width: "100%",
93
- height: "100%",
94
- pointerEvents: "none"
91
+ opacity: '0.0001',
92
+ width: '100%',
93
+ height: '100%',
94
+ pointerEvents: 'none'
95
95
  }
96
96
  });
97
97
  return {