Skip to content

Commit a7bb344

Browse files
Panthevmclaude
andcommitted
Update UI components and Storybook configuration
Major updates include component styling refinements, Storybook story improvements, and dependency management updates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7384f48 commit a7bb344

31 files changed

Lines changed: 4558 additions & 3558 deletions

package-lock.json

Lines changed: 4364 additions & 3366 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "aidbox-ts-sdk",
3-
"private": true,
4-
"workspaces": [
5-
"packages/*"
6-
],
7-
"packageManager": "pnpm@10.14.0"
2+
"name": "aidbox-ts-sdk",
3+
"private": true,
4+
"workspaces": [
5+
"packages/*"
6+
],
7+
"packageManager": "pnpm@10.14.0"
88
}

packages/react-components/src/components/ui/alert-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function AlertDialogCancel({
136136
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
137137
return (
138138
<AlertDialogPrimitive.Cancel
139-
className={cn(buttonVariants({ variant: "outline" }), className)}
139+
className={cn(buttonVariants({ variant: "secondary" }), className)}
140140
{...props}
141141
/>
142142
)

packages/react-components/src/components/ui/button.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,22 @@ import { cva, type VariantProps } from "class-variance-authority"
55
import { cn } from "@/lib/utils"
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20",
99
{
1010
variants: {
1111
variant: {
1212
default:
13-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
13+
"bg-primary text-primary-foreground shadow-xs hover:bg-(--color-cta-hover) disabled:bg-(--color-elements-disabled)",
1414
destructive:
15-
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
16-
outline:
17-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
15+
"bg-destructive text-white shadow-xs hover:bg-(--color-critical-hover) focus-visible:ring-destructive/20 disabled:bg-(--color-elements-disabled)",
1816
secondary:
19-
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
20-
ghost:
21-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
17+
"border bg-background shadow-xs hover:bg-(--color-surface-1) disabled:text-(--color-elements-disabled)",
18+
tertiary:
19+
"bg-background text-(--color-elements-assistive) hover:text-(--color-elements-readable) disabled:text-(--color-elements-disabled)",
2220
link: "text-primary underline-offset-4 hover:underline",
2321
},
2422
size: {
25-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
23+
default: "h-9 px-6 py-2 has-[>svg]:px-3",
2624
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
2725
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
2826
icon: "size-9",

packages/react-components/src/components/ui/command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function CommandItem({
147147
<CommandPrimitive.Item
148148
data-slot="command-item"
149149
className={cn(
150-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
150+
"data-[selected=true]:bg-(--color-surface-1) text-(--color-elements-assistive) data-[selected=true]:text-(--color-elements-readable) [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
151151
className
152152
)}
153153
{...props}

packages/react-components/src/components/ui/input.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
88
type={type}
99
data-slot="input"
1010
className={cn(
11-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
11+
"h-[36px] file:text-foreground placeholder:text-(--color-elements-disabled) selection:bg-primary selection:text-primary-foreground border-input flex w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-(--color-elements-assistive) md:text-sm",
12+
"focus-visible:border-(--color-border-XS-regular-hover)",
13+
"disabled:bg-(--color-surface-1)",
14+
"aria-invalid:ring-destructive aria-invalid:text-(--color-critical-default) aria-invalid:border-destructive",
1415
className
1516
)}
1617
{...props}

packages/react-components/src/components/ui/menubar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function MenubarTrigger({
5454
<MenubarPrimitive.Trigger
5555
data-slot="menubar-trigger"
5656
className={cn(
57-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
57+
"focus:bg-(--color-surface-1) data-[state=open]:bg-(--color-surface-1) flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
5858
className
5959
)}
6060
{...props}

packages/react-components/src/components/ui/pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function PaginationContent({
3434
}
3535

3636
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
37-
return <li data-slot="pagination-item" {...props} />
37+
return <li class="hover:bg-accent rounded-md" data-slot="pagination-item" {...props} />
3838
}
3939

4040
type PaginationLinkProps = {

packages/react-components/src/components/ui/separator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function Separator({
1717
decorative={decorative}
1818
orientation={orientation}
1919
className={cn(
20-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
20+
"bg-(--color-border-default) shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
2121
className
2222
)}
2323
{...props}

packages/react-components/src/components/ui/tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function TooltipContent({
4646
data-slot="tooltip-content"
4747
sideOffset={sideOffset}
4848
className={cn(
49-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
49+
"bg-(--color-elements-assistive) text-(--color-elements-readable-inv) animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
5050
className
5151
)}
5252
{...props}

0 commit comments

Comments
 (0)