@inbeat/ui 0.11.2 → 0.11.3
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 +7 -0
- package/package.json +2 -2
- package/src/components/app-shell.tsx +1 -1
- package/src/components/breadcrumb.tsx +44 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.3](https://github.com/Genoux/ib-toolkit/compare/ui-v0.11.2...ui-v0.11.3) (2026-10-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **ui:** keep long breadcrumb titles on one line ([#58](https://github.com/Genoux/ib-toolkit/issues/58)) ([31852e3](https://github.com/Genoux/ib-toolkit/commit/31852e3002bc1d5f9b86aec0d4eb35624b013307))
|
|
9
|
+
|
|
3
10
|
## [0.11.2](https://github.com/Genoux/ib-toolkit/compare/ui-v0.11.1...ui-v0.11.2) (2026-10-09)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inbeat/ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
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.11.
|
|
67
|
+
"@inbeat/config": "^0.11.3",
|
|
68
68
|
"@storybook/addon-a11y": "^10.6.0",
|
|
69
69
|
"@storybook/addon-docs": "^10.6.0",
|
|
70
70
|
"@storybook/addon-themes": "^10.6.0",
|
|
@@ -83,7 +83,7 @@ function AppShell({
|
|
|
83
83
|
orientation="vertical"
|
|
84
84
|
className={cn(headerStyle.separator, "data-[orientation=vertical]:h-4")}
|
|
85
85
|
/>
|
|
86
|
-
{header ? <div className="flex w-full items-center justify-between">{header}</div> : null}
|
|
86
|
+
{header ? <div className="flex w-full min-w-0 items-center justify-between">{header}</div> : null}
|
|
87
87
|
</div>
|
|
88
88
|
</header>
|
|
89
89
|
<div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto">{children}</div>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
3
5
|
import { Slot } from "radix-ui";
|
|
4
6
|
|
|
5
7
|
import { cn } from "../lib/utils";
|
|
8
|
+
import { TooltipContent, TooltipRoot, TooltipTrigger } from "./tooltip";
|
|
6
9
|
|
|
7
|
-
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
|
8
|
-
return
|
|
10
|
+
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
11
|
+
return (
|
|
12
|
+
<nav
|
|
13
|
+
aria-label="breadcrumb"
|
|
14
|
+
data-slot="breadcrumb"
|
|
15
|
+
className={cn("min-w-0", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
@@ -13,7 +23,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
|
13
23
|
<ol
|
|
14
24
|
data-slot="breadcrumb-list"
|
|
15
25
|
className={cn(
|
|
16
|
-
"text-muted-foreground flex
|
|
26
|
+
"text-muted-foreground flex items-center gap-1 text-sm",
|
|
17
27
|
className,
|
|
18
28
|
)}
|
|
19
29
|
{...props}
|
|
@@ -25,7 +35,10 @@ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
|
25
35
|
return (
|
|
26
36
|
<li
|
|
27
37
|
data-slot="breadcrumb-item"
|
|
28
|
-
className={cn(
|
|
38
|
+
className={cn(
|
|
39
|
+
"inline-flex shrink-0 items-center gap-1.5 has-data-[slot=breadcrumb-page]:min-w-20 has-data-[slot=breadcrumb-page]:shrink",
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
29
42
|
{...props}
|
|
30
43
|
/>
|
|
31
44
|
);
|
|
@@ -43,22 +56,39 @@ function BreadcrumbLink({
|
|
|
43
56
|
return (
|
|
44
57
|
<Comp
|
|
45
58
|
data-slot="breadcrumb-link"
|
|
46
|
-
className={cn("py-1 px-1.5 rounded-md hover:text-foreground hover:bg-muted-foreground/5 transition-colors", className)}
|
|
59
|
+
className={cn("block max-w-40 truncate py-1 px-1.5 rounded-md hover:text-foreground hover:bg-muted-foreground/5 transition-colors", className)}
|
|
47
60
|
{...props}
|
|
48
61
|
/>
|
|
49
62
|
);
|
|
50
63
|
}
|
|
51
64
|
|
|
52
|
-
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
65
|
+
function BreadcrumbPage({ className, children, ...props }: React.ComponentProps<"span">) {
|
|
66
|
+
const pageRef = React.useRef<HTMLSpanElement>(null);
|
|
67
|
+
const [tooltipOpen, setTooltipOpen] = React.useState(false);
|
|
68
|
+
|
|
53
69
|
return (
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
<TooltipRoot
|
|
71
|
+
open={tooltipOpen}
|
|
72
|
+
onOpenChange={(open) => {
|
|
73
|
+
const page = pageRef.current;
|
|
74
|
+
setTooltipOpen(open && !!page && page.scrollWidth > page.clientWidth);
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
<TooltipTrigger asChild>
|
|
78
|
+
<span
|
|
79
|
+
data-slot="breadcrumb-page"
|
|
80
|
+
role="link"
|
|
81
|
+
aria-disabled="true"
|
|
82
|
+
aria-current="page"
|
|
83
|
+
className={cn("block truncate py-1 px-1.5 text-foreground font-normal", className)}
|
|
84
|
+
{...props}
|
|
85
|
+
ref={pageRef}
|
|
86
|
+
>
|
|
87
|
+
{children}
|
|
88
|
+
</span>
|
|
89
|
+
</TooltipTrigger>
|
|
90
|
+
<TooltipContent>{children}</TooltipContent>
|
|
91
|
+
</TooltipRoot>
|
|
62
92
|
);
|
|
63
93
|
}
|
|
64
94
|
|