diff --git a/.changeset/gn-docs-badge.md b/.changeset/gn-docs-badge.md new file mode 100644 index 000000000..0cd9c1bfc --- /dev/null +++ b/.changeset/gn-docs-badge.md @@ -0,0 +1,5 @@ +--- +"@paper/genesis": minor +--- + +feat(GnDocsBadge): add a static label/tag primitive for skill levels, modes, category tags, and similar docs-site chrome. Icon is slot-injected (no icon-name string), matching the GnPeek/GnDocsExampleTabs icon strategy; the icon wrapper is aria-hidden and slotted icons keep their own dimensions. diff --git a/packages/genesis/SPEC.md b/packages/genesis/SPEC.md index 4f2297f25..a4817dfae 100644 --- a/packages/genesis/SPEC.md +++ b/packages/genesis/SPEC.md @@ -4,7 +4,7 @@ A focused **docs-primitives library**: Vue 3 components that documentation sites need (live examples, callouts, code groups, API tables, atomic primitives). Headless on the parts that vary across consumers — code highlighting and icons are slot-injected. -Genesis is a **thin component layer over v0's theme system**. Components consume `var(--v0-*)` tokens directly so they inherit whatever theme v0 has applied to the page. There is no Genesis-specific token namespace, no Genesis-specific theme plugin, no Genesis-specific stylesheet. Drop the package into any v0-themed app and components blend with the page's chrome. +Genesis is a **thin component layer over v0's theme system**. Components consume `var(--v0-*)` tokens directly so they inherit whatever theme v0 has applied to the page. There is no Genesis-specific *theme* token namespace (the few `--gn-*` custom properties are consumer-tunable layout knobs, not tokens), no Genesis-specific theme plugin, no Genesis-specific stylesheet. Drop the package into any v0-themed app and components blend with the page's chrome. ## Package shape @@ -16,13 +16,10 @@ packages/genesis/ │ ├── index.ts # re-exports components │ └── components/ │ ├── index.ts -│ ├── GnDocsExample/ -│ ├── GnDocsExampleDescription/ -│ ├── GnDocsExamplePreview/ -│ ├── GnDocsExampleCode/ -│ ├── GnDocsExampleTabs/ -│ ├── GnDocsExamplePanel/ -│ ├── GnDocsExampleActions/ +│ ├── GnActionButton/ +│ ├── GnDocsBadge/ +│ ├── GnDocsExample/ # GnDocsExample.vue + Description / Preview / Code / Tabs / Panel / Actions SFCs +│ ├── GnDotGrid/ │ └── GnPeek/ ``` @@ -30,7 +27,7 @@ No `GnDocsIcon`, no `adapter.ts`, no `plugin.ts`, no `theme.ts`. Genesis is just ## Theme inheritance -Every component's scoped ` diff --git a/packages/genesis/src/components/GnDocsBadge/index.ts b/packages/genesis/src/components/GnDocsBadge/index.ts new file mode 100644 index 000000000..9f703b981 --- /dev/null +++ b/packages/genesis/src/components/GnDocsBadge/index.ts @@ -0,0 +1,2 @@ +export type { GnDocsBadgeProps } from './GnDocsBadge.vue' +export { default as GnDocsBadge } from './GnDocsBadge.vue' diff --git a/packages/genesis/src/components/index.ts b/packages/genesis/src/components/index.ts index 7d7b89a83..236ee9e71 100644 --- a/packages/genesis/src/components/index.ts +++ b/packages/genesis/src/components/index.ts @@ -1,4 +1,5 @@ export * from './GnActionButton' +export * from './GnDocsBadge' export * from './GnDocsExample' export * from './GnDotGrid' export * from './GnPeek'