@urcolor/vue 0.0.1 → 0.0.2

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.
Files changed (52) hide show
  1. package/dist/components/ColorArea/ColorArea.stories.d.ts +57 -0
  2. package/dist/components/ColorArea/ColorAreaRoot.vue.d.ts +1 -1
  3. package/dist/components/ColorField/ColorField.stories.d.ts +50 -0
  4. package/dist/components/ColorField/ColorFieldRoot.vue.d.ts +0 -1
  5. package/dist/components/ColorRing/ColorRing.stories.d.ts +14 -0
  6. package/dist/components/ColorRing/ColorRingCheckerboard.vue.d.ts +10 -0
  7. package/dist/components/ColorRing/ColorRingGradient.vue.d.ts +21 -0
  8. package/dist/components/ColorRing/ColorRingRoot.vue.d.ts +64 -0
  9. package/dist/components/ColorRing/ColorRingThumb.vue.d.ts +17 -0
  10. package/dist/components/ColorRing/ColorRingTrack.vue.d.ts +17 -0
  11. package/dist/components/ColorRing/index.d.ts +5 -0
  12. package/dist/components/ColorSlider/ColorSlider.stories.d.ts +56 -0
  13. package/dist/components/ColorSlider/ColorSliderGradient.vue.d.ts +2 -3
  14. package/dist/components/ColorSlider/ColorSliderRoot.vue.d.ts +2 -1
  15. package/dist/components/ColorSwatch/ColorSwatch.stories.d.ts +18 -0
  16. package/dist/components/ColorSwatch/ColorSwatchRoot.vue.d.ts +0 -1
  17. package/dist/components/ColorSwatchGroup/ColorSwatchGroup.stories.d.ts +15 -0
  18. package/dist/components/ColorTriangle/ColorTriangle.stories.d.ts +21 -0
  19. package/dist/components/ColorTriangle/ColorTriangleCheckerboard.vue.d.ts +10 -0
  20. package/dist/components/ColorTriangle/ColorTriangleGradient.vue.d.ts +19 -0
  21. package/dist/components/ColorTriangle/ColorTriangleRoot.vue.d.ts +86 -0
  22. package/dist/components/ColorTriangle/ColorTriangleThumb.vue.d.ts +17 -0
  23. package/dist/components/ColorTriangle/ColorTriangleThumbX.vue.d.ts +17 -0
  24. package/dist/components/ColorTriangle/ColorTriangleThumbY.vue.d.ts +17 -0
  25. package/dist/components/ColorTriangle/ColorTriangleThumbZ.vue.d.ts +17 -0
  26. package/dist/components/ColorTriangle/index.d.ts +7 -0
  27. package/dist/components/ColorWheel/ColorWheel.stories.d.ts +17 -0
  28. package/dist/components/ColorWheel/ColorWheelCheckerboard.vue.d.ts +10 -0
  29. package/dist/components/ColorWheel/ColorWheelGradient.vue.d.ts +19 -0
  30. package/dist/components/ColorWheel/ColorWheelRoot.vue.d.ts +67 -0
  31. package/dist/components/ColorWheel/ColorWheelThumb.vue.d.ts +17 -0
  32. package/dist/components/ColorWheel/ColorWheelThumbX.vue.d.ts +17 -0
  33. package/dist/components/ColorWheel/ColorWheelThumbY.vue.d.ts +17 -0
  34. package/dist/components/ColorWheel/index.d.ts +6 -0
  35. package/dist/composables/index.d.ts +14 -0
  36. package/dist/composables/useA98.d.ts +4 -0
  37. package/dist/composables/useColor.d.ts +10 -3
  38. package/dist/composables/useColorSpace.d.ts +10 -0
  39. package/dist/composables/useHSL.d.ts +4 -0
  40. package/dist/composables/useHSV.d.ts +4 -0
  41. package/dist/composables/useHWB.d.ts +4 -0
  42. package/dist/composables/useLCh.d.ts +4 -0
  43. package/dist/composables/useLab.d.ts +4 -0
  44. package/dist/composables/useOKLCh.d.ts +4 -0
  45. package/dist/composables/useOKLab.d.ts +4 -0
  46. package/dist/composables/useP3.d.ts +4 -0
  47. package/dist/composables/useProPhoto.d.ts +4 -0
  48. package/dist/composables/useRGB.d.ts +4 -0
  49. package/dist/composables/useRec2020.d.ts +4 -0
  50. package/dist/index.d.ts +5 -0
  51. package/dist/index.js +3169 -1718
  52. package/package.json +19 -5
@@ -0,0 +1,57 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import "internationalized-color/css";
3
+ import { ColorAreaRoot } from "./index";
4
+ type Story = StoryObj<typeof ColorAreaRoot>;
5
+ declare const meta: Meta<typeof ColorAreaRoot>;
6
+ export default meta;
7
+ export declare const HSL_Hue_Saturation: Story;
8
+ export declare const HSL_Hue_Lightness: Story;
9
+ export declare const HSL_Saturation_Lightness: Story;
10
+ export declare const HSV_Hue_Saturation: Story;
11
+ export declare const HSV_Hue_Value: Story;
12
+ export declare const HSV_Saturation_Value: Story;
13
+ export declare const HWB_Hue_Whiteness: Story;
14
+ export declare const HWB_Hue_Blackness: Story;
15
+ export declare const HWB_Whiteness_Blackness: Story;
16
+ export declare const OKLCh_Lightness_Chroma: Story;
17
+ export declare const OKLCh_Lightness_Hue: Story;
18
+ export declare const OKLCh_Chroma_Hue: Story;
19
+ export declare const OKLab_Lightness_a: Story;
20
+ export declare const OKLab_Lightness_b: Story;
21
+ export declare const OKLab_a_b: Story;
22
+ export declare const LCh_Lightness_Chroma: Story;
23
+ export declare const LCh_Lightness_Hue: Story;
24
+ export declare const LCh_Chroma_Hue: Story;
25
+ export declare const Lab_Lightness_a: Story;
26
+ export declare const Lab_Lightness_b: Story;
27
+ export declare const Lab_a_b: Story;
28
+ export declare const RGB_Red_Green: Story;
29
+ export declare const RGB_Red_Blue: Story;
30
+ export declare const RGB_Green_Blue: Story;
31
+ export declare const DisplayP3_Red_Green: Story;
32
+ export declare const DisplayP3_Red_Blue: Story;
33
+ export declare const DisplayP3_Green_Blue: Story;
34
+ export declare const A98RGB_Red_Green: Story;
35
+ export declare const A98RGB_Red_Blue: Story;
36
+ export declare const A98RGB_Green_Blue: Story;
37
+ export declare const ProPhotoRGB_Red_Green: Story;
38
+ export declare const ProPhotoRGB_Red_Blue: Story;
39
+ export declare const ProPhotoRGB_Green_Blue: Story;
40
+ export declare const Rec2020_Red_Green: Story;
41
+ export declare const Rec2020_Red_Blue: Story;
42
+ export declare const Rec2020_Green_Blue: Story;
43
+ export declare const HSL_Hue_Alpha: Story;
44
+ export declare const HSL_Saturation_Alpha: Story;
45
+ export declare const HSL_Lightness_Alpha: Story;
46
+ export declare const HSV_Hue_Alpha: Story;
47
+ export declare const HSV_Saturation_Alpha: Story;
48
+ export declare const HSV_Value_Alpha: Story;
49
+ export declare const RGB_Red_Alpha: Story;
50
+ export declare const RGB_Green_Alpha: Story;
51
+ export declare const RGB_Blue_Alpha: Story;
52
+ export declare const OKLCh_Lightness_Alpha: Story;
53
+ export declare const OKLCh_Chroma_Alpha: Story;
54
+ export declare const OKLCh_Hue_Alpha: Story;
55
+ export declare const Disabled: Story;
56
+ export declare const ThumbContain: Story;
57
+ export declare const RTL: Story;
@@ -1,6 +1,5 @@
1
1
  import type { Ref } from "vue";
2
2
  import type { PrimitiveProps } from "reka-ui";
3
- import "internationalized-color/css";
4
3
  import { Color } from "internationalized-color";
5
4
  import type { ActiveDirection } from "./utils";
6
5
  type Direction = "ltr" | "rtl";
@@ -68,6 +67,7 @@ export interface ColorAreaRootContext {
68
67
  yChannelKey: Ref<string>;
69
68
  colorRef: Readonly<Ref<Color | undefined>>;
70
69
  dir: Ref<Direction>;
70
+ isDragging: Ref<boolean>;
71
71
  }
72
72
  export declare const injectColorAreaRootContext: <T extends ColorAreaRootContext | null | undefined = ColorAreaRootContext>(fallback?: T | undefined) => T extends null ? ColorAreaRootContext | null : ColorAreaRootContext, provideColorAreaRootContext: (contextValue: ColorAreaRootContext) => ColorAreaRootContext;
73
73
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,50 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import "internationalized-color/css";
3
+ import { ColorFieldRoot } from "./index";
4
+ type Story = StoryObj<typeof ColorFieldRoot>;
5
+ declare const meta: Meta<typeof ColorFieldRoot>;
6
+ export default meta;
7
+ export declare const HSL_Hue: Story;
8
+ export declare const HSL_Saturation: Story;
9
+ export declare const HSL_Lightness: Story;
10
+ export declare const HSL_Alpha: Story;
11
+ export declare const HSV_Hue: Story;
12
+ export declare const HSV_Saturation: Story;
13
+ export declare const HSV_Value: Story;
14
+ export declare const HWB_Hue: Story;
15
+ export declare const HWB_Whiteness: Story;
16
+ export declare const HWB_Blackness: Story;
17
+ export declare const OKLCh_Lightness: Story;
18
+ export declare const OKLCh_Chroma: Story;
19
+ export declare const OKLCh_Hue: Story;
20
+ export declare const OKLCh_Alpha: Story;
21
+ export declare const OKLab_Lightness: Story;
22
+ export declare const OKLab_a: Story;
23
+ export declare const OKLab_b: Story;
24
+ export declare const LCh_Lightness: Story;
25
+ export declare const LCh_Chroma: Story;
26
+ export declare const LCh_Hue: Story;
27
+ export declare const Lab_Lightness: Story;
28
+ export declare const Lab_a: Story;
29
+ export declare const Lab_b: Story;
30
+ export declare const RGB_Red: Story;
31
+ export declare const RGB_Green: Story;
32
+ export declare const RGB_Blue: Story;
33
+ export declare const RGB_Alpha: Story;
34
+ export declare const DisplayP3_Red: Story;
35
+ export declare const DisplayP3_Green: Story;
36
+ export declare const DisplayP3_Blue: Story;
37
+ export declare const A98RGB_Red: Story;
38
+ export declare const A98RGB_Green: Story;
39
+ export declare const A98RGB_Blue: Story;
40
+ export declare const ProPhotoRGB_Red: Story;
41
+ export declare const ProPhotoRGB_Green: Story;
42
+ export declare const ProPhotoRGB_Blue: Story;
43
+ export declare const Rec2020_Red: Story;
44
+ export declare const Rec2020_Green: Story;
45
+ export declare const Rec2020_Blue: Story;
46
+ export declare const WithButtons: Story;
47
+ export declare const WithSwatch: Story;
48
+ export declare const WithSwatchAndButtons: Story;
49
+ export declare const Disabled: Story;
50
+ export declare const ReadOnly: Story;
@@ -1,6 +1,5 @@
1
1
  import type { Ref } from "vue";
2
2
  import type { PrimitiveProps } from "reka-ui";
3
- import "internationalized-color/css";
4
3
  import { Color } from "internationalized-color";
5
4
  export interface ColorFieldRootProps extends /* @vue-ignore */ PrimitiveProps {
6
5
  as?: string;
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import { ColorRingRoot } from "./index";
3
+ type Story = StoryObj<typeof ColorRingRoot>;
4
+ declare const meta: Meta<typeof ColorRingRoot>;
5
+ export default meta;
6
+ export declare const HSL_Hue: Story;
7
+ export declare const HSL_Saturation: Story;
8
+ export declare const HSL_Lightness: Story;
9
+ export declare const HSV_Hue: Story;
10
+ export declare const OKLCh_Hue: Story;
11
+ export declare const OKLCh_Chroma: Story;
12
+ export declare const OKLCh_Lightness: Story;
13
+ export declare const LCh_Hue: Story;
14
+ export declare const Disabled: Story;
@@ -0,0 +1,10 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorRingCheckerboardProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: import("vue").DefineComponent<ColorRingCheckerboardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorRingCheckerboardProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,21 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorRingGradientProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ channelOverrides?: Record<string, number> | false;
6
+ /** @deprecated Use innerRadius on ColorRingRoot instead */
7
+ innerRadius?: number;
8
+ }
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorRingGradientProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorRingGradientProps> & Readonly<{}>, {
12
+ as: string;
13
+ channelOverrides: Record<string, number> | false;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
15
+ default?: (props: {}) => any;
16
+ }>;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,64 @@
1
+ import type { Ref } from "vue";
2
+ import type { PrimitiveProps } from "reka-ui";
3
+ import { Color } from "internationalized-color";
4
+ type Direction = "ltr" | "rtl";
5
+ export interface ColorRingRootProps extends /* @vue-ignore */ PrimitiveProps {
6
+ as?: string;
7
+ asChild?: boolean;
8
+ name?: string | undefined;
9
+ required?: boolean;
10
+ modelValue?: Color | string | null;
11
+ defaultValue?: Color | string;
12
+ disabled?: boolean;
13
+ dir?: Direction;
14
+ colorSpace?: string;
15
+ channel?: string;
16
+ startAngle?: number;
17
+ /** Inner radius as a ratio of the outer radius (0–1). Used for hit testing. Default 0.7 */
18
+ innerRadius?: number;
19
+ }
20
+ export type ColorRingRootEmits = {
21
+ "update:modelValue": [payload: Color | undefined];
22
+ "valueCommit": [payload: Color];
23
+ };
24
+ export interface ColorRingRootContext {
25
+ disabled: Ref<boolean>;
26
+ min: Ref<number>;
27
+ max: Ref<number>;
28
+ step: Ref<number>;
29
+ colorSpace: Ref<string>;
30
+ channelKey: Ref<string>;
31
+ colorRef: Readonly<Ref<Color | undefined>>;
32
+ currentValue: Ref<number>;
33
+ startAngle: Ref<number>;
34
+ dir: Ref<Direction>;
35
+ thumbElement: Ref<HTMLElement | undefined>;
36
+ innerRadius: Ref<number>;
37
+ isDragging: Ref<boolean>;
38
+ }
39
+ export declare const injectColorRingRootContext: <T extends ColorRingRootContext | null | undefined = ColorRingRootContext>(fallback?: T | undefined) => T extends null ? ColorRingRootContext | null : ColorRingRootContext, provideColorRingRootContext: (contextValue: ColorRingRootContext) => ColorRingRootContext;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorRingRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ "update:modelValue": (payload: Color | undefined) => any;
44
+ valueCommit: (payload: Color) => any;
45
+ }, string, import("vue").PublicProps, Readonly<ColorRingRootProps> & Readonly<{
46
+ "onUpdate:modelValue"?: ((payload: Color | undefined) => any) | undefined;
47
+ onValueCommit?: ((payload: Color) => any) | undefined;
48
+ }>, {
49
+ disabled: boolean;
50
+ as: string;
51
+ defaultValue: Color | string;
52
+ colorSpace: string;
53
+ startAngle: number;
54
+ innerRadius: number;
55
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
56
+ default?: (props: {
57
+ modelValue: Color | undefined;
58
+ }) => any;
59
+ }>;
60
+ type __VLS_WithSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,17 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorRingThumbProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorRingThumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorRingThumbProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: {}) => any;
12
+ }>;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorRingTrackProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorRingTrackProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorRingTrackProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: {}) => any;
12
+ }>;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,5 @@
1
+ export { injectColorRingRootContext, default as ColorRingRoot, type ColorRingRootEmits, type ColorRingRootProps, } from "./ColorRingRoot.vue";
2
+ export { default as ColorRingTrack, type ColorRingTrackProps, } from "./ColorRingTrack.vue";
3
+ export { default as ColorRingGradient, type ColorRingGradientProps, } from "./ColorRingGradient.vue";
4
+ export { default as ColorRingCheckerboard, type ColorRingCheckerboardProps, } from "./ColorRingCheckerboard.vue";
5
+ export { default as ColorRingThumb, type ColorRingThumbProps, } from "./ColorRingThumb.vue";
@@ -0,0 +1,56 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import "internationalized-color/css";
3
+ import { ColorSliderRoot } from "./index";
4
+ type Story = StoryObj<typeof ColorSliderRoot>;
5
+ declare const meta: Meta<typeof ColorSliderRoot>;
6
+ export default meta;
7
+ export declare const HSL_Hue: Story;
8
+ export declare const HSL_Saturation: Story;
9
+ export declare const HSL_Lightness: Story;
10
+ export declare const HSL_Alpha: Story;
11
+ export declare const HSV_Hue: Story;
12
+ export declare const HSV_Saturation: Story;
13
+ export declare const HSV_Value: Story;
14
+ export declare const HSV_Alpha: Story;
15
+ export declare const HWB_Hue: Story;
16
+ export declare const HWB_Whiteness: Story;
17
+ export declare const HWB_Blackness: Story;
18
+ export declare const HWB_Alpha: Story;
19
+ export declare const OKLCh_Lightness: Story;
20
+ export declare const OKLCh_Chroma: Story;
21
+ export declare const OKLCh_Hue: Story;
22
+ export declare const OKLCh_Alpha: Story;
23
+ export declare const OKLab_Lightness: Story;
24
+ export declare const OKLab_a: Story;
25
+ export declare const OKLab_b: Story;
26
+ export declare const OKLab_Alpha: Story;
27
+ export declare const LCh_Lightness: Story;
28
+ export declare const LCh_Chroma: Story;
29
+ export declare const LCh_Hue: Story;
30
+ export declare const LCh_Alpha: Story;
31
+ export declare const Lab_Lightness: Story;
32
+ export declare const Lab_a: Story;
33
+ export declare const Lab_b: Story;
34
+ export declare const Lab_Alpha: Story;
35
+ export declare const RGB_Red: Story;
36
+ export declare const RGB_Green: Story;
37
+ export declare const RGB_Blue: Story;
38
+ export declare const RGB_Alpha: Story;
39
+ export declare const DisplayP3_Red: Story;
40
+ export declare const DisplayP3_Green: Story;
41
+ export declare const DisplayP3_Blue: Story;
42
+ export declare const DisplayP3_Alpha: Story;
43
+ export declare const A98RGB_Red: Story;
44
+ export declare const A98RGB_Green: Story;
45
+ export declare const A98RGB_Blue: Story;
46
+ export declare const A98RGB_Alpha: Story;
47
+ export declare const ProPhotoRGB_Red: Story;
48
+ export declare const ProPhotoRGB_Green: Story;
49
+ export declare const ProPhotoRGB_Blue: Story;
50
+ export declare const ProPhotoRGB_Alpha: Story;
51
+ export declare const Rec2020_Red: Story;
52
+ export declare const Rec2020_Green: Story;
53
+ export declare const Rec2020_Blue: Story;
54
+ export declare const Rec2020_Alpha: Story;
55
+ export declare const Disabled: Story;
56
+ export declare const RTL: Story;
@@ -5,8 +5,8 @@ export interface ColorSliderGradientProps extends /* @vue-ignore */ PrimitivePro
5
5
  asChild?: boolean;
6
6
  /** Array of color stops. When omitted, auto-computes from the slider's channel and current color. */
7
7
  colors?: string[];
8
- /** If true, gradient runs top-to-bottom instead of left-to-right. */
9
- vertical?: boolean;
8
+ /** Rotation angle in degrees (0 = left-to-right, 90 = top-to-bottom). Values are normalized to 0–360. When using vertical orientation, defaults to 90. */
9
+ angle?: number;
10
10
  /** When set to a non-RGB color space, interpolates stops in that space for perceptual accuracy. */
11
11
  interpolationSpace?: string;
12
12
  /**
@@ -21,7 +21,6 @@ declare const _default: typeof __VLS_export;
21
21
  export default _default;
22
22
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorSliderGradientProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorSliderGradientProps> & Readonly<{}>, {
23
23
  as: string;
24
- vertical: boolean;
25
24
  channelOverrides: Record<string, number> | false;
26
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
27
26
  default?: (props: {}) => any;
@@ -1,5 +1,4 @@
1
1
  import type { Ref } from "vue";
2
- import "internationalized-color/css";
3
2
  import { Color } from "internationalized-color";
4
3
  export interface ColorSliderRootProps {
5
4
  /** The controlled color value. Can be bind as `v-model`. */
@@ -25,6 +24,8 @@ export interface ColorSliderRootContext {
25
24
  colorRef: Ref<Color | undefined>;
26
25
  channel: Ref<string>;
27
26
  colorSpace: Ref<string>;
27
+ orientation: Ref<"horizontal" | "vertical">;
28
+ inverted: Ref<boolean>;
28
29
  }
29
30
  export declare const injectColorSliderRootContext: <T extends ColorSliderRootContext | null | undefined = ColorSliderRootContext>(fallback?: T | undefined) => T extends null ? ColorSliderRootContext | null : ColorSliderRootContext, provideColorSliderRootContext: (contextValue: ColorSliderRootContext) => ColorSliderRootContext;
30
31
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,18 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import "internationalized-color/css";
3
+ import { ColorSwatchRoot } from "./index";
4
+ type Story = StoryObj<typeof ColorSwatchRoot>;
5
+ declare const meta: Meta<typeof ColorSwatchRoot>;
6
+ export default meta;
7
+ export declare const Red: Story;
8
+ export declare const Blue: Story;
9
+ export declare const Green: Story;
10
+ export declare const SemiTransparent: Story;
11
+ export declare const AlphaEnabled: Story;
12
+ export declare const AlphaDisabled: Story;
13
+ export declare const SmallChecker: Story;
14
+ export declare const LargeChecker: Story;
15
+ export declare const HexFormat: Story;
16
+ export declare const RGBFormat: Story;
17
+ export declare const HSLFormat: Story;
18
+ export declare const OKLChFormat: Story;
@@ -1,5 +1,4 @@
1
1
  import type { PrimitiveProps } from "reka-ui";
2
- import "internationalized-color/css";
3
2
  import { Color } from "internationalized-color";
4
3
  export interface ColorSwatchRootProps extends /* @vue-ignore */ PrimitiveProps {
5
4
  as?: string;
@@ -0,0 +1,15 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import "internationalized-color/css";
3
+ import { ColorSwatchGroupRoot } from "./index";
4
+ type Story = StoryObj<typeof ColorSwatchGroupRoot>;
5
+ declare const meta: Meta<typeof ColorSwatchGroupRoot>;
6
+ export default meta;
7
+ export declare const SingleSelection: Story;
8
+ export declare const MultipleSelection: Story;
9
+ export declare const Vertical: Story;
10
+ export declare const Disabled: Story;
11
+ export declare const NoLoop: Story;
12
+ export declare const NoRovingFocus: Story;
13
+ export declare const MaterialPalette: Story;
14
+ export declare const TailwindGrays: Story;
15
+ export declare const RTL: Story;
@@ -0,0 +1,21 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import "internationalized-color/css";
3
+ import { ColorTriangleRoot } from "./index";
4
+ type Story = StoryObj<typeof ColorTriangleRoot>;
5
+ declare const meta: Meta<typeof ColorTriangleRoot>;
6
+ export default meta;
7
+ export declare const HSV_Saturation_Value: Story;
8
+ export declare const HSL_Saturation_Lightness: Story;
9
+ export declare const OKLCh_Chroma_Lightness: Story;
10
+ export declare const HWB_Whiteness_Blackness: Story;
11
+ export declare const Rotated: Story;
12
+ export declare const Disabled: Story;
13
+ export declare const Maxwell_RGB: Story;
14
+ export declare const OKLab_abL: Story;
15
+ export declare const P3_RGB: Story;
16
+ export declare const HSL_HSL: Story;
17
+ export declare const OKLab_ab: Story;
18
+ export declare const Lab_ab: Story;
19
+ export declare const RGB_RG: Story;
20
+ export declare const ThumbContain: Story;
21
+ export declare const ThumbContain3Channel: Story;
@@ -0,0 +1,10 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorTriangleCheckerboardProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: import("vue").DefineComponent<ColorTriangleCheckerboardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorTriangleCheckerboardProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,19 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorTriangleGradientProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ channelOverrides?: Record<string, number> | false;
6
+ }
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorTriangleGradientProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorTriangleGradientProps> & Readonly<{}>, {
10
+ as: string;
11
+ channelOverrides: Record<string, number> | false;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
13
+ default?: (props: {}) => any;
14
+ }>;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,86 @@
1
+ import type { Ref } from "vue";
2
+ import type { PrimitiveProps } from "reka-ui";
3
+ import { Color } from "internationalized-color";
4
+ import { type Point } from "@urcolor/core";
5
+ type Direction = "ltr" | "rtl";
6
+ export interface ColorTriangleRootProps extends /* @vue-ignore */ PrimitiveProps {
7
+ as?: string;
8
+ asChild?: boolean;
9
+ name?: string | undefined;
10
+ required?: boolean;
11
+ modelValue?: Color | string | null;
12
+ defaultValue?: Color | string;
13
+ disabled?: boolean;
14
+ dir?: Direction;
15
+ colorSpace?: string;
16
+ channelX?: string;
17
+ channelY?: string;
18
+ channelZ?: string;
19
+ rotation?: number;
20
+ orientation?: "vertical" | "horizontal";
21
+ inverted?: boolean;
22
+ thumbAlignment?: "contain" | "overflow";
23
+ }
24
+ export type ColorTriangleRootEmits = {
25
+ "update:modelValue": [payload: Color | undefined];
26
+ "valueCommit": [payload: Color];
27
+ };
28
+ export type ActiveDirection = "x" | "y" | "z";
29
+ export interface ColorTriangleRootContext {
30
+ disabled: Ref<boolean>;
31
+ colorSpace: Ref<string>;
32
+ xChannelKey: Ref<string>;
33
+ yChannelKey: Ref<string>;
34
+ zChannelKey: Ref<string | undefined>;
35
+ colorRef: Readonly<Ref<Color | undefined>>;
36
+ currentXValue: Ref<number>;
37
+ currentYValue: Ref<number>;
38
+ currentZValue: Ref<number>;
39
+ xMin: Ref<number>;
40
+ xMax: Ref<number>;
41
+ yMin: Ref<number>;
42
+ yMax: Ref<number>;
43
+ zMin: Ref<number>;
44
+ zMax: Ref<number>;
45
+ isThreeChannel: Ref<boolean>;
46
+ rotation: Ref<number>;
47
+ vertices: Ref<[Point, Point, Point]>;
48
+ orientation: Ref<"vertical" | "horizontal">;
49
+ dir: Ref<Direction>;
50
+ activeDirection: Ref<ActiveDirection>;
51
+ thumbXElement: Ref<HTMLElement | undefined>;
52
+ thumbYElement: Ref<HTMLElement | undefined>;
53
+ thumbZElement: Ref<HTMLElement | undefined>;
54
+ inverted: Ref<boolean>;
55
+ isDragging: Ref<boolean>;
56
+ thumbAlignment: Ref<"contain" | "overflow">;
57
+ thumbElement: Ref<HTMLElement | undefined>;
58
+ }
59
+ export declare const injectColorTriangleRootContext: <T extends ColorTriangleRootContext | null | undefined = ColorTriangleRootContext>(fallback?: T | undefined) => T extends null ? ColorTriangleRootContext | null : ColorTriangleRootContext, provideColorTriangleRootContext: (contextValue: ColorTriangleRootContext) => ColorTriangleRootContext;
60
+ declare const _default: typeof __VLS_export;
61
+ export default _default;
62
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorTriangleRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
63
+ "update:modelValue": (payload: Color | undefined) => any;
64
+ valueCommit: (payload: Color) => any;
65
+ }, string, import("vue").PublicProps, Readonly<ColorTriangleRootProps> & Readonly<{
66
+ "onUpdate:modelValue"?: ((payload: Color | undefined) => any) | undefined;
67
+ onValueCommit?: ((payload: Color) => any) | undefined;
68
+ }>, {
69
+ disabled: boolean;
70
+ as: string;
71
+ defaultValue: Color | string;
72
+ colorSpace: string;
73
+ thumbAlignment: "contain" | "overflow";
74
+ inverted: boolean;
75
+ orientation: "vertical" | "horizontal";
76
+ rotation: number;
77
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
78
+ default?: (props: {
79
+ modelValue: Color | undefined;
80
+ }) => any;
81
+ }>;
82
+ type __VLS_WithSlots<T, S> = T & {
83
+ new (): {
84
+ $slots: S;
85
+ };
86
+ };
@@ -0,0 +1,17 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorTriangleThumbProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorTriangleThumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorTriangleThumbProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: {}) => any;
12
+ }>;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorTriangleThumbXProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorTriangleThumbXProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorTriangleThumbXProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: {}) => any;
12
+ }>;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorTriangleThumbYProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorTriangleThumbYProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorTriangleThumbYProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: {}) => any;
12
+ }>;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ import type { PrimitiveProps } from "reka-ui";
2
+ export interface ColorTriangleThumbZProps extends /* @vue-ignore */ PrimitiveProps {
3
+ as?: string;
4
+ asChild?: boolean;
5
+ }
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorTriangleThumbZProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorTriangleThumbZProps> & Readonly<{}>, {
9
+ as: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?: (props: {}) => any;
12
+ }>;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,7 @@
1
+ export { injectColorTriangleRootContext, default as ColorTriangleRoot, type ColorTriangleRootEmits, type ColorTriangleRootProps, } from "./ColorTriangleRoot.vue";
2
+ export { default as ColorTriangleGradient, type ColorTriangleGradientProps, } from "./ColorTriangleGradient.vue";
3
+ export { default as ColorTriangleCheckerboard, type ColorTriangleCheckerboardProps, } from "./ColorTriangleCheckerboard.vue";
4
+ export { default as ColorTriangleThumb, type ColorTriangleThumbProps, } from "./ColorTriangleThumb.vue";
5
+ export { default as ColorTriangleThumbX, type ColorTriangleThumbXProps, } from "./ColorTriangleThumbX.vue";
6
+ export { default as ColorTriangleThumbY, type ColorTriangleThumbYProps, } from "./ColorTriangleThumbY.vue";
7
+ export { default as ColorTriangleThumbZ, type ColorTriangleThumbZProps, } from "./ColorTriangleThumbZ.vue";