lecom-ui 5.3.42 → 5.3.44
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.
|
@@ -185,7 +185,10 @@ function DataTable({
|
|
|
185
185
|
"bg-white rounded-[8px] p-2 transition-all duration-500",
|
|
186
186
|
className
|
|
187
187
|
),
|
|
188
|
-
style:
|
|
188
|
+
style: {
|
|
189
|
+
contain: "layout",
|
|
190
|
+
...noScroll ? {} : { width: styleDataTableContainer.width }
|
|
191
|
+
}
|
|
189
192
|
},
|
|
190
193
|
noScroll ? renderTable() : /* @__PURE__ */ React.createElement(ScrollArea, { type: "always", className: "p-2" }, /* @__PURE__ */ React.createElement(
|
|
191
194
|
"div",
|
|
@@ -46,7 +46,7 @@ function Table({
|
|
|
46
46
|
}
|
|
47
47
|
)));
|
|
48
48
|
}
|
|
49
|
-
return /* @__PURE__ */ React.createElement("table", { id: "data-table", className: "w-full" }, /* @__PURE__ */ React.createElement("thead", { className: "sticky top-0 z-10 bg-white" }, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => /* @__PURE__ */ React.createElement(
|
|
49
|
+
return /* @__PURE__ */ React.createElement("table", { id: "data-table", className: "w-full", style: { tableLayout: "fixed" } }, /* @__PURE__ */ React.createElement("thead", { className: "sticky top-0 z-10 bg-white" }, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => /* @__PURE__ */ React.createElement(
|
|
50
50
|
"th",
|
|
51
51
|
{
|
|
52
52
|
key: header.id,
|
|
@@ -67,37 +67,44 @@ function Table({
|
|
|
67
67
|
header.column.columnDef.header,
|
|
68
68
|
header.getContext()
|
|
69
69
|
)
|
|
70
|
-
))))), /* @__PURE__ */ React.createElement(
|
|
71
|
-
"
|
|
70
|
+
))))), /* @__PURE__ */ React.createElement(
|
|
71
|
+
"tbody",
|
|
72
72
|
{
|
|
73
|
-
"
|
|
74
|
-
|
|
73
|
+
className: "[&_tr:last-child]:border-0 [&_tr:last-child_td]:shadow-none",
|
|
74
|
+
style: { willChange: "transform" }
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React.createElement(React.Fragment, { key: row.id }, /* @__PURE__ */ React.createElement(
|
|
77
|
+
"tr",
|
|
78
|
+
{
|
|
79
|
+
"data-state": onIsSelected?.(row) ? "selected" : "",
|
|
80
|
+
className: "[&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100"
|
|
81
|
+
},
|
|
82
|
+
row.getVisibleCells().map((cell) => /* @__PURE__ */ React.createElement(
|
|
83
|
+
"td",
|
|
84
|
+
{
|
|
85
|
+
key: cell.id,
|
|
86
|
+
className: cn(
|
|
87
|
+
"p-4 py-0 h-10 [&:has([role=checkbox])]:pr-0 transition-colors shadow-[0_-0.5px_0px_0px_#c9c9c9_inset] text-left",
|
|
88
|
+
cell.column.columnDef.meta?.cellClassName
|
|
89
|
+
),
|
|
90
|
+
"data-column": cell.column.id,
|
|
91
|
+
"data-fixed": getFixed(cell.column.columnDef.meta),
|
|
92
|
+
style: styleColumn(
|
|
93
|
+
cell.column.columnDef.meta,
|
|
94
|
+
"td"
|
|
95
|
+
)
|
|
96
|
+
},
|
|
97
|
+
flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
98
|
+
))
|
|
99
|
+
), row.getIsExpanded() && expandedContent && /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: columns.length, className: "p-0" }, expandedContent(row))))) : /* @__PURE__ */ React.createElement("tr", { className: "border-b-[0.5px] [&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100" }, /* @__PURE__ */ React.createElement(
|
|
77
100
|
"td",
|
|
78
101
|
{
|
|
79
|
-
|
|
80
|
-
className:
|
|
81
|
-
"p-4 py-0 h-10 [&:has([role=checkbox])]:pr-0 transition-colors shadow-[0_-0.5px_0px_0px_#c9c9c9_inset] text-left",
|
|
82
|
-
cell.column.columnDef.meta?.cellClassName
|
|
83
|
-
),
|
|
84
|
-
"data-column": cell.column.id,
|
|
85
|
-
"data-fixed": getFixed(cell.column.columnDef.meta),
|
|
86
|
-
style: styleColumn(
|
|
87
|
-
cell.column.columnDef.meta,
|
|
88
|
-
"td"
|
|
89
|
-
)
|
|
102
|
+
colSpan: columns.length,
|
|
103
|
+
className: "p-4 py-0 h-10 align-middle [&:has([role=checkbox])]:pr-0 transition-colors"
|
|
90
104
|
},
|
|
91
|
-
|
|
105
|
+
noResults ?? /* @__PURE__ */ React.createElement("div", { className: "text-center" }, "-")
|
|
92
106
|
))
|
|
93
|
-
)
|
|
94
|
-
"td",
|
|
95
|
-
{
|
|
96
|
-
colSpan: columns.length,
|
|
97
|
-
className: "p-4 py-0 h-10 align-middle [&:has([role=checkbox])]:pr-0 transition-colors"
|
|
98
|
-
},
|
|
99
|
-
noResults ?? /* @__PURE__ */ React.createElement("div", { className: "text-center" }, "-")
|
|
100
|
-
))));
|
|
107
|
+
));
|
|
101
108
|
}
|
|
102
109
|
Table.displayName = "Table";
|
|
103
110
|
|
|
@@ -30,7 +30,8 @@ const MultiSelect = React.forwardRef(
|
|
|
30
30
|
searchStrategy = "ranked",
|
|
31
31
|
highlightMatches = true,
|
|
32
32
|
allowTypoDistance = 0,
|
|
33
|
-
groupedOptions
|
|
33
|
+
groupedOptions,
|
|
34
|
+
classNameContent
|
|
34
35
|
}, ref) => {
|
|
35
36
|
const { t } = useTranslation();
|
|
36
37
|
const [selectedValues, setSelectedValues] = React.useState(value);
|
|
@@ -419,7 +420,8 @@ const MultiSelect = React.forwardRef(
|
|
|
419
420
|
{
|
|
420
421
|
className: cn(
|
|
421
422
|
"p-0 max-h-80",
|
|
422
|
-
matchTriggerWidth && "w-[var(--radix-popover-trigger-width)]"
|
|
423
|
+
matchTriggerWidth && "w-[var(--radix-popover-trigger-width)]",
|
|
424
|
+
classNameContent
|
|
423
425
|
),
|
|
424
426
|
side,
|
|
425
427
|
align: "start",
|
package/dist/index.d.ts
CHANGED