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

\n {experience.companyName}\n

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

\n {position.title}\n

\n\n \n \n \n
\n \n\n
\n {position.employmentType && (\n <>\n
\n
Employment Type
\n
{position.employmentType}
\n
\n\n \n \n )}\n\n
\n
Employment Period
\n
{position.employmentPeriod}
\n
\n
\n \n\n \n {position.description && (\n \n {position.description}\n \n )}\n\n {Array.isArray(position.skills) && position.skills.length > 0 && (\n
    \n {position.skills.map((skill, index) => (\n
  • \n {skill}\n
  • \n ))}\n
\n )}\n
\n \n
\n );\n}\n\nfunction Prose({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n );\n}\n\nfunction Skill({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n );\n}\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://rajdeep-singh.vercel.app/components/work-experience-component" }