adverich-kun-ui 0.1.552 → 0.1.554

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,9 +1,9 @@
1
- import { defineComponent as Te, ref as x, computed as b, watch as Ae, onMounted as Ye, onUnmounted as $e, createElementBlock as d, openBlock as i, createVNode as T, createBlock as Fe, mergeProps as He, withKeys as re, withCtx as E, createElementVNode as g, withModifiers as oe, Teleport as Ne, Transition as ze, createCommentVNode as A, normalizeStyle as se, normalizeClass as P, unref as Be, toDisplayString as F, Fragment as O, renderList as j, createTextVNode as ie, nextTick as Le } from "vue";
2
- import Re from "../../../KunTextField/src/components/KunTextField.vue.js";
3
- import K from "../../../KunNumberField/src/components/KunNumberField.vue.js";
4
- import { usePosition as Ee } from "../composables/usePosition.js";
5
- import ue from "../../../KunBtn/src/components/KunBtn.vue.js";
6
- const Pe = {
1
+ import { defineComponent as $e, ref as x, computed as b, watch as Ae, onMounted as Ye, onUnmounted as ze, createElementBlock as c, openBlock as u, createVNode as T, createBlock as Be, mergeProps as He, withKeys as ae, withCtx as j, createElementVNode as r, withModifiers as se, Teleport as Fe, Transition as Le, createCommentVNode as $, normalizeStyle as ie, normalizeClass as R, unref as Ne, toDisplayString as B, Fragment as O, renderList as U, createTextVNode as ue, nextTick as Re } from "vue";
2
+ import Ee from "../../../KunTextField/src/components/KunTextField.vue.js";
3
+ import Z from "../../../KunNumberField/src/components/KunNumberField.vue.js";
4
+ import { usePosition as Pe } from "../composables/usePosition.js";
5
+ import de from "../../../KunBtn/src/components/KunBtn.vue.js";
6
+ const je = {
7
7
  key: 0,
8
8
  xmlns: "http://www.w3.org/2000/svg",
9
9
  class: "h-5 w-5",
@@ -19,28 +19,25 @@ const Pe = {
19
19
  viewBox: "0 0 24 24",
20
20
  stroke: "currentColor",
21
21
  "stroke-width": "2"
22
- }, je = {
22
+ }, Ue = {
23
23
  key: 0,
24
24
  class: "px-2 py-3 flex items-center justify-between border-b border-slate-100 dark:border-slate-700/50 bg-slate-50/50 dark:bg-slate-800/50 flex-shrink-0"
25
- }, Ue = {
25
+ }, Ie = {
26
26
  key: 1,
27
27
  class: "flex-1 overflow-y-auto custom-scrollbar p-3 min-h-0"
28
- }, Ie = { key: 0 }, We = { class: "grid grid-cols-7 mb-2 text-center" }, Ke = { class: "grid grid-cols-7 gap-1" }, Ze = ["onClick"], qe = {
28
+ }, We = { key: 0 }, Ke = { class: "grid grid-cols-7 mb-2 text-center" }, Ze = { class: "grid grid-cols-7 gap-1" }, qe = ["onClick"], Ge = {
29
29
  key: 1,
30
30
  class: "grid grid-cols-3 gap-2"
31
- }, Ge = ["onClick"], Je = {
31
+ }, Je = ["onClick"], Qe = {
32
32
  key: 2,
33
33
  class: "grid grid-cols-3 gap-2"
34
- }, Qe = ["onClick"], Xe = {
35
- key: 2,
36
- class: "border-t border-slate-100 dark:border-slate-700 p-3 bg-slate-50/50 dark:bg-slate-800/50 grid grid-cols-3 gap-2 text-center flex-shrink-0"
37
- }, _e = { class: "flex flex-col items-center" }, et = { class: "flex flex-col items-center" }, tt = {
34
+ }, Xe = ["onClick"], _e = { class: "flex flex-col items-center gap-1" }, et = { class: "flex flex-col items-center gap-1" }, tt = {
38
35
  key: 0,
39
- class: "flex flex-col items-center"
40
- }, nt = {
36
+ class: "flex flex-col items-center gap-1"
37
+ }, lt = {
41
38
  key: 3,
42
39
  class: "p-3 border-t border-slate-100 dark:border-slate-700 flex justify-end gap-2 bg-white dark:bg-slate-800 flex-shrink-0"
43
- }, it = /* @__PURE__ */ Te({
40
+ }, it = /* @__PURE__ */ $e({
44
41
  __name: "KunDatePicker",
45
42
  props: {
46
43
  modelValue: { type: [Date, Array, String], default: null },
@@ -81,289 +78,300 @@ const Pe = {
81
78
  dialogClass: { default: "" }
82
79
  },
83
80
  emits: ["update:modelValue", "change", "close", "open"],
84
- setup(m, { emit: de }) {
85
- const l = m, Y = de, Z = Math.random().toString(36).substr(2, 9), ce = x(null), k = x(null), B = x(null), $ = x(!1), S = x("days"), f = x(null), w = x((/* @__PURE__ */ new Date()).getMonth()), h = x((/* @__PURE__ */ new Date()).getFullYear()), v = x({ hours: 0, minutes: 0, seconds: 0 });
86
- function q(t, e) {
87
- const n = t.getFullYear().toString(), a = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0"), o = String(t.getHours()).padStart(2, "0"), u = String(t.getMinutes()).padStart(2, "0"), p = String(t.getSeconds()).padStart(2, "0"), s = {
88
- YYYY: n,
89
- yyyy: n,
90
- YY: n.slice(-2),
91
- yy: n.slice(-2),
92
- MM: a,
93
- DD: r,
94
- dd: r,
95
- HH: o,
96
- mm: u,
81
+ setup(g, { emit: ce }) {
82
+ const n = g, A = ce, q = Math.random().toString(36).substr(2, 9), fe = x(null), w = x(null), E = x(null), Y = x(!1), S = x("days"), v = x(null), k = x((/* @__PURE__ */ new Date()).getMonth()), h = x((/* @__PURE__ */ new Date()).getFullYear()), m = x({ hours: 0, minutes: 0, seconds: 0 });
83
+ function G(t, e) {
84
+ const l = t.getFullYear().toString(), o = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0"), s = String(t.getHours()).padStart(2, "0"), d = String(t.getMinutes()).padStart(2, "0"), p = String(t.getSeconds()).padStart(2, "0"), i = {
85
+ YYYY: l,
86
+ yyyy: l,
87
+ YY: l.slice(-2),
88
+ yy: l.slice(-2),
89
+ MM: o,
90
+ DD: a,
91
+ dd: a,
92
+ HH: s,
93
+ mm: d,
97
94
  ss: p
98
95
  };
99
- return e.replace(/YYYY|yyyy|YY|yy|MM|DD|dd|HH|mm|ss/g, (D) => s[D]);
96
+ return e.replace(/YYYY|yyyy|YY|yy|MM|DD|dd|HH|mm|ss/g, (D) => i[D]);
100
97
  }
101
- function fe(t, e) {
98
+ function ge(t, e) {
102
99
  if (!t || !e) return null;
103
- const n = e.match(/[a-zA-Z]+/g), a = t.match(/\d+/g);
104
- if (!n || !a || n.length !== a.length) return null;
105
- let r = (/* @__PURE__ */ new Date()).getFullYear(), o = 0, u = 1, p = 0, s = 0, D = 0;
106
- n.forEach((C, ae) => {
107
- const c = parseInt(a[ae], 10);
108
- isNaN(c) || (/y/i.test(C) ? r = c < 100 ? 2e3 + c : c : C === "MM" ? o = c - 1 : /d/i.test(C) ? u = c : C === "HH" ? p = c : C === "mm" ? s = c : C === "ss" && (D = c));
100
+ const l = e.match(/[a-zA-Z]+/g), o = t.match(/\d+/g);
101
+ if (!l || !o || l.length !== o.length) return null;
102
+ let a = (/* @__PURE__ */ new Date()).getFullYear(), s = 0, d = 1, p = 0, i = 0, D = 0;
103
+ l.forEach((M, re) => {
104
+ const f = parseInt(o[re], 10);
105
+ isNaN(f) || (/y/i.test(M) ? a = f < 100 ? 2e3 + f : f : M === "MM" ? s = f - 1 : /d/i.test(M) ? d = f : M === "HH" ? p = f : M === "mm" ? i = f : M === "ss" && (D = f));
109
106
  });
110
- const R = new Date(r, o, u, p, s, D);
111
- return R.getMonth() !== o ? null : R;
107
+ const P = new Date(a, s, d, p, i, D);
108
+ return P.getMonth() !== s ? null : P;
112
109
  }
113
- function U(t) {
110
+ function I(t) {
114
111
  if (!t) return null;
115
112
  if (t instanceof Date) return t;
116
113
  if (typeof t == "string") {
117
114
  const e = H("value");
118
115
  if (e) {
119
- const o = fe(t, e);
120
- if (o && !isNaN(o.getTime())) return o;
116
+ const s = ge(t, e);
117
+ if (s && !isNaN(s.getTime())) return s;
121
118
  }
122
- const n = new Date(t);
123
- if (!isNaN(n.getTime())) return n;
119
+ const l = new Date(t);
120
+ if (!isNaN(l.getTime())) return l;
124
121
  if (y.value === "time") {
125
- const [o, u, p] = t.split(/[:\s]/).map(Number), s = /* @__PURE__ */ new Date();
126
- return s.setHours(o || 0, u || 0, p || 0, 0), s;
122
+ const [s, d, p] = t.split(/[:\s]/).map(Number), i = /* @__PURE__ */ new Date();
123
+ return i.setHours(s || 0, d || 0, p || 0, 0), i;
127
124
  }
128
- const a = t.replace(" ", "T"), r = new Date(a);
129
- if (!isNaN(r.getTime())) return r;
125
+ const o = t.replace(" ", "T"), a = new Date(o);
126
+ if (!isNaN(a.getTime())) return a;
130
127
  }
131
128
  return null;
132
129
  }
133
- const y = b(() => l.mode ? l.mode : l.enableTime ? "datetime" : "date"), M = b(() => y.value === "datetime" || y.value === "time" || l.enableTime), G = b(() => l.enableSeconds || H("value") && H("value").includes("ss"));
134
- Ae(() => l.modelValue, (t) => {
135
- J(t);
130
+ const y = b(() => n.mode ? n.mode : n.enableTime ? "datetime" : "date"), C = b(() => y.value === "datetime" || y.value === "time" || n.enableTime), J = b(() => n.enableSeconds || H("value") && H("value").includes("ss"));
131
+ Ae(() => n.modelValue, (t) => {
132
+ Q(t);
136
133
  }, { immediate: !0 });
137
- function J(t) {
134
+ function Q(t) {
138
135
  if (t)
139
- if (l.range && Array.isArray(t) && t.length > 0) {
140
- const e = t.map((a) => U(a)).filter((a) => a);
141
- e.length === 2 && e[0] > e[1] && e.reverse(), f.value = e.length > 0 ? e : null;
142
- const n = e[0];
143
- n && (w.value = n.getMonth(), h.value = n.getFullYear(), M.value && X(n));
136
+ if (n.range && Array.isArray(t) && t.length > 0) {
137
+ const e = t.map((o) => I(o)).filter((o) => o);
138
+ e.length === 2 && e[0] > e[1] && e.reverse(), v.value = e.length > 0 ? e : null;
139
+ const l = e[0];
140
+ l && (k.value = l.getMonth(), h.value = l.getFullYear(), C.value && _(l));
144
141
  } else {
145
- const e = U(t);
146
- e && (f.value = e, w.value = e.getMonth(), h.value = e.getFullYear(), M.value && X(e));
142
+ const e = I(t);
143
+ e && (v.value = e, k.value = e.getMonth(), h.value = e.getFullYear(), C.value && _(e));
147
144
  }
148
145
  else
149
- f.value = null, Q();
146
+ v.value = null, X();
150
147
  }
151
- function Q() {
148
+ function X() {
152
149
  let t = /* @__PURE__ */ new Date();
153
- if (l.startDate) {
154
- const e = l.startDate instanceof Date ? l.startDate : new Date(l.startDate);
150
+ if (n.startDate) {
151
+ const e = n.startDate instanceof Date ? n.startDate : new Date(n.startDate);
155
152
  isNaN(e.getTime()) || (t = e);
156
153
  }
157
- if (w.value = t.getMonth(), h.value = t.getFullYear(), l.startTime) {
158
- if (typeof l.startTime == "object")
159
- v.value = { hours: 0, minutes: 0, seconds: 0, ...l.startTime };
160
- else if (typeof l.startTime == "string") {
161
- const [e, n, a] = l.startTime.split(":").map(Number);
162
- v.value = { hours: e || 0, minutes: n || 0, seconds: a || 0 };
154
+ if (k.value = t.getMonth(), h.value = t.getFullYear(), n.startTime) {
155
+ if (typeof n.startTime == "object")
156
+ m.value = { hours: 0, minutes: 0, seconds: 0, ...n.startTime };
157
+ else if (typeof n.startTime == "string") {
158
+ const [e, l, o] = n.startTime.split(":").map(Number);
159
+ m.value = { hours: e || 0, minutes: l || 0, seconds: o || 0 };
163
160
  }
164
161
  } else {
165
162
  const e = /* @__PURE__ */ new Date();
166
- v.value = { hours: e.getHours(), minutes: e.getMinutes(), seconds: 0 };
163
+ m.value = { hours: e.getHours(), minutes: e.getMinutes(), seconds: 0 };
167
164
  }
168
165
  }
169
- function X(t) {
170
- v.value = {
166
+ function _(t) {
167
+ m.value = {
171
168
  hours: t.getHours(),
172
169
  minutes: t.getMinutes(),
173
170
  seconds: t.getSeconds()
174
171
  };
175
172
  }
176
- const { style: me, update: ge } = Ee(k, B, {
173
+ const { style: ve, update: me } = Pe(w, E, {
177
174
  offset: 8,
178
- align: l.align
179
- }), ve = b(() => {
175
+ align: n.align
176
+ }), pe = b(() => {
180
177
  var e;
181
- let t = l.calendarWidth;
182
- return l.fullWidth && ((e = k.value) != null && e.rootRef) && (t = k.value.rootRef.getBoundingClientRect().width), y.value === "time" && (t = 200), {
178
+ let t = n.calendarWidth;
179
+ return n.fullWidth && ((e = w.value) != null && e.rootRef) && (t = w.value.rootRef.getBoundingClientRect().width), y.value === "time" && (t = 200), {
183
180
  width: typeof t == "number" ? `${t}px` : t
184
181
  };
185
- }), pe = b(() => new Date(h.value, w.value).toLocaleString(l.locale, { month: "long" }).replace(/^\w/, (t) => t.toUpperCase())), he = b(() => {
182
+ }), he = b(() => new Date(h.value, k.value).toLocaleString(n.locale, { month: "long" }).replace(/^\w/, (t) => t.toUpperCase())), ye = b(() => {
186
183
  const t = [], e = new Date(2023, 0, 1);
187
184
  for (; e.getDay() !== 1; )
188
185
  e.setDate(e.getDate() + 1);
189
- for (let n = 0; n < 7; n++)
190
- t.push(e.toLocaleString(l.locale, { weekday: "narrow" }).replace(".", "")), e.setDate(e.getDate() + 1);
186
+ for (let l = 0; l < 7; l++)
187
+ t.push(e.toLocaleString(n.locale, { weekday: "narrow" }).replace(".", "")), e.setDate(e.getDate() + 1);
191
188
  return t;
192
189
  });
193
190
  function H(t) {
194
- return l.formats && l.formats[t] ? l.formats[t] : t === "value" ? l.valueFormat || l.format : t === "display" ? l.displayFormat || l.format : null;
191
+ return n.formats && n.formats[t] ? n.formats[t] : t === "value" ? n.valueFormat || n.format : t === "display" ? n.displayFormat || n.format : null;
195
192
  }
196
- const ye = b(() => {
197
- if (!l.modelValue) return "";
198
- const t = { day: "2-digit", month: "2-digit", year: "numeric" }, e = { hour: "2-digit", minute: "2-digit", second: G.value ? "2-digit" : void 0 }, n = (r) => {
199
- const o = H("display");
200
- if (o) return q(r, o);
201
- let u = "";
202
- return y.value !== "time" && (u += r.toLocaleDateString(l.locale, t)), y.value === "datetime" && (u += " " + r.toLocaleTimeString(l.locale, e)), y.value === "time" && (u = r.toLocaleTimeString(l.locale, e)), u;
203
- }, a = (r) => {
204
- const o = U(r);
205
- return o ? n(o) : String(r);
193
+ const be = b(() => {
194
+ if (!n.modelValue) return "";
195
+ const t = { day: "2-digit", month: "2-digit", year: "numeric" }, e = { hour: "2-digit", minute: "2-digit", second: J.value ? "2-digit" : void 0 }, l = (a) => {
196
+ const s = H("display");
197
+ if (s) return G(a, s);
198
+ let d = "";
199
+ return y.value !== "time" && (d += a.toLocaleDateString(n.locale, t)), y.value === "datetime" && (d += " " + a.toLocaleTimeString(n.locale, e)), y.value === "time" && (d = a.toLocaleTimeString(n.locale, e)), d;
200
+ }, o = (a) => {
201
+ const s = I(a);
202
+ return s ? l(s) : String(a);
206
203
  };
207
- if (l.range && Array.isArray(l.modelValue)) {
208
- const r = l.modelValue[0] ? a(l.modelValue[0]) : "", o = l.modelValue[1] ? a(l.modelValue[1]) : "";
209
- return r ? o ? `${r} ~ ${o}` : `${r} ~ ...` : "";
204
+ if (n.range && Array.isArray(n.modelValue)) {
205
+ const a = n.modelValue[0] ? o(n.modelValue[0]) : "", s = n.modelValue[1] ? o(n.modelValue[1]) : "";
206
+ return a ? s ? `${a} ~ ${s}` : `${a} ~ ...` : "";
210
207
  }
211
- return a(l.modelValue);
212
- }), be = b(() => {
208
+ return o(n.modelValue);
209
+ }), we = b(() => {
213
210
  if (y.value === "time") return [];
214
- const t = h.value, e = w.value, n = new Date(t, e, 1).getDay(), a = n === 0 ? 6 : n - 1, r = new Date(t, e + 1, 0).getDate(), o = new Date(t, e, 0).getDate(), u = [];
215
- for (let s = 0; s < a; s++)
216
- u.push({
217
- day: o - a + s + 1,
218
- date: new Date(t, e - 1, o - a + s + 1),
211
+ const t = h.value, e = k.value, l = new Date(t, e, 1).getDay(), o = l === 0 ? 6 : l - 1, a = new Date(t, e + 1, 0).getDate(), s = new Date(t, e, 0).getDate(), d = [];
212
+ for (let i = 0; i < o; i++)
213
+ d.push({
214
+ day: s - o + i + 1,
215
+ date: new Date(t, e - 1, s - o + i + 1),
219
216
  isCurrentMonth: !1
220
217
  });
221
- for (let s = 1; s <= r; s++)
222
- u.push({ day: s, date: new Date(t, e, s), isCurrentMonth: !0 });
223
- const p = 42 - u.length;
224
- for (let s = 1; s <= p; s++)
225
- u.push({ day: s, date: new Date(t, e + 1, s), isCurrentMonth: !1 });
226
- return u;
218
+ for (let i = 1; i <= a; i++)
219
+ d.push({ day: i, date: new Date(t, e, i), isCurrentMonth: !0 });
220
+ const p = 42 - d.length;
221
+ for (let i = 1; i <= p; i++)
222
+ d.push({ day: i, date: new Date(t, e + 1, i), isCurrentMonth: !1 });
223
+ return d;
227
224
  }), ke = b(() => {
228
225
  const t = [], e = (/* @__PURE__ */ new Date()).getFullYear();
229
- for (let n = e - 100; n <= e + 20; n++)
230
- t.push(n);
226
+ for (let l = e - 100; l <= e + 20; l++)
227
+ t.push(l);
231
228
  return t.reverse();
232
- }), we = b(() => {
229
+ }), xe = b(() => {
233
230
  const t = [];
234
231
  for (let e = 0; e < 12; e++) {
235
- const n = new Date(2e3, e, 1).toLocaleString(l.locale, { month: "short" });
236
- t.push(n.charAt(0).toUpperCase() + n.slice(1));
232
+ const l = new Date(2e3, e, 1).toLocaleString(n.locale, { month: "short" });
233
+ t.push(l.charAt(0).toUpperCase() + l.slice(1));
237
234
  }
238
235
  return t;
239
236
  });
240
- function N() {
241
- l.disabled || ($.value ? z() : xe());
237
+ function F() {
238
+ n.disabled || (Y.value ? L() : De());
242
239
  }
243
- function xe() {
244
- window.dispatchEvent(new CustomEvent("kun:datepicker:open", { detail: { id: Z } })), $.value = !0, l.modelValue ? J(l.modelValue) : Q(), Y("open"), Le(() => {
245
- ge();
240
+ function De() {
241
+ window.dispatchEvent(new CustomEvent("kun:datepicker:open", { detail: { id: q } })), Y.value = !0, n.modelValue ? Q(n.modelValue) : X(), A("open"), Re(() => {
242
+ me();
246
243
  });
247
244
  }
248
- function z() {
249
- $.value = !1, Y("close");
250
- }
251
- function _(t) {
252
- t.detail.id !== Z && $.value && z();
245
+ function L() {
246
+ Y.value = !1, A("close");
253
247
  }
254
248
  function ee(t) {
255
- if (!$.value) return;
249
+ t.detail.id !== q && Y.value && L();
250
+ }
251
+ function te(t) {
252
+ if (!Y.value) return;
256
253
  const e = t.target;
257
- B.value && B.value.contains(e) || k.value && (k.value.rootRef && k.value.rootRef.contains(e) || k.value.$el && k.value.$el.contains(e)) || z();
254
+ E.value && E.value.contains(e) || w.value && (w.value.rootRef && w.value.rootRef.contains(e) || w.value.$el && w.value.$el.contains(e)) || L();
258
255
  }
259
256
  Ye(() => {
260
- document.addEventListener("click", ee, !0), window.addEventListener("kun:datepicker:open", _);
261
- }), $e(() => {
262
- document.removeEventListener("click", ee, !0), window.removeEventListener("kun:datepicker:open", _);
257
+ document.addEventListener("click", te, !0), window.addEventListener("kun:datepicker:open", ee);
258
+ }), ze(() => {
259
+ document.removeEventListener("click", te, !0), window.removeEventListener("kun:datepicker:open", ee);
263
260
  });
264
- function te(t) {
265
- let e = w.value + t;
266
- e > 11 ? (e = 0, h.value++) : e < 0 && (e = 11, h.value--), w.value = e;
261
+ function le(t) {
262
+ let e = k.value + t;
263
+ e > 11 ? (e = 0, h.value++) : e < 0 && (e = 11, h.value--), k.value = e;
267
264
  }
268
- function De() {
265
+ function Se() {
269
266
  S.value = S.value === "days" ? "years" : "days";
270
267
  }
271
- function Se(t) {
268
+ function Ce(t) {
272
269
  h.value = t, S.value = "months";
273
270
  }
274
271
  function Me(t) {
275
- w.value = t, S.value = "days";
272
+ k.value = t, S.value = "days";
276
273
  }
277
- function I(t) {
274
+ function W(t) {
278
275
  const e = new Date(t);
279
- return M.value ? e.setHours(v.value.hours || 0, v.value.minutes || 0, v.value.seconds || 0, 0) : e.setHours(0, 0, 0, 0), e;
276
+ return C.value ? e.setHours(m.value.hours || 0, m.value.minutes || 0, m.value.seconds || 0, 0) : e.setHours(0, 0, 0, 0), e;
280
277
  }
281
- function Ce(t) {
282
- const e = I(t.date);
283
- if (l.range) {
284
- let n = Array.isArray(f.value) ? [...f.value] : [];
285
- if (n.length === 2 && (n = []), n.length === 0) n = [e];
286
- else if (n.length === 1) {
287
- let a = n[0], r = e;
288
- r < a && ([a, r] = [r, a]), n = [a, r];
278
+ function z(t, e) {
279
+ if (t === "hours") {
280
+ let l = (m.value.hours + e) % 24;
281
+ l < 0 && (l += 24), m.value.hours = l;
282
+ } else {
283
+ let l = (m.value[t] + e) % 60;
284
+ l < 0 && (l += 60), m.value[t] = l;
285
+ }
286
+ N();
287
+ }
288
+ function Ve(t) {
289
+ const e = W(t.date);
290
+ if (n.range) {
291
+ let l = Array.isArray(v.value) ? [...v.value] : [];
292
+ if (l.length === 2 && (l = []), l.length === 0) l = [e];
293
+ else if (l.length === 1) {
294
+ let o = l[0], a = e;
295
+ a < o && ([o, a] = [a, o]), l = [o, a];
289
296
  }
290
- f.value = n, l.autoApply && n.length === 2 && !M.value && W();
297
+ v.value = l, n.autoApply && l.length === 2 && !C.value && K();
291
298
  } else
292
- f.value = e, l.autoApply && !M.value && W();
299
+ v.value = e, n.autoApply && !C.value && K();
293
300
  }
294
- function L() {
295
- let t = f.value instanceof Date ? f.value : /* @__PURE__ */ new Date();
296
- const e = I(t);
297
- if (!l.range && (f.value = e, l.autoApply)) {
298
- const n = ne();
299
- Y("update:modelValue", n), Y("change", n);
301
+ function N() {
302
+ let t = v.value instanceof Date ? v.value : /* @__PURE__ */ new Date();
303
+ const e = W(t);
304
+ if (!n.range && (v.value = e, n.autoApply)) {
305
+ const l = ne();
306
+ A("update:modelValue", l), A("change", l);
300
307
  }
301
308
  }
302
309
  function ne() {
303
- const t = f.value;
310
+ const t = v.value;
304
311
  if (!t) return null;
305
312
  let e = H("value");
306
- !e && y.value === "time" && (e = G.value ? "HH:mm:ss" : "HH:mm");
307
- const n = (a) => e ? q(a, e) : a;
308
- return Array.isArray(t) ? t.map((a) => n(a)) : n(t);
313
+ !e && y.value === "time" && (e = J.value ? "HH:mm:ss" : "HH:mm");
314
+ const l = (o) => e ? G(o, e) : o;
315
+ return Array.isArray(t) ? t.map((o) => l(o)) : l(t);
309
316
  }
310
- function W() {
311
- M.value && f.value && !Array.isArray(f.value) ? f.value = I(f.value) : y.value === "time" && !f.value && L();
317
+ function K() {
318
+ C.value && v.value && !Array.isArray(v.value) ? v.value = W(v.value) : y.value === "time" && !v.value && N();
312
319
  const t = ne();
313
- Y("update:modelValue", t), Y("change", t), z();
320
+ A("update:modelValue", t), A("change", t), L();
314
321
  }
315
- function Ve(t) {
316
- const { date: e, isCurrentMonth: n } = t, r = le(e, /* @__PURE__ */ new Date());
317
- let o = !1, u = !1;
318
- const p = (c, V) => c instanceof Date && le(c, V), s = f.value;
319
- if (l.range && Array.isArray(s)) {
320
- const [c, V] = s;
321
- c && p(c, e) && (o = !0), V && p(V, e) && (o = !0), c && V && c instanceof Date && V instanceof Date && e > c && e < V && (u = !0);
322
- } else !l.range && s instanceof Date && p(s, e) && (o = !0);
323
- const D = "flex items-center justify-center font-medium text-sm z-10", R = n ? "text-slate-700 dark:text-slate-200" : "text-slate-300 dark:text-slate-600";
324
- return o ? `${D} bg-blue-600 text-white shadow-md hover:bg-blue-700 rounded-full` : u ? `${D} bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-none` : `${D} ${R} hover:bg-slate-100 dark:hover:bg-slate-700 ${r ? "border border-blue-500 text-blue-600 dark:text-blue-400 font-bold" : ""}`;
322
+ function Te(t) {
323
+ const { date: e, isCurrentMonth: l } = t, a = oe(e, /* @__PURE__ */ new Date());
324
+ let s = !1, d = !1;
325
+ const p = (f, V) => f instanceof Date && oe(f, V), i = v.value;
326
+ if (n.range && Array.isArray(i)) {
327
+ const [f, V] = i;
328
+ f && p(f, e) && (s = !0), V && p(V, e) && (s = !0), f && V && f instanceof Date && V instanceof Date && e > f && e < V && (d = !0);
329
+ } else !n.range && i instanceof Date && p(i, e) && (s = !0);
330
+ const D = "flex items-center justify-center font-medium text-sm z-10", P = l ? "text-slate-700 dark:text-slate-200" : "text-slate-300 dark:text-slate-600";
331
+ return s ? `${D} bg-blue-600 text-white shadow-md hover:bg-blue-700 rounded-full` : d ? `${D} bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-none` : `${D} ${P} hover:bg-slate-100 dark:hover:bg-slate-700 ${a ? "border border-blue-500 text-blue-600 dark:text-blue-400 font-bold" : ""}`;
325
332
  }
326
- function le(t, e) {
333
+ function oe(t, e) {
327
334
  return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
328
335
  }
329
- return (t, e) => (i(), d("div", {
336
+ return (t, e) => (u(), c("div", {
330
337
  class: "relative w-full",
331
338
  ref_key: "containerRef",
332
- ref: ce
339
+ ref: fe
333
340
  }, [
334
- T(Re, He({
341
+ T(Ee, He({
335
342
  ref_key: "triggerRef",
336
- ref: k,
337
- "model-value": ye.value,
338
- label: m.label,
339
- placeholder: m.placeholder,
340
- disabled: m.disabled,
341
- readonly: ""
343
+ ref: w,
344
+ "model-value": be.value,
345
+ label: g.label,
346
+ placeholder: g.placeholder,
347
+ disabled: g.disabled,
348
+ readonly: "",
349
+ "input-style": "cursor-pointer"
342
350
  }, t.$attrs, {
343
- onHandleClick: N,
344
- onClick: N,
351
+ onHandleClick: F,
352
+ onClick: F,
345
353
  onKeyDown: [
346
- re(N, ["enter"]),
347
- re(N, ["space"])
354
+ ae(F, ["enter"]),
355
+ ae(F, ["space"])
348
356
  ],
349
- class: ["cursor-pointer", m.inputClass],
350
- "error-message": m.errorMessage,
351
- "has-error": !!m.errorMessage,
357
+ class: ["cursor-pointer", g.inputClass],
358
+ "error-message": g.errorMessage,
359
+ "has-error": !!g.errorMessage,
352
360
  "hide-details": ""
353
361
  }), {
354
- "append-inner": E(() => [
355
- g("div", {
362
+ "append-inner": j(() => [
363
+ r("div", {
356
364
  class: "cursor-pointer text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200 transition-colors",
357
- onClick: oe(N, ["stop"])
365
+ onClick: se(F, ["stop"])
358
366
  }, [
359
- m.mode === "time" ? (i(), d("svg", Pe, [...e[6] || (e[6] = [
360
- g("path", {
367
+ g.mode === "time" ? (u(), c("svg", je, [...e[12] || (e[12] = [
368
+ r("path", {
361
369
  "stroke-linecap": "round",
362
370
  "stroke-linejoin": "round",
363
371
  d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
364
372
  }, null, -1)
365
- ])])) : (i(), d("svg", Oe, [...e[7] || (e[7] = [
366
- g("path", {
373
+ ])])) : (u(), c("svg", Oe, [...e[13] || (e[13] = [
374
+ r("path", {
367
375
  "stroke-linecap": "round",
368
376
  "stroke-linejoin": "round",
369
377
  d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
@@ -373,8 +381,8 @@ const Pe = {
373
381
  ]),
374
382
  _: 1
375
383
  }, 16, ["model-value", "label", "placeholder", "disabled", "class", "error-message", "has-error"]),
376
- (i(), Fe(Ne, { to: "body" }, [
377
- T(ze, {
384
+ (u(), Be(Fe, { to: "body" }, [
385
+ T(Le, {
378
386
  "enter-active-class": "transition ease-out duration-150",
379
387
  "enter-from-class": "opacity-0 scale-95",
380
388
  "enter-to-class": "opacity-100 scale-100",
@@ -382,160 +390,274 @@ const Pe = {
382
390
  "leave-from-class": "opacity-100 scale-100",
383
391
  "leave-to-class": "opacity-0 scale-95"
384
392
  }, {
385
- default: E(() => [
386
- $.value ? (i(), d("div", {
393
+ default: j(() => [
394
+ Y.value ? (u(), c("div", {
387
395
  key: 0,
388
396
  ref_key: "popoverRef",
389
- ref: B,
390
- class: P(["fixed shadow-2xl rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 flex flex-col font-sans select-none overflow-hidden", [m.dialogClass]]),
391
- style: se([Be(me), ve.value]),
392
- onClick: e[5] || (e[5] = oe(() => {
397
+ ref: E,
398
+ class: R(["fixed shadow-2xl rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 flex flex-col font-sans select-none overflow-hidden", [g.dialogClass]]),
399
+ style: ie([Ne(ve), pe.value]),
400
+ onClick: e[11] || (e[11] = se(() => {
393
401
  }, ["stop"]))
394
402
  }, [
395
- m.mode !== "time" ? (i(), d("div", je, [
396
- g("button", {
403
+ g.mode !== "time" ? (u(), c("div", Ue, [
404
+ r("button", {
397
405
  type: "button",
398
406
  class: "cursor-pointer p-1 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors text-slate-600 dark:text-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-400",
399
- onClick: e[0] || (e[0] = (n) => te(-1))
400
- }, [...e[8] || (e[8] = [
401
- g("svg", {
407
+ onClick: e[0] || (e[0] = (l) => le(-1))
408
+ }, [...e[14] || (e[14] = [
409
+ r("svg", {
402
410
  xmlns: "http://www.w3.org/2000/svg",
403
411
  class: "h-5 w-5",
404
412
  viewBox: "0 0 20 20",
405
413
  fill: "currentColor"
406
414
  }, [
407
- g("path", {
415
+ r("path", {
408
416
  "fill-rule": "evenodd",
409
417
  d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",
410
418
  "clip-rule": "evenodd"
411
419
  })
412
420
  ], -1)
413
421
  ])]),
414
- g("div", {
422
+ r("div", {
415
423
  class: "font-semibold text-slate-800 dark:text-slate-100 cursor-pointer hover:bg-slate-200 dark:hover:bg-slate-700 px-3 py-1 rounded transition-colors text-center",
416
- onClick: De
417
- }, F(pe.value) + " " + F(h.value), 1),
418
- g("button", {
424
+ onClick: Se
425
+ }, B(he.value) + " " + B(h.value), 1),
426
+ r("button", {
419
427
  type: "button",
420
428
  class: "cursor-pointer p-1 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors text-slate-600 dark:text-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-400",
421
- onClick: e[1] || (e[1] = (n) => te(1))
422
- }, [...e[9] || (e[9] = [
423
- g("svg", {
429
+ onClick: e[1] || (e[1] = (l) => le(1))
430
+ }, [...e[15] || (e[15] = [
431
+ r("svg", {
424
432
  xmlns: "http://www.w3.org/2000/svg",
425
433
  class: "h-5 w-5",
426
434
  viewBox: "0 0 20 20",
427
435
  fill: "currentColor"
428
436
  }, [
429
- g("path", {
437
+ r("path", {
430
438
  "fill-rule": "evenodd",
431
439
  d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
432
440
  "clip-rule": "evenodd"
433
441
  })
434
442
  ], -1)
435
443
  ])])
436
- ])) : A("", !0),
437
- m.mode !== "time" ? (i(), d("div", Ue, [
438
- S.value === "days" ? (i(), d("div", Ie, [
439
- g("div", We, [
440
- (i(!0), d(O, null, j(he.value, (n) => (i(), d("span", {
441
- key: n,
444
+ ])) : $("", !0),
445
+ g.mode !== "time" ? (u(), c("div", Ie, [
446
+ S.value === "days" ? (u(), c("div", We, [
447
+ r("div", Ke, [
448
+ (u(!0), c(O, null, U(ye.value, (l) => (u(), c("span", {
449
+ key: l,
442
450
  class: "text-[0.7rem] font-bold text-slate-400 dark:text-slate-500 uppercase tracking-widest"
443
- }, F(n), 1))), 128))
451
+ }, B(l), 1))), 128))
444
452
  ]),
445
- g("div", Ke, [
446
- (i(!0), d(O, null, j(be.value, (n, a) => (i(), d("div", {
447
- key: a,
448
- class: P(["relative flex items-center justify-center rounded-full transition-all duration-150 cursor-pointer group", Ve(n)]),
449
- style: se({ width: m.daySize, height: m.daySize, fontSize: m.fontSize }),
450
- onClick: (r) => Ce(n)
451
- }, F(n.day), 15, Ze))), 128))
453
+ r("div", Ze, [
454
+ (u(!0), c(O, null, U(we.value, (l, o) => (u(), c("div", {
455
+ key: o,
456
+ class: R(["relative flex items-center justify-center rounded-full transition-all duration-150 cursor-pointer group", Te(l)]),
457
+ style: ie({ width: g.daySize, height: g.daySize, fontSize: g.fontSize }),
458
+ onClick: (a) => Ve(l)
459
+ }, B(l.day), 15, qe))), 128))
452
460
  ])
453
- ])) : S.value === "years" ? (i(), d("div", qe, [
454
- (i(!0), d(O, null, j(ke.value, (n) => (i(), d("div", {
455
- key: n,
456
- class: P(["p-2 text-center rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 cursor-pointer transition-colors text-sm border border-transparent", { "bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 border-blue-200 dark:border-blue-800 font-bold": n === h.value }]),
457
- onClick: (a) => Se(n)
458
- }, F(n), 11, Ge))), 128))
459
- ])) : S.value === "months" ? (i(), d("div", Je, [
460
- (i(!0), d(O, null, j(we.value, (n, a) => (i(), d("div", {
461
- key: a,
462
- class: P(["p-2 text-center rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 cursor-pointer transition-colors text-sm border border-transparent", { "bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 border-blue-200 dark:border-blue-800 font-bold": a === w.value }]),
463
- onClick: (r) => Me(a)
464
- }, F(n), 11, Qe))), 128))
465
- ])) : A("", !0)
466
- ])) : A("", !0),
467
- M.value ? (i(), d("div", Xe, [
468
- g("div", _e, [
469
- T(K, {
470
- modelValue: v.value.hours,
471
- "onUpdate:modelValue": e[2] || (e[2] = (n) => v.value.hours = n),
461
+ ])) : S.value === "years" ? (u(), c("div", Ge, [
462
+ (u(!0), c(O, null, U(ke.value, (l) => (u(), c("div", {
463
+ key: l,
464
+ class: R(["p-2 text-center rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 cursor-pointer transition-colors text-sm border border-transparent", { "bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 border-blue-200 dark:border-blue-800 font-bold": l === h.value }]),
465
+ onClick: (o) => Ce(l)
466
+ }, B(l), 11, Je))), 128))
467
+ ])) : S.value === "months" ? (u(), c("div", Qe, [
468
+ (u(!0), c(O, null, U(xe.value, (l, o) => (u(), c("div", {
469
+ key: o,
470
+ class: R(["p-2 text-center rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 cursor-pointer transition-colors text-sm border border-transparent", { "bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 border-blue-200 dark:border-blue-800 font-bold": o === k.value }]),
471
+ onClick: (a) => Me(o)
472
+ }, B(l), 11, Xe))), 128))
473
+ ])) : $("", !0)
474
+ ])) : $("", !0),
475
+ C.value ? (u(), c("div", {
476
+ key: 2,
477
+ class: R(["border-t border-slate-100 dark:border-slate-700 p-3 bg-slate-50/50 dark:bg-slate-800/50 grid gap-2 text-center flex-shrink-0", [g.enableSeconds ? "grid-cols-3" : "grid-cols-2"]])
478
+ }, [
479
+ r("div", _e, [
480
+ r("button", {
481
+ type: "button",
482
+ class: "p-0.5 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-500 transition-colors focus:outline-none",
483
+ onClick: e[2] || (e[2] = (l) => z("hours", 1))
484
+ }, [...e[16] || (e[16] = [
485
+ r("svg", {
486
+ xmlns: "http://www.w3.org/2000/svg",
487
+ class: "h-4 w-4",
488
+ viewBox: "0 0 20 20",
489
+ fill: "currentColor"
490
+ }, [
491
+ r("path", {
492
+ "fill-rule": "evenodd",
493
+ d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
494
+ "clip-rule": "evenodd"
495
+ })
496
+ ], -1)
497
+ ])]),
498
+ T(Z, {
499
+ modelValue: m.value.hours,
500
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => m.value.hours = l),
472
501
  min: 0,
473
502
  max: 23,
474
- onChange: L,
503
+ onChange: N,
475
504
  precision: "0",
476
505
  "text-center": "",
477
506
  label: "Hora",
478
507
  noArrows: "",
479
508
  "hide-details": "",
480
509
  density: "compact",
481
- placeholder: "00"
482
- }, null, 8, ["modelValue"])
510
+ placeholder: "00",
511
+ "bg-input": "bg-white dark:bg-slate-700"
512
+ }, null, 8, ["modelValue"]),
513
+ r("button", {
514
+ type: "button",
515
+ class: "p-0.5 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-500 transition-colors focus:outline-none",
516
+ onClick: e[4] || (e[4] = (l) => z("hours", -1))
517
+ }, [...e[17] || (e[17] = [
518
+ r("svg", {
519
+ xmlns: "http://www.w3.org/2000/svg",
520
+ class: "h-4 w-4",
521
+ viewBox: "0 0 20 20",
522
+ fill: "currentColor"
523
+ }, [
524
+ r("path", {
525
+ "fill-rule": "evenodd",
526
+ d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
527
+ "clip-rule": "evenodd"
528
+ })
529
+ ], -1)
530
+ ])])
483
531
  ]),
484
- g("div", et, [
485
- T(K, {
486
- modelValue: v.value.minutes,
487
- "onUpdate:modelValue": e[3] || (e[3] = (n) => v.value.minutes = n),
532
+ r("div", et, [
533
+ r("button", {
534
+ type: "button",
535
+ class: "p-0.5 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-500 transition-colors focus:outline-none",
536
+ onClick: e[5] || (e[5] = (l) => z("minutes", 1))
537
+ }, [...e[18] || (e[18] = [
538
+ r("svg", {
539
+ xmlns: "http://www.w3.org/2000/svg",
540
+ class: "h-4 w-4",
541
+ viewBox: "0 0 20 20",
542
+ fill: "currentColor"
543
+ }, [
544
+ r("path", {
545
+ "fill-rule": "evenodd",
546
+ d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
547
+ "clip-rule": "evenodd"
548
+ })
549
+ ], -1)
550
+ ])]),
551
+ T(Z, {
552
+ modelValue: m.value.minutes,
553
+ "onUpdate:modelValue": e[6] || (e[6] = (l) => m.value.minutes = l),
488
554
  min: 0,
489
555
  max: 59,
490
- onChange: L,
556
+ onChange: N,
491
557
  precision: "0",
492
558
  "text-center": "",
493
559
  label: "Min",
494
560
  noArrows: "",
495
561
  "hide-details": "",
496
562
  density: "compact",
497
- placeholder: "00"
498
- }, null, 8, ["modelValue"])
563
+ placeholder: "00",
564
+ "bg-input": "bg-white dark:bg-slate-700"
565
+ }, null, 8, ["modelValue"]),
566
+ r("button", {
567
+ type: "button",
568
+ class: "p-0.5 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-500 transition-colors focus:outline-none",
569
+ onClick: e[7] || (e[7] = (l) => z("minutes", -1))
570
+ }, [...e[19] || (e[19] = [
571
+ r("svg", {
572
+ xmlns: "http://www.w3.org/2000/svg",
573
+ class: "h-4 w-4",
574
+ viewBox: "0 0 20 20",
575
+ fill: "currentColor"
576
+ }, [
577
+ r("path", {
578
+ "fill-rule": "evenodd",
579
+ d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
580
+ "clip-rule": "evenodd"
581
+ })
582
+ ], -1)
583
+ ])])
499
584
  ]),
500
- m.enableSeconds ? (i(), d("div", tt, [
501
- T(K, {
502
- modelValue: v.value.seconds,
503
- "onUpdate:modelValue": e[4] || (e[4] = (n) => v.value.seconds = n),
585
+ g.enableSeconds ? (u(), c("div", tt, [
586
+ r("button", {
587
+ type: "button",
588
+ class: "p-0.5 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-500 transition-colors focus:outline-none",
589
+ onClick: e[8] || (e[8] = (l) => z("seconds", 1))
590
+ }, [...e[20] || (e[20] = [
591
+ r("svg", {
592
+ xmlns: "http://www.w3.org/2000/svg",
593
+ class: "h-4 w-4",
594
+ viewBox: "0 0 20 20",
595
+ fill: "currentColor"
596
+ }, [
597
+ r("path", {
598
+ "fill-rule": "evenodd",
599
+ d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
600
+ "clip-rule": "evenodd"
601
+ })
602
+ ], -1)
603
+ ])]),
604
+ T(Z, {
605
+ modelValue: m.value.seconds,
606
+ "onUpdate:modelValue": e[9] || (e[9] = (l) => m.value.seconds = l),
504
607
  min: 0,
505
608
  max: 59,
506
- onChange: L,
609
+ onChange: N,
507
610
  precision: "0",
508
611
  "text-center": "",
509
612
  label: "Seg",
510
613
  noArrows: "",
511
614
  "hide-details": "",
512
615
  density: "compact",
513
- placeholder: "00"
514
- }, null, 8, ["modelValue"])
515
- ])) : A("", !0)
516
- ])) : A("", !0),
517
- m.autoApply ? A("", !0) : (i(), d("div", nt, [
518
- T(ue, {
519
- onClick: z,
616
+ placeholder: "00",
617
+ "bg-input": "bg-white dark:bg-slate-700"
618
+ }, null, 8, ["modelValue"]),
619
+ r("button", {
620
+ type: "button",
621
+ class: "p-0.5 rounded-full hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-500 transition-colors focus:outline-none",
622
+ onClick: e[10] || (e[10] = (l) => z("seconds", -1))
623
+ }, [...e[21] || (e[21] = [
624
+ r("svg", {
625
+ xmlns: "http://www.w3.org/2000/svg",
626
+ class: "h-4 w-4",
627
+ viewBox: "0 0 20 20",
628
+ fill: "currentColor"
629
+ }, [
630
+ r("path", {
631
+ "fill-rule": "evenodd",
632
+ d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
633
+ "clip-rule": "evenodd"
634
+ })
635
+ ], -1)
636
+ ])])
637
+ ])) : $("", !0)
638
+ ], 2)) : $("", !0),
639
+ g.autoApply ? $("", !0) : (u(), c("div", lt, [
640
+ T(de, {
641
+ onClick: L,
520
642
  size: "xs"
521
643
  }, {
522
- default: E(() => [...e[10] || (e[10] = [
523
- ie("Cancelar", -1)
644
+ default: j(() => [...e[22] || (e[22] = [
645
+ ue("Cancelar", -1)
524
646
  ])]),
525
647
  _: 1
526
648
  }),
527
- T(ue, {
528
- onClick: W,
649
+ T(de, {
650
+ onClick: K,
529
651
  size: "xs",
530
652
  bgColor: "bg-success"
531
653
  }, {
532
- default: E(() => [...e[11] || (e[11] = [
533
- ie("Aplicar", -1)
654
+ default: j(() => [...e[23] || (e[23] = [
655
+ ue("Aplicar", -1)
534
656
  ])]),
535
657
  _: 1
536
658
  })
537
659
  ]))
538
- ], 6)) : A("", !0)
660
+ ], 6)) : $("", !0)
539
661
  ]),
540
662
  _: 1
541
663
  })