@inbeat/ui 0.16.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,25 @@
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
+
16
+ ## [0.17.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.16.0...ui-v0.17.0) (2026-11-17)
17
+
18
+
19
+ ### Features
20
+
21
+ * **ui:** date picker, dialog fields, empty state links ([#80](https://github.com/Genoux/ib-toolkit/issues/80)) ([10d5fa7](https://github.com/Genoux/ib-toolkit/commit/10d5fa70b575eb7b7c413dd8a9b60a9925f614af))
22
+
3
23
  ## [0.16.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.15.0...ui-v0.16.0) (2026-11-14)
4
24
 
5
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inbeat/ui",
3
- "version": "0.16.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": [
@@ -22,7 +22,8 @@
22
22
  "scripts": {
23
23
  "typecheck": "tsc --noEmit",
24
24
  "storybook": "storybook dev -p 6006",
25
- "build-storybook": "storybook build -o storybook-static"
25
+ "build-storybook": "storybook build -o storybook-static",
26
+ "test": "bun --bun vitest run"
26
27
  },
27
28
  "dependencies": {
28
29
  "class-variance-authority": "^0.7.1",
@@ -66,7 +67,7 @@
66
67
  "@base-ui/react": "^1.2.0",
67
68
  "@fontsource-variable/geist": "^5.3.0",
68
69
  "@fontsource-variable/geist-mono": "^5.3.0",
69
- "@inbeat/config": "^0.16.0",
70
+ "@inbeat/config": "^0.18.0",
70
71
  "@storybook/addon-a11y": "^10.6.0",
71
72
  "@storybook/addon-docs": "^10.6.0",
72
73
  "@storybook/addon-themes": "^10.6.0",
@@ -88,7 +89,8 @@
88
89
  "storybook": "^10.6.0",
89
90
  "tailwindcss": "^4.3.3",
90
91
  "tw-animate-css": "^1.4.0",
91
- "vite": "^8.3.1"
92
+ "vite": "^8.3.1",
93
+ "vitest": "^4.1.1"
92
94
  },
93
95
  "repository": {
94
96
  "type": "git",
@@ -39,7 +39,7 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
39
39
  <div
40
40
  data-slot="alert-title"
41
41
  className={cn(
42
- "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight text-sm",
42
+ "col-start-2 min-h-4 font-medium tracking-tight text-sm text-pretty",
43
43
  className
44
44
  )}
45
45
  {...props}
@@ -70,11 +70,10 @@ function AppShell({
70
70
  {sidebarFooter ? <SidebarFooter>{sidebarFooter}</SidebarFooter> : null}
71
71
  </Sidebar>
72
72
  <SidebarInset
73
- className={
74
- variant === "inset"
75
- ? "max-h-[calc(100svh-1rem)] min-h-0 overflow-hidden"
76
- : "max-h-svh min-h-0 overflow-hidden"
77
- }
73
+ className={cn(
74
+ "max-h-svh min-h-0 overflow-hidden",
75
+ variant === "inset" && "md:max-h-[calc(100svh-1rem)]",
76
+ )}
78
77
  >
79
78
  <header className={cn("flex shrink-0 items-center gap-2", headerStyle.header)}>
80
79
  <div className={cn("flex w-full items-center gap-1", headerStyle.bar)}>
@@ -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 };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import * as React from "react";
4
- import { CheckIcon } from "lucide-react";
4
+ import { CheckIcon, MinusIcon } from "lucide-react";
5
5
  import { Checkbox as CheckboxPrimitive } from "radix-ui";
6
6
 
7
7
  import { cn } from "../lib/utils";
@@ -11,7 +11,7 @@ function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxP
11
11
  <CheckboxPrimitive.Root
12
12
  data-slot="checkbox"
13
13
  className={cn(
14
- "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
14
+ "peer group/checkbox border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
15
15
  className,
16
16
  )}
17
17
  {...props}
@@ -20,7 +20,8 @@ function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxP
20
20
  data-slot="checkbox-indicator"
21
21
  className="grid place-content-center text-current transition-none"
22
22
  >
23
- <CheckIcon className="size-3.5" />
23
+ <CheckIcon className="size-3.5 group-data-[state=indeterminate]/checkbox:hidden" />
24
+ <MinusIcon className="hidden size-3.5 group-data-[state=indeterminate]/checkbox:block" />
24
25
  </CheckboxPrimitive.Indicator>
25
26
  </CheckboxPrimitive.Root>
26
27
  );
@@ -252,7 +252,7 @@ function ComboboxChips({
252
252
  <ComboboxPrimitive.Chips
253
253
  data-slot="combobox-chips"
254
254
  className={cn(
255
- "flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
255
+ "flex min-h-9 flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
256
256
  className
257
257
  )}
258
258
  {...props}
@@ -0,0 +1,63 @@
1
+ "use client";
2
+
3
+ import { CalendarDays } from "lucide-react";
4
+ import type { ComponentProps } from "react";
5
+ import { useState } from "react";
6
+ import { Button } from "./button";
7
+ import { Calendar } from "./calendar";
8
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover";
9
+
10
+ type DatePickerProps = Pick<
11
+ ComponentProps<"button">,
12
+ "id" | "disabled" | "aria-describedby" | "aria-invalid"
13
+ > & {
14
+ /** ISO calendar date such as "2027-04-30", or "" when empty. */
15
+ value: string;
16
+ onChange: (value: string) => void;
17
+ placeholder?: string;
18
+ };
19
+
20
+ // A calendar date has no time zone: `new Date("2027-04-30")` is UTC midnight, the day before west
21
+ // of UTC, so both directions go through local year, month and day.
22
+ function fromIsoDate(isoDate: string): Date {
23
+ const [year, month, day] = isoDate.split("-").map(Number);
24
+ return new Date(year, month - 1, day);
25
+ }
26
+
27
+ function toIsoDate(date: Date): string {
28
+ const month = String(date.getMonth() + 1).padStart(2, "0");
29
+ const day = String(date.getDate()).padStart(2, "0");
30
+ return `${date.getFullYear()}-${month}-${day}`;
31
+ }
32
+
33
+ function DatePicker({ value, onChange, placeholder = "Pick a date", ...triggerProps }: DatePickerProps) {
34
+ const [open, setOpen] = useState(false);
35
+ const selected = value ? fromIsoDate(value) : undefined;
36
+
37
+ return (
38
+ <Popover open={open} onOpenChange={setOpen}>
39
+ <PopoverTrigger asChild>
40
+ <Button variant="outline" className="w-full justify-start font-normal" {...triggerProps}>
41
+ <CalendarDays className="text-muted-foreground" />
42
+ {selected
43
+ ? selected.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })
44
+ : placeholder}
45
+ </Button>
46
+ </PopoverTrigger>
47
+ <PopoverContent className="w-auto p-0" align="start">
48
+ <Calendar
49
+ mode="single"
50
+ selected={selected}
51
+ defaultMonth={selected}
52
+ onSelect={(day) => {
53
+ if (!day) return;
54
+ onChange(toIsoDate(day));
55
+ setOpen(false);
56
+ }}
57
+ />
58
+ </PopoverContent>
59
+ </Popover>
60
+ );
61
+ }
62
+
63
+ export { DatePicker };
@@ -1,17 +1,18 @@
1
1
  "use client";
2
2
 
3
3
  import type { ReactNode } from "react";
4
- import { useState } from "react";
5
- import {
6
- AlertDialog,
7
- AlertDialogCancel,
8
- AlertDialogContent,
9
- AlertDialogDescription,
10
- AlertDialogFooter,
11
- AlertDialogHeader,
12
- AlertDialogTitle,
13
- } from "./alert-dialog";
4
+ import { useId, useState } from "react";
14
5
  import { Button } from "./button";
6
+ import {
7
+ Dialog,
8
+ DialogClose,
9
+ DialogContent,
10
+ DialogDescription,
11
+ DialogFooter,
12
+ DialogHeader,
13
+ DialogTitle,
14
+ } from "./dialog";
15
+ import { Field } from "./field";
15
16
  import { Input } from "./input";
16
17
  import { Label } from "./label";
17
18
 
@@ -25,6 +26,9 @@ interface DestructiveActionDialogBaseProps {
25
26
  cancelLabel?: string;
26
27
  confirmLabel?: string;
27
28
  pendingLabel?: string;
29
+ /** Fields the action needs, such as a required reason, between the description and the buttons. */
30
+ children?: ReactNode;
31
+ confirmDisabled?: boolean;
28
32
  }
29
33
 
30
34
  export type DestructiveActionDialogProps =
@@ -51,12 +55,16 @@ export function DestructiveActionDialog({
51
55
  cancelLabel = "Cancel",
52
56
  confirmLabel = "Delete",
53
57
  pendingLabel = "Deleting...",
58
+ children,
59
+ confirmDisabled = false,
54
60
  variant = "simple",
55
61
  resourceName,
56
62
  }: DestructiveActionDialogProps) {
63
+ const typedInputId = useId();
57
64
  const [typed, setTyped] = useState("");
58
65
  const requiredPhrase = variant === "typed" ? `DELETE ${resourceName}` : "";
59
- const canConfirm = !isPending && (variant === "simple" || typed === requiredPhrase);
66
+ const canConfirm =
67
+ !isPending && !confirmDisabled && (variant === "simple" || typed === requiredPhrase);
60
68
 
61
69
  function handleOpenChange(next: boolean) {
62
70
  if (!next && isPending) return;
@@ -65,44 +73,47 @@ export function DestructiveActionDialog({
65
73
  }
66
74
 
67
75
  return (
68
- <AlertDialog open={open} onOpenChange={handleOpenChange}>
69
- <AlertDialogContent>
70
- <AlertDialogHeader>
71
- <AlertDialogTitle>{title}</AlertDialogTitle>
72
- <AlertDialogDescription>
73
- {description}
74
- </AlertDialogDescription>
75
- </AlertDialogHeader>
76
+ <Dialog open={open} onOpenChange={handleOpenChange}>
77
+ {/* Same semantics as AlertDialog: a click outside never dismisses a destructive step. */}
78
+ <DialogContent role="alertdialog" onInteractOutside={(event) => event.preventDefault()}>
79
+ <DialogHeader>
80
+ <DialogTitle>{title}</DialogTitle>
81
+ <DialogDescription>{description}</DialogDescription>
82
+ </DialogHeader>
83
+ {children}
76
84
  {variant === "typed" ? (
77
- <div className="grid gap-3">
78
- <div className="space-y-1.5">
79
- <Label className="text-sm text-muted-foreground">
80
- Type{" "}
81
- <span className="font-mono font-semibold tracking-wide text-foreground">
82
- {requiredPhrase}
83
- </span>{" "}
84
- to confirm
85
- </Label>
86
- <Input
87
- autoCapitalize="off"
88
- value={typed}
89
- onChange={(e) => setTyped(e.target.value)}
90
- placeholder={requiredPhrase}
91
- autoComplete="off"
92
- spellCheck={false}
93
- className="text-foreground"
94
- onPointerDown={(e) => e.stopPropagation()}
95
- />
96
- </div>
97
- </div>
85
+ <Field>
86
+ <Label htmlFor={typedInputId} className="text-muted-foreground">
87
+ Type{" "}
88
+ <span className="font-mono font-semibold tracking-wide text-foreground">
89
+ {requiredPhrase}
90
+ </span>{" "}
91
+ to confirm
92
+ </Label>
93
+ <Input
94
+ id={typedInputId}
95
+ autoCapitalize="off"
96
+ value={typed}
97
+ onChange={(e) => setTyped(e.target.value)}
98
+ placeholder={requiredPhrase}
99
+ autoComplete="off"
100
+ spellCheck={false}
101
+ className="text-foreground"
102
+ onPointerDown={(e) => e.stopPropagation()}
103
+ />
104
+ </Field>
98
105
  ) : null}
99
- <AlertDialogFooter>
100
- <AlertDialogCancel disabled={isPending}>{cancelLabel}</AlertDialogCancel>
106
+ <DialogFooter>
107
+ <DialogClose asChild>
108
+ <Button variant="outline" disabled={isPending}>
109
+ {cancelLabel}
110
+ </Button>
111
+ </DialogClose>
101
112
  <Button disabled={!canConfirm} onClick={onConfirm}>
102
113
  {isPending ? pendingLabel : confirmLabel}
103
114
  </Button>
104
- </AlertDialogFooter>
105
- </AlertDialogContent>
106
- </AlertDialog>
115
+ </DialogFooter>
116
+ </DialogContent>
117
+ </Dialog>
107
118
  );
108
119
  }
@@ -108,7 +108,7 @@ function DialogContent({
108
108
  <PortalContainerProvider container={portalContainer}>
109
109
  <div
110
110
  data-slot="dialog-body"
111
- className="flex h-full min-h-0 w-full min-w-0 flex-col gap-4"
111
+ className="flex h-full min-h-0 w-full min-w-0 flex-col gap-6 *:data-[slot=field-group]:gap-6"
112
112
  >
113
113
  {children}
114
114
  </div>
@@ -135,7 +135,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
135
135
  return (
136
136
  <div
137
137
  data-slot="dialog-header"
138
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
138
+ className={cn("flex flex-col gap-2 text-left", className)}
139
139
  {...props}
140
140
  />
141
141
  );
@@ -1,24 +1,44 @@
1
1
  import type { LucideIcon } from "lucide-react";
2
- import type { ComponentProps } from "react";
2
+ import type { ComponentProps, ReactElement, ReactNode } from "react";
3
3
  import { cn } from "../lib/utils";
4
4
  import { Button } from "./button";
5
5
 
6
+ type EmptyStateActionLook = {
7
+ label: string;
8
+ variant?: ComponentProps<typeof Button>["variant"];
9
+ icon?: LucideIcon;
10
+ };
11
+
12
+ // The element is rendered through Slot and asChild, so it must forward props and ref.
13
+ type RenderEmptyStateLink = (href: string, content: ReactNode) => ReactElement;
14
+
6
15
  export type EmptyStateProps = {
7
16
  title: string;
8
17
  description?: string;
9
18
  icon?: LucideIcon;
10
- action?: {
11
- label: string;
12
- onClick: () => void;
13
- variant?: ComponentProps<typeof Button>["variant"];
14
- icon?: LucideIcon;
15
- disabled?: boolean;
16
- };
19
+ action?: EmptyStateActionLook &
20
+ ({ onClick: () => void; disabled?: boolean; href?: never } | { href: string; onClick?: never });
21
+ renderLink?: RenderEmptyStateLink;
17
22
  className?: string;
18
23
  };
19
24
 
20
- export function EmptyState({ title, description, icon: Icon, action, className }: EmptyStateProps) {
25
+ const renderAnchor: RenderEmptyStateLink = (href, content) => <a href={href}>{content}</a>;
26
+
27
+ export function EmptyState({
28
+ title,
29
+ description,
30
+ icon: Icon,
31
+ action,
32
+ renderLink = renderAnchor,
33
+ className,
34
+ }: EmptyStateProps) {
21
35
  const ActionIcon = action?.icon;
36
+ const actionContent = action ? (
37
+ <>
38
+ {ActionIcon ? <ActionIcon className="size-3.5" /> : null}
39
+ {action.label}
40
+ </>
41
+ ) : null;
22
42
 
23
43
  return (
24
44
  <div
@@ -39,15 +59,18 @@ export function EmptyState({ title, description, icon: Icon, action, className }
39
59
  <p className="text-sm/relaxed text-muted-foreground">{description}</p>
40
60
  ) : null}
41
61
  </div>
42
- {action ? (
62
+ {action?.href !== undefined ? (
63
+ <Button asChild size="sm" variant={action.variant ?? "secondary"}>
64
+ {renderLink(action.href, actionContent)}
65
+ </Button>
66
+ ) : action ? (
43
67
  <Button
44
68
  size="sm"
45
69
  variant={action.variant ?? "secondary"}
46
70
  disabled={action.disabled}
47
71
  onClick={action.onClick}
48
72
  >
49
- {ActionIcon ? <ActionIcon className="size-3.5" /> : null}
50
- {action.label}
73
+ {actionContent}
51
74
  </Button>
52
75
  ) : null}
53
76
  </div>
@@ -14,7 +14,7 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
14
14
  data-slot="input-group"
15
15
  role="group"
16
16
  className={cn(
17
- "group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
17
+ "group/input-group relative flex w-full items-center rounded-lg border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
18
18
  "h-9 min-w-0 has-[>textarea]:h-auto",
19
19
 
20
20
  // Variants based on alignment.
@@ -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-bold 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 };
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
7
7
  <textarea
8
8
  data-slot="textarea"
9
9
  className={cn(
10
- "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
10
+ "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
11
11
  className
12
12
  )}
13
13
  {...props}