@nextsparkjs/theme-crm 0.1.0-beta.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.
Files changed (140) hide show
  1. package/CRM_PLAN.md +343 -0
  2. package/about.md +122 -0
  3. package/config/app.config.ts +185 -0
  4. package/config/billing.config.ts +187 -0
  5. package/config/dashboard.config.ts +372 -0
  6. package/config/dev.config.ts +55 -0
  7. package/config/features.config.ts +336 -0
  8. package/config/flows.config.ts +511 -0
  9. package/config/permissions.config.ts +297 -0
  10. package/config/theme.config.ts +111 -0
  11. package/entities/activities/activities.config.ts +61 -0
  12. package/entities/activities/activities.fields.ts +362 -0
  13. package/entities/activities/activities.service.ts +503 -0
  14. package/entities/activities/activities.types.ts +117 -0
  15. package/entities/activities/messages/en.json +123 -0
  16. package/entities/activities/messages/es.json +123 -0
  17. package/entities/activities/migrations/020_activities_table.sql +123 -0
  18. package/entities/activities/migrations/021_activities_metas.sql +114 -0
  19. package/entities/activities/migrations/022_activities_sample_data.sql +420 -0
  20. package/entities/campaigns/campaigns.config.ts +61 -0
  21. package/entities/campaigns/campaigns.fields.ts +413 -0
  22. package/entities/campaigns/campaigns.service.ts +426 -0
  23. package/entities/campaigns/campaigns.types.ts +124 -0
  24. package/entities/campaigns/messages/en.json +145 -0
  25. package/entities/campaigns/messages/es.json +145 -0
  26. package/entities/campaigns/migrations/001_campaigns_table.sql +127 -0
  27. package/entities/campaigns/migrations/002_campaigns_metas.sql +114 -0
  28. package/entities/campaigns/migrations/003_campaigns_sample_data.sql +364 -0
  29. package/entities/companies/companies.config.ts +61 -0
  30. package/entities/companies/companies.fields.ts +429 -0
  31. package/entities/companies/companies.service.ts +566 -0
  32. package/entities/companies/companies.types.ts +125 -0
  33. package/entities/companies/messages/en.json +146 -0
  34. package/entities/companies/messages/es.json +146 -0
  35. package/entities/companies/migrations/001_companies_table.sql +150 -0
  36. package/entities/companies/migrations/002_companies_metas.sql +114 -0
  37. package/entities/companies/migrations/003_companies_sample_data.sql +246 -0
  38. package/entities/contacts/contacts.config.ts +61 -0
  39. package/entities/contacts/contacts.fields.ts +359 -0
  40. package/entities/contacts/contacts.service.ts +509 -0
  41. package/entities/contacts/contacts.types.ts +108 -0
  42. package/entities/contacts/messages/en.json +117 -0
  43. package/entities/contacts/messages/es.json +117 -0
  44. package/entities/contacts/migrations/001_contacts_table.sql +134 -0
  45. package/entities/contacts/migrations/002_contacts_metas.sql +114 -0
  46. package/entities/contacts/migrations/003_contacts_sample_data.sql +421 -0
  47. package/entities/leads/leads.config.ts +61 -0
  48. package/entities/leads/leads.fields.ts +336 -0
  49. package/entities/leads/leads.service.ts +496 -0
  50. package/entities/leads/leads.types.ts +114 -0
  51. package/entities/leads/messages/en.json +132 -0
  52. package/entities/leads/messages/es.json +132 -0
  53. package/entities/leads/migrations/001_leads_table.sql +150 -0
  54. package/entities/leads/migrations/002_leads_metas.sql +120 -0
  55. package/entities/leads/migrations/003_leads_sample_data.sql +242 -0
  56. package/entities/notes/messages/en.json +114 -0
  57. package/entities/notes/messages/es.json +114 -0
  58. package/entities/notes/migrations/020_notes_table.sql +118 -0
  59. package/entities/notes/migrations/021_notes_metas.sql +114 -0
  60. package/entities/notes/migrations/022_notes_sample_data.sql +275 -0
  61. package/entities/notes/notes.config.ts +61 -0
  62. package/entities/notes/notes.fields.ts +283 -0
  63. package/entities/notes/notes.service.ts +320 -0
  64. package/entities/notes/notes.types.ts +102 -0
  65. package/entities/opportunities/messages/en.json +107 -0
  66. package/entities/opportunities/messages/es.json +107 -0
  67. package/entities/opportunities/migrations/010_opportunities_table.sql +145 -0
  68. package/entities/opportunities/migrations/011_opportunities_metas.sql +114 -0
  69. package/entities/opportunities/migrations/012_opportunities_sample_data.sql +438 -0
  70. package/entities/opportunities/opportunities.config.ts +61 -0
  71. package/entities/opportunities/opportunities.fields.ts +416 -0
  72. package/entities/opportunities/opportunities.service.ts +525 -0
  73. package/entities/opportunities/opportunities.types.ts +135 -0
  74. package/entities/pipelines/messages/en.json +115 -0
  75. package/entities/pipelines/messages/es.json +115 -0
  76. package/entities/pipelines/migrations/001_pipelines_table.sql +106 -0
  77. package/entities/pipelines/migrations/002_pipelines_metas.sql +114 -0
  78. package/entities/pipelines/migrations/003_pipelines_sample_data.sql +91 -0
  79. package/entities/pipelines/pipelines.config.ts +62 -0
  80. package/entities/pipelines/pipelines.fields.ts +193 -0
  81. package/entities/pipelines/pipelines.service.ts +383 -0
  82. package/entities/pipelines/pipelines.types.ts +78 -0
  83. package/entities/products/messages/en.json +135 -0
  84. package/entities/products/messages/es.json +135 -0
  85. package/entities/products/migrations/001_products_table.sql +117 -0
  86. package/entities/products/migrations/002_products_metas.sql +114 -0
  87. package/entities/products/migrations/003_products_sample_data.sql +247 -0
  88. package/entities/products/products.config.ts +62 -0
  89. package/entities/products/products.fields.ts +361 -0
  90. package/entities/products/products.service.ts +437 -0
  91. package/entities/products/products.types.ts +125 -0
  92. package/lib/crm-constants.ts +77 -0
  93. package/lib/crm-utils.ts +185 -0
  94. package/lib/selectors.ts +333 -0
  95. package/messages/en.json +131 -0
  96. package/messages/es.json +131 -0
  97. package/migrations/999_theme_sample_data.sql +473 -0
  98. package/package.json +18 -0
  99. package/pendings.md +205 -0
  100. package/permissions-matrix.md +216 -0
  101. package/styles/components.css +414 -0
  102. package/styles/crm-theme.css +358 -0
  103. package/styles/globals.css +576 -0
  104. package/styles/variables.css +111 -0
  105. package/templates/dashboard/(main)/activities/components/ActivityCard.tsx +169 -0
  106. package/templates/dashboard/(main)/activities/components/ActivityTimeline.tsx +165 -0
  107. package/templates/dashboard/(main)/activities/page.tsx +297 -0
  108. package/templates/dashboard/(main)/campaigns/page.tsx +373 -0
  109. package/templates/dashboard/(main)/companies/page.tsx +296 -0
  110. package/templates/dashboard/(main)/contacts/page.tsx +347 -0
  111. package/templates/dashboard/(main)/layout.tsx +98 -0
  112. package/templates/dashboard/(main)/leads/page.tsx +335 -0
  113. package/templates/dashboard/(main)/opportunities/[id]/edit/page.tsx +95 -0
  114. package/templates/dashboard/(main)/opportunities/create/page.tsx +94 -0
  115. package/templates/dashboard/(main)/opportunities/page.tsx +350 -0
  116. package/templates/dashboard/(main)/pipelines/[id]/edit/page.tsx +95 -0
  117. package/templates/dashboard/(main)/pipelines/[id]/page.tsx +143 -0
  118. package/templates/dashboard/(main)/pipelines/create/page.tsx +94 -0
  119. package/templates/dashboard/(main)/pipelines/page.tsx +234 -0
  120. package/templates/dashboard/(main)/products/[id]/edit/page.tsx +97 -0
  121. package/templates/dashboard/(main)/products/[id]/page.tsx +509 -0
  122. package/templates/dashboard/(main)/products/create/page.tsx +96 -0
  123. package/templates/dashboard/(main)/products/page.tsx +308 -0
  124. package/templates/shared/ActionButtons.tsx +41 -0
  125. package/templates/shared/CRMDashboard.tsx +519 -0
  126. package/templates/shared/CRMDataTable.tsx +441 -0
  127. package/templates/shared/CRMMetricCard.tsx +76 -0
  128. package/templates/shared/CRMMobileNav.tsx +172 -0
  129. package/templates/shared/CRMSidebar.tsx +346 -0
  130. package/templates/shared/CRMTopBar.tsx +265 -0
  131. package/templates/shared/DealCard.tsx +123 -0
  132. package/templates/shared/EntityCard.tsx +58 -0
  133. package/templates/shared/OpportunityForm.tsx +649 -0
  134. package/templates/shared/PipelineForm.tsx +367 -0
  135. package/templates/shared/PipelineKanban.tsx +194 -0
  136. package/templates/shared/QuickFilters.tsx +47 -0
  137. package/templates/shared/StageColumn.tsx +175 -0
  138. package/templates/shared/StageSelect.tsx +177 -0
  139. package/templates/shared/StagesRepeater.tsx +317 -0
  140. package/templates/shared/index.ts +9 -0
@@ -0,0 +1,358 @@
1
+ /**
2
+ * CRM Theme Global Styles
3
+ * Main stylesheet for SalesForce Pro CRM theme
4
+ */
5
+
6
+ @import './variables.css';
7
+
8
+ /* CRM-specific utility classes */
9
+
10
+ /* Metric Cards */
11
+ .crm-metric-card {
12
+ background: var(--crm-bg-primary);
13
+ border: 1px solid var(--crm-border);
14
+ border-radius: var(--crm-radius-lg);
15
+ padding: var(--crm-space-lg);
16
+ box-shadow: var(--crm-shadow-sm);
17
+ transition: all var(--crm-transition-base);
18
+ }
19
+
20
+ .crm-metric-card:hover {
21
+ box-shadow: var(--crm-shadow-md);
22
+ border-color: var(--crm-primary);
23
+ }
24
+
25
+ .crm-metric-value {
26
+ font-size: var(--crm-text-3xl);
27
+ font-weight: var(--crm-font-bold);
28
+ color: var(--crm-text-primary);
29
+ line-height: 1.2;
30
+ }
31
+
32
+ .crm-metric-label {
33
+ font-size: var(--crm-text-sm);
34
+ font-weight: var(--crm-font-medium);
35
+ color: var(--crm-text-secondary);
36
+ margin-top: var(--crm-space-xs);
37
+ }
38
+
39
+ .crm-metric-change {
40
+ font-size: var(--crm-text-sm);
41
+ font-weight: var(--crm-font-medium);
42
+ margin-top: var(--crm-space-sm);
43
+ }
44
+
45
+ .crm-metric-change.positive {
46
+ color: var(--crm-accent);
47
+ }
48
+
49
+ .crm-metric-change.negative {
50
+ color: var(--crm-danger);
51
+ }
52
+
53
+ /* Entity Cards */
54
+ .crm-entity-card {
55
+ background: var(--crm-bg-primary);
56
+ border: 1px solid var(--crm-border);
57
+ border-radius: var(--crm-radius-md);
58
+ padding: var(--crm-space-md);
59
+ cursor: pointer;
60
+ transition: all var(--crm-transition-fast);
61
+ }
62
+
63
+ .crm-entity-card:hover {
64
+ box-shadow: var(--crm-shadow-md);
65
+ transform: translateY(-2px);
66
+ }
67
+
68
+ .crm-entity-card-header {
69
+ display: flex;
70
+ justify-content: space-between;
71
+ align-items: flex-start;
72
+ margin-bottom: var(--crm-space-sm);
73
+ }
74
+
75
+ .crm-entity-card-title {
76
+ font-size: var(--crm-text-base);
77
+ font-weight: var(--crm-font-semibold);
78
+ color: var(--crm-text-primary);
79
+ }
80
+
81
+ .crm-entity-card-meta {
82
+ font-size: var(--crm-text-xs);
83
+ color: var(--crm-text-secondary);
84
+ margin-top: var(--crm-space-xs);
85
+ }
86
+
87
+ /* Kanban Stage Column */
88
+ .crm-stage-column {
89
+ background: var(--crm-bg-secondary);
90
+ border-radius: var(--crm-radius-lg);
91
+ padding: var(--crm-space-md);
92
+ min-width: 280px;
93
+ max-width: 320px;
94
+ }
95
+
96
+ .crm-stage-header {
97
+ display: flex;
98
+ justify-content: space-between;
99
+ align-items: center;
100
+ margin-bottom: var(--crm-space-md);
101
+ padding-bottom: var(--crm-space-sm);
102
+ border-bottom: 2px solid var(--crm-border);
103
+ }
104
+
105
+ .crm-stage-title {
106
+ font-size: var(--crm-text-base);
107
+ font-weight: var(--crm-font-semibold);
108
+ color: var(--crm-text-primary);
109
+ }
110
+
111
+ .crm-stage-count {
112
+ display: inline-flex;
113
+ align-items: center;
114
+ justify-content: center;
115
+ min-width: 24px;
116
+ height: 24px;
117
+ padding: 0 var(--crm-space-xs);
118
+ border-radius: 12px;
119
+ background: var(--crm-bg-tertiary);
120
+ font-size: var(--crm-text-xs);
121
+ font-weight: var(--crm-font-semibold);
122
+ color: var(--crm-text-secondary);
123
+ }
124
+
125
+ .crm-stage-total {
126
+ font-size: var(--crm-text-sm);
127
+ font-weight: var(--crm-font-medium);
128
+ color: var(--crm-text-secondary);
129
+ margin-top: var(--crm-space-xs);
130
+ }
131
+
132
+ /* Deal Card (for Kanban) */
133
+ .crm-deal-card {
134
+ background: var(--crm-bg-primary);
135
+ border: 1px solid var(--crm-border);
136
+ border-radius: var(--crm-radius-md);
137
+ padding: var(--crm-space-md);
138
+ margin-bottom: var(--crm-space-sm);
139
+ cursor: grab;
140
+ transition: all var(--crm-transition-fast);
141
+ }
142
+
143
+ .crm-deal-card:hover {
144
+ box-shadow: var(--crm-shadow-md);
145
+ }
146
+
147
+ .crm-deal-card.dragging {
148
+ opacity: 0.5;
149
+ cursor: grabbing;
150
+ }
151
+
152
+ .crm-deal-card.rotten {
153
+ border-left: 3px solid var(--crm-danger);
154
+ }
155
+
156
+ /* Activity Timeline */
157
+ .crm-timeline {
158
+ position: relative;
159
+ padding-left: var(--crm-space-xl);
160
+ }
161
+
162
+ .crm-timeline::before {
163
+ content: '';
164
+ position: absolute;
165
+ left: 8px;
166
+ top: 0;
167
+ bottom: 0;
168
+ width: 2px;
169
+ background: var(--crm-border);
170
+ }
171
+
172
+ .crm-timeline-item {
173
+ position: relative;
174
+ padding-bottom: var(--crm-space-lg);
175
+ }
176
+
177
+ .crm-timeline-marker {
178
+ position: absolute;
179
+ left: -28px;
180
+ top: 4px;
181
+ width: 20px;
182
+ height: 20px;
183
+ border-radius: 50%;
184
+ border: 2px solid var(--crm-bg-primary);
185
+ background: var(--crm-primary);
186
+ box-shadow: var(--crm-shadow-sm);
187
+ }
188
+
189
+ .crm-timeline-marker.call {
190
+ background: var(--activity-call);
191
+ }
192
+
193
+ .crm-timeline-marker.email {
194
+ background: var(--activity-email);
195
+ }
196
+
197
+ .crm-timeline-marker.meeting {
198
+ background: var(--activity-meeting);
199
+ }
200
+
201
+ .crm-timeline-marker.task {
202
+ background: var(--activity-task);
203
+ }
204
+
205
+ .crm-timeline-content {
206
+ background: var(--crm-bg-primary);
207
+ border: 1px solid var(--crm-border);
208
+ border-radius: var(--crm-radius-md);
209
+ padding: var(--crm-space-md);
210
+ }
211
+
212
+ /* Status Badges */
213
+ .crm-badge {
214
+ display: inline-flex;
215
+ align-items: center;
216
+ padding: var(--crm-space-xs) var(--crm-space-sm);
217
+ border-radius: var(--crm-radius-sm);
218
+ font-size: var(--crm-text-xs);
219
+ font-weight: var(--crm-font-medium);
220
+ line-height: 1;
221
+ }
222
+
223
+ .crm-badge.success {
224
+ background: rgba(16, 185, 129, 0.1);
225
+ color: var(--crm-accent);
226
+ }
227
+
228
+ .crm-badge.warning {
229
+ background: rgba(245, 158, 11, 0.1);
230
+ color: var(--crm-warning);
231
+ }
232
+
233
+ .crm-badge.danger {
234
+ background: rgba(239, 68, 68, 0.1);
235
+ color: var(--crm-danger);
236
+ }
237
+
238
+ .crm-badge.info {
239
+ background: rgba(11, 95, 255, 0.1);
240
+ color: var(--crm-primary);
241
+ }
242
+
243
+ .crm-badge.neutral {
244
+ background: rgba(107, 114, 128, 0.1);
245
+ color: var(--crm-text-secondary);
246
+ }
247
+
248
+ /* Priority indicators */
249
+ .crm-priority {
250
+ width: 8px;
251
+ height: 8px;
252
+ border-radius: 50%;
253
+ display: inline-block;
254
+ margin-right: var(--crm-space-xs);
255
+ }
256
+
257
+ .crm-priority.low {
258
+ background: var(--crm-text-tertiary);
259
+ }
260
+
261
+ .crm-priority.medium {
262
+ background: var(--crm-warning);
263
+ }
264
+
265
+ .crm-priority.high {
266
+ background: var(--crm-danger);
267
+ }
268
+
269
+ .crm-priority.urgent {
270
+ background: var(--crm-danger);
271
+ box-shadow: 0 0 8px var(--crm-danger);
272
+ }
273
+
274
+ /* Quick Filter Pills */
275
+ .crm-filters {
276
+ display: flex;
277
+ gap: var(--crm-space-sm);
278
+ flex-wrap: wrap;
279
+ margin-bottom: var(--crm-space-lg);
280
+ }
281
+
282
+ .crm-filter-pill {
283
+ display: inline-flex;
284
+ align-items: center;
285
+ padding: var(--crm-space-sm) var(--crm-space-md);
286
+ border: 1px solid var(--crm-border);
287
+ border-radius: var(--crm-radius-md);
288
+ background: var(--crm-bg-primary);
289
+ font-size: var(--crm-text-sm);
290
+ font-weight: var(--crm-font-medium);
291
+ color: var(--crm-text-secondary);
292
+ cursor: pointer;
293
+ transition: all var(--crm-transition-fast);
294
+ }
295
+
296
+ .crm-filter-pill:hover {
297
+ border-color: var(--crm-primary);
298
+ color: var(--crm-primary);
299
+ }
300
+
301
+ .crm-filter-pill.active {
302
+ background: var(--crm-primary);
303
+ border-color: var(--crm-primary);
304
+ color: var(--crm-text-inverse);
305
+ }
306
+
307
+ /* Responsive utilities */
308
+ @media (max-width: 768px) {
309
+ .crm-stage-column {
310
+ min-width: 240px;
311
+ max-width: 280px;
312
+ }
313
+
314
+ .crm-timeline {
315
+ padding-left: var(--crm-space-lg);
316
+ }
317
+
318
+ .crm-metric-value {
319
+ font-size: var(--crm-text-2xl);
320
+ }
321
+ }
322
+
323
+ /* Animation utilities */
324
+ @keyframes crm-slide-in {
325
+ from {
326
+ opacity: 0;
327
+ transform: translateY(10px);
328
+ }
329
+
330
+ to {
331
+ opacity: 1;
332
+ transform: translateY(0);
333
+ }
334
+ }
335
+
336
+ .crm-animate-in {
337
+ animation: crm-slide-in var(--crm-transition-base) ease-out;
338
+ }
339
+
340
+ /* Loading states */
341
+ .crm-skeleton {
342
+ background: linear-gradient(90deg,
343
+ var(--crm-bg-tertiary) 0%,
344
+ var(--crm-bg-secondary) 50%,
345
+ var(--crm-bg-tertiary) 100%);
346
+ background-size: 200% 100%;
347
+ animation: crm-skeleton-loading 1.5s ease-in-out infinite;
348
+ }
349
+
350
+ @keyframes crm-skeleton-loading {
351
+ 0% {
352
+ background-position: 200% 0;
353
+ }
354
+
355
+ 100% {
356
+ background-position: -200% 0;
357
+ }
358
+ }