mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
Major documentation reorganization and improvements: ## Documentation Cleanup - Deleted 13 old status/report MD files from root - Moved old reports to docs/archive/ for reference - Removed USAGE.md, WHITE_LABEL.md, TESTING_GUIDE.md - Now only 9 essential MD files at root (LLM.md, README.md, etc.) ## New Comprehensive Documentation Created in app/content/docs/ (visible on ui.hanzo.ai): ### Frameworks (/docs/frameworks/) - Multi-framework overview and comparison - React guide (8KB) - hooks, Next.js, TypeScript - Vue guide (4.6KB) - Composition API, Nuxt ### Packages (/docs/packages/) - Complete package documentation (6.3KB) - @hanzo/ui, @hanzo/auth, @hanzo/commerce, @hanzo/brand ### Testing (/docs/testing/) - Comprehensive testing guide (7.6KB) - Unit, E2E, visual regression, accessibility - Vitest, Playwright, CI/CD examples ### White-Label (/docs/white-label/) - Fork and rebrand guide (6.4KB) - Publishing, deployment, syncing with upstream ## Navigation & UX Improvements - Updated sidebar navigation with 4 new sections - Added comprehensive footer with quick links - 4-column footer: Getting Started, Frameworks, Resources, Community - Version number in footer (v5.0.0) ## Technical Fixes - Fixed build:registry workspace references (www,v4 → app) - Removed deprecated prettier import order options - Updated site config with version and Discord link ## Updated Documentation - README.md - Concise, feature-rich overview - LLM.md - Documentation structure rules and recent updates - All 175 MDX files accessible and building correctly Deployment ready for ui.hanzo.ai
98 lines
3.1 KiB
TypeScript
98 lines
3.1 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
|
|
import { Button } from "@/registry/default/ui/button"
|
|
import { Calendar } from "@/registry/default/ui/calendar"
|
|
import { Card, CardContent, CardFooter } from "@/registry/default/ui/card"
|
|
|
|
export default function Calendar20() {
|
|
const [date, setDate] = React.useState<Date | undefined>(
|
|
new Date(2025, 5, 12)
|
|
)
|
|
const [selectedTime, setSelectedTime] = React.useState<string | null>("10:00")
|
|
const timeSlots = Array.from({ length: 37 }, (_, i) => {
|
|
const totalMinutes = i * 15
|
|
const hour = Math.floor(totalMinutes / 60) + 9
|
|
const minute = totalMinutes % 60
|
|
return `${hour.toString().padStart(2, "0")}:${minute
|
|
.toString()
|
|
.padStart(2, "0")}`
|
|
})
|
|
|
|
const bookedDates = Array.from(
|
|
{ length: 3 },
|
|
(_, i) => new Date(2025, 5, 17 + i)
|
|
)
|
|
|
|
return (
|
|
<Card className="gap-0 p-0">
|
|
<CardContent className="relative p-0 md:pr-48">
|
|
<div className="p-6">
|
|
<Calendar
|
|
mode="single"
|
|
selected={date}
|
|
onSelect={setDate}
|
|
defaultMonth={date}
|
|
disabled={bookedDates}
|
|
showOutsideDays={false}
|
|
modifiers={{
|
|
booked: bookedDates,
|
|
}}
|
|
modifiersClassNames={{
|
|
booked: "[&>button]:line-through opacity-100",
|
|
}}
|
|
className="bg-transparent p-0 [--cell-size:2.5rem] md:[--cell-size:3rem]"
|
|
formatters={{
|
|
formatWeekdayName: (date) => {
|
|
return date.toLocaleString("en-US", { weekday: "short" })
|
|
},
|
|
}}
|
|
/>
|
|
</div>
|
|
<div className="no-scrollbar inset-y-0 right-0 flex max-h-72 w-full scroll-pb-6 flex-col gap-4 overflow-y-auto border-t p-6 md:absolute md:max-h-none md:w-48 md:border-l md:border-t-0">
|
|
<div className="grid gap-2">
|
|
{timeSlots.map((time) => (
|
|
<Button
|
|
key={time}
|
|
variant={selectedTime === time ? "default" : "outline"}
|
|
onClick={() => setSelectedTime(time)}
|
|
className="w-full shadow-none"
|
|
>
|
|
{time}
|
|
</Button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</CardContent>
|
|
<CardFooter className="flex flex-col gap-4 border-t !py-5 px-6 md:flex-row">
|
|
<div className="text-sm">
|
|
{date && selectedTime ? (
|
|
<>
|
|
Your meeting is booked for{" "}
|
|
<span className="font-medium">
|
|
{" "}
|
|
{date?.toLocaleDateString("en-US", {
|
|
weekday: "long",
|
|
day: "numeric",
|
|
month: "long",
|
|
})}{" "}
|
|
</span>
|
|
at <span className="font-medium">{selectedTime}</span>.
|
|
</>
|
|
) : (
|
|
<>Select a date and time for your meeting.</>
|
|
)}
|
|
</div>
|
|
<Button
|
|
disabled={!date || !selectedTime}
|
|
className="w-full md:ml-auto md:w-auto"
|
|
variant="outline"
|
|
>
|
|
Continue
|
|
</Button>
|
|
</CardFooter>
|
|
</Card>
|
|
)
|
|
}
|