@pathscale/ui 1.1.22 → 1.1.23

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.
@@ -29,7 +29,7 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
29
29
  let containerRef;
30
30
  const store = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>(0, __WEBPACK_EXTERNAL_MODULE__hueShift_js_ca4235e5__.createHueShiftStore)(local.storagePrefix ?? "theme"));
31
31
  const colorValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>hueToColorValue(store().hueShift(), store().hueSaturation()));
32
- const setThemeColor = (hue, saturation)=>{
32
+ const setThemeColor = (hue, saturation, lightnessOffset = 0)=>{
33
33
  if (null === hue) {
34
34
  store().setHueShift(null);
35
35
  local.onColorChange?.(null, 100);
@@ -37,13 +37,14 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
37
37
  }
38
38
  const normalizedHue = (hue % 360 + 360) % 360;
39
39
  const normalizedSaturation = Math.max(0, Math.min(100, saturation));
40
- store().setHueShift(normalizedHue, normalizedSaturation);
40
+ store().setHueShift(normalizedHue, normalizedSaturation, lightnessOffset);
41
41
  local.onColorChange?.(normalizedHue, normalizedSaturation);
42
42
  };
43
43
  const handleColorChange = (color)=>{
44
44
  const { h, s, l } = color.hsl;
45
45
  if (s < 10 && l > 90) return void setThemeColor(null, 100);
46
- setThemeColor(h, s);
46
+ const lightnessOffset = l - 58;
47
+ setThemeColor(h, s, lightnessOffset);
47
48
  };
48
49
  const GRAYSCALE_SWATCHES = [
49
50
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",