@pathscale/ui 1.1.28 → 1.1.29

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