@dreamcommerce/aurora 2.12.1-22 → 2.12.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.
@@ -1,9 +1,9 @@
1
- import { ColorPickerColor, ColorPickerColors } from '../types';
1
+ import { ColorPickerColorTypes, ColorPickerColors } from '../types';
2
2
  import React from 'react';
3
3
  interface IColorPickerSwatchProps {
4
4
  color: ColorPickerColors;
5
5
  size?: 'small' | 'big';
6
- onClick?: (color: ColorPickerColor) => void;
6
+ onClick?: (color: ColorPickerColorTypes['hex']) => void;
7
7
  }
8
8
  export declare const ColorPickerSwatch: React.FC<IColorPickerSwatchProps>;
9
9
  export {};
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { ColorPickerColor } from '../types';
2
+ import { ColorPickerColorTypes } from '../types';
3
3
  export declare type ColorPickerHookProps = {
4
- initialColor?: ColorPickerColor;
5
- onChange?: (color: ColorPickerColor) => void;
4
+ initialColor?: ColorPickerColorTypes['hex'];
5
+ onChange?: (color: ColorPickerColorTypes['hex']) => void;
6
6
  onCancel?: () => void;
7
- onSave?: (color: ColorPickerColor) => void;
7
+ onSave?: (color: ColorPickerColorTypes['hex']) => void;
8
8
  };
9
9
  declare const useColorPicker: ({ initialColor, onChange, onCancel, onSave }: ColorPickerHookProps) => {
10
10
  color: string;
@@ -23,6 +23,6 @@ declare const useColorPicker: ({ initialColor, onChange, onCancel, onSave }: Col
23
23
  setB: (newB: number) => void;
24
24
  handleCancel: () => void;
25
25
  handleSave: () => void;
26
- handlePickSwatch: (color: ColorPickerColor) => void;
26
+ handlePickSwatch: (color: ColorPickerColorTypes['hex']) => void;
27
27
  };
28
28
  export default useColorPicker;
@@ -6,10 +6,10 @@ export interface IColorPickerNewPureProps {
6
6
  export interface IColorPickerNewProps {
7
7
  id: string;
8
8
  name?: string;
9
- initialColor?: ColorPickerColor | undefined;
10
- onChange?: (color: ColorPickerColor) => void;
9
+ initialColor?: IColorPickerColor['hex'] | undefined;
10
+ onChange?: (color: IColorPickerColor['hex']) => void;
11
11
  onCancel?: () => void;
12
- onSave?: (color: ColorPickerColor) => void;
12
+ onSave?: (color: IColorPickerColor['hex']) => void;
13
13
  }
14
14
  export interface IColorPickerNewContextProps {
15
15
  color: string;
@@ -27,7 +27,7 @@ export interface IColorPickerNewContextProps {
27
27
  setG: (newG: number) => void;
28
28
  setB: (newB: number) => void;
29
29
  handleCancel: () => void;
30
- handleSave: (color: ColorPickerColor) => void;
30
+ handleSave: (color: IColorPickerColor['hex']) => void;
31
31
  handlePickSwatch: (color: string) => void;
32
32
  }
33
33
  export declare type ColorPickerColorTypes = {
@@ -37,6 +37,13 @@ export declare type ColorPickerColorTypes = {
37
37
  s: number;
38
38
  l: number;
39
39
  };
40
+ rgb: {
41
+ r: number;
42
+ g: number;
43
+ b: number;
44
+ };
45
+ };
46
+ export declare type IColorPickerColor = {
47
+ hex: ColorPickerColorTypes['hex'];
40
48
  };
41
- export declare type ColorPickerColor = ColorPickerColorTypes['hex'];
42
- export declare type ColorPickerColors = ColorPickerColorTypes['hex'] | ColorPickerColorTypes['hsl'];
49
+ export declare type ColorPickerColors = ColorPickerColorTypes['hex'] | ColorPickerColorTypes['hsl'] | ColorPickerColorTypes['rgb'];
@@ -49,6 +49,7 @@ import Grid from "./components/grid";
49
49
  import Heading from "./components/heading";
50
50
  import Hint from "./components/hint";
51
51
  import { IColor } from "./components/color_picker/types";
52
+ import { IColorPickerColor } from "./components/color_picker_new/types";
52
53
  import { IControlRadioGroupOption } from "./components/controls/types";
53
54
  import { IDatepickerRange } from "./components/date_picker/types";
54
55
  import { IDropdownContext } from "./components/dropdown/context/types";
@@ -123,4 +124,4 @@ export { Accordion, Button, Tooltip, ButtonsGroup, Dropdown, Select, MultiSelect
123
124
  /**
124
125
  * export types
125
126
  */
126
- export type { IDropdownProps, ISelectOption, IHeadingProps, ICellProps, IIRowProps, ITableProps, IDropdownContext, IControlRadioGroupOption, IColor, IDatepickerRange, TFilePickerFile, TImagePickerFile, TMessageBoxType, ILoaderProps, IWithLoader, TFlashMessage, TFlashMessageExtended, TImageSize };
127
+ export type { IDropdownProps, ISelectOption, IHeadingProps, ICellProps, IIRowProps, ITableProps, IDropdownContext, IControlRadioGroupOption, IColor, IColorPickerColor, IDatepickerRange, TFilePickerFile, TImagePickerFile, TMessageBoxType, ILoaderProps, IWithLoader, TFlashMessage, TFlashMessageExtended, TImageSize };
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-22",
5
+ "version": "2.12.1-23",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",