Catalog JSON schema
Acest conținut nu este încă disponibil în limba selectată.
Each component entry is one JSON file under design/catalog/<id>.json.
Files starting with _ are ignored by the builder (schema / docs).
Build: npm run portal:build → design/components/<id>.html + index.html + catalog.json.
{ "id": "alert", "selector": "gds-alert", "blockKind": "alert", "package": "@gstack/gds-angular", "dataType": "AlertData", "status": "stable", "description": { "ro": "...", "en": "..." }, "properties": [ { "name": "data", "type": "AlertData", "required": true, "description": { "ro": "..." }, "fields": [ { "name": "severity", "type": "'info' | 'warning' | 'success' | 'error'", "description": { "ro": "..." } }, { "name": "text", "type": "string", "required": true, "description": { "ro": "..." } } ] } ], "ai": { "notes": ["..."], "fields": ["text", "title?"], "doNot": ["hex hardcodat"] }, "example": { "block": { "id": "demo-1", "kind": "alert", "data": { "severity": "info", "text": "..." } }, "meta": { "lang": "ro", "accent": "indigo", "font": "ibm-plex" } }, "code": { "angular": "<gds-alert ... />", "block": "<gds-block [block]=\"{...}\" />" }}Required fields (builder validates loosely)
Section titled “Required fields (builder validates loosely)”| Field | Rule |
|---|---|
id | string, non-empty; should match filename stem |
selector | string (e.g. gds-alert) |
blockKind | string — must be a real BlockKind from @gstack/gds-core |
example.block | object with kind + data — required for BlockKind entries; renderBlock() must succeed |
example.sidenav | alternative for STRUCTURE (gds-sidenav) — rendered via renderSidenav() |
example.meta | optional; lang / accent / font default to ro / indigo / ibm-plex |
Optional
Section titled “Optional”package,dataType,status(stable|beta|draft)description.ro/description.enproperties[]with nestedfields[]ai.notes/ai.fields/ai.doNotcode.angular/code.block
Conventions
Section titled “Conventions”- Do not invent BlockKind or props outside
projects/gds-core/src/lib/blocks.ts. - Accent only via
--gds-accent/--gds-primarytokens — no hardcoded hex in examples. - One JSON per catalog entry;
idis the URL slug (/components/<id>.html).