@underverse-ui/underverse 0.2.16 → 0.2.18
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.cjs +29 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4919,7 +4919,7 @@ var DatePicker = ({
|
|
|
4919
4919
|
size === "sm" ? "w-7 h-7 text-[12px]" : "w-8 h-8 text-sm",
|
|
4920
4920
|
"datepicker-day rounded-md focus:outline-none",
|
|
4921
4921
|
"transition-colors",
|
|
4922
|
-
isSelected ? "bg-primary text-primary-foreground hover
|
|
4922
|
+
isSelected ? "!bg-primary text-primary-foreground font-bold ring-2 ring-primary-foreground/60 shadow-lg scale-105 z-10 hover:!bg-primary focus:!bg-primary focus:text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
4923
4923
|
isToday2 && !isSelected && "bg-accent text-accent-foreground font-semibold"
|
|
4924
4924
|
),
|
|
4925
4925
|
children: day
|
|
@@ -9834,68 +9834,28 @@ var LoadingBar = ({
|
|
|
9834
9834
|
// ../../components/ui/Table.tsx
|
|
9835
9835
|
import React36 from "react";
|
|
9836
9836
|
import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
9837
|
-
var Table = React36.forwardRef(
|
|
9838
|
-
|
|
9839
|
-
"div",
|
|
9840
|
-
{
|
|
9841
|
-
className: cn(
|
|
9842
|
-
"relative w-full overflow-auto",
|
|
9843
|
-
"rounded-lg md:rounded-xl border border-border",
|
|
9844
|
-
"bg-card text-card-foreground shadow-sm",
|
|
9845
|
-
"backdrop-blur-sm transition-all duration-300",
|
|
9846
|
-
containerClassName
|
|
9847
|
-
),
|
|
9848
|
-
children: /* @__PURE__ */ jsx45(
|
|
9849
|
-
"table",
|
|
9850
|
-
{
|
|
9851
|
-
ref,
|
|
9852
|
-
className: cn("w-full caption-bottom text-sm", className),
|
|
9853
|
-
...props
|
|
9854
|
-
}
|
|
9855
|
-
)
|
|
9856
|
-
}
|
|
9857
|
-
)
|
|
9858
|
-
);
|
|
9859
|
-
Table.displayName = "Table";
|
|
9860
|
-
var TableHeader = React36.forwardRef(
|
|
9861
|
-
({ className, children, filterRow, ...props }, ref) => /* @__PURE__ */ jsxs40(
|
|
9862
|
-
"thead",
|
|
9863
|
-
{
|
|
9864
|
-
ref,
|
|
9865
|
-
className: cn(
|
|
9866
|
-
"[&_tr]:border-b [&_tr]:border-border",
|
|
9867
|
-
"bg-muted/20",
|
|
9868
|
-
className
|
|
9869
|
-
),
|
|
9870
|
-
...props,
|
|
9871
|
-
children: [
|
|
9872
|
-
children,
|
|
9873
|
-
filterRow
|
|
9874
|
-
]
|
|
9875
|
-
}
|
|
9876
|
-
)
|
|
9877
|
-
);
|
|
9878
|
-
TableHeader.displayName = "TableHeader";
|
|
9879
|
-
var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9880
|
-
"tbody",
|
|
9881
|
-
{
|
|
9882
|
-
ref,
|
|
9883
|
-
className: cn("[&_tr:last-child]:border-0", className),
|
|
9884
|
-
...props
|
|
9885
|
-
}
|
|
9886
|
-
));
|
|
9887
|
-
TableBody.displayName = "TableBody";
|
|
9888
|
-
var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9889
|
-
"tfoot",
|
|
9837
|
+
var Table = React36.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9838
|
+
"div",
|
|
9890
9839
|
{
|
|
9891
|
-
ref,
|
|
9892
9840
|
className: cn(
|
|
9893
|
-
"
|
|
9894
|
-
|
|
9841
|
+
"relative w-full overflow-auto",
|
|
9842
|
+
"rounded-lg md:rounded-xl border border-border",
|
|
9843
|
+
"bg-card text-card-foreground shadow-sm",
|
|
9844
|
+
"backdrop-blur-sm transition-all duration-300",
|
|
9845
|
+
containerClassName
|
|
9895
9846
|
),
|
|
9896
|
-
...props
|
|
9847
|
+
children: /* @__PURE__ */ jsx45("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props })
|
|
9897
9848
|
}
|
|
9898
9849
|
));
|
|
9850
|
+
Table.displayName = "Table";
|
|
9851
|
+
var TableHeader = React36.forwardRef(({ className, children, filterRow, ...props }, ref) => /* @__PURE__ */ jsxs40("thead", { ref, className: cn("[&_tr]:border-b [&_tr]:border-border", "bg-muted/50", className), ...props, children: [
|
|
9852
|
+
children,
|
|
9853
|
+
filterRow
|
|
9854
|
+
] }));
|
|
9855
|
+
TableHeader.displayName = "TableHeader";
|
|
9856
|
+
var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
9857
|
+
TableBody.displayName = "TableBody";
|
|
9858
|
+
var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props }));
|
|
9899
9859
|
TableFooter.displayName = "TableFooter";
|
|
9900
9860
|
var TableRow = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9901
9861
|
"tr",
|
|
@@ -9915,31 +9875,14 @@ var TableHead = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
9915
9875
|
"th",
|
|
9916
9876
|
{
|
|
9917
9877
|
ref,
|
|
9918
|
-
className: cn(
|
|
9919
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
9920
|
-
className
|
|
9921
|
-
),
|
|
9878
|
+
className: cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
9922
9879
|
...props
|
|
9923
9880
|
}
|
|
9924
9881
|
));
|
|
9925
9882
|
TableHead.displayName = "TableHead";
|
|
9926
|
-
var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9927
|
-
"td",
|
|
9928
|
-
{
|
|
9929
|
-
ref,
|
|
9930
|
-
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
9931
|
-
...props
|
|
9932
|
-
}
|
|
9933
|
-
));
|
|
9883
|
+
var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props }));
|
|
9934
9884
|
TableCell.displayName = "TableCell";
|
|
9935
|
-
var TableCaption = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9936
|
-
"caption",
|
|
9937
|
-
{
|
|
9938
|
-
ref,
|
|
9939
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
9940
|
-
...props
|
|
9941
|
-
}
|
|
9942
|
-
));
|
|
9885
|
+
var TableCaption = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
9943
9886
|
TableCaption.displayName = "TableCaption";
|
|
9944
9887
|
|
|
9945
9888
|
// ../../components/ui/DataTable.tsx
|
|
@@ -9984,6 +9927,13 @@ function DataTable({
|
|
|
9984
9927
|
const [density, setDensity] = React37.useState("normal");
|
|
9985
9928
|
const [curPage, setCurPage] = React37.useState(page);
|
|
9986
9929
|
const [curPageSize, setCurPageSize] = React37.useState(pageSize);
|
|
9930
|
+
React37.useEffect(() => {
|
|
9931
|
+
const newColKeys = columns.filter((c) => c.visible !== false).map((c) => c.key);
|
|
9932
|
+
setVisibleCols((prev) => {
|
|
9933
|
+
const uniqueKeys = /* @__PURE__ */ new Set([...prev, ...newColKeys]);
|
|
9934
|
+
return [...uniqueKeys].filter((k) => columns.some((c) => c.key === k));
|
|
9935
|
+
});
|
|
9936
|
+
}, [columns]);
|
|
9987
9937
|
const debouncedFilters = useDebounced(filters, 350);
|
|
9988
9938
|
React37.useEffect(() => {
|
|
9989
9939
|
setCurPage(page);
|
|
@@ -10303,7 +10253,7 @@ function DataTable({
|
|
|
10303
10253
|
/* @__PURE__ */ jsx46("span", { className: "text-sm", children: "Loading..." })
|
|
10304
10254
|
] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */ jsx46(TableRow, { children: /* @__PURE__ */ jsx46(TableCell, { colSpan: visibleColumns.length, className: "text-center py-6 text-muted-foreground", children: "No data" }) }) : displayedData.map((row, idx) => {
|
|
10305
10255
|
const isLastRow = idx === displayedData.length - 1;
|
|
10306
|
-
return /* @__PURE__ */ jsx46(TableRow, { className: cn(densityRowClass, striped && idx % 2 === 0 && "bg-muted/
|
|
10256
|
+
return /* @__PURE__ */ jsx46(TableRow, { className: cn(densityRowClass, striped && idx % 2 === 0 && "bg-muted/50"), children: visibleColumns.map((col, colIdx) => {
|
|
10307
10257
|
const value = col.dataIndex ? row[col.dataIndex] : void 0;
|
|
10308
10258
|
return /* @__PURE__ */ jsx46(
|
|
10309
10259
|
TableCell,
|