@react-aria/color 3.0.0-nightly.4569 → 3.0.0-nightly.4578

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 (221) hide show
  1. package/dist/ar-AE.main.js +3 -1
  2. package/dist/ar-AE.main.js.map +1 -1
  3. package/dist/ar-AE.mjs +3 -1
  4. package/dist/ar-AE.module.js +3 -1
  5. package/dist/ar-AE.module.js.map +1 -1
  6. package/dist/bg-BG.main.js +3 -1
  7. package/dist/bg-BG.main.js.map +1 -1
  8. package/dist/bg-BG.mjs +3 -1
  9. package/dist/bg-BG.module.js +3 -1
  10. package/dist/bg-BG.module.js.map +1 -1
  11. package/dist/cs-CZ.main.js +3 -1
  12. package/dist/cs-CZ.main.js.map +1 -1
  13. package/dist/cs-CZ.mjs +3 -1
  14. package/dist/cs-CZ.module.js +3 -1
  15. package/dist/cs-CZ.module.js.map +1 -1
  16. package/dist/da-DK.main.js +3 -1
  17. package/dist/da-DK.main.js.map +1 -1
  18. package/dist/da-DK.mjs +3 -1
  19. package/dist/da-DK.module.js +3 -1
  20. package/dist/da-DK.module.js.map +1 -1
  21. package/dist/de-DE.main.js +3 -1
  22. package/dist/de-DE.main.js.map +1 -1
  23. package/dist/de-DE.mjs +3 -1
  24. package/dist/de-DE.module.js +3 -1
  25. package/dist/de-DE.module.js.map +1 -1
  26. package/dist/el-GR.main.js +3 -1
  27. package/dist/el-GR.main.js.map +1 -1
  28. package/dist/el-GR.mjs +3 -1
  29. package/dist/el-GR.module.js +3 -1
  30. package/dist/el-GR.module.js.map +1 -1
  31. package/dist/en-US.main.js +3 -1
  32. package/dist/en-US.main.js.map +1 -1
  33. package/dist/en-US.mjs +3 -1
  34. package/dist/en-US.module.js +3 -1
  35. package/dist/en-US.module.js.map +1 -1
  36. package/dist/es-ES.main.js +3 -1
  37. package/dist/es-ES.main.js.map +1 -1
  38. package/dist/es-ES.mjs +3 -1
  39. package/dist/es-ES.module.js +3 -1
  40. package/dist/es-ES.module.js.map +1 -1
  41. package/dist/et-EE.main.js +3 -1
  42. package/dist/et-EE.main.js.map +1 -1
  43. package/dist/et-EE.mjs +3 -1
  44. package/dist/et-EE.module.js +3 -1
  45. package/dist/et-EE.module.js.map +1 -1
  46. package/dist/fi-FI.main.js +3 -1
  47. package/dist/fi-FI.main.js.map +1 -1
  48. package/dist/fi-FI.mjs +3 -1
  49. package/dist/fi-FI.module.js +3 -1
  50. package/dist/fi-FI.module.js.map +1 -1
  51. package/dist/fr-FR.main.js +3 -1
  52. package/dist/fr-FR.main.js.map +1 -1
  53. package/dist/fr-FR.mjs +3 -1
  54. package/dist/fr-FR.module.js +3 -1
  55. package/dist/fr-FR.module.js.map +1 -1
  56. package/dist/he-IL.main.js +3 -1
  57. package/dist/he-IL.main.js.map +1 -1
  58. package/dist/he-IL.mjs +3 -1
  59. package/dist/he-IL.module.js +3 -1
  60. package/dist/he-IL.module.js.map +1 -1
  61. package/dist/hr-HR.main.js +3 -1
  62. package/dist/hr-HR.main.js.map +1 -1
  63. package/dist/hr-HR.mjs +3 -1
  64. package/dist/hr-HR.module.js +3 -1
  65. package/dist/hr-HR.module.js.map +1 -1
  66. package/dist/hu-HU.main.js +3 -1
  67. package/dist/hu-HU.main.js.map +1 -1
  68. package/dist/hu-HU.mjs +3 -1
  69. package/dist/hu-HU.module.js +3 -1
  70. package/dist/hu-HU.module.js.map +1 -1
  71. package/dist/import.mjs +5 -1
  72. package/dist/it-IT.main.js +3 -1
  73. package/dist/it-IT.main.js.map +1 -1
  74. package/dist/it-IT.mjs +3 -1
  75. package/dist/it-IT.module.js +3 -1
  76. package/dist/it-IT.module.js.map +1 -1
  77. package/dist/ja-JP.main.js +3 -1
  78. package/dist/ja-JP.main.js.map +1 -1
  79. package/dist/ja-JP.mjs +3 -1
  80. package/dist/ja-JP.module.js +3 -1
  81. package/dist/ja-JP.module.js.map +1 -1
  82. package/dist/ko-KR.main.js +3 -1
  83. package/dist/ko-KR.main.js.map +1 -1
  84. package/dist/ko-KR.mjs +3 -1
  85. package/dist/ko-KR.module.js +3 -1
  86. package/dist/ko-KR.module.js.map +1 -1
  87. package/dist/lt-LT.main.js +3 -1
  88. package/dist/lt-LT.main.js.map +1 -1
  89. package/dist/lt-LT.mjs +3 -1
  90. package/dist/lt-LT.module.js +3 -1
  91. package/dist/lt-LT.module.js.map +1 -1
  92. package/dist/lv-LV.main.js +3 -1
  93. package/dist/lv-LV.main.js.map +1 -1
  94. package/dist/lv-LV.mjs +3 -1
  95. package/dist/lv-LV.module.js +3 -1
  96. package/dist/lv-LV.module.js.map +1 -1
  97. package/dist/main.js +6 -0
  98. package/dist/main.js.map +1 -1
  99. package/dist/module.js +5 -1
  100. package/dist/module.js.map +1 -1
  101. package/dist/nb-NO.main.js +3 -1
  102. package/dist/nb-NO.main.js.map +1 -1
  103. package/dist/nb-NO.mjs +3 -1
  104. package/dist/nb-NO.module.js +3 -1
  105. package/dist/nb-NO.module.js.map +1 -1
  106. package/dist/nl-NL.main.js +3 -1
  107. package/dist/nl-NL.main.js.map +1 -1
  108. package/dist/nl-NL.mjs +3 -1
  109. package/dist/nl-NL.module.js +3 -1
  110. package/dist/nl-NL.module.js.map +1 -1
  111. package/dist/pl-PL.main.js +3 -1
  112. package/dist/pl-PL.main.js.map +1 -1
  113. package/dist/pl-PL.mjs +3 -1
  114. package/dist/pl-PL.module.js +3 -1
  115. package/dist/pl-PL.module.js.map +1 -1
  116. package/dist/pt-BR.main.js +3 -1
  117. package/dist/pt-BR.main.js.map +1 -1
  118. package/dist/pt-BR.mjs +3 -1
  119. package/dist/pt-BR.module.js +3 -1
  120. package/dist/pt-BR.module.js.map +1 -1
  121. package/dist/pt-PT.main.js +3 -1
  122. package/dist/pt-PT.main.js.map +1 -1
  123. package/dist/pt-PT.mjs +3 -1
  124. package/dist/pt-PT.module.js +3 -1
  125. package/dist/pt-PT.module.js.map +1 -1
  126. package/dist/ro-RO.main.js +3 -1
  127. package/dist/ro-RO.main.js.map +1 -1
  128. package/dist/ro-RO.mjs +3 -1
  129. package/dist/ro-RO.module.js +3 -1
  130. package/dist/ro-RO.module.js.map +1 -1
  131. package/dist/ru-RU.main.js +3 -1
  132. package/dist/ru-RU.main.js.map +1 -1
  133. package/dist/ru-RU.mjs +3 -1
  134. package/dist/ru-RU.module.js +3 -1
  135. package/dist/ru-RU.module.js.map +1 -1
  136. package/dist/sk-SK.main.js +3 -1
  137. package/dist/sk-SK.main.js.map +1 -1
  138. package/dist/sk-SK.mjs +3 -1
  139. package/dist/sk-SK.module.js +3 -1
  140. package/dist/sk-SK.module.js.map +1 -1
  141. package/dist/sl-SI.main.js +3 -1
  142. package/dist/sl-SI.main.js.map +1 -1
  143. package/dist/sl-SI.mjs +3 -1
  144. package/dist/sl-SI.module.js +3 -1
  145. package/dist/sl-SI.module.js.map +1 -1
  146. package/dist/sr-SP.main.js +3 -1
  147. package/dist/sr-SP.main.js.map +1 -1
  148. package/dist/sr-SP.mjs +3 -1
  149. package/dist/sr-SP.module.js +3 -1
  150. package/dist/sr-SP.module.js.map +1 -1
  151. package/dist/sv-SE.main.js +3 -1
  152. package/dist/sv-SE.main.js.map +1 -1
  153. package/dist/sv-SE.mjs +3 -1
  154. package/dist/sv-SE.module.js +3 -1
  155. package/dist/sv-SE.module.js.map +1 -1
  156. package/dist/tr-TR.main.js +3 -1
  157. package/dist/tr-TR.main.js.map +1 -1
  158. package/dist/tr-TR.mjs +3 -1
  159. package/dist/tr-TR.module.js +3 -1
  160. package/dist/tr-TR.module.js.map +1 -1
  161. package/dist/types.d.ts +41 -7
  162. package/dist/types.d.ts.map +1 -1
  163. package/dist/uk-UA.main.js +3 -1
  164. package/dist/uk-UA.main.js.map +1 -1
  165. package/dist/uk-UA.mjs +3 -1
  166. package/dist/uk-UA.module.js +3 -1
  167. package/dist/uk-UA.module.js.map +1 -1
  168. package/dist/useColorArea.main.js +7 -7
  169. package/dist/useColorArea.main.js.map +1 -1
  170. package/dist/useColorArea.mjs +7 -7
  171. package/dist/useColorArea.module.js +7 -7
  172. package/dist/useColorArea.module.js.map +1 -1
  173. package/dist/useColorAreaGradient.main.js +65 -171
  174. package/dist/useColorAreaGradient.main.js.map +1 -1
  175. package/dist/useColorAreaGradient.mjs +65 -171
  176. package/dist/useColorAreaGradient.module.js +65 -171
  177. package/dist/useColorAreaGradient.module.js.map +1 -1
  178. package/dist/useColorChannelField.main.js +36 -0
  179. package/dist/useColorChannelField.main.js.map +1 -0
  180. package/dist/useColorChannelField.mjs +31 -0
  181. package/dist/useColorChannelField.module.js +31 -0
  182. package/dist/useColorChannelField.module.js.map +1 -0
  183. package/dist/useColorField.main.js +3 -2
  184. package/dist/useColorField.main.js.map +1 -1
  185. package/dist/useColorField.mjs +3 -2
  186. package/dist/useColorField.module.js +3 -2
  187. package/dist/useColorField.module.js.map +1 -1
  188. package/dist/useColorSlider.main.js +29 -2
  189. package/dist/useColorSlider.main.js.map +1 -1
  190. package/dist/useColorSlider.mjs +29 -2
  191. package/dist/useColorSlider.module.js +29 -2
  192. package/dist/useColorSlider.module.js.map +1 -1
  193. package/dist/useColorSwatch.main.js +67 -0
  194. package/dist/useColorSwatch.main.js.map +1 -0
  195. package/dist/useColorSwatch.mjs +62 -0
  196. package/dist/useColorSwatch.module.js +62 -0
  197. package/dist/useColorSwatch.module.js.map +1 -0
  198. package/dist/useColorWheel.main.js +18 -4
  199. package/dist/useColorWheel.main.js.map +1 -1
  200. package/dist/useColorWheel.mjs +18 -4
  201. package/dist/useColorWheel.module.js +18 -4
  202. package/dist/useColorWheel.module.js.map +1 -1
  203. package/dist/zh-CN.main.js +3 -1
  204. package/dist/zh-CN.main.js.map +1 -1
  205. package/dist/zh-CN.mjs +3 -1
  206. package/dist/zh-CN.module.js +3 -1
  207. package/dist/zh-CN.module.js.map +1 -1
  208. package/dist/zh-TW.main.js +3 -1
  209. package/dist/zh-TW.main.js.map +1 -1
  210. package/dist/zh-TW.mjs +3 -1
  211. package/dist/zh-TW.module.js +3 -1
  212. package/dist/zh-TW.module.js.map +1 -1
  213. package/package.json +14 -13
  214. package/src/index.ts +4 -0
  215. package/src/useColorArea.ts +6 -9
  216. package/src/useColorAreaGradient.ts +66 -189
  217. package/src/useColorChannelField.ts +37 -0
  218. package/src/useColorField.ts +18 -14
  219. package/src/useColorSlider.ts +21 -3
  220. package/src/useColorSwatch.ts +74 -0
  221. package/src/useColorWheel.ts +18 -4
@@ -1,4 +1,5 @@
1
1
  var $9t8qo$react = require("react");
2
+ var $9t8qo$reactstatelycolor = require("@react-stately/color");
2
3
 
3
4
 
4
5
  function $parcel$export(e, n, v, s) {
@@ -17,171 +18,71 @@ $parcel$export(module.exports, "useColorAreaGradient", () => $99936ad0bf67c8c4$e
17
18
  * OF ANY KIND, either express or implied. See the License for the specific language
18
19
  * governing permissions and limitations under the License.
19
20
  */
20
- const $99936ad0bf67c8c4$var$generateRGB_R = (orientation, dir, zValue)=>{
21
- let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
22
- let result = {
23
- colorAreaStyles: {
24
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,0),rgb(${zValue},255,0))`
25
- },
26
- gradientStyles: {
27
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,255),rgb(${zValue},255,255))`,
28
- "WebkitMaskImage": maskImage,
29
- maskImage: maskImage
30
- }
31
- };
32
- return result;
33
- };
34
- const $99936ad0bf67c8c4$var$generateRGB_G = (orientation, dir, zValue)=>{
35
- let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
36
- let result = {
37
- colorAreaStyles: {
38
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},0),rgb(255,${zValue},0))`
39
- },
40
- gradientStyles: {
41
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},255),rgb(255,${zValue},255))`,
42
- "WebkitMaskImage": maskImage,
43
- maskImage: maskImage
44
- }
45
- };
46
- return result;
47
- };
48
- const $99936ad0bf67c8c4$var$generateRGB_B = (orientation, dir, zValue)=>{
49
- let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
50
- let result = {
51
- colorAreaStyles: {
52
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,0,${zValue}),rgb(255,0,${zValue}))`
53
- },
54
- gradientStyles: {
55
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,255,${zValue}),rgb(255,255,${zValue}))`,
56
- "WebkitMaskImage": maskImage,
57
- maskImage: maskImage
58
- }
59
- };
60
- return result;
61
- };
62
- const $99936ad0bf67c8c4$var$generateHSL_H = (orientation, dir, zValue)=>{
63
- let result = {
64
- colorAreaStyles: {},
65
- gradientStyles: {
66
- background: [
67
- `linear-gradient(to ${orientation[Number(dir)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,
68
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,
69
- `hsl(${zValue}, 100%, 50%)`
70
- ].join(",")
71
- }
72
- };
73
- return result;
74
- };
75
- const $99936ad0bf67c8c4$var$generateHSL_S = (orientation, dir, alphaValue)=>{
76
- let result = {
77
- colorAreaStyles: {},
78
- gradientStyles: {
79
- background: [
80
- `linear-gradient(to ${orientation[Number(!dir)]}, hsla(0,0%,0%,${alphaValue}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${alphaValue}) 100%)`,
81
- `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
82
- "hsl(0, 0%, 50%)"
83
- ].join(",")
84
- }
85
- };
86
- return result;
87
- };
88
- const $99936ad0bf67c8c4$var$generateHSL_L = (orientation, dir, zValue)=>{
89
- let result = {
90
- colorAreaStyles: {},
91
- gradientStyles: {
92
- backgroundImage: [
93
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,${zValue}%),hsla(0,0%,${zValue}%,0))`,
94
- `linear-gradient(to ${orientation[Number(dir)]},hsl(0,100%,${zValue}%),hsl(60,100%,${zValue}%),hsl(120,100%,${zValue}%),hsl(180,100%,${zValue}%),hsl(240,100%,${zValue}%),hsl(300,100%,${zValue}%),hsl(360,100%,${zValue}%))`
95
- ].join(",")
96
- }
97
- };
98
- return result;
99
- };
100
- const $99936ad0bf67c8c4$var$generateHSB_H = (orientation, dir, zValue)=>{
101
- let result = {
102
- colorAreaStyles: {},
103
- gradientStyles: {
104
- background: [
105
- `linear-gradient(to ${orientation[Number(dir)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,
106
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,
107
- `hsl(${zValue}, 100%, 50%)`
108
- ].join(",")
109
- }
110
- };
111
- return result;
112
- };
113
- const $99936ad0bf67c8c4$var$generateHSB_S = (orientation, dir, alphaValue)=>{
114
- let result = {
115
- colorAreaStyles: {},
116
- gradientStyles: {
117
- background: [
118
- `linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,0%,${alphaValue}),hsla(0,0%,0%,0))`,
119
- `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
120
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,0%),hsl(0,0%,100%))`
121
- ].join(",")
122
- }
123
- };
124
- return result;
21
+
22
+ const $99936ad0bf67c8c4$var$hue = (color)=>[
23
+ 0,
24
+ 60,
25
+ 120,
26
+ 180,
27
+ 240,
28
+ 300,
29
+ 360
30
+ ].map((hue)=>color.withChannelValue("hue", hue).toString("css")).join(", ");
31
+ const $99936ad0bf67c8c4$var$saturation = (color)=>`${color.withChannelValue("saturation", 0)}, transparent`;
32
+ const $99936ad0bf67c8c4$var$hslChannels = {
33
+ hue: $99936ad0bf67c8c4$var$hue,
34
+ saturation: $99936ad0bf67c8c4$var$saturation,
35
+ lightness: ()=>"black, transparent, white"
125
36
  };
126
- const $99936ad0bf67c8c4$var$generateHSB_B = (orientation, dir, alphaValue)=>{
127
- let result = {
128
- colorAreaStyles: {},
129
- gradientStyles: {
130
- background: [
131
- `linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,100%,${alphaValue}),hsla(0,0%,100%,0))`,
132
- `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
133
- "#000"
134
- ].join(",")
135
- }
136
- };
137
- return result;
37
+ const $99936ad0bf67c8c4$var$hsbChannels = {
38
+ hue: $99936ad0bf67c8c4$var$hue,
39
+ saturation: $99936ad0bf67c8c4$var$saturation,
40
+ brightness: ()=>"black, transparent"
138
41
  };
139
- function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction, state: state, zChannel: zChannel, xChannel: xChannel, isDisabled: isDisabled }) {
42
+ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction, state: state, zChannel: zChannel, xChannel: xChannel, yChannel: yChannel }) {
140
43
  let returnVal = (0, $9t8qo$react.useMemo)(()=>{
141
- let orientation = [
142
- "top",
143
- direction === "rtl" ? "left" : "right"
144
- ];
145
- let dir = false;
146
- let background = {
147
- colorAreaStyles: {},
148
- gradientStyles: {}
149
- };
44
+ let end = direction === "rtl" ? "left" : "right";
45
+ let colorAreaStyles = {};
150
46
  let zValue = state.value.getChannelValue(zChannel);
151
- let { minValue: zMin, maxValue: zMax } = state.value.getChannelRange(zChannel);
152
- let alphaValue = (zValue - zMin) / (zMax - zMin);
153
- let isHSL = state.value.getColorSpace() === "hsl";
154
- if (!isDisabled) switch(zChannel){
155
- case "red":
156
- dir = xChannel === "green";
157
- background = $99936ad0bf67c8c4$var$generateRGB_R(orientation, dir, zValue);
158
- break;
159
- case "green":
160
- dir = xChannel === "red";
161
- background = $99936ad0bf67c8c4$var$generateRGB_G(orientation, dir, zValue);
162
- break;
163
- case "blue":
164
- dir = xChannel === "red";
165
- background = $99936ad0bf67c8c4$var$generateRGB_B(orientation, dir, zValue);
166
- break;
167
- case "hue":
168
- dir = xChannel !== "saturation";
169
- if (isHSL) background = $99936ad0bf67c8c4$var$generateHSL_H(orientation, dir, zValue);
170
- else background = $99936ad0bf67c8c4$var$generateHSB_H(orientation, dir, zValue);
171
- break;
172
- case "saturation":
173
- dir = xChannel === "hue";
174
- if (isHSL) background = $99936ad0bf67c8c4$var$generateHSL_S(orientation, dir, alphaValue);
175
- else background = $99936ad0bf67c8c4$var$generateHSB_S(orientation, dir, alphaValue);
176
- break;
177
- case "brightness":
178
- dir = xChannel === "hue";
179
- background = $99936ad0bf67c8c4$var$generateHSB_B(orientation, dir, alphaValue);
180
- break;
181
- case "lightness":
182
- dir = xChannel === "hue";
183
- background = $99936ad0bf67c8c4$var$generateHSL_L(orientation, dir, zValue);
184
- break;
47
+ switch(state.value.getColorSpace()){
48
+ case "rgb":
49
+ {
50
+ let rgb = (0, $9t8qo$reactstatelycolor.parseColor)("rgb(0, 0, 0)");
51
+ colorAreaStyles = {
52
+ background: [
53
+ // The screen blend mode multiplies the inverse of each channel, e.g. 1 - (1 - a) * (1 - b).
54
+ // Create a layer for each channel, with the other channels as 0. After blending, this should
55
+ // result in the gradients being combined channel by channel.
56
+ `linear-gradient(to ${end}, ${rgb.withChannelValue(xChannel, 0)}, ${rgb.withChannelValue(xChannel, 255)})`,
57
+ `linear-gradient(to top, ${rgb.withChannelValue(yChannel, 0)}, ${rgb.withChannelValue(yChannel, 255)})`,
58
+ rgb.withChannelValue(zChannel, zValue)
59
+ ].join(","),
60
+ backgroundBlendMode: "screen"
61
+ };
62
+ break;
63
+ }
64
+ case "hsl":
65
+ {
66
+ let channels = state.value.getColorChannels();
67
+ let value = (0, $9t8qo$reactstatelycolor.parseColor)("hsl(0, 100%, 50%)").withChannelValue(zChannel, zValue);
68
+ let bg = channels.filter((c)=>c !== zChannel).map((c)=>`linear-gradient(to ${c === xChannel ? end : "top"}, ${$99936ad0bf67c8c4$var$hslChannels[c](value)})`).reverse();
69
+ if (zChannel === "hue") bg.push(value.toString("css"));
70
+ colorAreaStyles = {
71
+ background: bg.join(", ")
72
+ };
73
+ break;
74
+ }
75
+ case "hsb":
76
+ {
77
+ let channels = state.value.getColorChannels();
78
+ let value = (0, $9t8qo$reactstatelycolor.parseColor)("hsb(0, 100%, 100%)").withChannelValue(zChannel, zValue);
79
+ let bg = channels.filter((c)=>c !== zChannel).map((c)=>`linear-gradient(to ${c === xChannel ? end : "top"}, ${$99936ad0bf67c8c4$var$hsbChannels[c](value)})`).reverse();
80
+ if (zChannel === "hue") bg.push(value.toString("css"));
81
+ colorAreaStyles = {
82
+ background: bg.join(", ")
83
+ };
84
+ break;
85
+ }
185
86
  }
186
87
  let { x: x, y: y } = state.getThumbPosition();
187
88
  if (direction === "rtl") x = 1 - x;
@@ -194,14 +95,7 @@ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction, state
194
95
  position: "relative",
195
96
  touchAction: "none",
196
97
  ...forcedColorAdjustNoneStyle,
197
- ...background.colorAreaStyles
198
- }
199
- },
200
- gradientStyleProps: {
201
- style: {
202
- touchAction: "none",
203
- ...forcedColorAdjustNoneStyle,
204
- ...background.gradientStyles
98
+ ...colorAreaStyles
205
99
  }
206
100
  },
207
101
  thumbStyleProps: {
@@ -209,7 +103,7 @@ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction, state
209
103
  position: "absolute",
210
104
  left: `${x * 100}%`,
211
105
  top: `${y * 100}%`,
212
- transform: "translate(0%, 0%)",
106
+ transform: "translate(-50%, -50%)",
213
107
  touchAction: "none",
214
108
  ...forcedColorAdjustNoneStyle
215
109
  }
@@ -220,7 +114,7 @@ function $99936ad0bf67c8c4$export$dd62420467d245ca({ direction: direction, state
220
114
  state,
221
115
  zChannel,
222
116
  xChannel,
223
- isDisabled
117
+ yChannel
224
118
  ]);
225
119
  return returnVal;
226
120
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;AAUA;AAIA,MAAM,sCAAgB,CAAC,aAAa,KAAc;IAChD,IAAI,YAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACrF,IAAI,SAAS;QACX,iBAAiB;YACf,iBAAiB,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,KAAK,CAAC,KAAK,EAAE,OAAO,UAAU,EAAE,OAAO,QAAQ,CAAC;QAC5G;QACA,gBAAgB;YACd,iBAAiB,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,KAAK,CAAC,KAAK,EAAE,OAAO,YAAY,EAAE,OAAO,UAAU,CAAC;YAC9G,mBAAmB;uBACnB;QACF;IACF;IACA,OAAO;AACT;AAEA,MAAM,sCAAgB,CAAC,aAAa,KAAc;IAChD,IAAI,YAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACrF,IAAI,SAAS;QACX,iBAAiB;YACf,iBAAiB,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,KAAK,CAAC,OAAO,EAAE,OAAO,YAAY,EAAE,OAAO,IAAI,CAAC;QAC5G;QACA,gBAAgB;YACd,iBAAiB,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,KAAK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QAAC;QAAW;QAAO;QAAU;QAAU;KAAW;IAErD,OAAO;AACT","sources":["packages/@react-aria/color/src/useColorAreaGradient.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n*/\n\nimport {CSSProperties, useMemo} from 'react';\n\nconst generateRGB_R = (orientation, dir: boolean, zValue: number) => {\n let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;\n let result = {\n colorAreaStyles: {\n backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,0),rgb(${zValue},255,0))`\n },\n gradientStyles: {\n backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,255),rgb(${zValue},255,255))`,\n 'WebkitMaskImage': maskImage,\n maskImage\n }\n };\n return result;\n};\n\nconst generateRGB_G = (orientation, dir: boolean, zValue: number) => {\n let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;\n let result = {\n colorAreaStyles: {\n backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},0),rgb(255,${zValue},0))`\n },\n gradientStyles: {\n backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},255),rgb(255,${zValue},255))`,\n 'WebkitMaskImage': maskImage,\n maskImage\n }\n };\n return result;\n};\n\nconst generateRGB_B = (orientation, dir: boolean, zValue: number) => {\n let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;\n let result = {\n colorAreaStyles: {\n backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,0,${zValue}),rgb(255,0,${zValue}))`\n },\n gradientStyles: {\n backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,255,${zValue}),rgb(255,255,${zValue}))`,\n 'WebkitMaskImage': maskImage,\n maskImage\n }\n };\n return result;\n};\n\n\nconst generateHSL_H = (orientation, dir: boolean, zValue: number) => {\n let result = {\n colorAreaStyles: {},\n gradientStyles: {\n background: [\n `linear-gradient(to ${orientation[Number(dir)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,\n `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,\n `hsl(${zValue}, 100%, 50%)`\n ].join(',')\n }\n };\n return result;\n};\n\nconst generateHSL_S = (orientation, dir: boolean, alphaValue: number) => {\n let result = {\n colorAreaStyles: {},\n gradientStyles: {\n background: [\n `linear-gradient(to ${orientation[Number(!dir)]}, hsla(0,0%,0%,${alphaValue}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${alphaValue}) 100%)`,\n `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,\n 'hsl(0, 0%, 50%)'\n ].join(',')\n }\n };\n return result;\n};\n\nconst generateHSL_L = (orientation, dir: boolean, zValue: number) => {\n let result = {\n colorAreaStyles: {},\n gradientStyles: {\n backgroundImage: [\n `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,${zValue}%),hsla(0,0%,${zValue}%,0))`,\n `linear-gradient(to ${orientation[Number(dir)]},hsl(0,100%,${zValue}%),hsl(60,100%,${zValue}%),hsl(120,100%,${zValue}%),hsl(180,100%,${zValue}%),hsl(240,100%,${zValue}%),hsl(300,100%,${zValue}%),hsl(360,100%,${zValue}%))`\n ].join(',')\n }\n };\n return result;\n};\n\n\nconst generateHSB_H = (orientation, dir: boolean, zValue: number) => {\n let result = {\n colorAreaStyles: {},\n gradientStyles: {\n background: [\n `linear-gradient(to ${orientation[Number(dir)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,\n `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,\n `hsl(${zValue}, 100%, 50%)`\n ].join(',')\n }\n };\n return result;\n};\n\nconst generateHSB_S = (orientation, dir: boolean, alphaValue: number) => {\n let result = {\n colorAreaStyles: {},\n gradientStyles: {\n background: [\n `linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,0%,${alphaValue}),hsla(0,0%,0%,0))`,\n `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,\n `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,0%),hsl(0,0%,100%))`\n ].join(',')\n }\n };\n return result;\n};\n\nconst generateHSB_B = (orientation, dir: boolean, alphaValue: number) => {\n let result = {\n colorAreaStyles: {},\n gradientStyles: {\n background: [\n `linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,100%,${alphaValue}),hsla(0,0%,100%,0))`,\n `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,\n '#000'\n ].join(',')\n }\n };\n return result;\n};\n\n\ninterface Gradients {\n colorAreaStyleProps: {\n style: CSSProperties\n },\n gradientStyleProps: {\n style: CSSProperties\n },\n thumbStyleProps: {\n style: CSSProperties\n }\n}\n\nexport function useColorAreaGradient({direction, state, zChannel, xChannel, isDisabled}): Gradients {\n let returnVal = useMemo<Gradients>(() => {\n let orientation = ['top', direction === 'rtl' ? 'left' : 'right'];\n let dir = false;\n let background = {colorAreaStyles: {}, gradientStyles: {}};\n let zValue = state.value.getChannelValue(zChannel);\n let {minValue: zMin, maxValue: zMax} = state.value.getChannelRange(zChannel);\n let alphaValue = (zValue - zMin) / (zMax - zMin);\n let isHSL = state.value.getColorSpace() === 'hsl';\n if (!isDisabled) {\n switch (zChannel) {\n case 'red': {\n dir = xChannel === 'green';\n background = generateRGB_R(orientation, dir, zValue);\n break;\n }\n case 'green': {\n dir = xChannel === 'red';\n background = generateRGB_G(orientation, dir, zValue);\n break;\n }\n case 'blue': {\n dir = xChannel === 'red';\n background = generateRGB_B(orientation, dir, zValue);\n break;\n }\n case 'hue': {\n dir = xChannel !== 'saturation';\n if (isHSL) {\n background = generateHSL_H(orientation, dir, zValue);\n } else {\n background = generateHSB_H(orientation, dir, zValue);\n }\n break;\n }\n case 'saturation': {\n dir = xChannel === 'hue';\n if (isHSL) {\n background = generateHSL_S(orientation, dir, alphaValue);\n } else {\n background = generateHSB_S(orientation, dir, alphaValue);\n }\n break;\n }\n case 'brightness': {\n dir = xChannel === 'hue';\n background = generateHSB_B(orientation, dir, alphaValue);\n break;\n }\n case 'lightness': {\n dir = xChannel === 'hue';\n background = generateHSL_L(orientation, dir, zValue);\n break;\n }\n }\n }\n\n let {x, y} = state.getThumbPosition();\n\n if (direction === 'rtl') {\n x = 1 - x;\n }\n\n let forcedColorAdjustNoneStyle = {forcedColorAdjust: 'none'};\n\n return {\n colorAreaStyleProps: {\n style: {\n position: 'relative',\n touchAction: 'none',\n ...forcedColorAdjustNoneStyle,\n ...background.colorAreaStyles\n }\n },\n gradientStyleProps: {\n style: {\n touchAction: 'none',\n ...forcedColorAdjustNoneStyle,\n ...background.gradientStyles\n }\n },\n thumbStyleProps: {\n style: {\n position: 'absolute',\n left: `${x * 100}%`,\n top: `${y * 100}%`,\n transform: 'translate(0%, 0%)',\n touchAction: 'none',\n ...forcedColorAdjustNoneStyle\n }\n }\n };\n }, [direction, state, zChannel, xChannel, isDisabled]);\n\n return returnVal;\n}\n\n"],"names":[],"version":3,"file":"useColorAreaGradient.main.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;AAUA;;AAMA,MAAM,4BAAM,CAAC,QAAiB;QAAC;QAAG;QAAI;QAAK;QAAK;QAAK;QAAK;KAAI,CAAC,GAAG,CAAC,CAAA,MAAO,MAAM,gBAAgB,CAAC,OAAO,KAAK,QAAQ,CAAC,QAAQ,IAAI,CAAC;AACnI,MAAM,mCAAa,CAAC,QAAiB,CAAC,EAAE,MAAM,gBAAgB,CAAC,cAAc,GAAG,aAAa,CAAC;AAE9F,MAAM,oCAAc;SAClB;gBACA;IACA,WAAW,IAAM;AACnB;AAEA,MAAM,oCAAc;SAClB;gBACA;IACA,YAAY,IAAM;AACpB;AAWO,SAAS,0CAAqB,aAAC,SAAS,SAAE,KAAK,YAAE,QAAQ,YAAE,QAAQ,YAAE,QAAQ,EAAC;IACnF,IAAI,YAAY,CAAA,GAAA,oBAAM,EAAa;QACjC,IAAI,MAAM,cAAc,QAAQ,SAAS;QACzC,IAAI,kBAAkB,CAAC;QACvB,IAAI,SAAS,MAAM,KAAK,CAAC,eAAe,CAAC;QAEzC,OAAQ,MAAM,KAAK,CAAC,aAAa;YAC/B,KAAK;gBAAO;oBACV,IAAI,MAAM,CAAA,GAAA,mCAAS,EAAE;oBACrB,kBAAkB;wBAChB,YAAY;4BACV,4FAA4F;4BAC5F,6FAA6F;4BAC7F,6DAA6D;4BAC7D,CAAC,mBAAmB,EAAE,IAAI,EAAE,EAAE,IAAI,gBAAgB,CAAC,UAAU,GAAG,EAAE,EAAE,IAAI,gBAAgB,CAAC,UAAU,KAAK,CAAC,CAAC;4BAC1G,CAAC,wBAAwB,EA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6B;YAAC,mBAAmB;QAAM;QAE3D,OAAO;YACL,qBAAqB;gBACnB,OAAO;oBACL,UAAU;oBACV,aAAa;oBACb,GAAG,0BAA0B;oBAC7B,GAAG,eAAe;gBACpB;YACF;YACA,iBAAiB;gBACf,OAAO;oBACL,UAAU;oBACV,MAAM,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC;oBACnB,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC;oBAClB,WAAW;oBACX,aAAa;oBACb,GAAG,0BAA0B;gBAC/B;YACF;QACF;IACF,GAAG;QAAC;QAAW;QAAO;QAAU;QAAU;KAAS;IAEnD,OAAO;AACT","sources":["packages/@react-aria/color/src/useColorAreaGradient.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n*/\n\nimport {Color} from '@react-types/color';\nimport {CSSProperties, useMemo} from 'react';\nimport {parseColor} from '@react-stately/color';\n\nconst hue = (color: Color) => [0, 60, 120, 180, 240, 300, 360].map(hue => color.withChannelValue('hue', hue).toString('css')).join(', ');\nconst saturation = (color: Color) => `${color.withChannelValue('saturation', 0)}, transparent`;\n\nconst hslChannels = {\n hue,\n saturation,\n lightness: () => 'black, transparent, white'\n};\n\nconst hsbChannels = {\n hue,\n saturation,\n brightness: () => 'black, transparent'\n};\n\ninterface Gradients {\n colorAreaStyleProps: {\n style: CSSProperties\n },\n thumbStyleProps: {\n style: CSSProperties\n }\n}\n\nexport function useColorAreaGradient({direction, state, zChannel, xChannel, yChannel}): Gradients {\n let returnVal = useMemo<Gradients>(() => {\n let end = direction === 'rtl' ? 'left' : 'right';\n let colorAreaStyles = {};\n let zValue = state.value.getChannelValue(zChannel);\n\n switch (state.value.getColorSpace()) {\n case 'rgb': {\n let rgb = parseColor('rgb(0, 0, 0)');\n colorAreaStyles = {\n background: [\n // The screen blend mode multiplies the inverse of each channel, e.g. 1 - (1 - a) * (1 - b).\n // Create a layer for each channel, with the other channels as 0. After blending, this should\n // result in the gradients being combined channel by channel.\n `linear-gradient(to ${end}, ${rgb.withChannelValue(xChannel, 0)}, ${rgb.withChannelValue(xChannel, 255)})`,\n `linear-gradient(to top, ${rgb.withChannelValue(yChannel, 0)}, ${rgb.withChannelValue(yChannel, 255)})`,\n rgb.withChannelValue(zChannel, zValue)\n ].join(','),\n backgroundBlendMode: 'screen'\n };\n break;\n }\n case 'hsl': {\n let channels = state.value.getColorChannels();\n let value = parseColor('hsl(0, 100%, 50%)').withChannelValue(zChannel, zValue);\n\n let bg = channels\n .filter(c => c !== zChannel)\n .map(c => `linear-gradient(to ${c === xChannel ? end : 'top'}, ${hslChannels[c](value)})`)\n .reverse();\n if (zChannel === 'hue') {\n bg.push(value.toString('css'));\n }\n \n colorAreaStyles = {\n background: bg.join(', ')\n };\n break;\n }\n case 'hsb': {\n let channels = state.value.getColorChannels();\n let value = parseColor('hsb(0, 100%, 100%)').withChannelValue(zChannel, zValue);\n\n let bg = channels\n .filter(c => c !== zChannel)\n .map(c => `linear-gradient(to ${c === xChannel ? end : 'top'}, ${hsbChannels[c](value)})`)\n .reverse();\n if (zChannel === 'hue') {\n bg.push(value.toString('css'));\n }\n \n colorAreaStyles = {\n background: bg.join(', ')\n };\n break;\n }\n }\n\n let {x, y} = state.getThumbPosition();\n\n if (direction === 'rtl') {\n x = 1 - x;\n }\n\n let forcedColorAdjustNoneStyle = {forcedColorAdjust: 'none'};\n\n return {\n colorAreaStyleProps: {\n style: {\n position: 'relative',\n touchAction: 'none',\n ...forcedColorAdjustNoneStyle,\n ...colorAreaStyles\n }\n },\n thumbStyleProps: {\n style: {\n position: 'absolute',\n left: `${x * 100}%`,\n top: `${y * 100}%`,\n transform: 'translate(-50%, -50%)',\n touchAction: 'none',\n ...forcedColorAdjustNoneStyle\n }\n }\n };\n }, [direction, state, zChannel, xChannel, yChannel]);\n\n return returnVal;\n}\n\n"],"names":[],"version":3,"file":"useColorAreaGradient.main.js.map"}
@@ -1,4 +1,5 @@
1
1
  import {useMemo as $hLqEt$useMemo} from "react";
2
+ import {parseColor as $hLqEt$parseColor} from "@react-stately/color";
2
3
 
3
4
  /*
4
5
  * Copyright 2022 Adobe. All rights reserved.
@@ -11,171 +12,71 @@ import {useMemo as $hLqEt$useMemo} from "react";
11
12
  * OF ANY KIND, either express or implied. See the License for the specific language
12
13
  * governing permissions and limitations under the License.
13
14
  */
14
- const $40297c24c53588e6$var$generateRGB_R = (orientation, dir, zValue)=>{
15
- let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
16
- let result = {
17
- colorAreaStyles: {
18
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,0),rgb(${zValue},255,0))`
19
- },
20
- gradientStyles: {
21
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,255),rgb(${zValue},255,255))`,
22
- "WebkitMaskImage": maskImage,
23
- maskImage: maskImage
24
- }
25
- };
26
- return result;
27
- };
28
- const $40297c24c53588e6$var$generateRGB_G = (orientation, dir, zValue)=>{
29
- let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
30
- let result = {
31
- colorAreaStyles: {
32
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},0),rgb(255,${zValue},0))`
33
- },
34
- gradientStyles: {
35
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},255),rgb(255,${zValue},255))`,
36
- "WebkitMaskImage": maskImage,
37
- maskImage: maskImage
38
- }
39
- };
40
- return result;
41
- };
42
- const $40297c24c53588e6$var$generateRGB_B = (orientation, dir, zValue)=>{
43
- let maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
44
- let result = {
45
- colorAreaStyles: {
46
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,0,${zValue}),rgb(255,0,${zValue}))`
47
- },
48
- gradientStyles: {
49
- backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,255,${zValue}),rgb(255,255,${zValue}))`,
50
- "WebkitMaskImage": maskImage,
51
- maskImage: maskImage
52
- }
53
- };
54
- return result;
55
- };
56
- const $40297c24c53588e6$var$generateHSL_H = (orientation, dir, zValue)=>{
57
- let result = {
58
- colorAreaStyles: {},
59
- gradientStyles: {
60
- background: [
61
- `linear-gradient(to ${orientation[Number(dir)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,
62
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,
63
- `hsl(${zValue}, 100%, 50%)`
64
- ].join(",")
65
- }
66
- };
67
- return result;
68
- };
69
- const $40297c24c53588e6$var$generateHSL_S = (orientation, dir, alphaValue)=>{
70
- let result = {
71
- colorAreaStyles: {},
72
- gradientStyles: {
73
- background: [
74
- `linear-gradient(to ${orientation[Number(!dir)]}, hsla(0,0%,0%,${alphaValue}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${alphaValue}) 100%)`,
75
- `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
76
- "hsl(0, 0%, 50%)"
77
- ].join(",")
78
- }
79
- };
80
- return result;
81
- };
82
- const $40297c24c53588e6$var$generateHSL_L = (orientation, dir, zValue)=>{
83
- let result = {
84
- colorAreaStyles: {},
85
- gradientStyles: {
86
- backgroundImage: [
87
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,${zValue}%),hsla(0,0%,${zValue}%,0))`,
88
- `linear-gradient(to ${orientation[Number(dir)]},hsl(0,100%,${zValue}%),hsl(60,100%,${zValue}%),hsl(120,100%,${zValue}%),hsl(180,100%,${zValue}%),hsl(240,100%,${zValue}%),hsl(300,100%,${zValue}%),hsl(360,100%,${zValue}%))`
89
- ].join(",")
90
- }
91
- };
92
- return result;
93
- };
94
- const $40297c24c53588e6$var$generateHSB_H = (orientation, dir, zValue)=>{
95
- let result = {
96
- colorAreaStyles: {},
97
- gradientStyles: {
98
- background: [
99
- `linear-gradient(to ${orientation[Number(dir)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,
100
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,
101
- `hsl(${zValue}, 100%, 50%)`
102
- ].join(",")
103
- }
104
- };
105
- return result;
106
- };
107
- const $40297c24c53588e6$var$generateHSB_S = (orientation, dir, alphaValue)=>{
108
- let result = {
109
- colorAreaStyles: {},
110
- gradientStyles: {
111
- background: [
112
- `linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,0%,${alphaValue}),hsla(0,0%,0%,0))`,
113
- `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
114
- `linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,0%),hsl(0,0%,100%))`
115
- ].join(",")
116
- }
117
- };
118
- return result;
15
+
16
+ const $40297c24c53588e6$var$hue = (color)=>[
17
+ 0,
18
+ 60,
19
+ 120,
20
+ 180,
21
+ 240,
22
+ 300,
23
+ 360
24
+ ].map((hue)=>color.withChannelValue("hue", hue).toString("css")).join(", ");
25
+ const $40297c24c53588e6$var$saturation = (color)=>`${color.withChannelValue("saturation", 0)}, transparent`;
26
+ const $40297c24c53588e6$var$hslChannels = {
27
+ hue: $40297c24c53588e6$var$hue,
28
+ saturation: $40297c24c53588e6$var$saturation,
29
+ lightness: ()=>"black, transparent, white"
119
30
  };
120
- const $40297c24c53588e6$var$generateHSB_B = (orientation, dir, alphaValue)=>{
121
- let result = {
122
- colorAreaStyles: {},
123
- gradientStyles: {
124
- background: [
125
- `linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,100%,${alphaValue}),hsla(0,0%,100%,0))`,
126
- `linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
127
- "#000"
128
- ].join(",")
129
- }
130
- };
131
- return result;
31
+ const $40297c24c53588e6$var$hsbChannels = {
32
+ hue: $40297c24c53588e6$var$hue,
33
+ saturation: $40297c24c53588e6$var$saturation,
34
+ brightness: ()=>"black, transparent"
132
35
  };
133
- function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state: state, zChannel: zChannel, xChannel: xChannel, isDisabled: isDisabled }) {
36
+ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state: state, zChannel: zChannel, xChannel: xChannel, yChannel: yChannel }) {
134
37
  let returnVal = (0, $hLqEt$useMemo)(()=>{
135
- let orientation = [
136
- "top",
137
- direction === "rtl" ? "left" : "right"
138
- ];
139
- let dir = false;
140
- let background = {
141
- colorAreaStyles: {},
142
- gradientStyles: {}
143
- };
38
+ let end = direction === "rtl" ? "left" : "right";
39
+ let colorAreaStyles = {};
144
40
  let zValue = state.value.getChannelValue(zChannel);
145
- let { minValue: zMin, maxValue: zMax } = state.value.getChannelRange(zChannel);
146
- let alphaValue = (zValue - zMin) / (zMax - zMin);
147
- let isHSL = state.value.getColorSpace() === "hsl";
148
- if (!isDisabled) switch(zChannel){
149
- case "red":
150
- dir = xChannel === "green";
151
- background = $40297c24c53588e6$var$generateRGB_R(orientation, dir, zValue);
152
- break;
153
- case "green":
154
- dir = xChannel === "red";
155
- background = $40297c24c53588e6$var$generateRGB_G(orientation, dir, zValue);
156
- break;
157
- case "blue":
158
- dir = xChannel === "red";
159
- background = $40297c24c53588e6$var$generateRGB_B(orientation, dir, zValue);
160
- break;
161
- case "hue":
162
- dir = xChannel !== "saturation";
163
- if (isHSL) background = $40297c24c53588e6$var$generateHSL_H(orientation, dir, zValue);
164
- else background = $40297c24c53588e6$var$generateHSB_H(orientation, dir, zValue);
165
- break;
166
- case "saturation":
167
- dir = xChannel === "hue";
168
- if (isHSL) background = $40297c24c53588e6$var$generateHSL_S(orientation, dir, alphaValue);
169
- else background = $40297c24c53588e6$var$generateHSB_S(orientation, dir, alphaValue);
170
- break;
171
- case "brightness":
172
- dir = xChannel === "hue";
173
- background = $40297c24c53588e6$var$generateHSB_B(orientation, dir, alphaValue);
174
- break;
175
- case "lightness":
176
- dir = xChannel === "hue";
177
- background = $40297c24c53588e6$var$generateHSL_L(orientation, dir, zValue);
178
- break;
41
+ switch(state.value.getColorSpace()){
42
+ case "rgb":
43
+ {
44
+ let rgb = (0, $hLqEt$parseColor)("rgb(0, 0, 0)");
45
+ colorAreaStyles = {
46
+ background: [
47
+ // The screen blend mode multiplies the inverse of each channel, e.g. 1 - (1 - a) * (1 - b).
48
+ // Create a layer for each channel, with the other channels as 0. After blending, this should
49
+ // result in the gradients being combined channel by channel.
50
+ `linear-gradient(to ${end}, ${rgb.withChannelValue(xChannel, 0)}, ${rgb.withChannelValue(xChannel, 255)})`,
51
+ `linear-gradient(to top, ${rgb.withChannelValue(yChannel, 0)}, ${rgb.withChannelValue(yChannel, 255)})`,
52
+ rgb.withChannelValue(zChannel, zValue)
53
+ ].join(","),
54
+ backgroundBlendMode: "screen"
55
+ };
56
+ break;
57
+ }
58
+ case "hsl":
59
+ {
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"));
64
+ colorAreaStyles = {
65
+ background: bg.join(", ")
66
+ };
67
+ break;
68
+ }
69
+ case "hsb":
70
+ {
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"));
75
+ colorAreaStyles = {
76
+ background: bg.join(", ")
77
+ };
78
+ break;
79
+ }
179
80
  }
180
81
  let { x: x, y: y } = state.getThumbPosition();
181
82
  if (direction === "rtl") x = 1 - x;
@@ -188,14 +89,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state
188
89
  position: "relative",
189
90
  touchAction: "none",
190
91
  ...forcedColorAdjustNoneStyle,
191
- ...background.colorAreaStyles
192
- }
193
- },
194
- gradientStyleProps: {
195
- style: {
196
- touchAction: "none",
197
- ...forcedColorAdjustNoneStyle,
198
- ...background.gradientStyles
92
+ ...colorAreaStyles
199
93
  }
200
94
  },
201
95
  thumbStyleProps: {
@@ -203,7 +97,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state
203
97
  position: "absolute",
204
98
  left: `${x * 100}%`,
205
99
  top: `${y * 100}%`,
206
- transform: "translate(0%, 0%)",
100
+ transform: "translate(-50%, -50%)",
207
101
  touchAction: "none",
208
102
  ...forcedColorAdjustNoneStyle
209
103
  }
@@ -214,7 +108,7 @@ function $40297c24c53588e6$export$dd62420467d245ca({ direction: direction, state
214
108
  state,
215
109
  zChannel,
216
110
  xChannel,
217
- isDisabled
111
+ yChannel
218
112
  ]);
219
113
  return returnVal;
220
114
  }