@luis-angel-martin-dzul/vue-input-styles 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { createElementBlock as i, openBlock as a, normalizeClass as g, renderSlot as _, createElementVNode as o, createCommentVNode as h, toDisplayString as u, Fragment as x, renderList as p, createTextVNode as f, withDirectives as w, mergeProps as y, vModelText as C, withModifiers as S, vModelDynamic as k, vModelSelect as U, normalizeStyle as V } from "vue";
1
+ import { createElementBlock as i, openBlock as a, normalizeClass as m, renderSlot as C, createElementVNode as o, createCommentVNode as h, toDisplayString as u, Fragment as p, renderList as w, withDirectives as f, createTextVNode as y, withModifiers as k, vModelText as v, mergeProps as x, vModelDynamic as _, vModelSelect as V, normalizeStyle as U } from "vue";
2
2
  class b {
3
3
  static type = {
4
4
  success: "success",
@@ -15,39 +15,39 @@ class b {
15
15
  info: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM288 224C288 206.3 302.3 192 320 192C337.7 192 352 206.3 352 224C352 241.7 337.7 256 320 256C302.3 256 288 241.7 288 224zM280 288L328 288C341.3 288 352 298.7 352 312L352 400L360 400C373.3 400 384 410.7 384 424C384 437.3 373.3 448 360 448L280 448C266.7 448 256 437.3 256 424C256 410.7 266.7 400 280 400L304 400L304 336L280 336C266.7 336 256 325.3 256 312C256 298.7 266.7 288 280 288z"/></svg>',
16
16
  neutral: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM272 272C272 254.3 257.7 240 240 240C222.3 240 208 254.3 208 272C208 289.7 222.3 304 240 304C257.7 304 272 289.7 272 272zM400 304C417.7 304 432 289.7 432 272C432 254.3 417.7 240 400 240C382.3 240 368 254.3 368 272C368 289.7 382.3 304 400 304z"/></svg>'
17
17
  };
18
- static #e(l, e, n = b.type.info, d = 4e3) {
18
+ static #e(l, t, n = b.type.info, d = 4e3) {
19
19
  b.ensureContainer();
20
- const r = b.container.querySelector(`.alert-${n}`);
21
- r && r.remove();
22
- const s = document.createElement("div");
23
- s.className = `alert alert-${n}`;
20
+ const s = b.container.querySelector(`.alert-${n}`);
21
+ s && s.remove();
22
+ const r = document.createElement("div");
23
+ r.className = `alert alert-${n}`;
24
24
  const c = b.iconMap[n] || "";
25
- s.innerHTML = `
25
+ r.innerHTML = `
26
26
  <div class="alert-icon">${c}</div>
27
27
  <div class="alert-texts">
28
28
  <div class="alert-title">${l}</div>
29
- <div class="alert-message">${e}</div>
29
+ <div class="alert-message">${t}</div>
30
30
  </div>
31
31
  <div class="alert-close">&times;</div>
32
- `, s.querySelector(".alert-close").addEventListener("click", () => {
33
- b.remove(s);
34
- }), b.container.appendChild(s), setTimeout(() => s.classList.add("show"), 10), d > 0 && setTimeout(() => b.remove(s), d);
32
+ `, r.querySelector(".alert-close").addEventListener("click", () => {
33
+ b.remove(r);
34
+ }), b.container.appendChild(r), setTimeout(() => r.classList.add("show"), 10), d > 0 && setTimeout(() => b.remove(r), d);
35
35
  }
36
36
  // Métodos públicos reutilizables
37
- static success(l, e = "") {
38
- this.#e(l, e, this.type.success);
37
+ static success(l, t = "") {
38
+ this.#e(l, t, this.type.success);
39
39
  }
40
- static error(l, e = "") {
41
- this.#e(l, e, this.type.error);
40
+ static error(l, t = "") {
41
+ this.#e(l, t, this.type.error);
42
42
  }
43
- static warning(l, e = "") {
44
- this.#e(l, e, this.type.warning);
43
+ static warning(l, t = "") {
44
+ this.#e(l, t, this.type.warning);
45
45
  }
46
- static info(l, e = "") {
47
- this.#e(l, e, this.type.info);
46
+ static info(l, t = "") {
47
+ this.#e(l, t, this.type.info);
48
48
  }
49
- static neutral(l, e = "") {
50
- this.#e(l, e, this.type.neutral);
49
+ static neutral(l, t = "") {
50
+ this.#e(l, t, this.type.neutral);
51
51
  }
52
52
  static ensureContainer() {
53
53
  this.container || (this.container = document.createElement("div"), this.container.className = "alert-container", document.body.appendChild(this.container));
@@ -56,21 +56,21 @@ class b {
56
56
  l.classList.add("hide"), setTimeout(() => l.remove(), 250);
57
57
  }
58
58
  }
59
- const m = (t, l) => {
60
- const e = t.__vccOpts || t;
59
+ const g = (e, l) => {
60
+ const t = e.__vccOpts || e;
61
61
  for (const [n, d] of l)
62
- e[n] = d;
63
- return e;
62
+ t[n] = d;
63
+ return t;
64
64
  }, T = {
65
65
  name: "ButtonStyle",
66
66
  emits: ["click"],
67
67
  props: {
68
+ type: { type: String, default: "button", validator: (e) => ["button", "submit"].includes(e) },
68
69
  class: { type: String, default: "" },
69
70
  variant: { type: String, default: "solid" },
70
71
  color: { type: String, default: "gray" },
71
72
  disabled: { type: Boolean, default: !1 },
72
- delay: { type: String, default: "1.5" },
73
- full: { type: Boolean, default: !1 }
73
+ delay: { type: String, default: "1.5" }
74
74
  },
75
75
  data() {
76
76
  return {
@@ -83,49 +83,47 @@ const m = (t, l) => {
83
83
  },
84
84
  buttonClasses() {
85
85
  if (this.class)
86
- return `${this.class} disabled:opacity-60 disabled:cursor-not-allowed`;
87
- const t = [
88
- "h-min font-semibold items-center justify-center rounded px-3 py-1.5 gap-1"
89
- ];
90
- t.push(this.full ? "w-full flex" : "inline-flex");
91
- const l = {
86
+ return `${this.class} cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed`;
87
+ const e = [
88
+ "h-min font-semibold items-center justify-center rounded px-3 py-1.5 gap-1 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed"
89
+ ], l = {
92
90
  solid: {
93
- gray: "text-white bg-slate-600 enabled:hover:bg-slate-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
94
- green: "text-white bg-emerald-600 enabled:hover:bg-emerald-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
95
- blue: "text-white bg-sky-600 enabled:hover:bg-sky-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
96
- red: "text-white bg-rose-600 enabled:hover:bg-rose-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
97
- yellow: "text-white bg-amber-600 enabled:hover:bg-amber-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed"
91
+ gray: "text-white bg-slate-600 enabled:hover:bg-slate-700",
92
+ green: "text-white bg-emerald-600 enabled:hover:bg-emerald-700",
93
+ blue: "text-white bg-sky-600 enabled:hover:bg-sky-700",
94
+ red: "text-white bg-rose-600 enabled:hover:bg-rose-700",
95
+ yellow: "text-white bg-amber-600 enabled:hover:bg-amber-700"
98
96
  },
99
97
  outline: {
100
- gray: "text-slate-700 enabled:hover:bg-slate-50 border border-slate-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
101
- green: "text-emerald-700 enabled:hover:bg-emerald-50 border border-emerald-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
102
- blue: "text-sky-700 enabled:hover:bg-sky-50 border border-sky-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
103
- red: "text-rose-700 enabled:hover:bg-rose-50 border border-rose-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
104
- yellow: "text-amber-700 enabled:hover:bg-amber-50 border border-amber-700 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed"
98
+ gray: "text-slate-700 enabled:hover:bg-slate-50 border border-slate-700",
99
+ green: "text-emerald-700 enabled:hover:bg-emerald-50 border border-emerald-700",
100
+ blue: "text-sky-700 enabled:hover:bg-sky-50 border border-sky-700",
101
+ red: "text-rose-700 enabled:hover:bg-rose-50 border border-rose-700",
102
+ yellow: "text-amber-700 enabled:hover:bg-amber-50 border border-amber-700"
105
103
  }
106
104
  };
107
- return t.push(l[this.variant][this.color]), t;
105
+ return e.push(l[this.variant][this.color]), e;
108
106
  }
109
107
  },
110
108
  methods: {
111
- handleClick(t) {
112
- this.isDisabled || (this.$emit("click", t), this.internalDisabled = !0, setTimeout(() => {
109
+ handleClick(e) {
110
+ this.isDisabled || (this.$emit("click", e), this.internalDisabled = !0, setTimeout(() => {
113
111
  this.internalDisabled = !1;
114
112
  }, 1e3 * Number(this.delay)));
115
113
  }
116
114
  }
117
- }, I = ["disabled"];
118
- function B(t, l, e, n, d, r) {
115
+ }, I = ["type", "disabled"];
116
+ function B(e, l, t, n, d, s) {
119
117
  return a(), i("button", {
120
- disabled: r.isDisabled,
121
- type: "button",
122
- onClick: l[0] || (l[0] = (...s) => r.handleClick && r.handleClick(...s)),
123
- class: g(r.buttonClasses)
118
+ type: t.type,
119
+ onClick: l[0] || (l[0] = (...r) => s.handleClick && s.handleClick(...r)),
120
+ disabled: s.isDisabled,
121
+ class: m(s.buttonClasses)
124
122
  }, [
125
- _(t.$slots, "default")
123
+ C(e.$slots, "default")
126
124
  ], 10, I);
127
125
  }
128
- const L = /* @__PURE__ */ m(T, [["render", B]]), q = {
126
+ const q = /* @__PURE__ */ g(T, [["render", B]]), L = {
129
127
  name: "CheckStyle",
130
128
  props: {
131
129
  label: { type: String, default: "" },
@@ -153,17 +151,17 @@ const L = /* @__PURE__ */ m(T, [["render", B]]), q = {
153
151
  watch: {
154
152
  modelValue: {
155
153
  immediate: !0,
156
- handler(t) {
157
- Array.isArray(t) ? this.realSelection = [...t] : t ? this.realSelection = [t] : this.realSelection = [];
154
+ handler(e) {
155
+ Array.isArray(e) ? this.realSelection = [...e] : e ? this.realSelection = [e] : this.realSelection = [];
158
156
  }
159
157
  }
160
158
  },
161
159
  methods: {
162
- getValue(t) {
163
- return this.returnType === "object" ? t : this.returnType === "text" ? t.name : t.id;
160
+ getValue(e) {
161
+ return this.returnType === "object" ? e : this.returnType === "text" ? e.name : e.id;
164
162
  },
165
- isChecked(t) {
166
- const l = this.getValue(t);
163
+ isChecked(e) {
164
+ const l = this.getValue(e);
167
165
  return this.realSelection.includes(l);
168
166
  },
169
167
  emitExternal() {
@@ -176,61 +174,61 @@ const L = /* @__PURE__ */ m(T, [["render", B]]), q = {
176
174
  this.realSelection.length ? [...this.realSelection] : ""
177
175
  );
178
176
  },
179
- onChange(t) {
180
- const l = this.getValue(t);
177
+ onChange(e) {
178
+ const l = this.getValue(e);
181
179
  this.realSelection.includes(l) ? this.realSelection = this.realSelection.filter(
182
- (e) => e !== l
180
+ (t) => t !== l
183
181
  ) : this.all ? this.realSelection.push(l) : this.realSelection = [l], this.emitExternal();
184
182
  },
185
183
  toggleSelectAll() {
186
- this.all && (this.isAllSelected ? this.realSelection = [] : this.realSelection = this.list.map((t) => this.getValue(t)), this.emitExternal());
184
+ this.all && (this.isAllSelected ? this.realSelection = [] : this.realSelection = this.list.map((e) => this.getValue(e)), this.emitExternal());
187
185
  }
188
186
  }
189
187
  }, N = { class: "w-full" }, A = { class: "flex items-center justify-between" }, M = { class: "block text-sm font-medium text-gray-700" }, z = {
190
188
  key: 0,
191
189
  class: "flex items-center gap-2 select-none"
192
- }, E = ["id", "checked"], j = ["for"], F = ["id", "checked", "onChange"], P = ["for"];
193
- function K(t, l, e, n, d, r) {
190
+ }, j = ["id", "checked"], E = ["for"], F = ["id", "checked", "onChange"], P = ["for"];
191
+ function K(e, l, t, n, d, s) {
194
192
  return a(), i("div", N, [
195
193
  o("div", A, [
196
- o("h3", M, u(e.label), 1),
197
- e.all ? (a(), i("div", z, [
194
+ o("h3", M, u(t.label), 1),
195
+ t.all ? (a(), i("div", z, [
198
196
  o("input", {
199
197
  type: "checkbox",
200
- id: "todos-" + r.getUUID,
201
- checked: r.isAllSelected,
202
- onChange: l[0] || (l[0] = (...s) => r.toggleSelectAll && r.toggleSelectAll(...s)),
203
- class: "w-4 h-4 text-indigo-600 border-gray-300 rounded focus:ring-indigo-200"
204
- }, null, 40, E),
198
+ id: "todos-" + s.getUUID,
199
+ checked: s.isAllSelected,
200
+ onChange: l[0] || (l[0] = (...r) => s.toggleSelectAll && s.toggleSelectAll(...r)),
201
+ class: "w-4 h-4 accent-indigo-600 border-gray-300 rounded focus:ring-indigo-200"
202
+ }, null, 40, j),
205
203
  o("label", {
206
- for: "todos-" + r.getUUID,
204
+ for: "todos-" + s.getUUID,
207
205
  class: "text-sm text-gray-600 uppercase truncate"
208
- }, " Seleccionar todos ", 8, j)
206
+ }, " Seleccionar todos ", 8, E)
209
207
  ])) : h("", !0)
210
208
  ]),
211
209
  o("div", {
212
- class: g(["max-h-48 overflow-auto space-y-1", e.grid])
210
+ class: m(["max-h-48 overflow-auto space-y-1", t.grid])
213
211
  }, [
214
- (a(!0), i(x, null, p(e.list, (s) => (a(), i("div", {
215
- key: s.id,
212
+ (a(!0), i(p, null, w(t.list, (r) => (a(), i("div", {
213
+ key: r.id,
216
214
  class: "flex items-center gap-2 select-none"
217
215
  }, [
218
216
  o("input", {
219
217
  type: "checkbox",
220
- id: r.getUUID + "-" + s.id,
221
- checked: r.isChecked(s),
222
- onChange: (c) => r.onChange(s),
223
- class: "w-4 h-4 text-indigo-600 border-gray-300 rounded focus:ring-indigo-200"
218
+ id: s.getUUID + "-" + r.id,
219
+ checked: s.isChecked(r),
220
+ onChange: (c) => s.onChange(r),
221
+ class: "w-4 h-4 accent-indigo-600 border-gray-300 rounded focus:ring-indigo-200"
224
222
  }, null, 40, F),
225
223
  o("label", {
226
- for: r.getUUID + "-" + s.id,
224
+ for: s.getUUID + "-" + r.id,
227
225
  class: "truncate text-gray-700"
228
- }, u(s.name), 9, P)
226
+ }, u(r.name), 9, P)
229
227
  ]))), 128))
230
228
  ], 2)
231
229
  ]);
232
230
  }
233
- const W = /* @__PURE__ */ m(q, [["render", K]]), O = {
231
+ const W = /* @__PURE__ */ g(L, [["render", K]]), O = {
234
232
  name: "ComboBoxStyle",
235
233
  props: {
236
234
  modelValue: [String, Number, Object, null],
@@ -243,128 +241,128 @@ const W = /* @__PURE__ */ m(q, [["render", K]]), O = {
243
241
  },
244
242
  data() {
245
243
  return {
244
+ uuid: crypto.randomUUID(),
246
245
  search: "",
246
+ searchCopy: "",
247
247
  open: !1
248
248
  };
249
249
  },
250
- watch: {
251
- modelValue(t) {
252
- const l = this.list.find((e) => e.id === t);
253
- l && (this.search = l.name);
254
- }
255
- },
256
250
  computed: {
257
- getUUID() {
258
- return crypto.randomUUID();
259
- },
260
251
  filteredList() {
261
252
  return this.search ? this.list.filter(
262
- (t) => t.name.toLowerCase().includes(this.search.toLowerCase())
253
+ (e) => e.name.toLowerCase().includes(this.search.toLowerCase())
263
254
  ) : this.list;
264
255
  },
265
256
  model: {
266
257
  get() {
267
258
  return this.modelValue;
268
259
  },
269
- set(t) {
270
- this.$emit("update:modelValue", t);
260
+ set(e) {
261
+ this.$emit("update:modelValue", e);
262
+ }
263
+ }
264
+ },
265
+ watch: {
266
+ modelValue: {
267
+ immediate: !0,
268
+ handler(e) {
269
+ if (e === null || e === "") {
270
+ this.search = "", this.searchCopy = "";
271
+ return;
272
+ }
273
+ const l = this.list.find((t) => t.id === e);
274
+ l && (this.search = l.name, this.searchCopy = l.name);
271
275
  }
272
276
  }
273
277
  },
274
278
  methods: {
275
- selectItem(t) {
276
- this.model = t.id, this.search = t.name, this.open = !1;
279
+ selectItem(e) {
280
+ this.model = e.id, this.search = e.name, this.searchCopy = e.name, this.open = !1;
281
+ },
282
+ clearItem() {
283
+ this.disabled || (this.model = null, this.search = "", this.searchCopy = "", this.open = !1);
277
284
  },
278
285
  closeWithDelay() {
279
286
  setTimeout(() => {
280
- this.open = !1;
281
- }, 150);
287
+ this.model ? this.search.trim() !== this.searchCopy && (this.search = this.searchCopy) : this.search = "", this.open = !1;
288
+ }, 120);
282
289
  }
283
290
  }
284
- }, H = { class: "w-full" }, R = ["for"], G = {
291
+ }, H = { class: "w-full relative" }, R = ["for"], G = { class: "text-sm font-medium text-gray-700" }, J = {
285
292
  key: 0,
286
- class: "text-red-800 ml-2"
287
- }, J = {
293
+ class: "text-red-800 ml-1"
294
+ }, Q = {
288
295
  key: 0,
289
296
  class: "relative"
290
- }, Q = { class: "z-2 absolute left-2 top-1/2 -translate-y-1/2 text-gray-500 w-7 h-7" }, X = { class: "relative w-full" }, Y = ["id", "placeholder"], Z = {
291
- key: 0,
292
- class: "absolute z-10 left-0 right-0 mt-0.5 bg-white border border-gray-200 rounded shadow max-h-48 overflow-auto"
293
- }, $ = {
294
- key: 0,
295
- class: "w-full text-gray-800 bg-white px-3 py-2"
296
- }, ee = ["onClick"], te = {
297
- key: 1,
298
- class: "relative w-full"
299
- }, le = ["id", "placeholder"], re = {
300
- key: 0,
297
+ }, X = { class: "absolute left-2 top-1/2 -translate-y-1/2 text-gray-500 w-5 h-5" }, Y = ["id", "placeholder", "disabled", "required"], Z = ["id", "placeholder", "disabled", "required"], $ = {
298
+ key: 2,
301
299
  class: "absolute z-10 left-0 right-0 mt-0.5 bg-white border border-gray-200 rounded shadow max-h-48 overflow-auto"
302
- }, se = {
300
+ }, ee = {
303
301
  key: 0,
304
- class: "w-full text-gray-800 bg-white px-3 py-2"
305
- }, ie = ["onClick"];
306
- function ae(t, l, e, n, d, r) {
302
+ class: "px-3 py-2 text-gray-800"
303
+ }, te = ["onMousedown"];
304
+ function le(e, l, t, n, d, s) {
307
305
  return a(), i("div", H, [
308
306
  o("label", {
309
- class: "block text-sm font-medium text-gray-700",
310
- for: r.getUUID
307
+ class: "flex justify-between",
308
+ for: d.uuid
311
309
  }, [
312
- e.required ? (a(), i("span", G, "*")) : h("", !0),
313
- f(" " + u(e.label), 1)
314
- ], 8, R),
315
- t.$slots.icon ? (a(), i("div", J, [
316
- o("div", Q, [
317
- _(t.$slots, "icon")
310
+ o("div", G, [
311
+ y(u(t.label) + " ", 1),
312
+ t.required ? (a(), i("span", J, "*")) : h("", !0)
318
313
  ]),
314
+ s.model ? (a(), i("span", {
315
+ key: 0,
316
+ class: "text-xs px-2.5 rounded text-red-800 hover:bg-red-50 cursor-pointer",
317
+ onMousedown: l[0] || (l[0] = k(() => {
318
+ }, ["prevent"])),
319
+ onClick: l[1] || (l[1] = (...r) => s.clearItem && s.clearItem(...r))
320
+ }, "Limpiar ", 32)) : h("", !0)
321
+ ], 8, R),
322
+ e.$slots.icon ? (a(), i("div", Q, [
319
323
  o("div", X, [
320
- w(o("input", y({
321
- id: r.getUUID,
322
- type: "text",
323
- "onUpdate:modelValue": l[0] || (l[0] = (s) => d.search = s),
324
- placeholder: e.placeholder
325
- }, { disabled: e.disabled, required: e.required }, {
326
- class: "w-full text-gray-800 bg-white pl-10 pr-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed",
327
- onFocus: l[1] || (l[1] = (s) => !e.disabled && (d.open = !0)),
328
- onInput: l[2] || (l[2] = (s) => !e.disabled && (d.open = !0)),
329
- onBlur: l[3] || (l[3] = (...s) => r.closeWithDelay && r.closeWithDelay(...s))
330
- }), null, 16, Y), [
331
- [C, d.search]
332
- ]),
333
- d.open && !e.disabled ? (a(), i("div", Z, [
334
- r.filteredList.length === 0 ? (a(), i("div", $, u(e.oEmpty), 1)) : h("", !0),
335
- (a(!0), i(x, null, p(r.filteredList, (s, c) => (a(), i("div", {
336
- key: c,
337
- onClick: (v) => r.selectItem(s),
338
- class: "w-full text-gray-800 bg-white hover:bg-gray-100 px-3 py-2"
339
- }, u(s.name), 9, ee))), 128))
340
- ])) : h("", !0)
341
- ])
342
- ])) : (a(), i("div", te, [
343
- w(o("input", y({
344
- id: r.getUUID,
345
- type: "text",
346
- "onUpdate:modelValue": l[4] || (l[4] = (s) => d.search = s),
347
- placeholder: e.placeholder
348
- }, { disabled: e.disabled, required: e.required }, {
349
- class: "w-full text-gray-800 bg-white px-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed",
350
- onFocus: l[5] || (l[5] = (s) => !e.disabled && (d.open = !0)),
351
- onInput: l[6] || (l[6] = (s) => !e.disabled && (d.open = !0)),
352
- onBlur: l[7] || (l[7] = (...s) => r.closeWithDelay && r.closeWithDelay(...s))
353
- }), null, 16, le), [
354
- [C, d.search]
324
+ C(e.$slots, "icon")
355
325
  ]),
356
- d.open && !e.disabled ? (a(), i("div", re, [
357
- r.filteredList.length === 0 ? (a(), i("div", se, u(e.oEmpty), 1)) : h("", !0),
358
- (a(!0), i(x, null, p(r.filteredList, (s, c) => (a(), i("div", {
359
- key: c,
360
- onClick: (v) => r.selectItem(s),
361
- class: "w-full text-gray-800 bg-white hover:bg-gray-100 px-3 py-2"
362
- }, u(s.name), 9, ie))), 128))
363
- ])) : h("", !0)
364
- ]))
326
+ f(o("input", {
327
+ id: d.uuid,
328
+ type: "text",
329
+ "onUpdate:modelValue": l[2] || (l[2] = (r) => d.search = r),
330
+ placeholder: t.placeholder,
331
+ disabled: t.disabled,
332
+ required: t.required,
333
+ onBlur: l[3] || (l[3] = (...r) => s.closeWithDelay && s.closeWithDelay(...r)),
334
+ onFocus: l[4] || (l[4] = (r) => d.open = !t.disabled),
335
+ onInput: l[5] || (l[5] = (r) => d.open = !t.disabled),
336
+ class: "w-full pl-10 pr-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600"
337
+ }, null, 40, Y), [
338
+ [v, d.search]
339
+ ])
340
+ ])) : f((a(), i("input", {
341
+ key: 1,
342
+ id: d.uuid,
343
+ type: "text",
344
+ "onUpdate:modelValue": l[6] || (l[6] = (r) => d.search = r),
345
+ placeholder: t.placeholder,
346
+ disabled: t.disabled,
347
+ required: t.required,
348
+ onBlur: l[7] || (l[7] = (...r) => s.closeWithDelay && s.closeWithDelay(...r)),
349
+ onFocus: l[8] || (l[8] = (r) => d.open = !t.disabled),
350
+ onInput: l[9] || (l[9] = (r) => d.open = !t.disabled),
351
+ class: "w-full px-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600"
352
+ }, null, 40, Z)), [
353
+ [v, d.search]
354
+ ]),
355
+ d.open && !t.disabled ? (a(), i("div", $, [
356
+ s.filteredList.length === 0 ? (a(), i("div", ee, u(t.oEmpty), 1)) : h("", !0),
357
+ (a(!0), i(p, null, w(s.filteredList, (r) => (a(), i("div", {
358
+ key: r.id,
359
+ onMousedown: k((c) => s.selectItem(r), ["prevent"]),
360
+ class: "px-3 py-2 cursor-pointer hover:bg-gray-100"
361
+ }, u(r.name), 41, te))), 128))
362
+ ])) : h("", !0)
365
363
  ]);
366
364
  }
367
- const oe = /* @__PURE__ */ m(O, [["render", ae]]), de = {
365
+ const se = /* @__PURE__ */ g(O, [["render", le]]), re = {
368
366
  name: "DateTimeStyle",
369
367
  props: {
370
368
  modelValue: String,
@@ -387,8 +385,8 @@ const oe = /* @__PURE__ */ m(O, [["render", ae]]), de = {
387
385
  get() {
388
386
  return this.modelValue;
389
387
  },
390
- set(t) {
391
- this.$emit("update:modelValue", t);
388
+ set(e) {
389
+ this.$emit("update:modelValue", e);
392
390
  }
393
391
  },
394
392
  showDate() {
@@ -401,12 +399,12 @@ const oe = /* @__PURE__ */ m(O, [["render", ae]]), de = {
401
399
  return this.secondsMode === "max" ? "59" : "01";
402
400
  },
403
401
  dateInputClass() {
404
- let t = "w-full text-gray-800 bg-white px-3 py-1.5 border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed";
405
- return this.showDate && this.showTime ? t + " rounded-l" : t + " rounded";
402
+ let e = "w-full text-gray-800 bg-white px-3 py-1.5 border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed";
403
+ return this.showDate && this.showTime ? e + " rounded-l" : e + " rounded";
406
404
  },
407
405
  timeInputClass() {
408
- let t = "w-full text-gray-800 bg-white px-3 py-1.5 border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed";
409
- return this.showDate && this.showTime ? t + " rounded-r" : t + " rounded";
406
+ let e = "w-full text-gray-800 bg-white px-3 py-1.5 border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed";
407
+ return this.showDate && this.showTime ? e + " rounded-r" : e + " rounded";
410
408
  },
411
409
  gridClass() {
412
410
  return this.showDate && this.showTime ? "grid grid-cols-2" : "";
@@ -415,19 +413,19 @@ const oe = /* @__PURE__ */ m(O, [["render", ae]]), de = {
415
413
  watch: {
416
414
  modelValue: {
417
415
  immediate: !0,
418
- handler(t) {
419
- if (!t) {
416
+ handler(e) {
417
+ if (!e) {
420
418
  this.localDate = "", this.localTime = "";
421
419
  return;
422
420
  }
423
421
  if (this.mode === "date")
424
- this.localDate = t;
422
+ this.localDate = e;
425
423
  else if (this.mode === "time")
426
- this.localTime = t;
424
+ this.localTime = e;
427
425
  else if (this.mode === "datetime") {
428
- const [l, e] = t.split("T");
429
- this.localDate = l || "", this.localTime = e ? e.slice(0, 5) : "";
430
- } else this.mode === "datetime2" && (this.localDate = t.split("T")[0] || "", this.localTime = "");
426
+ const [l, t] = e.split("T");
427
+ this.localDate = l || "", this.localTime = t ? t.slice(0, 5) : "";
428
+ } else this.mode === "datetime2" && (this.localDate = e.split("T")[0] || "", this.localTime = "");
431
429
  }
432
430
  },
433
431
  mode: {
@@ -438,63 +436,63 @@ const oe = /* @__PURE__ */ m(O, [["render", ae]]), de = {
438
436
  }
439
437
  },
440
438
  methods: {
441
- parseValue(t) {
442
- if (!t) {
439
+ parseValue(e) {
440
+ if (!e) {
443
441
  this.localDate = "", this.localTime = "";
444
442
  return;
445
443
  }
446
444
  if (this.mode === "date")
447
- this.localDate = t, this.localTime = "";
445
+ this.localDate = e, this.localTime = "";
448
446
  else if (this.mode === "time")
449
- this.localDate = "", this.localTime = t;
447
+ this.localDate = "", this.localTime = e;
450
448
  else if (this.mode === "datetime") {
451
- const [l, e] = t.split("T");
452
- this.localDate = l || "", this.localTime = e ? e.slice(0, 5) : "";
453
- } else this.mode === "datetime2" && (this.localDate = t.split("T")[0] || "", this.localTime = "");
449
+ const [l, t] = e.split("T");
450
+ this.localDate = l || "", this.localTime = t ? t.slice(0, 5) : "";
451
+ } else this.mode === "datetime2" && (this.localDate = e.split("T")[0] || "", this.localTime = "");
454
452
  this.emitValue();
455
453
  },
456
454
  emitValue() {
457
- let t = "";
458
- this.mode === "date" ? t = this.localDate || "" : this.mode === "time" ? t = this.localTime || "" : this.mode === "datetime" ? !this.localDate || !this.localTime ? t = "" : t = `${this.localDate}T${this.localTime}:${this.segundos}.000` : this.mode === "datetime2" && (this.localDate ? t = `${this.localDate}T${this.secondsMode === "max" ? "23:59:59.000" : "00:01:00.000"}` : t = ""), this.model = t;
455
+ let e = "";
456
+ this.mode === "date" ? e = this.localDate || "" : this.mode === "time" ? e = this.localTime || "" : this.mode === "datetime" ? !this.localDate || !this.localTime ? e = "" : e = `${this.localDate}T${this.localTime}:${this.segundos}.000` : this.mode === "datetime2" && (this.localDate ? e = `${this.localDate}T${this.secondsMode === "max" ? "23:59:59.000" : "00:01:00.000"}` : e = ""), this.model = e;
459
457
  }
460
458
  }
461
- }, ne = { class: "w-full" }, ue = { class: "block text-sm font-medium text-gray-700" }, ce = {
459
+ }, ie = { class: "w-full" }, ae = { class: "block text-sm font-medium text-gray-700" }, oe = {
462
460
  key: 0,
463
461
  class: "text-red-800 ml-2"
464
462
  };
465
- function he(t, l, e, n, d, r) {
466
- return a(), i("div", ne, [
467
- o("label", ue, [
468
- e.required ? (a(), i("span", ce, "*")) : h("", !0),
469
- f(" " + u(e.label), 1)
463
+ function de(e, l, t, n, d, s) {
464
+ return a(), i("div", ie, [
465
+ o("label", ae, [
466
+ t.required ? (a(), i("span", oe, "*")) : h("", !0),
467
+ y(" " + u(t.label), 1)
470
468
  ]),
471
469
  o("div", {
472
- class: g(r.gridClass)
470
+ class: m(s.gridClass)
473
471
  }, [
474
- r.showDate ? w((a(), i("input", y({
472
+ s.showDate ? f((a(), i("input", x({
475
473
  key: 0,
476
474
  type: "date"
477
- }, { disabled: e.disabled, required: e.required }, {
478
- "onUpdate:modelValue": l[0] || (l[0] = (s) => d.localDate = s),
479
- onInput: l[1] || (l[1] = (...s) => r.emitValue && r.emitValue(...s)),
480
- class: r.dateInputClass
475
+ }, { disabled: t.disabled, required: t.required }, {
476
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => d.localDate = r),
477
+ onInput: l[1] || (l[1] = (...r) => s.emitValue && s.emitValue(...r)),
478
+ class: s.dateInputClass
481
479
  }), null, 16)), [
482
- [C, d.localDate]
480
+ [v, d.localDate]
483
481
  ]) : h("", !0),
484
- r.showTime ? w((a(), i("input", y({
482
+ s.showTime ? f((a(), i("input", x({
485
483
  key: 1,
486
484
  type: "time"
487
- }, { disabled: e.disabled, required: e.required }, {
488
- "onUpdate:modelValue": l[2] || (l[2] = (s) => d.localTime = s),
489
- onInput: l[3] || (l[3] = (...s) => r.emitValue && r.emitValue(...s)),
490
- class: r.timeInputClass
485
+ }, { disabled: t.disabled, required: t.required }, {
486
+ "onUpdate:modelValue": l[2] || (l[2] = (r) => d.localTime = r),
487
+ onInput: l[3] || (l[3] = (...r) => s.emitValue && s.emitValue(...r)),
488
+ class: s.timeInputClass
491
489
  }), null, 16)), [
492
- [C, d.localTime]
490
+ [v, d.localTime]
493
491
  ]) : h("", !0)
494
492
  ], 2)
495
493
  ]);
496
494
  }
497
- const ge = /* @__PURE__ */ m(de, [["render", he]]), me = {
495
+ const ne = /* @__PURE__ */ g(re, [["render", de]]), ue = {
498
496
  name: "InputDecimalStyle",
499
497
  props: {
500
498
  modelValue: { type: [String, Number], default: "" },
@@ -511,15 +509,15 @@ const ge = /* @__PURE__ */ m(de, [["render", he]]), me = {
511
509
  },
512
510
  formattedValue() {
513
511
  if (this.modelValue === "" || this.modelValue === null) return "";
514
- const t = parseFloat(this.modelValue);
515
- return isNaN(t) ? "" : t.toLocaleString("en-US", {
512
+ const e = parseFloat(this.modelValue);
513
+ return isNaN(e) ? "" : e.toLocaleString("en-US", {
516
514
  minimumFractionDigits: 0,
517
515
  maximumFractionDigits: Number(this.decimals)
518
516
  });
519
517
  }
520
518
  },
521
519
  methods: {
522
- onKeyDown(t) {
520
+ onKeyDown(e) {
523
521
  const l = [
524
522
  "Backspace",
525
523
  "Delete",
@@ -533,83 +531,83 @@ const ge = /* @__PURE__ */ m(de, [["render", he]]), me = {
533
531
  "Home",
534
532
  "End"
535
533
  ];
536
- if (!((t.ctrlKey || t.metaKey) && ["a", "c", "v", "x", "z"].includes(t.key.toLowerCase())) && !l.includes(t.key)) {
537
- if (t.key >= "0" && t.key <= "9") {
538
- const e = t.target.value.replace(/,/g, ""), n = t.target.selectionStart, d = e.split(".");
534
+ if (!((e.ctrlKey || e.metaKey) && ["a", "c", "v", "x", "z"].includes(e.key.toLowerCase())) && !l.includes(e.key)) {
535
+ if (e.key >= "0" && e.key <= "9") {
536
+ const t = e.target.value.replace(/,/g, ""), n = e.target.selectionStart, d = t.split(".");
539
537
  if (d.length === 2) {
540
- const r = d[1];
541
- n > e.indexOf(".") && r.length >= Number(this.decimals) && t.preventDefault();
538
+ const s = d[1];
539
+ n > t.indexOf(".") && s.length >= Number(this.decimals) && e.preventDefault();
542
540
  }
543
541
  return;
544
542
  }
545
- t.key === "." || t.key === "," ? (Number(this.decimals) === 0 || t.target.value.includes(".")) && t.preventDefault() : t.preventDefault();
543
+ e.key === "." || e.key === "," ? (Number(this.decimals) === 0 || e.target.value.includes(".")) && e.preventDefault() : e.preventDefault();
546
544
  }
547
545
  },
548
- onInput(t) {
549
- let l = t.target.value.replace(/[^0-9.]/g, "");
546
+ onInput(e) {
547
+ let l = e.target.value.replace(/[^0-9.]/g, "");
550
548
  Number(this.decimals) === 0 && (l = l.replace(/\./g, ""));
551
- const e = l.split(".");
552
- e.length > 2 && (l = e[0] + "." + e.slice(1).join("")), e[1] && e[1].length > Number(this.decimals) && (l = e[0] + "." + e[1].slice(0, Number(this.decimals))), this.$emit("update:modelValue", l);
549
+ const t = l.split(".");
550
+ t.length > 2 && (l = t[0] + "." + t.slice(1).join("")), t[1] && t[1].length > Number(this.decimals) && (l = t[0] + "." + t[1].slice(0, Number(this.decimals))), this.$emit("update:modelValue", l);
553
551
  },
554
- onPaste(t) {
555
- let e = (t.clipboardData || window.clipboardData).getData("text").replace(/[^0-9.]/g, "");
556
- Number(this.decimals) === 0 && (e = e.replace(/\./g, ""));
557
- const n = e.split(".");
558
- n.length > 2 && (e = n[0] + "." + n.slice(1).join("")), n[1] && n[1].length > Number(this.decimals) && (e = n[0] + "." + n[1].slice(0, Number(this.decimals))), e !== "" && this.$emit("update:modelValue", e);
552
+ onPaste(e) {
553
+ let t = (e.clipboardData || window.clipboardData).getData("text").replace(/[^0-9.]/g, "");
554
+ Number(this.decimals) === 0 && (t = t.replace(/\./g, ""));
555
+ const n = t.split(".");
556
+ n.length > 2 && (t = n[0] + "." + n.slice(1).join("")), n[1] && n[1].length > Number(this.decimals) && (t = n[0] + "." + n[1].slice(0, Number(this.decimals))), t !== "" && this.$emit("update:modelValue", t);
559
557
  },
560
558
  onBlur() {
561
- let t = this.modelValue ? parseFloat(this.modelValue) : "";
562
- !isNaN(t) && t !== "" && (t = t.toFixed(Number(this.decimals))), this.$emit("update:modelValue", t);
559
+ let e = this.modelValue ? parseFloat(this.modelValue) : "";
560
+ !isNaN(e) && e !== "" && (e = e.toFixed(Number(this.decimals))), this.$emit("update:modelValue", e);
563
561
  }
564
562
  }
565
- }, be = { class: "w-full" }, ye = ["for"], fe = {
563
+ }, ce = { class: "w-full" }, he = ["for"], me = {
566
564
  key: 0,
567
565
  class: "text-red-800 ml-2"
568
- }, xe = {
566
+ }, ge = {
569
567
  key: 0,
570
568
  class: "relative"
571
- }, pe = { class: "absolute left-2 top-1/2 -translate-y-1/2 text-gray-500 w-5 h-5" }, we = ["id", "value", "placeholder", "maxlength"], ve = ["id", "value", "placeholder", "maxlength"];
572
- function Ce(t, l, e, n, d, r) {
573
- return a(), i("div", be, [
569
+ }, be = { class: "absolute left-2 top-1/2 -translate-y-1/2 text-gray-500 w-5 h-5" }, ye = ["id", "value", "placeholder", "maxlength"], fe = ["id", "value", "placeholder", "maxlength"];
570
+ function xe(e, l, t, n, d, s) {
571
+ return a(), i("div", ce, [
574
572
  o("label", {
575
573
  class: "block text-sm font-medium text-gray-700",
576
- for: r.getUUID
574
+ for: s.getUUID
577
575
  }, [
578
- e.required ? (a(), i("span", fe, "*")) : h("", !0),
579
- f(" " + u(e.label), 1)
580
- ], 8, ye),
581
- t.$slots.icon ? (a(), i("div", xe, [
582
- o("div", pe, [
583
- _(t.$slots, "icon")
576
+ t.required ? (a(), i("span", me, "*")) : h("", !0),
577
+ y(" " + u(t.label), 1)
578
+ ], 8, he),
579
+ e.$slots.icon ? (a(), i("div", ge, [
580
+ o("div", be, [
581
+ C(e.$slots, "icon")
584
582
  ]),
585
- o("input", y({
583
+ o("input", x({
586
584
  type: "text",
587
- id: r.getUUID,
588
- value: r.formattedValue,
589
- onInput: l[0] || (l[0] = (...s) => r.onInput && r.onInput(...s)),
590
- onKeydown: l[1] || (l[1] = (...s) => r.onKeyDown && r.onKeyDown(...s)),
591
- onBlur: l[2] || (l[2] = (...s) => r.onBlur && r.onBlur(...s)),
585
+ id: s.getUUID,
586
+ value: s.formattedValue,
587
+ onInput: l[0] || (l[0] = (...r) => s.onInput && s.onInput(...r)),
588
+ onKeydown: l[1] || (l[1] = (...r) => s.onKeyDown && s.onKeyDown(...r)),
589
+ onBlur: l[2] || (l[2] = (...r) => s.onBlur && s.onBlur(...r)),
592
590
  inputmode: "decimal",
593
- placeholder: e.placeholder,
594
- onPaste: l[3] || (l[3] = S((...s) => r.onPaste && r.onPaste(...s), ["prevent"])),
595
- maxlength: e.maxlength ? Number(e.maxlength) : null
596
- }, { disabled: e.disabled, required: e.required }, { class: "w-full text-gray-800 bg-white pl-8 pr-3 py-1.5 rounded border border-gray-200 text-right focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed" }), null, 16, we)
597
- ])) : (a(), i("input", y({
591
+ placeholder: t.placeholder,
592
+ onPaste: l[3] || (l[3] = k((...r) => s.onPaste && s.onPaste(...r), ["prevent"])),
593
+ maxlength: t.maxlength ? Number(t.maxlength) : null
594
+ }, { disabled: t.disabled, required: t.required }, { class: "w-full text-gray-800 bg-white pl-8 pr-3 py-1.5 rounded border border-gray-200 text-right focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed" }), null, 16, ye)
595
+ ])) : (a(), i("input", x({
598
596
  key: 1,
599
597
  type: "text",
600
- id: r.getUUID,
601
- value: r.formattedValue,
602
- onInput: l[4] || (l[4] = (...s) => r.onInput && r.onInput(...s)),
603
- onKeydown: l[5] || (l[5] = (...s) => r.onKeyDown && r.onKeyDown(...s)),
604
- onBlur: l[6] || (l[6] = (...s) => r.onBlur && r.onBlur(...s)),
598
+ id: s.getUUID,
599
+ value: s.formattedValue,
600
+ onInput: l[4] || (l[4] = (...r) => s.onInput && s.onInput(...r)),
601
+ onKeydown: l[5] || (l[5] = (...r) => s.onKeyDown && s.onKeyDown(...r)),
602
+ onBlur: l[6] || (l[6] = (...r) => s.onBlur && s.onBlur(...r)),
605
603
  inputmode: "decimal",
606
- placeholder: e.placeholder,
607
- onPaste: l[7] || (l[7] = S((...s) => r.onPaste && r.onPaste(...s), ["prevent"])),
608
- maxlength: e.maxlength ? Number(e.maxlength) : null
609
- }, { disabled: e.disabled, required: e.required }, { class: "w-full text-gray-800 bg-white px-3 py-1.5 rounded border border-gray-200 text-right focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed" }), null, 16, ve))
604
+ placeholder: t.placeholder,
605
+ onPaste: l[7] || (l[7] = k((...r) => s.onPaste && s.onPaste(...r), ["prevent"])),
606
+ maxlength: t.maxlength ? Number(t.maxlength) : null
607
+ }, { disabled: t.disabled, required: t.required }, { class: "w-full text-gray-800 bg-white px-3 py-1.5 rounded border border-gray-200 text-right focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed" }), null, 16, fe))
610
608
  ]);
611
609
  }
612
- const _e = /* @__PURE__ */ m(me, [["render", Ce]]), Se = {
610
+ const pe = /* @__PURE__ */ g(ue, [["render", xe]]), we = {
613
611
  name: "InputStyle",
614
612
  props: {
615
613
  modelValue: { type: [String, Number], default: "" },
@@ -628,57 +626,57 @@ const _e = /* @__PURE__ */ m(me, [["render", Ce]]), Se = {
628
626
  get() {
629
627
  return this.modelValue;
630
628
  },
631
- set(t) {
632
- this.$emit("update:modelValue", t);
629
+ set(e) {
630
+ this.$emit("update:modelValue", e);
633
631
  }
634
632
  }
635
633
  }
636
- }, ke = { class: "w-full" }, De = ["for"], Ue = {
634
+ }, ve = { class: "w-full" }, Ce = ["for"], Se = {
637
635
  key: 0,
638
636
  class: "text-red-800 ml-2"
639
- }, Ve = {
637
+ }, ke = {
640
638
  key: 0,
641
639
  class: "relative"
642
- }, Te = { class: "absolute left-2 top-1/2 -translate-y-1/2 text-gray-500 w-5 h-5" }, Ie = ["id", "type", "maxlength", "placeholder"], Be = ["id", "type", "maxlength", "placeholder"];
643
- function Le(t, l, e, n, d, r) {
644
- return a(), i("div", ke, [
640
+ }, _e = { class: "absolute left-2 top-1/2 -translate-y-1/2 text-gray-500 w-5 h-5" }, De = ["id", "type", "maxlength", "placeholder"], Ve = ["id", "type", "maxlength", "placeholder"];
641
+ function Ue(e, l, t, n, d, s) {
642
+ return a(), i("div", ve, [
645
643
  o("label", {
646
644
  class: "block text-sm font-medium text-gray-700",
647
- for: r.getUUID
645
+ for: s.getUUID
648
646
  }, [
649
- e.required ? (a(), i("span", Ue, "*")) : h("", !0),
650
- f(" " + u(e.label), 1)
651
- ], 8, De),
652
- t.$slots.icon ? (a(), i("div", Ve, [
653
- o("div", Te, [
654
- _(t.$slots, "icon")
647
+ t.required ? (a(), i("span", Se, "*")) : h("", !0),
648
+ y(" " + u(t.label), 1)
649
+ ], 8, Ce),
650
+ e.$slots.icon ? (a(), i("div", ke, [
651
+ o("div", _e, [
652
+ C(e.$slots, "icon")
655
653
  ]),
656
- w(o("input", y({
657
- id: r.getUUID,
658
- type: e.type,
659
- maxlength: e.maxlength ? Number(e.maxlength) : null,
660
- placeholder: e.placeholder
661
- }, { disabled: e.disabled, required: e.required }, {
662
- "onUpdate:modelValue": l[0] || (l[0] = (s) => r.model = s),
654
+ f(o("input", x({
655
+ id: s.getUUID,
656
+ type: t.type,
657
+ maxlength: t.maxlength ? Number(t.maxlength) : null,
658
+ placeholder: t.placeholder
659
+ }, { disabled: t.disabled, required: t.required }, {
660
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => s.model = r),
663
661
  class: "w-full text-gray-800 bg-white pl-8 pr-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed"
664
- }), null, 16, Ie), [
665
- [k, r.model]
662
+ }), null, 16, De), [
663
+ [_, s.model]
666
664
  ])
667
- ])) : w((a(), i("input", y({
665
+ ])) : f((a(), i("input", x({
668
666
  key: 1,
669
- id: r.getUUID,
670
- type: e.type,
671
- maxlength: e.maxlength ? Number(e.maxlength) : null,
672
- placeholder: e.placeholder
673
- }, { disabled: e.disabled, required: e.required }, {
674
- "onUpdate:modelValue": l[1] || (l[1] = (s) => r.model = s),
667
+ id: s.getUUID,
668
+ type: t.type,
669
+ maxlength: t.maxlength ? Number(t.maxlength) : null,
670
+ placeholder: t.placeholder
671
+ }, { disabled: t.disabled, required: t.required }, {
672
+ "onUpdate:modelValue": l[1] || (l[1] = (r) => s.model = r),
675
673
  class: "w-full text-gray-800 bg-white px-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed"
676
- }), null, 16, Be)), [
677
- [k, r.model]
674
+ }), null, 16, Ve)), [
675
+ [_, s.model]
678
676
  ])
679
677
  ]);
680
678
  }
681
- const qe = /* @__PURE__ */ m(Se, [["render", Le]]), Ne = {
679
+ const Te = /* @__PURE__ */ g(we, [["render", Ue]]), Ie = {
682
680
  name: "SelectStyle",
683
681
  props: {
684
682
  modelValue: [String, Number, Object, null],
@@ -699,44 +697,44 @@ const qe = /* @__PURE__ */ m(Se, [["render", Le]]), Ne = {
699
697
  get() {
700
698
  return this.modelValue;
701
699
  },
702
- set(t) {
703
- this.$emit("update:modelValue", t);
700
+ set(e) {
701
+ this.$emit("update:modelValue", e);
704
702
  }
705
703
  }
706
704
  }
707
- }, Ae = { class: "w-full" }, Me = ["for"], ze = {
705
+ }, Be = { class: "w-full" }, qe = ["for"], Le = {
708
706
  key: 0,
709
707
  class: "text-red-800 ml-2"
710
- }, Ee = ["id"], je = {
708
+ }, Ne = ["id"], Ae = {
711
709
  value: "",
712
710
  disabled: ""
713
- }, Fe = ["value"];
714
- function Pe(t, l, e, n, d, r) {
715
- return a(), i("div", Ae, [
711
+ }, Me = ["value"];
712
+ function ze(e, l, t, n, d, s) {
713
+ return a(), i("div", Be, [
716
714
  o("label", {
717
715
  class: "block text-sm font-medium text-gray-700",
718
- for: r.getUUID
716
+ for: s.getUUID
719
717
  }, [
720
- e.required ? (a(), i("span", ze, "*")) : h("", !0),
721
- f(" " + u(e.label), 1)
722
- ], 8, Me),
723
- w(o("select", y({
724
- "onUpdate:modelValue": l[0] || (l[0] = (s) => r.model = s)
725
- }, { disabled: e.disabled, required: e.required }, {
726
- id: r.getUUID,
718
+ t.required ? (a(), i("span", Le, "*")) : h("", !0),
719
+ y(" " + u(t.label), 1)
720
+ ], 8, qe),
721
+ f(o("select", x({
722
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => s.model = r)
723
+ }, { disabled: t.disabled, required: t.required }, {
724
+ id: s.getUUID,
727
725
  class: "w-full text-gray-800 bg-white px-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed"
728
726
  }), [
729
- o("option", je, u(e.list.length > 0 ? e.option : e.oEmpty), 1),
730
- (a(!0), i(x, null, p(e.list, (s, c) => (a(), i("option", {
727
+ o("option", Ae, u(t.list.length > 0 ? t.option : t.oEmpty), 1),
728
+ (a(!0), i(p, null, w(t.list, (r, c) => (a(), i("option", {
731
729
  key: c,
732
- value: s.id
733
- }, u(s.text), 9, Fe))), 128))
734
- ], 16, Ee), [
735
- [U, r.model]
730
+ value: r.id
731
+ }, u(r.text), 9, Me))), 128))
732
+ ], 16, Ne), [
733
+ [V, s.model]
736
734
  ])
737
735
  ]);
738
736
  }
739
- const Ke = /* @__PURE__ */ m(Ne, [["render", Pe]]), We = {
737
+ const je = /* @__PURE__ */ g(Ie, [["render", ze]]), Ee = {
740
738
  props: {
741
739
  modelValue: { type: Number, default: 0 },
742
740
  steps: { type: Array, required: !0 },
@@ -757,8 +755,8 @@ const Ke = /* @__PURE__ */ m(Ne, [["render", Pe]]), We = {
757
755
  get() {
758
756
  return this.modelValue;
759
757
  },
760
- set(t) {
761
- this.$emit("update:modelValue", t);
758
+ set(e) {
759
+ this.$emit("update:modelValue", e);
762
760
  }
763
761
  },
764
762
  solid() {
@@ -771,22 +769,22 @@ const Ke = /* @__PURE__ */ m(Ne, [["render", Pe]]), We = {
771
769
  };
772
770
  },
773
771
  barActive() {
774
- return this.solid[this.color].split(" ").find((t) => t.startsWith("bg-"));
772
+ return this.solid[this.color].split(" ").find((e) => e.startsWith("bg-"));
775
773
  },
776
774
  lineActive() {
777
775
  return this.barActive;
778
776
  },
779
777
  progressWidth() {
780
- const t = this.steps.length;
781
- return this.step === 0 ? 10 : this.step / (t - 1) * 100;
778
+ const e = this.steps.length;
779
+ return this.step === 0 ? 10 : this.step / (e - 1) * 100;
782
780
  }
783
781
  },
784
782
  methods: {
785
- circleClass(t) {
786
- return this.step === t ? `${this.barActive} text-white` : this.step > t ? `${this.barActive} text-white opacity-90` : "bg-white text-gray-400 border-gray-300";
783
+ circleClass(e) {
784
+ return this.step === e ? `${this.barActive} text-white` : this.step > e ? `${this.barActive} text-white opacity-90` : "bg-white text-gray-400 border-gray-300";
787
785
  },
788
- textClass(t) {
789
- return this.step >= t ? this.barActive.replace("bg-", "text-") : "text-gray-400";
786
+ textClass(e) {
787
+ return this.step >= e ? this.barActive.replace("bg-", "text-") : "text-gray-400";
790
788
  },
791
789
  next() {
792
790
  this.step < this.steps.length - 1 && this.step++;
@@ -794,40 +792,40 @@ const Ke = /* @__PURE__ */ m(Ne, [["render", Pe]]), We = {
794
792
  previous() {
795
793
  this.step > 0 && this.step--;
796
794
  },
797
- select(t) {
798
- this.step = t;
795
+ select(e) {
796
+ this.step = e;
799
797
  },
800
798
  submitForm() {
801
799
  this.$emit("submit");
802
800
  }
803
801
  }
804
- }, Oe = { class: "flex items-center gap-6 w-full" }, He = ["disabled"], Re = { class: "flex-1" }, Ge = {
802
+ }, Fe = { class: "flex items-center gap-6 w-full" }, Pe = ["disabled"], Ke = { class: "flex-1" }, We = {
805
803
  key: 0,
806
804
  class: "flex items-center"
807
- }, Je = ["onClick"], Qe = {
805
+ }, Oe = ["onClick"], He = {
808
806
  key: 0,
809
807
  class: "w-4 h-4",
810
808
  fill: "none",
811
809
  stroke: "currentColor",
812
810
  viewBox: "0 0 24 24"
813
- }, Xe = {
811
+ }, Re = {
814
812
  key: 1,
815
813
  class: "text-sm"
816
- }, Ye = {
814
+ }, Ge = {
817
815
  key: 1,
818
816
  class: "w-full"
819
- }, Ze = {
817
+ }, Je = {
820
818
  key: 0,
821
819
  class: "text-xs mb-1 block"
822
- }, $e = { class: "w-full h-3 rounded-full bg-gray-200 overflow-hidden relative" }, et = { key: 1 };
823
- function tt(t, l, e, n, d, r) {
824
- return a(), i("div", Oe, [
825
- e.button ? (a(), i("button", {
820
+ }, Qe = { class: "w-full h-3 rounded-full bg-gray-200 overflow-hidden relative" }, Xe = { key: 1 };
821
+ function Ye(e, l, t, n, d, s) {
822
+ return a(), i("div", Fe, [
823
+ t.button ? (a(), i("button", {
826
824
  key: 0,
827
825
  type: "button",
828
- disabled: r.step === 0,
829
- onClick: l[0] || (l[0] = (...s) => r.previous && r.previous(...s)),
830
- class: g(["h-min inline-flex items-center gap-1 px-3 py-1.5 rounded font-semibold", r.solid[e.color]])
826
+ disabled: s.step === 0,
827
+ onClick: l[0] || (l[0] = (...r) => s.previous && s.previous(...r)),
828
+ class: m(["h-min inline-flex items-center gap-1 px-3 py-1.5 rounded font-semibold", s.solid[t.color]])
831
829
  }, [
832
830
  l[3] || (l[3] = o("svg", {
833
831
  class: "w-5 h-5",
@@ -842,61 +840,61 @@ function tt(t, l, e, n, d, r) {
842
840
  d: "M15 19l-7-7 7-7"
843
841
  })
844
842
  ], -1)),
845
- f(" " + u(e.btnPrevious), 1)
846
- ], 10, He)) : h("", !0),
847
- o("div", Re, [
848
- e.type === "circle" ? (a(), i("div", Ge, [
849
- (a(!0), i(x, null, p(e.steps, (s, c) => (a(), i("div", {
843
+ y(" " + u(t.btnPrevious), 1)
844
+ ], 10, Pe)) : h("", !0),
845
+ o("div", Ke, [
846
+ t.type === "circle" ? (a(), i("div", We, [
847
+ (a(!0), i(p, null, w(t.steps, (r, c) => (a(), i("div", {
850
848
  key: c,
851
- class: g(["flex items-center", c < e.steps.length - 1 ? "flex-1" : ""])
849
+ class: m(["flex items-center", c < t.steps.length - 1 ? "flex-1" : ""])
852
850
  }, [
853
851
  o("div", {
854
- class: g(["flex flex-col items-center relative", e.selected ? "cursor-pointer" : "pointer-events-none"]),
855
- onClick: (v) => r.select(c)
852
+ class: m(["flex flex-col items-center relative", t.selected ? "cursor-pointer" : "pointer-events-none"]),
853
+ onClick: (S) => s.select(c)
856
854
  }, [
857
855
  o("div", {
858
- class: g(["w-9 h-9 rounded-full flex items-center justify-center border-2 font-semibold transition-colors duration-200", r.circleClass(c)])
856
+ class: m(["w-9 h-9 rounded-full flex items-center justify-center border-2 font-semibold transition-colors duration-200", s.circleClass(c)])
859
857
  }, [
860
- r.step > c ? (a(), i("svg", Qe, [...l[4] || (l[4] = [
858
+ s.step > c ? (a(), i("svg", He, [...l[4] || (l[4] = [
861
859
  o("path", {
862
860
  "stroke-linecap": "round",
863
861
  "stroke-linejoin": "round",
864
862
  "stroke-width": "3",
865
863
  d: "M5 13l4 4L19 7"
866
864
  }, null, -1)
867
- ])])) : (a(), i("span", Xe, u(c + 1), 1))
865
+ ])])) : (a(), i("span", Re, u(c + 1), 1))
868
866
  ], 2),
869
- e.text === "all" || e.text === "only" && r.step === c ? (a(), i("span", {
867
+ t.text === "all" || t.text === "only" && s.step === c ? (a(), i("span", {
870
868
  key: 0,
871
- class: g(["absolute -top-5 text-xs font-medium whitespace-nowrap transition-colors duration-200", r.textClass(c)])
872
- }, u(s), 3)) : h("", !0)
873
- ], 10, Je),
874
- c < e.steps.length - 1 ? (a(), i("div", {
869
+ class: m(["absolute -top-5 text-xs font-medium whitespace-nowrap transition-colors duration-200", s.textClass(c)])
870
+ }, u(r), 3)) : h("", !0)
871
+ ], 10, Oe),
872
+ c < t.steps.length - 1 ? (a(), i("div", {
875
873
  key: 0,
876
- class: g(["flex-1 h-2 mx-3 rounded transition-colors duration-200", r.step > c ? r.lineActive : "bg-gray-300"])
874
+ class: m(["flex-1 h-2 mx-3 rounded transition-colors duration-200", s.step > c ? s.lineActive : "bg-gray-300"])
877
875
  }, null, 2)) : h("", !0)
878
876
  ], 2))), 128))
879
- ])) : e.type === "linear" ? (a(), i("div", Ye, [
880
- e.text === "all" ? (a(), i("span", Ze, u(Math.round(r.progressWidth)) + "% ", 1)) : h("", !0),
881
- o("div", $e, [
877
+ ])) : t.type === "linear" ? (a(), i("div", Ge, [
878
+ t.text === "all" ? (a(), i("span", Je, u(Math.round(s.progressWidth)) + "% ", 1)) : h("", !0),
879
+ o("div", Qe, [
882
880
  l[6] || (l[6] = o("div", { class: "absolute inset-0" }, null, -1)),
883
881
  o("div", {
884
- class: g(["h-full rounded-full transition-all duration-300 relative shadow-md", r.barActive]),
885
- style: V({ width: r.progressWidth + "%" })
882
+ class: m(["h-full rounded-full transition-all duration-300 relative shadow-md", s.barActive]),
883
+ style: U({ width: s.progressWidth + "%" })
886
884
  }, [...l[5] || (l[5] = [
887
885
  o("div", { class: "absolute inset-0 bg-white/20 mix-blend-overlay animate-pulse" }, null, -1)
888
886
  ])], 6)
889
887
  ])
890
888
  ])) : h("", !0)
891
889
  ]),
892
- e.button ? (a(), i("div", et, [
893
- r.step < e.steps.length - 1 ? (a(), i("button", {
890
+ t.button ? (a(), i("div", Xe, [
891
+ s.step < t.steps.length - 1 ? (a(), i("button", {
894
892
  key: 0,
895
893
  type: "button",
896
- onClick: l[1] || (l[1] = (...s) => r.next && r.next(...s)),
897
- class: g(["h-min inline-flex items-center gap-1 px-3 py-1.5 rounded font-semibold", r.solid[e.color]])
894
+ onClick: l[1] || (l[1] = (...r) => s.next && s.next(...r)),
895
+ class: m(["h-min inline-flex items-center gap-1 px-3 py-1.5 rounded font-semibold", s.solid[t.color]])
898
896
  }, [
899
- f(u(e.btnNext) + " ", 1),
897
+ y(u(t.btnNext) + " ", 1),
900
898
  l[7] || (l[7] = o("svg", {
901
899
  class: "w-5 h-5",
902
900
  fill: "none",
@@ -913,10 +911,10 @@ function tt(t, l, e, n, d, r) {
913
911
  ], 2)) : (a(), i("button", {
914
912
  key: 1,
915
913
  type: "button",
916
- onClick: l[2] || (l[2] = (...s) => r.submitForm && r.submitForm(...s)),
917
- class: g(["h-min inline-flex items-center gap-1 px-3 py-1.5 rounded font-semibold", r.solid[e.color]])
914
+ onClick: l[2] || (l[2] = (...r) => s.submitForm && s.submitForm(...r)),
915
+ class: m(["h-min inline-flex items-center gap-1 px-3 py-1.5 rounded font-semibold", s.solid[t.color]])
918
916
  }, [
919
- f(u(e.btnFinish) + " ", 1),
917
+ y(u(t.btnFinish) + " ", 1),
920
918
  l[8] || (l[8] = o("svg", {
921
919
  class: "w-5 h-5",
922
920
  fill: "none",
@@ -934,54 +932,54 @@ function tt(t, l, e, n, d, r) {
934
932
  ])) : h("", !0)
935
933
  ]);
936
934
  }
937
- const lt = /* @__PURE__ */ m(We, [["render", tt]]), rt = {
935
+ const Ze = /* @__PURE__ */ g(Ee, [["render", Ye]]), $e = {
938
936
  name: "TableStyle",
939
937
  props: {
940
938
  columns: { type: Array, required: !0 },
941
939
  rows: { type: Array, default: () => [] }
942
940
  }
943
- }, st = { class: "w-full overflow-x-auto bg-white border border-gray-300 rounded shadow-sm" }, it = { class: "min-w-full" }, at = { class: "bg-gray-800" }, ot = { key: 1 }, dt = { key: 0 }, nt = ["colspan"];
944
- function ut(t, l, e, n, d, r) {
945
- return a(), i("div", st, [
946
- o("table", it, [
941
+ }, et = { class: "w-full overflow-x-auto bg-white border border-gray-300 rounded shadow-sm" }, tt = { class: "min-w-full" }, lt = { class: "bg-gray-800" }, st = { key: 1 }, rt = { key: 0 }, it = ["colspan"];
942
+ function at(e, l, t, n, d, s) {
943
+ return a(), i("div", et, [
944
+ o("table", tt, [
947
945
  o("thead", null, [
948
- o("tr", at, [
949
- (a(!0), i(x, null, p(e.columns, (s, c) => (a(), i("th", {
946
+ o("tr", lt, [
947
+ (a(!0), i(p, null, w(t.columns, (r, c) => (a(), i("th", {
950
948
  key: c,
951
949
  class: "px-4 py-1.5 text-left text-sm font-semibold text-white border-b border-gray-600"
952
- }, u(s.label), 1))), 128))
950
+ }, u(r.label), 1))), 128))
953
951
  ])
954
952
  ]),
955
953
  o("tbody", null, [
956
- (a(!0), i(x, null, p(e.rows, (s, c) => (a(), i("tr", {
954
+ (a(!0), i(p, null, w(t.rows, (r, c) => (a(), i("tr", {
957
955
  key: c,
958
956
  class: "hover:bg-gray-100 transition-colors cursor-default"
959
957
  }, [
960
- (a(!0), i(x, null, p(e.columns, (v, D) => (a(), i("td", {
958
+ (a(!0), i(p, null, w(t.columns, (S, D) => (a(), i("td", {
961
959
  key: D,
962
960
  class: "px-4 py-1.5 text-sm text-gray-700 border-b border-gray-200"
963
961
  }, [
964
- t.$slots[v.field] ? _(t.$slots, v.field, {
962
+ e.$slots[S.field] ? C(e.$slots, S.field, {
965
963
  key: 0,
966
- row: s
967
- }) : (a(), i("span", ot, u(s[v.field]), 1))
964
+ row: r
965
+ }) : (a(), i("span", st, u(r[S.field]), 1))
968
966
  ]))), 128))
969
967
  ]))), 128)),
970
- e.rows.length === 0 ? (a(), i("tr", dt, [
968
+ t.rows.length === 0 ? (a(), i("tr", rt, [
971
969
  o("td", {
972
- colspan: e.columns.length,
970
+ colspan: t.columns.length,
973
971
  class: "px-4 py-10 text-center text-gray-500 text-sm bg-gray-50"
974
972
  }, [...l[0] || (l[0] = [
975
973
  o("div", { class: "flex flex-col items-center gap-3" }, [
976
974
  o("span", { class: "text-gray-600 font-medium" }, "No hay datos para mostrar")
977
975
  ], -1)
978
- ])], 8, nt)
976
+ ])], 8, it)
979
977
  ])) : h("", !0)
980
978
  ])
981
979
  ])
982
980
  ]);
983
981
  }
984
- const ct = /* @__PURE__ */ m(rt, [["render", ut]]), ht = {
982
+ const ot = /* @__PURE__ */ g($e, [["render", at]]), dt = {
985
983
  name: "TextAreaStyle",
986
984
  props: {
987
985
  modelValue: String,
@@ -1001,45 +999,45 @@ const ct = /* @__PURE__ */ m(rt, [["render", ut]]), ht = {
1001
999
  get() {
1002
1000
  return this.modelValue;
1003
1001
  },
1004
- set(t) {
1005
- this.$emit("update:modelValue", t);
1002
+ set(e) {
1003
+ this.$emit("update:modelValue", e);
1006
1004
  }
1007
1005
  }
1008
1006
  }
1009
- }, gt = { class: "w-full" }, mt = { class: "flex justify-between" }, bt = ["for"], yt = {
1007
+ }, nt = { class: "w-full" }, ut = { class: "flex justify-between" }, ct = ["for"], ht = {
1010
1008
  key: 0,
1011
1009
  class: "text-red-800 ml-2"
1012
- }, ft = ["for"], xt = ["id", "placeholder", "maxlength", "rows"];
1013
- function pt(t, l, e, n, d, r) {
1014
- return a(), i("div", gt, [
1015
- o("div", mt, [
1010
+ }, mt = ["for"], gt = ["id", "placeholder", "maxlength", "rows"];
1011
+ function bt(e, l, t, n, d, s) {
1012
+ return a(), i("div", nt, [
1013
+ o("div", ut, [
1016
1014
  o("label", {
1017
1015
  class: "block text-sm font-medium text-gray-700",
1018
- for: r.getUUID
1016
+ for: s.getUUID
1019
1017
  }, [
1020
- e.required ? (a(), i("span", yt, "*")) : h("", !0),
1021
- f(" " + u(e.label), 1)
1022
- ], 8, bt),
1023
- e.note ? (a(), i("label", {
1018
+ t.required ? (a(), i("span", ht, "*")) : h("", !0),
1019
+ y(" " + u(t.label), 1)
1020
+ ], 8, ct),
1021
+ t.note ? (a(), i("label", {
1024
1022
  key: 0,
1025
1023
  class: "block text-xs text-gray-700",
1026
- for: r.getUUID
1027
- }, u(e.note), 9, ft)) : h("", !0)
1024
+ for: s.getUUID
1025
+ }, u(t.note), 9, mt)) : h("", !0)
1028
1026
  ]),
1029
- w(o("textarea", y({
1030
- "onUpdate:modelValue": l[0] || (l[0] = (s) => r.model = s),
1031
- id: r.getUUID,
1032
- placeholder: e.placeholder
1033
- }, { disabled: e.disabled, required: e.required }, {
1034
- maxlength: e.maxlength ? Number(e.maxlength) : null,
1035
- rows: Number(e.row),
1027
+ f(o("textarea", x({
1028
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => s.model = r),
1029
+ id: s.getUUID,
1030
+ placeholder: t.placeholder
1031
+ }, { disabled: t.disabled, required: t.required }, {
1032
+ maxlength: t.maxlength ? Number(t.maxlength) : null,
1033
+ rows: Number(t.row),
1036
1034
  class: "w-full text-gray-800 bg-white px-3 py-1.5 rounded border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:bg-gray-100 disabled:text-gray-600 disabled:cursor-not-allowed resize-none"
1037
- }), null, 16, xt), [
1038
- [C, r.model]
1035
+ }), null, 16, gt), [
1036
+ [v, s.model]
1039
1037
  ])
1040
1038
  ]);
1041
1039
  }
1042
- const wt = /* @__PURE__ */ m(ht, [["render", pt]]), vt = {
1040
+ const yt = /* @__PURE__ */ g(dt, [["render", bt]]), ft = {
1043
1041
  name: "ToggleStyle",
1044
1042
  props: {
1045
1043
  modelValue: { type: Boolean, default: !1 },
@@ -1055,8 +1053,8 @@ const wt = /* @__PURE__ */ m(ht, [["render", pt]]), vt = {
1055
1053
  get() {
1056
1054
  return this.modelValue;
1057
1055
  },
1058
- set(t) {
1059
- this.$emit("update:modelValue", t);
1056
+ set(e) {
1057
+ this.$emit("update:modelValue", e);
1060
1058
  }
1061
1059
  },
1062
1060
  shapeToggle() {
@@ -1066,24 +1064,24 @@ const wt = /* @__PURE__ */ m(ht, [["render", pt]]), vt = {
1066
1064
  }[this.shape];
1067
1065
  },
1068
1066
  computedClasses() {
1069
- const t = {
1067
+ const e = {
1070
1068
  gray: "bg-slate-600 hover:bg-slate-700 border border-gray-800 cursor-pointer",
1071
1069
  green: "bg-emerald-600 hover:bg-emerald-700 border border-green-700 cursor-pointer",
1072
1070
  blue: "bg-sky-600 hover:bg-sky-700 border border-blue-700 cursor-pointer",
1073
1071
  red: "bg-rose-600 hover:bg-rose-700 border border-red-700 cursor-pointer",
1074
1072
  yellow: "bg-amber-600 hover:bg-amber-700 border border-yellow-600 cursor-pointer"
1075
1073
  };
1076
- return this.model ? t[this.color] : "bg-gray-200 border border-gray-300";
1074
+ return this.model ? e[this.color] : "bg-gray-200 border border-gray-300";
1077
1075
  },
1078
1076
  disabledColorClasses() {
1079
- const t = {
1077
+ const e = {
1080
1078
  gray: "bg-slate-600 border border-slate-300 cursor-not-allowed opacity-60",
1081
1079
  green: "bg-emerald-600 border border-emerald-300 cursor-not-allowed opacity-60",
1082
1080
  blue: "bg-sky-600 border border-sky-300 cursor-not-allowed opacity-60",
1083
1081
  red: "bg-rose-600 border border-rose-300 cursor-not-allowed opacity-60",
1084
1082
  yellow: "bg-amber-600 border border-amber-300 cursor-not-allowed opacity-60"
1085
1083
  };
1086
- return this.modelValue ? t[this.color] : "bg-gray-200 border border-gray-300 cursor-not-allowed";
1084
+ return this.modelValue ? e[this.color] : "bg-gray-200 border border-gray-300 cursor-not-allowed";
1087
1085
  },
1088
1086
  disabledClasses() {
1089
1087
  return this.disabledColorClasses;
@@ -1094,45 +1092,45 @@ const wt = /* @__PURE__ */ m(ht, [["render", pt]]), vt = {
1094
1092
  this.disabled || (this.model = !this.model);
1095
1093
  }
1096
1094
  }
1097
- }, Ct = { class: "block text-sm font-medium text-gray-700" };
1098
- function _t(t, l, e, n, d, r) {
1095
+ }, xt = { class: "block text-sm font-medium text-gray-700" };
1096
+ function pt(e, l, t, n, d, s) {
1099
1097
  return a(), i("div", null, [
1100
- o("label", Ct, u(e.label), 1),
1098
+ o("label", xt, u(t.label), 1),
1101
1099
  o("div", {
1102
- class: g([
1100
+ class: m([
1103
1101
  "relative w-11 h-6 inline-flex items-center transition-colors duration-300 px-1",
1104
- r.shapeToggle,
1105
- e.disabled ? r.disabledClasses : r.computedClasses
1102
+ s.shapeToggle,
1103
+ t.disabled ? s.disabledClasses : s.computedClasses
1106
1104
  ]),
1107
- onClick: l[0] || (l[0] = (...s) => r.toggle && r.toggle(...s))
1105
+ onClick: l[0] || (l[0] = (...r) => s.toggle && s.toggle(...r))
1108
1106
  }, [
1109
1107
  o("div", {
1110
- class: g([
1108
+ class: m([
1111
1109
  "absolute top-0.75 left-1 w-4 h-4 bg-white shadow transform transition-all duration-300",
1112
- r.shapeToggle,
1113
- r.model ? "translate-x-full" : "translate-x-0"
1110
+ s.shapeToggle,
1111
+ s.model ? "translate-x-full" : "translate-x-0"
1114
1112
  ])
1115
1113
  }, null, 2)
1116
1114
  ], 2)
1117
1115
  ]);
1118
1116
  }
1119
- const St = /* @__PURE__ */ m(vt, [["render", _t]]), Dt = {
1120
- install(t) {
1121
- t.component("AlertStyle", b), t.component("ButtonStyle", L), t.component("CheckStyle", W), t.component("ComboBoxStyle", oe), t.component("DateTimeStyle", ge), t.component("InputDecimalStyle", _e), t.component("InputStyle", qe), t.component("SelectStyle", Ke), t.component("StepperStyle", lt), t.component("TableStyle", ct), t.component("TextAreaStyle", wt), t.component("ToggleStyle", St), t.config.globalProperties.$alertstyle = b;
1117
+ const wt = /* @__PURE__ */ g(ft, [["render", pt]]), Ct = {
1118
+ install(e) {
1119
+ e.component("AlertStyle", b), e.component("ButtonStyle", q), e.component("CheckStyle", W), e.component("ComboBoxStyle", se), e.component("DateTimeStyle", ne), e.component("InputDecimalStyle", pe), e.component("InputStyle", Te), e.component("SelectStyle", je), e.component("StepperStyle", Ze), e.component("TableStyle", ot), e.component("TextAreaStyle", yt), e.component("ToggleStyle", wt), e.config.globalProperties.$alertstyle = b;
1122
1120
  }
1123
1121
  };
1124
1122
  export {
1125
1123
  b as AlertStyle,
1126
- L as ButtonStyle,
1124
+ q as ButtonStyle,
1127
1125
  W as CheckStyle,
1128
- oe as ComboBoxStyle,
1129
- ge as DateTimeStyle,
1130
- _e as InputDecimalStyle,
1131
- qe as InputStyle,
1132
- Ke as SelectStyle,
1133
- lt as StepperStyle,
1134
- ct as TableStyle,
1135
- wt as TextAreaStyle,
1136
- St as ToggleStyle,
1137
- Dt as default
1126
+ se as ComboBoxStyle,
1127
+ ne as DateTimeStyle,
1128
+ pe as InputDecimalStyle,
1129
+ Te as InputStyle,
1130
+ je as SelectStyle,
1131
+ Ze as StepperStyle,
1132
+ ot as TableStyle,
1133
+ yt as TextAreaStyle,
1134
+ wt as ToggleStyle,
1135
+ Ct as default
1138
1136
  };