From f3c7f1cd636620d788bfc16228e781ba34481f8d Mon Sep 17 00:00:00 2001 From: jeloskaisabel Date: Mon, 27 Oct 2025 19:49:11 -0400 Subject: [PATCH 1/5] chore: add travel planner template scaffold --- templates/agentic/travel-planner/.env.example | 1 + templates/agentic/travel-planner/.gitignore | 37 + templates/agentic/travel-planner/LICENSE | 21 + templates/agentic/travel-planner/README.md | 107 +++ .../agentic/travel-planner/components.json | 21 + .../components/theme-provider.tsx | 11 + .../components/ui/accordion.tsx | 66 ++ .../components/ui/alert-dialog.tsx | 157 ++++ .../travel-planner/components/ui/alert.tsx | 66 ++ .../components/ui/aspect-ratio.tsx | 11 + .../travel-planner/components/ui/avatar.tsx | 53 ++ .../travel-planner/components/ui/badge.tsx | 46 ++ .../components/ui/breadcrumb.tsx | 109 +++ .../travel-planner/components/ui/button.tsx | 59 ++ .../travel-planner/components/ui/calendar.tsx | 213 +++++ .../travel-planner/components/ui/card.tsx | 92 +++ .../travel-planner/components/ui/carousel.tsx | 241 ++++++ .../travel-planner/components/ui/chart.tsx | 353 +++++++++ .../travel-planner/components/ui/checkbox.tsx | 32 + .../components/ui/collapsible.tsx | 33 + .../travel-planner/components/ui/command.tsx | 184 +++++ .../components/ui/context-menu.tsx | 252 ++++++ .../travel-planner/components/ui/dialog.tsx | 143 ++++ .../travel-planner/components/ui/drawer.tsx | 135 ++++ .../components/ui/dropdown-menu.tsx | 257 +++++++ .../travel-planner/components/ui/form.tsx | 167 ++++ .../components/ui/hover-card.tsx | 44 ++ .../components/ui/input-otp.tsx | 77 ++ .../travel-planner/components/ui/input.tsx | 21 + .../travel-planner/components/ui/label.tsx | 24 + .../travel-planner/components/ui/menubar.tsx | 276 +++++++ .../components/ui/navigation-menu.tsx | 168 ++++ .../components/ui/pagination.tsx | 127 +++ .../travel-planner/components/ui/popover.tsx | 48 ++ .../travel-planner/components/ui/progress.tsx | 31 + .../components/ui/radio-group.tsx | 45 ++ .../components/ui/resizable.tsx | 56 ++ .../components/ui/scroll-area.tsx | 58 ++ .../travel-planner/components/ui/select.tsx | 185 +++++ .../components/ui/separator.tsx | 28 + .../travel-planner/components/ui/sheet.tsx | 139 ++++ .../travel-planner/components/ui/sidebar.tsx | 726 ++++++++++++++++++ .../travel-planner/components/ui/skeleton.tsx | 13 + .../travel-planner/components/ui/slider.tsx | 63 ++ .../travel-planner/components/ui/sonner.tsx | 25 + .../travel-planner/components/ui/switch.tsx | 31 + .../travel-planner/components/ui/table.tsx | 116 +++ .../travel-planner/components/ui/tabs.tsx | 66 ++ .../travel-planner/components/ui/textarea.tsx | 18 + .../travel-planner/components/ui/toast.tsx | 129 ++++ .../travel-planner/components/ui/toaster.tsx | 35 + .../components/ui/toggle-group.tsx | 73 ++ .../travel-planner/components/ui/toggle.tsx | 47 ++ .../travel-planner/components/ui/tooltip.tsx | 61 ++ .../components/ui/use-mobile.tsx | 19 + .../travel-planner/components/ui/use-toast.ts | 194 +++++ .../travel-planner/hooks/use-mobile.ts | 19 + .../agentic/travel-planner/hooks/use-toast.ts | 194 +++++ .../agentic/travel-planner/next.config.mjs | 14 + templates/agentic/travel-planner/package.json | 87 +++ .../agentic/travel-planner/postcss.config.mjs | 8 + .../travel-planner/public/lamatic-logo.png | Bin 0 -> 1973 bytes .../travel-planner/public/placeholder.svg | 0 .../agentic/travel-planner/scripts/deploy.sh | 6 + .../agentic/travel-planner/styles/globals.css | 125 +++ .../agentic/travel-planner/tsconfig.json | 27 + 66 files changed, 6290 insertions(+) create mode 100644 templates/agentic/travel-planner/.env.example create mode 100644 templates/agentic/travel-planner/.gitignore create mode 100644 templates/agentic/travel-planner/LICENSE create mode 100644 templates/agentic/travel-planner/README.md create mode 100644 templates/agentic/travel-planner/components.json create mode 100644 templates/agentic/travel-planner/components/theme-provider.tsx create mode 100644 templates/agentic/travel-planner/components/ui/accordion.tsx create mode 100644 templates/agentic/travel-planner/components/ui/alert-dialog.tsx create mode 100644 templates/agentic/travel-planner/components/ui/alert.tsx create mode 100644 templates/agentic/travel-planner/components/ui/aspect-ratio.tsx create mode 100644 templates/agentic/travel-planner/components/ui/avatar.tsx create mode 100644 templates/agentic/travel-planner/components/ui/badge.tsx create mode 100644 templates/agentic/travel-planner/components/ui/breadcrumb.tsx create mode 100644 templates/agentic/travel-planner/components/ui/button.tsx create mode 100644 templates/agentic/travel-planner/components/ui/calendar.tsx create mode 100644 templates/agentic/travel-planner/components/ui/card.tsx create mode 100644 templates/agentic/travel-planner/components/ui/carousel.tsx create mode 100644 templates/agentic/travel-planner/components/ui/chart.tsx create mode 100644 templates/agentic/travel-planner/components/ui/checkbox.tsx create mode 100644 templates/agentic/travel-planner/components/ui/collapsible.tsx create mode 100644 templates/agentic/travel-planner/components/ui/command.tsx create mode 100644 templates/agentic/travel-planner/components/ui/context-menu.tsx create mode 100644 templates/agentic/travel-planner/components/ui/dialog.tsx create mode 100644 templates/agentic/travel-planner/components/ui/drawer.tsx create mode 100644 templates/agentic/travel-planner/components/ui/dropdown-menu.tsx create mode 100644 templates/agentic/travel-planner/components/ui/form.tsx create mode 100644 templates/agentic/travel-planner/components/ui/hover-card.tsx create mode 100644 templates/agentic/travel-planner/components/ui/input-otp.tsx create mode 100644 templates/agentic/travel-planner/components/ui/input.tsx create mode 100644 templates/agentic/travel-planner/components/ui/label.tsx create mode 100644 templates/agentic/travel-planner/components/ui/menubar.tsx create mode 100644 templates/agentic/travel-planner/components/ui/navigation-menu.tsx create mode 100644 templates/agentic/travel-planner/components/ui/pagination.tsx create mode 100644 templates/agentic/travel-planner/components/ui/popover.tsx create mode 100644 templates/agentic/travel-planner/components/ui/progress.tsx create mode 100644 templates/agentic/travel-planner/components/ui/radio-group.tsx create mode 100644 templates/agentic/travel-planner/components/ui/resizable.tsx create mode 100644 templates/agentic/travel-planner/components/ui/scroll-area.tsx create mode 100644 templates/agentic/travel-planner/components/ui/select.tsx create mode 100644 templates/agentic/travel-planner/components/ui/separator.tsx create mode 100644 templates/agentic/travel-planner/components/ui/sheet.tsx create mode 100644 templates/agentic/travel-planner/components/ui/sidebar.tsx create mode 100644 templates/agentic/travel-planner/components/ui/skeleton.tsx create mode 100644 templates/agentic/travel-planner/components/ui/slider.tsx create mode 100644 templates/agentic/travel-planner/components/ui/sonner.tsx create mode 100644 templates/agentic/travel-planner/components/ui/switch.tsx create mode 100644 templates/agentic/travel-planner/components/ui/table.tsx create mode 100644 templates/agentic/travel-planner/components/ui/tabs.tsx create mode 100644 templates/agentic/travel-planner/components/ui/textarea.tsx create mode 100644 templates/agentic/travel-planner/components/ui/toast.tsx create mode 100644 templates/agentic/travel-planner/components/ui/toaster.tsx create mode 100644 templates/agentic/travel-planner/components/ui/toggle-group.tsx create mode 100644 templates/agentic/travel-planner/components/ui/toggle.tsx create mode 100644 templates/agentic/travel-planner/components/ui/tooltip.tsx create mode 100644 templates/agentic/travel-planner/components/ui/use-mobile.tsx create mode 100644 templates/agentic/travel-planner/components/ui/use-toast.ts create mode 100644 templates/agentic/travel-planner/hooks/use-mobile.ts create mode 100644 templates/agentic/travel-planner/hooks/use-toast.ts create mode 100644 templates/agentic/travel-planner/next.config.mjs create mode 100644 templates/agentic/travel-planner/package.json create mode 100644 templates/agentic/travel-planner/postcss.config.mjs create mode 100644 templates/agentic/travel-planner/public/lamatic-logo.png create mode 100644 templates/agentic/travel-planner/public/placeholder.svg create mode 100644 templates/agentic/travel-planner/scripts/deploy.sh create mode 100644 templates/agentic/travel-planner/styles/globals.css create mode 100644 templates/agentic/travel-planner/tsconfig.json diff --git a/templates/agentic/travel-planner/.env.example b/templates/agentic/travel-planner/.env.example new file mode 100644 index 0000000..d7e1dd8 --- /dev/null +++ b/templates/agentic/travel-planner/.env.example @@ -0,0 +1 @@ +LAMATIC_API_KEY=your_lamatic_api_key diff --git a/templates/agentic/travel-planner/.gitignore b/templates/agentic/travel-planner/.gitignore new file mode 100644 index 0000000..399e3e7 --- /dev/null +++ b/templates/agentic/travel-planner/.gitignore @@ -0,0 +1,37 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules + +# next.js +/.next/ +/out/ + +# production +/build + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files +.env +.env.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +# package manager +package-lock.json +yarn.lock +pnpm-lock.yaml +bun.lockb + +#lamatic +config.json \ No newline at end of file diff --git a/templates/agentic/travel-planner/LICENSE b/templates/agentic/travel-planner/LICENSE new file mode 100644 index 0000000..1713f88 --- /dev/null +++ b/templates/agentic/travel-planner/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Lamatic.ai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/templates/agentic/travel-planner/README.md b/templates/agentic/travel-planner/README.md new file mode 100644 index 0000000..0e96cde --- /dev/null +++ b/templates/agentic/travel-planner/README.md @@ -0,0 +1,107 @@ +# Lamatic Multi-Agent Travel Planner + +Design flight-ready itineraries with Lamatic’s multi-agent coordination stack. This template wires the Lamatic workflow you deployed (project `bee05145-3d20-4d4b-a965-75ec69cc4a65`) into a polished Next.js front-end so travellers can collect flights, stays, activities, budgets, visualisations, and booking steps in one place. + +![Travel planner hero](https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1200&q=60) + +--- + +## ✨ What’s inside + +- **Preference capture UI** – guided form with origin/destination, dates, budget, travellers, cabin class, and up to three interests. +- **Lamatic orchestration** – calls the `Multi-Agent Travel Planner` flow (`3cc791a2-ca33-4e27-8791-ff386cef14b2`). The trigger node fans out to flight, hotel, and activity sub-flows and returns a structured brief. +- **Itinerary visualiser** – renders overview, day-by-day plan, flight & stay cards, activity gallery, budget breakdown, booking checklist, and raw payload inspector. +- **Travel-first styling** – airy gradients, travel-inspired hero, and badge-based highlights for an easy hand-off to marketing or ops teams. +- **Friendly UX touches** – date pickers prevent past departures and the response is reformatted into polished cards for trip summary, flights, lodgings, tips, and booking steps. + +--- + +## 🚀 Quick start + +> Make sure you have exported your Lamatic deployment (`lamatic-config.json`) and Lamatic API key (`LAMATIC_API_KEY`). + +1. **Install dependencies** + ```bash + cd templates/agentic/travel-planner + npm install + ``` + +2. **Configure environment** + ```bash + cp .env.example .env.local + # add your Lamatic key + ``` + +3. **Run locally** + ```bash + npm run dev + # open http://localhost:3000 + ``` + +4. **Deploy (optional)** + - Create a new Vercel project with root set to `templates/agentic/travel-planner`. + - Add `LAMATIC_API_KEY` to the Vercel environment variables. + - Upload the same `lamatic-config.json` that you exported from Lamatic Studio. + +--- + +## 🧠 Workflow architecture + +| Stage | Lamatic node | Description | +| ----- | ------------ | ----------- | +| Trigger | `triggerNode_1` | Receives the form payload, validates schema (`origin`, `destination`, `start_date`, `end_date`, `budget`, `interests[]`, `travelers`, `flight_class`). | +| Coordinator | `LLMNode_113` + `codeNode_405` | Builds aggregated search parameters: budget splits, IATA codes, trip summary. | +| Specialists | `flowNode_122`, `flowNode_175`, `flowNode_506` | Dedicated sub-flows for flights, hotels, and activities using the structured queries. | +| Synthesis | `LLMNode_310` + `codeNode_827` | Produces the final travel brief, day-by-day itinerary, budget ledger, tips, and booking next steps. | +| Response | `responseNode_triggerNode_1` | Returns the JSON payload consumed by this Next.js template. | + +All flow metadata (workflow ID, Lamatic endpoint, project ID) live in [`lamatic-config.json`](./lamatic-config.json). + +--- + +## 🖥️ Front-end tour + +| Module | Path | Notes | +| ------ | ---- | ----- | +| Lamatic client | [`lib/lamatic-client.ts`](./lib/lamatic-client.ts) | Thin wrapper around the Lamatic SDK using the config + API key. | +| Orchestrator | [`actions/orchestrate.ts`](./actions/orchestrate.ts) | Cleans preferences, executes the travel flow, and normalises the JSON (flights, stays, activities, budget, tasks, visualisations). | +| UI | [`app/page.tsx`](./app/page.tsx) | Preference form, preset starter trips, loading states, itinerary renderer, and raw payload viewer. | + +Custom helpers in `actions/orchestrate.ts` normalise the Lamatic response so the UI can be data-driven regardless of provider formatting. + +--- + +## 🧩 Required inputs + +- **Origin & destination** – plain text; Lamatic turn will map to IATA codes. +- **Dates** – ISO `YYYY-MM-DD`. +- **Budget** – per-trip amount in USD (update front-end copy if you use another currency). +- **Travellers** – integer; fed to flight and hotel agents. +- **Flight class** – `economy`, `premium_economy`, `business`, `first`. +- **Interests** – up to three tags (`art`, `food`, `history`, `adventure`, `nature`, `shopping`, `nightlife`, `culture`, `family`, `music`, `architecture`). These route requests to the activity analyst. +- **Optional notes** – appended as `"notes: ..."`, giving agents extra context (dietary needs, remote work, accessibility, etc.). + +--- + +## 🛠️ Customisation tips + +- Swap the preset journeys (`PRESET_TRIPS` in `app/page.tsx`) for your audience. +- Add more interest tags or rename them in `ACTIVITY_OPTIONS`, but keep the cap at 3 to respect the downstream agents. +- Extend the normalisers in `actions/orchestrate.ts` if your flow returns additional data (e.g., car rentals, insurance). +- Update the colour palette or background photography by adjusting the header block in `app/page.tsx`. + +--- + +## ✅ Validation checklist + +- [ ] `LAMATIC_API_KEY` present in `.env.local`. +- [ ] `lamatic-config.json` copied from Lamatic Studio (contains your workflow ID + endpoint). +- [ ] `npm run dev` boots without runtime errors. +- [ ] Form submission returns a full itinerary, references, and booking list in the UI. +- [ ] Raw payload viewer shows the JSON delivered by Lamatic (useful for debugging or exporting). + +--- + +## 📄 License + +MIT — see [`LICENSE`](./LICENSE). Have fun building! 🧳✈️ diff --git a/templates/agentic/travel-planner/components.json b/templates/agentic/travel-planner/components.json new file mode 100644 index 0000000..335484f --- /dev/null +++ b/templates/agentic/travel-planner/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "", + "css": "app/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} \ No newline at end of file diff --git a/templates/agentic/travel-planner/components/theme-provider.tsx b/templates/agentic/travel-planner/components/theme-provider.tsx new file mode 100644 index 0000000..55c2f6e --- /dev/null +++ b/templates/agentic/travel-planner/components/theme-provider.tsx @@ -0,0 +1,11 @@ +'use client' + +import * as React from 'react' +import { + ThemeProvider as NextThemesProvider, + type ThemeProviderProps, +} from 'next-themes' + +export function ThemeProvider({ children, ...props }: ThemeProviderProps) { + return {children} +} diff --git a/templates/agentic/travel-planner/components/ui/accordion.tsx b/templates/agentic/travel-planner/components/ui/accordion.tsx new file mode 100644 index 0000000..4a8cca4 --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/accordion.tsx @@ -0,0 +1,66 @@ +"use client" + +import * as React from "react" +import * as AccordionPrimitive from "@radix-ui/react-accordion" +import { ChevronDownIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Accordion({ + ...props +}: React.ComponentProps) { + return +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + svg]:rotate-180", + className + )} + {...props} + > + {children} + + + + ) +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
{children}
+
+ ) +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/templates/agentic/travel-planner/components/ui/alert-dialog.tsx b/templates/agentic/travel-planner/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..0863e40 --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/alert-dialog.tsx @@ -0,0 +1,157 @@ +"use client" + +import * as React from "react" +import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" + +import { cn } from "@/lib/utils" +import { buttonVariants } from "@/components/ui/button" + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ) +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogAction({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogCancel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +} diff --git a/templates/agentic/travel-planner/components/ui/alert.tsx b/templates/agentic/travel-planner/components/ui/alert.tsx new file mode 100644 index 0000000..1421354 --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const alertVariants = cva( + "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", + { + variants: { + variant: { + default: "bg-card text-card-foreground", + destructive: + "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription } diff --git a/templates/agentic/travel-planner/components/ui/aspect-ratio.tsx b/templates/agentic/travel-planner/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..3df3fd0 --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/aspect-ratio.tsx @@ -0,0 +1,11 @@ +"use client" + +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return +} + +export { AspectRatio } diff --git a/templates/agentic/travel-planner/components/ui/avatar.tsx b/templates/agentic/travel-planner/components/ui/avatar.tsx new file mode 100644 index 0000000..71e428b --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/avatar.tsx @@ -0,0 +1,53 @@ +"use client" + +import * as React from "react" +import * as AvatarPrimitive from "@radix-ui/react-avatar" + +import { cn } from "@/lib/utils" + +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Avatar, AvatarImage, AvatarFallback } diff --git a/templates/agentic/travel-planner/components/ui/badge.tsx b/templates/agentic/travel-planner/components/ui/badge.tsx new file mode 100644 index 0000000..0205413 --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-hidden", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: + "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/templates/agentic/travel-planner/components/ui/breadcrumb.tsx b/templates/agentic/travel-planner/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..eb88f32 --- /dev/null +++ b/templates/agentic/travel-planner/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { ChevronRight, MoreHorizontal } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { + return