@vuelor/picker 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +106 -1
- package/dist/index.js +1296 -0
- package/dist/style.css +1 -0
- package/package.json +11 -10
- package/src/components/ColorPickerRoot.vue +2 -2
- package/src/index.ts +2 -1
- package/src/{styles → style}/index.css +42 -34
- package/src/theme/vanillacss.ts +2 -0
- package/vite.config.ts +13 -15
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -4950
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
<br />
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://github.com/olekspolk/vuelor">
|
|
4
|
+
<img src="https://vuelor.dev/poster.png?v=2" alt="Examples" width="615" />
|
|
5
|
+
</a>
|
|
6
|
+
</p>
|
|
7
|
+
<h1 align="center">Vuelor</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
Vuelor — a truly flexible, accessible, and Tailwind-ready color picker with developer experiance in mind.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://vuelor.dev">Documentation</a> | <a href="https://vuelor.dev/guide/getting-started.html">Getting Started</a> | <a href="https://vuelor.dev/examples/">Examples</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @vuelor/picker
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm add @vuelor/picker
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
yarn add @vuelor/picker
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Import the parts
|
|
32
|
+
|
|
33
|
+
This isn’t a **"drop-in"** color picker. Instead, it’s a collection of building blocks that let you craft exactly what you want.
|
|
2
34
|
|
|
3
35
|
```vue
|
|
4
36
|
<script setup>
|
|
@@ -23,3 +55,76 @@ const color = ref(null)
|
|
|
23
55
|
</ColorPickerRoot>
|
|
24
56
|
</template>
|
|
25
57
|
```
|
|
58
|
+
|
|
59
|
+
## Update tailwind.config.js
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
export default {
|
|
63
|
+
theme: {
|
|
64
|
+
extend: {
|
|
65
|
+
boxShadow: {
|
|
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'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Update CSS file to include external tailwind source
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
@import "tailwindcss";
|
|
78
|
+
@source "../node_modules/@vuelor/picker";
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## For non-tailwind projects
|
|
82
|
+
|
|
83
|
+
Import CSS styles and add `styling="vanillacss"` property.
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<script setup>
|
|
87
|
+
import '@vuelor/picker/style.css'
|
|
88
|
+
|
|
89
|
+
import { ref } from 'vue'
|
|
90
|
+
import {
|
|
91
|
+
ColorPickerRoot,
|
|
92
|
+
ColorPickerCanvas,
|
|
93
|
+
ColorPickerSliderHue,
|
|
94
|
+
ColorPickerSliderAlpha,
|
|
95
|
+
ColorPickerInputHex
|
|
96
|
+
} from '@vuelor/picker'
|
|
97
|
+
|
|
98
|
+
const color = ref(null)
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<ColorPickerRoot
|
|
103
|
+
v-model="color"
|
|
104
|
+
styling="vanillacss"
|
|
105
|
+
>
|
|
106
|
+
<ColorPickerCanvas />
|
|
107
|
+
<ColorPickerSliderHue />
|
|
108
|
+
<ColorPickerSliderAlpha />
|
|
109
|
+
<ColorPickerInputHex />
|
|
110
|
+
</ColorPickerRoot>
|
|
111
|
+
</template>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Available components
|
|
115
|
+
|
|
116
|
+
| Name |
|
|
117
|
+
| ----------------------------------|
|
|
118
|
+
| `ColorPickerRoot.vue` |
|
|
119
|
+
| `ColorPickerCanvas.vue` |
|
|
120
|
+
| `ColorPickerEyeDropper.vue` |
|
|
121
|
+
| `ColorPickerInputHSB.vue` |
|
|
122
|
+
| `ColorPickerInputHSL.vue` |
|
|
123
|
+
| `ColorPickerInputRGB.vue` |
|
|
124
|
+
| `ColorPickerSliderAlpha.vue` |
|
|
125
|
+
| `ColorPickerSliderRed.vue` |
|
|
126
|
+
| `ColorPickerSliderGreen.vue` |
|
|
127
|
+
| `ColorPickerSliderBlue.vue` |
|
|
128
|
+
| `ColorPickerSliderHue.vue` |
|
|
129
|
+
| `ColorPickerSliderSaturation.vue` |
|
|
130
|
+
| `ColorPickerSliderLightness.vue` |
|