vuetify-swatches 0.0.1
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/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/VSwatches.es.js +3143 -0
- package/dist/VSwatches.umd.js +33 -0
- package/dist/components/VSwatches.vue.d.ts +23 -0
- package/dist/components/VSwatches.vue.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.d.ts +6 -0
- package/dist/index.esm.d.ts.map +1 -0
- package/dist/style.css +5 -0
- package/package.json +125 -0
- package/src/components/VSwatches.vue +115 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Masashi Yoshikawa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Vuetify Swatches
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
This project is a remake of [saintplay's vue-swatches](https://saintplay.github.io/vue-swatches/) with [Vuetify](https://vuetifyjs.com/).
|
|
6
|
+
|
|
7
|
+
Unlike the original version, it provides a UI based on Vuetify, such as ripple effects and dark mode.
|
|
8
|
+
|
|
9
|
+
This library is positioned as a complement to Vuetify and provides a minimal UI. Use the[Menu Component](https://vuetifyjs.com/components/menus/) if you want to display a pop-up menu, and the [Card component](https://vuetifyjs.com/components/cards/) if you want to display a palette.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
In this example, the selected color is assigned to `selected`.
|
|
14
|
+
|
|
15
|
+
The method of specifying `swatches` is the same as [nested-color of Vue Swatches](https://saintplay.github.io/vue-swatches/examples/#nested-colors).
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<v-swatches v-model="selected" :swatches="colors" />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If you want to make the color palette appear when you click it, combine it with VMenu.
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<v-menu offset-y>
|
|
25
|
+
<template #activator="{ on, attrs }">
|
|
26
|
+
<v-btn v-bind="attrs" min-width="auto" :color="selected" v-on="on">
|
|
27
|
+
<v-icon :color="selected" style="filter: invert(100%)">
|
|
28
|
+
mdi-menu-down
|
|
29
|
+
</v-icon>
|
|
30
|
+
</v-btn>
|
|
31
|
+
</template>
|
|
32
|
+
<v-swatches v-model="selected" :swatches="palette" />
|
|
33
|
+
</v-menu>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Options
|
|
37
|
+
|
|
38
|
+
| Variables | Type | Default | Info |
|
|
39
|
+
| --------- | ------ | -------------------------- | ------------------ |
|
|
40
|
+
| size | string | 2rem | Swatch Button size |
|
|
41
|
+
| icon | string | mdi-checkbox-marked-circle | checked icon |
|
|
42
|
+
| icon-size | string | 1rem | checked icon size |
|
|
43
|
+
|
|
44
|
+
## LICENSE
|
|
45
|
+
|
|
46
|
+
[MIT](LICENSE)
|