@aures5g/vue-component-library 3.73.0 → 3.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4397,6 +4397,7 @@ var Nc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAA
|
|
|
4397
4397
|
}, Bc = { class: "grow truncate @max-[3.625rem]:hidden" }, Vc = [
|
|
4398
4398
|
"aria-rowindex",
|
|
4399
4399
|
"data-row-index",
|
|
4400
|
+
"data-active-row",
|
|
4400
4401
|
"onClick",
|
|
4401
4402
|
"onDblclick",
|
|
4402
4403
|
"onKeyup",
|
|
@@ -4582,12 +4583,13 @@ var Nc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAA
|
|
|
4582
4583
|
onVisible: ie
|
|
4583
4584
|
}, me({
|
|
4584
4585
|
default: H(({ item: r, index: s }) => [O("div", {
|
|
4585
|
-
class: N(["lg:h-[calc(2.5rem+0.0625rem)] lg:after:h-[0.0625rem] lg:after:w-[calc(100%-2rem)] lg:after:bg-outline/12 lg:after:mx-[1rem] lg:after:absolute lg:after:bottom-0 relative flex flex-col lg:gap-[0.25rem] lg:flex-row max-lg:bg-surface hover:bg-(--row-hover-color,var(--row-default-hover-color)) hover:after:content-none focus:bg-(--row-focus-color,var(--row-default-hover-color)) focus:after:content-none outline-hidden cursor-pointer focus:before focus:before:lg:absolute focus:before:lg:left-[-0.125rem] focus:before:lg:w-[0.125rem] focus:before:lg:h-[2.5rem] focus:before:lg:bg-primary", [{ "bg-secondary-container after:content-none [--row-default-hover-color:#C3D4EE]": Array.isArray(b.value) && b.value.includes(r[e.dataKey]) }, e.getRowClass ? e.getRowClass(r) : null]]),
|
|
4586
|
+
class: N(["lg:h-[calc(2.5rem+0.0625rem)] lg:after:h-[0.0625rem] lg:after:w-[calc(100%-2rem)] lg:after:bg-outline/12 lg:after:mx-[1rem] lg:after:absolute lg:after:bottom-0 relative flex flex-col lg:gap-[0.25rem] lg:flex-row max-lg:bg-surface hover:bg-(--row-hover-color,var(--row-default-hover-color)) hover:after:content-none focus:bg-(--row-focus-color,var(--row-default-hover-color)) data-active-row:bg-(--row-focus-color,var(--row-default-hover-color)) focus:after:content-none data-active-row:after:content-none outline-hidden cursor-pointer focus:before focus:before:lg:absolute focus:before:lg:left-[-0.125rem] focus:before:lg:w-[0.125rem] focus:before:lg:h-[2.5rem] focus:before:lg:bg-primary data-active-row:before data-active-row:before:lg:absolute data-active-row:before:lg:left-[-0.125rem] data-active-row:before:lg:w-[0.125rem] data-active-row:before:lg:h-[2.5rem] data-active-row:before:lg:bg-primary", [{ "bg-secondary-container after:content-none [--row-default-hover-color:#C3D4EE]": Array.isArray(b.value) && b.value.includes(r[e.dataKey]) }, e.getRowClass ? e.getRowClass(r) : null]]),
|
|
4586
4587
|
style: Se(e.getRowStyle ? e.getRowStyle(r) : null),
|
|
4587
4588
|
tabindex: "-1",
|
|
4588
4589
|
role: "row",
|
|
4589
4590
|
"aria-rowindex": s,
|
|
4590
4591
|
"data-row-index": s,
|
|
4592
|
+
"data-active-row": s === m.value || void 0,
|
|
4591
4593
|
onClick: (e) => a("rowClick", {
|
|
4592
4594
|
originalEvent: e,
|
|
4593
4595
|
data: r,
|
|
@@ -8334,6 +8336,7 @@ var Am = { class: "text-body-large" }, jm = {
|
|
|
8334
8336
|
key: 1,
|
|
8335
8337
|
class: "flex flex-col gap-[0.5rem] pb-[1.25rem] h-[22.75rem]"
|
|
8336
8338
|
}, Gm = { class: "h-[4rem] flex justify-between items-center pl-[3.5rem] pr-[3.875rem] shrink-0 border-b border-outline/16" }, Km = 1900, qm = 2100, Jm = /* @__PURE__ */ A({
|
|
8339
|
+
inheritAttrs: !1,
|
|
8337
8340
|
__name: "UIDatePicker",
|
|
8338
8341
|
props: /*@__PURE__*/ j({
|
|
8339
8342
|
label: {},
|
|
@@ -8344,97 +8347,96 @@ var Am = { class: "text-body-large" }, jm = {
|
|
|
8344
8347
|
}),
|
|
8345
8348
|
emits: ["update:modelValue"],
|
|
8346
8349
|
setup(e) {
|
|
8347
|
-
let t = B(e, "modelValue"),
|
|
8348
|
-
function o(e) {
|
|
8349
|
-
i.value = i.value.set({ month: e }), a.value = "calendar";
|
|
8350
|
-
}
|
|
8350
|
+
let t = Pe(), n = B(e, "modelValue"), r = $.now().startOf("day"), i = w(() => $.fromISO(n.value)), a = F(i.value.isValid ? i.value.startOf("month") : $.now().startOf("month")), o = F("calendar");
|
|
8351
8351
|
function s(e) {
|
|
8352
|
-
|
|
8352
|
+
a.value = a.value.set({ month: e }), o.value = "calendar";
|
|
8353
8353
|
}
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8354
|
+
function c(e) {
|
|
8355
|
+
a.value = a.value.set({ year: e }), o.value = "calendar";
|
|
8356
|
+
}
|
|
8357
|
+
let l = w(() => ({
|
|
8358
|
+
month: a.value.month,
|
|
8359
|
+
year: a.value.year,
|
|
8360
|
+
interval: Dp.fromDateTimes(a.value.startOf("month").startOf("week"), a.value.endOf("month").endOf("week"))
|
|
8358
8361
|
}));
|
|
8359
|
-
function*
|
|
8362
|
+
function* u(e) {
|
|
8360
8363
|
if (!e.start || !e.end) return;
|
|
8361
8364
|
let t = e.start.startOf("day");
|
|
8362
8365
|
for (; t < e.end;) yield t, t = t.plus({ days: 1 });
|
|
8363
8366
|
}
|
|
8364
|
-
let
|
|
8367
|
+
let d = w(() => {
|
|
8365
8368
|
let e = /* @__PURE__ */ new Map();
|
|
8366
|
-
for (let t of l
|
|
8369
|
+
for (let t of u(l.value.interval)) {
|
|
8367
8370
|
let n = e.getOrInsert(t.weekNumber, []);
|
|
8368
8371
|
n[t.weekday - 1] = t;
|
|
8369
8372
|
}
|
|
8370
8373
|
return [...e.values()];
|
|
8371
|
-
}),
|
|
8374
|
+
}), f = Op.months("short"), p = w(() => {
|
|
8372
8375
|
let e = [];
|
|
8373
8376
|
for (let t = Km; t < qm; t++) e.push(t);
|
|
8374
8377
|
return e;
|
|
8375
|
-
}),
|
|
8378
|
+
}), m = w(() => o.value === "month" ? Op.months().map((e, t) => ({
|
|
8376
8379
|
label: e,
|
|
8377
8380
|
value: t + 1
|
|
8378
|
-
})) :
|
|
8381
|
+
})) : p.value.map((e) => ({
|
|
8379
8382
|
label: `${e}`,
|
|
8380
8383
|
value: e
|
|
8381
|
-
}))),
|
|
8384
|
+
}))), h = w({
|
|
8382
8385
|
get() {
|
|
8383
|
-
return
|
|
8386
|
+
return o.value === "month" ? l.value.month : l.value.year;
|
|
8384
8387
|
},
|
|
8385
8388
|
set(e) {
|
|
8386
|
-
if (
|
|
8387
|
-
|
|
8389
|
+
if (o.value === "month") return s(e);
|
|
8390
|
+
c(e);
|
|
8388
8391
|
}
|
|
8389
|
-
}),
|
|
8390
|
-
function
|
|
8391
|
-
if (
|
|
8392
|
-
|
|
8392
|
+
}), g = Le("pickerDialog"), _ = !1;
|
|
8393
|
+
function v() {
|
|
8394
|
+
if (_) {
|
|
8395
|
+
_ = !1;
|
|
8393
8396
|
return;
|
|
8394
8397
|
}
|
|
8395
|
-
|
|
8398
|
+
g.value?.show();
|
|
8396
8399
|
}
|
|
8397
|
-
function
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
+
function y() {
|
|
8401
|
+
_ = !0, g.value?.close(), Promise.resolve().then(() => {
|
|
8402
|
+
_ = !1;
|
|
8400
8403
|
});
|
|
8401
8404
|
}
|
|
8402
|
-
function
|
|
8403
|
-
|
|
8405
|
+
function ee() {
|
|
8406
|
+
g.value?.open && y();
|
|
8404
8407
|
}
|
|
8405
8408
|
bt(document, "keydown", (e) => {
|
|
8406
|
-
e.key === "Escape" &&
|
|
8409
|
+
e.key === "Escape" && ee();
|
|
8407
8410
|
});
|
|
8408
|
-
function
|
|
8409
|
-
|
|
8411
|
+
function b() {
|
|
8412
|
+
g.value?.open && y();
|
|
8410
8413
|
}
|
|
8411
|
-
let
|
|
8412
|
-
ut(
|
|
8413
|
-
|
|
8414
|
+
let x = Le("rootRef");
|
|
8415
|
+
ut(x, () => {
|
|
8416
|
+
g.value?.open && y();
|
|
8414
8417
|
});
|
|
8415
|
-
function
|
|
8416
|
-
|
|
8418
|
+
function te(e) {
|
|
8419
|
+
n.value = e.toISO() || "", y();
|
|
8417
8420
|
}
|
|
8418
|
-
let
|
|
8419
|
-
function
|
|
8420
|
-
let t = e.hasSame(
|
|
8421
|
+
let ne = w(() => i.value.isValid ? i.value.toLocaleString() : "");
|
|
8422
|
+
function re(e) {
|
|
8423
|
+
let t = e.hasSame(r, "day"), n = e.hasSame(i.value, "day"), a = e.month === l.value.month;
|
|
8421
8424
|
return {
|
|
8422
|
-
"text-primary border border-primary hover:bg-primary/8": t && !
|
|
8423
|
-
"bg-primary text-on-primary hover:bg-[color-mix(in_oklab,var(--color-primary),rgba(from_var(--color-on-primary)_r_g_b/8%))]":
|
|
8424
|
-
"hover:bg-on-surface-variant/8": a && !
|
|
8425
|
+
"text-primary border border-primary hover:bg-primary/8": t && !n,
|
|
8426
|
+
"bg-primary text-on-primary hover:bg-[color-mix(in_oklab,var(--color-primary),rgba(from_var(--color-on-primary)_r_g_b/8%))]": n,
|
|
8427
|
+
"hover:bg-on-surface-variant/8": a && !n
|
|
8425
8428
|
};
|
|
8426
8429
|
}
|
|
8427
|
-
return (
|
|
8430
|
+
return (n, r) => (P(), D("div", {
|
|
8428
8431
|
ref_key: "rootRef",
|
|
8429
|
-
ref:
|
|
8432
|
+
ref: x,
|
|
8430
8433
|
class: "relative"
|
|
8431
|
-
}, [k(Ia, {
|
|
8434
|
+
}, [k(Ia, M({
|
|
8432
8435
|
color: e.color,
|
|
8433
8436
|
label: e.label,
|
|
8434
|
-
"model-value":
|
|
8435
|
-
"trailing-icon": z(Dt)
|
|
8436
|
-
|
|
8437
|
-
}, null, 8, [
|
|
8437
|
+
"model-value": ne.value,
|
|
8438
|
+
"trailing-icon": z(Dt)
|
|
8439
|
+
}, z(t), { onFocus: v }), null, 16, [
|
|
8438
8440
|
"color",
|
|
8439
8441
|
"label",
|
|
8440
8442
|
"model-value",
|
|
@@ -8442,51 +8444,51 @@ var Am = { class: "text-body-large" }, jm = {
|
|
|
8442
8444
|
]), O("dialog", {
|
|
8443
8445
|
ref: "pickerDialog",
|
|
8444
8446
|
class: "select-none absolute top-full left-0 bg-surface-container-high rounded-extra-large z-5 w-[22.5rem] min-h-[22.75rem]",
|
|
8445
|
-
onClose:
|
|
8446
|
-
}, [
|
|
8447
|
-
label: z(
|
|
8448
|
-
onMoveLeft:
|
|
8449
|
-
onMoveRight:
|
|
8450
|
-
onOpen:
|
|
8447
|
+
onClose: b
|
|
8448
|
+
}, [o.value === "calendar" ? (P(), D("div", Rm, [O("div", zm, [k(Mm, {
|
|
8449
|
+
label: z(f)[l.value.month - 1] ?? "??",
|
|
8450
|
+
onMoveLeft: r[0] ||= (e) => s(l.value.month - 1),
|
|
8451
|
+
onMoveRight: r[1] ||= (e) => s(l.value.month + 1),
|
|
8452
|
+
onOpen: r[2] ||= (e) => o.value = "month"
|
|
8451
8453
|
}, null, 8, ["label"]), k(Mm, {
|
|
8452
|
-
label: `${
|
|
8453
|
-
onMoveLeft:
|
|
8454
|
-
onMoveRight:
|
|
8455
|
-
onOpen:
|
|
8454
|
+
label: `${l.value.year}`,
|
|
8455
|
+
onMoveLeft: r[3] ||= (e) => c(l.value.year - 1),
|
|
8456
|
+
onMoveRight: r[4] ||= (e) => c(l.value.year + 1),
|
|
8457
|
+
onOpen: r[5] ||= (e) => o.value = "year"
|
|
8456
8458
|
}, null, 8, ["label"])]), O("div", Bm, [O("div", Vm, [(P(!0), D(C, null, I(z(Op).weekdays("short"), (e) => (P(), D("div", {
|
|
8457
8459
|
key: e,
|
|
8458
8460
|
class: "p-[0.25rem] size-[3rem]"
|
|
8459
|
-
}, [O("div", Hm, R(e), 1)]))), 128)), (P(!0), D(C, null, I(
|
|
8461
|
+
}, [O("div", Hm, R(e), 1)]))), 128)), (P(!0), D(C, null, I(d.value, (e, t) => (P(), D(C, { key: t }, [(P(!0), D(C, null, I(e, (e) => (P(), D("div", {
|
|
8460
8462
|
key: `${t}-${e.day}`,
|
|
8461
|
-
class: N(["p-[0.25rem] size-[3rem] cursor-pointer", { "opacity-38 hover:opacity-100": e.month !==
|
|
8463
|
+
class: N(["p-[0.25rem] size-[3rem] cursor-pointer", { "opacity-38 hover:opacity-100": e.month !== l.value.month }])
|
|
8462
8464
|
}, [O("div", {
|
|
8463
|
-
class: N(["size-[2.5rem] inline-flex justify-center items-center rounded-full",
|
|
8464
|
-
onClick: (t) =>
|
|
8465
|
-
}, R(e.day), 11, Um)], 2))), 128))], 64))), 128))])])])) :
|
|
8466
|
-
label: z(
|
|
8465
|
+
class: N(["size-[2.5rem] inline-flex justify-center items-center rounded-full", re(e)]),
|
|
8466
|
+
onClick: (t) => te(e)
|
|
8467
|
+
}, R(e.day), 11, Um)], 2))), 128))], 64))), 128))])])])) : o.value === "month" || o.value === "year" ? (P(), D("div", Wm, [O("div", Gm, [k(Mm, {
|
|
8468
|
+
label: z(f)[l.value.month - 1] ?? "??",
|
|
8467
8469
|
"show-arrows": !1,
|
|
8468
|
-
"show-dropdown":
|
|
8469
|
-
disabled:
|
|
8470
|
-
onOpen:
|
|
8470
|
+
"show-dropdown": o.value === "month",
|
|
8471
|
+
disabled: o.value === "year",
|
|
8472
|
+
onOpen: r[6] ||= (e) => o.value = "calendar"
|
|
8471
8473
|
}, null, 8, [
|
|
8472
8474
|
"label",
|
|
8473
8475
|
"show-dropdown",
|
|
8474
8476
|
"disabled"
|
|
8475
8477
|
]), k(Mm, {
|
|
8476
|
-
label: `${
|
|
8478
|
+
label: `${l.value.year}`,
|
|
8477
8479
|
"show-arrows": !1,
|
|
8478
|
-
"show-dropdown":
|
|
8479
|
-
disabled:
|
|
8480
|
-
onOpen:
|
|
8480
|
+
"show-dropdown": o.value === "year",
|
|
8481
|
+
disabled: o.value === "month",
|
|
8482
|
+
onOpen: r[7] ||= (e) => o.value = "calendar"
|
|
8481
8483
|
}, null, 8, [
|
|
8482
8484
|
"label",
|
|
8483
8485
|
"show-dropdown",
|
|
8484
8486
|
"disabled"
|
|
8485
8487
|
])]), k(Lm, {
|
|
8486
|
-
modelValue:
|
|
8487
|
-
"onUpdate:modelValue":
|
|
8488
|
-
list:
|
|
8489
|
-
"big-row":
|
|
8488
|
+
modelValue: h.value,
|
|
8489
|
+
"onUpdate:modelValue": r[8] ||= (e) => h.value = e,
|
|
8490
|
+
list: m.value,
|
|
8491
|
+
"big-row": o.value === "month"
|
|
8490
8492
|
}, null, 8, [
|
|
8491
8493
|
"modelValue",
|
|
8492
8494
|
"list",
|