From 0d016276fbbf75337c76d52f42342b89058cd28a Mon Sep 17 00:00:00 2001 From: Hirotaka Mizutani <52546+hirotaka@users.noreply.github.com> Date: Sun, 28 Jun 2026 13:21:13 +0900 Subject: [PATCH] feat(registry): Add work experience block --- app/components/demo/WorkExperienceDemo.vue | 49 ++++++ .../blocks/work-experience/WorkExperience.vue | 142 ++++++++++++++++++ app/registry/blocks/work-experience/index.ts | 1 + .../docs/2.components/17.work-experience.md | 98 ++++++++++++ scripts/registry-verify.ts | 4 + 5 files changed, 294 insertions(+) create mode 100644 app/components/demo/WorkExperienceDemo.vue create mode 100644 app/registry/blocks/work-experience/WorkExperience.vue create mode 100644 app/registry/blocks/work-experience/index.ts create mode 100644 content/docs/2.components/17.work-experience.md diff --git a/app/components/demo/WorkExperienceDemo.vue b/app/components/demo/WorkExperienceDemo.vue new file mode 100644 index 0000000..083945e --- /dev/null +++ b/app/components/demo/WorkExperienceDemo.vue @@ -0,0 +1,49 @@ + + + diff --git a/app/registry/blocks/work-experience/WorkExperience.vue b/app/registry/blocks/work-experience/WorkExperience.vue new file mode 100644 index 0000000..27e0124 --- /dev/null +++ b/app/registry/blocks/work-experience/WorkExperience.vue @@ -0,0 +1,142 @@ + + + diff --git a/app/registry/blocks/work-experience/index.ts b/app/registry/blocks/work-experience/index.ts new file mode 100644 index 0000000..77dc503 --- /dev/null +++ b/app/registry/blocks/work-experience/index.ts @@ -0,0 +1 @@ +export { default as WorkExperience, type WorkExperienceItem, type WorkExperienceProps } from "./WorkExperience.vue"; diff --git a/content/docs/2.components/17.work-experience.md b/content/docs/2.components/17.work-experience.md new file mode 100644 index 0000000..a62654f --- /dev/null +++ b/content/docs/2.components/17.work-experience.md @@ -0,0 +1,98 @@ +--- +title: WorkExperience +description: Render compact work-history and resume lists from app-owned experience data. +category: content +--- + +::component-preview +--- +name: WorkExperienceDemo +--- +:: + +## Installation + +```bash +npx shadcn-vue@latest add "https://ui.stackhacker.io/r/work-experience.json" +``` + +## Usage + +```vue + + + +``` + +## WorkExperience vs ChangelogTimeline + +`WorkExperience` is for compact career-history and resume surfaces: dates, roles, organizations, and optional organization links. It does not render release bodies, latest markers, loading states, or retry states. + +Use `ChangelogTimeline` for content timelines and release histories. Use `WorkExperience` when the job is career history and your app already owns display-ready dates, organization data, and any brand visuals. + +## App-Owned Organization Data + +Your app owns date formatting, organization links, logo/icon rendering, brand colors, localization, and profile data. Pass organization visuals through the scoped `organization` slot instead of relying on Nuxt Icon strings or inline brand colors. + +## Examples + +### Default + +::component-preview +--- +name: WorkExperienceDemo +--- +:: + +## API Reference + +### Props + +| Prop | Type | Default | Description | +|------|------|---------|-------------| +| `title` | `string` | — | Optional section title. | +| `description` | `string` | — | Optional supporting section copy. | +| `items` | `WorkExperienceItem[] \| null` | `[]` | Work-history items supplied by your app. | +| `class` | `string` | — | Additional CSS classes for the section. | + +### Types + +```ts +interface WorkExperienceItem { + id?: string + dateLabel: string + role: string + organization: string + href?: string + target?: HTMLAnchorElement['target'] + rel?: string + description?: string +} +``` + +### Slots + +| Slot | Props | Description | +|------|-------|-------------| +| `organization` | `{ item: WorkExperienceItem, index: number }` | Optional organization logo, icon, or external-link affordance. | diff --git a/scripts/registry-verify.ts b/scripts/registry-verify.ts index 37a49ca..fe5b213 100644 --- a/scripts/registry-verify.ts +++ b/scripts/registry-verify.ts @@ -147,6 +147,10 @@ const expectedItems: Record = { dependencies: [], registryDependencies: [], }, + "work-experience": { + dependencies: [], + registryDependencies: [], + }, }; if (registryIndex) {