vuetify-swatches 0.3.2 → 0.3.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/dist/components/VSwatches.vue.d.ts +2 -2
- package/dist/index.es.js +11 -11
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/src/components/VSwatches.vue +1 -1
|
@@ -4,7 +4,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
/** Model value */
|
|
5
5
|
modelValue: {
|
|
6
6
|
type: StringConstructor;
|
|
7
|
-
default:
|
|
7
|
+
default: any;
|
|
8
8
|
};
|
|
9
9
|
/** Swatch colors */
|
|
10
10
|
swatches: {
|
|
@@ -38,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
/** Model value */
|
|
39
39
|
modelValue: {
|
|
40
40
|
type: StringConstructor;
|
|
41
|
-
default:
|
|
41
|
+
default: any;
|
|
42
42
|
};
|
|
43
43
|
/** Swatch colors */
|
|
44
44
|
swatches: {
|
package/dist/index.es.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 0.3.
|
|
8
|
+
* @version 0.3.3
|
|
9
9
|
* @see {@link https://github.com/logue/vuetify-swatches}
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { defineComponent as V, ref as k, resolveComponent as
|
|
12
|
+
import { defineComponent as V, ref as k, resolveComponent as d, openBlock as n, createBlock as c, withCtx as u, createElementBlock as p, Fragment as m, renderList as b, createTextVNode as S, toDisplayString as C, createCommentVNode as z } from "vue";
|
|
13
13
|
import e from "vuetify/lib/util/colors.mjs";
|
|
14
14
|
const B = V({
|
|
15
15
|
name: "VSwatches",
|
|
@@ -18,7 +18,7 @@ const B = V({
|
|
|
18
18
|
event: "update:modelValue"
|
|
19
19
|
},
|
|
20
20
|
props: {
|
|
21
|
-
modelValue: { type: String, default:
|
|
21
|
+
modelValue: { type: String, default: e.shades.white },
|
|
22
22
|
swatches: {
|
|
23
23
|
type: Array,
|
|
24
24
|
default: () => [
|
|
@@ -69,14 +69,14 @@ const $ = (t, a) => {
|
|
|
69
69
|
return o;
|
|
70
70
|
};
|
|
71
71
|
function N(t, a, o, r, l, i) {
|
|
72
|
-
const
|
|
73
|
-
return n(),
|
|
72
|
+
const f = d("v-icon"), w = d("v-btn"), v = d("v-sheet");
|
|
73
|
+
return n(), c(v, { class: "v-swatches" }, {
|
|
74
74
|
default: u(() => [
|
|
75
|
-
(n(!0), p(m, null,
|
|
75
|
+
(n(!0), p(m, null, b(t.swatches, (y, _) => (n(), p("div", {
|
|
76
76
|
key: _,
|
|
77
77
|
class: "d-flex"
|
|
78
78
|
}, [
|
|
79
|
-
(n(!0), p(m, null,
|
|
79
|
+
(n(!0), p(m, null, b(y, (s) => (n(), c(w, {
|
|
80
80
|
key: s,
|
|
81
81
|
elevation: t.elevation,
|
|
82
82
|
width: t.size,
|
|
@@ -87,7 +87,7 @@ function N(t, a, o, r, l, i) {
|
|
|
87
87
|
onClick: a[0] || (a[0] = (g) => t.onSwatchClick(g))
|
|
88
88
|
}, {
|
|
89
89
|
default: u(() => [
|
|
90
|
-
s === t.modelValue ? (n(),
|
|
90
|
+
s === t.modelValue ? (n(), c(f, {
|
|
91
91
|
key: 0,
|
|
92
92
|
size: t.iconSize,
|
|
93
93
|
color: s
|
|
@@ -105,9 +105,9 @@ function N(t, a, o, r, l, i) {
|
|
|
105
105
|
_: 1
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
typeof window < "u" && window.Vue && window.Vue.use(
|
|
108
|
+
const h = /* @__PURE__ */ $(B, [["render", N]]), A = (t) => t.component("VSwatches", h);
|
|
109
|
+
typeof window < "u" && window.Vue && window.Vue.use(h);
|
|
110
110
|
export {
|
|
111
|
-
|
|
111
|
+
h as default,
|
|
112
112
|
A as install
|
|
113
113
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 0.3.
|
|
8
|
+
* @version 0.3.3
|
|
9
9
|
* @see {@link https://github.com/logue/vuetify-swatches}
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
(function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vuetify/lib/util/colors.mjs")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/lib/util/colors.mjs"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.VSwatches={},l.Vue,l.colors))})(this,function(l,e,u){"use strict";const t=(a=>a&&typeof a=="object"&&"default"in a?a:{default:a})(u),f=e.defineComponent({name:"VSwatches",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,default:
|
|
12
|
+
(function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vuetify/lib/util/colors.mjs")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/lib/util/colors.mjs"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.VSwatches={},l.Vue,l.colors))})(this,function(l,e,u){"use strict";const t=(a=>a&&typeof a=="object"&&"default"in a?a:{default:a})(u),f=e.defineComponent({name:"VSwatches",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,default:t.default.shades.white},swatches:{type:Array,default:()=>[[t.default.shades.black,t.default.shades.white],[t.default.red.base,t.default.pink.base,t.default.purple.base,t.default.deepPurple.base,t.default.indigo.base,t.default.blue.base,t.default.lightBlue.base,t.default.cyan.base],[t.default.teal.base,t.default.green.base,t.default.lightGreen.base,t.default.lime.base,t.default.yellow.base,t.default.amber.base,t.default.orange.base,t.default.deepOrange.base],[t.default.brown.base,t.default.blueGrey.base,t.default.grey.base]]},elevation:{type:Number,default:1},size:{type:String,default:"2rem"},icon:{type:String,default:"mdi-checkbox-marked-circle"},iconSize:{type:String,default:"1rem"}},emits:["update:modelValue"],setup(a,n){return{checkedVisibilty:e.ref(!1),onSwatchClick:i=>{const d=i.target.dataset.value;!d||a.modelValue===d||n.emit("update:modelValue",d)}}}}),S="",p=(a,n)=>{const s=a.__vccOpts||a;for(const[c,i]of n)s[c]=i;return s};function m(a,n,s,c,i,d){const b=e.resolveComponent("v-icon"),y=e.resolveComponent("v-btn"),w=e.resolveComponent("v-sheet");return e.openBlock(),e.createBlock(w,{class:"v-swatches"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.swatches,(k,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"d-flex"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k,o=>(e.openBlock(),e.createBlock(y,{key:o,elevation:a.elevation,width:a.size,height:a.size,color:o,"data-value":o,"min-width":"auto",onClick:n[0]||(n[0]=g=>a.onSwatchClick(g))},{default:e.withCtx(()=>[o===a.modelValue?(e.openBlock(),e.createBlock(b,{key:0,size:a.iconSize,color:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.icon),1)]),_:2},1032,["size","color"])):e.createCommentVNode("",!0)]),_:2},1032,["elevation","width","height","color","data-value"]))),128))]))),128))]),_:1})}const r=p(f,[["render",m]]),h=a=>a.component("VSwatches",r);typeof window<"u"&&window.Vue&&window.Vue.use(r),l.default=r,l.install=h,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "vuetify-swatches",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"description": "Color Swatch component for Vuetify3.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vuejs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"src/components/VSwatches.vue"
|
|
55
55
|
],
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=16.
|
|
57
|
+
"node": ">=16.17.0",
|
|
58
58
|
"yarn": ">=1.22.10"
|
|
59
59
|
},
|
|
60
60
|
"packageManager": "yarn@3.2.2",
|
|
@@ -74,21 +74,21 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"vue": "^3.2.37",
|
|
77
|
-
"vuetify": "^3.0.0-beta.
|
|
77
|
+
"vuetify": "^3.0.0-beta.8"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@codemirror/lang-html": "^6.1.0",
|
|
81
|
-
"@types/node": "^18.7.
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "^5.33.
|
|
83
|
-
"@typescript-eslint/parser": "^5.33.
|
|
84
|
-
"@vitejs/plugin-vue": "^3.0.
|
|
81
|
+
"@types/node": "^18.7.6",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
83
|
+
"@typescript-eslint/parser": "^5.33.1",
|
|
84
|
+
"@vitejs/plugin-vue": "^3.0.3",
|
|
85
85
|
"@vue/tsconfig": "^0.1.3",
|
|
86
86
|
"codemirror": "^6.0.1",
|
|
87
|
-
"eslint": "^8.
|
|
87
|
+
"eslint": "^8.22.0",
|
|
88
88
|
"eslint-config-google": "^0.14.0",
|
|
89
89
|
"eslint-config-prettier": "^8.5.0",
|
|
90
90
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
91
|
-
"eslint-import-resolver-typescript": "^3.4.
|
|
91
|
+
"eslint-import-resolver-typescript": "^3.4.2",
|
|
92
92
|
"eslint-plugin-import": "^2.26.0",
|
|
93
93
|
"eslint-plugin-jsdoc": "^39.3.6",
|
|
94
94
|
"eslint-plugin-tsdoc": "^0.2.16",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"stylelint-order": "^5.0.0",
|
|
111
111
|
"stylelint-prettier": "^2.0.0",
|
|
112
112
|
"typescript": "^4.7.4",
|
|
113
|
-
"vite": "^3.0.
|
|
113
|
+
"vite": "^3.0.8",
|
|
114
114
|
"vite-plugin-banner": "^0.3.0",
|
|
115
115
|
"vite-plugin-checker": "^0.4.9",
|
|
116
116
|
"vite-plugin-vuetify": "^1.0.0-alpha.14",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"vue-codemirror6": "0.6.8",
|
|
119
119
|
"vue-eslint-parser": "^9.0.3",
|
|
120
120
|
"vue-tsc": "^0.40.1",
|
|
121
|
-
"vuetify": "^3.0.0-beta.
|
|
121
|
+
"vuetify": "^3.0.0-beta.8"
|
|
122
122
|
},
|
|
123
123
|
"husky": {
|
|
124
124
|
"hooks": {
|
|
@@ -43,7 +43,7 @@ export default defineComponent({
|
|
|
43
43
|
},
|
|
44
44
|
props: {
|
|
45
45
|
/** Model value */
|
|
46
|
-
modelValue: { type: String, default:
|
|
46
|
+
modelValue: { type: String, default: colors.shades.white },
|
|
47
47
|
/** Swatch colors */
|
|
48
48
|
swatches: {
|
|
49
49
|
type: Array as PropType<string[] | string[][]>,
|