@react-spectrum/color 3.1.7 → 3.2.0

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 (290) hide show
  1. package/dist/import.mjs +9 -11
  2. package/dist/main.js +18 -20
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +9 -11
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +16 -0
  7. package/package.json +14 -41
  8. package/src/index.ts +17 -15
  9. package/dist/ColorArea.main.js +0 -95
  10. package/dist/ColorArea.main.js.map +0 -1
  11. package/dist/ColorArea.mjs +0 -90
  12. package/dist/ColorArea.module.js +0 -90
  13. package/dist/ColorArea.module.js.map +0 -1
  14. package/dist/ColorEditor.main.js +0 -113
  15. package/dist/ColorEditor.main.js.map +0 -1
  16. package/dist/ColorEditor.mjs +0 -108
  17. package/dist/ColorEditor.module.js +0 -108
  18. package/dist/ColorEditor.module.js.map +0 -1
  19. package/dist/ColorField.main.js +0 -105
  20. package/dist/ColorField.main.js.map +0 -1
  21. package/dist/ColorField.mjs +0 -100
  22. package/dist/ColorField.module.js +0 -100
  23. package/dist/ColorField.module.js.map +0 -1
  24. package/dist/ColorPicker.main.js +0 -123
  25. package/dist/ColorPicker.main.js.map +0 -1
  26. package/dist/ColorPicker.mjs +0 -114
  27. package/dist/ColorPicker.module.js +0 -114
  28. package/dist/ColorPicker.module.js.map +0 -1
  29. package/dist/ColorSlider.main.js +0 -126
  30. package/dist/ColorSlider.main.js.map +0 -1
  31. package/dist/ColorSlider.mjs +0 -121
  32. package/dist/ColorSlider.module.js +0 -121
  33. package/dist/ColorSlider.module.js.map +0 -1
  34. package/dist/ColorSwatch.main.js +0 -91
  35. package/dist/ColorSwatch.main.js.map +0 -1
  36. package/dist/ColorSwatch.mjs +0 -81
  37. package/dist/ColorSwatch.module.js +0 -81
  38. package/dist/ColorSwatch.module.js.map +0 -1
  39. package/dist/ColorSwatchPicker.main.js +0 -112
  40. package/dist/ColorSwatchPicker.main.js.map +0 -1
  41. package/dist/ColorSwatchPicker.mjs +0 -103
  42. package/dist/ColorSwatchPicker.module.js +0 -103
  43. package/dist/ColorSwatchPicker.module.js.map +0 -1
  44. package/dist/ColorThumb.main.js +0 -146
  45. package/dist/ColorThumb.main.js.map +0 -1
  46. package/dist/ColorThumb.mjs +0 -141
  47. package/dist/ColorThumb.module.js +0 -141
  48. package/dist/ColorThumb.module.js.map +0 -1
  49. package/dist/ColorWheel.main.js +0 -114
  50. package/dist/ColorWheel.main.js.map +0 -1
  51. package/dist/ColorWheel.mjs +0 -109
  52. package/dist/ColorWheel.module.js +0 -109
  53. package/dist/ColorWheel.module.js.map +0 -1
  54. package/dist/ar-AE.main.js +0 -10
  55. package/dist/ar-AE.main.js.map +0 -1
  56. package/dist/ar-AE.mjs +0 -12
  57. package/dist/ar-AE.module.js +0 -12
  58. package/dist/ar-AE.module.js.map +0 -1
  59. package/dist/bg-BG.main.js +0 -10
  60. package/dist/bg-BG.main.js.map +0 -1
  61. package/dist/bg-BG.mjs +0 -12
  62. package/dist/bg-BG.module.js +0 -12
  63. package/dist/bg-BG.module.js.map +0 -1
  64. package/dist/color.0da417e8.css +0 -93
  65. package/dist/color.0da417e8.css.map +0 -1
  66. package/dist/color.4034864f.css +0 -120
  67. package/dist/color.4034864f.css.map +0 -1
  68. package/dist/color.51750948.css +0 -356
  69. package/dist/color.51750948.css.map +0 -1
  70. package/dist/color.6dfdb0cd.css +0 -260
  71. package/dist/color.6dfdb0cd.css.map +0 -1
  72. package/dist/color.85d29c28.css +0 -12
  73. package/dist/color.85d29c28.css.map +0 -1
  74. package/dist/color.8e3b650f.css +0 -93
  75. package/dist/color.8e3b650f.css.map +0 -1
  76. package/dist/color.a5310285.css +0 -206
  77. package/dist/color.a5310285.css.map +0 -1
  78. package/dist/color.decac5a6.css +0 -20
  79. package/dist/color.decac5a6.css.map +0 -1
  80. package/dist/color.f801bfa3.css +0 -75
  81. package/dist/color.f801bfa3.css.map +0 -1
  82. package/dist/color.ff589589.css +0 -41
  83. package/dist/color.ff589589.css.map +0 -1
  84. package/dist/colorarea_vars_css.main.js +0 -29
  85. package/dist/colorarea_vars_css.main.js.map +0 -1
  86. package/dist/colorarea_vars_css.mjs +0 -31
  87. package/dist/colorarea_vars_css.module.js +0 -31
  88. package/dist/colorarea_vars_css.module.js.map +0 -1
  89. package/dist/colorfield_css.main.js +0 -11
  90. package/dist/colorfield_css.main.js.map +0 -1
  91. package/dist/colorfield_css.mjs +0 -13
  92. package/dist/colorfield_css.module.js +0 -13
  93. package/dist/colorfield_css.module.js.map +0 -1
  94. package/dist/colorhandle_vars_css.main.js +0 -26
  95. package/dist/colorhandle_vars_css.main.js.map +0 -1
  96. package/dist/colorhandle_vars_css.mjs +0 -28
  97. package/dist/colorhandle_vars_css.module.js +0 -28
  98. package/dist/colorhandle_vars_css.module.js.map +0 -1
  99. package/dist/colorloupe_vars_css.main.js +0 -23
  100. package/dist/colorloupe_vars_css.main.js.map +0 -1
  101. package/dist/colorloupe_vars_css.mjs +0 -25
  102. package/dist/colorloupe_vars_css.module.js +0 -25
  103. package/dist/colorloupe_vars_css.module.js.map +0 -1
  104. package/dist/colorslider_vars_css.main.js +0 -53
  105. package/dist/colorslider_vars_css.main.js.map +0 -1
  106. package/dist/colorslider_vars_css.mjs +0 -55
  107. package/dist/colorslider_vars_css.module.js +0 -55
  108. package/dist/colorslider_vars_css.module.js.map +0 -1
  109. package/dist/colorwheel_vars_css.main.js +0 -35
  110. package/dist/colorwheel_vars_css.main.js.map +0 -1
  111. package/dist/colorwheel_vars_css.mjs +0 -37
  112. package/dist/colorwheel_vars_css.module.js +0 -37
  113. package/dist/colorwheel_vars_css.module.js.map +0 -1
  114. package/dist/cs-CZ.main.js +0 -10
  115. package/dist/cs-CZ.main.js.map +0 -1
  116. package/dist/cs-CZ.mjs +0 -12
  117. package/dist/cs-CZ.module.js +0 -12
  118. package/dist/cs-CZ.module.js.map +0 -1
  119. package/dist/da-DK.main.js +0 -10
  120. package/dist/da-DK.main.js.map +0 -1
  121. package/dist/da-DK.mjs +0 -12
  122. package/dist/da-DK.module.js +0 -12
  123. package/dist/da-DK.module.js.map +0 -1
  124. package/dist/de-DE.main.js +0 -10
  125. package/dist/de-DE.main.js.map +0 -1
  126. package/dist/de-DE.mjs +0 -12
  127. package/dist/de-DE.module.js +0 -12
  128. package/dist/de-DE.module.js.map +0 -1
  129. package/dist/el-GR.main.js +0 -10
  130. package/dist/el-GR.main.js.map +0 -1
  131. package/dist/el-GR.mjs +0 -12
  132. package/dist/el-GR.module.js +0 -12
  133. package/dist/el-GR.module.js.map +0 -1
  134. package/dist/en-US.main.js +0 -10
  135. package/dist/en-US.main.js.map +0 -1
  136. package/dist/en-US.mjs +0 -12
  137. package/dist/en-US.module.js +0 -12
  138. package/dist/en-US.module.js.map +0 -1
  139. package/dist/es-ES.main.js +0 -10
  140. package/dist/es-ES.main.js.map +0 -1
  141. package/dist/es-ES.mjs +0 -12
  142. package/dist/es-ES.module.js +0 -12
  143. package/dist/es-ES.module.js.map +0 -1
  144. package/dist/et-EE.main.js +0 -10
  145. package/dist/et-EE.main.js.map +0 -1
  146. package/dist/et-EE.mjs +0 -12
  147. package/dist/et-EE.module.js +0 -12
  148. package/dist/et-EE.module.js.map +0 -1
  149. package/dist/fi-FI.main.js +0 -10
  150. package/dist/fi-FI.main.js.map +0 -1
  151. package/dist/fi-FI.mjs +0 -12
  152. package/dist/fi-FI.module.js +0 -12
  153. package/dist/fi-FI.module.js.map +0 -1
  154. package/dist/fr-FR.main.js +0 -10
  155. package/dist/fr-FR.main.js.map +0 -1
  156. package/dist/fr-FR.mjs +0 -12
  157. package/dist/fr-FR.module.js +0 -12
  158. package/dist/fr-FR.module.js.map +0 -1
  159. package/dist/he-IL.main.js +0 -10
  160. package/dist/he-IL.main.js.map +0 -1
  161. package/dist/he-IL.mjs +0 -12
  162. package/dist/he-IL.module.js +0 -12
  163. package/dist/he-IL.module.js.map +0 -1
  164. package/dist/hr-HR.main.js +0 -10
  165. package/dist/hr-HR.main.js.map +0 -1
  166. package/dist/hr-HR.mjs +0 -12
  167. package/dist/hr-HR.module.js +0 -12
  168. package/dist/hr-HR.module.js.map +0 -1
  169. package/dist/hu-HU.main.js +0 -10
  170. package/dist/hu-HU.main.js.map +0 -1
  171. package/dist/hu-HU.mjs +0 -12
  172. package/dist/hu-HU.module.js +0 -12
  173. package/dist/hu-HU.module.js.map +0 -1
  174. package/dist/intlStrings.main.js +0 -108
  175. package/dist/intlStrings.main.js.map +0 -1
  176. package/dist/intlStrings.mjs +0 -110
  177. package/dist/intlStrings.module.js +0 -110
  178. package/dist/intlStrings.module.js.map +0 -1
  179. package/dist/it-IT.main.js +0 -10
  180. package/dist/it-IT.main.js.map +0 -1
  181. package/dist/it-IT.mjs +0 -12
  182. package/dist/it-IT.module.js +0 -12
  183. package/dist/it-IT.module.js.map +0 -1
  184. package/dist/ja-JP.main.js +0 -10
  185. package/dist/ja-JP.main.js.map +0 -1
  186. package/dist/ja-JP.mjs +0 -12
  187. package/dist/ja-JP.module.js +0 -12
  188. package/dist/ja-JP.module.js.map +0 -1
  189. package/dist/ko-KR.main.js +0 -10
  190. package/dist/ko-KR.main.js.map +0 -1
  191. package/dist/ko-KR.mjs +0 -12
  192. package/dist/ko-KR.module.js +0 -12
  193. package/dist/ko-KR.module.js.map +0 -1
  194. package/dist/lt-LT.main.js +0 -10
  195. package/dist/lt-LT.main.js.map +0 -1
  196. package/dist/lt-LT.mjs +0 -12
  197. package/dist/lt-LT.module.js +0 -12
  198. package/dist/lt-LT.module.js.map +0 -1
  199. package/dist/lv-LV.main.js +0 -10
  200. package/dist/lv-LV.main.js.map +0 -1
  201. package/dist/lv-LV.mjs +0 -12
  202. package/dist/lv-LV.module.js +0 -12
  203. package/dist/lv-LV.module.js.map +0 -1
  204. package/dist/nb-NO.main.js +0 -10
  205. package/dist/nb-NO.main.js.map +0 -1
  206. package/dist/nb-NO.mjs +0 -12
  207. package/dist/nb-NO.module.js +0 -12
  208. package/dist/nb-NO.module.js.map +0 -1
  209. package/dist/nl-NL.main.js +0 -10
  210. package/dist/nl-NL.main.js.map +0 -1
  211. package/dist/nl-NL.mjs +0 -12
  212. package/dist/nl-NL.module.js +0 -12
  213. package/dist/nl-NL.module.js.map +0 -1
  214. package/dist/pl-PL.main.js +0 -10
  215. package/dist/pl-PL.main.js.map +0 -1
  216. package/dist/pl-PL.mjs +0 -12
  217. package/dist/pl-PL.module.js +0 -12
  218. package/dist/pl-PL.module.js.map +0 -1
  219. package/dist/pt-BR.main.js +0 -10
  220. package/dist/pt-BR.main.js.map +0 -1
  221. package/dist/pt-BR.mjs +0 -12
  222. package/dist/pt-BR.module.js +0 -12
  223. package/dist/pt-BR.module.js.map +0 -1
  224. package/dist/pt-PT.main.js +0 -10
  225. package/dist/pt-PT.main.js.map +0 -1
  226. package/dist/pt-PT.mjs +0 -12
  227. package/dist/pt-PT.module.js +0 -12
  228. package/dist/pt-PT.module.js.map +0 -1
  229. package/dist/ro-RO.main.js +0 -10
  230. package/dist/ro-RO.main.js.map +0 -1
  231. package/dist/ro-RO.mjs +0 -12
  232. package/dist/ro-RO.module.js +0 -12
  233. package/dist/ro-RO.module.js.map +0 -1
  234. package/dist/ru-RU.main.js +0 -10
  235. package/dist/ru-RU.main.js.map +0 -1
  236. package/dist/ru-RU.mjs +0 -12
  237. package/dist/ru-RU.module.js +0 -12
  238. package/dist/ru-RU.module.js.map +0 -1
  239. package/dist/sk-SK.main.js +0 -10
  240. package/dist/sk-SK.main.js.map +0 -1
  241. package/dist/sk-SK.mjs +0 -12
  242. package/dist/sk-SK.module.js +0 -12
  243. package/dist/sk-SK.module.js.map +0 -1
  244. package/dist/sl-SI.main.js +0 -10
  245. package/dist/sl-SI.main.js.map +0 -1
  246. package/dist/sl-SI.mjs +0 -12
  247. package/dist/sl-SI.module.js +0 -12
  248. package/dist/sl-SI.module.js.map +0 -1
  249. package/dist/sr-SP.main.js +0 -10
  250. package/dist/sr-SP.main.js.map +0 -1
  251. package/dist/sr-SP.mjs +0 -12
  252. package/dist/sr-SP.module.js +0 -12
  253. package/dist/sr-SP.module.js.map +0 -1
  254. package/dist/sv-SE.main.js +0 -10
  255. package/dist/sv-SE.main.js.map +0 -1
  256. package/dist/sv-SE.mjs +0 -12
  257. package/dist/sv-SE.module.js +0 -12
  258. package/dist/sv-SE.module.js.map +0 -1
  259. package/dist/tr-TR.main.js +0 -10
  260. package/dist/tr-TR.main.js.map +0 -1
  261. package/dist/tr-TR.mjs +0 -12
  262. package/dist/tr-TR.module.js +0 -12
  263. package/dist/tr-TR.module.js.map +0 -1
  264. package/dist/types.d.ts +0 -96
  265. package/dist/types.d.ts.map +0 -1
  266. package/dist/uk-UA.main.js +0 -10
  267. package/dist/uk-UA.main.js.map +0 -1
  268. package/dist/uk-UA.mjs +0 -12
  269. package/dist/uk-UA.module.js +0 -12
  270. package/dist/uk-UA.module.js.map +0 -1
  271. package/dist/zh-CN.main.js +0 -10
  272. package/dist/zh-CN.main.js.map +0 -1
  273. package/dist/zh-CN.mjs +0 -12
  274. package/dist/zh-CN.module.js +0 -12
  275. package/dist/zh-CN.module.js.map +0 -1
  276. package/dist/zh-TW.main.js +0 -10
  277. package/dist/zh-TW.main.js.map +0 -1
  278. package/dist/zh-TW.mjs +0 -12
  279. package/dist/zh-TW.module.js +0 -12
  280. package/dist/zh-TW.module.js.map +0 -1
  281. package/src/ColorArea.tsx +0 -87
  282. package/src/ColorEditor.tsx +0 -60
  283. package/src/ColorField.tsx +0 -111
  284. package/src/ColorPicker.tsx +0 -120
  285. package/src/ColorSlider.tsx +0 -142
  286. package/src/ColorSwatch.tsx +0 -99
  287. package/src/ColorSwatchPicker.tsx +0 -115
  288. package/src/ColorThumb.tsx +0 -114
  289. package/src/ColorWheel.tsx +0 -110
  290. package/src/colorfield.css +0 -18
@@ -1,141 +0,0 @@
1
- import "./color.f801bfa3.css";
2
- import $1UQoL$colorhandle_vars_cssmodulejs from "./colorhandle_vars_css.mjs";
3
- import "./color.ff589589.css";
4
- import $1UQoL$colorloupe_vars_cssmodulejs from "./colorloupe_vars_css.mjs";
5
- import {classNames as $1UQoL$classNames} from "@react-spectrum/utils";
6
- import {Overlay as $1UQoL$Overlay} from "@react-spectrum/overlays";
7
- import $1UQoL$react, {useRef as $1UQoL$useRef, useState as $1UQoL$useState} from "react";
8
- import {useId as $1UQoL$useId, useLayoutEffect as $1UQoL$useLayoutEffect} from "@react-aria/utils";
9
- import {useProvider as $1UQoL$useProvider} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
- function $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc(props) {
33
- let { value: value, isDisabled: isDisabled, isDragging: isDragging, isFocused: isFocused, children: children, className: className = '', style: style, containerRef: containerRef, ...otherProps } = props;
34
- let valueCSS = value.toString('css');
35
- let loupeRef = (0, $1UQoL$useRef)(null);
36
- let provider = (0, $1UQoL$useProvider)();
37
- return /*#__PURE__*/ (0, $1UQoL$react).createElement("div", {
38
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorhandle_vars_cssmodulejs))), 'spectrum-ColorHandle', {
39
- 'is-focused': isFocused,
40
- 'is-disabled': isDisabled
41
- }) + ' ' + className,
42
- style: style,
43
- ...otherProps
44
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement("div", {
45
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorhandle_vars_cssmodulejs))), 'spectrum-ColorHandle-color'),
46
- style: {
47
- backgroundColor: valueCSS
48
- }
49
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement((0, $1UQoL$Overlay), {
50
- isOpen: isDragging && provider != null,
51
- nodeRef: loupeRef
52
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement($3a90e89d07d7bbd5$var$ColorLoupe, {
53
- valueCSS: valueCSS,
54
- containerRef: containerRef,
55
- loupeRef: loupeRef,
56
- style: style
57
- })), children);
58
- }
59
- // ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).
60
- function $3a90e89d07d7bbd5$var$ColorLoupe({ isOpen: isOpen, valueCSS: valueCSS, containerRef: containerRef, loupeRef: loupeRef, style: style }) {
61
- let patternId = (0, $1UQoL$useId)();
62
- // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).
63
- let [containerRect, setContainerRect] = (0, $1UQoL$useState)({
64
- top: 0,
65
- left: 0,
66
- width: 0,
67
- height: 0
68
- });
69
- (0, $1UQoL$useLayoutEffect)(()=>{
70
- var _containerRef_current;
71
- let rect = (_containerRef_current = containerRef.current) === null || _containerRef_current === void 0 ? void 0 : _containerRef_current.getBoundingClientRect();
72
- setContainerRect({
73
- top: (rect === null || rect === void 0 ? void 0 : rect.top) || 0,
74
- left: (rect === null || rect === void 0 ? void 0 : rect.left) || 0,
75
- width: (rect === null || rect === void 0 ? void 0 : rect.width) || 0,
76
- height: (rect === null || rect === void 0 ? void 0 : rect.height) || 0
77
- });
78
- }, [
79
- containerRef
80
- ]);
81
- // Compute the pixel position of the thumb.
82
- let thumbTop = style.top || '50%';
83
- if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;
84
- else if (typeof thumbTop === 'string' && thumbTop.endsWith('px')) thumbTop = parseFloat(thumbTop);
85
- let thumbLeft = style.left || '50%';
86
- if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;
87
- else if (typeof thumbLeft === 'string' && thumbLeft.endsWith('px')) thumbLeft = parseFloat(thumbLeft);
88
- return /*#__PURE__*/ (0, $1UQoL$react).createElement("svg", {
89
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe', {
90
- 'is-open': isOpen
91
- }),
92
- style: {
93
- // Position relative to the viewport.
94
- position: 'fixed',
95
- top: containerRect.top + thumbTop,
96
- left: containerRect.left + thumbLeft
97
- },
98
- ref: loupeRef,
99
- "aria-hidden": "true"
100
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement("pattern", {
101
- id: patternId,
102
- x: "0",
103
- y: "0",
104
- width: "16",
105
- height: "16",
106
- patternUnits: "userSpaceOnUse"
107
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement("rect", {
108
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner-background'),
109
- x: "0",
110
- y: "0",
111
- width: "16",
112
- height: "16"
113
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("rect", {
114
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner-checker'),
115
- x: "0",
116
- y: "0",
117
- width: "8",
118
- height: "8"
119
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("rect", {
120
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner-checker'),
121
- x: "8",
122
- y: "8",
123
- width: "8",
124
- height: "8"
125
- })), /*#__PURE__*/ (0, $1UQoL$react).createElement("path", {
126
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner'),
127
- d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
128
- fill: `url(#${patternId})`
129
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("path", {
130
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner'),
131
- d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
132
- fill: valueCSS
133
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("path", {
134
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-outer'),
135
- d: "M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z"
136
- }));
137
- }
138
-
139
-
140
- export {$3a90e89d07d7bbd5$export$a3cc47cee1c1ccc as ColorThumb};
141
- //# sourceMappingURL=ColorThumb.module.js.map
@@ -1,141 +0,0 @@
1
- import "./color.f801bfa3.css";
2
- import $1UQoL$colorhandle_vars_cssmodulejs from "./colorhandle_vars_css.module.js";
3
- import "./color.ff589589.css";
4
- import $1UQoL$colorloupe_vars_cssmodulejs from "./colorloupe_vars_css.module.js";
5
- import {classNames as $1UQoL$classNames} from "@react-spectrum/utils";
6
- import {Overlay as $1UQoL$Overlay} from "@react-spectrum/overlays";
7
- import $1UQoL$react, {useRef as $1UQoL$useRef, useState as $1UQoL$useState} from "react";
8
- import {useId as $1UQoL$useId, useLayoutEffect as $1UQoL$useLayoutEffect} from "@react-aria/utils";
9
- import {useProvider as $1UQoL$useProvider} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
- function $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc(props) {
33
- let { value: value, isDisabled: isDisabled, isDragging: isDragging, isFocused: isFocused, children: children, className: className = '', style: style, containerRef: containerRef, ...otherProps } = props;
34
- let valueCSS = value.toString('css');
35
- let loupeRef = (0, $1UQoL$useRef)(null);
36
- let provider = (0, $1UQoL$useProvider)();
37
- return /*#__PURE__*/ (0, $1UQoL$react).createElement("div", {
38
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorhandle_vars_cssmodulejs))), 'spectrum-ColorHandle', {
39
- 'is-focused': isFocused,
40
- 'is-disabled': isDisabled
41
- }) + ' ' + className,
42
- style: style,
43
- ...otherProps
44
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement("div", {
45
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorhandle_vars_cssmodulejs))), 'spectrum-ColorHandle-color'),
46
- style: {
47
- backgroundColor: valueCSS
48
- }
49
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement((0, $1UQoL$Overlay), {
50
- isOpen: isDragging && provider != null,
51
- nodeRef: loupeRef
52
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement($3a90e89d07d7bbd5$var$ColorLoupe, {
53
- valueCSS: valueCSS,
54
- containerRef: containerRef,
55
- loupeRef: loupeRef,
56
- style: style
57
- })), children);
58
- }
59
- // ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).
60
- function $3a90e89d07d7bbd5$var$ColorLoupe({ isOpen: isOpen, valueCSS: valueCSS, containerRef: containerRef, loupeRef: loupeRef, style: style }) {
61
- let patternId = (0, $1UQoL$useId)();
62
- // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).
63
- let [containerRect, setContainerRect] = (0, $1UQoL$useState)({
64
- top: 0,
65
- left: 0,
66
- width: 0,
67
- height: 0
68
- });
69
- (0, $1UQoL$useLayoutEffect)(()=>{
70
- var _containerRef_current;
71
- let rect = (_containerRef_current = containerRef.current) === null || _containerRef_current === void 0 ? void 0 : _containerRef_current.getBoundingClientRect();
72
- setContainerRect({
73
- top: (rect === null || rect === void 0 ? void 0 : rect.top) || 0,
74
- left: (rect === null || rect === void 0 ? void 0 : rect.left) || 0,
75
- width: (rect === null || rect === void 0 ? void 0 : rect.width) || 0,
76
- height: (rect === null || rect === void 0 ? void 0 : rect.height) || 0
77
- });
78
- }, [
79
- containerRef
80
- ]);
81
- // Compute the pixel position of the thumb.
82
- let thumbTop = style.top || '50%';
83
- if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;
84
- else if (typeof thumbTop === 'string' && thumbTop.endsWith('px')) thumbTop = parseFloat(thumbTop);
85
- let thumbLeft = style.left || '50%';
86
- if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;
87
- else if (typeof thumbLeft === 'string' && thumbLeft.endsWith('px')) thumbLeft = parseFloat(thumbLeft);
88
- return /*#__PURE__*/ (0, $1UQoL$react).createElement("svg", {
89
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe', {
90
- 'is-open': isOpen
91
- }),
92
- style: {
93
- // Position relative to the viewport.
94
- position: 'fixed',
95
- top: containerRect.top + thumbTop,
96
- left: containerRect.left + thumbLeft
97
- },
98
- ref: loupeRef,
99
- "aria-hidden": "true"
100
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement("pattern", {
101
- id: patternId,
102
- x: "0",
103
- y: "0",
104
- width: "16",
105
- height: "16",
106
- patternUnits: "userSpaceOnUse"
107
- }, /*#__PURE__*/ (0, $1UQoL$react).createElement("rect", {
108
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner-background'),
109
- x: "0",
110
- y: "0",
111
- width: "16",
112
- height: "16"
113
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("rect", {
114
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner-checker'),
115
- x: "0",
116
- y: "0",
117
- width: "8",
118
- height: "8"
119
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("rect", {
120
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner-checker'),
121
- x: "8",
122
- y: "8",
123
- width: "8",
124
- height: "8"
125
- })), /*#__PURE__*/ (0, $1UQoL$react).createElement("path", {
126
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner'),
127
- d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
128
- fill: `url(#${patternId})`
129
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("path", {
130
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-inner'),
131
- d: "M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z",
132
- fill: valueCSS
133
- }), /*#__PURE__*/ (0, $1UQoL$react).createElement("path", {
134
- className: (0, $1UQoL$classNames)((0, ($parcel$interopDefault($1UQoL$colorloupe_vars_cssmodulejs))), 'spectrum-ColorLoupe-outer'),
135
- d: "M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z"
136
- }));
137
- }
138
-
139
-
140
- export {$3a90e89d07d7bbd5$export$a3cc47cee1c1ccc as ColorThumb};
141
- //# sourceMappingURL=ColorThumb.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":"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","sources":["packages/@react-spectrum/color/src/ColorThumb.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames} from '@react-spectrum/utils';\nimport {Color} from '@react-types/color';\nimport {DOMProps, RefObject} from '@react-types/shared';\nimport {Overlay} from '@react-spectrum/overlays';\nimport React, {CSSProperties, JSX, ReactElement, useRef, useState} from 'react';\nimport stylesHandle from '@adobe/spectrum-css-temp/components/colorhandle/vars.css';\nimport stylesLoupe from '@adobe/spectrum-css-temp/components/colorloupe/vars.css';\nimport {useId, useLayoutEffect} from '@react-aria/utils';\nimport {useProvider} from '@react-spectrum/provider';\n\ninterface ColorThumbProps extends DOMProps {\n value: Color,\n isDisabled?: boolean,\n isDragging?: boolean, // shows the color loupe\n isFocused?: boolean, // makes the circle larger\n className?: string,\n children?: ReactElement,\n style?: CSSProperties,\n containerRef?: RefObject<HTMLElement | null>\n}\n\nfunction ColorThumb(props: ColorThumbProps): JSX.Element {\n let {value, isDisabled, isDragging, isFocused, children, className = '', style, containerRef, ...otherProps} = props;\n\n let valueCSS = value.toString('css');\n let loupeRef = useRef<HTMLElement | null>(null);\n let provider = useProvider();\n\n return (\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle', {'is-focused': isFocused, 'is-disabled': isDisabled}) + ' ' + className} style={style} {...otherProps}>\n <div className={classNames(stylesHandle, 'spectrum-ColorHandle-color')} style={{backgroundColor: valueCSS}} />\n <Overlay isOpen={isDragging && provider != null} nodeRef={loupeRef}>\n <ColorLoupe valueCSS={valueCSS} containerRef={containerRef} loupeRef={loupeRef} style={style} />\n </Overlay>\n {children}\n </div>\n );\n}\n\n// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers).\nfunction ColorLoupe({isOpen, valueCSS, containerRef, loupeRef, style}: any) {\n let patternId = useId();\n\n // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider).\n let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0});\n useLayoutEffect(() => {\n let rect = containerRef.current?.getBoundingClientRect();\n setContainerRect({\n top: rect?.top || 0,\n left: rect?.left || 0,\n width: rect?.width || 0,\n height: rect?.height || 0\n });\n }, [containerRef]);\n\n // Compute the pixel position of the thumb.\n let thumbTop = style.top || '50%';\n if (typeof thumbTop === 'string' && thumbTop.endsWith('%')) {\n thumbTop = parseFloat(style.top || '50%') / 100 * containerRect.height;\n } else if (typeof thumbTop === 'string' && thumbTop.endsWith('px')) {\n thumbTop = parseFloat(thumbTop);\n }\n\n let thumbLeft = style.left || '50%';\n if (typeof thumbLeft === 'string' && thumbLeft.endsWith('%')) {\n thumbLeft = parseFloat(thumbLeft || '50%') / 100 * containerRect.width;\n } else if (typeof thumbLeft === 'string' && thumbLeft.endsWith('px')) {\n thumbLeft = parseFloat(thumbLeft);\n }\n\n return (\n <svg\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe', {'is-open': isOpen})}\n style={{\n // Position relative to the viewport.\n position: 'fixed',\n top: containerRect.top + thumbTop,\n left: containerRect.left + thumbLeft\n }}\n ref={loupeRef}\n aria-hidden=\"true\">\n <pattern id={patternId} x=\"0\" y=\"0\" width=\"16\" height=\"16\" patternUnits=\"userSpaceOnUse\">\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-background')} x=\"0\" y=\"0\" width=\"16\" height=\"16\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"0\" y=\"0\" width=\"8\" height=\"8\" />\n <rect className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner-checker')} x=\"8\" y=\"8\" width=\"8\" height=\"8\" />\n </pattern>\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={`url(#${patternId})`} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-inner')}\n d=\"M25 1a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\"\n fill={valueCSS} />\n <path\n className={classNames(stylesLoupe, 'spectrum-ColorLoupe-outer')}\n d=\"M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z\" />\n </svg>\n );\n}\n\nexport {ColorThumb};\n"],"names":[],"version":3,"file":"ColorThumb.module.js.map"}
@@ -1,114 +0,0 @@
1
- var $2b9adc23f6c7cae1$exports = require("./ColorThumb.main.js");
2
- require("./color.0da417e8.css");
3
- var $8fc6b1a2f4e7f682$exports = require("./colorwheel_vars_css.main.js");
4
- var $gEgjt$reactspectrumutils = require("@react-spectrum/utils");
5
- var $gEgjt$reactariacomponents = require("react-aria-components");
6
- var $gEgjt$react = require("react");
7
- var $gEgjt$reactariacolor = require("@react-aria/color");
8
- var $gEgjt$reactstatelycolor = require("@react-stately/color");
9
- var $gEgjt$reactariafocus = require("@react-aria/focus");
10
- var $gEgjt$reactariautils = require("@react-aria/utils");
11
- var $gEgjt$reactspectrumprovider = require("@react-spectrum/provider");
12
-
13
-
14
- function $parcel$interopDefault(a) {
15
- return a && a.__esModule ? a.default : a;
16
- }
17
-
18
- function $parcel$export(e, n, v, s) {
19
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
20
- }
21
-
22
- $parcel$export(module.exports, "ColorWheel", () => $63a2864687444ae1$export$f80663f808113381);
23
- /*
24
- * Copyright 2020 Adobe. All rights reserved.
25
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
26
- * you may not use this file except in compliance with the License. You may obtain a copy
27
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
28
- *
29
- * Unless required by applicable law or agreed to in writing, software distributed under
30
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
31
- * OF ANY KIND, either express or implied. See the License for the specific language
32
- * governing permissions and limitations under the License.
33
- */
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
- const $63a2864687444ae1$var$WHEEL_THICKNESS = 24;
44
- const $63a2864687444ae1$export$f80663f808113381 = /*#__PURE__*/ (0, ($parcel$interopDefault($gEgjt$react))).forwardRef(function ColorWheel(props, ref) {
45
- props = (0, $gEgjt$reactspectrumprovider.useProviderProps)(props);
46
- let inputRef = (0, $gEgjt$react.useRef)(null);
47
- let containerRef = (0, $gEgjt$reactspectrumutils.useFocusableRef)(ref, inputRef);
48
- [props, containerRef] = (0, $gEgjt$reactariacomponents.useContextProps)(props, containerRef, (0, $gEgjt$reactariacomponents.ColorWheelContext));
49
- let { isDisabled: isDisabled } = props;
50
- let size = props.size && (0, $gEgjt$reactspectrumutils.dimensionValue)(props.size);
51
- let { styleProps: styleProps } = (0, $gEgjt$reactspectrumutils.useStyleProps)(props);
52
- let [wheelRadius, setWheelRadius] = (0, $gEgjt$react.useState)(0);
53
- let [wheelThickness, setWheelThickness] = (0, $gEgjt$react.useState)($63a2864687444ae1$var$WHEEL_THICKNESS);
54
- let resizeHandler = (0, $gEgjt$react.useCallback)(()=>{
55
- if (containerRef.current) {
56
- setWheelRadius(containerRef.current.offsetWidth / 2);
57
- let thickness = window.getComputedStyle(containerRef.current).getPropertyValue('--spectrum-colorwheel-track-thickness');
58
- if (thickness) setWheelThickness(parseInt(thickness, 10));
59
- }
60
- }, [
61
- containerRef,
62
- setWheelRadius,
63
- setWheelThickness
64
- ]);
65
- (0, $gEgjt$reactariautils.useLayoutEffect)(()=>{
66
- // the size observer's fallback to the window resize event doesn't fire on mount
67
- if (wheelRadius === 0) resizeHandler();
68
- }, [
69
- wheelRadius,
70
- resizeHandler
71
- ]);
72
- (0, $gEgjt$reactariautils.useResizeObserver)({
73
- ref: containerRef,
74
- onResize: resizeHandler
75
- });
76
- let state = (0, $gEgjt$reactstatelycolor.useColorWheelState)(props);
77
- let { trackProps: trackProps, inputProps: inputProps, thumbProps: thumbProps } = (0, $gEgjt$reactariacolor.useColorWheel)({
78
- ...props,
79
- innerRadius: wheelRadius - wheelThickness,
80
- outerRadius: wheelRadius
81
- }, state, inputRef);
82
- let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $gEgjt$reactariafocus.useFocusRing)();
83
- return /*#__PURE__*/ (0, ($parcel$interopDefault($gEgjt$react))).createElement("div", {
84
- className: (0, $gEgjt$reactspectrumutils.classNames)((0, ($parcel$interopDefault($8fc6b1a2f4e7f682$exports))), 'spectrum-ColorWheel', {
85
- 'is-disabled': isDisabled
86
- }, styleProps.className),
87
- ref: containerRef,
88
- style: {
89
- ...styleProps.style,
90
- // Workaround around https://github.com/adobe/spectrum-css/issues/1032
91
- 'width': size,
92
- 'height': size
93
- }
94
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($gEgjt$react))).createElement("div", {
95
- ...trackProps,
96
- className: (0, $gEgjt$reactspectrumutils.classNames)((0, ($parcel$interopDefault($8fc6b1a2f4e7f682$exports))), 'spectrum-ColorWheel-gradient')
97
- }), /*#__PURE__*/ (0, ($parcel$interopDefault($gEgjt$react))).createElement((0, $2b9adc23f6c7cae1$exports.ColorThumb), {
98
- value: state.getDisplayColor(),
99
- isFocused: isFocusVisible,
100
- isDisabled: isDisabled,
101
- isDragging: state.isDragging,
102
- containerRef: containerRef,
103
- className: (0, $gEgjt$reactspectrumutils.classNames)((0, ($parcel$interopDefault($8fc6b1a2f4e7f682$exports))), 'spectrum-ColorWheel-handle'),
104
- ...thumbProps
105
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($gEgjt$react))).createElement("input", {
106
- ...focusProps,
107
- className: (0, $gEgjt$reactspectrumutils.classNames)((0, ($parcel$interopDefault($8fc6b1a2f4e7f682$exports))), 'spectrum-ColorWheel-slider'),
108
- ...inputProps,
109
- ref: inputRef
110
- })));
111
- });
112
-
113
-
114
- //# sourceMappingURL=ColorWheel.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAeD,MAAM,wCAAkB;AAKjB,MAAM,0DAAa,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,WAAW,KAA8B,EAAE,GAAiC;IAC9H,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,eAAe,CAAA,GAAA,yCAAc,EAAE,KAAK;IACxC,CAAC,OAAO,aAAa,GAAG,CAAA,GAAA,0CAAc,EAAE,OAAO,cAAc,CAAA,GAAA,4CAAgB;IAE7E,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,OAAO,MAAM,IAAI,IAAI,CAAA,GAAA,wCAAa,EAAE,MAAM,IAAI;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAGjC,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAU;IACrD,IAAI,CAAC,gBAAgB,kBAAkB,GAAG,CAAA,GAAA,qBAAO,EAAE;IAEnD,IAAI,gBAAgB,CAAA,GAAA,wBAAU,EAAE;QAC9B,IAAI,aAAa,OAAO,EAAE;YACxB,eAAe,aAAa,OAAO,CAAC,WAAW,GAAG;YAClD,IAAI,YAAY,OAAO,gBAAgB,CAAC,aAAa,OAAO,EACzD,gBAAgB,CAAC;YACpB,IAAI,WACF,kBAAkB,SAAS,WAAW;QAE1C;IACF,GAAG;QAAC;QAAc;QAAgB;KAAkB;IAEpD,CAAA,GAAA,qCAAc,EAAE;QACd,gFAAgF;QAChF,IAAI,gBAAgB,GAClB;IAEJ,GAAG;QAAC;QAAa;KAAc;IAE/B,CAAA,GAAA,uCAAgB,EAAE;QAChB,KAAK;QACL,UAAU;IACZ;IAEA,IAAI,QAAQ,CAAA,GAAA,2CAAiB,EAAE;IAE/B,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mCAAY,EAAE;QACvD,GAAG,KAAK;QACR,aAAa,cAAc;QAC3B,aAAa;IACf,GAAG,OAAO;IAEV,IAAI,cAAC,UAAU,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,kCAAW;IAE9C,qBACE,0DAAC;QACC,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,uBACA;YACE,eAAe;QACjB,GACA,WAAW,SAAS;QAGxB,KAAK;QACL,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,sEAAsE;YACtE,SAAS;YACT,UAAU;QACZ;qBACA,0DAAC;QAAK,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBACnD,0DAAC,CAAA,GAAA,oCAAS;QACR,OAAO,MAAM,eAAe;QAC5B,WAAW;QACX,YAAY;QACZ,YAAY,MAAM,UAAU;QAC5B,cAAc;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC7B,GAAG,UAAU;qBACd,0DAAC;QAAO,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAAgC,GAAG,UAAU;QAAE,KAAK;;AAIjH","sources":["packages/@react-spectrum/color/src/ColorWheel.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {classNames, dimensionValue, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {ColorThumb} from './ColorThumb';\nimport {ColorWheelContext, useContextProps} from 'react-aria-components';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {useCallback, useRef, useState} from 'react';\nimport {SpectrumColorWheelProps} from '@react-types/color';\nimport styles from '@adobe/spectrum-css-temp/components/colorwheel/vars.css';\nimport {useColorWheel} from '@react-aria/color';\nimport {useColorWheelState} from '@react-stately/color';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useLayoutEffect, useResizeObserver} from '@react-aria/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst WHEEL_THICKNESS = 24;\n\n/**\n * ColorWheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport const ColorWheel = React.forwardRef(function ColorWheel(props: SpectrumColorWheelProps, ref: FocusableRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let inputRef = useRef(null);\n let containerRef = useFocusableRef(ref, inputRef);\n [props, containerRef] = useContextProps(props, containerRef, ColorWheelContext);\n\n let {isDisabled} = props;\n let size = props.size && dimensionValue(props.size);\n let {styleProps} = useStyleProps(props);\n\n\n let [wheelRadius, setWheelRadius] = useState<number>(0);\n let [wheelThickness, setWheelThickness] = useState(WHEEL_THICKNESS);\n\n let resizeHandler = useCallback(() => {\n if (containerRef.current) {\n setWheelRadius(containerRef.current.offsetWidth / 2);\n let thickness = window.getComputedStyle(containerRef.current)\n .getPropertyValue('--spectrum-colorwheel-track-thickness');\n if (thickness) {\n setWheelThickness(parseInt(thickness, 10));\n }\n }\n }, [containerRef, setWheelRadius, setWheelThickness]);\n\n useLayoutEffect(() => {\n // the size observer's fallback to the window resize event doesn't fire on mount\n if (wheelRadius === 0) {\n resizeHandler();\n }\n }, [wheelRadius, resizeHandler]);\n\n useResizeObserver({\n ref: containerRef,\n onResize: resizeHandler\n });\n\n let state = useColorWheelState(props);\n\n let {trackProps, inputProps, thumbProps} = useColorWheel({\n ...props,\n innerRadius: wheelRadius - wheelThickness,\n outerRadius: wheelRadius\n }, state, inputRef);\n\n let {focusProps, isFocusVisible} = useFocusRing();\n\n return (\n <div\n className={\n classNames(\n styles,\n 'spectrum-ColorWheel',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={containerRef}\n style={{\n ...styleProps.style,\n // Workaround around https://github.com/adobe/spectrum-css/issues/1032\n 'width': size,\n 'height': size\n }}>\n <div {...trackProps} className={classNames(styles, 'spectrum-ColorWheel-gradient')} />\n <ColorThumb\n value={state.getDisplayColor()}\n isFocused={isFocusVisible}\n isDisabled={isDisabled}\n isDragging={state.isDragging}\n containerRef={containerRef}\n className={classNames(styles, 'spectrum-ColorWheel-handle')}\n {...thumbProps}>\n <input {...focusProps} className={classNames(styles, 'spectrum-ColorWheel-slider')} {...inputProps} ref={inputRef} />\n </ColorThumb>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ColorWheel.main.js.map"}
@@ -1,109 +0,0 @@
1
- import {ColorThumb as $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc} from "./ColorThumb.mjs";
2
- import "./color.0da417e8.css";
3
- import $bv4AR$colorwheel_vars_cssmodulejs from "./colorwheel_vars_css.mjs";
4
- import {useFocusableRef as $bv4AR$useFocusableRef, dimensionValue as $bv4AR$dimensionValue, useStyleProps as $bv4AR$useStyleProps, classNames as $bv4AR$classNames} from "@react-spectrum/utils";
5
- import {useContextProps as $bv4AR$useContextProps, ColorWheelContext as $bv4AR$ColorWheelContext} from "react-aria-components";
6
- import $bv4AR$react, {useRef as $bv4AR$useRef, useState as $bv4AR$useState, useCallback as $bv4AR$useCallback} from "react";
7
- import {useColorWheel as $bv4AR$useColorWheel} from "@react-aria/color";
8
- import {useColorWheelState as $bv4AR$useColorWheelState} from "@react-stately/color";
9
- import {useFocusRing as $bv4AR$useFocusRing} from "@react-aria/focus";
10
- import {useLayoutEffect as $bv4AR$useLayoutEffect, useResizeObserver as $bv4AR$useResizeObserver} from "@react-aria/utils";
11
- import {useProviderProps as $bv4AR$useProviderProps} from "@react-spectrum/provider";
12
-
13
-
14
- function $parcel$interopDefault(a) {
15
- return a && a.__esModule ? a.default : a;
16
- }
17
- /*
18
- * Copyright 2020 Adobe. All rights reserved.
19
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
- * you may not use this file except in compliance with the License. You may obtain a copy
21
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
- *
23
- * Unless required by applicable law or agreed to in writing, software distributed under
24
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
- * OF ANY KIND, either express or implied. See the License for the specific language
26
- * governing permissions and limitations under the License.
27
- */
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
- const $3aac1c27203f04b5$var$WHEEL_THICKNESS = 24;
38
- const $3aac1c27203f04b5$export$f80663f808113381 = /*#__PURE__*/ (0, $bv4AR$react).forwardRef(function ColorWheel(props, ref) {
39
- props = (0, $bv4AR$useProviderProps)(props);
40
- let inputRef = (0, $bv4AR$useRef)(null);
41
- let containerRef = (0, $bv4AR$useFocusableRef)(ref, inputRef);
42
- [props, containerRef] = (0, $bv4AR$useContextProps)(props, containerRef, (0, $bv4AR$ColorWheelContext));
43
- let { isDisabled: isDisabled } = props;
44
- let size = props.size && (0, $bv4AR$dimensionValue)(props.size);
45
- let { styleProps: styleProps } = (0, $bv4AR$useStyleProps)(props);
46
- let [wheelRadius, setWheelRadius] = (0, $bv4AR$useState)(0);
47
- let [wheelThickness, setWheelThickness] = (0, $bv4AR$useState)($3aac1c27203f04b5$var$WHEEL_THICKNESS);
48
- let resizeHandler = (0, $bv4AR$useCallback)(()=>{
49
- if (containerRef.current) {
50
- setWheelRadius(containerRef.current.offsetWidth / 2);
51
- let thickness = window.getComputedStyle(containerRef.current).getPropertyValue('--spectrum-colorwheel-track-thickness');
52
- if (thickness) setWheelThickness(parseInt(thickness, 10));
53
- }
54
- }, [
55
- containerRef,
56
- setWheelRadius,
57
- setWheelThickness
58
- ]);
59
- (0, $bv4AR$useLayoutEffect)(()=>{
60
- // the size observer's fallback to the window resize event doesn't fire on mount
61
- if (wheelRadius === 0) resizeHandler();
62
- }, [
63
- wheelRadius,
64
- resizeHandler
65
- ]);
66
- (0, $bv4AR$useResizeObserver)({
67
- ref: containerRef,
68
- onResize: resizeHandler
69
- });
70
- let state = (0, $bv4AR$useColorWheelState)(props);
71
- let { trackProps: trackProps, inputProps: inputProps, thumbProps: thumbProps } = (0, $bv4AR$useColorWheel)({
72
- ...props,
73
- innerRadius: wheelRadius - wheelThickness,
74
- outerRadius: wheelRadius
75
- }, state, inputRef);
76
- let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $bv4AR$useFocusRing)();
77
- return /*#__PURE__*/ (0, $bv4AR$react).createElement("div", {
78
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel', {
79
- 'is-disabled': isDisabled
80
- }, styleProps.className),
81
- ref: containerRef,
82
- style: {
83
- ...styleProps.style,
84
- // Workaround around https://github.com/adobe/spectrum-css/issues/1032
85
- 'width': size,
86
- 'height': size
87
- }
88
- }, /*#__PURE__*/ (0, $bv4AR$react).createElement("div", {
89
- ...trackProps,
90
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel-gradient')
91
- }), /*#__PURE__*/ (0, $bv4AR$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
92
- value: state.getDisplayColor(),
93
- isFocused: isFocusVisible,
94
- isDisabled: isDisabled,
95
- isDragging: state.isDragging,
96
- containerRef: containerRef,
97
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel-handle'),
98
- ...thumbProps
99
- }, /*#__PURE__*/ (0, $bv4AR$react).createElement("input", {
100
- ...focusProps,
101
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel-slider'),
102
- ...inputProps,
103
- ref: inputRef
104
- })));
105
- });
106
-
107
-
108
- export {$3aac1c27203f04b5$export$f80663f808113381 as ColorWheel};
109
- //# sourceMappingURL=ColorWheel.module.js.map
@@ -1,109 +0,0 @@
1
- import {ColorThumb as $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc} from "./ColorThumb.module.js";
2
- import "./color.0da417e8.css";
3
- import $bv4AR$colorwheel_vars_cssmodulejs from "./colorwheel_vars_css.module.js";
4
- import {useFocusableRef as $bv4AR$useFocusableRef, dimensionValue as $bv4AR$dimensionValue, useStyleProps as $bv4AR$useStyleProps, classNames as $bv4AR$classNames} from "@react-spectrum/utils";
5
- import {useContextProps as $bv4AR$useContextProps, ColorWheelContext as $bv4AR$ColorWheelContext} from "react-aria-components";
6
- import $bv4AR$react, {useRef as $bv4AR$useRef, useState as $bv4AR$useState, useCallback as $bv4AR$useCallback} from "react";
7
- import {useColorWheel as $bv4AR$useColorWheel} from "@react-aria/color";
8
- import {useColorWheelState as $bv4AR$useColorWheelState} from "@react-stately/color";
9
- import {useFocusRing as $bv4AR$useFocusRing} from "@react-aria/focus";
10
- import {useLayoutEffect as $bv4AR$useLayoutEffect, useResizeObserver as $bv4AR$useResizeObserver} from "@react-aria/utils";
11
- import {useProviderProps as $bv4AR$useProviderProps} from "@react-spectrum/provider";
12
-
13
-
14
- function $parcel$interopDefault(a) {
15
- return a && a.__esModule ? a.default : a;
16
- }
17
- /*
18
- * Copyright 2020 Adobe. All rights reserved.
19
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
- * you may not use this file except in compliance with the License. You may obtain a copy
21
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
- *
23
- * Unless required by applicable law or agreed to in writing, software distributed under
24
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
- * OF ANY KIND, either express or implied. See the License for the specific language
26
- * governing permissions and limitations under the License.
27
- */
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
- const $3aac1c27203f04b5$var$WHEEL_THICKNESS = 24;
38
- const $3aac1c27203f04b5$export$f80663f808113381 = /*#__PURE__*/ (0, $bv4AR$react).forwardRef(function ColorWheel(props, ref) {
39
- props = (0, $bv4AR$useProviderProps)(props);
40
- let inputRef = (0, $bv4AR$useRef)(null);
41
- let containerRef = (0, $bv4AR$useFocusableRef)(ref, inputRef);
42
- [props, containerRef] = (0, $bv4AR$useContextProps)(props, containerRef, (0, $bv4AR$ColorWheelContext));
43
- let { isDisabled: isDisabled } = props;
44
- let size = props.size && (0, $bv4AR$dimensionValue)(props.size);
45
- let { styleProps: styleProps } = (0, $bv4AR$useStyleProps)(props);
46
- let [wheelRadius, setWheelRadius] = (0, $bv4AR$useState)(0);
47
- let [wheelThickness, setWheelThickness] = (0, $bv4AR$useState)($3aac1c27203f04b5$var$WHEEL_THICKNESS);
48
- let resizeHandler = (0, $bv4AR$useCallback)(()=>{
49
- if (containerRef.current) {
50
- setWheelRadius(containerRef.current.offsetWidth / 2);
51
- let thickness = window.getComputedStyle(containerRef.current).getPropertyValue('--spectrum-colorwheel-track-thickness');
52
- if (thickness) setWheelThickness(parseInt(thickness, 10));
53
- }
54
- }, [
55
- containerRef,
56
- setWheelRadius,
57
- setWheelThickness
58
- ]);
59
- (0, $bv4AR$useLayoutEffect)(()=>{
60
- // the size observer's fallback to the window resize event doesn't fire on mount
61
- if (wheelRadius === 0) resizeHandler();
62
- }, [
63
- wheelRadius,
64
- resizeHandler
65
- ]);
66
- (0, $bv4AR$useResizeObserver)({
67
- ref: containerRef,
68
- onResize: resizeHandler
69
- });
70
- let state = (0, $bv4AR$useColorWheelState)(props);
71
- let { trackProps: trackProps, inputProps: inputProps, thumbProps: thumbProps } = (0, $bv4AR$useColorWheel)({
72
- ...props,
73
- innerRadius: wheelRadius - wheelThickness,
74
- outerRadius: wheelRadius
75
- }, state, inputRef);
76
- let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $bv4AR$useFocusRing)();
77
- return /*#__PURE__*/ (0, $bv4AR$react).createElement("div", {
78
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel', {
79
- 'is-disabled': isDisabled
80
- }, styleProps.className),
81
- ref: containerRef,
82
- style: {
83
- ...styleProps.style,
84
- // Workaround around https://github.com/adobe/spectrum-css/issues/1032
85
- 'width': size,
86
- 'height': size
87
- }
88
- }, /*#__PURE__*/ (0, $bv4AR$react).createElement("div", {
89
- ...trackProps,
90
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel-gradient')
91
- }), /*#__PURE__*/ (0, $bv4AR$react).createElement((0, $3a90e89d07d7bbd5$export$a3cc47cee1c1ccc), {
92
- value: state.getDisplayColor(),
93
- isFocused: isFocusVisible,
94
- isDisabled: isDisabled,
95
- isDragging: state.isDragging,
96
- containerRef: containerRef,
97
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel-handle'),
98
- ...thumbProps
99
- }, /*#__PURE__*/ (0, $bv4AR$react).createElement("input", {
100
- ...focusProps,
101
- className: (0, $bv4AR$classNames)((0, ($parcel$interopDefault($bv4AR$colorwheel_vars_cssmodulejs))), 'spectrum-ColorWheel-slider'),
102
- ...inputProps,
103
- ref: inputRef
104
- })));
105
- });
106
-
107
-
108
- export {$3aac1c27203f04b5$export$f80663f808113381 as ColorWheel};
109
- //# sourceMappingURL=ColorWheel.module.js.map