@pathscale/ui 0.0.109 → 0.0.111

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,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface AlphaSliderProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const AlphaSlider: (props: AlphaSliderProps) => JSX.Element;
7
+ export default AlphaSlider;
@@ -0,0 +1,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface ColorInputProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const ColorInput: (props: ColorInputProps) => JSX.Element;
7
+ export default ColorInput;
@@ -0,0 +1,18 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { ColorFormat } from "./ColorUtils";
3
+ import { IComponentBaseProps } from "../types";
4
+ export type { ColorFormat } from "./ColorUtils";
5
+ export type ColorPickerMode = "picker" | "wheel" | "flower";
6
+ export interface ColorPickerProps extends IComponentBaseProps {
7
+ value?: string;
8
+ onChange?: (color: string) => void;
9
+ format?: ColorFormat;
10
+ disabled?: boolean;
11
+ swatches?: string[];
12
+ showAlpha?: boolean;
13
+ placement?: "top" | "bottom" | "left" | "right";
14
+ initialMode?: ColorPickerMode;
15
+ "aria-label"?: string;
16
+ }
17
+ declare const ColorPicker: (props: ColorPickerProps) => JSX.Element;
18
+ export default ColorPicker;
@@ -0,0 +1,3 @@
1
+ import type { JSX } from "solid-js";
2
+ declare const ColorPickerFlowerSelector: () => JSX.Element;
3
+ export default ColorPickerFlowerSelector;
@@ -0,0 +1,3 @@
1
+ import type { JSX } from "solid-js";
2
+ declare const ColorPickerGradientSelector: () => JSX.Element;
3
+ export default ColorPickerGradientSelector;
@@ -0,0 +1,3 @@
1
+ import type { JSX } from "solid-js";
2
+ declare const ColorPickerWheelSelector: () => JSX.Element;
3
+ export default ColorPickerWheelSelector;
@@ -0,0 +1,11 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { ColorValue } from "./ColorUtils";
3
+ export interface ColorPreviewProps {
4
+ color: ColorValue;
5
+ disabled?: boolean;
6
+ onClick?: () => void;
7
+ class?: string;
8
+ className?: string;
9
+ }
10
+ declare const ColorPreview: (props: ColorPreviewProps) => JSX.Element;
11
+ export default ColorPreview;
@@ -0,0 +1,8 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface ColorSwatchesProps {
3
+ swatches: string[];
4
+ class?: string;
5
+ className?: string;
6
+ }
7
+ declare const ColorSwatches: (props: ColorSwatchesProps) => JSX.Element;
8
+ export default ColorSwatches;
@@ -0,0 +1,58 @@
1
+ export type ColorFormat = "hex" | "rgb" | "rgba" | "hsl" | "hsla";
2
+ export interface RGB {
3
+ r: number;
4
+ g: number;
5
+ b: number;
6
+ }
7
+ export interface RGBA extends RGB {
8
+ a: number;
9
+ }
10
+ export interface HSL {
11
+ h: number;
12
+ s: number;
13
+ l: number;
14
+ }
15
+ export interface HSLA extends HSL {
16
+ a: number;
17
+ }
18
+ export interface ColorValue {
19
+ rgb: RGBA;
20
+ hsl: HSLA;
21
+ hex: string;
22
+ }
23
+ /**
24
+ * Convert hex color to RGB
25
+ */
26
+ export declare function hexToRgb(hex: string): RGB | null;
27
+ /**
28
+ * Convert RGB to hex
29
+ */
30
+ export declare function rgbToHex(r: number, g: number, b: number): string;
31
+ /**
32
+ * Convert RGB to HSL
33
+ */
34
+ export declare function rgbToHsl(r: number, g: number, b: number): HSL;
35
+ /**
36
+ * Convert HSL to RGB
37
+ */
38
+ export declare function hslToRgb(h: number, s: number, l: number): RGB;
39
+ /**
40
+ * Parse color string to ColorValue
41
+ */
42
+ export declare function parseColor(color: string): ColorValue | null;
43
+ /**
44
+ * Format ColorValue to specified format string
45
+ */
46
+ export declare function formatColor(color: ColorValue, format: ColorFormat): string;
47
+ /**
48
+ * Set alpha channel of a ColorValue
49
+ */
50
+ export declare function setAlpha(color: ColorValue, alpha: number): ColorValue;
51
+ /**
52
+ * Create ColorValue from HSL values
53
+ */
54
+ export declare function createColorFromHsl(h: number, s: number, l: number, a?: number): ColorValue;
55
+ /**
56
+ * Get default color value (white)
57
+ */
58
+ export declare function getDefaultColor(): ColorValue;
@@ -0,0 +1,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface ColorWheelProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const ColorWheel: (props: ColorWheelProps) => JSX.Element;
7
+ export default ColorWheel;
@@ -0,0 +1,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface ColorWheelFlowerProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const ColorWheelFlower: (props: ColorWheelFlowerProps) => JSX.Element;
7
+ export default ColorWheelFlower;
@@ -0,0 +1,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface HueSliderProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const HueSlider: (props: HueSliderProps) => JSX.Element;
7
+ export default HueSlider;
@@ -0,0 +1,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface LightnessSliderProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const LightnessSlider: (props: LightnessSliderProps) => JSX.Element;
7
+ export default LightnessSlider;
@@ -0,0 +1,7 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface SaturationBrightnessProps {
3
+ class?: string;
4
+ className?: string;
5
+ }
6
+ declare const SaturationBrightness: (props: SaturationBrightnessProps) => JSX.Element;
7
+ export default SaturationBrightness;
@@ -0,0 +1,11 @@
1
+ import { type Accessor } from "solid-js";
2
+ import type { ColorValue, ColorFormat } from "./ColorUtils";
3
+ export interface ColorPickerContextType {
4
+ color: Accessor<ColorValue>;
5
+ format: Accessor<ColorFormat>;
6
+ disabled: Accessor<boolean>;
7
+ onChange: (color: ColorValue) => void;
8
+ onFormatChange: (format: ColorFormat) => void;
9
+ }
10
+ export declare const ColorPickerContext: import("solid-js").Context<ColorPickerContextType | undefined>;
11
+ export declare function useColorPickerContext(): ColorPickerContextType;
@@ -0,0 +1,26 @@
1
+ export { default as ColorPicker, default } from "./ColorPicker";
2
+ export type { ColorPickerProps, ColorFormat, ColorPickerMode } from "./ColorPicker";
3
+ export { default as ColorPickerGradientSelector } from "./ColorPickerGradientSelector";
4
+ export { default as ColorPickerWheelSelector } from "./ColorPickerWheelSelector";
5
+ export { default as ColorPickerFlowerSelector } from "./ColorPickerFlowerSelector";
6
+ export { default as SaturationBrightness } from "./SaturationBrightness";
7
+ export { default as HueSlider } from "./HueSlider";
8
+ export { default as LightnessSlider } from "./LightnessSlider";
9
+ export { default as AlphaSlider } from "./AlphaSlider";
10
+ export { default as ColorWheel } from "./ColorWheel";
11
+ export { default as ColorWheelFlower } from "./ColorWheelFlower";
12
+ export { default as ColorSwatches } from "./ColorSwatches";
13
+ export { default as ColorInput } from "./ColorInput";
14
+ export { default as ColorPreview } from "./ColorPreview";
15
+ export { ColorPickerContext, useColorPickerContext } from "./colorpickerContext";
16
+ export type { ColorPickerContextType } from "./colorpickerContext";
17
+ export type { SaturationBrightnessProps } from "./SaturationBrightness";
18
+ export type { HueSliderProps } from "./HueSlider";
19
+ export type { LightnessSliderProps } from "./LightnessSlider";
20
+ export type { AlphaSliderProps } from "./AlphaSlider";
21
+ export type { ColorWheelProps } from "./ColorWheel";
22
+ export type { ColorWheelFlowerProps } from "./ColorWheelFlower";
23
+ export type { ColorSwatchesProps } from "./ColorSwatches";
24
+ export type { ColorInputProps } from "./ColorInput";
25
+ export type { ColorPreviewProps } from "./ColorPreview";
26
+ export type { ColorValue, RGB, RGBA, HSL, HSLA } from "./ColorUtils";
package/dist/index.d.ts CHANGED
@@ -15,6 +15,9 @@ export { default as Carousel } from "./components/carousel";
15
15
  export type { CarouselItemProps, CarouselProps } from "./components/carousel";
16
16
  export { default as ChatBubble } from "./components/chatbubble";
17
17
  export { default as Checkbox } from "./components/checkbox";
18
+ export { default as ColorPicker } from "./components/colorpicker";
19
+ export { AlphaSlider, ColorInput, ColorPickerContext, ColorPickerFlowerSelector, ColorPickerGradientSelector, ColorPickerWheelSelector, ColorPreview, ColorSwatches, ColorWheel, ColorWheelFlower, HueSlider, LightnessSlider, SaturationBrightness, useColorPickerContext, } from "./components/colorpicker";
20
+ export type { AlphaSliderProps, ColorFormat, ColorInputProps, ColorPickerContextType, ColorPickerMode, ColorPickerProps, ColorPreviewProps, ColorSwatchesProps, ColorValue, ColorWheelFlowerProps, ColorWheelProps, HueSliderProps, LightnessSliderProps, SaturationBrightnessProps, } from "./components/colorpicker";
18
21
  export { CodeMockup, CodeMockupLine } from "./components/codemockup";
19
22
  export { Collapse, CollapseContent, CollapseDetails, CollapseTitle, Summary, } from "./components/collapse";
20
23
  export { default as ConnectionStatus } from "./components/connectionstatus";