@sanity/color-input 4.0.6 → 5.0.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.
@@ -1,1051 +0,0 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { TrashIcon, AddIcon } from "@sanity/icons";
3
- import { Flex, useTheme, Box, Card, Stack, Text, Inline, Button } from "@sanity/ui";
4
- import { memo, useMemo, useCallback, useRef, useState, useEffect, startTransition, useDeferredValue } from "react";
5
- import { set, setIfMissing, unset } from "sanity";
6
- import { useEffectEvent } from "use-effect-event";
7
- import { CustomPicker } from "react-color";
8
- import { EditableInput, Saturation, Hue, Alpha, Checkboard } from "react-color/lib/components/common";
9
- import { styled } from "styled-components";
10
- import { isValidHex } from "react-color/lib/helpers/color";
11
- function _typeof(obj) {
12
- "@babel/helpers - typeof";
13
- return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
14
- return typeof obj2;
15
- } : function(obj2) {
16
- return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
17
- }, _typeof(obj);
18
- }
19
- var trimLeft = /^\s+/, trimRight = /\s+$/;
20
- function tinycolor(color, opts) {
21
- if (color = color || "", opts = opts || {}, color instanceof tinycolor)
22
- return color;
23
- if (!(this instanceof tinycolor))
24
- return new tinycolor(color, opts);
25
- var rgb = inputToRGB(color);
26
- this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format, this._gradientType = opts.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = rgb.ok;
27
- }
28
- tinycolor.prototype = {
29
- isDark: function() {
30
- return this.getBrightness() < 128;
31
- },
32
- isLight: function() {
33
- return !this.isDark();
34
- },
35
- isValid: function() {
36
- return this._ok;
37
- },
38
- getOriginalInput: function() {
39
- return this._originalInput;
40
- },
41
- getFormat: function() {
42
- return this._format;
43
- },
44
- getAlpha: function() {
45
- return this._a;
46
- },
47
- getBrightness: function() {
48
- var rgb = this.toRgb();
49
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
50
- },
51
- getLuminance: function() {
52
- var rgb = this.toRgb(), RsRGB, GsRGB, BsRGB, R, G, B;
53
- return RsRGB = rgb.r / 255, GsRGB = rgb.g / 255, BsRGB = rgb.b / 255, RsRGB <= 0.03928 ? R = RsRGB / 12.92 : R = Math.pow((RsRGB + 0.055) / 1.055, 2.4), GsRGB <= 0.03928 ? G = GsRGB / 12.92 : G = Math.pow((GsRGB + 0.055) / 1.055, 2.4), BsRGB <= 0.03928 ? B = BsRGB / 12.92 : B = Math.pow((BsRGB + 0.055) / 1.055, 2.4), 0.2126 * R + 0.7152 * G + 0.0722 * B;
54
- },
55
- setAlpha: function(value) {
56
- return this._a = boundAlpha(value), this._roundA = Math.round(100 * this._a) / 100, this;
57
- },
58
- toHsv: function() {
59
- var hsv = rgbToHsv(this._r, this._g, this._b);
60
- return {
61
- h: hsv.h * 360,
62
- s: hsv.s,
63
- v: hsv.v,
64
- a: this._a
65
- };
66
- },
67
- toHsvString: function() {
68
- var hsv = rgbToHsv(this._r, this._g, this._b), h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100);
69
- return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
70
- },
71
- toHsl: function() {
72
- var hsl = rgbToHsl(this._r, this._g, this._b);
73
- return {
74
- h: hsl.h * 360,
75
- s: hsl.s,
76
- l: hsl.l,
77
- a: this._a
78
- };
79
- },
80
- toHslString: function() {
81
- var hsl = rgbToHsl(this._r, this._g, this._b), h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100);
82
- return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
83
- },
84
- toHex: function(allow3Char) {
85
- return rgbToHex(this._r, this._g, this._b, allow3Char);
86
- },
87
- toHexString: function(allow3Char) {
88
- return "#" + this.toHex(allow3Char);
89
- },
90
- toHex8: function(allow4Char) {
91
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
92
- },
93
- toHex8String: function(allow4Char) {
94
- return "#" + this.toHex8(allow4Char);
95
- },
96
- toRgb: function() {
97
- return {
98
- r: Math.round(this._r),
99
- g: Math.round(this._g),
100
- b: Math.round(this._b),
101
- a: this._a
102
- };
103
- },
104
- toRgbString: function() {
105
- return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
106
- },
107
- toPercentageRgb: function() {
108
- return {
109
- r: Math.round(bound01(this._r, 255) * 100) + "%",
110
- g: Math.round(bound01(this._g, 255) * 100) + "%",
111
- b: Math.round(bound01(this._b, 255) * 100) + "%",
112
- a: this._a
113
- };
114
- },
115
- toPercentageRgbString: function() {
116
- return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
117
- },
118
- toName: function() {
119
- return this._a === 0 ? "transparent" : this._a < 1 ? !1 : hexNames[rgbToHex(this._r, this._g, this._b, !0)] || !1;
120
- },
121
- toFilter: function(secondColor) {
122
- var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a), secondHex8String = hex8String, gradientType = this._gradientType ? "GradientType = 1, " : "";
123
- if (secondColor) {
124
- var s = tinycolor(secondColor);
125
- secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
126
- }
127
- return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
128
- },
129
- toString: function(format) {
130
- var formatSet = !!format;
131
- format = format || this._format;
132
- var formattedString = !1, hasAlpha = this._a < 1 && this._a >= 0, needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
133
- return needsAlphaFormat ? format === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (format === "rgb" && (formattedString = this.toRgbString()), format === "prgb" && (formattedString = this.toPercentageRgbString()), (format === "hex" || format === "hex6") && (formattedString = this.toHexString()), format === "hex3" && (formattedString = this.toHexString(!0)), format === "hex4" && (formattedString = this.toHex8String(!0)), format === "hex8" && (formattedString = this.toHex8String()), format === "name" && (formattedString = this.toName()), format === "hsl" && (formattedString = this.toHslString()), format === "hsv" && (formattedString = this.toHsvString()), formattedString || this.toHexString());
134
- },
135
- clone: function() {
136
- return tinycolor(this.toString());
137
- },
138
- _applyModification: function(fn, args) {
139
- var color = fn.apply(null, [this].concat([].slice.call(args)));
140
- return this._r = color._r, this._g = color._g, this._b = color._b, this.setAlpha(color._a), this;
141
- },
142
- lighten: function() {
143
- return this._applyModification(_lighten, arguments);
144
- },
145
- brighten: function() {
146
- return this._applyModification(_brighten, arguments);
147
- },
148
- darken: function() {
149
- return this._applyModification(_darken, arguments);
150
- },
151
- desaturate: function() {
152
- return this._applyModification(_desaturate, arguments);
153
- },
154
- saturate: function() {
155
- return this._applyModification(_saturate, arguments);
156
- },
157
- greyscale: function() {
158
- return this._applyModification(_greyscale, arguments);
159
- },
160
- spin: function() {
161
- return this._applyModification(_spin, arguments);
162
- },
163
- _applyCombination: function(fn, args) {
164
- return fn.apply(null, [this].concat([].slice.call(args)));
165
- },
166
- analogous: function() {
167
- return this._applyCombination(_analogous, arguments);
168
- },
169
- complement: function() {
170
- return this._applyCombination(_complement, arguments);
171
- },
172
- monochromatic: function() {
173
- return this._applyCombination(_monochromatic, arguments);
174
- },
175
- splitcomplement: function() {
176
- return this._applyCombination(_splitcomplement, arguments);
177
- },
178
- // Disabled until https://github.com/bgrins/TinyColor/issues/254
179
- // polyad: function (number) {
180
- // return this._applyCombination(polyad, [number]);
181
- // },
182
- triad: function() {
183
- return this._applyCombination(polyad, [3]);
184
- },
185
- tetrad: function() {
186
- return this._applyCombination(polyad, [4]);
187
- }
188
- };
189
- tinycolor.fromRatio = function(color, opts) {
190
- if (_typeof(color) == "object") {
191
- var newColor = {};
192
- for (var i in color)
193
- color.hasOwnProperty(i) && (i === "a" ? newColor[i] = color[i] : newColor[i] = convertToPercentage(color[i]));
194
- color = newColor;
195
- }
196
- return tinycolor(color, opts);
197
- };
198
- function inputToRGB(color) {
199
- var rgb = {
200
- r: 0,
201
- g: 0,
202
- b: 0
203
- }, a = 1, s = null, v = null, l = null, ok = !1, format = !1;
204
- return typeof color == "string" && (color = stringInputToObject(color)), _typeof(color) == "object" && (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b) ? (rgb = rgbToRgb(color.r, color.g, color.b), ok = !0, format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb") : isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v) ? (s = convertToPercentage(color.s), v = convertToPercentage(color.v), rgb = hsvToRgb(color.h, s, v), ok = !0, format = "hsv") : isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l) && (s = convertToPercentage(color.s), l = convertToPercentage(color.l), rgb = hslToRgb(color.h, s, l), ok = !0, format = "hsl"), color.hasOwnProperty("a") && (a = color.a)), a = boundAlpha(a), {
205
- ok,
206
- format: color.format || format,
207
- r: Math.min(255, Math.max(rgb.r, 0)),
208
- g: Math.min(255, Math.max(rgb.g, 0)),
209
- b: Math.min(255, Math.max(rgb.b, 0)),
210
- a
211
- };
212
- }
213
- function rgbToRgb(r, g, b) {
214
- return {
215
- r: bound01(r, 255) * 255,
216
- g: bound01(g, 255) * 255,
217
- b: bound01(b, 255) * 255
218
- };
219
- }
220
- function rgbToHsl(r, g, b) {
221
- r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255);
222
- var max = Math.max(r, g, b), min = Math.min(r, g, b), h, s, l = (max + min) / 2;
223
- if (max == min)
224
- h = s = 0;
225
- else {
226
- var d = max - min;
227
- switch (s = l > 0.5 ? d / (2 - max - min) : d / (max + min), max) {
228
- case r:
229
- h = (g - b) / d + (g < b ? 6 : 0);
230
- break;
231
- case g:
232
- h = (b - r) / d + 2;
233
- break;
234
- case b:
235
- h = (r - g) / d + 4;
236
- break;
237
- }
238
- h /= 6;
239
- }
240
- return {
241
- h,
242
- s,
243
- l
244
- };
245
- }
246
- function hslToRgb(h, s, l) {
247
- var r, g, b;
248
- h = bound01(h, 360), s = bound01(s, 100), l = bound01(l, 100);
249
- function hue2rgb(p2, q2, t) {
250
- return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? p2 + (q2 - p2) * 6 * t : t < 1 / 2 ? q2 : t < 2 / 3 ? p2 + (q2 - p2) * (2 / 3 - t) * 6 : p2;
251
- }
252
- if (s === 0)
253
- r = g = b = l;
254
- else {
255
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s, p = 2 * l - q;
256
- r = hue2rgb(p, q, h + 1 / 3), g = hue2rgb(p, q, h), b = hue2rgb(p, q, h - 1 / 3);
257
- }
258
- return {
259
- r: r * 255,
260
- g: g * 255,
261
- b: b * 255
262
- };
263
- }
264
- function rgbToHsv(r, g, b) {
265
- r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255);
266
- var max = Math.max(r, g, b), min = Math.min(r, g, b), h, s, v = max, d = max - min;
267
- if (s = max === 0 ? 0 : d / max, max == min)
268
- h = 0;
269
- else {
270
- switch (max) {
271
- case r:
272
- h = (g - b) / d + (g < b ? 6 : 0);
273
- break;
274
- case g:
275
- h = (b - r) / d + 2;
276
- break;
277
- case b:
278
- h = (r - g) / d + 4;
279
- break;
280
- }
281
- h /= 6;
282
- }
283
- return {
284
- h,
285
- s,
286
- v
287
- };
288
- }
289
- function hsvToRgb(h, s, v) {
290
- h = bound01(h, 360) * 6, s = bound01(s, 100), v = bound01(v, 100);
291
- var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod];
292
- return {
293
- r: r * 255,
294
- g: g * 255,
295
- b: b * 255
296
- };
297
- }
298
- function rgbToHex(r, g, b, allow3Char) {
299
- var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
300
- return allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) ? hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) : hex.join("");
301
- }
302
- function rgbaToHex(r, g, b, a, allow4Char) {
303
- var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
304
- return allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1) ? hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0) : hex.join("");
305
- }
306
- function rgbaToArgbHex(r, g, b, a) {
307
- var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
308
- return hex.join("");
309
- }
310
- tinycolor.equals = function(color1, color2) {
311
- return !color1 || !color2 ? !1 : tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
312
- };
313
- tinycolor.random = function() {
314
- return tinycolor.fromRatio({
315
- r: Math.random(),
316
- g: Math.random(),
317
- b: Math.random()
318
- });
319
- };
320
- function _desaturate(color, amount) {
321
- amount = amount === 0 ? 0 : amount || 10;
322
- var hsl = tinycolor(color).toHsl();
323
- return hsl.s -= amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl);
324
- }
325
- function _saturate(color, amount) {
326
- amount = amount === 0 ? 0 : amount || 10;
327
- var hsl = tinycolor(color).toHsl();
328
- return hsl.s += amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl);
329
- }
330
- function _greyscale(color) {
331
- return tinycolor(color).desaturate(100);
332
- }
333
- function _lighten(color, amount) {
334
- amount = amount === 0 ? 0 : amount || 10;
335
- var hsl = tinycolor(color).toHsl();
336
- return hsl.l += amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl);
337
- }
338
- function _brighten(color, amount) {
339
- amount = amount === 0 ? 0 : amount || 10;
340
- var rgb = tinycolor(color).toRgb();
341
- return rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))), rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))), rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))), tinycolor(rgb);
342
- }
343
- function _darken(color, amount) {
344
- amount = amount === 0 ? 0 : amount || 10;
345
- var hsl = tinycolor(color).toHsl();
346
- return hsl.l -= amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl);
347
- }
348
- function _spin(color, amount) {
349
- var hsl = tinycolor(color).toHsl(), hue = (hsl.h + amount) % 360;
350
- return hsl.h = hue < 0 ? 360 + hue : hue, tinycolor(hsl);
351
- }
352
- function _complement(color) {
353
- var hsl = tinycolor(color).toHsl();
354
- return hsl.h = (hsl.h + 180) % 360, tinycolor(hsl);
355
- }
356
- function polyad(color, number) {
357
- if (isNaN(number) || number <= 0)
358
- throw new Error("Argument to polyad must be a positive number");
359
- for (var hsl = tinycolor(color).toHsl(), result = [tinycolor(color)], step = 360 / number, i = 1; i < number; i++)
360
- result.push(tinycolor({
361
- h: (hsl.h + i * step) % 360,
362
- s: hsl.s,
363
- l: hsl.l
364
- }));
365
- return result;
366
- }
367
- function _splitcomplement(color) {
368
- var hsl = tinycolor(color).toHsl(), h = hsl.h;
369
- return [tinycolor(color), tinycolor({
370
- h: (h + 72) % 360,
371
- s: hsl.s,
372
- l: hsl.l
373
- }), tinycolor({
374
- h: (h + 216) % 360,
375
- s: hsl.s,
376
- l: hsl.l
377
- })];
378
- }
379
- function _analogous(color, results, slices) {
380
- results = results || 6, slices = slices || 30;
381
- var hsl = tinycolor(color).toHsl(), part = 360 / slices, ret = [tinycolor(color)];
382
- for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; )
383
- hsl.h = (hsl.h + part) % 360, ret.push(tinycolor(hsl));
384
- return ret;
385
- }
386
- function _monochromatic(color, results) {
387
- results = results || 6;
388
- for (var hsv = tinycolor(color).toHsv(), h = hsv.h, s = hsv.s, v = hsv.v, ret = [], modification = 1 / results; results--; )
389
- ret.push(tinycolor({
390
- h,
391
- s,
392
- v
393
- })), v = (v + modification) % 1;
394
- return ret;
395
- }
396
- tinycolor.mix = function(color1, color2, amount) {
397
- amount = amount === 0 ? 0 : amount || 50;
398
- var rgb1 = tinycolor(color1).toRgb(), rgb2 = tinycolor(color2).toRgb(), p = amount / 100, rgba = {
399
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
400
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
401
- b: (rgb2.b - rgb1.b) * p + rgb1.b,
402
- a: (rgb2.a - rgb1.a) * p + rgb1.a
403
- };
404
- return tinycolor(rgba);
405
- };
406
- tinycolor.readability = function(color1, color2) {
407
- var c1 = tinycolor(color1), c2 = tinycolor(color2);
408
- return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
409
- };
410
- tinycolor.isReadable = function(color1, color2, wcag2) {
411
- var readability = tinycolor.readability(color1, color2), wcag2Parms, out;
412
- switch (out = !1, wcag2Parms = validateWCAG2Parms(wcag2), wcag2Parms.level + wcag2Parms.size) {
413
- case "AAsmall":
414
- case "AAAlarge":
415
- out = readability >= 4.5;
416
- break;
417
- case "AAlarge":
418
- out = readability >= 3;
419
- break;
420
- case "AAAsmall":
421
- out = readability >= 7;
422
- break;
423
- }
424
- return out;
425
- };
426
- tinycolor.mostReadable = function(baseColor, colorList, args) {
427
- var bestColor = null, bestScore = 0, readability, includeFallbackColors, level, size;
428
- args = args || {}, includeFallbackColors = args.includeFallbackColors, level = args.level, size = args.size;
429
- for (var i = 0; i < colorList.length; i++)
430
- readability = tinycolor.readability(baseColor, colorList[i]), readability > bestScore && (bestScore = readability, bestColor = tinycolor(colorList[i]));
431
- return tinycolor.isReadable(baseColor, bestColor, {
432
- level,
433
- size
434
- }) || !includeFallbackColors ? bestColor : (args.includeFallbackColors = !1, tinycolor.mostReadable(baseColor, ["#fff", "#000"], args));
435
- };
436
- var names = tinycolor.names = {
437
- aliceblue: "f0f8ff",
438
- antiquewhite: "faebd7",
439
- aqua: "0ff",
440
- aquamarine: "7fffd4",
441
- azure: "f0ffff",
442
- beige: "f5f5dc",
443
- bisque: "ffe4c4",
444
- black: "000",
445
- blanchedalmond: "ffebcd",
446
- blue: "00f",
447
- blueviolet: "8a2be2",
448
- brown: "a52a2a",
449
- burlywood: "deb887",
450
- burntsienna: "ea7e5d",
451
- cadetblue: "5f9ea0",
452
- chartreuse: "7fff00",
453
- chocolate: "d2691e",
454
- coral: "ff7f50",
455
- cornflowerblue: "6495ed",
456
- cornsilk: "fff8dc",
457
- crimson: "dc143c",
458
- cyan: "0ff",
459
- darkblue: "00008b",
460
- darkcyan: "008b8b",
461
- darkgoldenrod: "b8860b",
462
- darkgray: "a9a9a9",
463
- darkgreen: "006400",
464
- darkgrey: "a9a9a9",
465
- darkkhaki: "bdb76b",
466
- darkmagenta: "8b008b",
467
- darkolivegreen: "556b2f",
468
- darkorange: "ff8c00",
469
- darkorchid: "9932cc",
470
- darkred: "8b0000",
471
- darksalmon: "e9967a",
472
- darkseagreen: "8fbc8f",
473
- darkslateblue: "483d8b",
474
- darkslategray: "2f4f4f",
475
- darkslategrey: "2f4f4f",
476
- darkturquoise: "00ced1",
477
- darkviolet: "9400d3",
478
- deeppink: "ff1493",
479
- deepskyblue: "00bfff",
480
- dimgray: "696969",
481
- dimgrey: "696969",
482
- dodgerblue: "1e90ff",
483
- firebrick: "b22222",
484
- floralwhite: "fffaf0",
485
- forestgreen: "228b22",
486
- fuchsia: "f0f",
487
- gainsboro: "dcdcdc",
488
- ghostwhite: "f8f8ff",
489
- gold: "ffd700",
490
- goldenrod: "daa520",
491
- gray: "808080",
492
- green: "008000",
493
- greenyellow: "adff2f",
494
- grey: "808080",
495
- honeydew: "f0fff0",
496
- hotpink: "ff69b4",
497
- indianred: "cd5c5c",
498
- indigo: "4b0082",
499
- ivory: "fffff0",
500
- khaki: "f0e68c",
501
- lavender: "e6e6fa",
502
- lavenderblush: "fff0f5",
503
- lawngreen: "7cfc00",
504
- lemonchiffon: "fffacd",
505
- lightblue: "add8e6",
506
- lightcoral: "f08080",
507
- lightcyan: "e0ffff",
508
- lightgoldenrodyellow: "fafad2",
509
- lightgray: "d3d3d3",
510
- lightgreen: "90ee90",
511
- lightgrey: "d3d3d3",
512
- lightpink: "ffb6c1",
513
- lightsalmon: "ffa07a",
514
- lightseagreen: "20b2aa",
515
- lightskyblue: "87cefa",
516
- lightslategray: "789",
517
- lightslategrey: "789",
518
- lightsteelblue: "b0c4de",
519
- lightyellow: "ffffe0",
520
- lime: "0f0",
521
- limegreen: "32cd32",
522
- linen: "faf0e6",
523
- magenta: "f0f",
524
- maroon: "800000",
525
- mediumaquamarine: "66cdaa",
526
- mediumblue: "0000cd",
527
- mediumorchid: "ba55d3",
528
- mediumpurple: "9370db",
529
- mediumseagreen: "3cb371",
530
- mediumslateblue: "7b68ee",
531
- mediumspringgreen: "00fa9a",
532
- mediumturquoise: "48d1cc",
533
- mediumvioletred: "c71585",
534
- midnightblue: "191970",
535
- mintcream: "f5fffa",
536
- mistyrose: "ffe4e1",
537
- moccasin: "ffe4b5",
538
- navajowhite: "ffdead",
539
- navy: "000080",
540
- oldlace: "fdf5e6",
541
- olive: "808000",
542
- olivedrab: "6b8e23",
543
- orange: "ffa500",
544
- orangered: "ff4500",
545
- orchid: "da70d6",
546
- palegoldenrod: "eee8aa",
547
- palegreen: "98fb98",
548
- paleturquoise: "afeeee",
549
- palevioletred: "db7093",
550
- papayawhip: "ffefd5",
551
- peachpuff: "ffdab9",
552
- peru: "cd853f",
553
- pink: "ffc0cb",
554
- plum: "dda0dd",
555
- powderblue: "b0e0e6",
556
- purple: "800080",
557
- rebeccapurple: "663399",
558
- red: "f00",
559
- rosybrown: "bc8f8f",
560
- royalblue: "4169e1",
561
- saddlebrown: "8b4513",
562
- salmon: "fa8072",
563
- sandybrown: "f4a460",
564
- seagreen: "2e8b57",
565
- seashell: "fff5ee",
566
- sienna: "a0522d",
567
- silver: "c0c0c0",
568
- skyblue: "87ceeb",
569
- slateblue: "6a5acd",
570
- slategray: "708090",
571
- slategrey: "708090",
572
- snow: "fffafa",
573
- springgreen: "00ff7f",
574
- steelblue: "4682b4",
575
- tan: "d2b48c",
576
- teal: "008080",
577
- thistle: "d8bfd8",
578
- tomato: "ff6347",
579
- turquoise: "40e0d0",
580
- violet: "ee82ee",
581
- wheat: "f5deb3",
582
- white: "fff",
583
- whitesmoke: "f5f5f5",
584
- yellow: "ff0",
585
- yellowgreen: "9acd32"
586
- }, hexNames = tinycolor.hexNames = flip(names);
587
- function flip(o) {
588
- var flipped = {};
589
- for (var i in o)
590
- o.hasOwnProperty(i) && (flipped[o[i]] = i);
591
- return flipped;
592
- }
593
- function boundAlpha(a) {
594
- return a = parseFloat(a), (isNaN(a) || a < 0 || a > 1) && (a = 1), a;
595
- }
596
- function bound01(n, max) {
597
- isOnePointZero(n) && (n = "100%");
598
- var processPercent = isPercentage(n);
599
- return n = Math.min(max, Math.max(0, parseFloat(n))), processPercent && (n = parseInt(n * max, 10) / 100), Math.abs(n - max) < 1e-6 ? 1 : n % max / parseFloat(max);
600
- }
601
- function clamp01(val) {
602
- return Math.min(1, Math.max(0, val));
603
- }
604
- function parseIntFromHex(val) {
605
- return parseInt(val, 16);
606
- }
607
- function isOnePointZero(n) {
608
- return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
609
- }
610
- function isPercentage(n) {
611
- return typeof n == "string" && n.indexOf("%") != -1;
612
- }
613
- function pad2(c) {
614
- return c.length == 1 ? "0" + c : "" + c;
615
- }
616
- function convertToPercentage(n) {
617
- return n <= 1 && (n = n * 100 + "%"), n;
618
- }
619
- function convertDecimalToHex(d) {
620
- return Math.round(parseFloat(d) * 255).toString(16);
621
- }
622
- function convertHexToDecimal(h) {
623
- return parseIntFromHex(h) / 255;
624
- }
625
- var matchers = function() {
626
- var CSS_INTEGER = "[-\\+]?\\d+%?", CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?", CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")", PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?", PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
627
- return {
628
- CSS_UNIT: new RegExp(CSS_UNIT),
629
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
630
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
631
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
632
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
633
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
634
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
635
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
636
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
637
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
638
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
639
- };
640
- }();
641
- function isValidCSSUnit(color) {
642
- return !!matchers.CSS_UNIT.exec(color);
643
- }
644
- function stringInputToObject(color) {
645
- color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
646
- var named = !1;
647
- if (names[color])
648
- color = names[color], named = !0;
649
- else if (color == "transparent")
650
- return {
651
- r: 0,
652
- g: 0,
653
- b: 0,
654
- a: 0,
655
- format: "name"
656
- };
657
- var match;
658
- return (match = matchers.rgb.exec(color)) ? {
659
- r: match[1],
660
- g: match[2],
661
- b: match[3]
662
- } : (match = matchers.rgba.exec(color)) ? {
663
- r: match[1],
664
- g: match[2],
665
- b: match[3],
666
- a: match[4]
667
- } : (match = matchers.hsl.exec(color)) ? {
668
- h: match[1],
669
- s: match[2],
670
- l: match[3]
671
- } : (match = matchers.hsla.exec(color)) ? {
672
- h: match[1],
673
- s: match[2],
674
- l: match[3],
675
- a: match[4]
676
- } : (match = matchers.hsv.exec(color)) ? {
677
- h: match[1],
678
- s: match[2],
679
- v: match[3]
680
- } : (match = matchers.hsva.exec(color)) ? {
681
- h: match[1],
682
- s: match[2],
683
- v: match[3],
684
- a: match[4]
685
- } : (match = matchers.hex8.exec(color)) ? {
686
- r: parseIntFromHex(match[1]),
687
- g: parseIntFromHex(match[2]),
688
- b: parseIntFromHex(match[3]),
689
- a: convertHexToDecimal(match[4]),
690
- format: named ? "name" : "hex8"
691
- } : (match = matchers.hex6.exec(color)) ? {
692
- r: parseIntFromHex(match[1]),
693
- g: parseIntFromHex(match[2]),
694
- b: parseIntFromHex(match[3]),
695
- format: named ? "name" : "hex"
696
- } : (match = matchers.hex4.exec(color)) ? {
697
- r: parseIntFromHex(match[1] + "" + match[1]),
698
- g: parseIntFromHex(match[2] + "" + match[2]),
699
- b: parseIntFromHex(match[3] + "" + match[3]),
700
- a: convertHexToDecimal(match[4] + "" + match[4]),
701
- format: named ? "name" : "hex8"
702
- } : (match = matchers.hex3.exec(color)) ? {
703
- r: parseIntFromHex(match[1] + "" + match[1]),
704
- g: parseIntFromHex(match[2] + "" + match[2]),
705
- b: parseIntFromHex(match[3] + "" + match[3]),
706
- format: named ? "name" : "hex"
707
- } : !1;
708
- }
709
- function validateWCAG2Parms(parms) {
710
- var level, size;
711
- return parms = parms || {
712
- level: "AA",
713
- size: "small"
714
- }, level = (parms.level || "AA").toUpperCase(), size = (parms.size || "small").toLowerCase(), level !== "AA" && level !== "AAA" && (level = "AA"), size !== "small" && size !== "large" && (size = "small"), {
715
- level,
716
- size
717
- };
718
- }
719
- const ColorListWrap = styled(Flex)`
720
- gap: 0.25em;
721
- `, ColorBoxContainer = styled.div`
722
- width: 2.1em;
723
- height: 2.1em;
724
- cursor: pointer;
725
- position: relative;
726
- overflow: hidden;
727
- border-radius: 3px;
728
- background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=')
729
- left center #fff;
730
- `, ColorBox$1 = styled.div`
731
- border-radius: inherit;
732
- box-shadow: inset 0 0 0 1px var(--card-shadow-outline-color);
733
- content: '';
734
- position: absolute;
735
- inset: 0;
736
- z-index: 1;
737
- `, validateColors = (colors) => colors.reduce((cls, c) => {
738
- const color = c.hex ? tinycolor(c.hex) : tinycolor(c);
739
- return color.isValid() && cls.push({
740
- color: c,
741
- backgroundColor: color.toRgbString()
742
- }), cls;
743
- }, []), ColorList = memo(function({ colors, onChange }) {
744
- return colors ? /* @__PURE__ */ jsx(ColorListWrap, { wrap: "wrap", children: validateColors(colors).map(({ color, backgroundColor }, idx) => /* @__PURE__ */ jsx(
745
- ColorBoxContainer,
746
- {
747
- onClick: () => {
748
- onChange(color);
749
- },
750
- children: /* @__PURE__ */ jsx(ColorBox$1, { style: { background: backgroundColor } })
751
- },
752
- `${backgroundColor}-${idx}`
753
- )) }) : null;
754
- }), ColorPickerFields = ({
755
- onChange,
756
- rgb,
757
- hsl,
758
- hex,
759
- disableAlpha
760
- }) => {
761
- const { sanity } = useTheme(), inputStyles = useMemo(
762
- () => ({
763
- input: {
764
- width: "80%",
765
- padding: "4px 10% 3px",
766
- border: "none",
767
- boxShadow: `inset 0 0 0 1px ${sanity.color.input.default.enabled.border}`,
768
- color: sanity.color.input.default.enabled.fg,
769
- backgroundColor: sanity.color.input.default.enabled.bg,
770
- fontSize: sanity.fonts.text.sizes[0].fontSize,
771
- textAlign: "center"
772
- },
773
- label: {
774
- display: "block",
775
- textAlign: "center",
776
- fontSize: sanity.fonts.label.sizes[0].fontSize,
777
- color: sanity.color.base.fg,
778
- paddingTop: "3px",
779
- paddingBottom: "4px",
780
- textTransform: "capitalize"
781
- }
782
- }),
783
- [sanity]
784
- ), handleChange = useCallback(
785
- (data) => {
786
- if ("hex" in data && data.hex && isValidHex(data.hex))
787
- onChange({
788
- hex: data.hex,
789
- source: "hex"
790
- });
791
- else if (rgb && ("r" in data && data.r || "g" in data && data.g || "b" in data && data.b))
792
- onChange({
793
- r: Number(data.r) || rgb.r,
794
- g: Number(data.g) || rgb.g,
795
- b: Number(data.b) || rgb.b,
796
- a: rgb.a,
797
- source: "rgb"
798
- });
799
- else if (hsl && "a" in data && data.a) {
800
- let alpha = Number(data.a);
801
- alpha < 0 ? alpha = 0 : alpha > 100 && (alpha = 100), alpha /= 100, onChange({
802
- h: hsl.h,
803
- s: hsl.s,
804
- l: hsl.l,
805
- a: alpha,
806
- source: "hsl"
807
- });
808
- }
809
- },
810
- [onChange, hsl, rgb]
811
- );
812
- return /* @__PURE__ */ jsxs(Flex, { children: [
813
- /* @__PURE__ */ jsx(Box, { flex: 2, marginRight: 1, children: /* @__PURE__ */ jsx(
814
- EditableInput,
815
- {
816
- style: inputStyles,
817
- label: "hex",
818
- value: hex?.replace("#", ""),
819
- onChange: handleChange
820
- }
821
- ) }),
822
- /* @__PURE__ */ jsx(Box, { flex: 1, marginRight: 1, children: /* @__PURE__ */ jsx(
823
- EditableInput,
824
- {
825
- style: inputStyles,
826
- label: "r",
827
- value: rgb?.r,
828
- onChange: handleChange,
829
- dragLabel: !0,
830
- dragMax: 255
831
- }
832
- ) }),
833
- /* @__PURE__ */ jsx(Box, { flex: 1, marginRight: 1, children: /* @__PURE__ */ jsx(
834
- EditableInput,
835
- {
836
- style: inputStyles,
837
- label: "g",
838
- value: rgb?.g,
839
- onChange: handleChange,
840
- dragLabel: !0,
841
- dragMax: 255
842
- }
843
- ) }),
844
- /* @__PURE__ */ jsx(Box, { flex: 1, marginRight: 1, children: /* @__PURE__ */ jsx(
845
- EditableInput,
846
- {
847
- style: inputStyles,
848
- label: "b",
849
- value: rgb?.b,
850
- onChange: handleChange,
851
- dragLabel: !0,
852
- dragMax: 255
853
- }
854
- ) }),
855
- !disableAlpha && /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(
856
- EditableInput,
857
- {
858
- style: inputStyles,
859
- label: "a",
860
- value: Math.round((rgb?.a ?? 1) * 100),
861
- onChange: handleChange,
862
- dragLabel: !0,
863
- dragMax: 100
864
- }
865
- ) })
866
- ] });
867
- }, ColorBox = styled(Box)`
868
- position: absolute;
869
- top: 0;
870
- left: 0;
871
- width: 100%;
872
- height: 100%;
873
- `, ReadOnlyContainer = styled(Flex)`
874
- margin-top: 6rem;
875
- background-color: var(--card-bg-color);
876
- position: relative;
877
- width: 100%;
878
- `, ColorPickerInner = (props) => {
879
- const {
880
- width,
881
- color: { rgb, hex, hsv, hsl },
882
- onChange,
883
- onUnset,
884
- disableAlpha,
885
- colorList,
886
- readOnly
887
- } = props;
888
- return !hsl || !hsv ? null : /* @__PURE__ */ jsx("div", { style: { width }, children: /* @__PURE__ */ jsx(Card, { padding: 1, border: !0, radius: 1, children: /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
889
- !readOnly && /* @__PURE__ */ jsxs(Fragment, { children: [
890
- /* @__PURE__ */ jsx(Card, { overflow: "hidden", style: { position: "relative", height: "5em" }, children: /* @__PURE__ */ jsx(Saturation, { onChange, hsl, hsv }) }),
891
- /* @__PURE__ */ jsx(
892
- Card,
893
- {
894
- shadow: 1,
895
- radius: 3,
896
- overflow: "hidden",
897
- style: { position: "relative", height: "10px" },
898
- children: /* @__PURE__ */ jsx(Hue, { hsl, onChange: !readOnly && onChange })
899
- }
900
- ),
901
- !disableAlpha && /* @__PURE__ */ jsx(
902
- Card,
903
- {
904
- shadow: 1,
905
- radius: 3,
906
- overflow: "hidden",
907
- style: { position: "relative", height: "10px", background: "#fff" },
908
- children: /* @__PURE__ */ jsx(Alpha, { rgb, hsl, onChange })
909
- }
910
- )
911
- ] }),
912
- /* @__PURE__ */ jsxs(Flex, { children: [
913
- /* @__PURE__ */ jsxs(
914
- Card,
915
- {
916
- flex: 1,
917
- radius: 2,
918
- overflow: "hidden",
919
- style: { position: "relative", minWidth: "4em", background: "#fff" },
920
- children: [
921
- /* @__PURE__ */ jsx(
922
- Checkboard,
923
- {
924
- size: 8,
925
- white: "transparent",
926
- grey: "rgba(0,0,0,.08)",
927
- renderers: {}
928
- }
929
- ),
930
- /* @__PURE__ */ jsx(
931
- ColorBox,
932
- {
933
- style: {
934
- backgroundColor: `rgba(${rgb?.r},${rgb?.g},${rgb?.b},${rgb?.a})`
935
- }
936
- }
937
- ),
938
- readOnly && /* @__PURE__ */ jsx(
939
- ReadOnlyContainer,
940
- {
941
- padding: 2,
942
- paddingBottom: 1,
943
- sizing: "border",
944
- justify: "space-between",
945
- children: /* @__PURE__ */ jsxs(Stack, { space: 3, marginTop: 1, children: [
946
- /* @__PURE__ */ jsx(Text, { size: 3, weight: "bold", children: hex }),
947
- /* @__PURE__ */ jsxs(Inline, { space: 3, children: [
948
- /* @__PURE__ */ jsxs(Text, { size: 1, children: [
949
- /* @__PURE__ */ jsx("strong", { children: "RGB: " }),
950
- rgb?.r,
951
- " ",
952
- rgb?.g,
953
- " ",
954
- rgb?.b
955
- ] }),
956
- /* @__PURE__ */ jsxs(Text, { size: 1, children: [
957
- /* @__PURE__ */ jsx("strong", { children: "HSL: " }),
958
- " ",
959
- Math.round(hsl?.h ?? 0),
960
- " ",
961
- Math.round((hsl?.s ?? 0) * 100),
962
- "% ",
963
- Math.round((hsl?.l ?? 0) * 100),
964
- "%"
965
- ] })
966
- ] })
967
- ] })
968
- }
969
- )
970
- ]
971
- }
972
- ),
973
- !readOnly && /* @__PURE__ */ jsxs(Flex, { align: "flex-start", marginLeft: 2, children: [
974
- /* @__PURE__ */ jsx(Box, { style: { width: 200 }, children: /* @__PURE__ */ jsx(
975
- ColorPickerFields,
976
- {
977
- rgb,
978
- hsl,
979
- hex,
980
- onChange,
981
- disableAlpha
982
- }
983
- ) }),
984
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Button, { onClick: onUnset, title: "Delete color", icon: TrashIcon, tone: "critical" }) })
985
- ] })
986
- ] }),
987
- colorList && /* @__PURE__ */ jsx(ColorList, { colors: colorList, onChange })
988
- ] }) }) });
989
- }, ColorPicker = CustomPicker(ColorPickerInner), DEFAULT_COLOR = {
990
- hex: "#24a3e3",
991
- hsl: { h: 200, s: 0.7732, l: 0.5156, a: 1 },
992
- hsv: { h: 200, s: 0.8414, v: 0.8901, a: 1 },
993
- rgb: { r: 46, g: 163, b: 227, a: 1 },
994
- source: "hex"
995
- };
996
- function ColorInput(props) {
997
- const { onChange, readOnly } = props, value = props.value, type = props.schemaType, focusRef = useRef(null), [color, setColor] = useState(value);
998
- useEffect(() => startTransition(() => setColor(value)), [value]);
999
- const [emitColor, setEmitColor] = useState(void 0), debouncedColor = useDeferredValue(emitColor), handleChange = useEffectEvent((nextColor) => {
1000
- const fieldPatches = type.fields.filter((field) => field.name in nextColor).map((field) => {
1001
- const nextFieldValue = nextColor[field.name], isObject = field.type.jsonType === "object";
1002
- return set(
1003
- isObject ? Object.assign({ _type: field.type.name }, nextFieldValue) : nextFieldValue,
1004
- [field.name]
1005
- );
1006
- });
1007
- onChange([
1008
- setIfMissing({ _type: type.name }),
1009
- set(type.name, ["_type"]),
1010
- set(nextColor.rgb?.a, ["alpha"]),
1011
- ...fieldPatches
1012
- ]);
1013
- });
1014
- useEffect(() => {
1015
- if (!debouncedColor) return;
1016
- const raf = requestAnimationFrame(() => handleChange(debouncedColor));
1017
- return () => cancelAnimationFrame(raf);
1018
- }, [debouncedColor]);
1019
- const handleCreateColor = useCallback(() => {
1020
- setColor(DEFAULT_COLOR), setEmitColor(DEFAULT_COLOR);
1021
- }, []), handleColorChange = useCallback((nextColor) => {
1022
- setColor(nextColor), setEmitColor(nextColor);
1023
- }, []), handleUnset = useCallback(() => {
1024
- setColor(void 0), onChange(unset());
1025
- }, [onChange]);
1026
- return /* @__PURE__ */ jsx(Fragment, { children: value && value.hex ? /* @__PURE__ */ jsx(
1027
- ColorPicker,
1028
- {
1029
- color,
1030
- onChange: handleColorChange,
1031
- readOnly: readOnly || typeof type.readOnly == "boolean" && type.readOnly,
1032
- disableAlpha: !!type.options?.disableAlpha,
1033
- colorList: type.options?.colorList,
1034
- onUnset: handleUnset
1035
- }
1036
- ) : /* @__PURE__ */ jsx(
1037
- Button,
1038
- {
1039
- icon: AddIcon,
1040
- mode: "ghost",
1041
- text: "Create color",
1042
- ref: focusRef,
1043
- disabled: !!readOnly,
1044
- onClick: handleCreateColor
1045
- }
1046
- ) });
1047
- }
1048
- export {
1049
- ColorInput as default
1050
- };
1051
- //# sourceMappingURL=ColorInput.mjs.map