@dreamcommerce/aurora 2.1.15-6 → 2.1.15-8

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.
@@ -43,6 +43,7 @@ const useStyles = reactJss_esm.createUseStyles({
43
43
  }
44
44
  });
45
45
  const PureColorPicker = ({ hideChooseCancelButtons }) => {
46
+ var _a;
46
47
  const { color = {
47
48
  hue: 0,
48
49
  saturation: 0,
@@ -91,7 +92,7 @@ const PureColorPicker = ({ hideChooseCancelButtons }) => {
91
92
  React__default['default'].createElement("div", { className: `${classes.preview} ${main_module['default'][css_classes.cssColorPickerPreview]}` }),
92
93
  React__default['default'].createElement("div", { className: main_module['default'][css_classes.cssColorPickerInputContainer] },
93
94
  React__default['default'].createElement("span", null, "#"),
94
- React__default['default'].createElement(input['default'], { id: "color-picker-id", value: color === null || color === void 0 ? void 0 : color.hex.replace(/#/g, ''), onChange: inputOnChange }))),
95
+ React__default['default'].createElement(input['default'], { id: "color-picker-id", value: (_a = color === null || color === void 0 ? void 0 : color.hex) === null || _a === void 0 ? void 0 : _a.replace(/#/g, ''), onChange: inputOnChange }))),
95
96
  !hideChooseCancelButtons && React__default['default'].createElement(buttons['default'], { restoreInitialColor: restoreInitialColor })));
96
97
  };
97
98
  const ColorPickerWithContext = ({ initialColor, onChange, hideChooseCancelButtons, name }) => {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var index = require('../../../../../external/color-convert/index.js');
6
6
 
7
7
  class ColorConverter {
8
- static hex2hsl(hex) {
8
+ static hex2hsl(hex = 'fff') {
9
9
  const hexToConvert = hex.startsWith('#') ? hex.substring(1) : hex;
10
10
  const [hue, saturation, lightness] = index['default'].hex.hsl(hexToConvert);
11
11
  return { hue, saturation, lightness };
@@ -13,7 +13,7 @@ class ColorConverter {
13
13
  static hsl2hex({ hue, saturation, lightness }) {
14
14
  return `#${index['default'].hsl.hex([hue, saturation, lightness])}`;
15
15
  }
16
- static hex2hsv(hex) {
16
+ static hex2hsv(hex = 'fff') {
17
17
  const hexToConvert = hex.startsWith('#') ? hex.substring(1) : hex;
18
18
  const [hue, saturation, value] = index['default'].hex.hsv(hexToConvert);
19
19
  return { hue, saturation, value };
@@ -35,6 +35,7 @@ const useStyles = createUseStyles({
35
35
  }
36
36
  });
37
37
  const PureColorPicker = ({ hideChooseCancelButtons }) => {
38
+ var _a;
38
39
  const { color = {
39
40
  hue: 0,
40
41
  saturation: 0,
@@ -83,7 +84,7 @@ const PureColorPicker = ({ hideChooseCancelButtons }) => {
83
84
  React.createElement("div", { className: `${classes.preview} ${styles[cssColorPickerPreview]}` }),
84
85
  React.createElement("div", { className: styles[cssColorPickerInputContainer] },
85
86
  React.createElement("span", null, "#"),
86
- React.createElement(Input, { id: "color-picker-id", value: color === null || color === void 0 ? void 0 : color.hex.replace(/#/g, ''), onChange: inputOnChange }))),
87
+ React.createElement(Input, { id: "color-picker-id", value: (_a = color === null || color === void 0 ? void 0 : color.hex) === null || _a === void 0 ? void 0 : _a.replace(/#/g, ''), onChange: inputOnChange }))),
87
88
  !hideChooseCancelButtons && React.createElement(ColorPickerButtons, { restoreInitialColor: restoreInitialColor })));
88
89
  };
89
90
  const ColorPickerWithContext = ({ initialColor, onChange, hideChooseCancelButtons, name }) => {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,6 +1,6 @@
1
1
  import { THEXColor, THSLColor, THSVColor } from "./types";
2
2
  export declare class ColorConverter {
3
- static hex2hsl(hex: THEXColor): THSLColor;
3
+ static hex2hsl(hex?: THEXColor): THSLColor;
4
4
  static hsl2hex({ hue, saturation, lightness }: THSLColor): THEXColor;
5
- static hex2hsv(hex: THEXColor): THSVColor;
5
+ static hex2hsv(hex?: THEXColor): THSVColor;
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import colorConvert from '../../../../../external/color-convert/index.js';
2
2
 
3
3
  class ColorConverter {
4
- static hex2hsl(hex) {
4
+ static hex2hsl(hex = 'fff') {
5
5
  const hexToConvert = hex.startsWith('#') ? hex.substring(1) : hex;
6
6
  const [hue, saturation, lightness] = colorConvert.hex.hsl(hexToConvert);
7
7
  return { hue, saturation, lightness };
@@ -9,7 +9,7 @@ class ColorConverter {
9
9
  static hsl2hex({ hue, saturation, lightness }) {
10
10
  return `#${colorConvert.hsl.hex([hue, saturation, lightness])}`;
11
11
  }
12
- static hex2hsv(hex) {
12
+ static hex2hsv(hex = 'fff') {
13
13
  const hexToConvert = hex.startsWith('#') ? hex.substring(1) : hex;
14
14
  const [hue, saturation, value] = colorConvert.hex.hsv(hexToConvert);
15
15
  return { hue, saturation, value };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.1.15-6",
5
+ "version": "2.1.15-8",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",