@dreamcommerce/aurora 2.12.1-44 → 2.12.1-45

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.
@@ -20,8 +20,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
20
20
 
21
21
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
22
22
 
23
- const ColorPickerNewPure = ({ color, setColor, id, name }) => {
24
- const { hex, handleCancel } = React.useContext(context.ColorPickerNewContext);
23
+ const ColorPickerNewPure = ({ id, name }) => {
24
+ const { color, setColor, hex, handleCancel } = React.useContext(context.ColorPickerNewContext);
25
25
  // const [color, setColor] = useState('rgba(255,255,255,1)');
26
26
  return (React__default['default'].createElement("div", { className: `${main_module['default'][css_classes.cssColorPicker]}` },
27
27
  React__default['default'].createElement(index['default'], null,
@@ -27,9 +27,9 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
27
27
  React.useEffect(() => {
28
28
  setAlphaValue(`${Math.round(rgbaArr[3] * 100)}`);
29
29
  }, [rgbaArr[3]]);
30
- React.useEffect(() => {
31
- onChange === null || onChange === void 0 ? void 0 : onChange(utilities.getAllColorTypes(color));
32
- }, [color]);
30
+ // useEffect(() => {
31
+ // onChange?.(getAllColorTypes(color));
32
+ // }, [color]);
33
33
  const handleCancel = () => {
34
34
  setColor(choosenColor);
35
35
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
@@ -19,7 +19,7 @@ const ColorPickerNewWithContext = ({ id, name, initialColor, onChange, onCancel,
19
19
  onSave
20
20
  });
21
21
  return (React__default['default'].createElement(context.ColorPickerNewContext.Provider, { value: contextValue },
22
- React__default['default'].createElement(pureColorPicker['default'], { color: contextValue.color, setColor: contextValue.setColor, id: id, name: name })));
22
+ React__default['default'].createElement(pureColorPicker['default'], { id: id, name: name })));
23
23
  };
24
24
 
25
25
  exports.default = ColorPickerNewWithContext;
@@ -12,8 +12,8 @@ import { ColorPickerSwatch } from './color-picker-swatch.js';
12
12
  import { ColorPickerSwatches } from './color-picker-swatches.js';
13
13
  import Dropdown from '../../dropdown/index.js';
14
14
 
15
- const ColorPickerNewPure = ({ color, setColor, id, name }) => {
16
- const { hex, handleCancel } = useContext(ColorPickerNewContext);
15
+ const ColorPickerNewPure = ({ id, name }) => {
16
+ const { color, setColor, hex, handleCancel } = useContext(ColorPickerNewContext);
17
17
  // const [color, setColor] = useState('rgba(255,255,255,1)');
18
18
  return (React.createElement("div", { className: `${styles[cssColorPicker]}` },
19
19
  React.createElement(Dropdown, null,
@@ -23,9 +23,9 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
23
23
  useEffect(() => {
24
24
  setAlphaValue(`${Math.round(rgbaArr[3] * 100)}`);
25
25
  }, [rgbaArr[3]]);
26
- useEffect(() => {
27
- onChange === null || onChange === void 0 ? void 0 : onChange(getAllColorTypes(color));
28
- }, [color]);
26
+ // useEffect(() => {
27
+ // onChange?.(getAllColorTypes(color));
28
+ // }, [color]);
29
29
  const handleCancel = () => {
30
30
  setColor(choosenColor);
31
31
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
@@ -11,7 +11,7 @@ const ColorPickerNewWithContext = ({ id, name, initialColor, onChange, onCancel,
11
11
  onSave
12
12
  });
13
13
  return (React.createElement(ColorPickerNewContext.Provider, { value: contextValue },
14
- React.createElement(ColorPickerNewPure, { color: contextValue.color, setColor: contextValue.setColor, id: id, name: name })));
14
+ React.createElement(ColorPickerNewPure, { id: id, name: name })));
15
15
  };
16
16
 
17
17
  export default ColorPickerNewWithContext;
@@ -1,7 +1,5 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  export interface IColorPickerNewPureProps {
3
- color: string;
4
- setColor: Dispatch<SetStateAction<string>>;
5
3
  id: string;
6
4
  name?: string;
7
5
  }
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-44",
5
+ "version": "2.12.1-45",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",