@matthiaskrijgsman/mat-ui 0.0.21 → 0.0.23
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.d.ts +2 -0
- package/dist/index.js +58 -56
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +30 -30
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export { BadgeColor } from "./components/BadgeColors.tsx";
|
|
|
35
35
|
export { TabButtons } from "./components/TabButtons.tsx";
|
|
36
36
|
export { AutoScroll } from "./components/AutoScroll.tsx";
|
|
37
37
|
export { Spinner } from "./spinner/Spinner.tsx";
|
|
38
|
+
export { Table } from "./table/Table.tsx";
|
|
39
|
+
export { TableColumnHead } from "./table/TableColumnHead.tsx";
|
|
38
40
|
export { DropdownButton } from "./components/dropdown-menu/DropdownButton.tsx";
|
|
39
41
|
export { DropdownButtonGroup } from "./components/dropdown-menu/DropdownButtonGroup.tsx";
|
|
40
42
|
export { DropdownPanel } from "./components/dropdown-menu/DropdownPanel.tsx";
|
package/dist/index.js
CHANGED
|
@@ -11577,54 +11577,8 @@ const iy = {
|
|
|
11577
11577
|
children: /* @__PURE__ */ p.jsx("div", { ref: l, children: r })
|
|
11578
11578
|
}
|
|
11579
11579
|
);
|
|
11580
|
-
}, fu = et(void 0), fy = () => ({
|
|
11581
|
-
dismiss: me(fu) || (() => {
|
|
11582
|
-
})
|
|
11583
|
-
}), my = "inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", je = E.forwardRef((e, t) => {
|
|
11584
|
-
const {
|
|
11585
|
-
className: n,
|
|
11586
|
-
children: i,
|
|
11587
|
-
Icon: r,
|
|
11588
|
-
onClick: o,
|
|
11589
|
-
dismissOnClick: s = !0,
|
|
11590
|
-
...a
|
|
11591
|
-
} = e, { dismiss: l } = fy(), u = (c) => {
|
|
11592
|
-
o && o(c), s && l();
|
|
11593
|
-
};
|
|
11594
|
-
return /* @__PURE__ */ p.jsxs(
|
|
11595
|
-
"button",
|
|
11596
|
-
{
|
|
11597
|
-
ref: t,
|
|
11598
|
-
className: M(
|
|
11599
|
-
my,
|
|
11600
|
-
n
|
|
11601
|
-
),
|
|
11602
|
-
onClick: u,
|
|
11603
|
-
...a,
|
|
11604
|
-
children: [
|
|
11605
|
-
r && /* @__PURE__ */ p.jsx(r, { className: "h-5 w-5" }),
|
|
11606
|
-
i
|
|
11607
|
-
]
|
|
11608
|
-
}
|
|
11609
|
-
);
|
|
11610
|
-
}), Na = (e) => {
|
|
11611
|
-
const { label: t, children: n, className: i } = e;
|
|
11612
|
-
return /* @__PURE__ */ p.jsxs("div", { className: M("flex flex-col dropdown-button-group", i), children: [
|
|
11613
|
-
t && /* @__PURE__ */ p.jsx("div", { className: "mb-2 text-sm dropdown-group-label font-semibold px-3", children: t }),
|
|
11614
|
-
n
|
|
11615
|
-
] });
|
|
11616
|
-
}, mu = (e) => {
|
|
11617
|
-
const { trigger: t, children: n, placement: i = "bottom-end", minWidth: r = 200, className: o } = e, [s, a] = fe(!1), { Popover: l, anchorRef: u } = xn({
|
|
11618
|
-
placement: i,
|
|
11619
|
-
onOutsideClick: () => a(!1),
|
|
11620
|
-
minWidth: r
|
|
11621
|
-
});
|
|
11622
|
-
return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
11623
|
-
/* @__PURE__ */ p.jsx("div", { ref: u, className: o, onClick: () => a(!s), children: t }),
|
|
11624
|
-
/* @__PURE__ */ p.jsx(l, { open: s, children: /* @__PURE__ */ p.jsx(yn, { padding: "sm", children: /* @__PURE__ */ p.jsx(fu.Provider, { value: () => a(!1), children: n }) }) })
|
|
11625
|
-
] });
|
|
11626
11580
|
};
|
|
11627
|
-
function
|
|
11581
|
+
function fy(e) {
|
|
11628
11582
|
const {
|
|
11629
11583
|
onDelta: t,
|
|
11630
11584
|
onDragStart: n,
|
|
@@ -11692,7 +11646,7 @@ function hy(e) {
|
|
|
11692
11646
|
}
|
|
11693
11647
|
};
|
|
11694
11648
|
}
|
|
11695
|
-
const
|
|
11649
|
+
const my = (e) => {
|
|
11696
11650
|
const {
|
|
11697
11651
|
column: t,
|
|
11698
11652
|
width: n,
|
|
@@ -11700,7 +11654,7 @@ const gy = (e) => {
|
|
|
11700
11654
|
onResize: r,
|
|
11701
11655
|
sortDirection: o,
|
|
11702
11656
|
onSortClick: s
|
|
11703
|
-
} = e, a = !!t.sortable, { bind: l } =
|
|
11657
|
+
} = e, a = !!t.sortable, { bind: l } = fy({
|
|
11704
11658
|
onDelta: (u) => r(u)
|
|
11705
11659
|
});
|
|
11706
11660
|
return /* @__PURE__ */ p.jsxs(
|
|
@@ -11728,7 +11682,7 @@ const gy = (e) => {
|
|
|
11728
11682
|
"div",
|
|
11729
11683
|
{
|
|
11730
11684
|
...l,
|
|
11731
|
-
className: "cursor-ew-resize group py-
|
|
11685
|
+
className: "cursor-ew-resize group py-4 table-resize-handle w-[8px]",
|
|
11732
11686
|
children: /* @__PURE__ */ p.jsx(
|
|
11733
11687
|
"div",
|
|
11734
11688
|
{
|
|
@@ -11740,12 +11694,12 @@ const gy = (e) => {
|
|
|
11740
11694
|
]
|
|
11741
11695
|
}
|
|
11742
11696
|
);
|
|
11743
|
-
}, wt = 200,
|
|
11697
|
+
}, wt = 200, hy = 60, gy = (e) => {
|
|
11744
11698
|
const t = {};
|
|
11745
11699
|
for (const n of e)
|
|
11746
11700
|
t[n.id] = n.defaultWidth ?? wt;
|
|
11747
11701
|
return t;
|
|
11748
|
-
},
|
|
11702
|
+
}, vy = (e) => {
|
|
11749
11703
|
const {
|
|
11750
11704
|
columns: t,
|
|
11751
11705
|
rows: n,
|
|
@@ -11756,7 +11710,7 @@ const gy = (e) => {
|
|
|
11756
11710
|
className: a,
|
|
11757
11711
|
rowHeight: l = 44,
|
|
11758
11712
|
headerHeight: u = 44
|
|
11759
|
-
} = e, [c, d] = fe(() =>
|
|
11713
|
+
} = e, [c, d] = fe(() => gy(t));
|
|
11760
11714
|
be(() => {
|
|
11761
11715
|
d((h) => {
|
|
11762
11716
|
const T = {};
|
|
@@ -11802,12 +11756,12 @@ const gy = (e) => {
|
|
|
11802
11756
|
className: "flex flex-row table-header font-medium",
|
|
11803
11757
|
style: { width: v, minWidth: "100%" },
|
|
11804
11758
|
children: t.map((h) => /* @__PURE__ */ p.jsx(
|
|
11805
|
-
|
|
11759
|
+
my,
|
|
11806
11760
|
{
|
|
11807
11761
|
column: h,
|
|
11808
11762
|
width: c[h.id] ?? h.defaultWidth ?? wt,
|
|
11809
11763
|
height: u,
|
|
11810
|
-
onResize: (T) => f(h.id, T, h.minWidth ??
|
|
11764
|
+
onResize: (T) => f(h.id, T, h.minWidth ?? hy),
|
|
11811
11765
|
sortDirection: o?.columnId === h.id ? o.direction : null,
|
|
11812
11766
|
onSortClick: () => m(h.id)
|
|
11813
11767
|
},
|
|
@@ -11855,6 +11809,52 @@ const gy = (e) => {
|
|
|
11855
11809
|
}
|
|
11856
11810
|
)
|
|
11857
11811
|
] });
|
|
11812
|
+
}, fu = et(void 0), xy = () => ({
|
|
11813
|
+
dismiss: me(fu) || (() => {
|
|
11814
|
+
})
|
|
11815
|
+
}), yy = "inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", je = E.forwardRef((e, t) => {
|
|
11816
|
+
const {
|
|
11817
|
+
className: n,
|
|
11818
|
+
children: i,
|
|
11819
|
+
Icon: r,
|
|
11820
|
+
onClick: o,
|
|
11821
|
+
dismissOnClick: s = !0,
|
|
11822
|
+
...a
|
|
11823
|
+
} = e, { dismiss: l } = xy(), u = (c) => {
|
|
11824
|
+
o && o(c), s && l();
|
|
11825
|
+
};
|
|
11826
|
+
return /* @__PURE__ */ p.jsxs(
|
|
11827
|
+
"button",
|
|
11828
|
+
{
|
|
11829
|
+
ref: t,
|
|
11830
|
+
className: M(
|
|
11831
|
+
yy,
|
|
11832
|
+
n
|
|
11833
|
+
),
|
|
11834
|
+
onClick: u,
|
|
11835
|
+
...a,
|
|
11836
|
+
children: [
|
|
11837
|
+
r && /* @__PURE__ */ p.jsx(r, { className: "h-5 w-5" }),
|
|
11838
|
+
i
|
|
11839
|
+
]
|
|
11840
|
+
}
|
|
11841
|
+
);
|
|
11842
|
+
}), Na = (e) => {
|
|
11843
|
+
const { label: t, children: n, className: i } = e;
|
|
11844
|
+
return /* @__PURE__ */ p.jsxs("div", { className: M("flex flex-col dropdown-button-group", i), children: [
|
|
11845
|
+
t && /* @__PURE__ */ p.jsx("div", { className: "mb-2 text-sm dropdown-group-label font-semibold px-3", children: t }),
|
|
11846
|
+
n
|
|
11847
|
+
] });
|
|
11848
|
+
}, mu = (e) => {
|
|
11849
|
+
const { trigger: t, children: n, placement: i = "bottom-end", minWidth: r = 200, className: o } = e, [s, a] = fe(!1), { Popover: l, anchorRef: u } = xn({
|
|
11850
|
+
placement: i,
|
|
11851
|
+
onOutsideClick: () => a(!1),
|
|
11852
|
+
minWidth: r
|
|
11853
|
+
});
|
|
11854
|
+
return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
11855
|
+
/* @__PURE__ */ p.jsx("div", { ref: u, className: o, onClick: () => a(!s), children: t }),
|
|
11856
|
+
/* @__PURE__ */ p.jsx(l, { open: s, children: /* @__PURE__ */ p.jsx(yn, { padding: "sm", children: /* @__PURE__ */ p.jsx(fu.Provider, { value: () => a(!1), children: n }) }) })
|
|
11857
|
+
] });
|
|
11858
11858
|
}, by = () => /* @__PURE__ */ p.jsx("div", {}), wy = [
|
|
11859
11859
|
{ id: 1, email: "sarah.jennings@example.com", firstname: "Sarah", lastname: "Jennings", status: "active" },
|
|
11860
11860
|
{ id: 2, email: "liam.patel@outlook.com", firstname: "Liam", lastname: "Patel", status: "inactive" },
|
|
@@ -11940,7 +11940,7 @@ const gy = (e) => {
|
|
|
11940
11940
|
], value: null, onChange: () => {
|
|
11941
11941
|
} }),
|
|
11942
11942
|
/* @__PURE__ */ p.jsx(
|
|
11943
|
-
|
|
11943
|
+
vy,
|
|
11944
11944
|
{
|
|
11945
11945
|
className: "h-[300px] w-[300px]",
|
|
11946
11946
|
columns: Ty,
|
|
@@ -12003,6 +12003,8 @@ export {
|
|
|
12003
12003
|
Wy as SidebarModal,
|
|
12004
12004
|
an as Spinner,
|
|
12005
12005
|
py as TabButtons,
|
|
12006
|
+
vy as Table,
|
|
12007
|
+
my as TableColumnHead,
|
|
12006
12008
|
qy as Test,
|
|
12007
12009
|
By as Tooltip,
|
|
12008
12010
|
kv as UploadFileTile,
|