Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
node-version: 22
cache: pnpm

- run: pnpm install --frozen-lockfile=false
- run: pnpm install --frozen-lockfile
- run: pnpm tokens:check
- run: pnpm lint
- run: pnpm test
- run: pnpm build
- run: pnpm package:check
- run: pnpm storybook:build
6 changes: 4 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
with:
node-version: 22
registry-url: https://npm.pkg.github.com
cache: pnpm

- run: pnpm install --frozen-lockfile=false
- run: pnpm install --frozen-lockfile
- run: pnpm tokens:check
- run: pnpm lint
- run: pnpm test
- run: pnpm build
- run: pnpm package:check
- run: pnpm storybook:build
- run: npm publish
env:
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

## 0.1.0-alpha.5

### Added

- Consumer-driven component maturity lifecycle and evidence matrix.
- Stable Button, IconButton, Input, Select, FormField, Surface, Card, StatusBadge, Metric, PageHeader and EmptyState primitives.
- Experimental motion and async-status components with reduced-motion support.
- Generated semantic token contract sourced from the accepted Product Planning revision.
- Self-hosted Noto Sans, Noto Sans Arabic and Handjet variable fonts.
- Core Design System Portal foundations, RTL/LTR guidance and light/dark runtime examples.
- Standard distributable package artifact with JavaScript, declarations and CSS exports.

### Fixed

- Storybook production styles and theme wiring.
- Canonical Core Blue, surface, border, spacing and radius values.
- Primary-button foreground contrast.
- Published package name and entrypoint documentation.
49 changes: 34 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,48 @@ Runtime implementation repository for the Core product-family design system.
- Product semantics, UX rules, token meaning and canonical design decisions live in `CoreLinkPlatform/product-planning/design/system`.
- This repository owns the runtime package, Storybook, tests, consumer intake and component lifecycle evidence.

## Architecture
## Package

The design system is intentionally maintained as one package:

```
@corelinkplatform/design-system
```

Install from GitHub Packages, then import the stable runtime:

The design system is intentionally maintained as a single package at this stage:
```tsx
import { Button, Card, PageHeader } from '@corelinkplatform/design-system';
import '@corelinkplatform/design-system/styles.css';
```

- `@coreplatform/design-system`
The root entry currently includes the runtime stylesheet for compatibility. The explicit CSS export is recommended so consumers document the dependency. Experimental motion styles are opt-in:

```ts
import '@corelinkplatform/design-system/experimental/styles.css';
```

Published artifacts contain compiled ESM, TypeScript declarations and runtime CSS under `dist/`.

## Architecture

```
src/
├── components
├── tokens
├── icons
├── themes
├── experimental
└── index.ts
```

## Design principles

- One package until independent release boundaries are justified.
- Shared semantic tokens instead of product-specific styling.
- Components consume the same brand, typography, icon and theme rules.
- Consumer jobs and evidence drive component scope.
- Product compositions stay in products until a reusable contract is proven.
- RTL/LTR, accessibility, themes and reduced motion are part of component quality.
- RTL/LTR, accessibility, themes and reduced motion are release quality.

## Component governance

Expand All @@ -39,21 +58,21 @@ src/
- [Decision log](docs/COMPONENT_DECISIONS.md)
- [Contribution guide](CONTRIBUTING.md)

Submit new needs through the **Component request** issue template. Requests begin as Proposed and do not become stable exports automatically.

## Development

Requirements:

- Node.js >= 22
- pnpm 10
Requires Node.js 22 or newer and pnpm 10.

```bash
pnpm install
pnpm build
pnpm storybook
pnpm install --frozen-lockfile
pnpm tokens:check
pnpm lint
pnpm test
pnpm package:check
pnpm storybook:build
```

`package:check` builds the distributable artifact, verifies every public export target and inspects the package tarball before publication.

## Status

Alpha foundation. Runtime implementation follows the canonical specification from product-planning and the evidence-backed maturity process in this repository.
Alpha foundation. Runtime implementation follows the canonical Product Planning specification and the evidence-backed maturity process in this repository.
2 changes: 1 addition & 1 deletion docs/Welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Meta } from '@storybook/blocks';
<div className="core-docs__eyebrow">Core Platform · Runtime UI</div>
<h1 className="core-docs__title">One reliable interface language for industrial products.</h1>
<p className="core-docs__lede">Core Design System turns canonical product semantics into accessible React components, generated tokens and bilingual guidance for Core Console, Core Link and Core Signal.</p>
<p className="core-docs__meta">Runtime package: <code>@corelinkplatform/design-system</code> · v0.1.0-alpha.4</p>
<p className="core-docs__meta">Runtime package: <code>@corelinkplatform/design-system</code> · v0.1.0-alpha.5</p>
</header>

<div className="core-docs__grid">
Expand Down
2 changes: 1 addition & 1 deletion docs/foundations/RuntimeEvidence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This portal documents the runtime implementation. It does not redefine canonical
| Accepted source revision | `069baefa4616b6b590ecde55fa09e99db124a148` |
| Token schema version | `1.1` |
| Runtime package | `@corelinkplatform/design-system` |
| Package version | `0.1.0-alpha.4` |
| Package version | `0.1.0-alpha.5` |
| Runtime source | `src/tokens/source.json` |
| Generated outputs | `src/tokens/semantic.css`, `src/tokens/generated.ts` |

Expand Down
40 changes: 30 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
{
"name": "@corelinkplatform/design-system",
"version": "0.1.0-alpha.5",
"description": "Runtime design system for the Core product family",
"type": "module",
"private": false,
"version": "0.1.0-alpha.4",
"packageManager": "pnpm@10.15.0",
"engines": {
"node": ">=22"
"files": ["dist", "README.md", "CHANGELOG.md"],
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./tokens": {
"types": "./dist/tokens/index.d.ts",
"import": "./dist/tokens/index.js",
"default": "./dist/tokens/index.js"
},
"./styles.css": "./dist/styles/index.css",
"./experimental/styles.css": "./dist/experimental/styles.css"
},
"sideEffects": ["**/*.css"],
"packageManager": "pnpm@10.15.0",
"engines": {"node": ">=22"},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
"registry": "https://npm.pkg.github.com",
"access": "restricted"
},
"scripts": {
"build": "tsc -b",
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
"build": "pnpm clean && tsc -p tsconfig.build.json && node scripts/copy-package-assets.mjs",
"lint": "eslint .",
"test": "vitest run --passWithNoTests",
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build",
"tokens:generate": "node scripts/generate-tokens.mjs",
"tokens:check": "node scripts/generate-tokens.mjs --check"
},
"peerDependencies": {
"react": ">=18"
"tokens:check": "node scripts/generate-tokens.mjs --check",
"package:check": "pnpm build && node scripts/check-package.mjs && npm pack --dry-run"
},
"peerDependencies": {"react": ">=18"},
"dependencies": {
"@fontsource-variable/handjet": "^5.2.8",
"@fontsource-variable/noto-sans": "^5.2.8",
Expand Down
24 changes: 24 additions & 0 deletions scripts/check-package.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { access, readFile } from 'node:fs/promises';
import { stdout } from 'node:process';

const manifest = JSON.parse(await readFile('package.json', 'utf8'));
const required = [
manifest.exports['.'].import,
manifest.exports['.'].types,
manifest.exports['./styles.css'],
manifest.exports['./experimental/styles.css'],
];

for (const path of required) {
await access(path);
}

if (manifest.name !== '@corelinkplatform/design-system') {
throw new Error(`Unexpected package name: ${manifest.name}`);
}

if (!manifest.version.endsWith('alpha.5')) {
throw new Error(`Unexpected release version: ${manifest.version}`);
}

stdout.write(`Package contract verified for ${manifest.name}@${manifest.version}\n`);
18 changes: 18 additions & 0 deletions scripts/copy-package-assets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { cp, mkdir } from 'node:fs/promises';

const assetDirectories = ['fonts', 'styles'];
const assetFiles = [
['tokens/semantic.css', 'tokens/semantic.css'],
['experimental/styles.css', 'experimental/styles.css'],
];

await mkdir('dist', { recursive: true });

for (const directory of assetDirectories) {
await cp(`src/${directory}`, `dist/${directory}`, { recursive: true });
}

for (const [source, destination] of assetFiles) {
await mkdir(`dist/${destination.split('/').slice(0, -1).join('/')}`, { recursive: true });
await cp(`src/${source}`, `dist/${destination}`);
}
2 changes: 1 addition & 1 deletion src/components/EmptyState.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { HTMLAttributes, ReactNode } from 'react';

export interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {
export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
title: ReactNode;
description?: ReactNode;
icon?: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { HTMLAttributes, ReactNode } from 'react';

export interface PageHeaderProps extends HTMLAttributes<HTMLElement> {
export interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
title: ReactNode;
description?: ReactNode;
eyebrow?: ReactNode;
Expand Down
17 changes: 17 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"rootDir": "src",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"jsx": "react-jsx"
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/*.stories.tsx", "src/**/*.test.ts", "src/**/*.test.tsx"]
}
Loading