vuetify-swatches 2.1.0 → 2.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/dist/index.es.js CHANGED
@@ -1,272 +1,259 @@
1
1
  /**
2
- * vuetify-swatches
3
- *
4
- * @description Color Swatch component for Vuetify3.
5
- * @author Logue <logue@hotmail.co.jp>
6
- * @copyright 2022-2026 By Masashi Yoshikawa All rights reserved.
7
- * @license MIT
8
- * @version 2.0.1
9
- * @see {@link https://github.com/logue/vuetify-swatches}
10
- */
2
+ * vuetify-swatches
3
+ *
4
+ * @description Color Swatch component for Vuetify3.
5
+ * @author Logue <logue@hotmail.co.jp>
6
+ * @license MIT
7
+ * @version 2.3.0
8
+ * @see {@link https://github.com/logue/vuetify-swatches}
9
+ */
11
10
 
12
- import { defineComponent as B, openBlock as n, createBlock as c, unref as r, withCtx as p, createVNode as z, mergeProps as C, createCommentVNode as x, computed as N, ref as L, watch as S, normalizeClass as A, createElementBlock as f, Fragment as b, renderList as y } from "vue";
13
- import { VTooltip as I, VBtn as g, VIcon as j, VItemGroup as $, VItem as k } from "vuetify/components";
14
- import m from "vuetify/util/colors";
15
- function E(...l) {
16
- let d = 0;
17
- for (let i = 0; i < l.length; i++)
18
- l[i].length > d && (d = l[i].length);
19
- const t = l.length, e = Array(d);
20
- for (let i = 0; i < d; ++i) {
21
- const a = Array(t);
22
- for (let o = 0; o < t; ++o)
23
- a[o] = l[o][i];
24
- e[i] = a;
25
- }
26
- return e;
11
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, normalizeClass as l, openBlock as u, renderList as d, unref as f, useModel as p, withCtx as m } from "vue";
12
+ import { VBtn as h, VIcon as g, VItem as _, VItemGroup as v, VTooltip as y } from "vuetify/components";
13
+ import b from "vuetify/util/colors";
14
+ // node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/array/zip.mjs
15
+ function x(...e) {
16
+ let t = 0;
17
+ for (let n = 0; n < e.length; n++) e[n].length > t && (t = e[n].length);
18
+ let n = e.length, r = Array(t);
19
+ for (let i = 0; i < t; ++i) {
20
+ let t = Array(n);
21
+ for (let r = 0; r < n; ++r) t[r] = e[r][i];
22
+ r[i] = t;
23
+ }
24
+ return r;
27
25
  }
28
- var w = /* @__PURE__ */ B({
29
- __name: "SwatchButton",
30
- props: {
31
- color: { default: void 0 },
32
- isSelected: { type: Boolean, default: !1 },
33
- size: { default: "2rem" },
34
- icon: { default: "mdi-checkbox-marked-circle" },
35
- iconSize: { default: "1rem" },
36
- variant: { default: void 0 },
37
- disabled: { type: Boolean, default: !1 },
38
- rounded: { type: [String, Number, Boolean], default: void 0 },
39
- border: { type: [String, Number, Boolean], default: !1 },
40
- elevation: { default: void 0 },
41
- tooltip: { type: Boolean, default: !1 },
42
- tooltipLocation: { default: void 0 }
43
- },
44
- emits: ["click"],
45
- setup(l, { emit: d }) {
46
- const t = l, e = d;
47
- return (i, a) => t.color ? (n(), c(r(I), {
48
- key: 0,
49
- disabled: !t.tooltip,
50
- location: t.tooltipLocation,
51
- text: t.color
52
- }, {
53
- activator: p(({ props: o }) => [
54
- z(r(g), C(o, {
55
- border: t.border,
56
- class: [
57
- t.color === r(m).shades.transparent ? "bg-transparent" : "",
58
- "p-0"
59
- ],
60
- color: t.color,
61
- disabled: t.disabled,
62
- elevation: t.elevation,
63
- height: t.size,
64
- variant: t.variant,
65
- width: t.size,
66
- "min-width": "auto",
67
- onClick: a[0] || (a[0] = (v) => e("click"))
68
- }), {
69
- default: p(() => [
70
- t.isSelected ? (n(), c(r(j), {
71
- key: 0,
72
- size: t.iconSize,
73
- color: t.color !== r(m).shades.transparent ? t.color : void 0,
74
- icon: t.icon
75
- }, null, 8, ["size", "color", "icon"])) : x("", !0)
76
- ]),
77
- _: 1
78
- }, 16, ["border", "class", "color", "disabled", "elevation", "height", "variant", "width"])
79
- ]),
80
- _: 1
81
- }, 8, ["disabled", "location", "text"])) : (n(), c(r(g), {
82
- key: 1,
83
- height: t.size,
84
- width: t.size,
85
- class: "p-0",
86
- disabled: "",
87
- "min-width": "auto",
88
- variant: "text"
89
- }, null, 8, ["height", "width"]));
90
- }
91
- }), F = /* @__PURE__ */ B({
92
- __name: "VSwatches",
93
- props: {
94
- /** Model value */
95
- modelValue: { type: String, default: m.shades.white },
96
- /** Swatch colors */
97
- swatches: {
98
- type: Array,
99
- default: () => []
100
- },
101
- /** Swatch size */
102
- size: {
103
- type: String,
104
- default: "2rem"
105
- },
106
- /**
107
- * Selected icon
108
- * @see {@link https://vuetifyjs.com/en/components/icons/#usage
109
- */
110
- icon: {
111
- type: String,
112
- default: "mdi-checkbox-marked-circle"
113
- },
114
- /** selected icon size */
115
- iconSize: {
116
- type: String,
117
- default: "1rem"
118
- },
119
- /** Display swatches in a single row */
120
- inline: {
121
- type: Boolean,
122
- default: !1
123
- },
124
- /**
125
- * The variant prop gives you easy access to several different button styles..
126
- *
127
- * @see {@link https://vuetifyjs.com/en/components/buttons/#variant}
128
- */
129
- variant: {
130
- type: String,
131
- default: void 0
132
- },
133
- /**
134
- * Removes the ability to click or target the component.
135
- *
136
- * @see {@link https://vuetifyjs.com/en/api/v-btn/#props-disabled}
137
- */
138
- disabled: {
139
- type: Boolean,
140
- default: !1
141
- },
142
- /**
143
- * Applies a large border radius on the button.
144
- *
145
- * @see {@link https://vuetifyjs.com/en/components/buttons/#rounded}
146
- */
147
- rounded: {
148
- type: [String, Number, Boolean],
149
- default: void 0
150
- },
151
- /**
152
- * Applies border styles to component.
153
- *
154
- * @see {@link https://vuetifyjs.com/en/api/v-btn/#props-border}
155
- */
156
- border: {
157
- type: [String, Number, Boolean],
158
- default: !1
159
- },
160
- /**
161
- * Designates an elevation applied to the component between 0 and 24.
162
- *
163
- * @see {@link https://vuetifyjs.com/en/api/v-btn/#props-elevation}
164
- */
165
- elevation: {
166
- type: [String, Number],
167
- default: void 0
168
- },
169
- /** Swap cols and rows */
170
- transpose: {
171
- type: Boolean,
172
- default: !1
173
- },
174
- /**
175
- * Tooltip
176
- * @see {@link https://vuetifyjs.com/en/components/tooltips/}
177
- */
178
- tooltip: {
179
- type: Boolean,
180
- default: !1
181
- },
182
- /**
183
- * Tooltip location
184
- * @see {@link https://vuetifyjs.com/en/components/tooltips/#props-location}
185
- */
186
- tooltipLocation: {
187
- type: String,
188
- default: void 0
189
- }
190
- },
191
- emits: {
192
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
193
- "update:modelValue": (l) => !0
194
- },
195
- setup(l, { emit: d }) {
196
- const t = d, e = l, i = N(() => {
197
- const o = Array.isArray(e.swatches) ? e.swatches : Object.values(e.swatches);
198
- return e.inline ? [o.flat(1 / 0)] : e.transpose ? E(...o) : o;
199
- }), a = L(m.shades.white);
200
- return S(
201
- () => a.value,
202
- (o) => t("update:modelValue", o)
203
- ), S(
204
- () => e.modelValue,
205
- (o) => {
206
- o && (a.value = o);
207
- },
208
- { immediate: !0 }
209
- ), (o, v) => (n(), c(r($), {
210
- modelValue: a.value,
211
- "onUpdate:modelValue": v[0] || (v[0] = (s) => a.value = s),
212
- class: A([{ "d-inline": e.inline }, "v-swatches"]),
213
- mandatory: ""
214
- }, {
215
- default: p(() => [
216
- e.inline ? (n(!0), f(b, { key: 0 }, y(i.value[0], (s) => (n(), c(r(k), {
217
- key: s,
218
- value: s
219
- }, {
220
- default: p(({ isSelected: h, toggle: u }) => [
221
- z(w, {
222
- border: e.border,
223
- color: s,
224
- disabled: e.disabled,
225
- elevation: e.elevation,
226
- "icon-size": e.iconSize,
227
- icon: e.icon,
228
- "is-selected": h,
229
- rounded: e.rounded,
230
- size: e.size,
231
- "tooltip-location": e.tooltipLocation,
232
- tooltip: e.tooltip,
233
- variant: e.variant,
234
- onClick: u
235
- }, null, 8, ["border", "color", "disabled", "elevation", "icon-size", "icon", "is-selected", "rounded", "size", "tooltip-location", "tooltip", "variant", "onClick"])
236
- ]),
237
- _: 2
238
- }, 1032, ["value"]))), 128)) : (n(!0), f(b, { key: 1 }, y(i.value, (s, h) => (n(), f("div", { key: h }, [
239
- (n(!0), f(b, null, y(s, (u) => (n(), c(r(k), {
240
- key: u,
241
- value: u
242
- }, {
243
- default: p(({ isSelected: V, toggle: _ }) => [
244
- z(w, {
245
- border: e.border,
246
- color: u,
247
- disabled: e.disabled,
248
- elevation: e.elevation,
249
- "icon-size": e.iconSize,
250
- icon: e.icon,
251
- "is-selected": V,
252
- rounded: e.rounded,
253
- size: e.size,
254
- "tooltip-location": e.tooltipLocation,
255
- tooltip: e.tooltip,
256
- variant: e.variant,
257
- onClick: _
258
- }, null, 8, ["border", "color", "disabled", "elevation", "icon-size", "icon", "is-selected", "rounded", "size", "tooltip-location", "tooltip", "variant", "onClick"])
259
- ]),
260
- _: 2
261
- }, 1032, ["value"]))), 128))
262
- ]))), 128))
263
- ]),
264
- _: 1
265
- }, 8, ["modelValue", "class"]));
266
- }
267
- });
268
- const T = (l) => l.component("VSwatches", F);
269
- export {
270
- F as default,
271
- T as install
272
- };
26
+ // src/components/SwatchButton.vue
27
+ var S = /* @__PURE__ */ o({
28
+ __name: "SwatchButton",
29
+ props: {
30
+ color: {},
31
+ isSelected: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ size: { default: "2rem" },
36
+ icon: { default: "mdi-checkbox-marked-circle" },
37
+ iconSize: { default: "1rem" },
38
+ variant: {},
39
+ disabled: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ rounded: { type: [
44
+ String,
45
+ Number,
46
+ Boolean
47
+ ] },
48
+ border: {
49
+ type: [
50
+ String,
51
+ Number,
52
+ Boolean
53
+ ],
54
+ default: !1
55
+ },
56
+ elevation: {},
57
+ tooltip: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ tooltipLocation: { default: "end" }
62
+ },
63
+ emits: ["click"],
64
+ setup(e, { emit: t }) {
65
+ let i = t;
66
+ return (t, o) => e.color ? (u(), n(f(y), {
67
+ key: 0,
68
+ disabled: !e.tooltip,
69
+ location: e.tooltipLocation,
70
+ text: e.color
71
+ }, {
72
+ activator: m(({ props: t }) => [a(f(h), c(t, {
73
+ class: ["p-0", e.color === f(b).shades.transparent ? "bg-transparent" : ""],
74
+ width: e.size,
75
+ height: e.size,
76
+ border: e.border,
77
+ color: e.color,
78
+ disabled: e.disabled,
79
+ elevation: e.elevation,
80
+ variant: e.variant,
81
+ "min-width": "auto",
82
+ onClick: o[0] ||= (e) => i("click")
83
+ }), {
84
+ default: m(() => [e.isSelected ? (u(), n(f(g), {
85
+ key: 0,
86
+ size: e.iconSize,
87
+ color: e.color === f(b).shades.transparent ? void 0 : e.color,
88
+ icon: e.icon
89
+ }, null, 8, [
90
+ "size",
91
+ "color",
92
+ "icon"
93
+ ])) : r("", !0)]),
94
+ _: 1
95
+ }, 16, [
96
+ "class",
97
+ "width",
98
+ "height",
99
+ "border",
100
+ "color",
101
+ "disabled",
102
+ "elevation",
103
+ "variant"
104
+ ])]),
105
+ _: 1
106
+ }, 8, [
107
+ "disabled",
108
+ "location",
109
+ "text"
110
+ ])) : (u(), n(f(h), {
111
+ key: 1,
112
+ class: "p-0",
113
+ width: e.size,
114
+ height: e.size,
115
+ "min-width": "auto",
116
+ variant: "text",
117
+ disabled: ""
118
+ }, null, 8, ["width", "height"]));
119
+ }
120
+ }), C = /*#__PURE__*/ ((e, t) => {
121
+ let n = e.__vccOpts || e;
122
+ for (let [e, r] of t) n[e] = r;
123
+ return n;
124
+ })(/* @__PURE__ */ o({
125
+ __name: "VSwatches",
126
+ props: /*@__PURE__*/ s({
127
+ swatches: { default: () => [] },
128
+ size: { default: "2rem" },
129
+ icon: { default: "mdi-checkbox-marked-circle" },
130
+ iconSize: { default: "1rem" },
131
+ inline: {
132
+ type: Boolean,
133
+ default: !1
134
+ },
135
+ variant: {},
136
+ disabled: {
137
+ type: Boolean,
138
+ default: !1
139
+ },
140
+ rounded: { type: [
141
+ String,
142
+ Number,
143
+ Boolean
144
+ ] },
145
+ border: {
146
+ type: [
147
+ String,
148
+ Number,
149
+ Boolean
150
+ ],
151
+ default: !1
152
+ },
153
+ elevation: {},
154
+ transpose: {
155
+ type: Boolean,
156
+ default: !1
157
+ },
158
+ tooltip: {
159
+ type: Boolean,
160
+ default: !1
161
+ },
162
+ tooltipLocation: {}
163
+ }, {
164
+ modelValue: { default: b.shades.white },
165
+ modelModifiers: {}
166
+ }),
167
+ emits: ["update:modelValue"],
168
+ setup(r) {
169
+ let o = p(r, "modelValue"), s = t(() => c(r.swatches, r.inline, r.transpose));
170
+ function c(e, t, n) {
171
+ let r = Array.isArray(e) ? h(e) ? e : e.length > 0 ? [e] : [] : Object.values(e);
172
+ return t ? [r.flat()] : n ? x(...r) : r;
173
+ }
174
+ function h(e) {
175
+ return Array.isArray(e) && e.every(Array.isArray);
176
+ }
177
+ return (t, c) => (u(), n(f(v), {
178
+ modelValue: o.value,
179
+ "onUpdate:modelValue": c[0] ||= (e) => o.value = e,
180
+ class: l(["v-swatches", { "d-inline": r.inline }]),
181
+ mandatory: ""
182
+ }, {
183
+ default: m(() => [r.inline ? (u(!0), i(e, { key: 0 }, d(s.value[0], (e) => (u(), n(f(_), {
184
+ key: e,
185
+ value: e
186
+ }, {
187
+ default: m(({ isSelected: t, toggle: n }) => [a(S, {
188
+ border: r.border,
189
+ color: e,
190
+ disabled: r.disabled,
191
+ elevation: r.elevation,
192
+ "icon-size": r.iconSize,
193
+ icon: r.icon,
194
+ "is-selected": t,
195
+ rounded: r.rounded,
196
+ size: r.size,
197
+ "tooltip-location": r.tooltipLocation,
198
+ tooltip: r.tooltip,
199
+ variant: r.variant,
200
+ onClick: n
201
+ }, null, 8, [
202
+ "border",
203
+ "color",
204
+ "disabled",
205
+ "elevation",
206
+ "icon-size",
207
+ "icon",
208
+ "is-selected",
209
+ "rounded",
210
+ "size",
211
+ "tooltip-location",
212
+ "tooltip",
213
+ "variant",
214
+ "onClick"
215
+ ])]),
216
+ _: 2
217
+ }, 1032, ["value"]))), 128)) : (u(!0), i(e, { key: 1 }, d(s.value, (t, o) => (u(), i("div", { key: o }, [(u(!0), i(e, null, d(t, (e) => (u(), n(f(_), {
218
+ key: e,
219
+ value: e
220
+ }, {
221
+ default: m(({ isSelected: t, toggle: n }) => [a(S, {
222
+ border: r.border,
223
+ color: e,
224
+ disabled: r.disabled,
225
+ elevation: r.elevation,
226
+ "icon-size": r.iconSize,
227
+ icon: r.icon,
228
+ "is-selected": t,
229
+ rounded: r.rounded,
230
+ size: r.size,
231
+ "tooltip-location": r.tooltipLocation,
232
+ tooltip: r.tooltip,
233
+ variant: r.variant,
234
+ onClick: n
235
+ }, null, 8, [
236
+ "border",
237
+ "color",
238
+ "disabled",
239
+ "elevation",
240
+ "icon-size",
241
+ "icon",
242
+ "is-selected",
243
+ "rounded",
244
+ "size",
245
+ "tooltip-location",
246
+ "tooltip",
247
+ "variant",
248
+ "onClick"
249
+ ])]),
250
+ _: 2
251
+ }, 1032, ["value"]))), 128))]))), 128))]),
252
+ _: 1
253
+ }, 8, ["modelValue", "class"]));
254
+ }
255
+ }), [["__scopeId", "data-v-4f87df5e"]]), w = {
256
+ version: "2.3.0",
257
+ date: "2026-12-04T04:36:23.789Z"
258
+ }, T = (e) => e.component("VSwatches", C);
259
+ export { w as Meta, C as default, T as install };
@@ -1,12 +1,11 @@
1
1
  /**
2
- * vuetify-swatches
3
- *
4
- * @description Color Swatch component for Vuetify3.
5
- * @author Logue <logue@hotmail.co.jp>
6
- * @copyright 2022-2026 By Masashi Yoshikawa All rights reserved.
7
- * @license MIT
8
- * @version 2.0.1
9
- * @see {@link https://github.com/logue/vuetify-swatches}
10
- */
2
+ * vuetify-swatches
3
+ *
4
+ * @description Color Swatch component for Vuetify3.
5
+ * @author Logue <logue@hotmail.co.jp>
6
+ * @license MIT
7
+ * @version 2.3.0
8
+ * @see {@link https://github.com/logue/vuetify-swatches}
9
+ */
11
10
 
12
- var VSwatches=(function(f,e,d,b){"use strict";function y(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var u=y(b);function B(...l){let r=0;for(let a=0;a<l.length;a++)l[a].length>r&&(r=l[a].length);const o=l.length,t=Array(r);for(let a=0;a<r;++a){const n=Array(o);for(let i=0;i<o;++i)n[i]=l[i][a];t[a]=n}return t}var h=e.defineComponent({__name:"SwatchButton",props:{color:{default:void 0},isSelected:{type:Boolean,default:!1},size:{default:"2rem"},icon:{default:"mdi-checkbox-marked-circle"},iconSize:{default:"1rem"},variant:{default:void 0},disabled:{type:Boolean,default:!1},rounded:{type:[String,Number,Boolean],default:void 0},border:{type:[String,Number,Boolean],default:!1},elevation:{default:void 0},tooltip:{type:Boolean,default:!1},tooltipLocation:{default:void 0}},emits:["click"],setup(l,{emit:r}){const o=l,t=r;return(a,n)=>o.color?(e.openBlock(),e.createBlock(e.unref(d.VTooltip),{key:0,disabled:!o.tooltip,location:o.tooltipLocation,text:o.color},{activator:e.withCtx(({props:i})=>[e.createVNode(e.unref(d.VBtn),e.mergeProps(i,{border:o.border,class:[o.color===e.unref(u.default).shades.transparent?"bg-transparent":"","p-0"],color:o.color,disabled:o.disabled,elevation:o.elevation,height:o.size,variant:o.variant,width:o.size,"min-width":"auto",onClick:n[0]||(n[0]=p=>t("click"))}),{default:e.withCtx(()=>[o.isSelected?(e.openBlock(),e.createBlock(e.unref(d.VIcon),{key:0,size:o.iconSize,color:o.color!==e.unref(u.default).shades.transparent?o.color:void 0,icon:o.icon},null,8,["size","color","icon"])):e.createCommentVNode("",!0)]),_:1},16,["border","class","color","disabled","elevation","height","variant","width"])]),_:1},8,["disabled","location","text"])):(e.openBlock(),e.createBlock(e.unref(d.VBtn),{key:1,height:o.size,width:o.size,class:"p-0",disabled:"","min-width":"auto",variant:"text"},null,8,["height","width"]))}}),k=e.defineComponent({__name:"VSwatches",props:{modelValue:{type:String,default:u.default.shades.white},swatches:{type:Array,default:()=>[]},size:{type:String,default:"2rem"},icon:{type:String,default:"mdi-checkbox-marked-circle"},iconSize:{type:String,default:"1rem"},inline:{type:Boolean,default:!1},variant:{type:String,default:void 0},disabled:{type:Boolean,default:!1},rounded:{type:[String,Number,Boolean],default:void 0},border:{type:[String,Number,Boolean],default:!1},elevation:{type:[String,Number],default:void 0},transpose:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!1},tooltipLocation:{type:String,default:void 0}},emits:{"update:modelValue":l=>!0},setup(l,{emit:r}){const o=r,t=l,a=e.computed(()=>{const i=Array.isArray(t.swatches)?t.swatches:Object.values(t.swatches);return t.inline?[i.flat(1/0)]:t.transpose?B(...i):i}),n=e.ref(u.default.shades.white);return e.watch(()=>n.value,i=>o("update:modelValue",i)),e.watch(()=>t.modelValue,i=>{i&&(n.value=i)},{immediate:!0}),(i,p)=>(e.openBlock(),e.createBlock(e.unref(d.VItemGroup),{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=c=>n.value=c),class:e.normalizeClass([{"d-inline":t.inline},"v-swatches"]),mandatory:""},{default:e.withCtx(()=>[t.inline?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value[0],c=>(e.openBlock(),e.createBlock(e.unref(d.VItem),{key:c,value:c},{default:e.withCtx(({isSelected:m,toggle:s})=>[e.createVNode(h,{border:t.border,color:c,disabled:t.disabled,elevation:t.elevation,"icon-size":t.iconSize,icon:t.icon,"is-selected":m,rounded:t.rounded,size:t.size,"tooltip-location":t.tooltipLocation,tooltip:t.tooltip,variant:t.variant,onClick:s},null,8,["border","color","disabled","elevation","icon-size","icon","is-selected","rounded","size","tooltip-location","tooltip","variant","onClick"])]),_:2},1032,["value"]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.value,(c,m)=>(e.openBlock(),e.createElementBlock("div",{key:m},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c,s=>(e.openBlock(),e.createBlock(e.unref(d.VItem),{key:s,value:s},{default:e.withCtx(({isSelected:z,toggle:S})=>[e.createVNode(h,{border:t.border,color:s,disabled:t.disabled,elevation:t.elevation,"icon-size":t.iconSize,icon:t.icon,"is-selected":z,rounded:t.rounded,size:t.size,"tooltip-location":t.tooltipLocation,tooltip:t.tooltip,variant:t.variant,onClick:S},null,8,["border","color","disabled","elevation","icon-size","icon","is-selected","rounded","size","tooltip-location","tooltip","variant","onClick"])]),_:2},1032,["value"]))),128))]))),128))]),_:1},8,["modelValue","class"]))}});const w=l=>l.component("VSwatches",k);return f.default=k,f.install=w,Object.defineProperty(f,"__esModule",{value:!0}),f})({},Vue,Vuetify/components,colors);
11
+ var VSwatches=(function(e,t,n,r){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of s(t))!l.call(e,i)&&i!==n&&(r=o(t,i),a(e,i,{get:r&&r.get&&!r.configurable?r.get:()=>t[i],enumerable:!r||r.enumerable}));return e};r=((e,t,n)=>(n=e==null?{}:i(c(e)),u(a(n,`default`,{value:e,enumerable:!0}),e)))(r,1);function d(...e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=e.length,r=Array(t);for(let i=0;i<t;++i){let t=Array(n);for(let r=0;r<n;++r)t[r]=e[r][i];r[i]=t}return r}var f=(0,t.defineComponent)({__name:`SwatchButton`,props:{color:{},isSelected:{type:Boolean,default:!1},size:{default:`2rem`},icon:{default:`mdi-checkbox-marked-circle`},iconSize:{default:`1rem`},variant:{},disabled:{type:Boolean,default:!1},rounded:{type:[String,Number,Boolean]},border:{type:[String,Number,Boolean],default:!1},elevation:{},tooltip:{type:Boolean,default:!1},tooltipLocation:{default:`end`}},emits:[`click`],setup(e,{emit:i}){let a=i;return(i,o)=>e.color?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.VTooltip),{key:0,disabled:!e.tooltip,location:e.tooltipLocation,text:e.color},{activator:(0,t.withCtx)(({props:i})=>[(0,t.createVNode)((0,t.unref)(n.VBtn),(0,t.mergeProps)(i,{class:[`p-0`,e.color===(0,t.unref)(r.default).shades.transparent?`bg-transparent`:``],width:e.size,height:e.size,border:e.border,color:e.color,disabled:e.disabled,elevation:e.elevation,variant:e.variant,"min-width":`auto`,onClick:o[0]||=e=>a(`click`)}),{default:(0,t.withCtx)(()=>[e.isSelected?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.VIcon),{key:0,size:e.iconSize,color:e.color===(0,t.unref)(r.default).shades.transparent?void 0:e.color,icon:e.icon},null,8,[`size`,`color`,`icon`])):(0,t.createCommentVNode)(``,!0)]),_:1},16,[`class`,`width`,`height`,`border`,`color`,`disabled`,`elevation`,`variant`])]),_:1},8,[`disabled`,`location`,`text`])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.VBtn),{key:1,class:`p-0`,width:e.size,height:e.size,"min-width":`auto`,variant:`text`,disabled:``},null,8,[`width`,`height`]))}}),p=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({__name:`VSwatches`,props:(0,t.mergeModels)({swatches:{default:()=>[]},size:{default:`2rem`},icon:{default:`mdi-checkbox-marked-circle`},iconSize:{default:`1rem`},inline:{type:Boolean,default:!1},variant:{},disabled:{type:Boolean,default:!1},rounded:{type:[String,Number,Boolean]},border:{type:[String,Number,Boolean],default:!1},elevation:{},transpose:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!1},tooltipLocation:{}},{modelValue:{default:r.default.shades.white},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let r=(0,t.useModel)(e,`modelValue`),i=(0,t.computed)(()=>a(e.swatches,e.inline,e.transpose));function a(e,t,n){let r=Array.isArray(e)?o(e)?e:e.length>0?[e]:[]:Object.values(e);return t?[r.flat()]:n?d(...r):r}function o(e){return Array.isArray(e)&&e.every(Array.isArray)}return(a,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.VItemGroup),{modelValue:r.value,"onUpdate:modelValue":o[0]||=e=>r.value=e,class:(0,t.normalizeClass)([`v-swatches`,{"d-inline":e.inline}]),mandatory:``},{default:(0,t.withCtx)(()=>[e.inline?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(i.value[0],r=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.VItem),{key:r,value:r},{default:(0,t.withCtx)(({isSelected:n,toggle:i})=>[(0,t.createVNode)(f,{border:e.border,color:r,disabled:e.disabled,elevation:e.elevation,"icon-size":e.iconSize,icon:e.icon,"is-selected":n,rounded:e.rounded,size:e.size,"tooltip-location":e.tooltipLocation,tooltip:e.tooltip,variant:e.variant,onClick:i},null,8,[`border`,`color`,`disabled`,`elevation`,`icon-size`,`icon`,`is-selected`,`rounded`,`size`,`tooltip-location`,`tooltip`,`variant`,`onClick`])]),_:2},1032,[`value`]))),128)):((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:1},(0,t.renderList)(i.value,(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:i},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r,r=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.VItem),{key:r,value:r},{default:(0,t.withCtx)(({isSelected:n,toggle:i})=>[(0,t.createVNode)(f,{border:e.border,color:r,disabled:e.disabled,elevation:e.elevation,"icon-size":e.iconSize,icon:e.icon,"is-selected":n,rounded:e.rounded,size:e.size,"tooltip-location":e.tooltipLocation,tooltip:e.tooltip,variant:e.variant,onClick:i},null,8,[`border`,`color`,`disabled`,`elevation`,`icon-size`,`icon`,`is-selected`,`rounded`,`size`,`tooltip-location`,`tooltip`,`variant`,`onClick`])]),_:2},1032,[`value`]))),128))]))),128))]),_:1},8,[`modelValue`,`class`]))}}),[[`__scopeId`,`data-v-4f87df5e`]]);return e.Meta={version:`2.3.0`,date:`2026-12-04T04:36:23.789Z`},e.default=p,e.install=e=>e.component(`VSwatches`,p),e})({},Vue,Vuetify,Vuetify);