dawn-ui-react 1.0.0-alpha.24 → 1.0.0-alpha.26

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.
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ColourPickerLightnessSliderProps } from './colour-picker.types';
3
+ export declare const ColourPickerLightnessSlider: ({ className, ref, ...props }: ColourPickerLightnessSliderProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { ColourPickerProps, ColourPickerContextType } from './colour-picker.types';
3
- export declare const ColourPicker: ({ variant, defaultColour, defaultPalette, paletteLimit, className, children, ref, ...props }: ColourPickerProps) => React.JSX.Element;
3
+ export declare const ColourPicker: ({ variant, defaultColour, defaultPalette, paletteLimit, onColourChange, className, children, ref, ...props }: ColourPickerProps) => React.JSX.Element;
4
4
  export declare const useColourPicker: () => ColourPickerContextType;
@@ -15,6 +15,7 @@ export type ColourPickerContextType = {
15
15
  setSaturation: (saturation: number) => void;
16
16
  setValue: (value: number) => void;
17
17
  setAlpha: (alpha: number) => void;
18
+ setLightness: (lightness: number) => void;
18
19
  valueType: ValueType;
19
20
  setValueType: (valueType: ValueType) => void;
20
21
  palette: chroma.Color[];
@@ -45,6 +46,9 @@ export type ColourPickerAction = {
45
46
  } | {
46
47
  type: 'set_alpha';
47
48
  alpha: number;
49
+ } | {
50
+ type: 'set_lightness';
51
+ lightness: number;
48
52
  } | {
49
53
  type: 'set_value_type';
50
54
  valueType: ValueType;
@@ -59,6 +63,7 @@ export type ColourPickerProps = React.ComponentProps<'div'> & VariantProps<typeo
59
63
  defaultColour?: string;
60
64
  defaultPalette?: string[];
61
65
  paletteLimit?: number;
66
+ onColourChange?: (colour: chroma.Color) => void;
62
67
  };
63
68
  export declare const colourPickerVariants: (props?: ({
64
69
  variant?: "ghost" | "outline" | "elevated" | null | undefined;
@@ -76,6 +81,7 @@ export type ValueType = {
76
81
  export type ColourPickerInputProps = React.ComponentProps<typeof InputGroup>;
77
82
  export type ColourPickerAreaProps = React.ComponentProps<'div'>;
78
83
  export type ColourPickerHueSliderProps = Partial<React.ComponentProps<typeof ColourChannelSlider>>;
84
+ export type ColourPickerLightnessSliderProps = Partial<React.ComponentProps<typeof ColourChannelSlider>>;
79
85
  export type ColourPickerTransparencySliderProps = Partial<React.ComponentProps<typeof ColourChannelSlider>>;
80
86
  export type ColourPickerValueTypeProps = React.ComponentProps<typeof SelectTrigger>;
81
87
  export type ColourPickerRowProps = React.ComponentProps<'div'>;
@@ -1,2 +1,13 @@
1
1
  export { ColourPicker } from './colour-picker';
2
- export type { ColourPickerProps } from './colour-picker.types';
2
+ export { ColourPickerArea } from './colour-picker-area';
3
+ export { ColourPickerGroup } from './colour-picker-group';
4
+ export { ColourPickerHueSlider } from './colour-picker-hue-slider';
5
+ export { ColourPickerInput } from './colour-picker-input';
6
+ export { ColourPickerLabel } from './colour-picker-label';
7
+ export { ColourPickerPaletteLimit } from './colour-picker-palette-limit';
8
+ export { ColourPickerPaletteList } from './colour-picker-palette-list';
9
+ export { ColourPickerPaletteSwatch } from './colour-picker-palette-swatch';
10
+ export { ColourPickerRow } from './colour-picker-row';
11
+ export { ColourPickerTransparencySlider } from './colour-picker-transparency-slider';
12
+ export { ColourPickerValueType } from './colour-picker-value-type';
13
+ export type { ColourPickerProps, ColourPickerPaletteAddProps, ColourPickerState, ColourPickerAction, ColourPickerAreaProps, ColourPickerContextType, ColourPickerGroupProps, ColourPickerHueSliderProps, ColourPickerInputProps, ColourPickerLabelProps, ColourPickerPaletteLimitProps, ColourPickerPaletteListProps, ColourPickerPaletteSwatchProps, ColourPickerRowProps, ColourPickerTransparencySliderProps, ColourPickerValueTypeProps, } from './colour-picker.types';