@amirjalili1374/ui-kit 1.5.81 → 1.5.82

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/ui-kit.es.js CHANGED
@@ -13970,7 +13970,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
13970
13970
  const emit = __emit;
13971
13971
  const internalFormat = computed(() => {
13972
13972
  if (props.format) return props.format;
13973
- return props.type === "datetime" || props.type === "time" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
13973
+ if (props.type === "datetime") return "YYYY-MM-DD HH:mm:ss";
13974
+ if (props.type === "time") return "HH:mm:ss";
13975
+ return "YYYY-MM-DD";
13974
13976
  });
13975
13977
  const internalDisplayFormat = computed(() => {
13976
13978
  if (props.displayFormat) return props.displayFormat;
@@ -13987,31 +13989,33 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
13987
13989
  return "jYYYY/jMM/jDD";
13988
13990
  }
13989
13991
  });
13992
+ const convertIsoToLocalFormat = (isoStr) => {
13993
+ if (!isoStr || !isoStr.includes("T")) return isoStr;
13994
+ const date = new Date(isoStr);
13995
+ if (isNaN(date.getTime())) return isoStr;
13996
+ const pad = (n) => String(n).padStart(2, "0");
13997
+ const y = date.getFullYear();
13998
+ const m = pad(date.getMonth() + 1);
13999
+ const d = pad(date.getDate());
14000
+ const h2 = pad(date.getHours());
14001
+ const min = pad(date.getMinutes());
14002
+ const s = pad(date.getSeconds());
14003
+ if (props.type === "datetime") return `${y}-${m}-${d} ${h2}:${min}:${s}`;
14004
+ if (props.type === "time") return `${h2}:${min}:${s}`;
14005
+ return `${y}-${m}-${d}`;
14006
+ };
13990
14007
  const selectedDate = computed({
13991
14008
  get: () => {
13992
14009
  if (!props.modelValue) return "";
13993
14010
  if (props.mode === "range" && Array.isArray(props.modelValue)) {
13994
- return props.modelValue;
14011
+ return [convertIsoToLocalFormat(props.modelValue[0]), convertIsoToLocalFormat(props.modelValue[1])];
13995
14012
  }
13996
- if (typeof props.modelValue === "string" && props.modelValue.includes("T")) {
13997
- const date = new Date(props.modelValue);
13998
- if (!isNaN(date.getTime())) {
13999
- const pad = (n) => String(n).padStart(2, "0");
14000
- const y = date.getFullYear();
14001
- const m = pad(date.getMonth() + 1);
14002
- const d = pad(date.getDate());
14003
- const h2 = pad(date.getHours());
14004
- const min = pad(date.getMinutes());
14005
- const s = pad(date.getSeconds());
14006
- if (props.type === "datetime" || props.type === "time") {
14007
- return `${y}-${m}-${d} ${h2}:${min}:${s}`;
14008
- }
14009
- return `${y}-${m}-${d}`;
14010
- }
14013
+ if (typeof props.modelValue === "string") {
14014
+ return convertIsoToLocalFormat(props.modelValue);
14011
14015
  }
14012
14016
  return props.modelValue;
14013
14017
  },
14014
- set: (value2) => {
14018
+ set: (val2) => {
14015
14019
  }
14016
14020
  });
14017
14021
  const formatOutput = (date) => {
@@ -14070,7 +14074,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
14070
14074
  };
14071
14075
  }
14072
14076
  });
14073
- const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-d9d904b6"]]);
14077
+ const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-e7b8c913"]]);
14074
14078
  const _hoisted_1$a = { class: "mb-6" };
14075
14079
  const _hoisted_2$6 = { class: "text-subtitle-1 font-weight-medium mb-3" };
14076
14080
  const _hoisted_3$4 = { class: "theme-toggle-container" };