vuetify-swatches 1.3.5 → 1.3.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Masashi Yoshikawa
3
+ Copyright (c) 2022-2023 Masashi Yoshikawa
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ![demo](https://user-images.githubusercontent.com/480173/156681882-d3d5e868-ba9a-4a34-9e75-08272d39da64.gif)
11
11
 
12
- This branch is for vuetify3. Not usable for production, experimental use only.
12
+ This is for Vuetify3. Please use 1.0.x when using with Vuetify2.
13
13
 
14
14
  This project is a remake of [saintplay's vue-swatches](https://saintplay.github.io/vue-swatches/) with [Vuetify](https://vuetifyjs.com/).
15
15
 
@@ -134,4 +134,4 @@ Most props other than size and placement are the same as [v-btn](https://next.vu
134
134
 
135
135
  ## LICENSE
136
136
 
137
- [MIT](LICENSE)
137
+ ©2022-2023 by Logue. Licensed under the [MIT License](LICENSE).
package/dist/index.es.js CHANGED
@@ -3,19 +3,21 @@
3
3
  *
4
4
  * @description Color Swatch component for Vuetify3.
5
5
  * @author Logue <logue@hotmail.co.jp>
6
- * @copyright 2022 By Masashi Yoshikawa All rights reserved.
6
+ * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.3.5
8
+ * @version 1.3.8
9
9
  * @see {@link https://github.com/logue/vuetify-swatches}
10
10
  */
11
11
 
12
12
  import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, unref, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
13
13
  import colors from 'vuetify/lib/util/colors.mjs';
14
14
 
15
- const _sfc_main = /* @__PURE__ */ defineComponent({
15
+ var _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  __name: "VSwatches",
17
17
  props: {
18
+ /** Model value */
18
19
  modelValue: { type: String, default: colors.shades.white },
20
+ /** Swatch colors */
19
21
  swatches: {
20
22
  type: Array,
21
23
  default: () => [
@@ -43,16 +45,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
45
  [colors.brown.base, colors.blueGrey.base, colors.grey.base]
44
46
  ]
45
47
  },
48
+ /** Swatch size */
46
49
  size: { type: String, default: "2rem" },
50
+ /** Selected icon */
47
51
  icon: { type: String, default: "mdi-checkbox-marked-circle" },
52
+ /** selected icon size */
48
53
  iconSize: { type: String, default: "1rem" },
54
+ /**
55
+ * The variant prop gives you easy access to several different button styles..
56
+ *
57
+ * @see {@link https://next.vuetifyjs.com/en/components/buttons/#variant}
58
+ */
49
59
  variant: {
50
60
  type: String,
51
61
  default: void 0
52
62
  },
63
+ /**
64
+ * Removes the ability to click or target the component.
65
+ *
66
+ * @see {@link https://vuetifyjs.com/en/api/v-btn/#props-disabled}
67
+ */
53
68
  disabled: { type: Boolean, default: void 0 },
69
+ /**
70
+ * Applies a large border radius on the button.
71
+ *
72
+ * @see {@link https://next.vuetifyjs.com/en/components/buttons/#rounded}
73
+ */
54
74
  rounded: { type: [String, Number, Boolean], default: void 0 },
75
+ /**
76
+ * Applies border styles to component.
77
+ *
78
+ * @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-border}
79
+ */
55
80
  border: { type: [String, Number, Boolean], default: false },
81
+ /**
82
+ * Designates an elevation applied to the component between 0 and 24.
83
+ *
84
+ * @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-elevation}
85
+ */
56
86
  elevation: { type: [String, Number], default: void 0 }
57
87
  },
58
88
  emits: ["update:modelValue"],
@@ -111,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
141
  }
112
142
  });
113
143
 
114
- const VSwatches_vue_vue_type_style_index_0_lang = '';
144
+ var VSwatches_vue_vue_type_style_index_0_lang = '';
115
145
 
116
146
  const installVSwatches = (app) => app.component("VSwatches", _sfc_main);
117
147
  if (typeof window !== "undefined" && window.Vue) {
@@ -3,63 +3,97 @@
3
3
  *
4
4
  * @description Color Swatch component for Vuetify3.
5
5
  * @author Logue <logue@hotmail.co.jp>
6
- * @copyright 2022 By Masashi Yoshikawa All rights reserved.
6
+ * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.3.5
8
+ * @version 1.3.8
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 _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
+
17
+ var colors__default = /*#__PURE__*/_interopDefaultCompat(colors);
18
+
19
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
20
  __name: "VSwatches",
17
21
  props: {
18
- modelValue: { type: String, default: colors.shades.white },
22
+ /** Model value */
23
+ modelValue: { type: String, default: colors__default["default"].shades.white },
24
+ /** Swatch colors */
19
25
  swatches: {
20
26
  type: Array,
21
27
  default: () => [
22
- [colors.shades.black, colors.shades.white, colors.shades.transparent],
28
+ [colors__default["default"].shades.black, colors__default["default"].shades.white, colors__default["default"].shades.transparent],
23
29
  [
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
30
+ colors__default["default"].red.base,
31
+ colors__default["default"].pink.base,
32
+ colors__default["default"].purple.base,
33
+ colors__default["default"].deepPurple.base,
34
+ colors__default["default"].indigo.base,
35
+ colors__default["default"].blue.base,
36
+ colors__default["default"].lightBlue.base,
37
+ colors__default["default"].cyan.base
32
38
  ],
33
39
  [
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
40
+ colors__default["default"].teal.base,
41
+ colors__default["default"].green.base,
42
+ colors__default["default"].lightGreen.base,
43
+ colors__default["default"].lime.base,
44
+ colors__default["default"].yellow.base,
45
+ colors__default["default"].amber.base,
46
+ colors__default["default"].orange.base,
47
+ colors__default["default"].deepOrange.base
42
48
  ],
43
- [colors.brown.base, colors.blueGrey.base, colors.grey.base]
49
+ [colors__default["default"].brown.base, colors__default["default"].blueGrey.base, colors__default["default"].grey.base]
44
50
  ]
45
51
  },
52
+ /** Swatch size */
46
53
  size: { type: String, default: "2rem" },
54
+ /** Selected icon */
47
55
  icon: { type: String, default: "mdi-checkbox-marked-circle" },
56
+ /** selected icon size */
48
57
  iconSize: { type: String, default: "1rem" },
58
+ /**
59
+ * The variant prop gives you easy access to several different button styles..
60
+ *
61
+ * @see {@link https://next.vuetifyjs.com/en/components/buttons/#variant}
62
+ */
49
63
  variant: {
50
64
  type: String,
51
65
  default: void 0
52
66
  },
67
+ /**
68
+ * Removes the ability to click or target the component.
69
+ *
70
+ * @see {@link https://vuetifyjs.com/en/api/v-btn/#props-disabled}
71
+ */
53
72
  disabled: { type: Boolean, default: void 0 },
73
+ /**
74
+ * Applies a large border radius on the button.
75
+ *
76
+ * @see {@link https://next.vuetifyjs.com/en/components/buttons/#rounded}
77
+ */
54
78
  rounded: { type: [String, Number, Boolean], default: void 0 },
79
+ /**
80
+ * Applies border styles to component.
81
+ *
82
+ * @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-border}
83
+ */
55
84
  border: { type: [String, Number, Boolean], default: false },
85
+ /**
86
+ * Designates an elevation applied to the component between 0 and 24.
87
+ *
88
+ * @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-elevation}
89
+ */
56
90
  elevation: { type: [String, Number], default: void 0 }
57
91
  },
58
92
  emits: ["update:modelValue"],
59
93
  setup(__props, { emit: emits }) {
60
94
  const props = __props;
61
- const selected = vue.ref(props.modelValue || colors.shades.white);
62
- const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors.shades.white;
95
+ const selected = vue.ref(props.modelValue || colors__default["default"].shades.white);
96
+ const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors__default["default"].shades.white;
63
97
  vue.watch(
64
98
  () => selected.value,
65
99
  (s) => emits("update:modelValue", s)
@@ -76,7 +110,7 @@ var VSwatches = (function (exports, vue, colors) {
76
110
  return vue.openBlock(), vue.createBlock(_component_v_btn, {
77
111
  key: color,
78
112
  border: props.border,
79
- class: vue.normalizeClass(color === vue.unref(colors).shades.transparent ? "bg-trasparent" : ""),
113
+ class: vue.normalizeClass(color === vue.unref(colors__default["default"]).shades.transparent ? "bg-trasparent" : ""),
80
114
  color,
81
115
  disabled: props.disabled,
82
116
  elevation: props.elevation,
@@ -91,7 +125,7 @@ var VSwatches = (function (exports, vue, colors) {
91
125
  color === __props.modelValue ? (vue.openBlock(), vue.createBlock(_component_v_icon, {
92
126
  key: 0,
93
127
  size: __props.iconSize,
94
- color: color !== vue.unref(colors).shades.transparent ? color : void 0
128
+ color: color !== vue.unref(colors__default["default"]).shades.transparent ? color : void 0
95
129
  }, {
96
130
  default: vue.withCtx(() => [
97
131
  vue.createTextVNode(vue.toDisplayString(props.icon), 1)
@@ -111,17 +145,17 @@ var VSwatches = (function (exports, vue, colors) {
111
145
  }
112
146
  });
113
147
 
114
- const VSwatches_vue_vue_type_style_index_0_lang = '';
148
+ var VSwatches_vue_vue_type_style_index_0_lang = '';
115
149
 
116
150
  const installVSwatches = (app) => app.component("VSwatches", _sfc_main);
117
151
  if (typeof window !== "undefined" && window.Vue) {
118
152
  window.Vue.use(_sfc_main);
119
153
  }
120
154
 
121
- exports.default = _sfc_main;
155
+ exports["default"] = _sfc_main;
122
156
  exports.install = installVSwatches;
123
157
 
124
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
158
+ Object.defineProperty(exports, '__esModule', { value: true });
125
159
 
126
160
  return exports;
127
161
 
package/dist/index.umd.js CHANGED
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * @description Color Swatch component for Vuetify3.
5
5
  * @author Logue <logue@hotmail.co.jp>
6
- * @copyright 2022 By Masashi Yoshikawa All rights reserved.
6
+ * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.3.5
8
+ * @version 1.3.8
9
9
  * @see {@link https://github.com/logue/vuetify-swatches}
10
10
  */
11
11
 
@@ -15,54 +15,88 @@
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 _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
+
20
+ var colors__default = /*#__PURE__*/_interopDefaultCompat(colors);
21
+
22
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
19
23
  __name: "VSwatches",
20
24
  props: {
21
- modelValue: { type: String, default: colors.shades.white },
25
+ /** Model value */
26
+ modelValue: { type: String, default: colors__default["default"].shades.white },
27
+ /** Swatch colors */
22
28
  swatches: {
23
29
  type: Array,
24
30
  default: () => [
25
- [colors.shades.black, colors.shades.white, colors.shades.transparent],
31
+ [colors__default["default"].shades.black, colors__default["default"].shades.white, colors__default["default"].shades.transparent],
26
32
  [
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
33
+ colors__default["default"].red.base,
34
+ colors__default["default"].pink.base,
35
+ colors__default["default"].purple.base,
36
+ colors__default["default"].deepPurple.base,
37
+ colors__default["default"].indigo.base,
38
+ colors__default["default"].blue.base,
39
+ colors__default["default"].lightBlue.base,
40
+ colors__default["default"].cyan.base
35
41
  ],
36
42
  [
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
43
+ colors__default["default"].teal.base,
44
+ colors__default["default"].green.base,
45
+ colors__default["default"].lightGreen.base,
46
+ colors__default["default"].lime.base,
47
+ colors__default["default"].yellow.base,
48
+ colors__default["default"].amber.base,
49
+ colors__default["default"].orange.base,
50
+ colors__default["default"].deepOrange.base
45
51
  ],
46
- [colors.brown.base, colors.blueGrey.base, colors.grey.base]
52
+ [colors__default["default"].brown.base, colors__default["default"].blueGrey.base, colors__default["default"].grey.base]
47
53
  ]
48
54
  },
55
+ /** Swatch size */
49
56
  size: { type: String, default: "2rem" },
57
+ /** Selected icon */
50
58
  icon: { type: String, default: "mdi-checkbox-marked-circle" },
59
+ /** selected icon size */
51
60
  iconSize: { type: String, default: "1rem" },
61
+ /**
62
+ * The variant prop gives you easy access to several different button styles..
63
+ *
64
+ * @see {@link https://next.vuetifyjs.com/en/components/buttons/#variant}
65
+ */
52
66
  variant: {
53
67
  type: String,
54
68
  default: void 0
55
69
  },
70
+ /**
71
+ * Removes the ability to click or target the component.
72
+ *
73
+ * @see {@link https://vuetifyjs.com/en/api/v-btn/#props-disabled}
74
+ */
56
75
  disabled: { type: Boolean, default: void 0 },
76
+ /**
77
+ * Applies a large border radius on the button.
78
+ *
79
+ * @see {@link https://next.vuetifyjs.com/en/components/buttons/#rounded}
80
+ */
57
81
  rounded: { type: [String, Number, Boolean], default: void 0 },
82
+ /**
83
+ * Applies border styles to component.
84
+ *
85
+ * @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-border}
86
+ */
58
87
  border: { type: [String, Number, Boolean], default: false },
88
+ /**
89
+ * Designates an elevation applied to the component between 0 and 24.
90
+ *
91
+ * @see {@link https://next.vuetifyjs.com/en/api/v-btn/#props-elevation}
92
+ */
59
93
  elevation: { type: [String, Number], default: void 0 }
60
94
  },
61
95
  emits: ["update:modelValue"],
62
96
  setup(__props, { emit: emits }) {
63
97
  const props = __props;
64
- const selected = vue.ref(props.modelValue || colors.shades.white);
65
- const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors.shades.white;
98
+ const selected = vue.ref(props.modelValue || colors__default["default"].shades.white);
99
+ const onSwatchClick = (e) => selected.value = e.target.dataset.value || colors__default["default"].shades.white;
66
100
  vue.watch(
67
101
  () => selected.value,
68
102
  (s) => emits("update:modelValue", s)
@@ -79,7 +113,7 @@
79
113
  return vue.openBlock(), vue.createBlock(_component_v_btn, {
80
114
  key: color,
81
115
  border: props.border,
82
- class: vue.normalizeClass(color === vue.unref(colors).shades.transparent ? "bg-trasparent" : ""),
116
+ class: vue.normalizeClass(color === vue.unref(colors__default["default"]).shades.transparent ? "bg-trasparent" : ""),
83
117
  color,
84
118
  disabled: props.disabled,
85
119
  elevation: props.elevation,
@@ -94,7 +128,7 @@
94
128
  color === __props.modelValue ? (vue.openBlock(), vue.createBlock(_component_v_icon, {
95
129
  key: 0,
96
130
  size: __props.iconSize,
97
- color: color !== vue.unref(colors).shades.transparent ? color : void 0
131
+ color: color !== vue.unref(colors__default["default"]).shades.transparent ? color : void 0
98
132
  }, {
99
133
  default: vue.withCtx(() => [
100
134
  vue.createTextVNode(vue.toDisplayString(props.icon), 1)
@@ -114,16 +148,16 @@
114
148
  }
115
149
  });
116
150
 
117
- const VSwatches_vue_vue_type_style_index_0_lang = '';
151
+ var VSwatches_vue_vue_type_style_index_0_lang = '';
118
152
 
119
153
  const installVSwatches = (app) => app.component("VSwatches", _sfc_main);
120
154
  if (typeof window !== "undefined" && window.Vue) {
121
155
  window.Vue.use(_sfc_main);
122
156
  }
123
157
 
124
- exports.default = _sfc_main;
158
+ exports["default"] = _sfc_main;
125
159
  exports.install = installVSwatches;
126
160
 
127
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
161
+ Object.defineProperty(exports, '__esModule', { value: true });
128
162
 
129
163
  }));
@@ -0,0 +1,159 @@
1
+ import { type PropType } from 'vue';
2
+ /** Emits */
3
+ declare const _sfc_main: 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 _sfc_main;
@@ -1,4 +1,3 @@
1
- import VSwatches from '@/components/VSwatches.vue';
2
- declare const installVSwatches: (app: any) => any;
3
- export { VSwatches as default, installVSwatches as install };
4
- //# sourceMappingURL=index.d.ts.map
1
+ import VSwatches from './components/VSwatches.vue';
2
+ declare const installVSwatches: (app: any) => any;
3
+ export { VSwatches as default, installVSwatches as install };
package/dist/style.css CHANGED
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * @description Color Swatch component for Vuetify3.
5
5
  * @author Logue <logue@hotmail.co.jp>
6
- * @copyright 2022 By Masashi Yoshikawa All rights reserved.
6
+ * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.3.5
8
+ * @version 1.3.8
9
9
  * @see {@link https://github.com/logue/vuetify-swatches}
10
10
  */
11
11
 
@@ -17,7 +17,7 @@
17
17
  filter: invert(100%) grayscale(100%) contrast(100);
18
18
  }
19
19
  .v-swatches div .v-btn.bg-trasparent {
20
- background: linear-gradient(to top left, transparent 0, transparent calc(50% - 0.1rem), #F44336 50%, transparent calc(50% + 0.1rem), transparent);
20
+ background: linear-gradient(to top left, transparent 0, transparent calc(50% - 0.1rem), rgb(var(--v-theme-error)) 50%, transparent calc(50% + 0.1rem), transparent);
21
21
  }
22
22
  .v-swatches div .v-btn.bg-trasparent .v-icon {
23
23
  filter: none;
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.5",
4
+ "version": "1.3.8",
5
5
  "description": "Color Swatch component for Vuetify3.",
6
6
  "keywords": [
7
7
  "vuejs",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "main": "dist/index.umd.js",
36
36
  "module": "dist/index.es.js",
37
- "types": "dist/index.d.ts",
37
+ "types": "dist/src/index.d.ts",
38
38
  "style": "dist/style.css",
39
39
  "browser": {
40
40
  "./sfc": "./src/components/VSwatches.vue"
@@ -43,7 +43,7 @@
43
43
  ".": {
44
44
  "import": "./dist/index.es.js",
45
45
  "require": "./dist/index.umd.js",
46
- "types": "./dist/index.d.ts"
46
+ "types": "./dist/src/index.d.ts"
47
47
  },
48
48
  "./dist/style.css": {
49
49
  "import": "./dist/style.css",
@@ -55,73 +55,68 @@
55
55
  "src/components/VSwatches.vue"
56
56
  ],
57
57
  "engines": {
58
- "node": ">=18.12.1",
58
+ "node": ">=18.15.0",
59
59
  "yarn": ">=1.22.19"
60
60
  },
61
- "packageManager": "yarn@3.3.1",
61
+ "packageManager": "yarn@3.4.1",
62
62
  "sideEffects": false,
63
63
  "scripts": {
64
64
  "dev": "vite",
65
65
  "clean": "rimraf node_modules/.vite",
66
66
  "type-check": "tsc --noEmit --composite false",
67
- "build": "run-p type-check build-only build-declaration",
68
- "build:clean": "rimraf dist",
69
- "build:docs": "vite build --config vite.config.docs.ts",
67
+ "build": "run-p type-check build-only",
68
+ "build:analyze": "vite build --mode=analyze",
69
+ "build:clean": "rimraf dist docs",
70
+ "build:docs": "vite build --mode=docs",
70
71
  "build-only": "vite build",
71
- "build-declaration": "tsc -p tsconfig.app.json --composite false --declaration --declarationMap --declarationDir dist",
72
72
  "lint": "eslint . --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint && prettier . --write",
73
+ "preview": "vite preview --mode=docs",
73
74
  "prepare": "husky install",
74
75
  "version": "auto-changelog -p && git add CHANGELOG.md"
75
76
  },
76
77
  "peerDependencies": {
77
- "vue": "^3.2.45",
78
- "vuetify": "^3.0.6"
78
+ "vue": "^3.2.47",
79
+ "vuetify": "^3.1.5"
79
80
  },
80
81
  "devDependencies": {
81
- "@codemirror/lang-html": "^6.4.0",
82
- "@types/node": "^18.11.18",
83
- "@typescript-eslint/eslint-plugin": "^5.47.1",
84
- "@typescript-eslint/parser": "^5.47.1",
82
+ "@codemirror/lang-vue": "^0.1.1",
83
+ "@types/node": "^18.15.0",
84
+ "@typescript-eslint/eslint-plugin": "^5.54.1",
85
+ "@typescript-eslint/parser": "^5.54.1",
85
86
  "@vitejs/plugin-vue": "^4.0.0",
86
- "@vue/eslint-config-prettier": "^7.0.0",
87
+ "@vue/eslint-config-prettier": "^7.1.0",
87
88
  "@vue/tsconfig": "^0.1.3",
88
- "codemirror": "^6.0.1",
89
- "eslint": "^8.30.0",
89
+ "eslint": "^8.35.0",
90
90
  "eslint-config-google": "^0.14.0",
91
- "eslint-config-prettier": "^8.5.0",
91
+ "eslint-config-prettier": "^8.7.0",
92
92
  "eslint-import-resolver-alias": "^1.1.2",
93
- "eslint-import-resolver-typescript": "^3.5.2",
94
- "eslint-plugin-import": "^2.26.0",
95
- "eslint-plugin-jsdoc": "^39.6.4",
93
+ "eslint-import-resolver-typescript": "^3.5.3",
94
+ "eslint-plugin-import": "^2.27.5",
95
+ "eslint-plugin-jsdoc": "^40.0.1",
96
+ "eslint-plugin-prettier": "^4.2.1",
96
97
  "eslint-plugin-tsdoc": "^0.2.17",
97
- "eslint-plugin-vue": "^9.8.0",
98
- "eslint-plugin-vuejs-accessibility": "^2.0.0",
98
+ "eslint-plugin-vue": "^9.9.0",
99
+ "eslint-plugin-vuejs-accessibility": "^2.1.0",
99
100
  "eslint-plugin-vuetify": "^2.0.0-beta.2",
100
101
  "eslint-plugin-yaml": "^0.5.0",
101
- "husky": "^8.0.2",
102
- "lint-staged": "^13.1.0",
102
+ "husky": "^8.0.3",
103
+ "lint-staged": "^13.2.0",
103
104
  "npm-run-all": "^4.1.5",
104
- "postcss-html": "^1.5.0",
105
- "prettier": "^2.8.1",
106
- "rimraf": "^3.0.2",
107
- "rollup-plugin-visualizer": "^5.8.3",
108
- "sass": "1.57.1",
109
- "stylelint": "^14.16.1",
110
- "stylelint-config-prettier": "^9.0.4",
111
- "stylelint-config-recommended-scss": "^8.0.0",
112
- "stylelint-config-recommended-vue": "^1.4.0",
113
- "stylelint-order": "^5.0.0",
114
- "stylelint-prettier": "^2.0.0",
115
- "typescript": "^4.9.4",
116
- "vite": "^4.0.3",
105
+ "prettier": "^2.8.4",
106
+ "rimraf": "^4.4.0",
107
+ "rollup-plugin-visualizer": "^5.9.0",
108
+ "sass": "^1.58.3",
109
+ "typescript": "^4.9.5",
110
+ "vite": "^4.1.4",
117
111
  "vite-plugin-banner": "^0.7.0",
118
- "vite-plugin-checker": "^0.5.3",
119
- "vite-plugin-vuetify": "^1.0.1",
120
- "vue": "^3.2.45",
121
- "vue-codemirror6": "1.1.2",
112
+ "vite-plugin-checker": "^0.5.6",
113
+ "vite-plugin-dts": "^2.1.0",
114
+ "vite-plugin-vuetify": "^1.0.2",
115
+ "vue": "^3.2.47",
116
+ "vue-codemirror6": "^1.1.12",
122
117
  "vue-eslint-parser": "^9.1.0",
123
- "vue-tsc": "^1.0.18",
124
- "vuetify": "^3.0.4"
118
+ "vue-tsc": "^1.2.0",
119
+ "vuetify": "^3.1.8"
125
120
  },
126
121
  "husky": {
127
122
  "hooks": {
@@ -134,6 +129,7 @@
134
129
  "*": "prettier -w -u"
135
130
  },
136
131
  "resolutions": {
137
- "prettier": "^2.8.1"
132
+ "json5": "^2.2.3",
133
+ "http-cache-semantics": "^4.1.1"
138
134
  }
139
135
  }
@@ -132,8 +132,6 @@ watch(
132
132
  </template>
133
133
 
134
134
  <style lang="scss">
135
- @import '~/vuetify/lib/styles/settings';
136
-
137
135
  .v-swatches {
138
136
  div {
139
137
  .v-btn {
@@ -149,7 +147,7 @@ watch(
149
147
  to top left,
150
148
  transparent 0,
151
149
  transparent calc(50% - 0.1rem),
152
- map-get($red, 'base') 50%,
150
+ rgb(var(--v-theme-error)) 50%,
153
151
  transparent calc(50% + 0.1rem),
154
152
  transparent
155
153
  );
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4BAA4B,CAAC;AAEnD,QAAA,MAAM,gBAAgB,QAAS,GAAG,QAA0C,CAAC;AAE7E,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,CAAC"}