From 20757e8dbf61cdb36e55071bb97b08644f202f97 Mon Sep 17 00:00:00 2001 From: Troy Chaplin Date: Fri, 23 Jan 2026 10:47:04 -0500 Subject: [PATCH 1/3] add: docs --- docs/ARCHITECTURE.md | 398 +++++++++++++++++++ docs/COMPONENTS.md | 897 +++++++++++++++++++++++++++++++++++++++++++ docs/CONTRIBUTING.md | 579 ++++++++++++++++++++++++++++ docs/FORMS.md | 891 ++++++++++++++++++++++++++++++++++++++++++ docs/GUTENBERG.md | 844 ++++++++++++++++++++++++++++++++++++++++ docs/IMPROVEMENTS.md | 482 +++++++++++++++++++++++ docs/LAYOUTS.md | 601 +++++++++++++++++++++++++++++ docs/MIGRATION.md | 831 +++++++++++++++++++++++++++++++++++++++ docs/README.md | 124 ++++++ docs/STYLING.md | 632 ++++++++++++++++++++++++++++++ docs/TESTING.md | 854 ++++++++++++++++++++++++++++++++++++++++ docs/UTILITIES.md | 890 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 8023 insertions(+) create mode 100644 docs/ARCHITECTURE.md create mode 100644 docs/COMPONENTS.md create mode 100644 docs/CONTRIBUTING.md create mode 100644 docs/FORMS.md create mode 100644 docs/GUTENBERG.md create mode 100644 docs/IMPROVEMENTS.md create mode 100644 docs/LAYOUTS.md create mode 100644 docs/MIGRATION.md create mode 100644 docs/README.md create mode 100644 docs/STYLING.md create mode 100644 docs/TESTING.md create mode 100644 docs/UTILITIES.md diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 000000000..b12cd5fdd --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,398 @@ +# Architecture + +This document describes the system architecture, project structure, and build process for the Raven Design System. + +## Table of Contents + +- [Project Structure](#project-structure) +- [Build System](#build-system) +- [Module System](#module-system) +- [Component Architecture](#component-architecture) +- [Dependency Management](#dependency-management) +- [Configuration Files](#configuration-files) + +## Project Structure + +``` +rds/ +├── lib/ # Source code +│ ├── components/ # 51 UI components +│ │ ├── Alert/ +│ │ │ ├── Alert.tsx # Component implementation +│ │ │ ├── Alert.stories.tsx # Storybook stories +│ │ │ └── styles.css # Component styles +│ │ └── ... +│ ├── layouts/ # 10 layout components +│ ├── data/ # Sample data for stories (26 files) +│ ├── helpers/ # Validation schemas, utilities +│ ├── hooks/ # Custom React hooks (3 hooks) +│ ├── styles/ # Global CSS files +│ ├── utils/ # Utility functions and prop classes +│ ├── docs/ # Storybook MDX documentation +│ ├── main.ts # Main export barrel file +│ └── style.css # Primary CSS entry point +│ +├── .storybook/ # Storybook configuration +│ ├── main.ts # Main config +│ └── preview.ts # Preview config +│ +├── cypress/ # E2E and component tests +│ ├── e2e/ # E2E test files +│ ├── fixtures/ # Test fixtures +│ └── support/ # Test helpers +│ +├── public/ # Static assets +│ ├── assets/ +│ │ ├── font-awesome/ # Icons +│ │ └── bg-images/ # Background images +│ └── sample-imgs/ # Sample images for demos +│ +├── dist/ # Build output (generated) +│ ├── rds.es.js # ES module bundle +│ ├── rds.umd.js # UMD bundle +│ ├── main.d.ts # TypeScript declarations +│ └── style.css # Compiled CSS +│ +└── Configuration files + ├── vite.config.ts # Vite/Rollup configuration + ├── tailwind.config.ts # Tailwind CSS configuration + ├── tsconfig.json # TypeScript configuration + ├── eslint.config.mjs # ESLint configuration + ├── .prettierrc # Prettier configuration + ├── cypress.config.ts # Cypress configuration + └── package.json # Dependencies and scripts +``` + +## Build System + +### Vite + Rollup + +The library uses Vite 6.3 with Rollup for production builds. + +**Key Configuration** (`vite.config.ts`): + +```typescript +export default defineConfig({ + plugins: [react(), dts({ rollupTypes: true })], + build: { + lib: { + entry: resolve(__dirname, 'lib/main.ts'), + name: 'rds', + formats: ['es', 'umd'], + fileName: (format) => `rds.${format}.js`, + }, + rollupOptions: { + external: [/* all dependencies externalized */], + output: { + globals: { + react: 'React', + 'react-dom': 'ReactDOM', + // ... other globals + }, + }, + }, + }, +}) +``` + +### Build Outputs + +| Output | Format | Use Case | +|--------|--------|----------| +| `dist/rds.es.js` | ES Modules | Modern bundlers (Vite, webpack 5+) | +| `dist/rds.umd.js` | UMD | Browser `