@dreamcommerce/aurora 2.12.1-5 → 2.12.1-7

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.
@@ -12,25 +12,29 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
12
12
  React.useEffect(() => {
13
13
  setColors(initialColor);
14
14
  }, [initialColor]);
15
- React.useEffect(() => {
16
- onChange === null || onChange === void 0 ? void 0 : onChange(color);
17
- }, [color, onChange]);
15
+ // useEffect(() => {
16
+ // onChange?.(color);
17
+ // }, [color]);
18
18
  const handleChangeSaturation = (hsva) => {
19
19
  setColors(hsva);
20
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
20
21
  };
21
22
  const handleChangeHue = (hsls) => {
22
23
  const hueColorSet = utilities.getColorFormatsWithoutHsv(hsls);
23
24
  setColor({ ...color, ...hueColorSet });
25
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
24
26
  };
25
27
  const handleChangeAlpha = (hsls) => {
26
28
  const hueColorSet = utilities.getColorFormatsWithoutHsv(hsls);
27
29
  setColor({ ...color, ...hueColorSet });
30
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
28
31
  };
29
32
  const handlePickSwatch = (rgba) => {
30
33
  setColors(rgba);
31
34
  };
32
35
  const handleCancel = () => {
33
36
  setColors(choosenColor);
37
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
34
38
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
35
39
  };
36
40
  const handleSave = () => {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -34,7 +34,7 @@ const ColorPickerNew = ({ initialColor = '#fff', pickerText, onChange, onCancel,
34
34
  React__default['default'].createElement("div", { className: `${main_module['default'][css_classes.cssColorPickerInputContainer]}` },
35
35
  React__default['default'].createElement("div", { className: `${main_module['default'][css_classes.cssColorPickerInputColorSwatchContainer]}` },
36
36
  React__default['default'].createElement(colorPickerSwatch.ColorPickerSwatch, { color: color === null || color === void 0 ? void 0 : color.rgba })),
37
- React__default['default'].createElement(input['default'], { value: (_a = color === null || color === void 0 ? void 0 : color.hex) === null || _a === void 0 ? void 0 : _a.toUpperCase(), readOnly: true }))),
37
+ React__default['default'].createElement(input['default'], { value: `# ${(_a = color === null || color === void 0 ? void 0 : color.hex) === null || _a === void 0 ? void 0 : _a.toUpperCase()}`, readOnly: true }))),
38
38
  React__default['default'].createElement(index['default'].Content, { onClickOutside: handleCancel },
39
39
  React__default['default'].createElement(colorPickerHeader.ColorPickerHeader, { text: pickerText, onCancel: handleCancel }),
40
40
  React__default['default'].createElement("div", { className: `${main_module['default'][css_classes.cssColorPickerContainer]}` },
@@ -8,25 +8,29 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
8
8
  useEffect(() => {
9
9
  setColors(initialColor);
10
10
  }, [initialColor]);
11
- useEffect(() => {
12
- onChange === null || onChange === void 0 ? void 0 : onChange(color);
13
- }, [color, onChange]);
11
+ // useEffect(() => {
12
+ // onChange?.(color);
13
+ // }, [color]);
14
14
  const handleChangeSaturation = (hsva) => {
15
15
  setColors(hsva);
16
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
16
17
  };
17
18
  const handleChangeHue = (hsls) => {
18
19
  const hueColorSet = getColorFormatsWithoutHsv(hsls);
19
20
  setColor({ ...color, ...hueColorSet });
21
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
20
22
  };
21
23
  const handleChangeAlpha = (hsls) => {
22
24
  const hueColorSet = getColorFormatsWithoutHsv(hsls);
23
25
  setColor({ ...color, ...hueColorSet });
26
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
24
27
  };
25
28
  const handlePickSwatch = (rgba) => {
26
29
  setColors(rgba);
27
30
  };
28
31
  const handleCancel = () => {
29
32
  setColors(choosenColor);
33
+ onChange === null || onChange === void 0 ? void 0 : onChange(color);
30
34
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
31
35
  };
32
36
  const handleSave = () => {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -26,7 +26,7 @@ const ColorPickerNew = ({ initialColor = '#fff', pickerText, onChange, onCancel,
26
26
  React.createElement("div", { className: `${styles[cssColorPickerInputContainer]}` },
27
27
  React.createElement("div", { className: `${styles[cssColorPickerInputColorSwatchContainer]}` },
28
28
  React.createElement(ColorPickerSwatch, { color: color === null || color === void 0 ? void 0 : color.rgba })),
29
- React.createElement(Input, { value: (_a = color === null || color === void 0 ? void 0 : color.hex) === null || _a === void 0 ? void 0 : _a.toUpperCase(), readOnly: true }))),
29
+ React.createElement(Input, { value: `# ${(_a = color === null || color === void 0 ? void 0 : color.hex) === null || _a === void 0 ? void 0 : _a.toUpperCase()}`, readOnly: true }))),
30
30
  React.createElement(Dropdown.Content, { onClickOutside: handleCancel },
31
31
  React.createElement(ColorPickerHeader, { text: pickerText, onCancel: handleCancel }),
32
32
  React.createElement("div", { className: `${styles[cssColorPickerContainer]}` },
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.12.1-5",
5
+ "version": "2.12.1-7",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",