@inbeat/ui 0.8.0 → 0.9.1
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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.1](https://github.com/Genoux/ib-toolkit/compare/ui-v0.9.0...ui-v0.9.1) (2026-10-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **ui:** align sortable table headers with plain ones ([#41](https://github.com/Genoux/ib-toolkit/issues/41)) ([f2d794b](https://github.com/Genoux/ib-toolkit/commit/f2d794b66ed798208b2dfe9bf75c1f40332aaa77))
|
|
9
|
+
|
|
10
|
+
## [0.9.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.8.0...ui-v0.9.0) (2026-10-02)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **ui:** Synchronize inbeat versions
|
|
16
|
+
|
|
3
17
|
## [0.8.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.7.1...ui-v0.8.0) (2026-10-01)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inbeat/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "inBeat design tokens and primitives (Radix + Tailwind v4), shipped as source",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@base-ui/react": "^1.2.0",
|
|
65
65
|
"@fontsource-variable/geist": "^5.3.0",
|
|
66
66
|
"@fontsource-variable/geist-mono": "^5.3.0",
|
|
67
|
-
"@inbeat/config": "^0.
|
|
67
|
+
"@inbeat/config": "^0.9.1",
|
|
68
68
|
"@storybook/addon-a11y": "^10.6.0",
|
|
69
69
|
"@storybook/addon-docs": "^10.6.0",
|
|
70
70
|
"@storybook/addon-themes": "^10.6.0",
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import type { Column } from "@tanstack/react-table";
|
|
4
4
|
import { ArrowDownIcon, ArrowUpIcon } from "lucide-react";
|
|
5
|
-
import { Button } from "./button";
|
|
6
5
|
|
|
7
6
|
type DataTableSortableHeaderProps<TData, TValue> = {
|
|
8
7
|
label: string;
|
|
9
8
|
column: Column<TData, TValue>;
|
|
10
9
|
};
|
|
11
10
|
|
|
11
|
+
// Not `Button size="xs"`: its fixed height and padding made sortable header rows 8px taller
|
|
12
|
+
// than plain-text ones and indented their labels. Padding cancelled by equal negative margins
|
|
13
|
+
// keeps the ghost hover pill while laying out exactly like a plain-text header.
|
|
12
14
|
export function DataTableSortableHeader<TData, TValue>({
|
|
13
15
|
label,
|
|
14
16
|
column,
|
|
@@ -16,14 +18,13 @@ export function DataTableSortableHeader<TData, TValue>({
|
|
|
16
18
|
const isAscending = column.getIsSorted() === "asc";
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
|
-
<
|
|
21
|
+
<button
|
|
20
22
|
type="button"
|
|
21
|
-
variant="ghost"
|
|
22
|
-
size="xs"
|
|
23
23
|
onClick={() => column.toggleSorting(isAscending)}
|
|
24
|
+
className="-mx-2 -my-1 inline-flex cursor-pointer items-center gap-1 rounded-full px-2 py-1 transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 dark:hover:bg-accent/50"
|
|
24
25
|
>
|
|
25
26
|
{label}
|
|
26
|
-
{isAscending ? <ArrowUpIcon className="size-3
|
|
27
|
-
</
|
|
27
|
+
{isAscending ? <ArrowUpIcon className="size-3" /> : <ArrowDownIcon className="size-3" />}
|
|
28
|
+
</button>
|
|
28
29
|
);
|
|
29
30
|
}
|