@fab1o978/react-ui 0.1.7 → 0.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.
- package/dist/components/Badge/index.d.cts +3 -3
- package/dist/components/Badge/index.d.ts +3 -3
- package/dist/components/Button/index.d.cts +3 -3
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/ColorPicker/index.cjs +3 -1
- package/dist/components/ColorPicker/index.cjs.map +1 -1
- package/dist/components/ColorPicker/index.d.cts +2 -2
- package/dist/components/ColorPicker/index.d.ts +2 -2
- package/dist/components/ColorPicker/index.js +3 -1
- package/dist/components/ColorPicker/index.js.map +1 -1
- package/dist/components/ColorWheel/index.cjs +671 -0
- package/dist/components/ColorWheel/index.cjs.map +1 -0
- package/dist/components/ColorWheel/index.css +494 -0
- package/dist/components/ColorWheel/index.css.map +1 -0
- package/dist/components/ColorWheel/index.d.cts +49 -0
- package/dist/components/ColorWheel/index.d.ts +49 -0
- package/dist/components/ColorWheel/index.js +669 -0
- package/dist/components/ColorWheel/index.js.map +1 -0
- package/dist/components/Input/index.d.cts +5 -5
- package/dist/components/Input/index.d.ts +5 -5
- package/dist/components/RainCanvas/index.d.cts +4 -4
- package/dist/components/RainCanvas/index.d.ts +4 -4
- package/dist/components/RichTextEditor/index.d.cts +6 -6
- package/dist/components/RichTextEditor/index.d.ts +6 -6
- package/dist/components/SliderControl/index.cjs +3 -1
- package/dist/components/SliderControl/index.cjs.map +1 -1
- package/dist/components/SliderControl/index.d.cts +5 -4
- package/dist/components/SliderControl/index.d.ts +5 -4
- package/dist/components/SliderControl/index.js +3 -1
- package/dist/components/SliderControl/index.js.map +1 -1
- package/dist/components/SlidingCounter/index.d.cts +2 -2
- package/dist/components/SlidingCounter/index.d.ts +2 -2
- package/dist/components/Timeline/index.d.cts +3 -3
- package/dist/components/Timeline/index.d.ts +3 -3
- package/dist/index.cjs +591 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +494 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +592 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
/* src/components/ColorWheel/ColorWheel.module.scss */
|
|
2
|
+
.ColorWheel_module_root2 {
|
|
3
|
+
--bg: #ECEAE3;
|
|
4
|
+
--surface: #FFFFFF;
|
|
5
|
+
--surface-2: #E3E0D8;
|
|
6
|
+
--border: #D2CDC0;
|
|
7
|
+
--text: #1A1913;
|
|
8
|
+
--text-dim: #726F64;
|
|
9
|
+
--text-faint: #A8A398;
|
|
10
|
+
--shadow-soft: 0 1px 2px rgba(30, 25, 15, 0.08);
|
|
11
|
+
--check-a: #d8d4c8;
|
|
12
|
+
--check-b: #f4f2ec;
|
|
13
|
+
color-scheme: light;
|
|
14
|
+
}
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
.ColorWheel_module_root2:not([data-theme=light]):not([data-theme=dark]) {
|
|
17
|
+
--bg: #131217;
|
|
18
|
+
--surface: #1C1B22;
|
|
19
|
+
--surface-2: #26252E;
|
|
20
|
+
--border: #34333D;
|
|
21
|
+
--text: #ECEAF0;
|
|
22
|
+
--text-dim: #8E8C99;
|
|
23
|
+
--text-faint: #605E6B;
|
|
24
|
+
--shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35);
|
|
25
|
+
--check-a: #37353f;
|
|
26
|
+
--check-b: #201f26;
|
|
27
|
+
color-scheme: dark;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
[data-theme=light] .ColorWheel_module_root2:not([data-theme=light]):not([data-theme=dark]) {
|
|
31
|
+
--bg: #ECEAE3;
|
|
32
|
+
--surface: #FFFFFF;
|
|
33
|
+
--surface-2: #E3E0D8;
|
|
34
|
+
--border: #D2CDC0;
|
|
35
|
+
--text: #1A1913;
|
|
36
|
+
--text-dim: #726F64;
|
|
37
|
+
--text-faint: #A8A398;
|
|
38
|
+
--shadow-soft: 0 1px 2px rgba(30, 25, 15, 0.08);
|
|
39
|
+
--check-a: #d8d4c8;
|
|
40
|
+
--check-b: #f4f2ec;
|
|
41
|
+
color-scheme: light;
|
|
42
|
+
}
|
|
43
|
+
[data-theme=dark] .ColorWheel_module_root2:not([data-theme=light]):not([data-theme=dark]) {
|
|
44
|
+
--bg: #131217;
|
|
45
|
+
--surface: #1C1B22;
|
|
46
|
+
--surface-2: #26252E;
|
|
47
|
+
--border: #34333D;
|
|
48
|
+
--text: #ECEAF0;
|
|
49
|
+
--text-dim: #8E8C99;
|
|
50
|
+
--text-faint: #605E6B;
|
|
51
|
+
--shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35);
|
|
52
|
+
--check-a: #37353f;
|
|
53
|
+
--check-b: #201f26;
|
|
54
|
+
color-scheme: dark;
|
|
55
|
+
}
|
|
56
|
+
.ColorWheel_module_root2[data-theme=dark] {
|
|
57
|
+
--bg: #131217;
|
|
58
|
+
--surface: #1C1B22;
|
|
59
|
+
--surface-2: #26252E;
|
|
60
|
+
--border: #34333D;
|
|
61
|
+
--text: #ECEAF0;
|
|
62
|
+
--text-dim: #8E8C99;
|
|
63
|
+
--text-faint: #605E6B;
|
|
64
|
+
--shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35);
|
|
65
|
+
--check-a: #37353f;
|
|
66
|
+
--check-b: #201f26;
|
|
67
|
+
color-scheme: dark;
|
|
68
|
+
}
|
|
69
|
+
.ColorWheel_module_root2[data-theme=light] {
|
|
70
|
+
--bg: #ECEAE3;
|
|
71
|
+
--surface: #FFFFFF;
|
|
72
|
+
--surface-2: #E3E0D8;
|
|
73
|
+
--border: #D2CDC0;
|
|
74
|
+
--text: #1A1913;
|
|
75
|
+
--text-dim: #726F64;
|
|
76
|
+
--text-faint: #A8A398;
|
|
77
|
+
--shadow-soft: 0 1px 2px rgba(30, 25, 15, 0.08);
|
|
78
|
+
--check-a: #d8d4c8;
|
|
79
|
+
--check-b: #f4f2ec;
|
|
80
|
+
color-scheme: light;
|
|
81
|
+
}
|
|
82
|
+
.ColorWheel_module_root2 {
|
|
83
|
+
position: relative;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 20px;
|
|
88
|
+
font-family:
|
|
89
|
+
-apple-system,
|
|
90
|
+
"Segoe UI",
|
|
91
|
+
Inter,
|
|
92
|
+
"Helvetica Neue",
|
|
93
|
+
Arial,
|
|
94
|
+
sans-serif;
|
|
95
|
+
color: var(--text);
|
|
96
|
+
}
|
|
97
|
+
@media (prefers-reduced-motion: reduce) {
|
|
98
|
+
.ColorWheel_module_root2,
|
|
99
|
+
.ColorWheel_module_root2 *,
|
|
100
|
+
.ColorWheel_module_root2 *::before,
|
|
101
|
+
.ColorWheel_module_root2 *::after {
|
|
102
|
+
animation-duration: 0.01ms !important;
|
|
103
|
+
transition-duration: 0.01ms !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
.ColorWheel_module_recents2 {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 7px;
|
|
110
|
+
min-height: 30px;
|
|
111
|
+
background: var(--surface-2);
|
|
112
|
+
border-radius: 999px;
|
|
113
|
+
padding: 5px 8px;
|
|
114
|
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.14), var(--shadow-soft);
|
|
115
|
+
}
|
|
116
|
+
.ColorWheel_module_chipWrap2 {
|
|
117
|
+
position: relative;
|
|
118
|
+
flex: none;
|
|
119
|
+
animation: ColorWheel_module_chipIn2 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
|
|
120
|
+
}
|
|
121
|
+
.ColorWheel_module_chip2 {
|
|
122
|
+
width: 26px;
|
|
123
|
+
height: 26px;
|
|
124
|
+
border-radius: 50%;
|
|
125
|
+
border: none;
|
|
126
|
+
padding: 0;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
display: block;
|
|
129
|
+
box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.22), var(--shadow-soft);
|
|
130
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
131
|
+
}
|
|
132
|
+
.ColorWheel_module_chip2:hover {
|
|
133
|
+
transform: scale(1.14) translateY(-1px);
|
|
134
|
+
box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.3), 0 4px 10px -3px rgba(0, 0, 0, 0.3);
|
|
135
|
+
}
|
|
136
|
+
.ColorWheel_module_chip2:active {
|
|
137
|
+
transform: scale(1.02);
|
|
138
|
+
}
|
|
139
|
+
.ColorWheel_module_chipRemove2 {
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: -3px;
|
|
142
|
+
right: -3px;
|
|
143
|
+
width: 14px;
|
|
144
|
+
height: 14px;
|
|
145
|
+
border-radius: 50%;
|
|
146
|
+
border: none;
|
|
147
|
+
padding: 0;
|
|
148
|
+
display: grid;
|
|
149
|
+
place-items: center;
|
|
150
|
+
background: var(--surface);
|
|
151
|
+
color: var(--text-dim);
|
|
152
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(128, 128, 128, 0.25);
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
z-index: 2;
|
|
155
|
+
opacity: 0;
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
transform: scale(0.6);
|
|
158
|
+
transition:
|
|
159
|
+
opacity 0.12s ease,
|
|
160
|
+
transform 0.12s ease,
|
|
161
|
+
color 0.12s ease;
|
|
162
|
+
}
|
|
163
|
+
.ColorWheel_module_chipRemove2 svg {
|
|
164
|
+
width: 8px;
|
|
165
|
+
height: 8px;
|
|
166
|
+
}
|
|
167
|
+
.ColorWheel_module_chipRemove2:hover {
|
|
168
|
+
color: var(--text);
|
|
169
|
+
}
|
|
170
|
+
.ColorWheel_module_chipWrap2:hover .ColorWheel_module_chipRemove2 {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
pointer-events: auto;
|
|
173
|
+
transform: scale(1);
|
|
174
|
+
}
|
|
175
|
+
@keyframes ColorWheel_module_chipIn2 {
|
|
176
|
+
0% {
|
|
177
|
+
transform: scale(0) rotate(-25deg);
|
|
178
|
+
opacity: 0;
|
|
179
|
+
}
|
|
180
|
+
100% {
|
|
181
|
+
transform: scale(1) rotate(0);
|
|
182
|
+
opacity: 1;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
.ColorWheel_module_picker2 {
|
|
186
|
+
position: relative;
|
|
187
|
+
margin-top: 82px;
|
|
188
|
+
height: 265px;
|
|
189
|
+
width: 272px;
|
|
190
|
+
}
|
|
191
|
+
.ColorWheel_module_glow2 {
|
|
192
|
+
position: absolute;
|
|
193
|
+
width: 340px;
|
|
194
|
+
height: 340px;
|
|
195
|
+
left: 50%;
|
|
196
|
+
top: 88px;
|
|
197
|
+
transform: translate(-50%, -50%);
|
|
198
|
+
border-radius: 50%;
|
|
199
|
+
opacity: 0.55;
|
|
200
|
+
pointer-events: none;
|
|
201
|
+
z-index: 0;
|
|
202
|
+
}
|
|
203
|
+
.ColorWheel_module_modeToggle2 {
|
|
204
|
+
position: absolute;
|
|
205
|
+
top: 88px;
|
|
206
|
+
left: 50%;
|
|
207
|
+
transform: translate(-50%, calc(-50% - 156px));
|
|
208
|
+
z-index: 3;
|
|
209
|
+
display: grid;
|
|
210
|
+
background: var(--surface-2);
|
|
211
|
+
border-radius: 999px;
|
|
212
|
+
padding: 3px;
|
|
213
|
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.14), var(--shadow-soft);
|
|
214
|
+
}
|
|
215
|
+
.ColorWheel_module_modePill2 {
|
|
216
|
+
position: absolute;
|
|
217
|
+
top: 3px;
|
|
218
|
+
bottom: 3px;
|
|
219
|
+
left: 3px;
|
|
220
|
+
border-radius: 999px;
|
|
221
|
+
background: var(--surface);
|
|
222
|
+
box-shadow: var(--shadow-soft);
|
|
223
|
+
transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
224
|
+
}
|
|
225
|
+
.ColorWheel_module_modeButton2 {
|
|
226
|
+
position: relative;
|
|
227
|
+
z-index: 1;
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
justify-content: center;
|
|
231
|
+
height: 22px;
|
|
232
|
+
background: none;
|
|
233
|
+
border: none;
|
|
234
|
+
padding: 0;
|
|
235
|
+
font-size: 10.5px;
|
|
236
|
+
font-weight: 700;
|
|
237
|
+
line-height: 22px;
|
|
238
|
+
letter-spacing: 0.02em;
|
|
239
|
+
color: var(--text-dim);
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
transition: color 0.2s ease;
|
|
242
|
+
}
|
|
243
|
+
.ColorWheel_module_modeButton2.ColorWheel_module_active2 {
|
|
244
|
+
color: var(--text);
|
|
245
|
+
}
|
|
246
|
+
.ColorWheel_module_modeButton2:hover:not(.ColorWheel_module_active2) {
|
|
247
|
+
color: var(--text);
|
|
248
|
+
}
|
|
249
|
+
.ColorWheel_module_stage2 {
|
|
250
|
+
position: absolute;
|
|
251
|
+
top: -48px;
|
|
252
|
+
left: 50%;
|
|
253
|
+
width: 272px;
|
|
254
|
+
height: 272px;
|
|
255
|
+
transform: translateX(-50%);
|
|
256
|
+
touch-action: none;
|
|
257
|
+
}
|
|
258
|
+
.ColorWheel_module_stageShadow2 {
|
|
259
|
+
position: absolute;
|
|
260
|
+
inset: 0;
|
|
261
|
+
border-radius: 50%;
|
|
262
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22), 0 10px 18px rgba(0, 0, 0, 0.22);
|
|
263
|
+
pointer-events: none;
|
|
264
|
+
}
|
|
265
|
+
.ColorWheel_module_ring2 {
|
|
266
|
+
position: absolute;
|
|
267
|
+
inset: 0;
|
|
268
|
+
border-radius: 50%;
|
|
269
|
+
pointer-events: none;
|
|
270
|
+
z-index: 2;
|
|
271
|
+
-webkit-mask:
|
|
272
|
+
radial-gradient(
|
|
273
|
+
circle closest-side,
|
|
274
|
+
transparent 0 92px,
|
|
275
|
+
black 93px 100%);
|
|
276
|
+
mask:
|
|
277
|
+
radial-gradient(
|
|
278
|
+
circle closest-side,
|
|
279
|
+
transparent 0 92px,
|
|
280
|
+
black 93px 100%);
|
|
281
|
+
}
|
|
282
|
+
.ColorWheel_module_hueHandlePivot2 {
|
|
283
|
+
position: absolute;
|
|
284
|
+
top: 50%;
|
|
285
|
+
left: 50%;
|
|
286
|
+
width: 0;
|
|
287
|
+
height: 0;
|
|
288
|
+
z-index: 3;
|
|
289
|
+
transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
|
|
290
|
+
}
|
|
291
|
+
.ColorWheel_module_root2[data-dragging=true] .ColorWheel_module_hueHandlePivot2 {
|
|
292
|
+
transition: none;
|
|
293
|
+
}
|
|
294
|
+
.ColorWheel_module_hueHandle2 {
|
|
295
|
+
position: absolute;
|
|
296
|
+
top: -114px;
|
|
297
|
+
left: 0;
|
|
298
|
+
width: 22px;
|
|
299
|
+
height: 22px;
|
|
300
|
+
border-radius: 50%;
|
|
301
|
+
border: 3px solid #fff;
|
|
302
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.15);
|
|
303
|
+
transform: translate(-50%, -50%);
|
|
304
|
+
cursor: grab;
|
|
305
|
+
z-index: 3;
|
|
306
|
+
}
|
|
307
|
+
.ColorWheel_module_alphaArcShadowWrap2 {
|
|
308
|
+
position: absolute;
|
|
309
|
+
top: 88px;
|
|
310
|
+
left: 50%;
|
|
311
|
+
width: 380px;
|
|
312
|
+
height: 380px;
|
|
313
|
+
transform: translate(calc(-50% + 1px), calc(-50% + 5px));
|
|
314
|
+
z-index: 1;
|
|
315
|
+
pointer-events: none;
|
|
316
|
+
filter: blur(7px);
|
|
317
|
+
}
|
|
318
|
+
.ColorWheel_module_alphaArcShadow2 {
|
|
319
|
+
position: absolute;
|
|
320
|
+
inset: 0;
|
|
321
|
+
background: rgba(0, 0, 0, 0.22);
|
|
322
|
+
clip-path: path("M 328.56,270 A 160 160 0 0 1 51.44,270 L 65.29,262 A 144 144 0 0 0 314.71,262 Z");
|
|
323
|
+
}
|
|
324
|
+
.ColorWheel_module_alphaArc2 {
|
|
325
|
+
position: absolute;
|
|
326
|
+
top: 88px;
|
|
327
|
+
left: 50%;
|
|
328
|
+
width: 380px;
|
|
329
|
+
height: 380px;
|
|
330
|
+
transform: translate(-50%, -50%);
|
|
331
|
+
touch-action: none;
|
|
332
|
+
cursor: grab;
|
|
333
|
+
z-index: 2;
|
|
334
|
+
background: var(--surface-2);
|
|
335
|
+
clip-path: path("M 328.56,270 A 160 160 0 0 1 51.44,270 L 65.29,262 A 144 144 0 0 0 314.71,262 Z");
|
|
336
|
+
}
|
|
337
|
+
.ColorWheel_module_alphaArcFill2 {
|
|
338
|
+
position: absolute;
|
|
339
|
+
inset: 0;
|
|
340
|
+
}
|
|
341
|
+
.ColorWheel_module_alphaArcCap2 {
|
|
342
|
+
position: absolute;
|
|
343
|
+
top: 88px;
|
|
344
|
+
left: 50%;
|
|
345
|
+
width: 16px;
|
|
346
|
+
height: 16px;
|
|
347
|
+
border-radius: 50%;
|
|
348
|
+
z-index: 2;
|
|
349
|
+
pointer-events: none;
|
|
350
|
+
background: var(--surface-2);
|
|
351
|
+
}
|
|
352
|
+
.ColorWheel_module_alphaArcCapStart2 {
|
|
353
|
+
transform: translate(calc(-50% + 131.6px), calc(-50% + 76px));
|
|
354
|
+
}
|
|
355
|
+
.ColorWheel_module_alphaArcCapEnd2 {
|
|
356
|
+
transform: translate(calc(-50% - 131.6px), calc(-50% + 76px));
|
|
357
|
+
}
|
|
358
|
+
.ColorWheel_module_alphaArcHandle2 {
|
|
359
|
+
position: absolute;
|
|
360
|
+
top: 88px;
|
|
361
|
+
left: 50%;
|
|
362
|
+
width: 18px;
|
|
363
|
+
height: 18px;
|
|
364
|
+
border-radius: 50%;
|
|
365
|
+
border: 2px solid #fff;
|
|
366
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
367
|
+
z-index: 3;
|
|
368
|
+
pointer-events: none;
|
|
369
|
+
transition: transform 0.12s ease;
|
|
370
|
+
}
|
|
371
|
+
.ColorWheel_module_root2[data-dragging=true] .ColorWheel_module_alphaArcHandle2 {
|
|
372
|
+
transition: none;
|
|
373
|
+
}
|
|
374
|
+
.ColorWheel_module_currentDisc2 {
|
|
375
|
+
position: absolute;
|
|
376
|
+
top: 50%;
|
|
377
|
+
left: 50%;
|
|
378
|
+
width: 156px;
|
|
379
|
+
height: 156px;
|
|
380
|
+
transform: translate(-50%, -50%);
|
|
381
|
+
border-radius: 50%;
|
|
382
|
+
overflow: hidden;
|
|
383
|
+
cursor: pointer;
|
|
384
|
+
z-index: 2;
|
|
385
|
+
box-shadow: 0 10px 24px -8px rgba(20, 16, 10, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
386
|
+
background-image:
|
|
387
|
+
linear-gradient(
|
|
388
|
+
45deg,
|
|
389
|
+
var(--check-a) 25%,
|
|
390
|
+
transparent 25%,
|
|
391
|
+
transparent 75%,
|
|
392
|
+
var(--check-a) 75%),
|
|
393
|
+
linear-gradient(
|
|
394
|
+
45deg,
|
|
395
|
+
var(--check-a) 25%,
|
|
396
|
+
transparent 25%,
|
|
397
|
+
transparent 75%,
|
|
398
|
+
var(--check-a) 75%);
|
|
399
|
+
background-size: 12px 12px;
|
|
400
|
+
background-position: 0 0, 6px 6px;
|
|
401
|
+
background-color: var(--check-b);
|
|
402
|
+
}
|
|
403
|
+
.ColorWheel_module_discFill2 {
|
|
404
|
+
position: absolute;
|
|
405
|
+
inset: 0;
|
|
406
|
+
}
|
|
407
|
+
.ColorWheel_module_currentHex2,
|
|
408
|
+
.ColorWheel_module_currentHexInput2 {
|
|
409
|
+
position: absolute;
|
|
410
|
+
inset: 0;
|
|
411
|
+
z-index: 1;
|
|
412
|
+
font-family:
|
|
413
|
+
"SF Mono",
|
|
414
|
+
"IBM Plex Mono",
|
|
415
|
+
"JetBrains Mono",
|
|
416
|
+
Consolas,
|
|
417
|
+
"Liberation Mono",
|
|
418
|
+
monospace;
|
|
419
|
+
font-size: 17px;
|
|
420
|
+
font-weight: 700;
|
|
421
|
+
letter-spacing: 0.01em;
|
|
422
|
+
font-variant-numeric: tabular-nums;
|
|
423
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
|
424
|
+
}
|
|
425
|
+
.ColorWheel_module_currentHex2 {
|
|
426
|
+
display: grid;
|
|
427
|
+
place-items: center;
|
|
428
|
+
cursor: text;
|
|
429
|
+
transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
430
|
+
}
|
|
431
|
+
.ColorWheel_module_currentHex2.ColorWheel_module_copied2 {
|
|
432
|
+
transform: scale(1.06);
|
|
433
|
+
}
|
|
434
|
+
.ColorWheel_module_currentHexInput2 {
|
|
435
|
+
z-index: 2;
|
|
436
|
+
width: 100%;
|
|
437
|
+
height: 100%;
|
|
438
|
+
text-align: center;
|
|
439
|
+
background: transparent;
|
|
440
|
+
border: none;
|
|
441
|
+
outline: none;
|
|
442
|
+
padding: 0;
|
|
443
|
+
}
|
|
444
|
+
.ColorWheel_module_currentHexInput2::selection {
|
|
445
|
+
background: rgba(255, 255, 255, 0.35);
|
|
446
|
+
}
|
|
447
|
+
.ColorWheel_module_discBadge2 {
|
|
448
|
+
position: absolute;
|
|
449
|
+
top: 50%;
|
|
450
|
+
left: 50%;
|
|
451
|
+
width: 34px;
|
|
452
|
+
height: 34px;
|
|
453
|
+
border-radius: 50%;
|
|
454
|
+
border: none;
|
|
455
|
+
display: grid;
|
|
456
|
+
place-items: center;
|
|
457
|
+
cursor: pointer;
|
|
458
|
+
z-index: 3;
|
|
459
|
+
transition: transform 0.15s ease, filter 0.15s ease;
|
|
460
|
+
}
|
|
461
|
+
.ColorWheel_module_discBadge2:hover {
|
|
462
|
+
filter: brightness(1.15);
|
|
463
|
+
}
|
|
464
|
+
.ColorWheel_module_discBadge2 svg {
|
|
465
|
+
width: 15px;
|
|
466
|
+
height: 15px;
|
|
467
|
+
}
|
|
468
|
+
.ColorWheel_module_discBadgeTop2 {
|
|
469
|
+
transform: translate(-50%, calc(-50% - 46px));
|
|
470
|
+
}
|
|
471
|
+
.ColorWheel_module_discBadgeTop2:active {
|
|
472
|
+
transform: translate(-50%, calc(-50% - 46px)) scale(0.92);
|
|
473
|
+
}
|
|
474
|
+
.ColorWheel_module_discBadgeTop2.ColorWheel_module_pulse2 {
|
|
475
|
+
animation: ColorWheel_module_badgePulseTop2 0.4s ease;
|
|
476
|
+
}
|
|
477
|
+
.ColorWheel_module_discBadgeBottom2 {
|
|
478
|
+
transform: translate(-50%, calc(-50% + 46px));
|
|
479
|
+
}
|
|
480
|
+
.ColorWheel_module_discBadgeBottom2:active {
|
|
481
|
+
transform: translate(-50%, calc(-50% + 46px)) scale(0.92);
|
|
482
|
+
}
|
|
483
|
+
@keyframes ColorWheel_module_badgePulseTop2 {
|
|
484
|
+
0% {
|
|
485
|
+
transform: translate(-50%, calc(-50% - 46px)) scale(1);
|
|
486
|
+
}
|
|
487
|
+
40% {
|
|
488
|
+
transform: translate(-50%, calc(-50% - 46px)) scale(1.28);
|
|
489
|
+
}
|
|
490
|
+
100% {
|
|
491
|
+
transform: translate(-50%, calc(-50% - 46px)) scale(1);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ColorWheel/ColorWheel.module.scss"],"sourcesContent":["// Theme tokens are scoped to .root (component-local), not :root -- this\n// component must be safe to drop into an app with its own global theme\n// without colliding. All *computed* colors (the color you're picking, badge\n// tints, gradients) are passed in as inline styles from ColorWheel.tsx, not\n// CSS custom properties here -- only structural/theme tokens live in SCSS.\n\n// light/dark palettes -- identical values shared by every trigger below (OS\n// preference, host app's ambient theme, and this instance's own `theme` prop)\n@mixin light-palette {\n --bg: #ECEAE3;\n --surface: #FFFFFF;\n --surface-2: #E3E0D8;\n --border: #D2CDC0;\n --text: #1A1913;\n --text-dim: #726F64;\n --text-faint: #A8A398;\n --shadow-soft: 0 1px 2px rgba(30, 25, 15, 0.08);\n --check-a: #d8d4c8;\n --check-b: #f4f2ec;\n color-scheme: light;\n}\n@mixin dark-palette {\n --bg: #131217;\n --surface: #1C1B22;\n --surface-2: #26252E;\n --border: #34333D;\n --text: #ECEAF0;\n --text-dim: #8E8C99;\n --text-faint: #605E6B;\n --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35);\n --check-a: #37353f;\n --check-b: #201f26;\n color-scheme: dark;\n}\n\n.root {\n @include light-palette;\n\n // theme=\"system\" (no data-theme of its own): fall back to the OS preference\n @media (prefers-color-scheme: dark) {\n &:not([data-theme='light']):not([data-theme='dark']) {\n @include dark-palette;\n }\n }\n\n // theme=\"system\": the host app's ambient theme (data-theme set on an\n // ancestor, e.g. <html> -- the same convention ColorPicker/Timeline read\n // from) takes precedence over the bare OS preference above when the app\n // declares one -- including explicitly overriding it back to light, since\n // the OS-preference rule above has no way to know the app disagrees\n :global([data-theme='light']) &:not([data-theme='light']):not([data-theme='dark']) {\n @include light-palette;\n }\n :global([data-theme='dark']) &:not([data-theme='light']):not([data-theme='dark']) {\n @include dark-palette;\n }\n\n // theme=\"dark\" / theme=\"light\": pinned explicitly on this instance, regardless of the OS or the app\n &[data-theme='dark'] {\n @include dark-palette;\n }\n &[data-theme='light'] {\n @include light-palette;\n }\n\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 20px;\n font-family: -apple-system, 'Segoe UI', Inter, 'Helvetica Neue', Arial, sans-serif;\n color: var(--text);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .root, .root *, .root *::before, .root *::after {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n// ============ Recents (favorites) ============\n.recents {\n display: flex;\n align-items: center;\n gap: 7px;\n min-height: 30px;\n background: var(--surface-2);\n border-radius: 999px;\n padding: 5px 8px;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.14), var(--shadow-soft);\n}\n\n.chipWrap {\n position: relative;\n flex: none;\n animation: chipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;\n}\n\n.chip {\n width: 26px;\n height: 26px;\n border-radius: 50%;\n border: none;\n padding: 0;\n cursor: pointer;\n display: block;\n box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.22), var(--shadow-soft);\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n\n &:hover {\n transform: scale(1.14) translateY(-1px);\n box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.3), 0 4px 10px -3px rgba(0, 0, 0, 0.3);\n }\n &:active {\n transform: scale(1.02);\n }\n}\n\n// notification-badge style: sits off-center on the chip's rim, revealed only\n// on hover so it never competes with the chip's own click-to-select area\n.chipRemove {\n position: absolute;\n top: -3px;\n right: -3px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n border: none;\n padding: 0;\n display: grid;\n place-items: center;\n background: var(--surface);\n color: var(--text-dim);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(128, 128, 128, 0.25);\n cursor: pointer;\n z-index: 2;\n opacity: 0;\n pointer-events: none;\n transform: scale(0.6);\n transition: opacity 0.12s ease, transform 0.12s ease, color 0.12s ease;\n\n svg {\n width: 8px;\n height: 8px;\n }\n &:hover {\n color: var(--text);\n }\n .chipWrap:hover & {\n opacity: 1;\n pointer-events: auto;\n transform: scale(1);\n }\n}\n\n@keyframes chipIn {\n 0% { transform: scale(0) rotate(-25deg); opacity: 0; }\n 100% { transform: scale(1) rotate(0); opacity: 1; }\n}\n\n// ============ Picker: positioning context for the ring's bleed ============\n// Every direct child below is position:absolute (there's no backing card to\n// hold the box open), so .picker needs an explicit size or it measures as\n// 0x0 to the layout engine -- margin-top reserves room for what renders\n// above the shared center anchor (mostly the mode toggle), height reserves\n// what extends below it (the alpha arc).\n.picker {\n position: relative;\n margin-top: 82px;\n height: 265px;\n width: 272px;\n}\n\n.glow {\n position: absolute;\n width: 340px;\n height: 340px;\n left: 50%;\n top: 88px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n opacity: 0.55;\n pointer-events: none;\n z-index: 0;\n}\n\n// ============ Mode toggle: switches what the ring adjusts (H/S/V) ============\n.modeToggle {\n position: absolute;\n top: 88px;\n left: 50%;\n transform: translate(-50%, calc(-50% - 156px));\n z-index: 3;\n display: grid;\n // grid-template-columns and width are set inline (mode count is dynamic:\n // 3-way H/S/V or 4-way H/S/V/A depending on showAlphaControl)\n background: var(--surface-2);\n border-radius: 999px;\n padding: 3px;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.14), var(--shadow-soft);\n}\n\n.modePill {\n position: absolute;\n top: 3px;\n bottom: 3px;\n left: 3px;\n // width is set inline (see .modeToggle)\n border-radius: 999px;\n background: var(--surface);\n box-shadow: var(--shadow-soft);\n transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);\n}\n\n.modeButton {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 22px;\n background: none;\n border: none;\n padding: 0;\n font-size: 10.5px;\n font-weight: 700;\n line-height: 22px;\n letter-spacing: 0.02em;\n color: var(--text-dim);\n cursor: pointer;\n transition: color 0.2s ease;\n\n &.active {\n color: var(--text);\n }\n &:hover:not(.active) {\n color: var(--text);\n }\n}\n\n// ============ Stage: a true ring (annulus via mask) ============\n.stage {\n position: absolute;\n top: -48px;\n left: 50%;\n width: 272px;\n height: 272px;\n transform: translateX(-50%);\n touch-action: none;\n}\n\n// shadow caster: a plain, unmasked circle behind the ring. box-shadow draws\n// outside its border-box regardless of the hole in the shape drawn on top of\n// it, so this reliably casts a shadow around the ring's outer edge --\n// filter:drop-shadow on the masked .ring itself is unreliable across engines.\n.stageShadow {\n position: absolute;\n inset: 0;\n border-radius: 50%;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22), 0 10px 18px rgba(0, 0, 0, 0.22);\n pointer-events: none;\n}\n\n.ring {\n position: absolute;\n inset: 0;\n border-radius: 50%;\n pointer-events: none;\n z-index: 2;\n // background is set per-mode inline: hue spectrum / grey-to-color / black-to-color\n -webkit-mask: radial-gradient(circle closest-side, transparent 0 92px, black 93px 100%);\n mask: radial-gradient(circle closest-side, transparent 0 92px, black 93px 100%);\n}\n\n// rotated, not repositioned via top/left -- see the comment on\n// ringAngleFromTopDeg in ColorWheel.tsx for why\n.hueHandlePivot {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 0;\n height: 0;\n // `transform` creates a new stacking context, so this needs its own\n // z-index -- the child .hueHandle's z-index only ranks it within this\n // context, not against the ring/disc/badges sitting outside it\n z-index: 3;\n // strong ease-out -- fast start, long deceleration into the final angle,\n // like braking into position. Reads as a real sweep on a big mode-switch\n // jump, stays snappy on small wheel-tick nudges.\n transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);\n}\n.root[data-dragging='true'] .hueHandlePivot {\n transition: none;\n}\n.hueHandle {\n position: absolute;\n top: -114px; // mid-band radius (0.4191 * 272px stage), fixed distance from the pivot\n left: 0;\n width: 22px;\n height: 22px;\n border-radius: 50%;\n border: 3px solid #fff;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.15);\n transform: translate(-50%, -50%);\n cursor: grab;\n z-index: 3;\n}\n\n// ============ Alpha arc: a curved alpha slider outside the ring ============\n// a pure 1D control, position along the 120deg band (bottom-centered) fades\n// a checkerboard (alpha 0) into the current solid color (alpha 1). clip-path\n// also gates hit-testing, so clicks outside the visible crescent fall through.\n$arcPath: path('M 328.56,270 A 160 160 0 0 1 51.44,270 L 65.29,262 A 144 144 0 0 0 314.71,262 Z');\n\n// shadow caster: clip-path + filter:blur on the SAME element clips away the\n// blur's own soft edge (no room outside the path for it to fade into),\n// leaving a hard-edged smudge. Fix: blur a wrapper that ISN'T itself clipped\n// -- it composites its clipped child first, then blurs that whole result\n// freely, since nothing clips the wrapper afterward.\n.alphaArcShadowWrap {\n position: absolute;\n top: 88px;\n left: 50%;\n width: 380px;\n height: 380px;\n transform: translate(calc(-50% + 1px), calc(-50% + 5px));\n z-index: 1;\n pointer-events: none;\n filter: blur(7px);\n}\n.alphaArcShadow {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.22);\n clip-path: $arcPath;\n}\n\n.alphaArc {\n position: absolute;\n top: 88px;\n left: 50%;\n width: 380px;\n height: 380px;\n transform: translate(-50%, -50%);\n touch-action: none;\n cursor: grab;\n z-index: 2;\n background: var(--surface-2);\n clip-path: $arcPath;\n}\n\n.alphaArcFill {\n position: absolute;\n inset: 0;\n // conic-gradient set inline (needs the live accent color)\n}\n\n// clip-path can't take a border-radius, so the band's two flat-cut ends are\n// \"rounded\" by capping them with plain circles sized to the band's own\n// thickness -- a pill cap, same trick as a rounded-end stroke. These sit\n// OUTSIDE .alphaArc (its clip-path would slice them too), positioned from\n// the shared center point like the mode toggle is.\n.alphaArcCap {\n position: absolute;\n top: 88px;\n left: 50%;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n z-index: 2;\n pointer-events: none;\n background: var(--surface-2);\n}\n.alphaArcCapStart {\n transform: translate(calc(-50% + 131.6px), calc(-50% + 76px));\n // background set inline (accent-solid, the \"full\" end)\n}\n.alphaArcCapEnd {\n transform: translate(calc(-50% - 131.6px), calc(-50% + 76px));\n}\n\n// sits OUTSIDE .alphaArc too, same reason as the caps -- clip-path would\n// slice it into a crescent whenever it nears the band's flat-cut ends\n.alphaArcHandle {\n position: absolute;\n top: 88px;\n left: 50%;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);\n z-index: 3;\n pointer-events: none;\n transition: transform 0.12s ease;\n}\n.root[data-dragging='true'] .alphaArcHandle {\n transition: none;\n}\n\n// ============ Current-color disc ============\n.currentDisc {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 156px;\n height: 156px;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n overflow: hidden;\n cursor: pointer;\n z-index: 2;\n box-shadow: 0 10px 24px -8px rgba(20, 16, 10, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.08);\n background-image:\n linear-gradient(45deg, var(--check-a) 25%, transparent 25%, transparent 75%, var(--check-a) 75%),\n linear-gradient(45deg, var(--check-a) 25%, transparent 25%, transparent 75%, var(--check-a) 75%);\n background-size: 12px 12px;\n background-position: 0 0, 6px 6px;\n background-color: var(--check-b);\n}\n\n.discFill {\n position: absolute;\n inset: 0;\n // background (rgba of current color, so the checkerboard reads through\n // when alpha < 1) set inline\n}\n\n.currentHex,\n.currentHexInput {\n position: absolute;\n inset: 0;\n z-index: 1;\n font-family: 'SF Mono', 'IBM Plex Mono', 'JetBrains Mono', Consolas, 'Liberation Mono', monospace;\n font-size: 17px;\n font-weight: 700;\n letter-spacing: 0.01em;\n font-variant-numeric: tabular-nums;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);\n // color set inline (computed for contrast against the current color)\n}\n.currentHex {\n display: grid;\n place-items: center;\n cursor: text;\n transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);\n\n &.copied {\n transform: scale(1.06);\n }\n}\n.currentHexInput {\n z-index: 2;\n width: 100%;\n height: 100%;\n text-align: center;\n background: transparent;\n border: none;\n outline: none;\n padding: 0;\n\n &::selection {\n background: rgba(255, 255, 255, 0.35);\n }\n}\n\n// badges resting inland on the disc, top (eyedropper) and bottom (save to\n// favorites) -- discreet: near-invisible fill, and instead of a drawn-on\n// border, an engraved groove (dark inset lip on top, faint highlight on the\n// bottom edge) so they read as carved into the disc rather than stuck on it\n.discBadge {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 34px;\n height: 34px;\n border-radius: 50%;\n border: none;\n display: grid;\n place-items: center;\n cursor: pointer;\n z-index: 3;\n transition: transform 0.15s ease, filter 0.15s ease;\n\n &:hover {\n filter: brightness(1.15);\n }\n svg {\n width: 15px;\n height: 15px;\n }\n}\n.discBadgeTop {\n transform: translate(-50%, calc(-50% - 46px));\n &:active {\n transform: translate(-50%, calc(-50% - 46px)) scale(0.92);\n }\n &.pulse {\n animation: badgePulseTop 0.4s ease;\n }\n}\n.discBadgeBottom {\n transform: translate(-50%, calc(-50% + 46px));\n &:active {\n transform: translate(-50%, calc(-50% + 46px)) scale(0.92);\n }\n}\n@keyframes badgePulseTop {\n 0% { transform: translate(-50%, calc(-50% - 46px)) scale(1); }\n 40% { transform: translate(-50%, calc(-50% - 46px)) scale(1.28); }\n 100% { transform: translate(-50%, calc(-50% - 46px)) scale(1); }\n}\n"],"mappings":";AAmCA,CAAAA;AA1BE,QAAA;AACA,aAAA;AACA,eAAA;AACA,YAAA;AACA,UAAA;AACA,cAAA;AACA,gBAAA;AACA,iBAAA,EAAA,IAAA,IAAA,KAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AACA,aAAA;AACA,aAAA;AACA,gBAAA;;AAoBA,QAAA,sBAAA;AACE,GALJA,uBAKI,KAAA,CAAA,kBAAA,KAAA,CAAA;AAlBF,UAAA;AACA,eAAA;AACA,iBAAA;AACA,cAAA;AACA,YAAA;AACA,gBAAA;AACA,kBAAA;AACA,mBAAA,EAAA,IAAA,IAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA;AACA,eAAA;AACA,eAAA;AACA,kBAAA;;;AAkBA,CAAA,kBAAA,CAfFA,uBAeE,KAAA,CAAA,kBAAA,KAAA,CAAA;AAzCA,QAAA;AACA,aAAA;AACA,eAAA;AACA,YAAA;AACA,UAAA;AACA,cAAA;AACA,gBAAA;AACA,iBAAA,EAAA,IAAA,IAAA,KAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AACA,aAAA;AACA,aAAA;AACA,gBAAA;;AAkCA,CAAA,iBAAA,CAlBFA,uBAkBE,KAAA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AAAK,eAAA,UAAA,IAAA,EAAA,KAAA,KAAA,EAAA,OAAA,MAAA;;AACL;AAAM,eAAA,UAAA,IAAA,EAAA,KAAA,KAAA,EAAA,OAAA,MAAA;;AACN;AAAO,eAAA,UAAA,IAAA,EAAA,KAAA,KAAA,EAAA,OAAA,MAAA;;;","names":["root","recents","chipWrap","chip","chipRemove","chipIn","picker","glow","modeToggle","modePill","modeButton","active","stage","stageShadow","ring","hueHandlePivot","hueHandle","alphaArcShadowWrap","alphaArcShadow","alphaArc","alphaArcFill","alphaArcCap","alphaArcCapStart","alphaArcCapEnd","alphaArcHandle","currentDisc","discFill","currentHex","currentHexInput","copied","discBadge","discBadgeTop","pulse","discBadgeBottom","badgePulseTop"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type ColorWheelMode = "h" | "s" | "v" | "a";
|
|
4
|
+
type ColorWheelAlphaMode = "arc" | "ring";
|
|
5
|
+
type ColorWheelTheme = "light" | "dark" | "system";
|
|
6
|
+
interface ColorWheelProps {
|
|
7
|
+
/** current color, as "#RRGGBB" or "#RRGGBBAA" */
|
|
8
|
+
value: string;
|
|
9
|
+
/** called with the next hex value on every interaction (drag, wheel, paste, eyedropper, picking a favorite) */
|
|
10
|
+
onChange: (hex: string) => void;
|
|
11
|
+
/** favorite hex swatches, rendered above the ring. Omit to hide the row entirely. */
|
|
12
|
+
favorites?: string[];
|
|
13
|
+
/** called with the full next list when the user saves the current color (the "+" badge) -- this component holds no favorites state of its own */
|
|
14
|
+
onFavoritesChange?: (favorites: string[]) => void;
|
|
15
|
+
/** caps how many favorites the "+" badge will keep (oldest dropped first). Only enforced on the list this component hands back -- a longer list you pass in is rendered as-is. */
|
|
16
|
+
maxFavorites?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Master switch: is alpha adjustable in the UI at all? true (default):
|
|
19
|
+
* yes, via whichever scheme `alphaMode` picks. false: no alpha UI
|
|
20
|
+
* whatsoever -- no arc, no "A" in the ring toggle -- though a translucent
|
|
21
|
+
* `value` passed in is still honored, just not editable.
|
|
22
|
+
*/
|
|
23
|
+
showAlphaControl?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Only matters when `showAlphaControl` is true. 'arc' (default): a 3-way
|
|
26
|
+
* H/S/V ring, alpha adjusted via the curved arc outside it. 'ring': a
|
|
27
|
+
* 4-way H/S/V/A ring handles alpha itself, and the (now redundant) arc is
|
|
28
|
+
* hidden. Mutually exclusive schemes, not two controls active at once.
|
|
29
|
+
*/
|
|
30
|
+
alphaMode?: ColorWheelAlphaMode;
|
|
31
|
+
/** 'system' (default) follows prefers-color-scheme; 'light'/'dark' pins it */
|
|
32
|
+
theme?: ColorWheelTheme;
|
|
33
|
+
/**
|
|
34
|
+
* Uniform scale factor, 1 (default) = the design size (272px ring). Applied
|
|
35
|
+
* as a CSS transform, so all the drag/wheel hit-testing (already measured
|
|
36
|
+
* live via getBoundingClientRect, not hardcoded pixels) keeps working
|
|
37
|
+
* unchanged at any size. Note this does NOT shrink the component's actual
|
|
38
|
+
* DOM footprint to match -- it already visually bleeds past its own box at
|
|
39
|
+
* scale 1 (the ring/arc extend beyond it), so a container you size and
|
|
40
|
+
* position yourself is still expected, same as today.
|
|
41
|
+
*/
|
|
42
|
+
size?: number;
|
|
43
|
+
/** custom accent color (hex) -- overrides the global theme's primary color for this instance */
|
|
44
|
+
accent?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
declare function ColorWheel({ value, onChange, favorites, onFavoritesChange, maxFavorites, showAlphaControl, alphaMode, theme, size, accent, className, }: ColorWheelProps): React.JSX.Element;
|
|
48
|
+
|
|
49
|
+
export { ColorWheel, type ColorWheelAlphaMode, type ColorWheelMode, type ColorWheelProps, type ColorWheelTheme };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type ColorWheelMode = "h" | "s" | "v" | "a";
|
|
4
|
+
type ColorWheelAlphaMode = "arc" | "ring";
|
|
5
|
+
type ColorWheelTheme = "light" | "dark" | "system";
|
|
6
|
+
interface ColorWheelProps {
|
|
7
|
+
/** current color, as "#RRGGBB" or "#RRGGBBAA" */
|
|
8
|
+
value: string;
|
|
9
|
+
/** called with the next hex value on every interaction (drag, wheel, paste, eyedropper, picking a favorite) */
|
|
10
|
+
onChange: (hex: string) => void;
|
|
11
|
+
/** favorite hex swatches, rendered above the ring. Omit to hide the row entirely. */
|
|
12
|
+
favorites?: string[];
|
|
13
|
+
/** called with the full next list when the user saves the current color (the "+" badge) -- this component holds no favorites state of its own */
|
|
14
|
+
onFavoritesChange?: (favorites: string[]) => void;
|
|
15
|
+
/** caps how many favorites the "+" badge will keep (oldest dropped first). Only enforced on the list this component hands back -- a longer list you pass in is rendered as-is. */
|
|
16
|
+
maxFavorites?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Master switch: is alpha adjustable in the UI at all? true (default):
|
|
19
|
+
* yes, via whichever scheme `alphaMode` picks. false: no alpha UI
|
|
20
|
+
* whatsoever -- no arc, no "A" in the ring toggle -- though a translucent
|
|
21
|
+
* `value` passed in is still honored, just not editable.
|
|
22
|
+
*/
|
|
23
|
+
showAlphaControl?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Only matters when `showAlphaControl` is true. 'arc' (default): a 3-way
|
|
26
|
+
* H/S/V ring, alpha adjusted via the curved arc outside it. 'ring': a
|
|
27
|
+
* 4-way H/S/V/A ring handles alpha itself, and the (now redundant) arc is
|
|
28
|
+
* hidden. Mutually exclusive schemes, not two controls active at once.
|
|
29
|
+
*/
|
|
30
|
+
alphaMode?: ColorWheelAlphaMode;
|
|
31
|
+
/** 'system' (default) follows prefers-color-scheme; 'light'/'dark' pins it */
|
|
32
|
+
theme?: ColorWheelTheme;
|
|
33
|
+
/**
|
|
34
|
+
* Uniform scale factor, 1 (default) = the design size (272px ring). Applied
|
|
35
|
+
* as a CSS transform, so all the drag/wheel hit-testing (already measured
|
|
36
|
+
* live via getBoundingClientRect, not hardcoded pixels) keeps working
|
|
37
|
+
* unchanged at any size. Note this does NOT shrink the component's actual
|
|
38
|
+
* DOM footprint to match -- it already visually bleeds past its own box at
|
|
39
|
+
* scale 1 (the ring/arc extend beyond it), so a container you size and
|
|
40
|
+
* position yourself is still expected, same as today.
|
|
41
|
+
*/
|
|
42
|
+
size?: number;
|
|
43
|
+
/** custom accent color (hex) -- overrides the global theme's primary color for this instance */
|
|
44
|
+
accent?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
declare function ColorWheel({ value, onChange, favorites, onFavoritesChange, maxFavorites, showAlphaControl, alphaMode, theme, size, accent, className, }: ColorWheelProps): React.JSX.Element;
|
|
48
|
+
|
|
49
|
+
export { ColorWheel, type ColorWheelAlphaMode, type ColorWheelMode, type ColorWheelProps, type ColorWheelTheme };
|