@vuelor/picker 0.1.0 → 0.2.0
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.
- package/README.md +6 -1
- package/dist/components/ColorPickerEyeDropper.vue.d.ts +9 -5
- package/dist/components/ColorPickerInputHex.vue.d.ts +6 -1
- package/dist/components/ColorPickerRoot.vue.d.ts +4 -4
- package/dist/components/ColorPickerSwatch.vue.d.ts +14 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +808 -714
- package/dist/style.css +1 -1
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/tailwindcss.d.ts +4 -0
- package/dist/theme/vanillacss.d.ts +4 -0
- package/dist/utils/color.d.ts +3 -1
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/parsers.d.ts +3 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -64,9 +64,13 @@ export default {
|
|
|
64
64
|
extend: {
|
|
65
65
|
boxShadow: {
|
|
66
66
|
'vuelor-card': '0 2px 5px 0 #00000026, 0 10px 16px 0 #0000001f, 0 0 .5px 0 #0000001f',
|
|
67
|
-
'vuelor-thumb': '0px 0px .5px #0000002e, 0px 3px 8px #0000001a, 0px 1px 3px #0000001a'
|
|
67
|
+
'vuelor-thumb': '0px 0px .5px #0000002e, 0px 3px 8px #0000001a, 0px 1px 3px #0000001a',
|
|
68
|
+
'vuelor-inner': 'inset 0 0 0 1px #0000001a'
|
|
68
69
|
}
|
|
69
70
|
},
|
|
71
|
+
dropShadow: {
|
|
72
|
+
'vuelor-thumb': ['0px 0px .5px #00000054', '0px 1px 3px #00000026']
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
```
|
|
@@ -128,3 +132,4 @@ const color = ref(null)
|
|
|
128
132
|
| `ColorPickerSliderHue.vue` |
|
|
129
133
|
| `ColorPickerSliderSaturation.vue` |
|
|
130
134
|
| `ColorPickerSliderLightness.vue` |
|
|
135
|
+
| `ColorPickerSwatch.vue` |
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
interface Props {
|
|
2
2
|
class?: string;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
as?: string;
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_10: {};
|
|
5
7
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_10) => any;
|
|
7
9
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
as: string;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UiInputSlots } from '../utils/styles';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
3
4
|
class?: string;
|
|
4
5
|
ui?: Partial<UiInputSlots>;
|
|
5
6
|
};
|
|
@@ -7,7 +8,11 @@ declare var __VLS_1: {};
|
|
|
7
8
|
type __VLS_Slots = {} & {
|
|
8
9
|
before?: (props: typeof __VLS_1) => any;
|
|
9
10
|
};
|
|
10
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
17
|
declare const _default: typeof __VLS_export;
|
|
13
18
|
export default _default;
|
|
@@ -13,7 +13,7 @@ type ColorPickerRootContext = {
|
|
|
13
13
|
uiSlots: Function;
|
|
14
14
|
disabled: Ref<boolean>;
|
|
15
15
|
isAlphaEnabled: Ref<boolean>;
|
|
16
|
-
|
|
16
|
+
commitValue: () => void;
|
|
17
17
|
};
|
|
18
18
|
type ModelValue = string | ColorObject | null;
|
|
19
19
|
export declare const injectColorPickerContext: <T extends ColorPickerRootContext | null | undefined = ColorPickerRootContext>(fallback?: T | undefined) => T extends null ? ColorPickerRootContext | null : ColorPickerRootContext, provideColorPickerContext: (contextValue: ColorPickerRootContext) => ColorPickerRootContext;
|
|
@@ -27,7 +27,7 @@ export interface ColorPickerRootProps {
|
|
|
27
27
|
format?: Format;
|
|
28
28
|
}
|
|
29
29
|
export type ColorPickerRootEmits = {
|
|
30
|
-
(e: '
|
|
30
|
+
(e: 'valueCommit', value: ModelValue): void;
|
|
31
31
|
(e: 'update:modelValue', value: ModelValue): void;
|
|
32
32
|
};
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorPickerRootProps, {
|
|
@@ -90,10 +90,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ColorP
|
|
|
90
90
|
};
|
|
91
91
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
92
92
|
"update:modelValue": (value: ModelValue) => any;
|
|
93
|
-
|
|
93
|
+
valueCommit: (value: ModelValue) => any;
|
|
94
94
|
}, string, import("vue").PublicProps, Readonly<ColorPickerRootProps> & Readonly<{
|
|
95
95
|
"onUpdate:modelValue"?: ((value: ModelValue) => any) | undefined;
|
|
96
|
-
|
|
96
|
+
onValueCommit?: ((value: ModelValue) => any) | undefined;
|
|
97
97
|
}>, {
|
|
98
98
|
styling: "tailwindcss" | "vanillacss";
|
|
99
99
|
disabled: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
as?: string;
|
|
3
|
+
value: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
ui?: Partial<{
|
|
6
|
+
base: string;
|
|
7
|
+
alpha: string;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
as: string;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import './style/index.css';
|
|
2
|
+
export * from './utils/color';
|
|
2
3
|
export type * from './utils/types';
|
|
4
|
+
export { useVModel } from './composables/useVModel.ts';
|
|
5
|
+
export { injectColorPickerContext } from './components/ColorPickerRoot.vue';
|
|
3
6
|
export { default as ColorPickerRoot } from './components/ColorPickerRoot.vue';
|
|
4
7
|
export { default as ColorPickerCanvas } from './components/ColorPickerCanvas.vue';
|
|
5
8
|
export { default as ColorPickerEyeDropper } from './components/ColorPickerEyeDropper.vue';
|
|
@@ -14,3 +17,4 @@ export { default as ColorPickerSliderLightness } from './components/ColorPickerS
|
|
|
14
17
|
export { default as ColorPickerSliderRed } from './components/ColorPickerSliderRed.vue';
|
|
15
18
|
export { default as ColorPickerSliderGreen } from './components/ColorPickerSliderGreen.vue';
|
|
16
19
|
export { default as ColorPickerSliderBlue } from './components/ColorPickerSliderBlue.vue';
|
|
20
|
+
export { default as ColorPickerSwatch } from './components/ColorPickerSwatch.vue';
|