@ai-matrx/design-system 0.61.21 → 0.61.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/CHANGELOG.md +12 -0
- package/dist/desktop.cjs +21 -15
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.css +7 -2
- package/dist/desktop.d.cts +3 -1
- package/dist/desktop.d.ts +3 -1
- package/dist/desktop.js +21 -15
- package/dist/desktop.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.61.23
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.61.22..npm/design-system/v0.61.23 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.61.22
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/design-system/v0.61.21..npm/design-system/v0.61.22 -- apps/shared/design-system`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.61.21
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/desktop.cjs
CHANGED
|
@@ -2085,6 +2085,7 @@ function DataTable({
|
|
|
2085
2085
|
rowMenu,
|
|
2086
2086
|
defaultSort,
|
|
2087
2087
|
rowData,
|
|
2088
|
+
limit,
|
|
2088
2089
|
className,
|
|
2089
2090
|
"aria-label": ariaLabel,
|
|
2090
2091
|
...rest
|
|
@@ -2100,11 +2101,12 @@ function DataTable({
|
|
|
2100
2101
|
const [sort, setSort] = React18.useState(defaultSort ?? null);
|
|
2101
2102
|
const sortColumn = sort ? columns.find((c) => c.key === sort.key && c.sort) : void 0;
|
|
2102
2103
|
const ordered = React18.useMemo(() => {
|
|
2103
|
-
|
|
2104
|
+
const cut = (list) => limit !== void 0 && list.length > limit ? list.slice(0, limit) : list;
|
|
2105
|
+
if (!sort || !sortColumn?.sort) return cut(rows);
|
|
2104
2106
|
const by = sortColumn.sort;
|
|
2105
2107
|
const sign = sort.direction === "ascending" ? 1 : -1;
|
|
2106
|
-
return [...rows].sort((a, b) => sign * by(a, b));
|
|
2107
|
-
}, [rows, sort, sortColumn]);
|
|
2108
|
+
return cut([...rows].sort((a, b) => sign * by(a, b)));
|
|
2109
|
+
}, [rows, sort, sortColumn, limit]);
|
|
2108
2110
|
const toggleSort = (key) => setSort((prev) => prev?.key === key ? { key, direction: prev.direction === "ascending" ? "descending" : "ascending" } : { key, direction: "descending" });
|
|
2109
2111
|
const hasActions = Boolean(rowAction || rowMenu);
|
|
2110
2112
|
const span = columns.length + (detail ? 1 : 0) + (hasActions ? 1 : 0);
|
|
@@ -2157,7 +2159,7 @@ function DataTable({
|
|
|
2157
2159
|
column.key
|
|
2158
2160
|
);
|
|
2159
2161
|
}),
|
|
2160
|
-
hasActions ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { "aria-label": "Actions", className: "w-
|
|
2162
|
+
hasActions ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { "aria-label": "Actions", className: "w-0 p-0" }) : null
|
|
2161
2163
|
] }) }),
|
|
2162
2164
|
rows.length === 0 && empty ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { colSpan: span, children: empty }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { ref: bodyRef, children: ordered.map((row, index) => {
|
|
2163
2165
|
const key = rowKey(row);
|
|
@@ -2220,16 +2222,20 @@ function DataTable({
|
|
|
2220
2222
|
},
|
|
2221
2223
|
column.key
|
|
2222
2224
|
)),
|
|
2223
|
-
hasActions ?
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2225
|
+
hasActions ? (
|
|
2226
|
+
// Zero width: the buttons float over the row's trailing edge instead of reserving
|
|
2227
|
+
// an empty column (Finder). They appear on hover, keyboard focus or selection.
|
|
2228
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "relative w-0 p-0", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2229
|
+
"span",
|
|
2230
|
+
{
|
|
2231
|
+
className: cn(
|
|
2232
|
+
"absolute right-2 top-1/2 flex -translate-y-1/2 items-center rounded-control bg-content pl-2",
|
|
2233
|
+
!selected && "opacity-0 group-hover/row:opacity-100 group-focus-within/row:opacity-100 has-[[data-state=open]]:opacity-100",
|
|
2234
|
+
selected && "bg-selection"
|
|
2235
|
+
),
|
|
2236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RowActions, { action: rowAction?.(row) ?? null, menu: rowMenu?.(row) ?? null })
|
|
2237
|
+
}
|
|
2238
|
+
) })
|
|
2233
2239
|
) : null
|
|
2234
2240
|
]
|
|
2235
2241
|
}
|
|
@@ -2324,7 +2330,7 @@ var SourceListItem = React19.forwardRef(function SourceListItem2({ icon, label,
|
|
|
2324
2330
|
className: cn(
|
|
2325
2331
|
"focus-ring group/item flex w-full items-center gap-2 rounded-control px-2 text-left text-body text-label transition-colors duration-100 hover:bg-fill disabled:opacity-40",
|
|
2326
2332
|
hint && !soon ? "min-h-row py-1" : "h-sidebar-row",
|
|
2327
|
-
soon && "text-label-tertiary",
|
|
2333
|
+
soon && (current ? "text-label-secondary" : "text-label-tertiary"),
|
|
2328
2334
|
current && "bg-selection-muted font-medium hover:bg-selection-muted [[data-window-active=false]_&]:bg-fill",
|
|
2329
2335
|
className
|
|
2330
2336
|
),
|