@aures5g/vue-component-library 3.73.0 → 3.74.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.
@@ -8334,6 +8334,7 @@ var Am = { class: "text-body-large" }, jm = {
8334
8334
  key: 1,
8335
8335
  class: "flex flex-col gap-[0.5rem] pb-[1.25rem] h-[22.75rem]"
8336
8336
  }, 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({
8337
+ inheritAttrs: !1,
8337
8338
  __name: "UIDatePicker",
8338
8339
  props: /*@__PURE__*/ j({
8339
8340
  label: {},
@@ -8344,97 +8345,96 @@ var Am = { class: "text-body-large" }, jm = {
8344
8345
  }),
8345
8346
  emits: ["update:modelValue"],
8346
8347
  setup(e) {
8347
- let t = B(e, "modelValue"), n = $.now().startOf("day"), r = w(() => $.fromISO(t.value)), i = F(r.value.isValid ? r.value.startOf("month") : $.now().startOf("month")), a = F("calendar");
8348
- function o(e) {
8349
- i.value = i.value.set({ month: e }), a.value = "calendar";
8350
- }
8348
+ 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
8349
  function s(e) {
8352
- i.value = i.value.set({ year: e }), a.value = "calendar";
8350
+ a.value = a.value.set({ month: e }), o.value = "calendar";
8353
8351
  }
8354
- let c = w(() => ({
8355
- month: i.value.month,
8356
- year: i.value.year,
8357
- interval: Dp.fromDateTimes(i.value.startOf("month").startOf("week"), i.value.endOf("month").endOf("week"))
8352
+ function c(e) {
8353
+ a.value = a.value.set({ year: e }), o.value = "calendar";
8354
+ }
8355
+ let l = w(() => ({
8356
+ month: a.value.month,
8357
+ year: a.value.year,
8358
+ interval: Dp.fromDateTimes(a.value.startOf("month").startOf("week"), a.value.endOf("month").endOf("week"))
8358
8359
  }));
8359
- function* l(e) {
8360
+ function* u(e) {
8360
8361
  if (!e.start || !e.end) return;
8361
8362
  let t = e.start.startOf("day");
8362
8363
  for (; t < e.end;) yield t, t = t.plus({ days: 1 });
8363
8364
  }
8364
- let u = w(() => {
8365
+ let d = w(() => {
8365
8366
  let e = /* @__PURE__ */ new Map();
8366
- for (let t of l(c.value.interval)) {
8367
+ for (let t of u(l.value.interval)) {
8367
8368
  let n = e.getOrInsert(t.weekNumber, []);
8368
8369
  n[t.weekday - 1] = t;
8369
8370
  }
8370
8371
  return [...e.values()];
8371
- }), d = Op.months("short"), f = w(() => {
8372
+ }), f = Op.months("short"), p = w(() => {
8372
8373
  let e = [];
8373
8374
  for (let t = Km; t < qm; t++) e.push(t);
8374
8375
  return e;
8375
- }), p = w(() => a.value === "month" ? Op.months().map((e, t) => ({
8376
+ }), m = w(() => o.value === "month" ? Op.months().map((e, t) => ({
8376
8377
  label: e,
8377
8378
  value: t + 1
8378
- })) : f.value.map((e) => ({
8379
+ })) : p.value.map((e) => ({
8379
8380
  label: `${e}`,
8380
8381
  value: e
8381
- }))), m = w({
8382
+ }))), h = w({
8382
8383
  get() {
8383
- return a.value === "month" ? c.value.month : c.value.year;
8384
+ return o.value === "month" ? l.value.month : l.value.year;
8384
8385
  },
8385
8386
  set(e) {
8386
- if (a.value === "month") return o(e);
8387
- s(e);
8387
+ if (o.value === "month") return s(e);
8388
+ c(e);
8388
8389
  }
8389
- }), h = Le("pickerDialog"), g = !1;
8390
- function _() {
8391
- if (g) {
8392
- g = !1;
8390
+ }), g = Le("pickerDialog"), _ = !1;
8391
+ function v() {
8392
+ if (_) {
8393
+ _ = !1;
8393
8394
  return;
8394
8395
  }
8395
- h.value?.show();
8396
+ g.value?.show();
8396
8397
  }
8397
- function v() {
8398
- g = !0, h.value?.close(), Promise.resolve().then(() => {
8399
- g = !1;
8398
+ function y() {
8399
+ _ = !0, g.value?.close(), Promise.resolve().then(() => {
8400
+ _ = !1;
8400
8401
  });
8401
8402
  }
8402
- function y() {
8403
- h.value?.open && v();
8403
+ function ee() {
8404
+ g.value?.open && y();
8404
8405
  }
8405
8406
  bt(document, "keydown", (e) => {
8406
- e.key === "Escape" && y();
8407
+ e.key === "Escape" && ee();
8407
8408
  });
8408
- function ee() {
8409
- h.value?.open && v();
8409
+ function b() {
8410
+ g.value?.open && y();
8410
8411
  }
8411
- let b = Le("rootRef");
8412
- ut(b, () => {
8413
- h.value?.open && v();
8412
+ let x = Le("rootRef");
8413
+ ut(x, () => {
8414
+ g.value?.open && y();
8414
8415
  });
8415
- function x(e) {
8416
- t.value = e.toISO() || "", v();
8416
+ function te(e) {
8417
+ n.value = e.toISO() || "", y();
8417
8418
  }
8418
- let te = w(() => r.value.isValid ? r.value.toLocaleString() : "");
8419
- function ne(e) {
8420
- let t = e.hasSame(n, "day"), i = e.hasSame(r.value, "day"), a = e.month === c.value.month;
8419
+ let ne = w(() => i.value.isValid ? i.value.toLocaleString() : "");
8420
+ function re(e) {
8421
+ let t = e.hasSame(r, "day"), n = e.hasSame(i.value, "day"), a = e.month === l.value.month;
8421
8422
  return {
8422
- "text-primary border border-primary hover:bg-primary/8": t && !i,
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%))]": i,
8424
- "hover:bg-on-surface-variant/8": a && !i
8423
+ "text-primary border border-primary hover:bg-primary/8": t && !n,
8424
+ "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,
8425
+ "hover:bg-on-surface-variant/8": a && !n
8425
8426
  };
8426
8427
  }
8427
- return (t, n) => (P(), D("div", {
8428
+ return (n, r) => (P(), D("div", {
8428
8429
  ref_key: "rootRef",
8429
- ref: b,
8430
+ ref: x,
8430
8431
  class: "relative"
8431
- }, [k(Ia, {
8432
+ }, [k(Ia, M({
8432
8433
  color: e.color,
8433
8434
  label: e.label,
8434
- "model-value": te.value,
8435
- "trailing-icon": z(Dt),
8436
- onFocus: _
8437
- }, null, 8, [
8435
+ "model-value": ne.value,
8436
+ "trailing-icon": z(Dt)
8437
+ }, z(t), { onFocus: v }), null, 16, [
8438
8438
  "color",
8439
8439
  "label",
8440
8440
  "model-value",
@@ -8442,51 +8442,51 @@ var Am = { class: "text-body-large" }, jm = {
8442
8442
  ]), O("dialog", {
8443
8443
  ref: "pickerDialog",
8444
8444
  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: ee
8446
- }, [a.value === "calendar" ? (P(), D("div", Rm, [O("div", zm, [k(Mm, {
8447
- label: z(d)[c.value.month - 1] ?? "??",
8448
- onMoveLeft: n[0] ||= (e) => o(c.value.month - 1),
8449
- onMoveRight: n[1] ||= (e) => o(c.value.month + 1),
8450
- onOpen: n[2] ||= (e) => a.value = "month"
8445
+ onClose: b
8446
+ }, [o.value === "calendar" ? (P(), D("div", Rm, [O("div", zm, [k(Mm, {
8447
+ label: z(f)[l.value.month - 1] ?? "??",
8448
+ onMoveLeft: r[0] ||= (e) => s(l.value.month - 1),
8449
+ onMoveRight: r[1] ||= (e) => s(l.value.month + 1),
8450
+ onOpen: r[2] ||= (e) => o.value = "month"
8451
8451
  }, null, 8, ["label"]), k(Mm, {
8452
- label: `${c.value.year}`,
8453
- onMoveLeft: n[3] ||= (e) => s(c.value.year - 1),
8454
- onMoveRight: n[4] ||= (e) => s(c.value.year + 1),
8455
- onOpen: n[5] ||= (e) => a.value = "year"
8452
+ label: `${l.value.year}`,
8453
+ onMoveLeft: r[3] ||= (e) => c(l.value.year - 1),
8454
+ onMoveRight: r[4] ||= (e) => c(l.value.year + 1),
8455
+ onOpen: r[5] ||= (e) => o.value = "year"
8456
8456
  }, null, 8, ["label"])]), O("div", Bm, [O("div", Vm, [(P(!0), D(C, null, I(z(Op).weekdays("short"), (e) => (P(), D("div", {
8457
8457
  key: e,
8458
8458
  class: "p-[0.25rem] size-[3rem]"
8459
- }, [O("div", Hm, R(e), 1)]))), 128)), (P(!0), D(C, null, I(u.value, (e, t) => (P(), D(C, { key: t }, [(P(!0), D(C, null, I(e, (e) => (P(), D("div", {
8459
+ }, [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
8460
  key: `${t}-${e.day}`,
8461
- class: N(["p-[0.25rem] size-[3rem] cursor-pointer", { "opacity-38 hover:opacity-100": e.month !== c.value.month }])
8461
+ class: N(["p-[0.25rem] size-[3rem] cursor-pointer", { "opacity-38 hover:opacity-100": e.month !== l.value.month }])
8462
8462
  }, [O("div", {
8463
- class: N(["size-[2.5rem] inline-flex justify-center items-center rounded-full", ne(e)]),
8464
- onClick: (t) => x(e)
8465
- }, R(e.day), 11, Um)], 2))), 128))], 64))), 128))])])])) : a.value === "month" || a.value === "year" ? (P(), D("div", Wm, [O("div", Gm, [k(Mm, {
8466
- label: z(d)[c.value.month - 1] ?? "??",
8463
+ class: N(["size-[2.5rem] inline-flex justify-center items-center rounded-full", re(e)]),
8464
+ onClick: (t) => te(e)
8465
+ }, R(e.day), 11, Um)], 2))), 128))], 64))), 128))])])])) : o.value === "month" || o.value === "year" ? (P(), D("div", Wm, [O("div", Gm, [k(Mm, {
8466
+ label: z(f)[l.value.month - 1] ?? "??",
8467
8467
  "show-arrows": !1,
8468
- "show-dropdown": a.value === "month",
8469
- disabled: a.value === "year",
8470
- onOpen: n[6] ||= (e) => a.value = "calendar"
8468
+ "show-dropdown": o.value === "month",
8469
+ disabled: o.value === "year",
8470
+ onOpen: r[6] ||= (e) => o.value = "calendar"
8471
8471
  }, null, 8, [
8472
8472
  "label",
8473
8473
  "show-dropdown",
8474
8474
  "disabled"
8475
8475
  ]), k(Mm, {
8476
- label: `${c.value.year}`,
8476
+ label: `${l.value.year}`,
8477
8477
  "show-arrows": !1,
8478
- "show-dropdown": a.value === "year",
8479
- disabled: a.value === "month",
8480
- onOpen: n[7] ||= (e) => a.value = "calendar"
8478
+ "show-dropdown": o.value === "year",
8479
+ disabled: o.value === "month",
8480
+ onOpen: r[7] ||= (e) => o.value = "calendar"
8481
8481
  }, null, 8, [
8482
8482
  "label",
8483
8483
  "show-dropdown",
8484
8484
  "disabled"
8485
8485
  ])]), k(Lm, {
8486
- modelValue: m.value,
8487
- "onUpdate:modelValue": n[8] ||= (e) => m.value = e,
8488
- list: p.value,
8489
- "big-row": a.value === "month"
8486
+ modelValue: h.value,
8487
+ "onUpdate:modelValue": r[8] ||= (e) => h.value = e,
8488
+ list: m.value,
8489
+ "big-row": o.value === "month"
8490
8490
  }, null, 8, [
8491
8491
  "modelValue",
8492
8492
  "list",