@manojkmfsi/monodog 1.1.37 → 1.1.39

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.
Files changed (200) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/monodog-dashboard/dist/assets/index-C08ciT3A.js +20 -0
  3. package/monodog-dashboard/dist/assets/index-C08ciT3A.js.map +1 -0
  4. package/monodog-dashboard/dist/assets/index-Dc2vaUOq.css +1 -0
  5. package/monodog-dashboard/{index.html → dist/index.html} +2 -1
  6. package/monodog-dashboard/package.json +0 -3
  7. package/package.json +2 -2
  8. package/monodog-dashboard/THEME_SYSTEM.md +0 -309
  9. package/monodog-dashboard/__tests__/AuthCallbackPage.test.ts +0 -138
  10. package/monodog-dashboard/__tests__/ConfigInspector.test.ts +0 -33
  11. package/monodog-dashboard/__tests__/DependencyGraph.test.ts +0 -72
  12. package/monodog-dashboard/__tests__/HealthStatus.test.ts +0 -69
  13. package/monodog-dashboard/__tests__/LoginPage.test.ts +0 -79
  14. package/monodog-dashboard/__tests__/PackageDetail.test.ts +0 -22
  15. package/monodog-dashboard/__tests__/ReleaseManager.test.tsx +0 -510
  16. package/monodog-dashboard/__tests__/api-client.test.ts +0 -475
  17. package/monodog-dashboard/__tests__/components.test.ts +0 -117
  18. package/monodog-dashboard/__tests__/dashboard.utils.test.ts +0 -144
  19. package/monodog-dashboard/__tests__/dependency.utils.test.ts +0 -125
  20. package/monodog-dashboard/__tests__/monorepoService.unit.test.ts +0 -103
  21. package/monodog-dashboard/__tests__/packages.utils.test.ts +0 -37
  22. package/monodog-dashboard/__tests__/pages.test.ts +0 -103
  23. package/monodog-dashboard/package-lock.json +0 -4587
  24. package/monodog-dashboard/postcss.config.js +0 -6
  25. package/monodog-dashboard/src/components/App.tsx +0 -36
  26. package/monodog-dashboard/src/components/LoadingState.tsx +0 -18
  27. package/monodog-dashboard/src/components/PermissionGuard.tsx +0 -92
  28. package/monodog-dashboard/src/components/ProtectedRoute.tsx +0 -24
  29. package/monodog-dashboard/src/components/configuration/Configuration.tsx +0 -91
  30. package/monodog-dashboard/src/components/configuration/components/BrandingSettings.tsx +0 -128
  31. package/monodog-dashboard/src/components/configuration/components/ConfigurationHeader.tsx +0 -34
  32. package/monodog-dashboard/src/components/configuration/components/ConfigurationModal.tsx +0 -20
  33. package/monodog-dashboard/src/components/configuration/components/ConfigurationTabs.tsx +0 -30
  34. package/monodog-dashboard/src/components/configuration/components/FeatureToggles.tsx +0 -66
  35. package/monodog-dashboard/src/components/configuration/components/GeneralSettings.tsx +0 -77
  36. package/monodog-dashboard/src/components/configuration/components/MonorepoSettings.tsx +0 -179
  37. package/monodog-dashboard/src/components/configuration/components/index.ts +0 -8
  38. package/monodog-dashboard/src/components/configuration/types/config.types.ts +0 -52
  39. package/monodog-dashboard/src/components/configuration/utils/config.utils.tsx +0 -115
  40. package/monodog-dashboard/src/components/main-dashboard/Dashboard.tsx +0 -242
  41. package/monodog-dashboard/src/components/main-dashboard/Layout.tsx +0 -112
  42. package/monodog-dashboard/src/components/main-dashboard/components/Header.tsx +0 -47
  43. package/monodog-dashboard/src/components/main-dashboard/components/PackageDistribution.tsx +0 -35
  44. package/monodog-dashboard/src/components/main-dashboard/components/PackageSearchFilter.tsx +0 -47
  45. package/monodog-dashboard/src/components/main-dashboard/components/PackageTable.tsx +0 -87
  46. package/monodog-dashboard/src/components/main-dashboard/components/QuickActions.tsx +0 -60
  47. package/monodog-dashboard/src/components/main-dashboard/components/StatsCards.tsx +0 -73
  48. package/monodog-dashboard/src/components/main-dashboard/components/index.ts +0 -7
  49. package/monodog-dashboard/src/components/main-dashboard/types/dashboard.types.ts +0 -33
  50. package/monodog-dashboard/src/components/main-dashboard/utils/dashboard.utils.tsx +0 -70
  51. package/monodog-dashboard/src/components/modules/ci-integration/CIIntegration.tsx +0 -277
  52. package/monodog-dashboard/src/components/modules/ci-integration/components/BuildDetails.tsx +0 -228
  53. package/monodog-dashboard/src/components/modules/ci-integration/components/BuildList.tsx +0 -212
  54. package/monodog-dashboard/src/components/modules/ci-integration/components/BuildOverview.tsx +0 -158
  55. package/monodog-dashboard/src/components/modules/ci-integration/components/CIIntegrationHeader.tsx +0 -38
  56. package/monodog-dashboard/src/components/modules/ci-integration/components/ErrorState.tsx +0 -25
  57. package/monodog-dashboard/src/components/modules/ci-integration/components/LoadingState.tsx +0 -16
  58. package/monodog-dashboard/src/components/modules/ci-integration/components/PipelineStatus.tsx +0 -223
  59. package/monodog-dashboard/src/components/modules/ci-integration/components/index.ts +0 -8
  60. package/monodog-dashboard/src/components/modules/ci-integration/types/ci.types.ts +0 -97
  61. package/monodog-dashboard/src/components/modules/ci-integration/utils/ci.utils.tsx +0 -264
  62. package/monodog-dashboard/src/components/modules/config-inspector/ConfigInspector.tsx +0 -324
  63. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigEditor.tsx +0 -93
  64. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigInspectorHeader.tsx +0 -36
  65. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigPreview.tsx +0 -89
  66. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigSidebar.tsx +0 -141
  67. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigToolbar.tsx +0 -184
  68. package/monodog-dashboard/src/components/modules/config-inspector/components/ErrorState.tsx +0 -25
  69. package/monodog-dashboard/src/components/modules/config-inspector/components/LoadingState.tsx +0 -16
  70. package/monodog-dashboard/src/components/modules/config-inspector/components/ValidationPanel.tsx +0 -155
  71. package/monodog-dashboard/src/components/modules/config-inspector/components/index.ts +0 -9
  72. package/monodog-dashboard/src/components/modules/config-inspector/types/config.types.ts +0 -100
  73. package/monodog-dashboard/src/components/modules/config-inspector/utils/config.utils.tsx +0 -704
  74. package/monodog-dashboard/src/components/modules/dependency-graph/DependencyGraph.tsx +0 -224
  75. package/monodog-dashboard/src/components/modules/dependency-graph/components/CircularDependencies.tsx +0 -177
  76. package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyDetails.tsx +0 -192
  77. package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyGraphHeader.tsx +0 -30
  78. package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyList.tsx +0 -177
  79. package/monodog-dashboard/src/components/modules/dependency-graph/components/ErrorState.tsx +0 -25
  80. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphLegend.tsx +0 -89
  81. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphStats.tsx +0 -141
  82. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphToolbar.tsx +0 -107
  83. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphVisualization.tsx +0 -179
  84. package/monodog-dashboard/src/components/modules/dependency-graph/components/LoadingState.tsx +0 -16
  85. package/monodog-dashboard/src/components/modules/dependency-graph/components/index.ts +0 -11
  86. package/monodog-dashboard/src/components/modules/dependency-graph/types/dependency.types.ts +0 -105
  87. package/monodog-dashboard/src/components/modules/dependency-graph/utils/dependency.utils.tsx +0 -433
  88. package/monodog-dashboard/src/components/modules/health-status/HealthStatus.tsx +0 -739
  89. package/monodog-dashboard/src/components/modules/health-status/components/ErrorState.tsx +0 -25
  90. package/monodog-dashboard/src/components/modules/health-status/components/HealthActions.tsx +0 -122
  91. package/monodog-dashboard/src/components/modules/health-status/components/HealthAlerts.tsx +0 -151
  92. package/monodog-dashboard/src/components/modules/health-status/components/HealthMetrics.tsx +0 -132
  93. package/monodog-dashboard/src/components/modules/health-status/components/HealthStatusHeader.tsx +0 -30
  94. package/monodog-dashboard/src/components/modules/health-status/components/LoadingState.tsx +0 -16
  95. package/monodog-dashboard/src/components/modules/health-status/components/OverallHealthScore.tsx +0 -122
  96. package/monodog-dashboard/src/components/modules/health-status/components/PackageHealthList.tsx +0 -195
  97. package/monodog-dashboard/src/components/modules/health-status/types/health.types.ts +0 -80
  98. package/monodog-dashboard/src/components/modules/health-status/utils/health.utils.tsx +0 -220
  99. package/monodog-dashboard/src/components/modules/packages/PackageDetail.tsx +0 -255
  100. package/monodog-dashboard/src/components/modules/packages/PackagesOverview.tsx +0 -166
  101. package/monodog-dashboard/src/components/modules/packages/components/ConfigurationTab.tsx +0 -311
  102. package/monodog-dashboard/src/components/modules/packages/components/DependenciesTab.tsx +0 -154
  103. package/monodog-dashboard/src/components/modules/packages/components/ErrorState.tsx +0 -21
  104. package/monodog-dashboard/src/components/modules/packages/components/HealthMetricsTab.tsx +0 -275
  105. package/monodog-dashboard/src/components/modules/packages/components/LoadingState.tsx +0 -14
  106. package/monodog-dashboard/src/components/modules/packages/components/PackageDetailHeader.tsx +0 -167
  107. package/monodog-dashboard/src/components/modules/packages/components/PackageDetailTabs.tsx +0 -49
  108. package/monodog-dashboard/src/components/modules/packages/components/PackageStats.tsx +0 -70
  109. package/monodog-dashboard/src/components/modules/packages/components/PackagesTable.tsx +0 -163
  110. package/monodog-dashboard/src/components/modules/packages/components/RecentCommitsTab.tsx +0 -90
  111. package/monodog-dashboard/src/components/modules/packages/components/SearchAndFilter.tsx +0 -66
  112. package/monodog-dashboard/src/components/modules/packages/components/index.ts +0 -12
  113. package/monodog-dashboard/src/components/modules/packages/types/packages.types.ts +0 -101
  114. package/monodog-dashboard/src/components/modules/packages/utils/packages.utils.tsx +0 -178
  115. package/monodog-dashboard/src/components/pipeline/JobsList.tsx +0 -83
  116. package/monodog-dashboard/src/components/pipeline/LogViewer.tsx +0 -392
  117. package/monodog-dashboard/src/components/pipeline/PipelineManager.tsx +0 -562
  118. package/monodog-dashboard/src/components/pipeline/WorkflowRunsList.tsx +0 -272
  119. package/monodog-dashboard/src/components/pipeline/WorkflowTrigger.tsx +0 -182
  120. package/monodog-dashboard/src/components/pipeline/utils/pipeline.utils.tsx +0 -11
  121. package/monodog-dashboard/src/components/publish-control/PublishControl.tsx +0 -229
  122. package/monodog-dashboard/src/components/publish-control/components/ChangelogViewer.tsx +0 -103
  123. package/monodog-dashboard/src/components/publish-control/components/ErrorState.tsx +0 -23
  124. package/monodog-dashboard/src/components/publish-control/components/LoadingState.tsx +0 -10
  125. package/monodog-dashboard/src/components/publish-control/components/PackageReleaseTable.tsx +0 -140
  126. package/monodog-dashboard/src/components/publish-control/components/PublishHeader.tsx +0 -30
  127. package/monodog-dashboard/src/components/publish-control/components/QuickActionCards.tsx +0 -56
  128. package/monodog-dashboard/src/components/publish-control/components/ReleaseSchedule.tsx +0 -104
  129. package/monodog-dashboard/src/components/publish-control/components/index.ts +0 -8
  130. package/monodog-dashboard/src/components/publish-control/types/publish.types.ts +0 -39
  131. package/monodog-dashboard/src/components/publish-control/utils/publish.utils.ts +0 -59
  132. package/monodog-dashboard/src/components/release-manager/ReleaseManager.tsx +0 -342
  133. package/monodog-dashboard/src/components/release-manager/components/ChangesetPreview.tsx +0 -123
  134. package/monodog-dashboard/src/components/release-manager/components/ErrorState.tsx +0 -38
  135. package/monodog-dashboard/src/components/release-manager/components/LoadingState.tsx +0 -18
  136. package/monodog-dashboard/src/components/release-manager/components/PackageSelector.tsx +0 -137
  137. package/monodog-dashboard/src/components/release-manager/components/PublishConfirmation.tsx +0 -150
  138. package/monodog-dashboard/src/components/release-manager/components/ReleaseValidation.tsx +0 -138
  139. package/monodog-dashboard/src/components/release-manager/components/VersionBumpSelector.tsx +0 -142
  140. package/monodog-dashboard/src/components/release-manager/types/index.ts +0 -9
  141. package/monodog-dashboard/src/components/release-manager/types/release-manager.types.ts +0 -29
  142. package/monodog-dashboard/src/components/setup-guide/SetupGuide.tsx +0 -96
  143. package/monodog-dashboard/src/components/setup-guide/components/SetupHeader.tsx +0 -24
  144. package/monodog-dashboard/src/components/setup-guide/components/SetupModal.tsx +0 -24
  145. package/monodog-dashboard/src/components/setup-guide/components/SetupProgress.tsx +0 -29
  146. package/monodog-dashboard/src/components/setup-guide/components/StepContent.tsx +0 -272
  147. package/monodog-dashboard/src/components/setup-guide/components/StepNavigation.tsx +0 -62
  148. package/monodog-dashboard/src/components/setup-guide/components/index.ts +0 -6
  149. package/monodog-dashboard/src/components/setup-guide/types/setup.types.ts +0 -38
  150. package/monodog-dashboard/src/components/setup-guide/utils/setup.utils.ts +0 -79
  151. package/monodog-dashboard/src/constants/api-config.ts +0 -81
  152. package/monodog-dashboard/src/constants/index.ts +0 -9
  153. package/monodog-dashboard/src/constants/messages.ts +0 -40
  154. package/monodog-dashboard/src/icons/heroicons.ts +0 -65
  155. package/monodog-dashboard/src/icons/index.tsx +0 -1788
  156. package/monodog-dashboard/src/index.css +0 -175
  157. package/monodog-dashboard/src/main.tsx +0 -9
  158. package/monodog-dashboard/src/pages/AuthCallbackPage.tsx +0 -103
  159. package/monodog-dashboard/src/pages/CIPage.tsx +0 -6
  160. package/monodog-dashboard/src/pages/ConfigPage.tsx +0 -6
  161. package/monodog-dashboard/src/pages/DashboardPage.tsx +0 -6
  162. package/monodog-dashboard/src/pages/DependenciesPage.tsx +0 -6
  163. package/monodog-dashboard/src/pages/HealthPage.tsx +0 -6
  164. package/monodog-dashboard/src/pages/LoginPage.tsx +0 -77
  165. package/monodog-dashboard/src/pages/PackageDetailPage.tsx +0 -6
  166. package/monodog-dashboard/src/pages/PackagesPage.tsx +0 -6
  167. package/monodog-dashboard/src/pages/PipelinePage.tsx +0 -22
  168. package/monodog-dashboard/src/pages/PublishPage.tsx +0 -6
  169. package/monodog-dashboard/src/pages/ReleaseManagerPage.tsx +0 -9
  170. package/monodog-dashboard/src/pages/index.ts +0 -28
  171. package/monodog-dashboard/src/routes/AppRouter.tsx +0 -89
  172. package/monodog-dashboard/src/routes/AppRouterPages.tsx +0 -56
  173. package/monodog-dashboard/src/routes/index.ts +0 -10
  174. package/monodog-dashboard/src/routes/routes.config.ts +0 -94
  175. package/monodog-dashboard/src/services/api/api-client.ts +0 -189
  176. package/monodog-dashboard/src/services/api/index.ts +0 -30
  177. package/monodog-dashboard/src/services/api/types/api.types.ts +0 -63
  178. package/monodog-dashboard/src/services/auth-context.tsx +0 -344
  179. package/monodog-dashboard/src/services/monorepoService.ts +0 -733
  180. package/monodog-dashboard/src/services/permission-context.tsx +0 -193
  181. package/monodog-dashboard/src/theme/COMPONENT_UPDATES.md +0 -273
  182. package/monodog-dashboard/src/theme/INTEGRATION.md +0 -381
  183. package/monodog-dashboard/src/theme/README.md +0 -239
  184. package/monodog-dashboard/src/theme/examples.tsx +0 -386
  185. package/monodog-dashboard/src/theme/index.ts +0 -402
  186. package/monodog-dashboard/src/theme/migration-guide.md +0 -335
  187. package/monodog-dashboard/src/types/auth-context.types.ts +0 -51
  188. package/monodog-dashboard/src/types/component.types.ts +0 -96
  189. package/monodog-dashboard/src/types/icons.types.ts +0 -13
  190. package/monodog-dashboard/src/types/index.ts +0 -68
  191. package/monodog-dashboard/src/types/monorepo-service.types.ts +0 -53
  192. package/monodog-dashboard/src/types/permission-context.types.ts +0 -49
  193. package/monodog-dashboard/src/types/pipeline.types.ts +0 -89
  194. package/monodog-dashboard/src/types/routes.types.ts +0 -12
  195. package/monodog-dashboard/src/utils/cookies.ts +0 -47
  196. package/monodog-dashboard/tailwind.config.js +0 -68
  197. package/monodog-dashboard/tsconfig.app.json +0 -14
  198. package/monodog-dashboard/tsconfig.json +0 -17
  199. package/monodog-dashboard/tsconfig.node.json +0 -10
  200. package/monodog-dashboard/vite.config.ts +0 -9
@@ -1,381 +0,0 @@
1
- # Theme Integration with Tailwind CSS
2
-
3
- This document explains how the monodog theme system is integrated with Tailwind CSS through centralized configuration.
4
-
5
- ## Architecture Overview
6
-
7
- The theme system uses a centralized configuration approach where:
8
-
9
- 1. **Theme Definition**: All design tokens are defined in `src/theme/index.ts`
10
- 2. **Tailwind Integration**: `tailwind.config.js` imports and uses the theme configuration
11
- 3. **Component Styles**: `src/index.css` provides component classes based on the theme
12
- 4. **Type Safety**: TypeScript ensures consistency across the entire system
13
-
14
- ## File Structure
15
-
16
- ```
17
- apps/dashboard/
18
- ├── tailwind.config.js # Imports theme configuration
19
- ├── src/
20
- │ ├── index.css # Component styles using theme
21
- │ └── theme/
22
- │ ├── index.ts # ✨ Central theme configuration
23
- │ ├── examples.tsx # Theme showcase
24
- │ ├── migration-guide.md # Migration instructions
25
- │ ├── README.md # Theme documentation
26
- │ └── INTEGRATION.md # This file
27
- ```
28
-
29
- ## Integration Implementation
30
-
31
- ### 1. Central Theme Configuration (`src/theme/index.ts`)
32
-
33
- ```typescript
34
- export const colors = {
35
- primary: {
36
- /* Blue spectrum */
37
- },
38
- secondary: {
39
- /* Green spectrum */
40
- },
41
- accent: {
42
- /* Yellow spectrum */
43
- },
44
- neutral: {
45
- /* Gray spectrum */
46
- },
47
- } as const;
48
-
49
- export const semanticColors = {
50
- success: colors.secondary,
51
- warning: colors.accent,
52
- error: {
53
- /* Red spectrum */
54
- },
55
- info: {
56
- /* Light blue spectrum */
57
- },
58
- } as const;
59
-
60
- export const typography = {
61
- fonts: {
62
- sans: ['Inter', 'system-ui' /* ... */],
63
- display: ['Inter', 'system-ui' /* ... */],
64
- mono: ['"JetBrains Mono"', '"Fira Code"' /* ... */],
65
- },
66
- // ... sizes, weights
67
- } as const;
68
-
69
- // Export everything as a unified theme object
70
- export const theme = {
71
- colors,
72
- semanticColors,
73
- typography,
74
- shadows,
75
- borderRadius,
76
- // ... other design tokens
77
- } as const;
78
- ```
79
-
80
- ### 2. Tailwind Configuration (`tailwind.config.js`)
81
-
82
- ```javascript
83
- import { theme } from './src/theme/index.js';
84
-
85
- export default {
86
- content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
87
- theme: {
88
- extend: {
89
- // Import colors from centralized theme
90
- colors: {
91
- primary: theme.colors.primary,
92
- secondary: theme.colors.secondary,
93
- accent: theme.colors.accent,
94
- neutral: theme.colors.neutral,
95
- success: theme.semanticColors.success,
96
- warning: theme.semanticColors.warning,
97
- error: theme.semanticColors.error,
98
- info: theme.semanticColors.info,
99
- },
100
-
101
- // Import typography from centralized theme
102
- fontFamily: {
103
- sans: theme.typography.fonts.sans,
104
- display: theme.typography.fonts.display,
105
- mono: theme.typography.fonts.mono,
106
- },
107
-
108
- // Import design tokens from centralized theme
109
- borderRadius: {
110
- xl: theme.borderRadius.xl,
111
- '2xl': theme.borderRadius['2xl'],
112
- '3xl': theme.borderRadius['3xl'],
113
- },
114
-
115
- boxShadow: {
116
- soft: theme.shadows.soft,
117
- medium: theme.shadows.medium,
118
- large: theme.shadows.large,
119
- },
120
-
121
- // Additional Tailwind-specific configuration
122
- animation: {
123
- /* ... */
124
- },
125
- keyframes: {
126
- /* ... */
127
- },
128
- zIndex: {
129
- /* ... */
130
- },
131
- },
132
- },
133
- plugins: [],
134
- };
135
- ```
136
-
137
- ### 3. Component Styles (`src/index.css`)
138
-
139
- ```css
140
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
141
-
142
- @tailwind base;
143
- @tailwind components;
144
- @tailwind utilities;
145
-
146
- @layer components {
147
- .btn-primary {
148
- @apply bg-primary-600 text-white px-4 py-2 rounded-lg font-medium
149
- hover:bg-primary-700 focus:ring-2 focus:ring-primary-500
150
- transition-colors duration-200;
151
- }
152
-
153
- .btn-secondary {
154
- @apply bg-secondary-600 text-white px-4 py-2 rounded-lg font-medium
155
- hover:bg-secondary-700 focus:ring-2 focus:ring-secondary-500
156
- transition-colors duration-200;
157
- }
158
-
159
- /* ... other component styles */
160
- }
161
- ```
162
-
163
- ## Benefits of This Architecture
164
-
165
- ### 1. Single Source of Truth
166
-
167
- - All design tokens are defined in one place (`src/theme/index.ts`)
168
- - Changes propagate automatically to Tailwind and components
169
- - No duplication of color values or design tokens
170
-
171
- ### 2. Type Safety
172
-
173
- - TypeScript ensures consistency across the system
174
- - Compile-time validation of theme usage
175
- - Autocomplete for design tokens in IDE
176
-
177
- ### 3. Maintainability
178
-
179
- - Easy to update colors, fonts, or spacing
180
- - Centralized theme modifications
181
- - Clear dependency chain
182
-
183
- ### 4. Flexibility
184
-
185
- - Easy to create theme variants (dark mode, brand variants)
186
- - Programmatic theme generation
187
- - Runtime theme switching capabilities
188
-
189
- ### 5. Developer Experience
190
-
191
- - Clear documentation and examples
192
- - Consistent API across components
193
- - Easy onboarding for new developers
194
-
195
- ## Usage Examples
196
-
197
- ### Using Theme in Components
198
-
199
- ```tsx
200
- import { theme } from '../theme';
201
-
202
- // Access design tokens programmatically
203
- const buttonStyle = {
204
- backgroundColor: theme.colors.primary[600],
205
- borderRadius: theme.borderRadius.lg,
206
- fontFamily: theme.typography.fonts.sans.join(', '),
207
- };
208
-
209
- // Or use Tailwind classes (recommended)
210
- <button className="btn-primary">Click me</button>;
211
- ```
212
-
213
- ### Using Theme in Utilities
214
-
215
- ```typescript
216
- import { theme } from '../theme';
217
-
218
- // Create dynamic styles based on theme
219
- const getStatusColor = (status: string) => {
220
- switch (status) {
221
- case 'success':
222
- return theme.semanticColors.success[600];
223
- case 'warning':
224
- return theme.semanticColors.warning[600];
225
- case 'error':
226
- return theme.semanticColors.error[600];
227
- default:
228
- return theme.colors.neutral[600];
229
- }
230
- };
231
- ```
232
-
233
- ## Theme Updates
234
-
235
- ### Adding New Colors
236
-
237
- 1. **Update theme configuration**:
238
-
239
- ```typescript
240
- // src/theme/index.ts
241
- export const colors = {
242
- // ... existing colors
243
- tertiary: {
244
- 50: '#...',
245
- // ... full spectrum
246
- 950: '#...',
247
- },
248
- } as const;
249
- ```
250
-
251
- 2. **Update Tailwind configuration**:
252
-
253
- ```javascript
254
- // tailwind.config.js
255
- colors: {
256
- // ... existing colors
257
- tertiary: theme.colors.tertiary,
258
- },
259
- ```
260
-
261
- 3. **Create component classes** (if needed):
262
-
263
- ```css
264
- /* src/index.css */
265
- .btn-tertiary {
266
- @apply bg-tertiary-600 text-white px-4 py-2 rounded-lg font-medium
267
- hover:bg-tertiary-700 focus:ring-2 focus:ring-tertiary-500
268
- transition-colors duration-200;
269
- }
270
- ```
271
-
272
- ### Theme Variants
273
-
274
- The architecture supports multiple theme variants:
275
-
276
- ```typescript
277
- // src/theme/variants/dark.ts
278
- export const darkTheme = {
279
- ...theme,
280
- colors: {
281
- ...theme.colors,
282
- neutral: {
283
- // Inverted neutral colors for dark mode
284
- 50: '#030712',
285
- 100: '#111827',
286
- // ...
287
- 950: '#f9fafb',
288
- },
289
- },
290
- };
291
- ```
292
-
293
- ## Migration from Hardcoded Values
294
-
295
- ### Before
296
-
297
- ```tsx
298
- <button className="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg">
299
- Submit
300
- </button>
301
- ```
302
-
303
- ### After
304
-
305
- ```tsx
306
- <button className="btn-primary">Submit</button>
307
- ```
308
-
309
- The centralized theme system provides:
310
-
311
- - **95% reduction** in repeated style declarations
312
- - **100% consistency** in design token usage
313
- - **Zero duplication** of color and spacing values
314
- - **Easy maintenance** through single configuration point
315
-
316
- ## Build Integration
317
-
318
- ### TypeScript Compilation
319
-
320
- ```json
321
- // tsconfig.json
322
- {
323
- "compilerOptions": {
324
- "moduleResolution": "node",
325
- "allowSyntheticDefaultImports": true
326
- }
327
- }
328
- ```
329
-
330
- ### Vite Configuration
331
-
332
- The theme works seamlessly with Vite's build system:
333
-
334
- - ES modules for tree shaking
335
- - TypeScript for type safety
336
- - Hot reload for development
337
-
338
- ## Performance Considerations
339
-
340
- ### Bundle Size
341
-
342
- - Theme object is tree-shaken during build
343
- - Only used design tokens are included
344
- - No runtime overhead for unused values
345
-
346
- ### CSS Generation
347
-
348
- - Tailwind's purge removes unused classes
349
- - Component classes are always included
350
- - Optimal CSS bundle size
351
-
352
- ## Future Enhancements
353
-
354
- ### Planned Features
355
-
356
- 1. **Dynamic Theme Switching**: Runtime theme changes
357
- 2. **Theme Generator**: Automated theme creation tools
358
- 3. **Design Token Export**: JSON/CSS custom properties
359
- 4. **Figma Integration**: Sync with design system
360
-
361
- ### Extension Points
362
-
363
- ```typescript
364
- // Easy to extend with new design tokens
365
- export const theme = {
366
- // ... existing tokens
367
- customTokens: {
368
- gradients: {
369
- /* ... */
370
- },
371
- patterns: {
372
- /* ... */
373
- },
374
- illustrations: {
375
- /* ... */
376
- },
377
- },
378
- } as const;
379
- ```
380
-
381
- This centralized theme architecture provides a robust foundation for maintaining design consistency while enabling flexibility and growth for the monodog dashboard system.
@@ -1,239 +0,0 @@
1
- # monodog Dashboard Theme System
2
-
3
- This document outlines the comprehensive theme system implemented for the monodog dashboard application.
4
-
5
- ## Overview
6
-
7
- The theme system provides a consistent design language across the entire dashboard with carefully crafted color palettes, typography, spacing, and component styles.
8
-
9
- ## Color Palette
10
-
11
- ### Primary Colors (Blue Spectrum)
12
-
13
- - **Usage**: Main actions, links, active navigation states, primary buttons
14
- - **Base Color**: `#3b82f6` (primary-500)
15
- - **Button Color**: `#2563eb` (primary-600)
16
- - **Hover Color**: `#1d4ed8` (primary-700)
17
-
18
- ### Secondary Colors (Green Spectrum)
19
-
20
- - **Usage**: Success states, positive actions, secondary buttons
21
- - **Base Color**: `#22c55e` (secondary-500)
22
- - **Button Color**: `#16a34a` (secondary-600)
23
- - **Hover Color**: `#15803d` (secondary-700)
24
-
25
- ### Accent Colors (Yellow Spectrum)
26
-
27
- - **Usage**: Warnings, highlights, attention-grabbing elements
28
- - **Base Color**: `#eab308` (accent-500)
29
- - **Warning Color**: `#ca8a04` (accent-600)
30
- - **Hover Color**: `#a16207` (accent-700)
31
-
32
- ### Semantic Colors
33
-
34
- - **Success**: Green spectrum (same as secondary)
35
- - **Warning**: Yellow spectrum (same as accent)
36
- - **Error**: Red spectrum (`#ef4444` base)
37
- - **Info**: Light blue spectrum (`#0ea5e9` base)
38
-
39
- ### Neutral Colors
40
-
41
- - **Usage**: Text, backgrounds, borders, subtle elements
42
- - **Range**: From `#f9fafb` (neutral-50) to `#030712` (neutral-950)
43
-
44
- ## Typography
45
-
46
- ### Font Families
47
-
48
- - **Primary**: Inter (Google Fonts)
49
- - **Display**: Inter (for headings)
50
- - **Monospace**: JetBrains Mono (for code)
51
-
52
- ### Font Sizes
53
-
54
- - **xs**: 12px / 16px line height
55
- - **sm**: 14px / 20px line height
56
- - **base**: 16px / 24px line height
57
- - **lg**: 18px / 28px line height
58
- - **xl**: 20px / 28px line height
59
- - **2xl**: 24px / 32px line height
60
- - **3xl**: 30px / 36px line height
61
- - **4xl**: 36px / 40px line height
62
-
63
- ### Font Weights
64
-
65
- - **Light**: 300
66
- - **Normal**: 400
67
- - **Medium**: 500 (default for most UI text)
68
- - **Semibold**: 600 (headings)
69
- - **Bold**: 700
70
-
71
- ## Component Classes
72
-
73
- ### Buttons
74
-
75
- ```css
76
- .btn-primary /* Primary blue button */
77
- .btn-secondary /* Secondary green button */
78
- .btn-outline /* Outlined button */
79
- .btn-ghost /* Minimal button */
80
- .btn-success /* Success state button */
81
- .btn-warning /* Warning state button */
82
- .btn-error /* Error state button */
83
- ```
84
-
85
- ### Input Fields
86
-
87
- ```css
88
- .input-base /* Standard input styling */
89
- .input-error /* Error state input */
90
- .input-success /* Success state input */
91
- ```
92
-
93
- ### Cards
94
-
95
- ```css
96
- .card /* Basic card with soft shadow */
97
- .card-elevated /* Card with medium shadow */
98
- .card-interactive /* Interactive card with hover effects */
99
- ```
100
-
101
- ### Status Badges
102
-
103
- ```css
104
- .badge-success /* Green success badge */
105
- .badge-warning /* Yellow warning badge */
106
- .badge-error /* Red error badge */
107
- .badge-info /* Blue info badge */
108
- .badge-neutral /* Gray neutral badge */
109
- ```
110
-
111
- ### Navigation
112
-
113
- ```css
114
- .nav-link /* Base navigation link */
115
- .nav-link-active /* Active navigation state */
116
- .nav-link-inactive /* Inactive navigation state */
117
- ```
118
-
119
- ### Typography Classes
120
-
121
- ```css
122
- .text-heading /* Main headings */
123
- .text-subheading /* Subheadings */
124
- .text-body /* Body text */
125
- .text-caption /* Small caption text */
126
- .text-code /* Monospace code text */
127
- ```
128
-
129
- ## Spacing System
130
-
131
- The spacing system follows a consistent scale:
132
-
133
- - **4px increments**: 1, 2, 3, 4, 5, 6
134
- - **8px increments**: 8, 10, 12, 16, 20, 24, 32
135
-
136
- ## Shadows
137
-
138
- Three levels of elevation:
139
-
140
- - **Soft**: Subtle shadow for basic cards
141
- - **Medium**: Moderate shadow for elevated components
142
- - **Large**: Strong shadow for modals and overlays
143
-
144
- ## Border Radius
145
-
146
- - **Base**: 4px for small elements
147
- - **lg**: 8px for buttons and inputs
148
- - **xl**: 12px for cards
149
- - **2xl**: 16px for large cards
150
- - **3xl**: 24px for hero elements
151
-
152
- ## Usage Guidelines
153
-
154
- ### Color Usage
155
-
156
- 1. **Primary Blue**: Use for main call-to-action buttons, active navigation, and primary interactive elements
157
- 2. **Secondary Green**: Use for success states, positive actions, and secondary buttons
158
- 3. **Accent Yellow**: Use sparingly for warnings and important highlights
159
- 4. **Neutral Gray**: Use for text, backgrounds, and subtle UI elements
160
-
161
- ### Button Hierarchy
162
-
163
- 1. **Primary**: Most important action on the page
164
- 2. **Secondary**: Important but not primary actions
165
- 3. **Outline**: Alternative actions
166
- 4. **Ghost**: Minimal actions like "Cancel"
167
-
168
- ### Typography Hierarchy
169
-
170
- 1. **Headings**: Use `text-heading` with appropriate size
171
- 2. **Subheadings**: Use `text-subheading`
172
- 3. **Body Text**: Use `text-body`
173
- 4. **Captions**: Use `text-caption`
174
-
175
- ### Spacing Guidelines
176
-
177
- - Use consistent spacing between elements
178
- - Prefer the spacing scale over arbitrary values
179
- - Use larger spacing for section breaks
180
- - Use smaller spacing for related elements
181
-
182
- ## Accessibility
183
-
184
- The theme system includes:
185
-
186
- - **WCAG AA compliant** color contrasts
187
- - **Focus rings** for keyboard navigation
188
- - **Semantic colors** for status communication
189
- - **Readable typography** with appropriate line heights
190
-
191
- ## Dark Mode Support
192
-
193
- The current theme is designed for light mode. Dark mode support can be added by:
194
-
195
- 1. Creating dark variants of the color palette
196
- 2. Using CSS custom properties for theme switching
197
- 3. Adding dark mode classes to components
198
-
199
- ## Migration from Existing Code
200
-
201
- To migrate existing components:
202
-
203
- 1. Replace hardcoded colors with theme classes
204
- 2. Use component classes instead of utility combinations
205
- 3. Update typography to use theme classes
206
- 4. Standardize spacing using the theme scale
207
-
208
- ## Examples
209
-
210
- ### Before (Hardcoded)
211
-
212
- ```tsx
213
- <button className="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700">
214
- Submit
215
- </button>
216
- ```
217
-
218
- ### After (Theme Classes)
219
-
220
- ```tsx
221
- <button className="btn-primary">Submit</button>
222
- ```
223
-
224
- ### Status Badge Example
225
-
226
- ```tsx
227
- <span className="badge-success">Active</span>
228
- ```
229
-
230
- ### Card Example
231
-
232
- ```tsx
233
- <div className="card p-6">
234
- <h3 className="text-heading text-xl mb-4">Card Title</h3>
235
- <p className="text-body">Card content goes here.</p>
236
- </div>
237
- ```
238
-
239
- This theme system ensures consistency, maintainability, and a professional appearance across the entire monodog dashboard application.