@enos5/enos-vue-default 1.7.3 → 1.7.5

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './styles.css';
2
- import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-tniGDCqg.js";
2
+ import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-COD45Fax.js";
3
3
  export {
4
4
  _ as ActionCard,
5
5
  a as ActionMessage,
@@ -1,4 +1,4 @@
1
- import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-tniGDCqg.js";
1
+ import { _, a, b, c, d, e, f, g, h, i, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2 } from "./plugin-COD45Fax.js";
2
2
  export {
3
3
  _ as ActionCard,
4
4
  a as ActionMessage,
@@ -588,7 +588,7 @@ const _sfc_main$I = {
588
588
  return (_ctx, _cache) => {
589
589
  return openBlock(), createElementBlock("label", {
590
590
  class: normalizeClass(["inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
591
- isChecked.value ? "border-neutral-900 bg-neutral-900 text-neutral-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-50" : "border-neutral-200 text-neutral-600 dark:border-neutral-800 dark:text-neutral-100",
591
+ isChecked.value ? "border-neutral-900 bg-neutral-900 text-neutral-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-50" : "border-neutral-200 text-neutral-600 dark:border-neutral-700 dark:text-neutral-300",
592
592
  __props.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
593
593
  hasFocus.value && !__props.disabled ? "ring-2 ring-neutral-900/20 ring-offset-2 ring-offset-white dark:ring-neutral-100/20 dark:ring-offset-neutral-950" : ""
594
594
  ]])
@@ -605,7 +605,7 @@ const _sfc_main$I = {
605
605
  }, null, 40, _hoisted_1$v),
606
606
  createElementVNode("span", {
607
607
  class: normalizeClass(["inline-flex h-4 w-4 items-center justify-center border text-[10px] font-bold leading-none", [
608
- isChecked.value ? "border-current bg-white/15 text-current dark:bg-neutral-900/15" : "border-current/70 text-transparent",
608
+ isChecked.value ? "border-current bg-white/15 text-current dark:bg-neutral-900/15" : "border-neutral-400 text-transparent dark:border-neutral-500",
609
609
  "rounded"
610
610
  ]])
611
611
  }, " ✓ ", 2),
@@ -1506,7 +1506,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1506
1506
  const start = new Date(startDate.value);
1507
1507
  const end = new Date(endDate.value);
1508
1508
  const diffTime = end - start;
1509
- return Math.ceil(diffTime / (1e3 * 60 * 60 * 24));
1509
+ return Math.ceil(diffTime / (1e3 * 60 * 60 * 24)) + 1;
1510
1510
  });
1511
1511
  const calendarDays = computed(() => {
1512
1512
  const firstDay = new Date(currentYear.value, currentMonth.value, 1);
@@ -1558,17 +1558,17 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1558
1558
  const dateStr = date.toISOString().split("T")[0];
1559
1559
  const startStr = startDate.value;
1560
1560
  const hoveredStr = hoveredDate.value.toISOString().split("T")[0];
1561
- if (dateStr === startStr || dateStr === hoveredStr) return false;
1562
- return dateStr > startStr && dateStr < hoveredStr || dateStr < startStr && dateStr > hoveredStr;
1561
+ if (dateStr === startStr) return false;
1562
+ return dateStr > startStr && dateStr <= hoveredStr || dateStr < startStr && dateStr >= hoveredStr;
1563
1563
  };
1564
1564
  const isDateInValidRange = (date) => {
1565
1565
  if (!startDate.value || endDate.value) return false;
1566
1566
  const dateStr = date.toISOString().split("T")[0];
1567
1567
  const startStr = startDate.value;
1568
- if (dateStr <= startStr) return false;
1568
+ if (dateStr < startStr) return false;
1569
1569
  const start = new Date(startStr);
1570
1570
  const selected = new Date(dateStr);
1571
- const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24));
1571
+ const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24)) + 1;
1572
1572
  return daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays);
1573
1573
  };
1574
1574
  const inputClasses = computed(() => [
@@ -1596,6 +1596,9 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1596
1596
  return false;
1597
1597
  }
1598
1598
  if (startDate.value && !endDate.value) {
1599
+ if (dateStr === startDate.value) {
1600
+ return props.minDays <= 1;
1601
+ }
1599
1602
  return isDateInValidRange(date);
1600
1603
  }
1601
1604
  if (!startDate.value || startDate.value && endDate.value) {
@@ -1613,6 +1616,11 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1613
1616
  };
1614
1617
  const selectDate = (date) => {
1615
1618
  const dateStr = date.toISOString().split("T")[0];
1619
+ if (startDate.value && !endDate.value && dateStr === startDate.value && props.minDays <= 1) {
1620
+ emit("update:modelValue", { start: startDate.value, end: dateStr });
1621
+ isOpen.value = false;
1622
+ return;
1623
+ }
1616
1624
  if (!isDateAllowed(date)) {
1617
1625
  return;
1618
1626
  }
@@ -1622,7 +1630,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1622
1630
  const start = new Date(startDate.value);
1623
1631
  const selected = new Date(dateStr);
1624
1632
  if (selected < start) {
1625
- const daysDiff = Math.ceil((start - selected) / (1e3 * 60 * 60 * 24));
1633
+ const daysDiff = Math.ceil((start - selected) / (1e3 * 60 * 60 * 24)) + 1;
1626
1634
  if (daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays)) {
1627
1635
  emit("update:modelValue", { start: dateStr, end: startDate.value });
1628
1636
  isOpen.value = false;
@@ -1630,7 +1638,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1630
1638
  return;
1631
1639
  }
1632
1640
  } else {
1633
- const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24));
1641
+ const daysDiff = Math.ceil((selected - start) / (1e3 * 60 * 60 * 24)) + 1;
1634
1642
  if (daysDiff >= props.minDays && (props.maxDays === null || daysDiff <= props.maxDays)) {
1635
1643
  emit("update:modelValue", { start: startDate.value, end: dateStr });
1636
1644
  isOpen.value = false;
@@ -1814,7 +1822,7 @@ const _sfc_main$C = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
1814
1822
  };
1815
1823
  }
1816
1824
  });
1817
- const DateRangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-43db6d8e"]]);
1825
+ const DateRangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-60a85ab0"]]);
1818
1826
  const _hoisted_1$p = { class: "relative" };
1819
1827
  const _hoisted_2$g = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" };
1820
1828
  const _hoisted_3$a = ["accept"];
@@ -5324,4 +5332,4 @@ export {
5324
5332
  _sfc_main$A as y,
5325
5333
  _sfc_main$z as z
5326
5334
  };
5327
- //# sourceMappingURL=plugin-tniGDCqg.js.map
5335
+ //# sourceMappingURL=plugin-COD45Fax.js.map