@inbeat/ui 0.15.0 → 0.17.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 +14 -0
- package/package.json +6 -4
- package/src/components/alert.tsx +1 -1
- package/src/components/app-shell.tsx +4 -5
- package/src/components/checkbox.tsx +4 -3
- package/src/components/combobox.tsx +1 -1
- package/src/components/date-picker.tsx +63 -0
- package/src/components/destructive-action-dialog.tsx +56 -45
- package/src/components/dialog.tsx +2 -2
- package/src/components/empty-state.tsx +35 -12
- package/src/components/input-group.tsx +1 -1
- package/src/components/number-dot.tsx +1 -1
- package/src/components/textarea.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.17.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.16.0...ui-v0.17.0) (2026-11-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **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))
|
|
9
|
+
|
|
10
|
+
## [0.16.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.15.0...ui-v0.16.0) (2026-11-14)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **ui:** Synchronize inbeat versions
|
|
16
|
+
|
|
3
17
|
## [0.15.0](https://github.com/Genoux/ib-toolkit/compare/ui-v0.14.0...ui-v0.15.0) (2026-11-14)
|
|
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.17.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.
|
|
70
|
+
"@inbeat/config": "^0.17.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",
|
package/src/components/alert.tsx
CHANGED
|
@@ -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
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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)}>
|
|
@@ -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-
|
|
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 =
|
|
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
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
<
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
<
|
|
100
|
-
<
|
|
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
|
-
</
|
|
105
|
-
</
|
|
106
|
-
</
|
|
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-
|
|
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-
|
|
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
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
{
|
|
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-
|
|
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-
|
|
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">
|
|
10
10
|
{count}
|
|
11
11
|
</span>
|
|
12
12
|
);
|
|
@@ -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-
|
|
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}
|