rechta-ds 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/config.json +11 -0
- package/.github/workflows/release.yml +53 -0
- package/.github/workflows/storybook.yml +34 -0
- package/.storybook/main.ts +17 -0
- package/.storybook/preview.ts +35 -0
- package/CHANGELOG.md +65 -0
- package/CONTRIBUTING.md +106 -0
- package/README.md +206 -0
- package/package.json +30 -0
- package/packages/tokens/build.js +357 -0
- package/packages/tokens/package.json +44 -0
- package/packages/tokens/src/tokens.json +1538 -0
- package/packages/ui/.storybook/main.ts +17 -0
- package/packages/ui/.storybook/preview.tsx +37 -0
- package/packages/ui/package.json +109 -0
- package/packages/ui/postcss.config.js +6 -0
- package/packages/ui/src/components/atoms/Avatar.tsx +139 -0
- package/packages/ui/src/components/atoms/Badge.tsx +62 -0
- package/packages/ui/src/components/atoms/Button.tsx +125 -0
- package/packages/ui/src/components/atoms/Input.tsx +116 -0
- package/packages/ui/src/components/atoms/Misc.tsx +128 -0
- package/packages/ui/src/components/atoms/Toggle.tsx +191 -0
- package/packages/ui/src/components/atoms/Typography.tsx +178 -0
- package/packages/ui/src/components/atoms/index.ts +7 -0
- package/packages/ui/src/components/charts/Charts.tsx +380 -0
- package/packages/ui/src/components/charts/DataTable.tsx +222 -0
- package/packages/ui/src/components/charts/index.ts +19 -0
- package/packages/ui/src/components/molecules/Accordion.tsx +93 -0
- package/packages/ui/src/components/molecules/Card.tsx +100 -0
- package/packages/ui/src/components/molecules/PricingCard.tsx +196 -0
- package/packages/ui/src/components/molecules/TestimonialCard.tsx +85 -0
- package/packages/ui/src/components/molecules/Tooltip.tsx +71 -0
- package/packages/ui/src/components/molecules/index.ts +5 -0
- package/packages/ui/src/components/organisms/FeatureTabs.tsx +196 -0
- package/packages/ui/src/components/organisms/LogoMarquee.tsx +119 -0
- package/packages/ui/src/components/organisms/Navbar.tsx +194 -0
- package/packages/ui/src/components/organisms/index.ts +3 -0
- package/packages/ui/src/index.ts +15 -0
- package/packages/ui/src/lib/utils.ts +12 -0
- package/packages/ui/src/stories/atoms/Avatar.stories.tsx +49 -0
- package/packages/ui/src/stories/atoms/Badge.stories.tsx +68 -0
- package/packages/ui/src/stories/atoms/Button.stories.tsx +98 -0
- package/packages/ui/src/stories/atoms/Input.stories.tsx +66 -0
- package/packages/ui/src/stories/atoms/Toggle.stories.tsx +36 -0
- package/packages/ui/src/stories/molecules/Accordion.stories.tsx +47 -0
- package/packages/ui/src/stories/molecules/Card.stories.tsx +84 -0
- package/packages/ui/src/stories/molecules/PricingCard.stories.tsx +62 -0
- package/packages/ui/src/stories/molecules/TestimonialCard.stories.tsx +52 -0
- package/packages/ui/src/stories/molecules/Tooltip.stories.tsx +66 -0
- package/packages/ui/src/stories/organisms/LogoMarquee.stories.tsx +33 -0
- package/packages/ui/src/stories/organisms/Navbar.stories.tsx +37 -0
- package/packages/ui/src/styles/globals.css +220 -0
- package/packages/ui/tailwind.config.ts +68 -0
- package/packages/ui/tsconfig.json +23 -0
- package/packages/ui/tsup.config.ts +24 -0
- package/packages/ui/vite.config.ts +17 -0
- package/pnpm-workspace.yaml +2 -0
- package/turbo.json +33 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [["@rechta/ui", "@rechta/tokens"]],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
name: Release
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
id-token: write
|
|
17
|
+
pull-requests: write
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
|
|
25
|
+
- name: Setup pnpm
|
|
26
|
+
uses: pnpm/action-setup@v4
|
|
27
|
+
with:
|
|
28
|
+
version: 9
|
|
29
|
+
|
|
30
|
+
- name: Setup Node.js
|
|
31
|
+
uses: actions/setup-node@v4
|
|
32
|
+
with:
|
|
33
|
+
node-version: 20
|
|
34
|
+
registry-url: 'https://registry.npmjs.org'
|
|
35
|
+
cache: 'pnpm'
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: pnpm install --frozen-lockfile
|
|
39
|
+
|
|
40
|
+
- name: Build packages
|
|
41
|
+
run: pnpm build
|
|
42
|
+
|
|
43
|
+
- name: Create Release PR or Publish
|
|
44
|
+
uses: changesets/action@v1
|
|
45
|
+
with:
|
|
46
|
+
publish: pnpm release
|
|
47
|
+
version: pnpm version-packages
|
|
48
|
+
commit: 'chore: version packages'
|
|
49
|
+
title: 'chore: version packages'
|
|
50
|
+
env:
|
|
51
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
52
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
53
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Storybook
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
storybook:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- uses: pnpm/action-setup@v4
|
|
16
|
+
with:
|
|
17
|
+
version: 9
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: 20
|
|
22
|
+
cache: 'pnpm'
|
|
23
|
+
|
|
24
|
+
- run: pnpm install --frozen-lockfile
|
|
25
|
+
|
|
26
|
+
- run: pnpm build
|
|
27
|
+
|
|
28
|
+
- run: pnpm --filter @rechta/ui build-storybook
|
|
29
|
+
|
|
30
|
+
- name: Deploy to Chromatic
|
|
31
|
+
uses: chromaui/action@v11
|
|
32
|
+
with:
|
|
33
|
+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
34
|
+
storybookBuildDir: packages/ui/storybook-static
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ['../src/stories/**/*.stories.@(ts|tsx)'],
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@storybook/addon-interactions',
|
|
8
|
+
'@storybook/addon-links',
|
|
9
|
+
],
|
|
10
|
+
framework: {
|
|
11
|
+
name: '@storybook/react-vite',
|
|
12
|
+
options: {},
|
|
13
|
+
},
|
|
14
|
+
docs: { autodocs: 'tag' },
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default config;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Preview } from '@storybook/react';
|
|
2
|
+
import '../packages/ui/src/styles/globals.css'; // tokens + global styles
|
|
3
|
+
|
|
4
|
+
const preview: Preview = {
|
|
5
|
+
parameters: {
|
|
6
|
+
backgrounds: {
|
|
7
|
+
default: 'dark',
|
|
8
|
+
values: [
|
|
9
|
+
{ name: 'dark', value: '#000000' },
|
|
10
|
+
{ name: 'light', value: '#FFFFFC' },
|
|
11
|
+
{ name: 'surface', value: '#111111' },
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
layout: 'centered',
|
|
15
|
+
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
16
|
+
controls: {
|
|
17
|
+
matchers: {
|
|
18
|
+
color: /(background|color)$/i,
|
|
19
|
+
date: /Date$/i,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
decorators: [
|
|
24
|
+
(Story, context) => {
|
|
25
|
+
const theme = context.globals?.backgrounds?.value === '#FFFFFC' ? 'light' : 'dark';
|
|
26
|
+
return (
|
|
27
|
+
<div data-theme={theme} style={{ padding: '2rem', minHeight: '100vh' }}>
|
|
28
|
+
<Story />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default preview;
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Rechta Design System packages are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [2.1.0] — 2026-03-12
|
|
11
|
+
|
|
12
|
+
### Added — `@rechta/tokens`
|
|
13
|
+
- Complete semantic token system: dark + light modes for bg, surface, border, text, brand, emerald, blue, status
|
|
14
|
+
- New `glow-brand`, `glow-brand-lg`, `glow-blue`, `glow-emerald` shadow tokens
|
|
15
|
+
- Spring easing curve (`cubic-bezier(0.34, 1.56, 0.64, 1)`) added to transition tokens
|
|
16
|
+
- `--radius-*` custom properties now exported as CSS variables
|
|
17
|
+
|
|
18
|
+
### Changed — `@rechta/ui`
|
|
19
|
+
- `Button`: migrated to `--c-*` CSS variable token system; Ruda 900 display font for xl size
|
|
20
|
+
- `Badge`: now uses `font-mono` for labels; all WCAG AA contrast ratios verified
|
|
21
|
+
- `Card`: new `glass`, `brand`, `outline`, `ghost` variants; `glow` prop for brand/accent shadows
|
|
22
|
+
- `Input`: new `leftElement`/`rightElement` slots replacing `prefix`/`suffix` strings
|
|
23
|
+
- `Toggle`: now wraps `@radix-ui/react-switch` for full a11y compliance
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- Focus ring offset now respects `--c-bg` so it renders correctly on any background
|
|
27
|
+
- Dark-mode `disabled` state opacity corrected to 40% (was 50%)
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [2.0.0] — 2026-01-20
|
|
32
|
+
|
|
33
|
+
### Breaking
|
|
34
|
+
- Renamed all CSS variables from `--rechta-*` to `--c-*` (shorter, production-ready)
|
|
35
|
+
- `Badge` `size` prop removed — height is now fixed at 22px (use font-size utilities)
|
|
36
|
+
- `Card` `interactive` prop replaced by `hover` boolean
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
- Light theme full token set (`[data-theme="light"]`)
|
|
40
|
+
- `PricingCard`, `TestimonialCard`, `LogoMarquee`, `FeatureTabs` organisms
|
|
41
|
+
- Storybook 8 migration with autodocs
|
|
42
|
+
- `tsup` build pipeline replacing rollup
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [1.4.2] — 2025-11-08
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
- `Accordion` animation direction corrected in Safari
|
|
50
|
+
- `Tooltip` z-index updated to use `--z-tooltip` (700)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## [1.4.0] — 2025-10-15
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- `@rechta/tokens` published as standalone package
|
|
58
|
+
- Figma Tokens JSON export at `packages/figma/tokens.json`
|
|
59
|
+
- `Charts` + `DataTable` components (recharts-based)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## [1.0.0] — 2025-07-01
|
|
64
|
+
|
|
65
|
+
Initial public release of `@rechta/ui`.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Contributing to Rechta DS
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing! This document walks you through the development workflow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
**Prerequisites:** Node.js ≥ 18, pnpm ≥ 9
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/your-org/rechta-ds.git
|
|
13
|
+
cd rechta-ds
|
|
14
|
+
pnpm install
|
|
15
|
+
pnpm build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Development workflow
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Start Storybook with hot-reload
|
|
24
|
+
pnpm storybook
|
|
25
|
+
|
|
26
|
+
# Watch tokens + UI simultaneously
|
|
27
|
+
pnpm dev
|
|
28
|
+
|
|
29
|
+
# Type-check everything
|
|
30
|
+
pnpm --filter @rechta/ui typecheck
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Adding a new component
|
|
36
|
+
|
|
37
|
+
1. **Choose the right level:**
|
|
38
|
+
- `atoms/` — single-purpose, no composed children (Button, Badge, Input)
|
|
39
|
+
- `molecules/` — composed from 2+ atoms (Card, Accordion, Tooltip)
|
|
40
|
+
- `organisms/` — page-level sections (Navbar, FeatureTabs)
|
|
41
|
+
|
|
42
|
+
2. **Create the component file:**
|
|
43
|
+
```
|
|
44
|
+
packages/ui/src/components/{level}/MyComponent.tsx
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. **Export from barrel:**
|
|
48
|
+
```ts
|
|
49
|
+
// packages/ui/src/components/{level}/index.ts
|
|
50
|
+
export * from './MyComponent';
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
4. **Write a story:**
|
|
54
|
+
```
|
|
55
|
+
packages/ui/src/stories/{level}/MyComponent.stories.tsx
|
|
56
|
+
```
|
|
57
|
+
Every story file must export: `Default` + at least one variant/state story.
|
|
58
|
+
|
|
59
|
+
5. **Token usage:** Always use `--c-*` CSS variables, never hardcoded hex values.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Token changes
|
|
64
|
+
|
|
65
|
+
Token changes belong in `packages/tokens/src/tokens.json`. After editing:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pnpm --filter @rechta/tokens build
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This regenerates `dist/tokens.css`, `dist/index.js`, and `dist/tailwind.config.js`.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Versioning
|
|
76
|
+
|
|
77
|
+
This project uses [Changesets](https://github.com/changesets/changesets).
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pnpm changeset # describe what changed (follow prompts)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- **patch** — bug fix, no API change
|
|
84
|
+
- **minor** — new component or non-breaking feature
|
|
85
|
+
- **major** — breaking API change
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Commit conventions
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
feat(button): add xl icon size
|
|
93
|
+
fix(badge): correct dark-mode contrast ratio
|
|
94
|
+
docs(readme): update quick-start example
|
|
95
|
+
chore: bump turbo to 2.2.0
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Code style
|
|
101
|
+
|
|
102
|
+
- TypeScript strict mode
|
|
103
|
+
- `React.forwardRef` on all leaf components
|
|
104
|
+
- `displayName` set on every component
|
|
105
|
+
- Prefer `cva` for variant logic (class-variance-authority)
|
|
106
|
+
- Use `cn()` from `lib/utils` for conditional classes
|
package/README.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Rechta Design System
|
|
2
|
+
|
|
3
|
+
> **Malachite × Porcelain** — a dark-first React component library built on shadcn/ui + Radix UI
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@rechta/ui)
|
|
6
|
+
[](https://www.npmjs.com/package/@rechta/tokens)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Packages
|
|
12
|
+
|
|
13
|
+
| Package | Version | Description |
|
|
14
|
+
|---------|---------|-------------|
|
|
15
|
+
| [`@rechta/ui`](./packages/ui) | `2.1.0` | React component library (atoms, molecules, organisms) |
|
|
16
|
+
| [`@rechta/tokens`](./packages/tokens) | `2.1.0` | Design tokens — CSS variables, Tailwind config, JSON |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
### Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# pnpm (recommended)
|
|
26
|
+
pnpm add @rechta/ui @rechta/tokens
|
|
27
|
+
|
|
28
|
+
# npm
|
|
29
|
+
npm install @rechta/ui @rechta/tokens
|
|
30
|
+
|
|
31
|
+
# yarn
|
|
32
|
+
yarn add @rechta/ui @rechta/tokens
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Configure Tailwind
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
// tailwind.config.js
|
|
39
|
+
import rechta from '@rechta/tokens/tailwind';
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
presets: [rechta],
|
|
43
|
+
content: [
|
|
44
|
+
'./src/**/*.{ts,tsx}',
|
|
45
|
+
'./node_modules/@rechta/ui/dist/**/*.js',
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Add global CSS
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
// app/layout.tsx (or your root file)
|
|
54
|
+
import '@rechta/tokens/css';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This imports the CSS custom properties for both `[data-theme="dark"]` (default) and `[data-theme="light"]`.
|
|
58
|
+
|
|
59
|
+
### Set your theme
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
<html data-theme="dark"> {/* dark (default) */}
|
|
63
|
+
<html data-theme="light"> {/* light */}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Use components
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import { Button, Badge, Card } from '@rechta/ui';
|
|
70
|
+
// or import tree-shakeable sub-paths:
|
|
71
|
+
import { Button } from '@rechta/ui/atoms';
|
|
72
|
+
import { PricingCard } from '@rechta/ui/molecules';
|
|
73
|
+
|
|
74
|
+
export default function App() {
|
|
75
|
+
return (
|
|
76
|
+
<Card variant="raised" glow="brand">
|
|
77
|
+
<Badge variant="brand" dot>Active</Badge>
|
|
78
|
+
<Button leftIcon={<Plus />}>Create link</Button>
|
|
79
|
+
</Card>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Component inventory
|
|
87
|
+
|
|
88
|
+
### Atoms
|
|
89
|
+
| Component | Description |
|
|
90
|
+
|-----------|-------------|
|
|
91
|
+
| `Button` | 9 variants × 8 sizes — brand, emerald, blue, porcelain, secondary, ghost, outline, destructive, link |
|
|
92
|
+
| `Badge` | 12 variants, optional dot indicator, mono font |
|
|
93
|
+
| `Input` | Left/right element slots, 3 sizes, 4 states |
|
|
94
|
+
| `Textarea` | Resizable, same states as Input |
|
|
95
|
+
| `Toggle` | Radix Switch — fully accessible |
|
|
96
|
+
| `Avatar` | 5 sizes, image + initials fallback |
|
|
97
|
+
| `Typography` | Display, heading, body, caption, mono presets |
|
|
98
|
+
| `Skeleton` | Animated shimmer loading placeholder |
|
|
99
|
+
| `Divider` | With optional label |
|
|
100
|
+
| `Spinner` | Brand-colored loading indicator |
|
|
101
|
+
|
|
102
|
+
### Molecules
|
|
103
|
+
| Component | Description |
|
|
104
|
+
|-----------|-------------|
|
|
105
|
+
| `Card` | 8 variants, hover, glow, padding props |
|
|
106
|
+
| `Accordion` | Radix-based, single/multiple open modes |
|
|
107
|
+
| `PricingCard` | With popular callout, feature list |
|
|
108
|
+
| `TestimonialCard` | Quote, avatar, attribution |
|
|
109
|
+
| `Tooltip` | Radix tooltip, all 4 sides |
|
|
110
|
+
|
|
111
|
+
### Organisms
|
|
112
|
+
| Component | Description |
|
|
113
|
+
|-----------|-------------|
|
|
114
|
+
| `Navbar` | With announcement banner, nav links, CTA |
|
|
115
|
+
| `LogoMarquee` | Auto-scrolling logo marquee |
|
|
116
|
+
| `FeatureTabs` | Animated tab-based feature showcase |
|
|
117
|
+
|
|
118
|
+
### Charts
|
|
119
|
+
| Component | Description |
|
|
120
|
+
|-----------|-------------|
|
|
121
|
+
| `AreaChart` | Recharts-based, brand-colored |
|
|
122
|
+
| `BarChart` | Grouped / stacked |
|
|
123
|
+
| `DataTable` | Sortable, filterable table |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Token system
|
|
128
|
+
|
|
129
|
+
All components use CSS custom properties (`--c-*`) so they respond to theme changes without re-rendering.
|
|
130
|
+
|
|
131
|
+
```css
|
|
132
|
+
/* Brand */
|
|
133
|
+
--c-brand /* #09E85E malachite */
|
|
134
|
+
--c-brand-hover /* #0CF568 */
|
|
135
|
+
--c-brand-active /* #07C44F */
|
|
136
|
+
--c-brand-focus /* rgba(9,232,94,0.25) */
|
|
137
|
+
--c-brand-subtle /* rgba(9,232,94,0.08) */
|
|
138
|
+
|
|
139
|
+
/* Surfaces */
|
|
140
|
+
--c-bg /* root canvas */
|
|
141
|
+
--c-bg-surface /* card default */
|
|
142
|
+
--c-bg-elevated /* modal/popover */
|
|
143
|
+
|
|
144
|
+
/* Text */
|
|
145
|
+
--c-text /* primary — 21:1 */
|
|
146
|
+
--c-text-2 /* secondary — 9.2:1 */
|
|
147
|
+
--c-text-3 /* tertiary — 5.7:1 */
|
|
148
|
+
|
|
149
|
+
/* Borders */
|
|
150
|
+
--c-border /* default */
|
|
151
|
+
--c-border-mid /* hover */
|
|
152
|
+
--c-border-strong /* focus/pressed */
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Full token reference: [`packages/tokens/src/tokens.json`](./packages/tokens/src/tokens.json)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Development
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Install dependencies
|
|
163
|
+
pnpm install
|
|
164
|
+
|
|
165
|
+
# Build all packages
|
|
166
|
+
pnpm build
|
|
167
|
+
|
|
168
|
+
# Start Storybook
|
|
169
|
+
pnpm storybook
|
|
170
|
+
|
|
171
|
+
# Watch mode (for UI package)
|
|
172
|
+
pnpm --filter @rechta/ui dev
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Creating a changeset (for release)
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pnpm changeset # describe your changes
|
|
179
|
+
pnpm version-packages # bump versions
|
|
180
|
+
pnpm release # build + publish to npm
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Publishing to npm
|
|
186
|
+
|
|
187
|
+
1. Set `NPM_TOKEN` in your GitHub repository secrets
|
|
188
|
+
2. Set `CHROMATIC_PROJECT_TOKEN` for Storybook visual testing (optional)
|
|
189
|
+
3. Push to `main` — the Release workflow will open a Version PR
|
|
190
|
+
4. Merge the Version PR — packages are automatically published
|
|
191
|
+
|
|
192
|
+
Manual publish:
|
|
193
|
+
```bash
|
|
194
|
+
pnpm build
|
|
195
|
+
pnpm release # runs: changeset publish
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Contributing
|
|
201
|
+
|
|
202
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
203
|
+
|
|
204
|
+
## License
|
|
205
|
+
|
|
206
|
+
MIT © Rechta Technologies
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rechta-ds",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"description": "Rechta Design System — monorepo",
|
|
6
|
+
"workspaces": [
|
|
7
|
+
"packages/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "turbo build",
|
|
11
|
+
"dev": "turbo dev",
|
|
12
|
+
"lint": "turbo lint",
|
|
13
|
+
"test": "turbo test",
|
|
14
|
+
"storybook": "turbo storybook",
|
|
15
|
+
"build-storybook": "turbo build-storybook",
|
|
16
|
+
"clean": "turbo clean && find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
|
|
17
|
+
"changeset": "changeset",
|
|
18
|
+
"version-packages": "changeset version",
|
|
19
|
+
"release": "turbo build && changeset publish"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@changesets/cli": "^2.27.1",
|
|
23
|
+
"turbo": "^2.1.2"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18.0.0",
|
|
27
|
+
"pnpm": ">=9.0.0"
|
|
28
|
+
},
|
|
29
|
+
"packageManager": "pnpm@9.12.0"
|
|
30
|
+
}
|