@optigrit/optigrit-ui 0.0.11 → 0.0.12
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/components/index.d.ts +22 -3
- package/dist/components/index.js +174 -117
- package/package.json +1 -1
|
@@ -112,17 +112,36 @@ declare function TabPanel(props: TabPanelProps): react_jsx_runtime.JSX.Element;
|
|
|
112
112
|
|
|
113
113
|
interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
114
114
|
stickyHeader?: boolean;
|
|
115
|
-
|
|
115
|
+
loading?: boolean;
|
|
116
116
|
}
|
|
117
117
|
declare const Table: React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
118
118
|
|
|
119
|
+
interface Column<T> {
|
|
120
|
+
key: string;
|
|
121
|
+
title: ReactNode;
|
|
122
|
+
render?: (item: T) => ReactNode;
|
|
123
|
+
}
|
|
124
|
+
interface TablePaginationConfig {
|
|
125
|
+
page: number;
|
|
126
|
+
totalPages: number;
|
|
127
|
+
onChange: (page: number) => void;
|
|
128
|
+
}
|
|
129
|
+
interface DataTableProps<T> {
|
|
130
|
+
data: T[];
|
|
131
|
+
columns: Column<T>[];
|
|
132
|
+
loading?: boolean;
|
|
133
|
+
pagination?: TablePaginationConfig;
|
|
134
|
+
}
|
|
135
|
+
declare function DataTable<T extends {
|
|
136
|
+
id: string | number;
|
|
137
|
+
}>({ data, columns, loading, pagination, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
119
139
|
interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
120
140
|
}
|
|
121
141
|
declare const TableBody: React$1.ForwardRefExoticComponent<TableBodyProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
122
142
|
|
|
123
143
|
interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
124
144
|
align?: "left" | "center" | "right" | "justify" | "inherit";
|
|
125
|
-
padding?: "normal" | "none" | "checkbox";
|
|
126
145
|
variant?: "head" | "body" | "footer";
|
|
127
146
|
component?: "td" | "th";
|
|
128
147
|
}
|
|
@@ -254,4 +273,4 @@ interface CardFooterProps extends React__default.HTMLAttributes<HTMLDivElement>
|
|
|
254
273
|
}
|
|
255
274
|
declare const CardFooter: React__default.ForwardRefExoticComponent<CardFooterProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
256
275
|
|
|
257
|
-
export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, type CarouselItem, type CarouselProps, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, SearchBar, type SearchBarProps, Select, type SelectProps, Separator, type SeparatorProps, TabList, type TabListProps, TabPanel, type TabPanelProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
|
|
276
|
+
export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, type CarouselItem, type CarouselProps, type Column, DataTable, type DataTableProps, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, SearchBar, type SearchBarProps, Select, type SelectProps, Separator, type SeparatorProps, TabList, type TabListProps, TabPanel, type TabPanelProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TablePaginationConfig, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
|
package/dist/components/index.js
CHANGED
|
@@ -125,7 +125,7 @@ var Button = forwardRef(
|
|
|
125
125
|
"aria-busy": loading || void 0,
|
|
126
126
|
onClick: handleClick,
|
|
127
127
|
className: cn(
|
|
128
|
-
"relative overflow-hidden inline-flex items-center justify-center font-medium transition-
|
|
128
|
+
"relative overflow-hidden inline-flex items-center justify-center font-medium transition-all duration-150 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
129
129
|
isDisabled && "pointer-events-none opacity-50",
|
|
130
130
|
getVariantClasses(variant, color),
|
|
131
131
|
sizeClasses[size],
|
|
@@ -896,7 +896,6 @@ import { forwardRef as forwardRef3, useMemo } from "react";
|
|
|
896
896
|
// src/components/DataDisplay/Table/TableContext.tsx
|
|
897
897
|
import { createContext, useContext } from "react";
|
|
898
898
|
var TableContext = createContext({
|
|
899
|
-
size: "medium",
|
|
900
899
|
stickyHeader: false
|
|
901
900
|
});
|
|
902
901
|
var useTableContext = () => useContext(TableContext);
|
|
@@ -904,15 +903,15 @@ var useTableContext = () => useContext(TableContext);
|
|
|
904
903
|
// src/components/DataDisplay/Table/Table.tsx
|
|
905
904
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
906
905
|
var Table = forwardRef3(
|
|
907
|
-
({ className = "", children, stickyHeader = false,
|
|
908
|
-
const value = useMemo(() => ({
|
|
906
|
+
({ className = "", children, stickyHeader = false, loading = false, ...props }, ref) => {
|
|
907
|
+
const value = useMemo(() => ({ stickyHeader }), [stickyHeader]);
|
|
909
908
|
return /* @__PURE__ */ jsx13(TableContext.Provider, { value, children: /* @__PURE__ */ jsx13(
|
|
910
909
|
"table",
|
|
911
910
|
{
|
|
912
911
|
ref,
|
|
913
|
-
className: `w-full caption-bottom text-sm border-collapse
|
|
912
|
+
className: `w-full caption-bottom text-sm border-collapse ${stickyHeader ? "relative" : ""} ${className}`,
|
|
914
913
|
...props,
|
|
915
|
-
children
|
|
914
|
+
children: loading ? /* @__PURE__ */ jsx13("tbody", { className: "h-48", children: /* @__PURE__ */ jsx13("tr", { children: /* @__PURE__ */ jsx13("td", { colSpan: 100, className: "text-center align-middle h-full", children: /* @__PURE__ */ jsx13("div", { className: "flex justify-center items-center h-full", children: /* @__PURE__ */ jsx13(Spinner, { size: 32 }) }) }) }) }) : children
|
|
916
915
|
}
|
|
917
916
|
) });
|
|
918
917
|
}
|
|
@@ -920,139 +919,196 @@ var Table = forwardRef3(
|
|
|
920
919
|
Table.displayName = "Table";
|
|
921
920
|
var Table_default = Table;
|
|
922
921
|
|
|
923
|
-
// src/components/DataDisplay/Table/
|
|
922
|
+
// src/components/DataDisplay/Table/TableContainer.tsx
|
|
924
923
|
import { forwardRef as forwardRef4 } from "react";
|
|
925
924
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
926
|
-
var
|
|
925
|
+
var TableContainer = forwardRef4(
|
|
927
926
|
({ className = "", children, ...props }, ref) => {
|
|
928
927
|
return /* @__PURE__ */ jsx14(
|
|
929
|
-
"
|
|
928
|
+
"div",
|
|
930
929
|
{
|
|
931
930
|
ref,
|
|
932
|
-
className: `
|
|
931
|
+
className: `w-full overflow-auto rounded-lg border bg-white shadow-sm ${className}`,
|
|
933
932
|
...props,
|
|
934
933
|
children
|
|
935
934
|
}
|
|
936
935
|
);
|
|
937
936
|
}
|
|
938
937
|
);
|
|
939
|
-
|
|
940
|
-
var
|
|
938
|
+
TableContainer.displayName = "TableContainer";
|
|
939
|
+
var TableContainer_default = TableContainer;
|
|
941
940
|
|
|
942
|
-
// src/components/DataDisplay/Table/
|
|
941
|
+
// src/components/DataDisplay/Table/TableHead.tsx
|
|
943
942
|
import { forwardRef as forwardRef5 } from "react";
|
|
944
943
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
945
|
-
var
|
|
946
|
-
({ className = "",
|
|
947
|
-
const { size, stickyHeader } = useTableContext();
|
|
948
|
-
const isHead = variant === "head";
|
|
949
|
-
const Component = component || (isHead ? "th" : "td");
|
|
950
|
-
const alignClasses = {
|
|
951
|
-
left: "text-left",
|
|
952
|
-
center: "text-center",
|
|
953
|
-
right: "text-right",
|
|
954
|
-
justify: "text-justify",
|
|
955
|
-
inherit: "text-inherit"
|
|
956
|
-
};
|
|
957
|
-
const paddingClasses = {
|
|
958
|
-
normal: size === "small" ? "p-2" : "p-4",
|
|
959
|
-
none: "p-0",
|
|
960
|
-
checkbox: "p-0 w-[48px] text-center"
|
|
961
|
-
};
|
|
962
|
-
const effectivePadding = padding || "normal";
|
|
944
|
+
var TableHead = forwardRef5(
|
|
945
|
+
({ className = "", children, ...props }, ref) => {
|
|
963
946
|
return /* @__PURE__ */ jsx15(
|
|
964
|
-
|
|
947
|
+
"thead",
|
|
965
948
|
{
|
|
966
949
|
ref,
|
|
967
|
-
className: `
|
|
950
|
+
className: `[&_tr]:border-b bg-bg ${className}`,
|
|
968
951
|
...props,
|
|
969
952
|
children
|
|
970
953
|
}
|
|
971
954
|
);
|
|
972
955
|
}
|
|
973
956
|
);
|
|
974
|
-
|
|
975
|
-
var
|
|
957
|
+
TableHead.displayName = "TableHead";
|
|
958
|
+
var TableHead_default = TableHead;
|
|
976
959
|
|
|
977
|
-
// src/components/DataDisplay/Table/
|
|
960
|
+
// src/components/DataDisplay/Table/TableBody.tsx
|
|
978
961
|
import { forwardRef as forwardRef6 } from "react";
|
|
979
962
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
980
|
-
var
|
|
963
|
+
var TableBody = forwardRef6(
|
|
981
964
|
({ className = "", children, ...props }, ref) => {
|
|
982
965
|
return /* @__PURE__ */ jsx16(
|
|
983
|
-
"
|
|
966
|
+
"tbody",
|
|
984
967
|
{
|
|
985
968
|
ref,
|
|
986
|
-
className: `
|
|
969
|
+
className: `[&_tr:last-child]:border-0 ${className}`,
|
|
987
970
|
...props,
|
|
988
971
|
children
|
|
989
972
|
}
|
|
990
973
|
);
|
|
991
974
|
}
|
|
992
975
|
);
|
|
993
|
-
|
|
994
|
-
var
|
|
976
|
+
TableBody.displayName = "TableBody";
|
|
977
|
+
var TableBody_default = TableBody;
|
|
995
978
|
|
|
996
|
-
// src/components/DataDisplay/Table/
|
|
979
|
+
// src/components/DataDisplay/Table/TableRow.tsx
|
|
997
980
|
import { forwardRef as forwardRef7 } from "react";
|
|
998
981
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
999
|
-
var
|
|
1000
|
-
({ className = "", children, ...props }, ref) => {
|
|
982
|
+
var TableRow = forwardRef7(
|
|
983
|
+
({ className = "", children, hover = false, selected = false, ...props }, ref) => {
|
|
1001
984
|
return /* @__PURE__ */ jsx17(
|
|
1002
|
-
"
|
|
985
|
+
"tr",
|
|
1003
986
|
{
|
|
1004
987
|
ref,
|
|
1005
|
-
className: `border-
|
|
988
|
+
className: `border-b transition-colors ${hover ? "hover:bg-bg/50" : ""} ${selected ? "bg-bg/80" : ""} ${className}`,
|
|
1006
989
|
...props,
|
|
1007
990
|
children
|
|
1008
991
|
}
|
|
1009
992
|
);
|
|
1010
993
|
}
|
|
1011
994
|
);
|
|
1012
|
-
|
|
1013
|
-
var
|
|
995
|
+
TableRow.displayName = "TableRow";
|
|
996
|
+
var TableRow_default = TableRow;
|
|
1014
997
|
|
|
1015
|
-
// src/components/DataDisplay/Table/
|
|
998
|
+
// src/components/DataDisplay/Table/TableCell.tsx
|
|
1016
999
|
import { forwardRef as forwardRef8 } from "react";
|
|
1017
1000
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1018
|
-
var
|
|
1019
|
-
({ className = "", children, ...props }, ref) => {
|
|
1001
|
+
var TableCell = forwardRef8(
|
|
1002
|
+
({ className = "", align = "left", variant, component, children, ...props }, ref) => {
|
|
1003
|
+
const { stickyHeader } = useTableContext();
|
|
1004
|
+
const isHead = variant === "head";
|
|
1005
|
+
const Component = component || (isHead ? "th" : "td");
|
|
1006
|
+
const alignClasses = {
|
|
1007
|
+
left: "text-left",
|
|
1008
|
+
center: "text-center",
|
|
1009
|
+
right: "text-right",
|
|
1010
|
+
justify: "text-justify",
|
|
1011
|
+
inherit: "text-inherit"
|
|
1012
|
+
};
|
|
1020
1013
|
return /* @__PURE__ */ jsx18(
|
|
1021
|
-
|
|
1014
|
+
Component,
|
|
1022
1015
|
{
|
|
1023
1016
|
ref,
|
|
1024
|
-
className: `
|
|
1017
|
+
className: `align-middle transition-colors px-3 py-2 ${isHead ? "text-xs font-bold uppercase tracking-wider text-gray-500 bg-transparent" : "text-text-secondary font-medium"} ${stickyHeader && isHead ? "sticky top-0 z-10 shadow-[inset_0_-1px_0_var(--bg)]" : ""} ${alignClasses[align]} ${className}`,
|
|
1025
1018
|
...props,
|
|
1026
1019
|
children
|
|
1027
1020
|
}
|
|
1028
1021
|
);
|
|
1029
1022
|
}
|
|
1030
1023
|
);
|
|
1031
|
-
|
|
1032
|
-
var
|
|
1024
|
+
TableCell.displayName = "TableCell";
|
|
1025
|
+
var TableCell_default = TableCell;
|
|
1033
1026
|
|
|
1034
|
-
// src/components/DataDisplay/Table/
|
|
1027
|
+
// src/components/DataDisplay/Table/DataTable.tsx
|
|
1028
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1029
|
+
function DataTable({
|
|
1030
|
+
data,
|
|
1031
|
+
columns,
|
|
1032
|
+
loading,
|
|
1033
|
+
pagination
|
|
1034
|
+
}) {
|
|
1035
|
+
return /* @__PURE__ */ jsxs10(TableContainer_default, { children: [
|
|
1036
|
+
/* @__PURE__ */ jsxs10(Table_default, { loading, children: [
|
|
1037
|
+
/* @__PURE__ */ jsx19(TableHead_default, { children: /* @__PURE__ */ jsx19(TableRow_default, { children: columns.map((col) => /* @__PURE__ */ jsx19(TableCell_default, { variant: "head", children: col.title }, col.key)) }) }),
|
|
1038
|
+
/* @__PURE__ */ jsx19(TableBody_default, { children: data.map((row) => /* @__PURE__ */ jsx19(TableRow_default, { children: columns.map((col) => /* @__PURE__ */ jsx19(TableCell_default, { children: col.render ? col.render(row) : row[col.key] }, col.key)) }, row.id)) })
|
|
1039
|
+
] }),
|
|
1040
|
+
pagination && (() => {
|
|
1041
|
+
const getVisiblePages = (current, total) => {
|
|
1042
|
+
if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
|
|
1043
|
+
if (current <= 4) return [1, 2, 3, 4, 5, "...", total];
|
|
1044
|
+
if (current >= total - 3) return [1, "...", total - 4, total - 3, total - 2, total - 1, total];
|
|
1045
|
+
return [1, "...", current - 1, current, current + 1, "...", total];
|
|
1046
|
+
};
|
|
1047
|
+
const visiblePages = getVisiblePages(pagination.page, pagination.totalPages);
|
|
1048
|
+
return /* @__PURE__ */ jsx19("div", { className: "flex justify-end items-center px-3 py-2 border-t bg-transparent text-sm text-text-secondary", children: /* @__PURE__ */ jsxs10("div", { className: "flex justify-end gap-2 items-center", children: [
|
|
1049
|
+
/* @__PURE__ */ jsx19(
|
|
1050
|
+
Button_default,
|
|
1051
|
+
{
|
|
1052
|
+
variant: "outlined",
|
|
1053
|
+
color: "secondary",
|
|
1054
|
+
size: "sm",
|
|
1055
|
+
onClick: () => pagination.onChange(pagination.page - 1),
|
|
1056
|
+
disabled: pagination.page <= 1 || loading,
|
|
1057
|
+
children: "Previous"
|
|
1058
|
+
}
|
|
1059
|
+
),
|
|
1060
|
+
visiblePages.map((p, index) => p === "..." ? /* @__PURE__ */ jsx19("span", { className: "px-2", children: "..." }, `ellipsis-${index}`) : /* @__PURE__ */ jsx19(
|
|
1061
|
+
Button_default,
|
|
1062
|
+
{
|
|
1063
|
+
variant: p === pagination.page ? "soft" : "outlined",
|
|
1064
|
+
color: p == pagination.page ? "primary" : "secondary",
|
|
1065
|
+
size: "sm",
|
|
1066
|
+
className: "min-w-[32px] px-2",
|
|
1067
|
+
onClick: () => pagination.onChange(p),
|
|
1068
|
+
disabled: loading,
|
|
1069
|
+
children: p
|
|
1070
|
+
},
|
|
1071
|
+
p
|
|
1072
|
+
)),
|
|
1073
|
+
/* @__PURE__ */ jsx19(
|
|
1074
|
+
Button_default,
|
|
1075
|
+
{
|
|
1076
|
+
variant: "outlined",
|
|
1077
|
+
color: "secondary",
|
|
1078
|
+
size: "sm",
|
|
1079
|
+
onClick: () => pagination.onChange(pagination.page + 1),
|
|
1080
|
+
disabled: pagination.page >= pagination.totalPages || loading,
|
|
1081
|
+
children: "Next"
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
] }) });
|
|
1085
|
+
})()
|
|
1086
|
+
] });
|
|
1087
|
+
}
|
|
1088
|
+
var DataTable_default = DataTable;
|
|
1089
|
+
|
|
1090
|
+
// src/components/DataDisplay/Table/TableFooter.tsx
|
|
1035
1091
|
import { forwardRef as forwardRef9 } from "react";
|
|
1036
|
-
import { jsx as
|
|
1037
|
-
var
|
|
1038
|
-
({ className = "", children,
|
|
1039
|
-
return /* @__PURE__ */
|
|
1040
|
-
"
|
|
1092
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1093
|
+
var TableFooter = forwardRef9(
|
|
1094
|
+
({ className = "", children, ...props }, ref) => {
|
|
1095
|
+
return /* @__PURE__ */ jsx20(
|
|
1096
|
+
"tfoot",
|
|
1041
1097
|
{
|
|
1042
1098
|
ref,
|
|
1043
|
-
className: `border-
|
|
1099
|
+
className: `border-t border-border bg-bg-secondary/50 font-medium [&>tr]:last:border-b-0 ${className}`,
|
|
1044
1100
|
...props,
|
|
1045
1101
|
children
|
|
1046
1102
|
}
|
|
1047
1103
|
);
|
|
1048
1104
|
}
|
|
1049
1105
|
);
|
|
1050
|
-
|
|
1051
|
-
var
|
|
1106
|
+
TableFooter.displayName = "TableFooter";
|
|
1107
|
+
var TableFooter_default = TableFooter;
|
|
1052
1108
|
|
|
1053
1109
|
// src/components/DataDisplay/Carousel/Carousel.tsx
|
|
1054
1110
|
import { useState as useState6, useEffect as useEffect3, useCallback as useCallback3, forwardRef as forwardRef10 } from "react";
|
|
1055
|
-
import { Fragment as Fragment4, jsx as
|
|
1111
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1056
1112
|
var Carousel = forwardRef10(
|
|
1057
1113
|
({
|
|
1058
1114
|
items,
|
|
@@ -1083,7 +1139,7 @@ var Carousel = forwardRef10(
|
|
|
1083
1139
|
if (!items || items.length === 0) {
|
|
1084
1140
|
return null;
|
|
1085
1141
|
}
|
|
1086
|
-
return /* @__PURE__ */
|
|
1142
|
+
return /* @__PURE__ */ jsxs11(
|
|
1087
1143
|
"div",
|
|
1088
1144
|
{
|
|
1089
1145
|
ref,
|
|
@@ -1093,13 +1149,13 @@ var Carousel = forwardRef10(
|
|
|
1093
1149
|
onMouseLeave: () => setIsHovered(false),
|
|
1094
1150
|
...props,
|
|
1095
1151
|
children: [
|
|
1096
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ jsx21(
|
|
1097
1153
|
"div",
|
|
1098
1154
|
{
|
|
1099
1155
|
className: "flex transition-transform duration-500 ease-in-out h-full w-full flex-1",
|
|
1100
1156
|
style: { transform: `translateX(-${currentIndex * 100}%)` },
|
|
1101
|
-
children: items.map((item) => /* @__PURE__ */
|
|
1102
|
-
/* @__PURE__ */
|
|
1157
|
+
children: items.map((item) => /* @__PURE__ */ jsxs11("div", { className: "w-full h-full relative shrink-0", style: { flex: "0 0 100%" }, children: [
|
|
1158
|
+
/* @__PURE__ */ jsx21(
|
|
1103
1159
|
"img",
|
|
1104
1160
|
{
|
|
1105
1161
|
src: item.imageUrl,
|
|
@@ -1107,15 +1163,15 @@ var Carousel = forwardRef10(
|
|
|
1107
1163
|
className: "w-full h-full object-cover"
|
|
1108
1164
|
}
|
|
1109
1165
|
),
|
|
1110
|
-
(item.title || item.description) && /* @__PURE__ */
|
|
1111
|
-
item.title && /* @__PURE__ */
|
|
1112
|
-
item.description && /* @__PURE__ */
|
|
1166
|
+
(item.title || item.description) && /* @__PURE__ */ jsxs11("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent flex flex-col justify-end p-6 md:p-8", children: [
|
|
1167
|
+
item.title && /* @__PURE__ */ jsx21("h3", { className: "text-white text-xl md:text-3xl font-semibold mb-2 transform transition-all duration-500 translate-y-0 opacity-100", children: item.title }),
|
|
1168
|
+
item.description && /* @__PURE__ */ jsx21("p", { className: "text-white/80 text-sm md:text-base max-w-2xl transform transition-all duration-500 delay-100 translate-y-0 opacity-100", children: item.description })
|
|
1113
1169
|
] })
|
|
1114
1170
|
] }, item.id))
|
|
1115
1171
|
}
|
|
1116
1172
|
),
|
|
1117
|
-
showArrows && items.length > 1 && /* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */
|
|
1173
|
+
showArrows && items.length > 1 && /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
1174
|
+
/* @__PURE__ */ jsx21(
|
|
1119
1175
|
IconButton_default,
|
|
1120
1176
|
{
|
|
1121
1177
|
onClick: goToPrevious,
|
|
@@ -1123,7 +1179,7 @@ var Carousel = forwardRef10(
|
|
|
1123
1179
|
color: "secondary",
|
|
1124
1180
|
className: "absolute left-4 top-1/2 -translate-y-1/2 !bg-black/30 hover:!bg-black/50 text-white backdrop-blur-sm transition-all opacity-0 group-hover:opacity-100 disabled:opacity-0 z-10",
|
|
1125
1181
|
"aria-label": "Previous slide",
|
|
1126
|
-
children: /* @__PURE__ */
|
|
1182
|
+
children: /* @__PURE__ */ jsx21(
|
|
1127
1183
|
"svg",
|
|
1128
1184
|
{
|
|
1129
1185
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1132,12 +1188,12 @@ var Carousel = forwardRef10(
|
|
|
1132
1188
|
strokeWidth: 2,
|
|
1133
1189
|
stroke: "currentColor",
|
|
1134
1190
|
className: "w-5 h-5",
|
|
1135
|
-
children: /* @__PURE__ */
|
|
1191
|
+
children: /* @__PURE__ */ jsx21("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
|
|
1136
1192
|
}
|
|
1137
1193
|
)
|
|
1138
1194
|
}
|
|
1139
1195
|
),
|
|
1140
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ jsx21(
|
|
1141
1197
|
IconButton_default,
|
|
1142
1198
|
{
|
|
1143
1199
|
onClick: goToNext,
|
|
@@ -1145,7 +1201,7 @@ var Carousel = forwardRef10(
|
|
|
1145
1201
|
color: "secondary",
|
|
1146
1202
|
className: "absolute right-4 top-1/2 -translate-y-1/2 !bg-black/30 hover:!bg-black/50 text-white backdrop-blur-sm transition-all opacity-0 group-hover:opacity-100 disabled:opacity-0 z-10",
|
|
1147
1203
|
"aria-label": "Next slide",
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1204
|
+
children: /* @__PURE__ */ jsx21(
|
|
1149
1205
|
"svg",
|
|
1150
1206
|
{
|
|
1151
1207
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1154,13 +1210,13 @@ var Carousel = forwardRef10(
|
|
|
1154
1210
|
strokeWidth: 2,
|
|
1155
1211
|
stroke: "currentColor",
|
|
1156
1212
|
className: "w-5 h-5",
|
|
1157
|
-
children: /* @__PURE__ */
|
|
1213
|
+
children: /* @__PURE__ */ jsx21("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
|
|
1158
1214
|
}
|
|
1159
1215
|
)
|
|
1160
1216
|
}
|
|
1161
1217
|
)
|
|
1162
1218
|
] }),
|
|
1163
|
-
showIndicators && items.length > 1 && /* @__PURE__ */
|
|
1219
|
+
showIndicators && items.length > 1 && /* @__PURE__ */ jsx21("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2 z-20", children: items.map((_, index) => /* @__PURE__ */ jsx21(
|
|
1164
1220
|
"button",
|
|
1165
1221
|
{
|
|
1166
1222
|
onClick: () => goToIndex(index),
|
|
@@ -1181,10 +1237,10 @@ Carousel.displayName = "Carousel";
|
|
|
1181
1237
|
|
|
1182
1238
|
// src/components/DataDisplay/Separator/Separator.tsx
|
|
1183
1239
|
import React3 from "react";
|
|
1184
|
-
import { jsx as
|
|
1240
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1185
1241
|
var Separator = React3.forwardRef(
|
|
1186
1242
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
|
|
1187
|
-
return /* @__PURE__ */
|
|
1243
|
+
return /* @__PURE__ */ jsx22(
|
|
1188
1244
|
"div",
|
|
1189
1245
|
{
|
|
1190
1246
|
ref,
|
|
@@ -1204,7 +1260,7 @@ Separator.displayName = "Separator";
|
|
|
1204
1260
|
|
|
1205
1261
|
// src/components/Overlay/Dialog/Dialog.tsx
|
|
1206
1262
|
import { createPortal } from "react-dom";
|
|
1207
|
-
import { jsx as
|
|
1263
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1208
1264
|
function Dialog(props) {
|
|
1209
1265
|
const {
|
|
1210
1266
|
open,
|
|
@@ -1236,7 +1292,7 @@ function Dialog(props) {
|
|
|
1236
1292
|
]);
|
|
1237
1293
|
if (typeof window === "undefined") return null;
|
|
1238
1294
|
return createPortal(
|
|
1239
|
-
/* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ jsx23(
|
|
1240
1296
|
ShowWithAnimation,
|
|
1241
1297
|
{
|
|
1242
1298
|
when: open,
|
|
@@ -1264,7 +1320,7 @@ function Dialog(props) {
|
|
|
1264
1320
|
onClose?.();
|
|
1265
1321
|
}
|
|
1266
1322
|
},
|
|
1267
|
-
children: /* @__PURE__ */
|
|
1323
|
+
children: /* @__PURE__ */ jsx23(
|
|
1268
1324
|
ShowWithAnimation,
|
|
1269
1325
|
{
|
|
1270
1326
|
when: open,
|
|
@@ -1289,19 +1345,19 @@ function Dialog(props) {
|
|
|
1289
1345
|
}
|
|
1290
1346
|
|
|
1291
1347
|
// src/components/Overlay/Dialog/DialogHeader.tsx
|
|
1292
|
-
import { jsx as
|
|
1348
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1293
1349
|
function DialogHeader(props) {
|
|
1294
1350
|
const { title, children, ...rest } = props;
|
|
1295
|
-
return /* @__PURE__ */
|
|
1296
|
-
/* @__PURE__ */
|
|
1351
|
+
return /* @__PURE__ */ jsxs12("div", { ...rest, className: cn("p-4 sticky top-0 z-[20] backdrop-blur-sm", props.className), children: [
|
|
1352
|
+
/* @__PURE__ */ jsx24(Show, { when: !!title, children: /* @__PURE__ */ jsx24("h1", { className: "text-lg font-bold", children: title }) }),
|
|
1297
1353
|
children
|
|
1298
1354
|
] });
|
|
1299
1355
|
}
|
|
1300
1356
|
|
|
1301
1357
|
// src/components/Overlay/Dialog/DialogFooter.tsx
|
|
1302
|
-
import { jsx as
|
|
1358
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1303
1359
|
function DialogFooter(props) {
|
|
1304
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ jsx25(
|
|
1305
1361
|
"div",
|
|
1306
1362
|
{
|
|
1307
1363
|
...props,
|
|
@@ -1311,9 +1367,9 @@ function DialogFooter(props) {
|
|
|
1311
1367
|
}
|
|
1312
1368
|
|
|
1313
1369
|
// src/components/Overlay/Dialog/DialogContent.tsx
|
|
1314
|
-
import { jsx as
|
|
1370
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1315
1371
|
function DialogContent(props) {
|
|
1316
|
-
return /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ jsx26(
|
|
1317
1373
|
"div",
|
|
1318
1374
|
{
|
|
1319
1375
|
...props,
|
|
@@ -1324,7 +1380,7 @@ function DialogContent(props) {
|
|
|
1324
1380
|
|
|
1325
1381
|
// src/components/Overlay/Drawer/Drawer.tsx
|
|
1326
1382
|
import { createPortal as createPortal2 } from "react-dom";
|
|
1327
|
-
import { jsx as
|
|
1383
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1328
1384
|
function Drawer(props) {
|
|
1329
1385
|
const {
|
|
1330
1386
|
open,
|
|
@@ -1359,7 +1415,7 @@ function Drawer(props) {
|
|
|
1359
1415
|
}[_size] + (isHorizontal ? "vw" : "vh");
|
|
1360
1416
|
})();
|
|
1361
1417
|
return createPortal2(
|
|
1362
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ jsx27(
|
|
1363
1419
|
ShowWithAnimation,
|
|
1364
1420
|
{
|
|
1365
1421
|
when: open,
|
|
@@ -1389,7 +1445,7 @@ function Drawer(props) {
|
|
|
1389
1445
|
onClose?.();
|
|
1390
1446
|
}
|
|
1391
1447
|
},
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1448
|
+
children: /* @__PURE__ */ jsx27(
|
|
1393
1449
|
ShowWithAnimation,
|
|
1394
1450
|
{
|
|
1395
1451
|
when: open,
|
|
@@ -1436,9 +1492,9 @@ function Drawer(props) {
|
|
|
1436
1492
|
}
|
|
1437
1493
|
|
|
1438
1494
|
// src/components/Overlay/Drawer/DrawerContent.tsx
|
|
1439
|
-
import { jsx as
|
|
1495
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1440
1496
|
function DrawerContent({ children, className, style }) {
|
|
1441
|
-
return /* @__PURE__ */
|
|
1497
|
+
return /* @__PURE__ */ jsx28(
|
|
1442
1498
|
"div",
|
|
1443
1499
|
{
|
|
1444
1500
|
className: cn("overflow-auto flex-1 p-4 relative hide-scrollbar", className),
|
|
@@ -1449,9 +1505,9 @@ function DrawerContent({ children, className, style }) {
|
|
|
1449
1505
|
}
|
|
1450
1506
|
|
|
1451
1507
|
// src/components/Overlay/Drawer/DrawerHeader.tsx
|
|
1452
|
-
import { jsx as
|
|
1508
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1453
1509
|
function DrawerHeader({ children, className, style }) {
|
|
1454
|
-
return /* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ jsx29(
|
|
1455
1511
|
"div",
|
|
1456
1512
|
{
|
|
1457
1513
|
className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
|
|
@@ -1462,9 +1518,9 @@ function DrawerHeader({ children, className, style }) {
|
|
|
1462
1518
|
}
|
|
1463
1519
|
|
|
1464
1520
|
// src/components/Overlay/Drawer/DrawerFooter.tsx
|
|
1465
|
-
import { jsx as
|
|
1521
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1466
1522
|
function DrawerFooter({ children, className, style }) {
|
|
1467
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx30(
|
|
1468
1524
|
"div",
|
|
1469
1525
|
{
|
|
1470
1526
|
className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
|
|
@@ -1476,10 +1532,10 @@ function DrawerFooter({ children, className, style }) {
|
|
|
1476
1532
|
|
|
1477
1533
|
// src/components/Surfaces/Card/Card.tsx
|
|
1478
1534
|
import React4 from "react";
|
|
1479
|
-
import { jsx as
|
|
1535
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1480
1536
|
var Card = React4.forwardRef(
|
|
1481
1537
|
({ className, children, ...props }, ref) => {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1538
|
+
return /* @__PURE__ */ jsx31(
|
|
1483
1539
|
"div",
|
|
1484
1540
|
{
|
|
1485
1541
|
ref,
|
|
@@ -1497,22 +1553,22 @@ Card.displayName = "Card";
|
|
|
1497
1553
|
|
|
1498
1554
|
// src/components/Surfaces/Card/CardHeader.tsx
|
|
1499
1555
|
import React5 from "react";
|
|
1500
|
-
import { jsx as
|
|
1556
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1501
1557
|
var CardHeader = React5.forwardRef(
|
|
1502
1558
|
({ className, avatar, action, title, subheader, ...props }, ref) => {
|
|
1503
|
-
return /* @__PURE__ */
|
|
1559
|
+
return /* @__PURE__ */ jsxs13(
|
|
1504
1560
|
"div",
|
|
1505
1561
|
{
|
|
1506
1562
|
ref,
|
|
1507
1563
|
className: cn("flex items-center p-6", className),
|
|
1508
1564
|
...props,
|
|
1509
1565
|
children: [
|
|
1510
|
-
avatar && /* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
title && /* @__PURE__ */
|
|
1513
|
-
subheader && /* @__PURE__ */
|
|
1566
|
+
avatar && /* @__PURE__ */ jsx32("div", { className: "mr-4 flex-shrink-0", children: avatar }),
|
|
1567
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex-1 flex flex-col gap-1", children: [
|
|
1568
|
+
title && /* @__PURE__ */ jsx32("div", { className: "font-semibold leading-none tracking-tight", children: title }),
|
|
1569
|
+
subheader && /* @__PURE__ */ jsx32("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: subheader })
|
|
1514
1570
|
] }),
|
|
1515
|
-
action && /* @__PURE__ */
|
|
1571
|
+
action && /* @__PURE__ */ jsx32("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
|
|
1516
1572
|
]
|
|
1517
1573
|
}
|
|
1518
1574
|
);
|
|
@@ -1522,10 +1578,10 @@ CardHeader.displayName = "CardHeader";
|
|
|
1522
1578
|
|
|
1523
1579
|
// src/components/Surfaces/Card/CardContent.tsx
|
|
1524
1580
|
import React6 from "react";
|
|
1525
|
-
import { jsx as
|
|
1581
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1526
1582
|
var CardContent = React6.forwardRef(
|
|
1527
1583
|
({ className, ...props }, ref) => {
|
|
1528
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ jsx33(
|
|
1529
1585
|
"div",
|
|
1530
1586
|
{
|
|
1531
1587
|
ref,
|
|
@@ -1539,10 +1595,10 @@ CardContent.displayName = "CardContent";
|
|
|
1539
1595
|
|
|
1540
1596
|
// src/components/Surfaces/Card/CardFooter.tsx
|
|
1541
1597
|
import React7 from "react";
|
|
1542
|
-
import { Fragment as Fragment5, jsx as
|
|
1598
|
+
import { Fragment as Fragment5, jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1543
1599
|
var CardFooter = React7.forwardRef(
|
|
1544
1600
|
({ className, text, action, children }, ref) => {
|
|
1545
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ jsx34(
|
|
1546
1602
|
"div",
|
|
1547
1603
|
{
|
|
1548
1604
|
ref,
|
|
@@ -1550,9 +1606,9 @@ var CardFooter = React7.forwardRef(
|
|
|
1550
1606
|
"flex items-center justify-between p-6 bg-white dark:bg-gray-900 rounded-b-xl",
|
|
1551
1607
|
className
|
|
1552
1608
|
),
|
|
1553
|
-
children: children || /* @__PURE__ */
|
|
1554
|
-
text && /* @__PURE__ */
|
|
1555
|
-
action && /* @__PURE__ */
|
|
1609
|
+
children: children || /* @__PURE__ */ jsxs14(Fragment5, { children: [
|
|
1610
|
+
text && /* @__PURE__ */ jsx34("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: text }),
|
|
1611
|
+
action && /* @__PURE__ */ jsx34("div", { className: "ml-auto flex items-center gap-2", children: action })
|
|
1556
1612
|
] })
|
|
1557
1613
|
}
|
|
1558
1614
|
);
|
|
@@ -1566,6 +1622,7 @@ export {
|
|
|
1566
1622
|
CardFooter,
|
|
1567
1623
|
CardHeader,
|
|
1568
1624
|
Carousel,
|
|
1625
|
+
DataTable_default as DataTable,
|
|
1569
1626
|
Dialog,
|
|
1570
1627
|
DialogContent,
|
|
1571
1628
|
DialogFooter,
|