@inbeat/ui 0.17.0 → 0.18.0

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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.17.0...ui-v0.18.0) (2026-11-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * page layout, look layers and ui rules in ib check ([#81](https://github.com/Genoux/ib-toolkit/issues/81)) ([0bb464e](https://github.com/Genoux/ib-toolkit/commit/0bb464e262595d75c37ea4b39af6306599571ebc))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **ui:** keep single-digit counts a perfect circle ([#86](https://github.com/Genoux/ib-toolkit/issues/86)) ([bf12156](https://github.com/Genoux/ib-toolkit/commit/bf1215651dd0af8928850e37807800b6c8e17666))
14
+ * **ui:** show a record's key facts as one card each ([#83](https://github.com/Genoux/ib-toolkit/issues/83)) ([b7b02c1](https://github.com/Genoux/ib-toolkit/commit/b7b02c177c1a8bf495748304b1b7ded0153a3d11))
15
+
3
16
  ## [0.17.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.16.0...ui-v0.17.0) (2026-11-17)
4
17
 
5
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inbeat/ui",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "inBeat design tokens and primitives (Radix + Tailwind v4), shipped as source",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -67,7 +67,7 @@
67
67
  "@base-ui/react": "^1.2.0",
68
68
  "@fontsource-variable/geist": "^5.3.0",
69
69
  "@fontsource-variable/geist-mono": "^5.3.0",
70
- "@inbeat/config": "^0.17.0",
70
+ "@inbeat/config": "^0.18.0",
71
71
  "@storybook/addon-a11y": "^10.6.0",
72
72
  "@storybook/addon-docs": "^10.6.0",
73
73
  "@storybook/addon-themes": "^10.6.0",
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps } from "react";
2
+ import { cn } from "../lib/utils";
3
+
4
+ function Card({ className, ...props }: ComponentProps<"div">) {
5
+ return (
6
+ <div
7
+ data-slot="card"
8
+ className={cn(
9
+ "flex min-w-0 flex-col gap-4 rounded-xl border border-border bg-card p-5 text-card-foreground shadow-hairline",
10
+ className,
11
+ )}
12
+ {...props}
13
+ />
14
+ );
15
+ }
16
+
17
+ export { Card };
@@ -6,7 +6,7 @@ export function NumberDot({ count }: NumberDotProps) {
6
6
  if (count <= 0) return null;
7
7
 
8
8
  return (
9
- <span className="ml-0.5 text-xs bg-muted-foreground/10 px-1 font-medium rounded-full flex items-center justify-center text-muted-foreground">
9
+ <span className="ml-0.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted-foreground/10 px-1 text-xs font-medium text-muted-foreground tabular-nums">
10
10
  {count}
11
11
  </span>
12
12
  );
@@ -0,0 +1,80 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { cn } from "../lib/utils";
3
+
4
+ const PAGE_WIDTH = {
5
+ default: "max-w-6xl",
6
+ narrow: "max-w-3xl",
7
+ full: "",
8
+ } as const;
9
+
10
+ type PageProps = ComponentProps<"div"> & {
11
+ /** `default` for lists, details and overviews; `narrow` for forms and settings; `full` for wide tables and workspaces. */
12
+ size?: keyof typeof PAGE_WIDTH;
13
+ };
14
+
15
+ function Page({ size = "default", className, ...props }: PageProps) {
16
+ return (
17
+ <div
18
+ data-slot="page"
19
+ data-size={size}
20
+ className={cn(
21
+ "mx-auto flex w-full min-w-0 flex-col gap-8 px-4 pt-6 pb-16 md:px-8 md:pt-8",
22
+ PAGE_WIDTH[size],
23
+ className,
24
+ )}
25
+ {...props}
26
+ />
27
+ );
28
+ }
29
+
30
+ type PageHeaderProps = {
31
+ title: ReactNode;
32
+ description?: ReactNode;
33
+ actions?: ReactNode;
34
+ className?: string;
35
+ };
36
+
37
+ function PageHeader({ title, description, actions, className }: PageHeaderProps) {
38
+ return (
39
+ <header
40
+ data-slot="page-header"
41
+ className={cn("flex flex-wrap items-end justify-between gap-x-8 gap-y-4", className)}
42
+ >
43
+ <div className="flex min-w-0 flex-col gap-1">
44
+ <h1 className="text-xl font-semibold text-balance">{title}</h1>
45
+ {description ? (
46
+ <p className="max-w-prose text-sm text-pretty text-muted-foreground">{description}</p>
47
+ ) : null}
48
+ </div>
49
+ {actions ? <div className="flex shrink-0 items-center gap-2">{actions}</div> : null}
50
+ </header>
51
+ );
52
+ }
53
+
54
+ type PageSectionProps = Omit<ComponentProps<"section">, "title"> & {
55
+ title?: ReactNode;
56
+ description?: ReactNode;
57
+ actions?: ReactNode;
58
+ };
59
+
60
+ function PageSection({ title, description, actions, className, children, ...props }: PageSectionProps) {
61
+ const hasHeader = title || description || actions;
62
+ return (
63
+ <section data-slot="page-section" className={cn("flex min-w-0 flex-col gap-4", className)} {...props}>
64
+ {hasHeader ? (
65
+ <div className="flex items-end justify-between gap-6">
66
+ <div className="flex min-w-0 flex-col gap-1">
67
+ {title ? <h2 className="text-base font-semibold">{title}</h2> : null}
68
+ {description ? (
69
+ <p className="text-sm text-pretty text-muted-foreground">{description}</p>
70
+ ) : null}
71
+ </div>
72
+ {actions ? <div className="flex shrink-0 items-center gap-2">{actions}</div> : null}
73
+ </div>
74
+ ) : null}
75
+ {children}
76
+ </section>
77
+ );
78
+ }
79
+
80
+ export { Page, PageHeader, PageSection };