vuetify-swatches 1.3.4 → 1.3.5
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/index.d.ts +3 -3
- package/dist/index.es.js +8 -11
- package/dist/index.iife.js +29 -36
- package/dist/index.umd.js +29 -36
- package/dist/style.css +5 -5
- package/package.json +23 -26
- package/src/components/VSwatches.vue +33 -30
- package/dist/components/VSwatches.vue.d.ts +0 -160
- package/dist/components/VSwatches.vue.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import VSwatches from '@/components/VSwatches.vue';
|
|
2
|
-
declare const installVSwatches: (app: any) => any;
|
|
3
|
-
export { VSwatches as default, installVSwatches as install };
|
|
1
|
+
import VSwatches from '@/components/VSwatches.vue';
|
|
2
|
+
declare const installVSwatches: (app: any) => any;
|
|
3
|
+
export { VSwatches as default, installVSwatches as install };
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.3.
|
|
8
|
+
* @version 1.3.5
|
|
9
9
|
* @see {@link https://github.com/logue/vuetify-swatches}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -56,17 +56,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
56
|
elevation: { type: [String, Number], default: void 0 }
|
|
57
57
|
},
|
|
58
58
|
emits: ["update:modelValue"],
|
|
59
|
-
setup(__props, { emit }) {
|
|
59
|
+
setup(__props, { emit: emits }) {
|
|
60
60
|
const props = __props;
|
|
61
|
-
const selected = ref(props.modelValue);
|
|
62
|
-
const onSwatchClick = (e) =>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
emit("update:modelValue", value);
|
|
68
|
-
};
|
|
69
|
-
watch(selected, (value) => void 0);
|
|
61
|
+
const selected = ref(props.modelValue || colors.shades.white);
|
|
62
|
+
const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors.shades.white;
|
|
63
|
+
watch(
|
|
64
|
+
() => selected.value,
|
|
65
|
+
(s) => emits("update:modelValue", s)
|
|
66
|
+
);
|
|
70
67
|
return (_ctx, _cache) => {
|
|
71
68
|
const _component_v_icon = resolveComponent("v-icon");
|
|
72
69
|
const _component_v_btn = resolveComponent("v-btn");
|
package/dist/index.iife.js
CHANGED
|
@@ -5,46 +5,42 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.3.
|
|
8
|
+
* @version 1.3.5
|
|
9
9
|
* @see {@link https://github.com/logue/vuetify-swatches}
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
var VSwatches = (function (exports, vue, colors) {
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
16
|
-
|
|
17
|
-
const colors__default = /*#__PURE__*/_interopDefaultLegacy(colors);
|
|
18
|
-
|
|
19
15
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
20
16
|
__name: "VSwatches",
|
|
21
17
|
props: {
|
|
22
|
-
modelValue: { type: String, default:
|
|
18
|
+
modelValue: { type: String, default: colors.shades.white },
|
|
23
19
|
swatches: {
|
|
24
20
|
type: Array,
|
|
25
21
|
default: () => [
|
|
26
|
-
[
|
|
22
|
+
[colors.shades.black, colors.shades.white, colors.shades.transparent],
|
|
27
23
|
[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
colors.red.base,
|
|
25
|
+
colors.pink.base,
|
|
26
|
+
colors.purple.base,
|
|
27
|
+
colors.deepPurple.base,
|
|
28
|
+
colors.indigo.base,
|
|
29
|
+
colors.blue.base,
|
|
30
|
+
colors.lightBlue.base,
|
|
31
|
+
colors.cyan.base
|
|
36
32
|
],
|
|
37
33
|
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
colors.teal.base,
|
|
35
|
+
colors.green.base,
|
|
36
|
+
colors.lightGreen.base,
|
|
37
|
+
colors.lime.base,
|
|
38
|
+
colors.yellow.base,
|
|
39
|
+
colors.amber.base,
|
|
40
|
+
colors.orange.base,
|
|
41
|
+
colors.deepOrange.base
|
|
46
42
|
],
|
|
47
|
-
[
|
|
43
|
+
[colors.brown.base, colors.blueGrey.base, colors.grey.base]
|
|
48
44
|
]
|
|
49
45
|
},
|
|
50
46
|
size: { type: String, default: "2rem" },
|
|
@@ -60,17 +56,14 @@ var VSwatches = (function (exports, vue, colors) {
|
|
|
60
56
|
elevation: { type: [String, Number], default: void 0 }
|
|
61
57
|
},
|
|
62
58
|
emits: ["update:modelValue"],
|
|
63
|
-
setup(__props, { emit }) {
|
|
59
|
+
setup(__props, { emit: emits }) {
|
|
64
60
|
const props = __props;
|
|
65
|
-
const selected = vue.ref(props.modelValue);
|
|
66
|
-
const onSwatchClick = (e) =>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
emit("update:modelValue", value);
|
|
72
|
-
};
|
|
73
|
-
vue.watch(selected, (value) => void 0);
|
|
61
|
+
const selected = vue.ref(props.modelValue || colors.shades.white);
|
|
62
|
+
const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors.shades.white;
|
|
63
|
+
vue.watch(
|
|
64
|
+
() => selected.value,
|
|
65
|
+
(s) => emits("update:modelValue", s)
|
|
66
|
+
);
|
|
74
67
|
return (_ctx, _cache) => {
|
|
75
68
|
const _component_v_icon = vue.resolveComponent("v-icon");
|
|
76
69
|
const _component_v_btn = vue.resolveComponent("v-btn");
|
|
@@ -83,7 +76,7 @@ var VSwatches = (function (exports, vue, colors) {
|
|
|
83
76
|
return vue.openBlock(), vue.createBlock(_component_v_btn, {
|
|
84
77
|
key: color,
|
|
85
78
|
border: props.border,
|
|
86
|
-
class: vue.normalizeClass(color === vue.unref(
|
|
79
|
+
class: vue.normalizeClass(color === vue.unref(colors).shades.transparent ? "bg-trasparent" : ""),
|
|
87
80
|
color,
|
|
88
81
|
disabled: props.disabled,
|
|
89
82
|
elevation: props.elevation,
|
|
@@ -98,7 +91,7 @@ var VSwatches = (function (exports, vue, colors) {
|
|
|
98
91
|
color === __props.modelValue ? (vue.openBlock(), vue.createBlock(_component_v_icon, {
|
|
99
92
|
key: 0,
|
|
100
93
|
size: __props.iconSize,
|
|
101
|
-
color: color !== vue.unref(
|
|
94
|
+
color: color !== vue.unref(colors).shades.transparent ? color : void 0
|
|
102
95
|
}, {
|
|
103
96
|
default: vue.withCtx(() => [
|
|
104
97
|
vue.createTextVNode(vue.toDisplayString(props.icon), 1)
|
package/dist/index.umd.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.3.
|
|
8
|
+
* @version 1.3.5
|
|
9
9
|
* @see {@link https://github.com/logue/vuetify-swatches}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -15,39 +15,35 @@
|
|
|
15
15
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VSwatches = {}, global.Vue, global.colors));
|
|
16
16
|
})(this, (function (exports, vue, colors) { 'use strict';
|
|
17
17
|
|
|
18
|
-
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
19
|
-
|
|
20
|
-
const colors__default = /*#__PURE__*/_interopDefaultLegacy(colors);
|
|
21
|
-
|
|
22
18
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
23
19
|
__name: "VSwatches",
|
|
24
20
|
props: {
|
|
25
|
-
modelValue: { type: String, default:
|
|
21
|
+
modelValue: { type: String, default: colors.shades.white },
|
|
26
22
|
swatches: {
|
|
27
23
|
type: Array,
|
|
28
24
|
default: () => [
|
|
29
|
-
[
|
|
25
|
+
[colors.shades.black, colors.shades.white, colors.shades.transparent],
|
|
30
26
|
[
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
colors.red.base,
|
|
28
|
+
colors.pink.base,
|
|
29
|
+
colors.purple.base,
|
|
30
|
+
colors.deepPurple.base,
|
|
31
|
+
colors.indigo.base,
|
|
32
|
+
colors.blue.base,
|
|
33
|
+
colors.lightBlue.base,
|
|
34
|
+
colors.cyan.base
|
|
39
35
|
],
|
|
40
36
|
[
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
colors.teal.base,
|
|
38
|
+
colors.green.base,
|
|
39
|
+
colors.lightGreen.base,
|
|
40
|
+
colors.lime.base,
|
|
41
|
+
colors.yellow.base,
|
|
42
|
+
colors.amber.base,
|
|
43
|
+
colors.orange.base,
|
|
44
|
+
colors.deepOrange.base
|
|
49
45
|
],
|
|
50
|
-
[
|
|
46
|
+
[colors.brown.base, colors.blueGrey.base, colors.grey.base]
|
|
51
47
|
]
|
|
52
48
|
},
|
|
53
49
|
size: { type: String, default: "2rem" },
|
|
@@ -63,17 +59,14 @@
|
|
|
63
59
|
elevation: { type: [String, Number], default: void 0 }
|
|
64
60
|
},
|
|
65
61
|
emits: ["update:modelValue"],
|
|
66
|
-
setup(__props, { emit }) {
|
|
62
|
+
setup(__props, { emit: emits }) {
|
|
67
63
|
const props = __props;
|
|
68
|
-
const selected = vue.ref(props.modelValue);
|
|
69
|
-
const onSwatchClick = (e) =>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
emit("update:modelValue", value);
|
|
75
|
-
};
|
|
76
|
-
vue.watch(selected, (value) => void 0);
|
|
64
|
+
const selected = vue.ref(props.modelValue || colors.shades.white);
|
|
65
|
+
const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors.shades.white;
|
|
66
|
+
vue.watch(
|
|
67
|
+
() => selected.value,
|
|
68
|
+
(s) => emits("update:modelValue", s)
|
|
69
|
+
);
|
|
77
70
|
return (_ctx, _cache) => {
|
|
78
71
|
const _component_v_icon = vue.resolveComponent("v-icon");
|
|
79
72
|
const _component_v_btn = vue.resolveComponent("v-btn");
|
|
@@ -86,7 +79,7 @@
|
|
|
86
79
|
return vue.openBlock(), vue.createBlock(_component_v_btn, {
|
|
87
80
|
key: color,
|
|
88
81
|
border: props.border,
|
|
89
|
-
class: vue.normalizeClass(color === vue.unref(
|
|
82
|
+
class: vue.normalizeClass(color === vue.unref(colors).shades.transparent ? "bg-trasparent" : ""),
|
|
90
83
|
color,
|
|
91
84
|
disabled: props.disabled,
|
|
92
85
|
elevation: props.elevation,
|
|
@@ -101,7 +94,7 @@
|
|
|
101
94
|
color === __props.modelValue ? (vue.openBlock(), vue.createBlock(_component_v_icon, {
|
|
102
95
|
key: 0,
|
|
103
96
|
size: __props.iconSize,
|
|
104
|
-
color: color !== vue.unref(
|
|
97
|
+
color: color !== vue.unref(colors).shades.transparent ? color : void 0
|
|
105
98
|
}, {
|
|
106
99
|
default: vue.withCtx(() => [
|
|
107
100
|
vue.createTextVNode(vue.toDisplayString(props.icon), 1)
|
package/dist/style.css
CHANGED
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.3.
|
|
8
|
+
* @version 1.3.5
|
|
9
9
|
* @see {@link https://github.com/logue/vuetify-swatches}
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
.v-swatches .v-btn {
|
|
12
|
+
.v-swatches div .v-btn {
|
|
13
13
|
padding: 0 !important;
|
|
14
14
|
margin: 0.1rem;
|
|
15
15
|
}
|
|
16
|
-
.v-swatches .v-btn .v-icon {
|
|
16
|
+
.v-swatches div .v-btn .v-icon {
|
|
17
17
|
filter: invert(100%) grayscale(100%) contrast(100);
|
|
18
18
|
}
|
|
19
|
-
.v-swatches .v-btn.bg-trasparent {
|
|
19
|
+
.v-swatches div .v-btn.bg-trasparent {
|
|
20
20
|
background: linear-gradient(to top left, transparent 0, transparent calc(50% - 0.1rem), #F44336 50%, transparent calc(50% + 0.1rem), transparent);
|
|
21
21
|
}
|
|
22
|
-
.v-swatches .v-btn.bg-trasparent .v-icon {
|
|
22
|
+
.v-swatches div .v-btn.bg-trasparent .v-icon {
|
|
23
23
|
filter: none;
|
|
24
24
|
}
|
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": "1.3.
|
|
4
|
+
"version": "1.3.5",
|
|
5
5
|
"description": "Color Swatch component for Vuetify3.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vuejs",
|
|
@@ -56,39 +56,37 @@
|
|
|
56
56
|
],
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=18.12.1",
|
|
59
|
-
"yarn": ">=1.22.
|
|
59
|
+
"yarn": ">=1.22.19"
|
|
60
60
|
},
|
|
61
|
-
"packageManager": "yarn@3.3.
|
|
61
|
+
"packageManager": "yarn@3.3.1",
|
|
62
62
|
"sideEffects": false,
|
|
63
63
|
"scripts": {
|
|
64
64
|
"dev": "vite",
|
|
65
|
-
"clean": "rimraf node_modules/.vite
|
|
66
|
-
"type-check": "
|
|
67
|
-
"lint": "eslint . --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint && prettier . -w -u",
|
|
68
|
-
"lint:style": "stylelint \"./**/*.{css,sass,scss,htm,html,vue}\" --fix --cache-location ./node_modules/.vite/vite-plugin-stylelint && prettier \"./**/*.{css,sass,scss,htm,html,vue}\" -w -u",
|
|
65
|
+
"clean": "rimraf node_modules/.vite",
|
|
66
|
+
"type-check": "tsc --noEmit --composite false",
|
|
69
67
|
"build": "run-p type-check build-only build-declaration",
|
|
70
|
-
"build:analyze": "vite build --mode analyze",
|
|
71
68
|
"build:clean": "rimraf dist",
|
|
72
69
|
"build:docs": "vite build --config vite.config.docs.ts",
|
|
73
70
|
"build-only": "vite build",
|
|
74
|
-
"build-declaration": "
|
|
75
|
-
"
|
|
76
|
-
"prepare": "husky install"
|
|
71
|
+
"build-declaration": "tsc -p tsconfig.app.json --composite false --declaration --declarationMap --declarationDir dist",
|
|
72
|
+
"lint": "eslint . --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint && prettier . --write",
|
|
73
|
+
"prepare": "husky install",
|
|
74
|
+
"version": "auto-changelog -p && git add CHANGELOG.md"
|
|
77
75
|
},
|
|
78
76
|
"peerDependencies": {
|
|
79
77
|
"vue": "^3.2.45",
|
|
80
|
-
"vuetify": "^3.0.
|
|
78
|
+
"vuetify": "^3.0.6"
|
|
81
79
|
},
|
|
82
80
|
"devDependencies": {
|
|
83
81
|
"@codemirror/lang-html": "^6.4.0",
|
|
84
|
-
"@types/node": "^18.11.
|
|
85
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
86
|
-
"@typescript-eslint/parser": "^5.
|
|
87
|
-
"@vitejs/plugin-vue": "^
|
|
82
|
+
"@types/node": "^18.11.18",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
|
84
|
+
"@typescript-eslint/parser": "^5.47.1",
|
|
85
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
88
86
|
"@vue/eslint-config-prettier": "^7.0.0",
|
|
89
87
|
"@vue/tsconfig": "^0.1.3",
|
|
90
88
|
"codemirror": "^6.0.1",
|
|
91
|
-
"eslint": "^8.
|
|
89
|
+
"eslint": "^8.30.0",
|
|
92
90
|
"eslint-config-google": "^0.14.0",
|
|
93
91
|
"eslint-config-prettier": "^8.5.0",
|
|
94
92
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
@@ -107,22 +105,22 @@
|
|
|
107
105
|
"prettier": "^2.8.1",
|
|
108
106
|
"rimraf": "^3.0.2",
|
|
109
107
|
"rollup-plugin-visualizer": "^5.8.3",
|
|
110
|
-
"sass": "1.
|
|
111
|
-
"stylelint": "^14.16.
|
|
108
|
+
"sass": "1.57.1",
|
|
109
|
+
"stylelint": "^14.16.1",
|
|
112
110
|
"stylelint-config-prettier": "^9.0.4",
|
|
113
111
|
"stylelint-config-recommended-scss": "^8.0.0",
|
|
114
112
|
"stylelint-config-recommended-vue": "^1.4.0",
|
|
115
113
|
"stylelint-order": "^5.0.0",
|
|
116
114
|
"stylelint-prettier": "^2.0.0",
|
|
117
115
|
"typescript": "^4.9.4",
|
|
118
|
-
"vite": "^
|
|
119
|
-
"vite-plugin-banner": "^0.
|
|
120
|
-
"vite-plugin-checker": "^0.5.
|
|
121
|
-
"vite-plugin-vuetify": "^1.0.
|
|
116
|
+
"vite": "^4.0.3",
|
|
117
|
+
"vite-plugin-banner": "^0.7.0",
|
|
118
|
+
"vite-plugin-checker": "^0.5.3",
|
|
119
|
+
"vite-plugin-vuetify": "^1.0.1",
|
|
122
120
|
"vue": "^3.2.45",
|
|
123
|
-
"vue-codemirror6": "1.1.
|
|
121
|
+
"vue-codemirror6": "1.1.2",
|
|
124
122
|
"vue-eslint-parser": "^9.1.0",
|
|
125
|
-
"vue-tsc": "^1.0.
|
|
123
|
+
"vue-tsc": "^1.0.18",
|
|
126
124
|
"vuetify": "^3.0.4"
|
|
127
125
|
},
|
|
128
126
|
"husky": {
|
|
@@ -131,7 +129,6 @@
|
|
|
131
129
|
}
|
|
132
130
|
},
|
|
133
131
|
"lint-staged": {
|
|
134
|
-
"*.vue": "vue-tsc --noEmit",
|
|
135
132
|
"*.{js,ts,json,yml,yaml,vue,htm,html}": "eslint --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint",
|
|
136
133
|
"*.{css,sass,scss,vue,htm,html}": "stylelint --fix --cache --cache-location ./node_modules/.vite/vite-plugin-stylelint",
|
|
137
134
|
"*": "prettier -w -u"
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
import { ref, watch, type PropType, type Ref } from 'vue';
|
|
4
4
|
import colors from 'vuetify/lib/util/colors.mjs';
|
|
5
5
|
|
|
6
|
+
/** Emits */
|
|
7
|
+
const emits = defineEmits<{
|
|
8
|
+
(event: 'update:modelValue', value: string): void;
|
|
9
|
+
}>();
|
|
10
|
+
|
|
6
11
|
/** Props */
|
|
7
12
|
const props = defineProps({
|
|
8
13
|
/** Model value */
|
|
@@ -78,26 +83,22 @@ const props = defineProps({
|
|
|
78
83
|
elevation: { type: [String, Number], default: undefined },
|
|
79
84
|
});
|
|
80
85
|
|
|
81
|
-
/**
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const selected: Ref<string | undefined> = ref(props.modelValue);
|
|
86
|
+
/** Selected Color */
|
|
87
|
+
const selected: Ref<string> = ref(props.modelValue || colors.shades.white);
|
|
85
88
|
|
|
86
89
|
/**
|
|
87
90
|
* Swatch button clicked handler
|
|
88
91
|
*
|
|
89
92
|
* @param e - Event
|
|
90
93
|
*/
|
|
91
|
-
const onSwatchClick = (e: Event) =>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (!value || props.modelValue === value) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
emit('update:modelValue', value);
|
|
98
|
-
};
|
|
94
|
+
const onSwatchClick = (e: Event) =>
|
|
95
|
+
(selected.value =
|
|
96
|
+
(e.target as HTMLButtonElement).dataset.value || colors.shades.white);
|
|
99
97
|
|
|
100
|
-
watch(
|
|
98
|
+
watch(
|
|
99
|
+
() => selected.value,
|
|
100
|
+
s => emits('update:modelValue', s)
|
|
101
|
+
);
|
|
101
102
|
</script>
|
|
102
103
|
|
|
103
104
|
<template>
|
|
@@ -134,25 +135,27 @@ watch(selected, value => console.log(value));
|
|
|
134
135
|
@import '~/vuetify/lib/styles/settings';
|
|
135
136
|
|
|
136
137
|
.v-swatches {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
div {
|
|
139
|
+
.v-btn {
|
|
140
|
+
padding: 0 !important;
|
|
141
|
+
margin: 0.1rem;
|
|
140
142
|
|
|
141
|
-
.v-icon {
|
|
142
|
-
filter: invert(100%) grayscale(100%) contrast(100);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
&.bg-trasparent {
|
|
146
|
-
background: linear-gradient(
|
|
147
|
-
to top left,
|
|
148
|
-
transparent 0,
|
|
149
|
-
transparent calc(50% - 0.1rem),
|
|
150
|
-
map-get($red, 'base') 50%,
|
|
151
|
-
transparent calc(50% + 0.1rem),
|
|
152
|
-
transparent
|
|
153
|
-
);
|
|
154
143
|
.v-icon {
|
|
155
|
-
filter:
|
|
144
|
+
filter: invert(100%) grayscale(100%) contrast(100);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&.bg-trasparent {
|
|
148
|
+
background: linear-gradient(
|
|
149
|
+
to top left,
|
|
150
|
+
transparent 0,
|
|
151
|
+
transparent calc(50% - 0.1rem),
|
|
152
|
+
map-get($red, 'base') 50%,
|
|
153
|
+
transparent calc(50% + 0.1rem),
|
|
154
|
+
transparent
|
|
155
|
+
);
|
|
156
|
+
.v-icon {
|
|
157
|
+
filter: none;
|
|
158
|
+
}
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
/** Vuetify Swatches */
|
|
2
|
-
import { type PropType } from 'vue';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
/** Model value */
|
|
5
|
-
modelValue: {
|
|
6
|
-
type: StringConstructor;
|
|
7
|
-
default: any;
|
|
8
|
-
};
|
|
9
|
-
/** Swatch colors */
|
|
10
|
-
swatches: {
|
|
11
|
-
type: PropType<string[] | string[][]>;
|
|
12
|
-
default: () => any[][];
|
|
13
|
-
};
|
|
14
|
-
/** Swatch size */
|
|
15
|
-
size: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
/** Selected icon */
|
|
20
|
-
icon: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: string;
|
|
23
|
-
};
|
|
24
|
-
/** selected icon size */
|
|
25
|
-
iconSize: {
|
|
26
|
-
type: StringConstructor;
|
|
27
|
-
default: string;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* The variant prop gives you easy access to several different button styles..
|
|
31
|
-
*
|
|
32
|
-
* @see {@link https://next.vuetifyjs.com/en/components/buttons/#variant}
|
|
33
|
-
*/
|
|
34
|
-
variant: {
|
|
35
|
-
type: PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
36
|
-
default: undefined;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Removes the ability to click or target the component.
|
|
40
|
-
*
|
|
41
|
-
* @see {@link https://vuetifyjs.com/en/api/v-btn/#props-disabled}
|
|
42
|
-
*/
|
|
43
|
-
disabled: {
|
|
44
|
-
type: BooleanConstructor;
|
|
45
|
-
default: undefined;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Applies a large border radius on the button.
|
|
49
|
-
*
|
|
50
|
-
* @see {@link https://next.vuetifyjs.com/en/components/buttons/#rounded}
|
|
51
|
-
*/
|
|
52
|
-
rounded: {
|
|
53
|
-
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
54
|
-
default: undefined;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Applies border styles to component.
|
|
58
|
-
*
|
|
59
|
-
* @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-border}
|
|
60
|
-
*/
|
|
61
|
-
border: {
|
|
62
|
-
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
63
|
-
default: boolean;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Designates an elevation applied to the component between 0 and 24.
|
|
67
|
-
*
|
|
68
|
-
* @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-elevation}
|
|
69
|
-
*/
|
|
70
|
-
elevation: {
|
|
71
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
72
|
-
default: undefined;
|
|
73
|
-
};
|
|
74
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
75
|
-
/** Model value */
|
|
76
|
-
modelValue: {
|
|
77
|
-
type: StringConstructor;
|
|
78
|
-
default: any;
|
|
79
|
-
};
|
|
80
|
-
/** Swatch colors */
|
|
81
|
-
swatches: {
|
|
82
|
-
type: PropType<string[] | string[][]>;
|
|
83
|
-
default: () => any[][];
|
|
84
|
-
};
|
|
85
|
-
/** Swatch size */
|
|
86
|
-
size: {
|
|
87
|
-
type: StringConstructor;
|
|
88
|
-
default: string;
|
|
89
|
-
};
|
|
90
|
-
/** Selected icon */
|
|
91
|
-
icon: {
|
|
92
|
-
type: StringConstructor;
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
/** selected icon size */
|
|
96
|
-
iconSize: {
|
|
97
|
-
type: StringConstructor;
|
|
98
|
-
default: string;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* The variant prop gives you easy access to several different button styles..
|
|
102
|
-
*
|
|
103
|
-
* @see {@link https://next.vuetifyjs.com/en/components/buttons/#variant}
|
|
104
|
-
*/
|
|
105
|
-
variant: {
|
|
106
|
-
type: PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
107
|
-
default: undefined;
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Removes the ability to click or target the component.
|
|
111
|
-
*
|
|
112
|
-
* @see {@link https://vuetifyjs.com/en/api/v-btn/#props-disabled}
|
|
113
|
-
*/
|
|
114
|
-
disabled: {
|
|
115
|
-
type: BooleanConstructor;
|
|
116
|
-
default: undefined;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Applies a large border radius on the button.
|
|
120
|
-
*
|
|
121
|
-
* @see {@link https://next.vuetifyjs.com/en/components/buttons/#rounded}
|
|
122
|
-
*/
|
|
123
|
-
rounded: {
|
|
124
|
-
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
125
|
-
default: undefined;
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Applies border styles to component.
|
|
129
|
-
*
|
|
130
|
-
* @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-border}
|
|
131
|
-
*/
|
|
132
|
-
border: {
|
|
133
|
-
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
134
|
-
default: boolean;
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* Designates an elevation applied to the component between 0 and 24.
|
|
138
|
-
*
|
|
139
|
-
* @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-elevation}
|
|
140
|
-
*/
|
|
141
|
-
elevation: {
|
|
142
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
143
|
-
default: undefined;
|
|
144
|
-
};
|
|
145
|
-
}>> & {
|
|
146
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
147
|
-
}, {
|
|
148
|
-
modelValue: string;
|
|
149
|
-
swatches: string[] | string[][];
|
|
150
|
-
size: string;
|
|
151
|
-
icon: string;
|
|
152
|
-
iconSize: string;
|
|
153
|
-
variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
|
|
154
|
-
disabled: boolean;
|
|
155
|
-
rounded: string | number | boolean;
|
|
156
|
-
border: string | number | boolean;
|
|
157
|
-
elevation: string | number;
|
|
158
|
-
}>;
|
|
159
|
-
export default _default;
|
|
160
|
-
//# sourceMappingURL=VSwatches.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VSwatches.vue.d.ts","sourceRoot":"","sources":["../../src/components/VSwatches.vue.ts"],"names":[],"mappings":"AACA,uBAAuB;AACvB,OAAO,EAAc,KAAK,QAAQ,EAAY,MAAM,KAAK,CAAC;;IAsGxD,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,kBAAkB;;;;;IAElB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;IAEzB;;;;OAIG;;;;;IAOH;;;;OAIG;;;;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;;;;;IArEH,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,kBAAkB;;;;;IAElB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;IAEzB;;;;OAIG;;;;;IAOH;;;;OAIG;;;;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;AAxKL,wBAwQc"}
|