@trsys-tech/matrix-library 0.5.9 → 0.6.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.
Files changed (39) hide show
  1. package/README.md +17 -0
  2. package/dist/breadcrumb.es.js +1 -1
  3. package/dist/components/form/Form.d.ts.map +1 -1
  4. package/dist/components/form-input/FormInput.d.ts.map +1 -1
  5. package/dist/components/text-field/TextField.d.ts.map +1 -1
  6. package/dist/constructfrom.es.js +1 -2
  7. package/dist/datagrid.es.js +7 -7
  8. package/dist/desktopdatepicker.es.js +10 -10
  9. package/dist/desktopdaterangepicker.es.js +5 -5
  10. package/dist/dialog.es.js +1 -1
  11. package/dist/differenceincalendardays.es.js +4 -5
  12. package/dist/en-us.es.js +8 -9
  13. package/dist/format.es.js +7 -8
  14. package/dist/forminput.es.js +20 -13
  15. package/dist/forminput.es.js.map +1 -1
  16. package/dist/getdayofyear.es.js +5 -6
  17. package/dist/getisoweek.es.js +2 -3
  18. package/dist/getisoweekyear.es.js +0 -1
  19. package/dist/getweek.es.js +5 -6
  20. package/dist/getweekyear.es.js +5 -6
  21. package/dist/index.es.js +10 -10
  22. package/dist/isdate.es.js +0 -1
  23. package/dist/isvalid.es.js +4 -5
  24. package/dist/mobiledatepicker.es.js +10 -10
  25. package/dist/mobiledaterangepicker.es.js +6 -6
  26. package/dist/sheet.es.js +1 -1
  27. package/dist/startofday.es.js +4 -5
  28. package/dist/startofisoweek.es.js +2 -3
  29. package/dist/startofisoweekyear.es.js +5 -6
  30. package/dist/startofweek.es.js +5 -6
  31. package/dist/startofweekyear.es.js +2 -3
  32. package/dist/startofyear.es.js +4 -5
  33. package/dist/styles.css +1 -1
  34. package/dist/tabs.es.js +7 -7
  35. package/dist/textfield.es.js +38 -18
  36. package/dist/textfield.es.js.map +1 -1
  37. package/dist/todate.es.js +3 -4
  38. package/dist/tooltip.es.js +2 -2
  39. package/package.json +33 -33
@@ -6,7 +6,7 @@ import { cn as p } from "./utils.es.js";
6
6
  import { Calendar as P } from "./calendar.es.js";
7
7
  import { Button as m } from "./button.es.js";
8
8
  import { Dialog as $, DialogContent as A, DialogHeader as H, DialogTitle as B, DialogDescription as I } from "./dialog.es.js";
9
- import { formatDate as l } from "./format.es.js";
9
+ import { format as l } from "./format.es.js";
10
10
  const K = ({
11
11
  formatStr: n,
12
12
  selected: r,
@@ -20,9 +20,9 @@ const K = ({
20
20
  fromText: M,
21
21
  toText: v,
22
22
  disabled: N,
23
- ...D
23
+ ...w
24
24
  }) => {
25
- const [w, s] = f.useState(!1), [e, i] = f.useState(r), C = (a, k, j) => {
25
+ const [C, s] = f.useState(!1), [e, i] = f.useState(r), D = (a, k, j) => {
26
26
  x?.(a, k, j), !e || !e.from ? i({ from: a, to: void 0 }) : a < e.from ? e.to ? i({ from: a, to: e.to }) : i({ from: a, to: e.from }) : e?.from?.getTime() === a?.getTime() && (e?.from?.getTime() === e?.to?.getTime() || !e.to) ? i(void 0) : e?.from?.getTime() !== e?.to?.getTime() && (e.from?.getTime() === a?.getTime() || e?.to?.getTime() === a?.getTime()) ? i({ from: a, to: a }) : i({ ...e, to: a });
27
27
  }, c = () => {
28
28
  s(!1), i(r);
@@ -60,7 +60,7 @@ const K = ({
60
60
  ]
61
61
  }
62
62
  ),
63
- /* @__PURE__ */ o($, { open: w, onOpenChange: c, children: /* @__PURE__ */ t(A, { className: "h-dscreen w-screen p-0 flex flex-col gap-0 data-[state=open]:animate-slide-from-bottom data-[state=closed]:animate-slide-to-bottom overflow-auto max-w-screen-2xl sm:rounded-none", children: [
63
+ /* @__PURE__ */ o($, { open: C, onOpenChange: c, children: /* @__PURE__ */ t(A, { className: "h-dscreen w-screen p-0 flex flex-col gap-0 data-[state=open]:animate-slide-from-bottom data-[state=closed]:animate-slide-to-bottom overflow-auto max-w-screen-2xl sm:rounded-none", children: [
64
64
  /* @__PURE__ */ t(H, { children: [
65
65
  /* @__PURE__ */ o(B, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "grid grid-cols-2 border-b border-b-gray-200 mt-3", children: [
66
66
  /* @__PURE__ */ t("div", { className: "text-sm font-bold space-y-1 border-e border-e-gray-200 p-4", children: [
@@ -81,10 +81,10 @@ const K = ({
81
81
  defaultMonth: r?.from,
82
82
  startMonth: new Date(2e3, 0, 1),
83
83
  endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 2, 11, 31),
84
- ...D,
84
+ ...w,
85
85
  mode: "range",
86
86
  selected: r,
87
- onDayClick: C,
87
+ onDayClick: D,
88
88
  className: p("p-0", g)
89
89
  }
90
90
  ),
package/dist/sheet.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as o, jsxs as n } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import * as e from "@radix-ui/react-dialog";
4
4
  import { tv as c } from "tailwind-variants";
@@ -1,10 +1,9 @@
1
- import { toDate as a } from "./todate.es.js";
2
- function n(o, r) {
3
- const t = a(o, r?.in);
1
+ import { toDate as e } from "./todate.es.js";
2
+ function a(o, r) {
3
+ const t = e(o, r?.in);
4
4
  return t.setHours(0, 0, 0, 0), t;
5
5
  }
6
6
  export {
7
- n as default,
8
- n as startOfDay
7
+ a as startOfDay
9
8
  };
10
9
  //# sourceMappingURL=startofday.es.js.map
@@ -1,9 +1,8 @@
1
1
  import { startOfWeek as r } from "./startofweek.es.js";
2
- function f(t, e) {
2
+ function n(t, e) {
3
3
  return r(t, { ...e, weekStartsOn: 1 });
4
4
  }
5
5
  export {
6
- f as default,
7
- f as startOfISOWeek
6
+ n as startOfISOWeek
8
7
  };
9
8
  //# sourceMappingURL=startofisoweek.es.js.map
@@ -1,12 +1,11 @@
1
- import { constructFrom as a } from "./constructfrom.es.js";
2
- import { getISOWeekYear as f } from "./getisoweekyear.es.js";
3
- import { startOfISOWeek as s } from "./startofisoweek.es.js";
1
+ import { constructFrom as f } from "./constructfrom.es.js";
2
+ import { getISOWeekYear as s } from "./getisoweekyear.es.js";
3
+ import { startOfISOWeek as a } from "./startofisoweek.es.js";
4
4
  function O(t, e) {
5
- const o = f(t, e), r = a(t, 0);
6
- return r.setFullYear(o, 0, 4), r.setHours(0, 0, 0, 0), s(r);
5
+ const o = s(t, e), r = f(t, 0);
6
+ return r.setFullYear(o, 0, 4), r.setHours(0, 0, 0, 0), a(r);
7
7
  }
8
8
  export {
9
- O as default,
10
9
  O as startOfISOWeekYear
11
10
  };
12
11
  //# sourceMappingURL=startofisoweekyear.es.js.map
@@ -1,11 +1,10 @@
1
- import { getDefaultOptions as f } from "./defaultoptions.es.js";
2
- import { toDate as c } from "./todate.es.js";
3
- function l(n, e) {
4
- const a = f(), o = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, t = c(n, e?.in), s = t.getDay(), r = (s < o ? 7 : 0) + s - o;
1
+ import { getDefaultOptions as c } from "./defaultoptions.es.js";
2
+ import { toDate as f } from "./todate.es.js";
3
+ function k(s, e) {
4
+ const o = c(), a = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, t = f(s, e?.in), n = t.getDay(), r = (n < a ? 7 : 0) + n - a;
5
5
  return t.setDate(t.getDate() - r), t.setHours(0, 0, 0, 0), t;
6
6
  }
7
7
  export {
8
- l as default,
9
- l as startOfWeek
8
+ k as startOfWeek
10
9
  };
11
10
  //# sourceMappingURL=startofweek.es.js.map
@@ -3,11 +3,10 @@ import { constructFrom as i } from "./constructfrom.es.js";
3
3
  import { getWeekYear as f } from "./getweekyear.es.js";
4
4
  import { startOfWeek as c } from "./startofweek.es.js";
5
5
  function D(r, t) {
6
- const a = n(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, s = f(r, t), e = i(t?.in || r, 0);
7
- return e.setFullYear(s, 0, o), e.setHours(0, 0, 0, 0), c(e, t);
6
+ const o = n(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = f(r, t), e = i(t?.in || r, 0);
7
+ return e.setFullYear(a, 0, s), e.setHours(0, 0, 0, 0), c(e, t);
8
8
  }
9
9
  export {
10
- D as default,
11
10
  D as startOfWeekYear
12
11
  };
13
12
  //# sourceMappingURL=startofweekyear.es.js.map
@@ -1,10 +1,9 @@
1
- import { toDate as a } from "./todate.es.js";
2
- function s(e, r) {
3
- const t = a(e, r?.in);
1
+ import { toDate as o } from "./todate.es.js";
2
+ function n(e, r) {
3
+ const t = o(e, r?.in);
4
4
  return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
5
5
  }
6
6
  export {
7
- s as default,
8
- s as startOfYear
7
+ n as startOfYear
9
8
  };
10
9
  //# sourceMappingURL=startofyear.es.js.map