vuetify-swatches 0.0.7 → 0.0.8

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.
@@ -1,4 +1,5 @@
1
1
  import { type PropType, type Ref } from 'vue-demi';
2
+ /** Vuetify Swatches */
2
3
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
3
4
  checkedVisibilty: Ref<boolean>;
4
5
  selected: Ref<string>;
@@ -34,14 +35,38 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
34
35
  type: StringConstructor;
35
36
  default: string;
36
37
  };
37
- }, {
38
- modelValue: string;
39
- swatches: string[] | string[][];
40
- elevation: number;
41
- size: string;
42
- icon: string;
43
- iconSize: string;
44
- } & {}> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
38
+ }, import("@vue/composition-api").ExtractPropTypes<{
39
+ /** Model value */
40
+ modelValue: {
41
+ type: StringConstructor;
42
+ required: true;
43
+ };
44
+ /** Swatch colors */
45
+ swatches: {
46
+ type: PropType<string[] | string[][]>;
47
+ default: () => string[][];
48
+ };
49
+ /** The size of the shadow of the button */
50
+ elevation: {
51
+ type: NumberConstructor;
52
+ default: number;
53
+ };
54
+ /** Swatch sized */
55
+ size: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ /** selected icon */
60
+ icon: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ /** selected icon size */
65
+ iconSize: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
45
70
  modelValue: string;
46
71
  swatches: string[] | string[][];
47
72
  elevation: number;
@@ -66,6 +91,5 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
66
91
  icon: string;
67
92
  iconSize: string;
68
93
  }, true>);
69
- /** Vuetify Swatches */
70
94
  export default _default;
71
95
  //# sourceMappingURL=VSwatches.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VSwatches.vue.d.ts","sourceRoot":"","sources":["../../src/components/VSwatches.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,GAAG,EAET,MAAM,UAAU,CAAC;;;;uBA+EY,KAAK;;IA1D/B,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,2CAA2C;;;;;IAE3C,mBAAmB;;;;;IAEnB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;uBAsBC,KAAK;;;;;;;;;;;;;;;AA1EnC,uBAAuB;AACvB,wBAwFG"}
1
+ {"version":3,"file":"VSwatches.vue.d.ts","sourceRoot":"","sources":["../../src/components/VSwatches.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,GAAG,EAET,MAAM,UAAU,CAAC;AAKlB,uBAAuB;;;;uBA0EO,KAAK;;IA1D/B,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,2CAA2C;;;;;IAE3C,mBAAmB;;;;;IAEnB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;;IApCzB,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,2CAA2C;;;;;IAE3C,mBAAmB;;;;;IAEnB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;;;;;;;;;;;uBAsBC,KAAK;;;;;;;;;;;;;;;AAzEnC,wBAwFG"}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,6 @@
7
7
  * @see {@link https://github.com/logue/vuetify-swatches}
8
8
  */
9
9
  import VSwatches from './components/VSwatches.vue';
10
- declare const installVSwatches: void | ((app: any) => void);
10
+ declare const installVSwatches: (app: any) => any;
11
11
  export { VSwatches as default, installVSwatches as install };
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,SAAS,MAAM,4BAA4B,CAAC;AAGnD,QAAA,MAAM,gBAAgB,6BAIT,CAAC;AAEd,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,SAAS,MAAM,4BAA4B,CAAC;AAEnD,QAAA,MAAM,gBAAgB,mBAA+C,CAAC;AAEtE,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, isVue2, install } from "vue-demi";
1
+ import { defineComponent, ref } from "vue-demi";
2
2
  import { VSheet, VBtn, VIcon } from "vuetify/lib";
3
3
  import colors from "vuetify/lib/util/colors";
4
4
  var __vue2_script = defineComponent({
@@ -168,7 +168,5 @@ var VSwatches = /* @__PURE__ */ function() {
168
168
  * @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
169
169
  * @see {@link https://github.com/logue/vuetify-swatches}
170
170
  */
171
- const installVSwatches = isVue2 ? (app) => {
172
- app.component("VSwatches", VSwatches);
173
- } : install();
171
+ const installVSwatches = (app) => app.component("VSwatches", VSwatches);
174
172
  export { VSwatches as default, installVSwatches as install };
@@ -1,8 +1,8 @@
1
- (function(n,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue-demi"),require("vuetify/lib"),require("vuetify/lib/util/colors")):typeof define=="function"&&define.amd?define(["exports","vue-demi","vuetify/lib","vuetify/lib/util/colors"],l):(n=typeof globalThis<"u"?globalThis:n||self,l(n.VSwatches={},n.VueDemi,n.Vuetify,n.colors))})(this,function(n,l,_,b){"use strict";function y(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var t=y(b),V=l.defineComponent({name:"VSwatches",components:{VSheet:_.VSheet,VBtn:_.VBtn,VIcon:_.VIcon},model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,required:!0},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(e,u){const r=l.ref(!1),f=l.ref(e.modelValue);return{checkedVisibilty:r,selected:f,onSwatchClick:i=>{const c=i.target.value;!c||f.value===c||(f.value=c,u.emit("update:modelValue",c))}}}}),S=function(){var e=this,u=e.$createElement,r=e._self._c||u;return r(_.VSheet,{staticClass:"v-swatches"},e._l(e.swatches,function(f,o){return r("div",{key:o},e._l(f,function(i){return r(_.VBtn,{key:i,attrs:{elevation:e.elevation,width:e.size,height:e.size,color:i,value:i,"min-width":"auto"},on:{click:e.onSwatchClick}},[i===e.selected?r(_.VIcon,{attrs:{size:e.iconSize,color:i}},[e._v(" "+e._s(e.icon)+" ")]):e._e()],1)}),1)}),0)},w=[],q="";function g(e,u,r,f,o,i,c,T){var a=typeof e=="function"?e.options:e;u&&(a.render=u,a.staticRenderFns=r,a._compiled=!0),f&&(a.functional=!0),i&&(a._scopeId="data-v-"+i);var d;if(c?(d=function(s){s=s||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!s&&typeof __VUE_SSR_CONTEXT__<"u"&&(s=__VUE_SSR_CONTEXT__),o&&o.call(this,s),s&&s._registeredComponents&&s._registeredComponents.add(c)},a._ssrRegister=d):o&&(d=T?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),d)if(a.functional){a._injectStyles=d;var $=a.render;a.render=function(R,m){return d.call(m),$(R,m)}}else{var v=a.beforeCreate;a.beforeCreate=v?[].concat(v,d):[d]}return{exports:e,options:a}}const h={};var C=g(V,S,w,!1,k,null,null,null);function k(e){for(let u in h)this[u]=h[u]}var p=function(){return C.exports}();/**
1
+ (function(n,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue-demi"),require("vuetify/lib"),require("vuetify/lib/util/colors")):typeof define=="function"&&define.amd?define(["exports","vue-demi","vuetify/lib","vuetify/lib/util/colors"],d):(n=typeof globalThis<"u"?globalThis:n||self,d(n.VSwatches={},n.VueDemi,n.Vuetify,n.colors))})(this,function(n,d,_,b){"use strict";function y(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var t=y(b),V=d.defineComponent({name:"VSwatches",components:{VSheet:_.VSheet,VBtn:_.VBtn,VIcon:_.VIcon},model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,required:!0},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(e,u){const s=d.ref(!1),f=d.ref(e.modelValue);return{checkedVisibilty:s,selected:f,onSwatchClick:i=>{const c=i.target.value;!c||f.value===c||(f.value=c,u.emit("update:modelValue",c))}}}}),S=function(){var e=this,u=e.$createElement,s=e._self._c||u;return s(_.VSheet,{staticClass:"v-swatches"},e._l(e.swatches,function(f,r){return s("div",{key:r},e._l(f,function(i){return s(_.VBtn,{key:i,attrs:{elevation:e.elevation,width:e.size,height:e.size,color:i,value:i,"min-width":"auto"},on:{click:e.onSwatchClick}},[i===e.selected?s(_.VIcon,{attrs:{size:e.iconSize,color:i}},[e._v(" "+e._s(e.icon)+" ")]):e._e()],1)}),1)}),0)},w=[],q="";function g(e,u,s,f,r,i,c,T){var a=typeof e=="function"?e.options:e;u&&(a.render=u,a.staticRenderFns=s,a._compiled=!0),f&&(a.functional=!0),i&&(a._scopeId="data-v-"+i);var o;if(c?(o=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),r&&r.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(c)},a._ssrRegister=o):r&&(o=T?function(){r.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:r),o)if(a.functional){a._injectStyles=o;var $=a.render;a.render=function(R,m){return o.call(m),$(R,m)}}else{var v=a.beforeCreate;a.beforeCreate=v?[].concat(v,o):[o]}return{exports:e,options:a}}const h={};var C=g(V,S,w,!1,k,null,null,null);function k(e){for(let u in h)this[u]=h[u]}var p=function(){return C.exports}();/**
2
2
  * Vuetify Swatches Component
3
3
  *
4
4
  * @license MIT
5
5
  * @author Logue {@link logue@hotmail.co.jp}
6
6
  * @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
7
7
  * @see {@link https://github.com/logue/vuetify-swatches}
8
- */const z=l.isVue2?e=>{e.component("VSwatches",p)}:l.install();n.default=p,n.install=z,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
8
+ */const z=e=>e.component("VSwatches",p);n.default=p,n.install=z,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "vuetify-swatches",
4
- "private": false,
5
- "version": "0.0.7",
4
+ "version": "0.0.8",
6
5
  "description": "Color Swatch component for Vuetify.",
7
6
  "keywords": [
8
7
  "vuejs",
@@ -34,16 +33,17 @@
34
33
  "node": ">=16.15.0",
35
34
  "yarn": ">=1.22.4"
36
35
  },
36
+ "packageManager": "yarn@3.2.1",
37
37
  "license": "MIT",
38
- "main": "./dist/v-swatches.umd.js",
39
- "module": "./dist/v-swatches.es.js",
38
+ "main": "./dist/index.umd.js",
39
+ "module": "./dist/index.es.js",
40
40
  "browser": {
41
41
  "./sfc": "./src/components/VSwatches.vue"
42
42
  },
43
43
  "exports": {
44
44
  ".": {
45
- "import": "./dist/v-swatches.es.js",
46
- "require": "./dist/v-swatches.umd.js"
45
+ "import": "./dist/index.es.js",
46
+ "require": "./dist/index.umd.js"
47
47
  },
48
48
  "./dist/style.css": {
49
49
  "import": "./dist/style.css",
@@ -58,7 +58,7 @@
58
58
  "sideEffects": false,
59
59
  "scripts": {
60
60
  "dev": "vite",
61
- "clean": "rimraf node_modules/.vite",
61
+ "clean": "rimraf node_modules/.vite ",
62
62
  "build": "vite build & vue-tsc --declaration --emitDeclarationOnly",
63
63
  "build:analyze": "vue-tsc --noEmit && vite build --mode analyze",
64
64
  "build:docs": "vite build --config vite.config.docs.ts",
@@ -67,63 +67,54 @@
67
67
  "lint:style": "stylelint . --cache --cache-location ./node_modules/.vite/vite-plugin-stylelint",
68
68
  "lint:markup": "vue-tsc --noEmit",
69
69
  "preview": "vite preview --config vite.config.docs.ts",
70
- "prepare": "husky install",
71
- "postinstall": "npx vue-demi-fix"
70
+ "prepare": "husky install"
72
71
  },
73
72
  "dependencies": {
73
+ "@vue/composition-api": "latest",
74
74
  "vue-demi": "latest"
75
75
  },
76
76
  "peerDependencies": {
77
- "@vue/composition-api": "latest",
78
77
  "vue": "^2.6.14",
79
78
  "vuetify": "^2.6.6"
80
79
  },
81
- "peerDependenciesMeta": {
82
- "@vue/composition-api": {
83
- "optional": true
84
- }
85
- },
86
80
  "devDependencies": {
87
81
  "@codemirror/basic-setup": "^0.20.0",
88
82
  "@codemirror/lang-html": "^0.20.0",
89
- "@modyqyw/vite-plugin-eslint": "^1.3.2",
90
- "@types/node": "^17.0.35",
91
- "@typescript-eslint/eslint-plugin": "^5.25.0",
92
- "@typescript-eslint/parser": "^5.25.0",
93
- "@vue/composition-api": "^1.6.1",
94
- "@vue/eslint-config-typescript": "^10.0.0",
83
+ "@codemirror/state": "^0.20.0",
84
+ "@codemirror/view": "^0.20.6",
85
+ "@types/node": "^17.0.36",
86
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
87
+ "@typescript-eslint/parser": "^5.26.0",
95
88
  "eslint": "^8.16.0",
96
89
  "eslint-config-google": "^0.14.0",
97
90
  "eslint-config-prettier": "^8.5.0",
98
- "eslint-config-vuetify": "^0.6.1",
99
91
  "eslint-import-resolver-alias": "^1.1.2",
100
92
  "eslint-import-resolver-typescript": "^2.7.1",
101
93
  "eslint-plugin-import": "^2.26.0",
102
- "eslint-plugin-prettier": "^4.0.0",
103
- "eslint-plugin-prettier-vue": "^3.1.0",
94
+ "eslint-plugin-jsdoc": "^39.3.2",
104
95
  "eslint-plugin-tsdoc": "^0.2.16",
105
96
  "eslint-plugin-vue": "^9.0.1",
106
97
  "eslint-plugin-vuejs-accessibility": "^1.1.1",
107
98
  "eslint-plugin-vuetify": "^1.1.0",
108
99
  "eslint-plugin-yaml": "^0.5.0",
109
100
  "husky": "^8.0.1",
110
- "lint-staged": "^12.4.1",
101
+ "lint-staged": "^12.4.2",
111
102
  "postcss-html": "^1.4.1",
112
103
  "prettier": "^2.6.2",
113
104
  "prettier-plugin-jsdoc": "^0.3.38",
114
105
  "prettier-plugin-md-nocjsp": "^1.2.0",
115
- "prettier-plugin-sort-imports": "^1.6.0",
106
+ "prettier-plugin-sort-imports": "^1.6.1",
116
107
  "rimraf": "^3.0.2",
117
108
  "rollup-plugin-visualizer": "^5.6.0",
118
109
  "sass": "1.32.12",
119
- "stylelint": "^14.8.3",
110
+ "stylelint": "^14.8.5",
120
111
  "stylelint-config-prettier": "^9.0.3",
121
112
  "stylelint-config-recommended-scss": "^6.0.0",
122
113
  "stylelint-config-recommended-vue": "^1.4.0",
123
114
  "stylelint-order": "^5.0.0",
124
115
  "stylelint-prettier": "^2.0.0",
125
- "typescript": "^4.6.4",
126
- "unplugin-vue-components": "^0.19.5",
116
+ "typescript": "^4.7.2",
117
+ "unplugin-vue-components": "^0.19.6",
127
118
  "vite": "^2.9.9",
128
119
  "vite-plugin-checker": "^0.4.6",
129
120
  "vite-plugin-stylelint": "^2.2.3",
@@ -132,7 +123,7 @@
132
123
  "vue-codemirror6": "0.1.6",
133
124
  "vue-eslint-parser": "^9.0.2",
134
125
  "vue-template-compiler": "^2.6.14",
135
- "vue-tsc": "^0.34.15",
126
+ "vue-tsc": "^0.34.17",
136
127
  "vuetify": "^2.6.6"
137
128
  },
138
129
  "husky": {