tcce-design-system 0.1.1
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 +204 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total.ai +2795 -7
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total.pdf +2950 -10
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_AW.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_CB.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_CBT.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_CC.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_M.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_NT.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_AW.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_AW.webp:Zone.Identifier +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CB.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CB.webp:Zone.Identifier +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CBT.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CBT.webp:Zone.Identifier +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CC.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CC.webp:Zone.Identifier +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_M.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_M.webp:Zone.Identifier +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_NT.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_NT.webp:Zone.Identifier +0 -0
- package/dist/assets/brand/favicon.svg +7 -0
- package/dist/assets/fonts/Dax-Bold/Dax-Bold.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBlack.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBlackItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBold.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBoldItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueHeavy.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueHeavyItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueItalic.ttf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueLight.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueLightItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueMedium.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueMediumItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueRoman.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueThin.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueThinItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueUltraLight.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueUltraLightItalic.otf +0 -0
- package/dist/assets/fonts/dax-regular/dax-regular.ttf +0 -0
- package/dist/tcce-design-system-components.css +1 -0
- package/dist/tcce-design-system-components.d.ts +1069 -0
- package/dist/tcce-design-system-components.js +10469 -0
- package/dist/tcce-design-system-components.umd.cjs +1655 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# TCCE Design System
|
|
2
|
+
|
|
3
|
+
Library repository for the TCCE CRM Design System. This package provides reusable UI components built with React, TypeScript, and Tailwind CSS to ensure consistency across all CRM frontend applications.
|
|
4
|
+
|
|
5
|
+
## 📋 Prerequisites
|
|
6
|
+
|
|
7
|
+
Before getting started, ensure you have the following installed on your system:
|
|
8
|
+
|
|
9
|
+
- **Node.js** (v18 or higher) - [Download here](https://nodejs.org/)
|
|
10
|
+
- **pnpm** (v8 or higher) - [Installation guide](https://pnpm.io/installation)
|
|
11
|
+
- **Docker** (v20 or higher) - [Download here](https://www.docker.com/get-started)
|
|
12
|
+
- **Git** - [Download here](https://git-scm.com/)
|
|
13
|
+
|
|
14
|
+
## 🚀 Quick Start
|
|
15
|
+
|
|
16
|
+
### Option 1: Using Docker (Recommended)
|
|
17
|
+
|
|
18
|
+
The easiest way to get started is using Docker, which ensures a consistent environment across all systems.
|
|
19
|
+
|
|
20
|
+
#### 1. Clone the repository
|
|
21
|
+
```bash
|
|
22
|
+
git clone <repository-url>
|
|
23
|
+
cd tcce-design-system
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### 2. Build the Docker image
|
|
27
|
+
```bash
|
|
28
|
+
# Build the image
|
|
29
|
+
docker build -t tcce-design-system .
|
|
30
|
+
|
|
31
|
+
# Or use the npm script
|
|
32
|
+
npm run docker:build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### 3. Run the container
|
|
36
|
+
```bash
|
|
37
|
+
# Run with volume mounting for development
|
|
38
|
+
docker run -it --rm -p 6006:6006 --name tcce-design-system \
|
|
39
|
+
-v $(pwd):/usr/src/app \
|
|
40
|
+
-v /usr/src/app/node_modules \
|
|
41
|
+
tcce-design-system
|
|
42
|
+
|
|
43
|
+
# Or use the npm script
|
|
44
|
+
npm run docker:run
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### 4. Access the application
|
|
48
|
+
- **Storybook**: Open [http://localhost:6006](http://localhost:6006) in your browser
|
|
49
|
+
- The container will automatically start Storybook in development mode
|
|
50
|
+
|
|
51
|
+
### Option 2: Local Development
|
|
52
|
+
|
|
53
|
+
If you prefer to run the project locally without Docker:
|
|
54
|
+
|
|
55
|
+
#### 1. Install dependencies
|
|
56
|
+
```bash
|
|
57
|
+
# Install pnpm globally if not already installed
|
|
58
|
+
npm install -g pnpm
|
|
59
|
+
|
|
60
|
+
# Install project dependencies
|
|
61
|
+
pnpm install
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### 2. Start development server
|
|
65
|
+
```bash
|
|
66
|
+
# Start Storybook for component development
|
|
67
|
+
pnpm run storybook
|
|
68
|
+
|
|
69
|
+
# Or start Vite development server
|
|
70
|
+
pnpm run dev
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### 3. Access the application
|
|
74
|
+
- **Storybook**: [http://localhost:6006](http://localhost:6006)
|
|
75
|
+
- **Vite Dev Server**: [http://localhost:5173](http://localhost:5173)
|
|
76
|
+
|
|
77
|
+
## 🛠️ Development
|
|
78
|
+
|
|
79
|
+
### Available Scripts
|
|
80
|
+
|
|
81
|
+
| Command | Description |
|
|
82
|
+
|---------|-------------|
|
|
83
|
+
| `pnpm run dev` | Start Vite development server |
|
|
84
|
+
| `pnpm run build` | Build the library for production |
|
|
85
|
+
| `pnpm run storybook` | Start Storybook development server |
|
|
86
|
+
| `pnpm run build-storybook` | Build static Storybook for deployment |
|
|
87
|
+
| `pnpm run preview` | Preview the production build |
|
|
88
|
+
| `pnpm run lint` | Run ESLint |
|
|
89
|
+
| `pnpm run lint:fix` | Fix ESLint issues automatically |
|
|
90
|
+
| `pnpm run format` | Format code with Prettier |
|
|
91
|
+
| `pnpm run docker:build` | Build Docker image |
|
|
92
|
+
| `pnpm run docker:run` | Run Docker container |
|
|
93
|
+
|
|
94
|
+
### Project Structure
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
tcce-design-system/
|
|
98
|
+
├── src/
|
|
99
|
+
│ ├── components/ # Reusable UI components
|
|
100
|
+
│ ├── types/ # TypeScript type definitions
|
|
101
|
+
│ ├── main.ts # Library entry point
|
|
102
|
+
│ └── globals.css # Global styles
|
|
103
|
+
├── .storybook/ # Storybook configuration
|
|
104
|
+
├── dist/ # Built library output
|
|
105
|
+
├── dockerfile # Docker configuration
|
|
106
|
+
├── package.json # Dependencies and scripts
|
|
107
|
+
└── vite.config.ts # Vite build configuration
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Adding New Components
|
|
111
|
+
|
|
112
|
+
1. Create your component in `src/components/`
|
|
113
|
+
2. Add corresponding Storybook stories (`.stories.tsx` files)
|
|
114
|
+
3. Export the component from `src/main.ts`
|
|
115
|
+
4. Test your component in Storybook
|
|
116
|
+
|
|
117
|
+
### Code Quality
|
|
118
|
+
|
|
119
|
+
This project uses:
|
|
120
|
+
- **ESLint** for code linting
|
|
121
|
+
- **Prettier** for code formatting
|
|
122
|
+
- **TypeScript** for type safety
|
|
123
|
+
- **Tailwind CSS** for styling
|
|
124
|
+
|
|
125
|
+
Run `pnpm run lint:fix` and `pnpm run format` before committing changes.
|
|
126
|
+
|
|
127
|
+
## 🐳 Docker Configuration
|
|
128
|
+
|
|
129
|
+
### Dockerfile Details
|
|
130
|
+
|
|
131
|
+
The project includes a multi-stage Dockerfile optimized for production:
|
|
132
|
+
|
|
133
|
+
- **Base Image**: Node.js 24 Alpine (lightweight)
|
|
134
|
+
- **Package Manager**: pnpm (faster than npm/yarn)
|
|
135
|
+
- **Port**: 6006 (Storybook default)
|
|
136
|
+
- **Build Process**: Automated Storybook build
|
|
137
|
+
|
|
138
|
+
### Docker Commands Reference
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Build image
|
|
142
|
+
docker build -t tcce-design-system .
|
|
143
|
+
|
|
144
|
+
# Run container (development with volume mounting)
|
|
145
|
+
docker run -it --rm -p 6006:6006 --name tcce-design-system \
|
|
146
|
+
-v $(pwd):/usr/src/app \
|
|
147
|
+
-v /usr/src/app/node_modules \
|
|
148
|
+
tcce-design-system
|
|
149
|
+
|
|
150
|
+
# Run container (production)
|
|
151
|
+
docker run -d -p 6006:6006 --name tcce-design-system tcce-design-system
|
|
152
|
+
|
|
153
|
+
# Stop and remove container
|
|
154
|
+
docker stop tcce-design-system && docker rm tcce-design-system
|
|
155
|
+
|
|
156
|
+
# View container logs
|
|
157
|
+
docker logs tcce-design-system
|
|
158
|
+
|
|
159
|
+
# Execute commands in running container
|
|
160
|
+
docker exec -it tcce-design-system sh
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 📦 Building for Production
|
|
164
|
+
|
|
165
|
+
### Library Build
|
|
166
|
+
```bash
|
|
167
|
+
# Build the library
|
|
168
|
+
pnpm run build
|
|
169
|
+
|
|
170
|
+
# The built files will be in the `dist/` directory
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Storybook Build
|
|
174
|
+
```bash
|
|
175
|
+
# Build static Storybook
|
|
176
|
+
pnpm run build-storybook
|
|
177
|
+
|
|
178
|
+
# The static files will be in the `storybook-static/` directory
|
|
179
|
+
```
|
|
180
|
+
## 📝 License
|
|
181
|
+
|
|
182
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
183
|
+
|
|
184
|
+
## 👥 Team
|
|
185
|
+
|
|
186
|
+
- **Author**: BizAppsTotal <bizapps@tcce.biz>
|
|
187
|
+
- **Version**: 0.1.4
|
|
188
|
+
|
|
189
|
+
## 🆘 Troubleshooting
|
|
190
|
+
|
|
191
|
+
### Common Issues
|
|
192
|
+
|
|
193
|
+
**Docker build fails:**
|
|
194
|
+
- Ensure Docker is running
|
|
195
|
+
- Check if port 6006 is available
|
|
196
|
+
- Try rebuilding without cache: `docker build --no-cache -t tcce-design-system .`
|
|
197
|
+
|
|
198
|
+
**Storybook won't start:**
|
|
199
|
+
- Clear node_modules and reinstall: `rm -rf node_modules && pnpm install`
|
|
200
|
+
- Check if port 6006 is already in use
|
|
201
|
+
|
|
202
|
+
**Build errors:**
|
|
203
|
+
- Ensure all dependencies are installed: `pnpm install`
|
|
204
|
+
- Check TypeScript errors: `pnpm run build`
|