@pathscale/ui 1.1.28 → 1.1.30
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.
|
@@ -42,34 +42,40 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
|
|
|
42
42
|
const GRAYSCALE_SWATCHES = [
|
|
43
43
|
{
|
|
44
44
|
label: "White",
|
|
45
|
-
|
|
45
|
+
hex: "#fafafa",
|
|
46
|
+
theme: "dark"
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
label: "Light gray",
|
|
49
|
-
|
|
50
|
+
hex: "#d4d4d4",
|
|
51
|
+
theme: "dark"
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
label: "Gray",
|
|
53
|
-
|
|
55
|
+
hex: "#737373",
|
|
56
|
+
theme: "dark"
|
|
54
57
|
},
|
|
55
58
|
{
|
|
56
59
|
label: "Dark gray",
|
|
57
|
-
|
|
60
|
+
hex: "#404040",
|
|
61
|
+
theme: "light"
|
|
58
62
|
},
|
|
59
63
|
{
|
|
60
64
|
label: "Charcoal",
|
|
61
|
-
|
|
65
|
+
hex: "#262626",
|
|
66
|
+
theme: "light"
|
|
62
67
|
},
|
|
63
68
|
{
|
|
64
69
|
label: "Black",
|
|
65
|
-
|
|
70
|
+
hex: "#0a0a0a",
|
|
71
|
+
theme: "light"
|
|
66
72
|
}
|
|
67
73
|
];
|
|
68
|
-
const handleGrayscale = (
|
|
74
|
+
const handleGrayscale = (swatch)=>{
|
|
69
75
|
store().setThemeColor(null);
|
|
70
76
|
(0, __WEBPACK_EXTERNAL_MODULE__hueShift_js_ca4235e5__.resetHueShift)();
|
|
71
77
|
local.onColorChange?.(null, 0);
|
|
72
|
-
local.onThemeSwitch?.(theme);
|
|
78
|
+
local.onThemeSwitch?.(swatch.theme);
|
|
73
79
|
};
|
|
74
80
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
75
81
|
if (!isOpen()) return;
|
|
@@ -157,18 +163,11 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
|
|
|
157
163
|
}));
|
|
158
164
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$5, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
159
165
|
each: GRAYSCALE_SWATCHES,
|
|
160
|
-
children: (g
|
|
166
|
+
children: (g)=>(()=>{
|
|
161
167
|
var _el$6 = _tmpl$4();
|
|
162
|
-
_el$6.$$click = ()=>handleGrayscale(g
|
|
168
|
+
_el$6.$$click = ()=>handleGrayscale(g);
|
|
163
169
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
164
|
-
var _v$ =
|
|
165
|
-
95,
|
|
166
|
-
80,
|
|
167
|
-
60,
|
|
168
|
-
40,
|
|
169
|
-
25,
|
|
170
|
-
5
|
|
171
|
-
][i()]}% 0 0)`, _v$2 = g.label;
|
|
170
|
+
var _v$ = `${g.hex}`, _v$2 = g.label;
|
|
172
171
|
_v$ !== _p$.e && (null != (_p$.e = _v$) ? _el$6.style.setProperty("background-color", _v$) : _el$6.style.removeProperty("background-color"));
|
|
173
172
|
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$6, "aria-label", _p$.t = _v$2);
|
|
174
173
|
return _p$;
|