golden-logic-ui 1.2.371 → 1.2.373
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,8 +1,14 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
1
|
+
import { ref as _, computed as D, watch as de, onMounted as ce, onUnmounted as ge, createElementBlock as u, openBlock as d, Fragment as C, createCommentVNode as S, normalizeClass as b, createElementVNode as r, toDisplayString as c, withDirectives as me, renderList as N, vShow as ve } from "vue";
|
|
2
|
+
const fe = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "gl-label-form"
|
|
5
|
-
},
|
|
5
|
+
}, he = { class: "mt-1 text-gray-900 dark:text-white" }, ye = ["dir"], pe = ["for"], ke = { class: "relative" }, De = { class: "relative" }, we = ["required", "name", "id", "value", "placeholder"], xe = { class: "absolute z-50 mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 p-4 w-[20rem] sm:w-auto max-w-[calc(100vw-2rem)]" }, Ye = { class: "flex flex-col sm:flex-row gap-4 sm:gap-6" }, be = { class: "w-full sm:w-64" }, Me = { class: "flex items-center justify-between mb-3" }, _e = { class: "text-sm font-semibold text-gray-900 dark:text-white" }, $e = { class: "grid grid-cols-7 gap-y-1 mb-1" }, Ce = { class: "grid grid-cols-7" }, Se = ["onClick", "onMouseenter", "disabled"], Te = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "w-9 h-9 mx-auto"
|
|
8
|
+
}, Ve = { class: "hidden sm:block sm:w-64" }, Ne = { class: "flex items-center justify-between mb-3" }, Ie = { class: "text-sm font-semibold text-gray-900 dark:text-white" }, Be = { class: "grid grid-cols-7 gap-y-1 mb-1" }, Le = { class: "grid grid-cols-7" }, Ee = ["onClick", "onMouseenter", "disabled"], Fe = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "w-9 h-9 mx-auto"
|
|
11
|
+
}, qe = { class: "flex items-center justify-between gap-3 mt-4 pt-3 border-t border-gray-200 dark:border-gray-700" }, He = { class: "text-sm text-gray-600 dark:text-gray-300 truncate" }, Re = { class: "flex items-center gap-2 shrink-0" }, Ae = { class: "gl-span-form-error" }, Ze = {
|
|
6
12
|
key: 1,
|
|
7
13
|
class: "block mt-1 text-sm font-normal leading-5 text-gray-500"
|
|
8
14
|
}, Pe = {
|
|
@@ -85,100 +91,95 @@ const ye = {
|
|
|
85
91
|
}
|
|
86
92
|
},
|
|
87
93
|
emits: ["update:modelValue", "change"],
|
|
88
|
-
setup(
|
|
89
|
-
const o =
|
|
94
|
+
setup(l, { emit: ee }) {
|
|
95
|
+
const o = l, E = ee, I = _(null), x = _(!1), F = /* @__PURE__ */ new Date(), v = _(F.getMonth()), M = _(F.getFullYear()), g = _(null), f = _(null), T = _(null), te = D(() => B() === "ar"), q = {
|
|
90
96
|
en: { apply: "Apply", cancel: "Cancel" },
|
|
91
97
|
ar: { apply: "تطبيق", cancel: "إلغاء" }
|
|
92
|
-
},
|
|
98
|
+
}, B = () => o.locale && o.locale.startsWith("ar") ? "ar" : "en", H = (a) => q[B()][a] || q.en[a] || a, R = D(() => {
|
|
93
99
|
const a = [];
|
|
94
100
|
for (let e = 0; e < 12; e++)
|
|
95
101
|
a.push(new Date(2e3, e, 1).toLocaleDateString(o.locale, { month: "long" }));
|
|
96
102
|
return a;
|
|
97
|
-
}),
|
|
98
|
-
const a = [];
|
|
99
|
-
for (let
|
|
100
|
-
|
|
101
|
-
return
|
|
103
|
+
}), A = D(() => {
|
|
104
|
+
const a = B() === "ar" ? "narrow" : "short", e = [];
|
|
105
|
+
for (let t = 0; t < 7; t++)
|
|
106
|
+
e.push(new Date(2e3, 0, 2 + t).toLocaleDateString(o.locale, { weekday: a }));
|
|
107
|
+
return e;
|
|
102
108
|
}), Y = (a) => {
|
|
103
109
|
if (!a) return null;
|
|
104
110
|
let e, t, n;
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
111
|
+
const s = String(a).split(/[-/]/);
|
|
112
|
+
if (s.length !== 3) return null;
|
|
107
113
|
switch (o.date_format) {
|
|
108
114
|
case "DD-MM-YYYY":
|
|
109
115
|
case "DD/MM/YYYY":
|
|
110
|
-
n = parseInt(
|
|
116
|
+
n = parseInt(s[0]), t = parseInt(s[1]) - 1, e = parseInt(s[2]);
|
|
111
117
|
break;
|
|
112
118
|
case "MM-DD-YYYY":
|
|
113
119
|
case "MM/DD/YYYY":
|
|
114
|
-
t = parseInt(
|
|
120
|
+
t = parseInt(s[0]) - 1, n = parseInt(s[1]), e = parseInt(s[2]);
|
|
115
121
|
break;
|
|
116
122
|
default:
|
|
117
|
-
e = parseInt(
|
|
123
|
+
e = parseInt(s[0]), t = parseInt(s[1]) - 1, n = parseInt(s[2]);
|
|
118
124
|
break;
|
|
119
125
|
}
|
|
120
126
|
const p = new Date(e, t, n);
|
|
121
127
|
return isNaN(p.getTime()) || p.getFullYear() !== e || p.getMonth() !== t || p.getDate() !== n ? null : p;
|
|
122
|
-
},
|
|
128
|
+
}, Z = (a) => {
|
|
123
129
|
if (!a) return null;
|
|
124
130
|
if (String(a).toLowerCase() === "today") return /* @__PURE__ */ new Date();
|
|
125
131
|
const e = String(a).match(/^([+-]?)(\d+)([dmy])$/i);
|
|
126
132
|
if (e) {
|
|
127
|
-
const
|
|
128
|
-
return w === "d" ?
|
|
133
|
+
const s = e[1] === "-" ? -1 : 1, p = parseInt(e[2]) * s, w = e[3].toLowerCase(), m = /* @__PURE__ */ new Date();
|
|
134
|
+
return w === "d" ? m.setDate(m.getDate() + p) : w === "m" ? m.setMonth(m.getMonth() + p) : w === "y" && m.setFullYear(m.getFullYear() + p), m;
|
|
129
135
|
}
|
|
130
136
|
const t = Y(a);
|
|
131
137
|
if (t) return t;
|
|
132
138
|
const n = new Date(a);
|
|
133
139
|
return isNaN(n.getTime()) ? null : n;
|
|
134
|
-
},
|
|
140
|
+
}, $ = (a) => {
|
|
135
141
|
if (!a) return "";
|
|
136
142
|
let e = a instanceof Date ? a : Y(a);
|
|
137
143
|
if ((!e || isNaN(e.getTime())) && (e = new Date(a)), isNaN(e.getTime())) return "";
|
|
138
|
-
const t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"),
|
|
144
|
+
const t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), s = String(e.getDate()).padStart(2, "0");
|
|
139
145
|
switch (o.date_format) {
|
|
140
146
|
case "DD-MM-YYYY":
|
|
141
|
-
return `${
|
|
147
|
+
return `${s}-${n}-${t}`;
|
|
142
148
|
case "MM-DD-YYYY":
|
|
143
|
-
return `${n}-${
|
|
149
|
+
return `${n}-${s}-${t}`;
|
|
144
150
|
case "DD/MM/YYYY":
|
|
145
|
-
return `${
|
|
151
|
+
return `${s}/${n}/${t}`;
|
|
146
152
|
case "MM/DD/YYYY":
|
|
147
|
-
return `${n}/${
|
|
153
|
+
return `${n}/${s}/${t}`;
|
|
148
154
|
case "YYYY/MM/DD":
|
|
149
|
-
return `${t}/${n}/${
|
|
155
|
+
return `${t}/${n}/${s}`;
|
|
150
156
|
default:
|
|
151
|
-
return `${t}-${n}-${
|
|
157
|
+
return `${t}-${n}-${s}`;
|
|
152
158
|
}
|
|
153
159
|
}, i = (a) => {
|
|
154
160
|
const e = new Date(a);
|
|
155
161
|
return e.setHours(0, 0, 0, 0), e;
|
|
156
|
-
},
|
|
162
|
+
}, z = (a, e) => a && e && a.toDateString() === e.toDateString(), P = D(() => {
|
|
157
163
|
const a = o.modelValue?.start, e = o.modelValue?.end;
|
|
158
164
|
if (!a && !e) return "";
|
|
159
|
-
const t = a ?
|
|
165
|
+
const t = a ? $(Y(a) || new Date(a)) : "", n = e ? $(Y(e) || new Date(e)) : "";
|
|
160
166
|
return t && n ? `${t} ${o.separator} ${n}` : t || n;
|
|
161
|
-
}),
|
|
162
|
-
const a =
|
|
167
|
+
}), ae = D(() => {
|
|
168
|
+
const a = g.value ? $(g.value) : "…", e = f.value ? $(f.value) : "…";
|
|
163
169
|
return `${a} ${o.separator} ${e}`;
|
|
164
|
-
}),
|
|
165
|
-
const t = new Date(a, e, 1), n = new Date(a, e + 1, 0),
|
|
166
|
-
for (let
|
|
167
|
-
w.push({
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
});
|
|
172
|
-
for (let d = 1; d <= p; d++)
|
|
173
|
-
w.push({ day: d, currentMonth: !0, date: new Date(a, e, d) });
|
|
174
|
-
const de = 42 - w.length;
|
|
175
|
-
for (let d = 1; d <= de; d++)
|
|
176
|
-
w.push({ day: d, currentMonth: !1, date: new Date(a, e + 1, d) });
|
|
170
|
+
}), G = (a, e) => {
|
|
171
|
+
const t = new Date(a, e, 1), n = new Date(a, e + 1, 0), s = t.getDay(), p = n.getDate(), w = [];
|
|
172
|
+
for (let m = 0; m < s; m++)
|
|
173
|
+
w.push({ day: null, currentMonth: !1, date: null });
|
|
174
|
+
for (let m = 1; m <= p; m++)
|
|
175
|
+
w.push({ day: m, currentMonth: !0, date: new Date(a, e, m) });
|
|
176
|
+
for (; w.length % 7 !== 0; )
|
|
177
|
+
w.push({ day: null, currentMonth: !1, date: null });
|
|
177
178
|
return w;
|
|
178
|
-
},
|
|
179
|
-
const a = v.value === 11 ? 0 : v.value + 1, e = v.value === 11 ?
|
|
179
|
+
}, V = D(() => {
|
|
180
|
+
const a = v.value === 11 ? 0 : v.value + 1, e = v.value === 11 ? M.value + 1 : M.value;
|
|
180
181
|
return { month: a, year: e };
|
|
181
|
-
}),
|
|
182
|
+
}), re = D(() => G(M.value, v.value)), ne = D(() => G(V.value.year, V.value.month)), k = (a) => {
|
|
182
183
|
if (o.disabled_days.includes(a.getDay())) return !0;
|
|
183
184
|
if (o.disabled_dates && o.disabled_dates.length > 0) {
|
|
184
185
|
const e = i(a);
|
|
@@ -189,110 +190,110 @@ const ye = {
|
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
if (o.min_date) {
|
|
192
|
-
const e =
|
|
193
|
+
const e = Z(o.min_date);
|
|
193
194
|
if (e && i(a) < i(e)) return !0;
|
|
194
195
|
}
|
|
195
196
|
if (o.max_date) {
|
|
196
|
-
const e =
|
|
197
|
+
const e = Z(o.max_date);
|
|
197
198
|
if (e && i(a) > i(e)) return !0;
|
|
198
199
|
}
|
|
199
200
|
return !1;
|
|
200
|
-
}, le =
|
|
201
|
-
const a =
|
|
201
|
+
}, le = D(() => g.value && !f.value && T.value ? T.value : f.value), L = D(() => {
|
|
202
|
+
const a = g.value, e = le.value;
|
|
202
203
|
return !a || !e ? null : a <= e ? { lo: i(a), hi: i(e) } : { lo: i(e), hi: i(a) };
|
|
203
204
|
}), h = (a) => {
|
|
204
|
-
const e =
|
|
205
|
-
return e ? i(a).getTime() === e.lo.getTime() :
|
|
205
|
+
const e = L.value;
|
|
206
|
+
return e ? i(a).getTime() === e.lo.getTime() : z(a, g.value);
|
|
206
207
|
}, y = (a) => {
|
|
207
|
-
const e =
|
|
208
|
+
const e = L.value;
|
|
208
209
|
return e ? i(a).getTime() === e.hi.getTime() : !1;
|
|
209
|
-
},
|
|
210
|
-
const e =
|
|
210
|
+
}, U = (a) => {
|
|
211
|
+
const e = L.value;
|
|
211
212
|
if (!e) return !1;
|
|
212
213
|
const t = i(a).getTime();
|
|
213
214
|
return t > e.lo.getTime() && t < e.hi.getTime();
|
|
214
|
-
},
|
|
215
|
+
}, W = (a) => z(a, /* @__PURE__ */ new Date()), J = (a) => {
|
|
215
216
|
const e = a.date;
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
v.value === 0 ? (v.value = 11,
|
|
217
|
+
k(e) || (!g.value || g.value && f.value ? (g.value = i(e), f.value = null) : i(e) < g.value ? (f.value = g.value, g.value = i(e)) : f.value = i(e));
|
|
218
|
+
}, K = (a) => {
|
|
219
|
+
g.value && !f.value && !k(a.date) && (T.value = a.date);
|
|
220
|
+
}, se = () => {
|
|
221
|
+
v.value === 0 ? (v.value = 11, M.value--) : v.value--;
|
|
222
|
+
}, Q = () => {
|
|
223
|
+
v.value === 11 ? (v.value = 0, M.value++) : v.value++;
|
|
221
224
|
}, X = () => {
|
|
222
|
-
v.value === 11 ? (v.value = 0, _.value++) : v.value++;
|
|
223
|
-
}, j = () => {
|
|
224
225
|
const a = o.modelValue?.start, e = a ? Y(a) || new Date(a) : /* @__PURE__ */ new Date();
|
|
225
|
-
isNaN(e.getTime()) || (v.value = e.getMonth(),
|
|
226
|
-
},
|
|
226
|
+
isNaN(e.getTime()) || (v.value = e.getMonth(), M.value = e.getFullYear());
|
|
227
|
+
}, oe = () => {
|
|
227
228
|
const a = o.modelValue?.start, e = o.modelValue?.end;
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
},
|
|
229
|
+
g.value = a ? i(Y(a) || new Date(a)) : null, f.value = e ? i(Y(e) || new Date(e)) : null, T.value = null, X(), x.value = !0;
|
|
230
|
+
}, j = () => {
|
|
231
|
+
x.value ? x.value = !1 : oe();
|
|
232
|
+
}, ie = () => {
|
|
232
233
|
const a = {
|
|
233
|
-
start:
|
|
234
|
-
end: f.value ?
|
|
234
|
+
start: g.value ? $(g.value) : "",
|
|
235
|
+
end: f.value ? $(f.value) : ""
|
|
235
236
|
};
|
|
236
|
-
E("update:modelValue", a), E("change", a),
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
},
|
|
240
|
-
|
|
237
|
+
E("update:modelValue", a), E("change", a), x.value = !1;
|
|
238
|
+
}, ue = () => {
|
|
239
|
+
x.value = !1;
|
|
240
|
+
}, O = (a) => {
|
|
241
|
+
I.value && !I.value.contains(a.target) && (x.value = !1);
|
|
241
242
|
};
|
|
242
|
-
return
|
|
243
|
+
return de(
|
|
243
244
|
() => o.modelValue,
|
|
244
245
|
() => {
|
|
245
|
-
|
|
246
|
+
x.value || X();
|
|
246
247
|
},
|
|
247
248
|
{ deep: !0 }
|
|
248
|
-
),
|
|
249
|
-
|
|
249
|
+
), ce(() => document.addEventListener("click", O)), ge(() => document.removeEventListener("click", O)), (a, e) => (d(), u(C, null, [
|
|
250
|
+
l.show ? (d(), u("div", {
|
|
250
251
|
key: 0,
|
|
251
|
-
class: b(
|
|
252
|
+
class: b(l.field_name)
|
|
252
253
|
}, [
|
|
253
|
-
|
|
254
|
-
r("p",
|
|
254
|
+
l.label_name ? (d(), u("label", fe, c(l.label_name), 1)) : S("", !0),
|
|
255
|
+
r("p", he, c(P.value), 1),
|
|
255
256
|
e[0] || (e[0] = r("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
256
|
-
], 2)) :
|
|
257
|
-
|
|
257
|
+
], 2)) : S("", !0),
|
|
258
|
+
l.show ? S("", !0) : (d(), u("div", {
|
|
258
259
|
key: 1,
|
|
259
260
|
ref_key: "datepickerContainer",
|
|
260
|
-
ref:
|
|
261
|
-
dir:
|
|
261
|
+
ref: I,
|
|
262
|
+
dir: te.value ? "rtl" : "ltr",
|
|
262
263
|
class: b({
|
|
263
|
-
[
|
|
264
|
-
[
|
|
264
|
+
[l.field_name]: l.field_name && l.field_name !== "",
|
|
265
|
+
[l.container_class]: l.container_class && l.container_class !== ""
|
|
265
266
|
})
|
|
266
267
|
}, [
|
|
267
|
-
|
|
268
|
+
l.label_name ? (d(), u("label", {
|
|
268
269
|
key: 0,
|
|
269
270
|
class: b({
|
|
270
|
-
"gl-label-form":
|
|
271
|
-
"gl-label-form-invalid":
|
|
272
|
-
required:
|
|
271
|
+
"gl-label-form": l.error_message == "",
|
|
272
|
+
"gl-label-form-invalid": l.error_message !== "",
|
|
273
|
+
required: l.is_required
|
|
273
274
|
}),
|
|
274
|
-
for:
|
|
275
|
-
},
|
|
276
|
-
r("div",
|
|
277
|
-
r("div",
|
|
275
|
+
for: l.field_name
|
|
276
|
+
}, c(l.label_name), 11, pe)) : S("", !0),
|
|
277
|
+
r("div", ke, [
|
|
278
|
+
r("div", De, [
|
|
278
279
|
r("input", {
|
|
279
280
|
type: "text",
|
|
280
281
|
readonly: "",
|
|
281
282
|
class: b(["rtl:text-right pe-10 cursor-pointer", {
|
|
282
|
-
"gl-input-form":
|
|
283
|
-
"gl-input-form-invalid":
|
|
284
|
-
[
|
|
283
|
+
"gl-input-form": l.error_message == "",
|
|
284
|
+
"gl-input-form-invalid": l.error_message !== "",
|
|
285
|
+
[l.input_class]: l.input_class && l.input_class !== ""
|
|
285
286
|
}]),
|
|
286
|
-
required:
|
|
287
|
-
name:
|
|
288
|
-
id:
|
|
289
|
-
value:
|
|
290
|
-
placeholder:
|
|
291
|
-
onClick:
|
|
292
|
-
}, null, 10,
|
|
287
|
+
required: l.is_required,
|
|
288
|
+
name: l.field_name,
|
|
289
|
+
id: l.field_name,
|
|
290
|
+
value: P.value,
|
|
291
|
+
placeholder: l.placeholder,
|
|
292
|
+
onClick: j
|
|
293
|
+
}, null, 10, we),
|
|
293
294
|
r("div", {
|
|
294
295
|
class: "absolute inset-y-0 end-0 flex items-center pe-3 cursor-pointer",
|
|
295
|
-
onClick:
|
|
296
|
+
onClick: j
|
|
296
297
|
}, e[1] || (e[1] = [
|
|
297
298
|
r("svg", {
|
|
298
299
|
class: "w-4 h-4 text-gray-500 dark:text-gray-400",
|
|
@@ -305,13 +306,13 @@ const ye = {
|
|
|
305
306
|
], -1)
|
|
306
307
|
]))
|
|
307
308
|
]),
|
|
308
|
-
|
|
309
|
-
r("div",
|
|
310
|
-
r("div",
|
|
311
|
-
r("div",
|
|
309
|
+
me(r("div", xe, [
|
|
310
|
+
r("div", Ye, [
|
|
311
|
+
r("div", be, [
|
|
312
|
+
r("div", Me, [
|
|
312
313
|
r("button", {
|
|
313
314
|
type: "button",
|
|
314
|
-
onClick:
|
|
315
|
+
onClick: se,
|
|
315
316
|
class: "p-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
316
317
|
}, e[2] || (e[2] = [
|
|
317
318
|
r("svg", {
|
|
@@ -328,11 +329,11 @@ const ye = {
|
|
|
328
329
|
})
|
|
329
330
|
], -1)
|
|
330
331
|
])),
|
|
331
|
-
r("span",
|
|
332
|
+
r("span", _e, c(R.value[v.value]) + " " + c(M.value), 1),
|
|
332
333
|
e[4] || (e[4] = r("span", { class: "w-7 sm:hidden" }, null, -1)),
|
|
333
334
|
r("button", {
|
|
334
335
|
type: "button",
|
|
335
|
-
onClick:
|
|
336
|
+
onClick: Q,
|
|
336
337
|
class: "p-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 sm:hidden"
|
|
337
338
|
}, e[3] || (e[3] = [
|
|
338
339
|
r("svg", {
|
|
@@ -350,48 +351,48 @@ const ye = {
|
|
|
350
351
|
], -1)
|
|
351
352
|
]))
|
|
352
353
|
]),
|
|
353
|
-
r("div",
|
|
354
|
-
(
|
|
354
|
+
r("div", $e, [
|
|
355
|
+
(d(!0), u(C, null, N(A.value, (t) => (d(), u("div", {
|
|
355
356
|
key: "lh-" + t,
|
|
356
|
-
class: "text-center text-xs font-semibold text-gray-700 dark:text-gray-300 py-1"
|
|
357
|
-
},
|
|
357
|
+
class: "text-center text-xs font-semibold text-gray-700 dark:text-gray-300 py-1 truncate"
|
|
358
|
+
}, c(t), 1))), 128))
|
|
358
359
|
]),
|
|
359
|
-
r("div",
|
|
360
|
-
(
|
|
360
|
+
r("div", Ce, [
|
|
361
|
+
(d(!0), u(C, null, N(re.value, (t, n) => (d(), u("div", {
|
|
361
362
|
key: "l-" + n,
|
|
362
363
|
class: b(["py-0.5", {
|
|
363
|
-
"bg-primary/10 dark:bg-primaryDark/20": t.currentMonth && (
|
|
364
|
+
"bg-primary/10 dark:bg-primaryDark/20": t.currentMonth && (U(t.date) || h(t.date) || y(t.date)),
|
|
364
365
|
"rounded-s-full": h(t.date),
|
|
365
366
|
"rounded-e-full": y(t.date)
|
|
366
367
|
}])
|
|
367
368
|
}, [
|
|
368
|
-
|
|
369
|
+
t.currentMonth ? (d(), u("button", {
|
|
370
|
+
key: 0,
|
|
369
371
|
type: "button",
|
|
370
|
-
onClick: (
|
|
371
|
-
onMouseenter: (
|
|
372
|
-
disabled:
|
|
372
|
+
onClick: (s) => J(t),
|
|
373
|
+
onMouseenter: (s) => K(t),
|
|
374
|
+
disabled: k(t.date),
|
|
373
375
|
class: b([
|
|
374
376
|
"w-9 h-9 mx-auto text-sm rounded-full flex items-center justify-center transition-colors",
|
|
375
377
|
{
|
|
376
|
-
"text-gray-
|
|
377
|
-
"
|
|
378
|
-
"
|
|
379
|
-
"
|
|
380
|
-
"
|
|
381
|
-
"opacity-40 cursor-not-allowed": D(t.date)
|
|
378
|
+
"text-gray-900 dark:text-white": !h(t.date) && !y(t.date) && !k(t.date),
|
|
379
|
+
"bg-primary dark:bg-primaryDark text-white font-semibold": h(t.date) || y(t.date),
|
|
380
|
+
"ring-1 ring-primary dark:ring-primaryDark": W(t.date) && !h(t.date) && !y(t.date),
|
|
381
|
+
"hover:bg-gray-100 dark:hover:bg-gray-700": !h(t.date) && !y(t.date) && !k(t.date),
|
|
382
|
+
"opacity-40 cursor-not-allowed": k(t.date)
|
|
382
383
|
}
|
|
383
384
|
])
|
|
384
|
-
},
|
|
385
|
+
}, c(t.day), 43, Se)) : (d(), u("div", Te))
|
|
385
386
|
], 2))), 128))
|
|
386
387
|
])
|
|
387
388
|
]),
|
|
388
|
-
r("div",
|
|
389
|
-
r("div",
|
|
389
|
+
r("div", Ve, [
|
|
390
|
+
r("div", Ne, [
|
|
390
391
|
e[6] || (e[6] = r("span", { class: "w-7" }, null, -1)),
|
|
391
|
-
r("span",
|
|
392
|
+
r("span", Ie, c(R.value[V.value.month]) + " " + c(V.value.year), 1),
|
|
392
393
|
r("button", {
|
|
393
394
|
type: "button",
|
|
394
|
-
onClick:
|
|
395
|
+
onClick: Q,
|
|
395
396
|
class: "p-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
396
397
|
}, e[5] || (e[5] = [
|
|
397
398
|
r("svg", {
|
|
@@ -410,63 +411,63 @@ const ye = {
|
|
|
410
411
|
]))
|
|
411
412
|
]),
|
|
412
413
|
r("div", Be, [
|
|
413
|
-
(
|
|
414
|
+
(d(!0), u(C, null, N(A.value, (t) => (d(), u("div", {
|
|
414
415
|
key: "rh-" + t,
|
|
415
|
-
class: "text-center text-xs font-semibold text-gray-700 dark:text-gray-300 py-1"
|
|
416
|
-
},
|
|
416
|
+
class: "text-center text-xs font-semibold text-gray-700 dark:text-gray-300 py-1 truncate"
|
|
417
|
+
}, c(t), 1))), 128))
|
|
417
418
|
]),
|
|
418
|
-
r("div",
|
|
419
|
-
(
|
|
419
|
+
r("div", Le, [
|
|
420
|
+
(d(!0), u(C, null, N(ne.value, (t, n) => (d(), u("div", {
|
|
420
421
|
key: "r-" + n,
|
|
421
422
|
class: b(["py-0.5", {
|
|
422
|
-
"bg-primary/10 dark:bg-primaryDark/20": t.currentMonth && (
|
|
423
|
+
"bg-primary/10 dark:bg-primaryDark/20": t.currentMonth && (U(t.date) || h(t.date) || y(t.date)),
|
|
423
424
|
"rounded-s-full": h(t.date),
|
|
424
425
|
"rounded-e-full": y(t.date)
|
|
425
426
|
}])
|
|
426
427
|
}, [
|
|
427
|
-
|
|
428
|
+
t.currentMonth ? (d(), u("button", {
|
|
429
|
+
key: 0,
|
|
428
430
|
type: "button",
|
|
429
|
-
onClick: (
|
|
430
|
-
onMouseenter: (
|
|
431
|
-
disabled:
|
|
431
|
+
onClick: (s) => J(t),
|
|
432
|
+
onMouseenter: (s) => K(t),
|
|
433
|
+
disabled: k(t.date),
|
|
432
434
|
class: b([
|
|
433
435
|
"w-9 h-9 mx-auto text-sm rounded-full flex items-center justify-center transition-colors",
|
|
434
436
|
{
|
|
435
|
-
"text-gray-
|
|
436
|
-
"
|
|
437
|
-
"
|
|
438
|
-
"
|
|
439
|
-
"
|
|
440
|
-
"opacity-40 cursor-not-allowed": D(t.date)
|
|
437
|
+
"text-gray-900 dark:text-white": !h(t.date) && !y(t.date) && !k(t.date),
|
|
438
|
+
"bg-primary dark:bg-primaryDark text-white font-semibold": h(t.date) || y(t.date),
|
|
439
|
+
"ring-1 ring-primary dark:ring-primaryDark": W(t.date) && !h(t.date) && !y(t.date),
|
|
440
|
+
"hover:bg-gray-100 dark:hover:bg-gray-700": !h(t.date) && !y(t.date) && !k(t.date),
|
|
441
|
+
"opacity-40 cursor-not-allowed": k(t.date)
|
|
441
442
|
}
|
|
442
443
|
])
|
|
443
|
-
},
|
|
444
|
+
}, c(t.day), 43, Ee)) : (d(), u("div", Fe))
|
|
444
445
|
], 2))), 128))
|
|
445
446
|
])
|
|
446
447
|
])
|
|
447
448
|
]),
|
|
448
449
|
r("div", qe, [
|
|
449
|
-
r("span", He,
|
|
450
|
+
r("span", He, c(ae.value), 1),
|
|
450
451
|
r("div", Re, [
|
|
451
452
|
r("button", {
|
|
452
453
|
type: "button",
|
|
453
|
-
onClick:
|
|
454
|
+
onClick: ue,
|
|
454
455
|
class: "px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-200 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors"
|
|
455
|
-
},
|
|
456
|
+
}, c(H("cancel")), 1),
|
|
456
457
|
r("button", {
|
|
457
458
|
type: "button",
|
|
458
|
-
onClick:
|
|
459
|
+
onClick: ie,
|
|
459
460
|
class: "px-4 py-2 text-sm font-medium rounded-lg text-white bg-primary dark:bg-primaryDark hover:bg-primary/90 dark:hover:bg-primaryDark/90 transition-colors"
|
|
460
|
-
},
|
|
461
|
+
}, c(H("apply")), 1)
|
|
461
462
|
])
|
|
462
463
|
])
|
|
463
464
|
], 512), [
|
|
464
|
-
[
|
|
465
|
+
[ve, x.value]
|
|
465
466
|
])
|
|
466
467
|
]),
|
|
467
|
-
r("span", Ae,
|
|
468
|
-
|
|
469
|
-
], 10,
|
|
468
|
+
r("span", Ae, c(l.error_message), 1),
|
|
469
|
+
l.description ? (d(), u("small", Ze, c(l.description), 1)) : S("", !0)
|
|
470
|
+
], 10, ye))
|
|
470
471
|
], 64));
|
|
471
472
|
}
|
|
472
473
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "The most popular library of interactive components built with Vuejs && Tailwind CSS",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "1.2.
|
|
6
|
+
"version": "1.2.373",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/mrgiant/GoldenLogicUi.git"
|