mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
Upstream sync from shadcn-ui/ui (1686 commits since last merge base). Key changes: - packages/shadcn upgraded to 4.1.0 (CLI font transformers, scaffold from github, chart colors) - apps/v4 replaces apps/www as the primary docs/registry app - Font system: 25+ heading font registries, font markers utility, @supports override - Chart improvements: recharts v3 compat, radial chart fixes - templates/ updated with monorepo variants (astro, vite, react-router, start) - skills/shadcn AI skill definitions added - deprecated/ removed (auth, auth-firebase, cli, www) Preserved Hanzo-only paths: app/, pkg/, demo/, docs/, template/next/
116 lines
3.9 KiB
TypeScript
116 lines
3.9 KiB
TypeScript
"use client"
|
|
|
|
import { Button } from "@/registry/bases/base/ui/button"
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardFooter,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/registry/bases/base/ui/card"
|
|
import { Checkbox } from "@/registry/bases/base/ui/checkbox"
|
|
import { Field, FieldGroup, FieldLabel } from "@/registry/bases/base/ui/field"
|
|
import { Input } from "@/registry/bases/base/ui/input"
|
|
import {
|
|
Select,
|
|
SelectContent,
|
|
SelectGroup,
|
|
SelectItem,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
} from "@/registry/bases/base/ui/select"
|
|
|
|
export function ShippingAddress() {
|
|
return (
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>Shipping Address</CardTitle>
|
|
<CardDescription>Where should we deliver?</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<FieldGroup>
|
|
<Field>
|
|
<FieldLabel htmlFor="shipping-street">Street address</FieldLabel>
|
|
<Input id="shipping-street" placeholder="123 Main Street" />
|
|
</Field>
|
|
<Field>
|
|
<FieldLabel htmlFor="shipping-apt">Apt / Suite</FieldLabel>
|
|
<Input id="shipping-apt" placeholder="Apt 4B" />
|
|
</Field>
|
|
<FieldGroup className="grid grid-cols-2">
|
|
<Field>
|
|
<FieldLabel htmlFor="shipping-city">City</FieldLabel>
|
|
<Input id="shipping-city" placeholder="San Francisco" />
|
|
</Field>
|
|
<Field>
|
|
<FieldLabel htmlFor="shipping-state">State</FieldLabel>
|
|
<Select
|
|
items={[
|
|
{ label: "California", value: "CA" },
|
|
{ label: "New York", value: "NY" },
|
|
{ label: "Texas", value: "TX" },
|
|
]}
|
|
defaultValue="CA"
|
|
>
|
|
<SelectTrigger id="shipping-state" className="w-full">
|
|
<SelectValue />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectGroup>
|
|
<SelectItem value="CA">California</SelectItem>
|
|
<SelectItem value="NY">New York</SelectItem>
|
|
<SelectItem value="TX">Texas</SelectItem>
|
|
</SelectGroup>
|
|
</SelectContent>
|
|
</Select>
|
|
</Field>
|
|
</FieldGroup>
|
|
<FieldGroup className="grid grid-cols-2">
|
|
<Field>
|
|
<FieldLabel htmlFor="shipping-zip">ZIP Code</FieldLabel>
|
|
<Input id="shipping-zip" placeholder="94102" />
|
|
</Field>
|
|
<Field>
|
|
<FieldLabel htmlFor="shipping-country">Country</FieldLabel>
|
|
<Select
|
|
items={[
|
|
{ label: "United States", value: "US" },
|
|
{ label: "Canada", value: "CA" },
|
|
{ label: "United Kingdom", value: "UK" },
|
|
]}
|
|
defaultValue="US"
|
|
>
|
|
<SelectTrigger id="shipping-country" className="w-full">
|
|
<SelectValue />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectGroup>
|
|
<SelectItem value="US">United States</SelectItem>
|
|
<SelectItem value="CA">Canada</SelectItem>
|
|
<SelectItem value="UK">United Kingdom</SelectItem>
|
|
</SelectGroup>
|
|
</SelectContent>
|
|
</Select>
|
|
</Field>
|
|
</FieldGroup>
|
|
<Field orientation="horizontal">
|
|
<Checkbox id="shipping-save" defaultChecked />
|
|
<FieldLabel htmlFor="shipping-save" className="font-normal">
|
|
Save as default address
|
|
</FieldLabel>
|
|
</Field>
|
|
</FieldGroup>
|
|
</CardContent>
|
|
<CardFooter>
|
|
<Button variant="outline" size="sm">
|
|
Cancel
|
|
</Button>
|
|
<Button size="sm" className="ml-auto">
|
|
Save Address
|
|
</Button>
|
|
</CardFooter>
|
|
</Card>
|
|
)
|
|
}
|