vuetify-swatches 0.0.6 → 0.3.0

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/README.md CHANGED
@@ -125,6 +125,7 @@ export default Vue.extend({
125
125
 
126
126
  | Variables | Type | Default | Info |
127
127
  | --------- | ------ | -------------------------- | ------------------ |
128
+ | elevation | number | 1 | shadow size |
128
129
  | size | string | 2rem | Swatch Button size |
129
130
  | icon | string | mdi-checkbox-marked-circle | checked icon |
130
131
  | icon-size | string | 1rem | checked icon size |
@@ -0,0 +1,77 @@
1
+ import { type PropType, type Ref } from 'vue';
2
+ /** Vuetify Swatches */
3
+ declare const _default: import("vue").DefineComponent<{
4
+ /** Model value */
5
+ modelValue: {
6
+ type: StringConstructor;
7
+ required: true;
8
+ };
9
+ /** Swatch colors */
10
+ swatches: {
11
+ type: PropType<string[] | string[][]>;
12
+ default: () => any[][];
13
+ };
14
+ /** The size of the shadow of the button */
15
+ elevation: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ /** Swatch sized */
20
+ size: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ /** selected icon */
25
+ icon: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ /** selected icon size */
30
+ iconSize: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ }, {
35
+ checkedVisibilty: Ref<boolean>;
36
+ selected: Ref<string>;
37
+ onSwatchClick: (value: string) => void;
38
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").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: () => any[][];
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
+ }>>, {
70
+ swatches: string[] | string[][];
71
+ elevation: number;
72
+ size: string;
73
+ icon: string;
74
+ iconSize: string;
75
+ }>;
76
+ export default _default;
77
+ //# sourceMappingURL=VSwatches.vue.d.ts.map
@@ -0,0 +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,KAAK,CAAC;AAKb,uBAAuB;;IAUnB,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,2CAA2C;;;;;IAE3C,mBAAmB;;;;;IAEnB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;;;;2BAsBK,MAAM;;IA1DpC,kBAAkB;;;;;IAElB,oBAAoB;;;;;IA4BpB,2CAA2C;;;;;IAE3C,mBAAmB;;;;;IAEnB,oBAAoB;;;;;IAEpB,yBAAyB;;;;;;;;;;;;AA7C7B,wBAiFG"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Vuetify3 Swatches Component
3
+ *
4
+ * @license MIT
5
+ * @author Logue {@link logue@hotmail.co.jp}
6
+ * @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
7
+ * @see {@link https://github.com/logue/vuetify-swatches}
8
+ */
9
+ import VSwatches from './components/VSwatches.vue';
10
+ declare const installVSwatches: (app: any) => any;
11
+ export { VSwatches as default, installVSwatches as install };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,436 @@
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ const red = Object.freeze({
3
+ base: "#f44336",
4
+ lighten5: "#ffebee",
5
+ lighten4: "#ffcdd2",
6
+ lighten3: "#ef9a9a",
7
+ lighten2: "#e57373",
8
+ lighten1: "#ef5350",
9
+ darken1: "#e53935",
10
+ darken2: "#d32f2f",
11
+ darken3: "#c62828",
12
+ darken4: "#b71c1c",
13
+ accent1: "#ff8a80",
14
+ accent2: "#ff5252",
15
+ accent3: "#ff1744",
16
+ accent4: "#d50000"
17
+ });
18
+ const pink = Object.freeze({
19
+ base: "#e91e63",
20
+ lighten5: "#fce4ec",
21
+ lighten4: "#f8bbd0",
22
+ lighten3: "#f48fb1",
23
+ lighten2: "#f06292",
24
+ lighten1: "#ec407a",
25
+ darken1: "#d81b60",
26
+ darken2: "#c2185b",
27
+ darken3: "#ad1457",
28
+ darken4: "#880e4f",
29
+ accent1: "#ff80ab",
30
+ accent2: "#ff4081",
31
+ accent3: "#f50057",
32
+ accent4: "#c51162"
33
+ });
34
+ const purple = Object.freeze({
35
+ base: "#9c27b0",
36
+ lighten5: "#f3e5f5",
37
+ lighten4: "#e1bee7",
38
+ lighten3: "#ce93d8",
39
+ lighten2: "#ba68c8",
40
+ lighten1: "#ab47bc",
41
+ darken1: "#8e24aa",
42
+ darken2: "#7b1fa2",
43
+ darken3: "#6a1b9a",
44
+ darken4: "#4a148c",
45
+ accent1: "#ea80fc",
46
+ accent2: "#e040fb",
47
+ accent3: "#d500f9",
48
+ accent4: "#aa00ff"
49
+ });
50
+ const deepPurple = Object.freeze({
51
+ base: "#673ab7",
52
+ lighten5: "#ede7f6",
53
+ lighten4: "#d1c4e9",
54
+ lighten3: "#b39ddb",
55
+ lighten2: "#9575cd",
56
+ lighten1: "#7e57c2",
57
+ darken1: "#5e35b1",
58
+ darken2: "#512da8",
59
+ darken3: "#4527a0",
60
+ darken4: "#311b92",
61
+ accent1: "#b388ff",
62
+ accent2: "#7c4dff",
63
+ accent3: "#651fff",
64
+ accent4: "#6200ea"
65
+ });
66
+ const indigo = Object.freeze({
67
+ base: "#3f51b5",
68
+ lighten5: "#e8eaf6",
69
+ lighten4: "#c5cae9",
70
+ lighten3: "#9fa8da",
71
+ lighten2: "#7986cb",
72
+ lighten1: "#5c6bc0",
73
+ darken1: "#3949ab",
74
+ darken2: "#303f9f",
75
+ darken3: "#283593",
76
+ darken4: "#1a237e",
77
+ accent1: "#8c9eff",
78
+ accent2: "#536dfe",
79
+ accent3: "#3d5afe",
80
+ accent4: "#304ffe"
81
+ });
82
+ const blue = Object.freeze({
83
+ base: "#2196f3",
84
+ lighten5: "#e3f2fd",
85
+ lighten4: "#bbdefb",
86
+ lighten3: "#90caf9",
87
+ lighten2: "#64b5f6",
88
+ lighten1: "#42a5f5",
89
+ darken1: "#1e88e5",
90
+ darken2: "#1976d2",
91
+ darken3: "#1565c0",
92
+ darken4: "#0d47a1",
93
+ accent1: "#82b1ff",
94
+ accent2: "#448aff",
95
+ accent3: "#2979ff",
96
+ accent4: "#2962ff"
97
+ });
98
+ const lightBlue = Object.freeze({
99
+ base: "#03a9f4",
100
+ lighten5: "#e1f5fe",
101
+ lighten4: "#b3e5fc",
102
+ lighten3: "#81d4fa",
103
+ lighten2: "#4fc3f7",
104
+ lighten1: "#29b6f6",
105
+ darken1: "#039be5",
106
+ darken2: "#0288d1",
107
+ darken3: "#0277bd",
108
+ darken4: "#01579b",
109
+ accent1: "#80d8ff",
110
+ accent2: "#40c4ff",
111
+ accent3: "#00b0ff",
112
+ accent4: "#0091ea"
113
+ });
114
+ const cyan = Object.freeze({
115
+ base: "#00bcd4",
116
+ lighten5: "#e0f7fa",
117
+ lighten4: "#b2ebf2",
118
+ lighten3: "#80deea",
119
+ lighten2: "#4dd0e1",
120
+ lighten1: "#26c6da",
121
+ darken1: "#00acc1",
122
+ darken2: "#0097a7",
123
+ darken3: "#00838f",
124
+ darken4: "#006064",
125
+ accent1: "#84ffff",
126
+ accent2: "#18ffff",
127
+ accent3: "#00e5ff",
128
+ accent4: "#00b8d4"
129
+ });
130
+ const teal = Object.freeze({
131
+ base: "#009688",
132
+ lighten5: "#e0f2f1",
133
+ lighten4: "#b2dfdb",
134
+ lighten3: "#80cbc4",
135
+ lighten2: "#4db6ac",
136
+ lighten1: "#26a69a",
137
+ darken1: "#00897b",
138
+ darken2: "#00796b",
139
+ darken3: "#00695c",
140
+ darken4: "#004d40",
141
+ accent1: "#a7ffeb",
142
+ accent2: "#64ffda",
143
+ accent3: "#1de9b6",
144
+ accent4: "#00bfa5"
145
+ });
146
+ const green = Object.freeze({
147
+ base: "#4caf50",
148
+ lighten5: "#e8f5e9",
149
+ lighten4: "#c8e6c9",
150
+ lighten3: "#a5d6a7",
151
+ lighten2: "#81c784",
152
+ lighten1: "#66bb6a",
153
+ darken1: "#43a047",
154
+ darken2: "#388e3c",
155
+ darken3: "#2e7d32",
156
+ darken4: "#1b5e20",
157
+ accent1: "#b9f6ca",
158
+ accent2: "#69f0ae",
159
+ accent3: "#00e676",
160
+ accent4: "#00c853"
161
+ });
162
+ const lightGreen = Object.freeze({
163
+ base: "#8bc34a",
164
+ lighten5: "#f1f8e9",
165
+ lighten4: "#dcedc8",
166
+ lighten3: "#c5e1a5",
167
+ lighten2: "#aed581",
168
+ lighten1: "#9ccc65",
169
+ darken1: "#7cb342",
170
+ darken2: "#689f38",
171
+ darken3: "#558b2f",
172
+ darken4: "#33691e",
173
+ accent1: "#ccff90",
174
+ accent2: "#b2ff59",
175
+ accent3: "#76ff03",
176
+ accent4: "#64dd17"
177
+ });
178
+ const lime = Object.freeze({
179
+ base: "#cddc39",
180
+ lighten5: "#f9fbe7",
181
+ lighten4: "#f0f4c3",
182
+ lighten3: "#e6ee9c",
183
+ lighten2: "#dce775",
184
+ lighten1: "#d4e157",
185
+ darken1: "#c0ca33",
186
+ darken2: "#afb42b",
187
+ darken3: "#9e9d24",
188
+ darken4: "#827717",
189
+ accent1: "#f4ff81",
190
+ accent2: "#eeff41",
191
+ accent3: "#c6ff00",
192
+ accent4: "#aeea00"
193
+ });
194
+ const yellow = Object.freeze({
195
+ base: "#ffeb3b",
196
+ lighten5: "#fffde7",
197
+ lighten4: "#fff9c4",
198
+ lighten3: "#fff59d",
199
+ lighten2: "#fff176",
200
+ lighten1: "#ffee58",
201
+ darken1: "#fdd835",
202
+ darken2: "#fbc02d",
203
+ darken3: "#f9a825",
204
+ darken4: "#f57f17",
205
+ accent1: "#ffff8d",
206
+ accent2: "#ffff00",
207
+ accent3: "#ffea00",
208
+ accent4: "#ffd600"
209
+ });
210
+ const amber = Object.freeze({
211
+ base: "#ffc107",
212
+ lighten5: "#fff8e1",
213
+ lighten4: "#ffecb3",
214
+ lighten3: "#ffe082",
215
+ lighten2: "#ffd54f",
216
+ lighten1: "#ffca28",
217
+ darken1: "#ffb300",
218
+ darken2: "#ffa000",
219
+ darken3: "#ff8f00",
220
+ darken4: "#ff6f00",
221
+ accent1: "#ffe57f",
222
+ accent2: "#ffd740",
223
+ accent3: "#ffc400",
224
+ accent4: "#ffab00"
225
+ });
226
+ const orange = Object.freeze({
227
+ base: "#ff9800",
228
+ lighten5: "#fff3e0",
229
+ lighten4: "#ffe0b2",
230
+ lighten3: "#ffcc80",
231
+ lighten2: "#ffb74d",
232
+ lighten1: "#ffa726",
233
+ darken1: "#fb8c00",
234
+ darken2: "#f57c00",
235
+ darken3: "#ef6c00",
236
+ darken4: "#e65100",
237
+ accent1: "#ffd180",
238
+ accent2: "#ffab40",
239
+ accent3: "#ff9100",
240
+ accent4: "#ff6d00"
241
+ });
242
+ const deepOrange = Object.freeze({
243
+ base: "#ff5722",
244
+ lighten5: "#fbe9e7",
245
+ lighten4: "#ffccbc",
246
+ lighten3: "#ffab91",
247
+ lighten2: "#ff8a65",
248
+ lighten1: "#ff7043",
249
+ darken1: "#f4511e",
250
+ darken2: "#e64a19",
251
+ darken3: "#d84315",
252
+ darken4: "#bf360c",
253
+ accent1: "#ff9e80",
254
+ accent2: "#ff6e40",
255
+ accent3: "#ff3d00",
256
+ accent4: "#dd2c00"
257
+ });
258
+ const brown = Object.freeze({
259
+ base: "#795548",
260
+ lighten5: "#efebe9",
261
+ lighten4: "#d7ccc8",
262
+ lighten3: "#bcaaa4",
263
+ lighten2: "#a1887f",
264
+ lighten1: "#8d6e63",
265
+ darken1: "#6d4c41",
266
+ darken2: "#5d4037",
267
+ darken3: "#4e342e",
268
+ darken4: "#3e2723"
269
+ });
270
+ const blueGrey = Object.freeze({
271
+ base: "#607d8b",
272
+ lighten5: "#eceff1",
273
+ lighten4: "#cfd8dc",
274
+ lighten3: "#b0bec5",
275
+ lighten2: "#90a4ae",
276
+ lighten1: "#78909c",
277
+ darken1: "#546e7a",
278
+ darken2: "#455a64",
279
+ darken3: "#37474f",
280
+ darken4: "#263238"
281
+ });
282
+ const grey = Object.freeze({
283
+ base: "#9e9e9e",
284
+ lighten5: "#fafafa",
285
+ lighten4: "#f5f5f5",
286
+ lighten3: "#eeeeee",
287
+ lighten2: "#e0e0e0",
288
+ lighten1: "#bdbdbd",
289
+ darken1: "#757575",
290
+ darken2: "#616161",
291
+ darken3: "#424242",
292
+ darken4: "#212121"
293
+ });
294
+ const shades = Object.freeze({
295
+ black: "#000000",
296
+ white: "#ffffff",
297
+ transparent: "transparent"
298
+ });
299
+ var colors = Object.freeze({
300
+ red,
301
+ pink,
302
+ purple,
303
+ deepPurple,
304
+ indigo,
305
+ blue,
306
+ lightBlue,
307
+ cyan,
308
+ teal,
309
+ green,
310
+ lightGreen,
311
+ lime,
312
+ yellow,
313
+ amber,
314
+ orange,
315
+ deepOrange,
316
+ brown,
317
+ blueGrey,
318
+ grey,
319
+ shades
320
+ });
321
+ var VSwatches_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".v-swatches .v-btn{padding:0!important;margin:.1rem}.v-swatches .v-btn .v-icon{filter:invert(100%)}\n")();
322
+ var _export_sfc = (sfc, props) => {
323
+ const target = sfc.__vccOpts || sfc;
324
+ for (const [key, val] of props) {
325
+ target[key] = val;
326
+ }
327
+ return target;
328
+ };
329
+ const _sfc_main = defineComponent({
330
+ name: "VSwatches",
331
+ model: {
332
+ prop: "modelValue",
333
+ event: "update:modelValue"
334
+ },
335
+ props: {
336
+ modelValue: { type: String, required: true },
337
+ swatches: {
338
+ type: Array,
339
+ default: () => [
340
+ [colors.shades.black, colors.shades.white],
341
+ [
342
+ colors.red.base,
343
+ colors.pink.base,
344
+ colors.purple.base,
345
+ colors.deepPurple.base,
346
+ colors.indigo.base,
347
+ colors.blue.base,
348
+ colors.lightBlue.base,
349
+ colors.cyan.base
350
+ ],
351
+ [
352
+ colors.teal.base,
353
+ colors.green.base,
354
+ colors.lightGreen.base,
355
+ colors.lime.base,
356
+ colors.yellow.base,
357
+ colors.amber.base,
358
+ colors.orange.base,
359
+ colors.deepOrange.base
360
+ ],
361
+ [colors.brown.base, colors.blueGrey.base, colors.grey.base]
362
+ ]
363
+ },
364
+ elevation: { type: Number, default: 1 },
365
+ size: { type: String, default: "2rem" },
366
+ icon: { type: String, default: "mdi-checkbox-marked-circle" },
367
+ iconSize: { type: String, default: "1rem" }
368
+ },
369
+ emits: ["update:modelValue"],
370
+ setup(props, context) {
371
+ const checkedVisibilty = ref(false);
372
+ const selected = ref(props.modelValue);
373
+ const onSwatchClick = (value) => {
374
+ if (!value || selected.value === value) {
375
+ return;
376
+ }
377
+ selected.value = value;
378
+ context.emit("update:modelValue", value);
379
+ };
380
+ return {
381
+ checkedVisibilty,
382
+ selected,
383
+ onSwatchClick
384
+ };
385
+ }
386
+ });
387
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
388
+ const _component_v_icon = resolveComponent("v-icon");
389
+ const _component_v_btn = resolveComponent("v-btn");
390
+ const _component_v_sheet = resolveComponent("v-sheet");
391
+ return openBlock(), createBlock(_component_v_sheet, { class: "v-swatches" }, {
392
+ default: withCtx(() => [
393
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.swatches, (colors2, rows) => {
394
+ return openBlock(), createElementBlock("div", { key: rows }, [
395
+ (openBlock(true), createElementBlock(Fragment, null, renderList(colors2, (color) => {
396
+ return openBlock(), createBlock(_component_v_btn, {
397
+ key: color,
398
+ elevation: _ctx.elevation,
399
+ width: _ctx.size,
400
+ height: _ctx.size,
401
+ color,
402
+ "min-width": "auto",
403
+ onClick: ($event) => _ctx.onSwatchClick(color)
404
+ }, {
405
+ default: withCtx(() => [
406
+ color === _ctx.selected ? (openBlock(), createBlock(_component_v_icon, {
407
+ key: 0,
408
+ size: _ctx.iconSize,
409
+ color
410
+ }, {
411
+ default: withCtx(() => [
412
+ createTextVNode(toDisplayString(_ctx.icon), 1)
413
+ ]),
414
+ _: 2
415
+ }, 1032, ["size", "color"])) : createCommentVNode("", true)
416
+ ]),
417
+ _: 2
418
+ }, 1032, ["elevation", "width", "height", "color", "onClick"]);
419
+ }), 128))
420
+ ]);
421
+ }), 128))
422
+ ]),
423
+ _: 1
424
+ });
425
+ }
426
+ var VSwatches = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
427
+ /**
428
+ * Vuetify3 Swatches Component
429
+ *
430
+ * @license MIT
431
+ * @author Logue {@link logue@hotmail.co.jp}
432
+ * @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
433
+ * @see {@link https://github.com/logue/vuetify-swatches}
434
+ */
435
+ const installVSwatches = (app) => app.component("VSwatches", VSwatches);
436
+ export { VSwatches as default, installVSwatches as install };
@@ -0,0 +1,9 @@
1
+ (function(a,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis<"u"?globalThis:a||self,e(a.VSwatches={},a.Vue))})(this,function(a,e){"use strict";const h=Object.freeze({base:"#f44336",lighten5:"#ffebee",lighten4:"#ffcdd2",lighten3:"#ef9a9a",lighten2:"#e57373",lighten1:"#ef5350",darken1:"#e53935",darken2:"#d32f2f",darken3:"#c62828",darken4:"#b71c1c",accent1:"#ff8a80",accent2:"#ff5252",accent3:"#ff1744",accent4:"#d50000"}),s=Object.freeze({base:"#e91e63",lighten5:"#fce4ec",lighten4:"#f8bbd0",lighten3:"#f48fb1",lighten2:"#f06292",lighten1:"#ec407a",darken1:"#d81b60",darken2:"#c2185b",darken3:"#ad1457",darken4:"#880e4f",accent1:"#ff80ab",accent2:"#ff4081",accent3:"#f50057",accent4:"#c51162"}),o=Object.freeze({base:"#9c27b0",lighten5:"#f3e5f5",lighten4:"#e1bee7",lighten3:"#ce93d8",lighten2:"#ba68c8",lighten1:"#ab47bc",darken1:"#8e24aa",darken2:"#7b1fa2",darken3:"#6a1b9a",darken4:"#4a148c",accent1:"#ea80fc",accent2:"#e040fb",accent3:"#d500f9",accent4:"#aa00ff"}),g=Object.freeze({base:"#673ab7",lighten5:"#ede7f6",lighten4:"#d1c4e9",lighten3:"#b39ddb",lighten2:"#9575cd",lighten1:"#7e57c2",darken1:"#5e35b1",darken2:"#512da8",darken3:"#4527a0",darken4:"#311b92",accent1:"#b388ff",accent2:"#7c4dff",accent3:"#651fff",accent4:"#6200ea"}),k=Object.freeze({base:"#3f51b5",lighten5:"#e8eaf6",lighten4:"#c5cae9",lighten3:"#9fa8da",lighten2:"#7986cb",lighten1:"#5c6bc0",darken1:"#3949ab",darken2:"#303f9f",darken3:"#283593",darken4:"#1a237e",accent1:"#8c9eff",accent2:"#536dfe",accent3:"#3d5afe",accent4:"#304ffe"}),p=Object.freeze({base:"#2196f3",lighten5:"#e3f2fd",lighten4:"#bbdefb",lighten3:"#90caf9",lighten2:"#64b5f6",lighten1:"#42a5f5",darken1:"#1e88e5",darken2:"#1976d2",darken3:"#1565c0",darken4:"#0d47a1",accent1:"#82b1ff",accent2:"#448aff",accent3:"#2979ff",accent4:"#2962ff"}),m=Object.freeze({base:"#03a9f4",lighten5:"#e1f5fe",lighten4:"#b3e5fc",lighten3:"#81d4fa",lighten2:"#4fc3f7",lighten1:"#29b6f6",darken1:"#039be5",darken2:"#0288d1",darken3:"#0277bd",darken4:"#01579b",accent1:"#80d8ff",accent2:"#40c4ff",accent3:"#00b0ff",accent4:"#0091ea"}),u=Object.freeze({base:"#00bcd4",lighten5:"#e0f7fa",lighten4:"#b2ebf2",lighten3:"#80deea",lighten2:"#4dd0e1",lighten1:"#26c6da",darken1:"#00acc1",darken2:"#0097a7",darken3:"#00838f",darken4:"#006064",accent1:"#84ffff",accent2:"#18ffff",accent3:"#00e5ff",accent4:"#00b8d4"}),z=Object.freeze({base:"#009688",lighten5:"#e0f2f1",lighten4:"#b2dfdb",lighten3:"#80cbc4",lighten2:"#4db6ac",lighten1:"#26a69a",darken1:"#00897b",darken2:"#00796b",darken3:"#00695c",darken4:"#004d40",accent1:"#a7ffeb",accent2:"#64ffda",accent3:"#1de9b6",accent4:"#00bfa5"}),w=Object.freeze({base:"#4caf50",lighten5:"#e8f5e9",lighten4:"#c8e6c9",lighten3:"#a5d6a7",lighten2:"#81c784",lighten1:"#66bb6a",darken1:"#43a047",darken2:"#388e3c",darken3:"#2e7d32",darken4:"#1b5e20",accent1:"#b9f6ca",accent2:"#69f0ae",accent3:"#00e676",accent4:"#00c853"}),y=Object.freeze({base:"#8bc34a",lighten5:"#f1f8e9",lighten4:"#dcedc8",lighten3:"#c5e1a5",lighten2:"#aed581",lighten1:"#9ccc65",darken1:"#7cb342",darken2:"#689f38",darken3:"#558b2f",darken4:"#33691e",accent1:"#ccff90",accent2:"#b2ff59",accent3:"#76ff03",accent4:"#64dd17"}),O=Object.freeze({base:"#cddc39",lighten5:"#f9fbe7",lighten4:"#f0f4c3",lighten3:"#e6ee9c",lighten2:"#dce775",lighten1:"#d4e157",darken1:"#c0ca33",darken2:"#afb42b",darken3:"#9e9d24",darken4:"#827717",accent1:"#f4ff81",accent2:"#eeff41",accent3:"#c6ff00",accent4:"#aeea00"}),j=Object.freeze({base:"#ffeb3b",lighten5:"#fffde7",lighten4:"#fff9c4",lighten3:"#fff59d",lighten2:"#fff176",lighten1:"#ffee58",darken1:"#fdd835",darken2:"#fbc02d",darken3:"#f9a825",darken4:"#f57f17",accent1:"#ffff8d",accent2:"#ffff00",accent3:"#ffea00",accent4:"#ffd600"}),_=Object.freeze({base:"#ffc107",lighten5:"#fff8e1",lighten4:"#ffecb3",lighten3:"#ffe082",lighten2:"#ffd54f",lighten1:"#ffca28",darken1:"#ffb300",darken2:"#ffa000",darken3:"#ff8f00",darken4:"#ff6f00",accent1:"#ffe57f",accent2:"#ffd740",accent3:"#ffc400",accent4:"#ffab00"}),S=Object.freeze({base:"#ff9800",lighten5:"#fff3e0",lighten4:"#ffe0b2",lighten3:"#ffcc80",lighten2:"#ffb74d",lighten1:"#ffa726",darken1:"#fb8c00",darken2:"#f57c00",darken3:"#ef6c00",darken4:"#e65100",accent1:"#ffd180",accent2:"#ffab40",accent3:"#ff9100",accent4:"#ff6d00"}),V=Object.freeze({base:"#ff5722",lighten5:"#fbe9e7",lighten4:"#ffccbc",lighten3:"#ffab91",lighten2:"#ff8a65",lighten1:"#ff7043",darken1:"#f4511e",darken2:"#e64a19",darken3:"#d84315",darken4:"#bf360c",accent1:"#ff9e80",accent2:"#ff6e40",accent3:"#ff3d00",accent4:"#dd2c00"}),B=Object.freeze({base:"#795548",lighten5:"#efebe9",lighten4:"#d7ccc8",lighten3:"#bcaaa4",lighten2:"#a1887f",lighten1:"#8d6e63",darken1:"#6d4c41",darken2:"#5d4037",darken3:"#4e342e",darken4:"#3e2723"}),C=Object.freeze({base:"#607d8b",lighten5:"#eceff1",lighten4:"#cfd8dc",lighten3:"#b0bec5",lighten2:"#90a4ae",lighten1:"#78909c",darken1:"#546e7a",darken2:"#455a64",darken3:"#37474f",darken4:"#263238"}),v=Object.freeze({base:"#9e9e9e",lighten5:"#fafafa",lighten4:"#f5f5f5",lighten3:"#eeeeee",lighten2:"#e0e0e0",lighten1:"#bdbdbd",darken1:"#757575",darken2:"#616161",darken3:"#424242",darken4:"#212121"}),$=Object.freeze({black:"#000000",white:"#ffffff",transparent:"transparent"});var n=Object.freeze({red:h,pink:s,purple:o,deepPurple:g,indigo:k,blue:p,lightBlue:m,cyan:u,teal:z,green:w,lightGreen:y,lime:O,yellow:j,amber:_,orange:S,deepOrange:V,brown:B,blueGrey:C,grey:v,shades:$}),x=(()=>`.v-swatches .v-btn{padding:0!important;margin:.1rem}.v-swatches .v-btn .v-icon{filter:invert(100%)}
2
+ `)(),G=(t,l)=>{const f=t.__vccOpts||t;for(const[c,i]of l)f[c]=i;return f};const T=e.defineComponent({name:"VSwatches",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,required:!0},swatches:{type:Array,default:()=>[[n.shades.black,n.shades.white],[n.red.base,n.pink.base,n.purple.base,n.deepPurple.base,n.indigo.base,n.blue.base,n.lightBlue.base,n.cyan.base],[n.teal.base,n.green.base,n.lightGreen.base,n.lime.base,n.yellow.base,n.amber.base,n.orange.base,n.deepOrange.base],[n.brown.base,n.blueGrey.base,n.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(t,l){const f=e.ref(!1),c=e.ref(t.modelValue);return{checkedVisibilty:f,selected:c,onSwatchClick:d=>{!d||c.value===d||(c.value=d,l.emit("update:modelValue",d))}}}});function E(t,l,f,c,i,d){const P=e.resolveComponent("v-icon"),q=e.resolveComponent("v-btn"),F=e.resolveComponent("v-sheet");return e.openBlock(),e.createBlock(F,{class:"v-swatches"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.swatches,(L,M)=>(e.openBlock(),e.createElementBlock("div",{key:M},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L,r=>(e.openBlock(),e.createBlock(q,{key:r,elevation:t.elevation,width:t.size,height:t.size,color:r,"min-width":"auto",onClick:A=>t.onSwatchClick(r)},{default:e.withCtx(()=>[r===t.selected?(e.openBlock(),e.createBlock(P,{key:0,size:t.iconSize,color:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.icon),1)]),_:2},1032,["size","color"])):e.createCommentVNode("",!0)]),_:2},1032,["elevation","width","height","color","onClick"]))),128))]))),128))]),_:1})}var b=G(T,[["render",E]]);/**
3
+ * Vuetify3 Swatches Component
4
+ *
5
+ * @license MIT
6
+ * @author Logue {@link logue@hotmail.co.jp}
7
+ * @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
8
+ * @see {@link https://github.com/logue/vuetify-swatches}
9
+ */const N=t=>t.component("VSwatches",b);a.default=b,a.install=N,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});