{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "work-experience", "title": "Work Experience", "author": "ramanak ", "description": "Displays a list of work experiences with role details and durations.", "dependencies": [ "react-markdown", "lucide-react" ], "devDependencies": [ "@tailwindcss/typography", "tw-animate-css" ], "registryDependencies": [ "@ramanak/utils", "collapsible", "separator" ], "files": [ { "path": "src/registry/work-experience/work-experience.tsx", "content": "import {\r\n BriefcaseBusinessIcon,\r\n ChevronsDownUpIcon,\r\n ChevronsUpDownIcon,\r\n CodeXmlIcon,\r\n DraftingCompassIcon,\r\n GraduationCapIcon,\r\n} from \"lucide-react\"\r\nimport Image from \"next/image\"\r\nimport React from \"react\"\r\nimport ReactMarkdown from \"react-markdown\"\r\n\r\nimport {\r\n Collapsible,\r\n CollapsibleContent,\r\n CollapsibleTrigger,\r\n} from \"@/components/ui/collapsible\"\r\nimport { Separator } from \"@/components/ui/separator\"\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst iconMap = {\r\n code: CodeXmlIcon,\r\n design: DraftingCompassIcon,\r\n business: BriefcaseBusinessIcon,\r\n education: GraduationCapIcon,\r\n} as const\r\n\r\n/**\r\n * Represents the valid keys of the `iconMap` object, used to specify the type of icon\r\n * associated with an experience position.\r\n */\r\nexport type ExperiencePositionIconType = keyof typeof iconMap\r\n\r\nexport type ExperiencePositionItemType = {\r\n /** Unique identifier for the position */\r\n id: string\r\n /** The job title or position name */\r\n title: string\r\n /** The period during which the position was held (e.g., \"Jan 2020 - Dec 2021\") */\r\n employmentPeriod: string\r\n /** The type of employment (e.g., \"Full-time\", \"Part-time\", \"Contract\") */\r\n employmentType?: string\r\n /** A brief description of the position or responsibilities */\r\n description?: string\r\n /** An icon representing the position */\r\n icon?: ExperiencePositionIconType\r\n /** A list of skills associated with the position */\r\n skills?: string[]\r\n /** Indicates if the position details are expanded in the UI */\r\n isExpanded?: boolean\r\n}\r\n\r\nexport type ExperienceItemType = {\r\n /** Unique identifier for the experience item */\r\n id: string\r\n /** Name of the company where the experience was gained */\r\n companyName: string\r\n /** URL or path to the company's logo image */\r\n companyLogo?: string\r\n /** List of positions held at the company */\r\n positions: ExperiencePositionItemType[]\r\n /** Indicates if this is the user's current employer */\r\n isCurrentEmployer?: boolean\r\n}\r\n\r\nexport function WorkExperience({\r\n className,\r\n experiences,\r\n}: {\r\n className?: string\r\n experiences: ExperienceItemType[]\r\n}) {\r\n return (\r\n
\r\n {experiences.map((experience) => (\r\n \r\n ))}\r\n
\r\n )\r\n}\r\n\r\nexport function ExperienceItem({\r\n experience,\r\n}: {\r\n experience: ExperienceItemType\r\n}) {\r\n return (\r\n
\r\n
\r\n \r\n {experience.companyLogo ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n\r\n

\r\n {experience.companyName}\r\n

\r\n\r\n {experience.isCurrentEmployer && (\r\n \r\n \r\n \r\n Current Employer\r\n \r\n )}\r\n
\r\n\r\n
\r\n {experience.positions.map((position) => (\r\n \r\n ))}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport function ExperiencePositionItem({\r\n position,\r\n}: {\r\n position: ExperiencePositionItemType\r\n}) {\r\n const ExperienceIcon = iconMap[position.icon || \"business\"]\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n

\r\n {position.title}\r\n

\r\n\r\n \r\n \r\n \r\n
\r\n \r\n\r\n
\r\n {position.employmentType && (\r\n <>\r\n
\r\n
Employment Type
\r\n
{position.employmentType}
\r\n
\r\n\r\n \r\n \r\n )}\r\n\r\n
\r\n
Employment Period
\r\n
{position.employmentPeriod}
\r\n
\r\n
\r\n \r\n\r\n \r\n {position.description && (\r\n \r\n {position.description}\r\n \r\n )}\r\n \r\n\r\n {Array.isArray(position.skills) && position.skills.length > 0 && (\r\n \r\n )}\r\n \r\n
\r\n )\r\n}\r\n\r\nfunction Prose({ className, ...props }: React.ComponentProps<\"div\">) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction Skill({ className, ...props }: React.ComponentProps<\"span\">) {\r\n return (\r\n \r\n )\r\n}\r\n", "type": "registry:component" } ], "cssVars": { "light": { "background": "oklch(1 0 0)", "muted": "oklch(0.967 0.001 286.375)", "muted-foreground": "oklch(0.552 0.016 285.938)", "border": "oklch(0.92 0.004 286.32)" }, "dark": { "background": "oklch(0.141 0.005 285.823)", "muted": "oklch(0.274 0.006 286.033)", "muted-foreground": "oklch(0.705 0.015 286.067)", "border": "oklch(0.274 0.006 286.033)" } }, "css": { "@import \"tw-animate-css\"": {}, "@plugin @tailwindcss/typography": {} }, "docs": "https://www.ramana.dev/components/work-experience-component", "type": "registry:component" }