mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 17:24:30 +00:00
docs: add comprehensive code comments, update README and TASKS, create training and troubleshooting guides
- Add JSDoc comments to API routes and business logic functions - Update README.md with Phase 2 status and deployment/production notes - Enhance TASKS.md with estimated timelines and dependencies - Create docs/STAFF_TRAINING.md for team onboarding - Create docs/CLIENT_ONBOARDING.md for customer experience - Create docs/OPERATIONAL_PROCEDURES.md for daily operations - Create docs/TROUBLESHOOTING.md for common setup issues - Fix TypeScript errors in hq/page.tsx
This commit is contained in:
@@ -27,6 +27,9 @@ export interface BadgeProps
|
||||
extends React.HTMLAttributes<HTMLDivElement>,
|
||||
VariantProps<typeof badgeVariants> {}
|
||||
|
||||
/**
|
||||
* Badge component that renders a styled badge with support for different variants.
|
||||
*/
|
||||
function Badge({ className, variant, ...props }: BadgeProps) {
|
||||
return (
|
||||
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
||||
|
||||
@@ -38,6 +38,9 @@ export interface ButtonProps
|
||||
asChild?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Button component that renders a styled button with various variants and sizes.
|
||||
*/
|
||||
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
({ className, variant, size, asChild = false, ...props }, ref) => {
|
||||
const Comp = asChild ? Slot : "button"
|
||||
|
||||
@@ -2,6 +2,9 @@ import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/**
|
||||
* Card component that renders a container with border, background, and shadow.
|
||||
*/
|
||||
const Card = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
@@ -17,6 +20,9 @@ const Card = React.forwardRef<
|
||||
))
|
||||
Card.displayName = "Card"
|
||||
|
||||
/**
|
||||
* CardHeader component for the header section of a card.
|
||||
*/
|
||||
const CardHeader = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
@@ -29,6 +35,9 @@ const CardHeader = React.forwardRef<
|
||||
))
|
||||
CardHeader.displayName = "CardHeader"
|
||||
|
||||
/**
|
||||
* CardTitle component for the title within a card header.
|
||||
*/
|
||||
const CardTitle = React.forwardRef<
|
||||
HTMLParagraphElement,
|
||||
React.HTMLAttributes<HTMLHeadingElement>
|
||||
@@ -44,6 +53,9 @@ const CardTitle = React.forwardRef<
|
||||
))
|
||||
CardTitle.displayName = "CardTitle"
|
||||
|
||||
/**
|
||||
* CardDescription component for the description text in a card.
|
||||
*/
|
||||
const CardDescription = React.forwardRef<
|
||||
HTMLParagraphElement,
|
||||
React.HTMLAttributes<HTMLParagraphElement>
|
||||
@@ -56,6 +68,9 @@ const CardDescription = React.forwardRef<
|
||||
))
|
||||
CardDescription.displayName = "CardDescription"
|
||||
|
||||
/**
|
||||
* CardContent component for the main content area of a card.
|
||||
*/
|
||||
const CardContent = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
@@ -64,6 +79,9 @@ const CardContent = React.forwardRef<
|
||||
))
|
||||
CardContent.displayName = "CardContent"
|
||||
|
||||
/**
|
||||
* CardFooter component for the footer section of a card.
|
||||
*/
|
||||
const CardFooter = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
|
||||
@@ -4,6 +4,9 @@ import { cn } from "@/lib/utils"
|
||||
export interface InputProps
|
||||
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||
|
||||
/**
|
||||
* Input component that renders a styled input element.
|
||||
*/
|
||||
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
({ className, type, ...props }, ref) => {
|
||||
return (
|
||||
|
||||
@@ -7,6 +7,9 @@ const labelVariants = cva(
|
||||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||
)
|
||||
|
||||
/**
|
||||
* Label component that renders a styled label element.
|
||||
*/
|
||||
const Label = React.forwardRef<
|
||||
React.ElementRef<typeof LabelPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
||||
|
||||
@@ -10,6 +10,9 @@ const SelectGroup = SelectPrimitive.Group
|
||||
|
||||
const SelectValue = SelectPrimitive.Value
|
||||
|
||||
/**
|
||||
* SelectTrigger component that renders the button to open the select dropdown.
|
||||
*/
|
||||
const SelectTrigger = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
||||
@@ -30,6 +33,9 @@ const SelectTrigger = React.forwardRef<
|
||||
))
|
||||
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
||||
|
||||
/**
|
||||
* SelectScrollUpButton component for the up scroll button in the select content.
|
||||
*/
|
||||
const SelectScrollUpButton = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
||||
@@ -47,6 +53,9 @@ const SelectScrollUpButton = React.forwardRef<
|
||||
))
|
||||
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
||||
|
||||
/**
|
||||
* SelectScrollDownButton component for the down scroll button in the select content.
|
||||
*/
|
||||
const SelectScrollDownButton = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
||||
@@ -64,6 +73,9 @@ const SelectScrollDownButton = React.forwardRef<
|
||||
))
|
||||
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName
|
||||
|
||||
/**
|
||||
* SelectContent component that renders the dropdown content of the select.
|
||||
*/
|
||||
const SelectContent = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
||||
@@ -96,6 +108,9 @@ const SelectContent = React.forwardRef<
|
||||
))
|
||||
SelectContent.displayName = SelectPrimitive.Content.displayName
|
||||
|
||||
/**
|
||||
* SelectLabel component for labels within the select content.
|
||||
*/
|
||||
const SelectLabel = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Label>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
||||
@@ -108,6 +123,9 @@ const SelectLabel = React.forwardRef<
|
||||
))
|
||||
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
||||
|
||||
/**
|
||||
* SelectItem component for individual selectable items in the select.
|
||||
*/
|
||||
const SelectItem = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Item>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
||||
@@ -131,6 +149,9 @@ const SelectItem = React.forwardRef<
|
||||
))
|
||||
SelectItem.displayName = SelectPrimitive.Item.displayName
|
||||
|
||||
/**
|
||||
* SelectSeparator component for separators between select items.
|
||||
*/
|
||||
const SelectSeparator = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Separator>,
|
||||
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
||||
|
||||
@@ -5,6 +5,9 @@ import { cn } from "@/lib/utils"
|
||||
|
||||
const Tabs = TabsPrimitive.Root
|
||||
|
||||
/**
|
||||
* TabsList component that renders the container for tab triggers.
|
||||
*/
|
||||
const TabsList = React.forwardRef<
|
||||
React.ElementRef<typeof TabsPrimitive.List>,
|
||||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
||||
@@ -20,6 +23,9 @@ const TabsList = React.forwardRef<
|
||||
))
|
||||
TabsList.displayName = TabsPrimitive.List.displayName
|
||||
|
||||
/**
|
||||
* TabsTrigger component for individual tab buttons.
|
||||
*/
|
||||
const TabsTrigger = React.forwardRef<
|
||||
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
||||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
||||
@@ -35,6 +41,9 @@ const TabsTrigger = React.forwardRef<
|
||||
))
|
||||
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
||||
|
||||
/**
|
||||
* TabsContent component for the content of each tab panel.
|
||||
*/
|
||||
const TabsContent = React.forwardRef<
|
||||
React.ElementRef<typeof TabsPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
||||
|
||||
Reference in New Issue
Block a user