one-north-cla 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/README.md ADDED
@@ -0,0 +1,144 @@
1
+ # OneNorthCLA - Component Library Architecture
2
+
3
+ A modern React component UI library built with TypeScript, Vite, and TailwindCSS.
4
+
5
+ ## 🀝 Contributing
6
+
7
+ The following configurations have been carefully established to ensure code quality, consistency, and reliable automated checks across this repository.
8
+
9
+ **Do not modify these configurations without explicit agreement from the team lead or repository owner:**
10
+
11
+ - Husky hooks (.husky/)
12
+ - ESLint configuration (eslint.config.js)
13
+ - Prettier rules (.prettierrc / package.json)
14
+ - TypeScript configuration (tsconfig*.json)
15
+
16
+ Unauthorized changes may break automated checks, introduce inconsistencies, or disrupt development workflows.
17
+
18
+ 1. Follow the established component patterns
19
+ 2. Add Storybook stories for new components
20
+ 3. Ensure TypeScript compilation passes
21
+ 4. Update documentation as needed within the `docs/` directory
22
+
23
+ ## πŸš€ Quick Start
24
+
25
+ ```bash
26
+ # Install dependencies
27
+ npm install
28
+
29
+ # Start development server
30
+ npm run dev
31
+
32
+ # Start Storybook
33
+ npm run storybook
34
+
35
+ # Build for production
36
+ npm run build
37
+ ```
38
+
39
+ ## πŸ“ Project Structure
40
+
41
+ ```
42
+ OneNorthCLA/
43
+ β”œβ”€β”€ src/
44
+ β”‚ β”œβ”€β”€ components/
45
+ β”‚ β”‚ β”œβ”€β”€ composites/
46
+ β”‚ β”‚ β”‚ β”œβ”€β”€ ContentCarouselMultiple/
47
+ β”‚ β”‚ β”‚ └──ContentPrimaryFeatureDetail/
48
+ β”‚ β”‚ └── foundations/
49
+ β”‚ β”‚ β”œβ”€β”€ BackgroundVideo/
50
+ β”‚ β”‚ β”œβ”€β”€ Button/
51
+ β”‚ β”‚ β”œβ”€β”€ ButtonSocial/
52
+ β”‚ β”‚ β”œβ”€β”€ PageMargins/
53
+ β”‚ β”‚ β”œβ”€β”€ PlayButton/
54
+ β”‚ β”‚ β”œβ”€β”€ Share/
55
+ β”‚ β”‚ └── TextCta/
56
+ β”‚ β”œβ”€β”€ lib/ # Utilities and helpers
57
+ β”‚ β”‚ β”œβ”€β”€ hooks/
58
+ β”‚ β”‚ └── utils/
59
+ β”‚ └── assets/ # Static assets
60
+ └── public/ # Public assets
61
+ ```
62
+
63
+ ## πŸ—οΈ Architecture Overview
64
+
65
+ ### Component Separation
66
+
67
+ This project follows a clean architecture pattern that separates concerns:
68
+
69
+ - **Base Components** (`src/components/`): Pure React components with no Sitecore dependencies
70
+ - **Utilities** (`src/lib/`): Shared utilities, hooks, and the component factory
71
+
72
+ ### Key Design Principles
73
+
74
+ 1. **Separation of Concerns**: Base components are framework-agnostic
75
+ 2. **Composition over Inheritance**: Components are designed to be composable
76
+ 3. **Type Safety**: Full TypeScript support throughout the codebase
77
+ 4. **Storybook Integration**: Comprehensive documentation and testing via Storybook
78
+
79
+ ## 🧩 Available Components
80
+
81
+ ## πŸ› οΈ Development
82
+
83
+ ### Prerequisites
84
+
85
+ - Node.js 18+
86
+ - Any package manager
87
+ - Do not commit lockfile
88
+
89
+ ### Scripts
90
+
91
+ ```bash
92
+ # Development
93
+ npm run dev # Start Vite dev server
94
+ npm run storybook # Start Storybook
95
+
96
+ # Building
97
+ npm run build # Build for production
98
+ npm run build-storybook # Build Storybook
99
+
100
+ # Quality
101
+ npm run lint # Run ESLint
102
+ npm run preview # Preview production build
103
+ npm run type-check # Run TSC
104
+ ```
105
+
106
+ ### Adding New Components
107
+
108
+ 1. **Create Base Component**:
109
+ ```bash
110
+ mkdir src/components/NewComponent
111
+ touch src/components/NewComponent/index.ts
112
+ touch src/components/NewComponent/NewComponent.tsx
113
+ touch src/components/NewComponent/NewComponent.stories.tsx
114
+ ```
115
+
116
+ 2. **Update Exports**:
117
+ - Add to `src/components/index.ts`
118
+
119
+ ## πŸ“š Documentation
120
+
121
+ - **Storybook**: Run `npm run storybook` for interactive component documentation
122
+ - **TypeScript**: Full type definitions for all components
123
+
124
+ ## πŸ”§ Configuration
125
+
126
+ ### Vite Configuration
127
+ - React with Fast Refresh
128
+ - TypeScript support
129
+ - SVG imports as React components
130
+ - Tailwind CSS integration
131
+
132
+ ### ESLint Configuration
133
+ - TypeScript-aware linting
134
+ - React-specific rules
135
+ - Storybook integration
136
+
137
+ ### Storybook Configuration
138
+ - Component documentation
139
+ - Interactive examples
140
+ - Preview example usage as code
141
+
142
+ ## πŸ“„ License
143
+
144
+ This project is private and proprietary to OneNorth.