1mpacto-react-ui 0.0.91 → 0.0.92

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.mjs CHANGED
@@ -22924,15 +22924,15 @@ const b4 = (e) => {
22924
22924
  }
22925
22925
  );
22926
22926
  }, v4 = ({ prevIcon: e, nextIcon: t, state: n, setActiveTypeCalendar: r, onChangeMonth: i, type: a }) => {
22927
- const o = n.focusedDate.calendar.getMonthsInYear(n.focusedDate), s = Hr({
22927
+ const o = (/* @__PURE__ */ new Date()).getFullYear(), s = n.focusedDate.calendar.getMonthsInYear(n.focusedDate), l = Hr({
22928
22928
  month: "short",
22929
22929
  timeZone: n.timeZone
22930
- }), l = (c, d) => {
22931
- const f = n.focusedDate.set({ month: c });
22932
- d ? (r("date"), n.setFocusedDate(f)) : !d && typeof i == "function" && i(f);
22933
- }, u = (c) => {
22934
- const d = n.focusedDate.set({ year: c });
22935
- n.setFocusedDate(d);
22930
+ }), u = (d, f) => {
22931
+ const h = n.focusedDate.set({ month: d });
22932
+ f ? (r("date"), n.setFocusedDate(h)) : !f && typeof i == "function" && i(h);
22933
+ }, c = (d) => {
22934
+ const f = n.focusedDate.set({ year: d });
22935
+ n.setFocusedDate(f);
22936
22936
  };
22937
22937
  return /* @__PURE__ */ D.jsxs("div", { className: `1ru-w-[296px] ${me["container-calendar"]}`, children: [
22938
22938
  /* @__PURE__ */ D.jsxs("div", { className: me["header-calendar"], children: [
@@ -22940,7 +22940,7 @@ const b4 = (e) => {
22940
22940
  ya,
22941
22941
  {
22942
22942
  isDisabled: n != null && n.minValue ? n.focusedDate.year <= n.minValue.year : !1,
22943
- onPress: () => u(n.focusedDate.year - 1),
22943
+ onPress: () => c(n.focusedDate.year - 1),
22944
22944
  children: typeof e == "function" || xe(e) ? xe(e) ? e : e() : /* @__PURE__ */ D.jsx(Yn, { className: "1ru-rotate-90" })
22945
22945
  }
22946
22946
  ),
@@ -22958,24 +22958,24 @@ const b4 = (e) => {
22958
22958
  ya,
22959
22959
  {
22960
22960
  isDisabled: n != null && n.maxValue ? n.focusedDate.year >= n.maxValue.year : !1,
22961
- onPress: () => u(n.focusedDate.year + 1),
22961
+ onPress: () => c(n.focusedDate.year + 1),
22962
22962
  children: typeof t == "function" || xe(t) ? xe(t) ? t : t() : /* @__PURE__ */ D.jsx(Yn, { className: "-1ru-rotate-90" })
22963
22963
  }
22964
22964
  )
22965
22965
  ] }),
22966
- /* @__PURE__ */ D.jsx("div", { className: me["month-calendar"], children: [...Array(o).keys()].map((c) => {
22967
- var p;
22968
- const d = n.focusedDate.set({ month: c + 1 }), f = s.format(d.toDate(n.timeZone)), h = n != null && n.minValue ? d.month < ((p = n == null ? void 0 : n.minValue) == null ? void 0 : p.month) && d.year <= n.minValue.year : !1, g = n != null && n.maxValue ? d.month > n.maxValue.month && d.year >= n.maxValue.year : !1, m = h || g;
22966
+ /* @__PURE__ */ D.jsx("div", { className: me["month-calendar"], children: [...Array(s).keys()].map((d) => {
22967
+ var v, y, x, C;
22968
+ const f = n.focusedDate.set({ month: d + 1 }), h = l.format(f.toDate(n.timeZone)), g = ((v = n.value) == null ? void 0 : v.year) || ((x = (y = n.value) == null ? void 0 : y.start) == null ? void 0 : x.year) || o, m = n != null && n.minValue ? f.month < ((C = n == null ? void 0 : n.minValue) == null ? void 0 : C.month) && f.year <= n.minValue.year : !1, p = n != null && n.maxValue ? f.month > n.maxValue.month && f.year >= n.maxValue.year : !1, b = m || p;
22969
22969
  return /* @__PURE__ */ D.jsx(
22970
22970
  "div",
22971
22971
  {
22972
22972
  onClick: () => {
22973
- m || l(d.month, a.includes("date"));
22973
+ b || u(f.month, a.includes("date"));
22974
22974
  },
22975
- className: `${me["cell-month"]} ${n.focusedDate.month === d.month && !m && d.year === n.value.year ? me.selected : ""} ${n.focusedDate.month !== d.month && !m ? "hover:1ru-bg-laba-blue-01" : ""} ${m ? "1ru-text-gray-400" : "1ru-cursor-pointer"}`,
22976
- children: f
22975
+ className: `${me["cell-month"]} ${n.focusedDate.month === f.month && !b && f.year === g ? me.selected : ""} ${n.focusedDate.month !== f.month && !b ? "hover:1ru-bg-laba-blue-01" : ""} ${b ? "1ru-text-gray-400" : "1ru-cursor-pointer"}`,
22976
+ children: h
22977
22977
  },
22978
- c
22978
+ d
22979
22979
  );
22980
22980
  }) })
22981
22981
  ] });
@@ -23517,14 +23517,14 @@ const b4 = (e) => {
23517
23517
  }
23518
23518
  }, L = (V) => {
23519
23519
  const W = (l ?? b).find((q) => q.key === V);
23520
- !V && !W ? O() : typeof V == "object" && O(V), H(W), I(W);
23520
+ !V && !W ? (O(), H(void 0), I(void 0)) : typeof V == "object" ? (O(V), H({ key: "custom", value: "Kustom" }), I({ key: "custom", value: "Kustom" })) : (H(W), I(W));
23521
23521
  }, Z = () => {
23522
23522
  e ? w(e) : (x(void 0), I(void 0));
23523
23523
  };
23524
23524
  return R.useEffect(() => {
23525
23525
  Z();
23526
23526
  }, [JSON.stringify(e)]), R.useEffect(() => {
23527
- typeof p == "string" && L(p);
23527
+ L(p);
23528
23528
  }, []), /* @__PURE__ */ D.jsxs(D.Fragment, { children: [
23529
23529
  /* @__PURE__ */ D.jsxs(
23530
23530
  "div",