jasmincss 1.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.
Files changed (76) hide show
  1. package/README.md +524 -0
  2. package/bin/jasmin.js +45 -0
  3. package/dist/index.d.ts +62 -0
  4. package/dist/index.js +14568 -0
  5. package/dist/index.mjs +14524 -0
  6. package/dist/jasmin.css +63308 -0
  7. package/dist/jasmin.min.css +1 -0
  8. package/dist/plugins/nextjs.js +14777 -0
  9. package/dist/plugins/nextjs.mjs +14747 -0
  10. package/dist/plugins/vite.js +14889 -0
  11. package/dist/plugins/vite.mjs +14860 -0
  12. package/package.json +101 -0
  13. package/src/cli/add.js +83 -0
  14. package/src/cli/init.js +210 -0
  15. package/src/cli/run.js +142 -0
  16. package/src/components/accordion.js +309 -0
  17. package/src/components/alerts.js +357 -0
  18. package/src/components/avatars.js +331 -0
  19. package/src/components/badges.js +353 -0
  20. package/src/components/buttons.js +412 -0
  21. package/src/components/cards.js +342 -0
  22. package/src/components/carousel.js +495 -0
  23. package/src/components/chips.js +440 -0
  24. package/src/components/command-palette.js +434 -0
  25. package/src/components/datepicker.js +517 -0
  26. package/src/components/dropdown.js +411 -0
  27. package/src/components/forms.js +516 -0
  28. package/src/components/index.js +81 -0
  29. package/src/components/modals.js +349 -0
  30. package/src/components/navigation.js +463 -0
  31. package/src/components/offcanvas.js +390 -0
  32. package/src/components/popover.js +427 -0
  33. package/src/components/progress.js +396 -0
  34. package/src/components/rating.js +394 -0
  35. package/src/components/skeleton.js +408 -0
  36. package/src/components/spinner.js +453 -0
  37. package/src/components/stepper.js +389 -0
  38. package/src/components/tables.js +304 -0
  39. package/src/components/timeline.js +452 -0
  40. package/src/components/timepicker.js +529 -0
  41. package/src/components/tooltips.js +345 -0
  42. package/src/components/upload.js +490 -0
  43. package/src/config/defaults.js +263 -0
  44. package/src/config/loader.js +109 -0
  45. package/src/core/base.js +241 -0
  46. package/src/core/compiler.js +135 -0
  47. package/src/core/utilities/accessibility.js +290 -0
  48. package/src/core/utilities/animations.js +205 -0
  49. package/src/core/utilities/background.js +109 -0
  50. package/src/core/utilities/colors.js +234 -0
  51. package/src/core/utilities/columns.js +161 -0
  52. package/src/core/utilities/effects.js +261 -0
  53. package/src/core/utilities/filters.js +135 -0
  54. package/src/core/utilities/icons.js +806 -0
  55. package/src/core/utilities/index.js +239 -0
  56. package/src/core/utilities/layout.js +321 -0
  57. package/src/core/utilities/scroll.js +205 -0
  58. package/src/core/utilities/spacing.js +120 -0
  59. package/src/core/utilities/svg.js +191 -0
  60. package/src/core/utilities/transforms.js +116 -0
  61. package/src/core/utilities/typography.js +188 -0
  62. package/src/index.js +7 -0
  63. package/src/js/components/accordion.js +154 -0
  64. package/src/js/components/alert.js +198 -0
  65. package/src/js/components/carousel.js +226 -0
  66. package/src/js/components/dropdown.js +166 -0
  67. package/src/js/components/modal.js +169 -0
  68. package/src/js/components/offcanvas.js +175 -0
  69. package/src/js/components/popover.js +221 -0
  70. package/src/js/components/tabs.js +163 -0
  71. package/src/js/components/tooltip.js +200 -0
  72. package/src/js/index.js +79 -0
  73. package/src/js/types/config.d.ts +228 -0
  74. package/src/js/types/index.d.ts +439 -0
  75. package/src/plugins/nextjs.js +100 -0
  76. package/src/plugins/vite.js +133 -0
@@ -0,0 +1,452 @@
1
+ // Timeline component for JasminCSS
2
+
3
+ export function generateTimelineStyles(config) {
4
+ return `/* Timeline Base */
5
+ .timeline {
6
+ position: relative;
7
+ padding: 0;
8
+ margin: 0;
9
+ list-style: none;
10
+ }
11
+
12
+ /* Timeline Line */
13
+ .timeline::before {
14
+ content: "";
15
+ position: absolute;
16
+ top: 0;
17
+ bottom: 0;
18
+ left: 1.25rem;
19
+ width: 2px;
20
+ background-color: var(--j-border);
21
+ }
22
+
23
+ /* Timeline Item */
24
+ .timeline-item {
25
+ position: relative;
26
+ padding-left: 3.5rem;
27
+ padding-bottom: 2rem;
28
+ }
29
+
30
+ .timeline-item:last-child {
31
+ padding-bottom: 0;
32
+ }
33
+
34
+ /* Timeline Marker */
35
+ .timeline-marker {
36
+ position: absolute;
37
+ left: 0;
38
+ top: 0;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ width: 2.5rem;
43
+ height: 2.5rem;
44
+ border-radius: 50%;
45
+ background-color: var(--j-bg);
46
+ border: 2px solid var(--j-border);
47
+ color: var(--j-text-muted);
48
+ z-index: 1;
49
+ }
50
+
51
+ .timeline-marker-icon {
52
+ width: 1rem;
53
+ height: 1rem;
54
+ }
55
+
56
+ /* Timeline Marker Colors */
57
+ .timeline-item-primary .timeline-marker {
58
+ background-color: var(--j-primary);
59
+ border-color: var(--j-primary);
60
+ color: white;
61
+ }
62
+
63
+ .timeline-item-secondary .timeline-marker {
64
+ background-color: var(--j-secondary);
65
+ border-color: var(--j-secondary);
66
+ color: white;
67
+ }
68
+
69
+ .timeline-item-success .timeline-marker {
70
+ background-color: var(--j-success);
71
+ border-color: var(--j-success);
72
+ color: white;
73
+ }
74
+
75
+ .timeline-item-warning .timeline-marker {
76
+ background-color: var(--j-warning);
77
+ border-color: var(--j-warning);
78
+ color: white;
79
+ }
80
+
81
+ .timeline-item-error .timeline-marker {
82
+ background-color: var(--j-error);
83
+ border-color: var(--j-error);
84
+ color: white;
85
+ }
86
+
87
+ .timeline-item-info .timeline-marker {
88
+ background-color: var(--j-info);
89
+ border-color: var(--j-info);
90
+ color: white;
91
+ }
92
+
93
+ /* Timeline Dot Marker */
94
+ .timeline-dot .timeline-marker {
95
+ width: 1rem;
96
+ height: 1rem;
97
+ left: 0.75rem;
98
+ }
99
+
100
+ .timeline-dot::before {
101
+ left: 1.1875rem;
102
+ }
103
+
104
+ .timeline-dot .timeline-item {
105
+ padding-left: 3rem;
106
+ }
107
+
108
+ /* Timeline Content */
109
+ .timeline-content {
110
+ background-color: var(--j-bg);
111
+ border: 1px solid var(--j-border);
112
+ border-radius: var(--j-radius-lg, 0.5rem);
113
+ padding: 1rem 1.25rem;
114
+ position: relative;
115
+ }
116
+
117
+ /* Timeline Content Arrow */
118
+ .timeline-content::before {
119
+ content: "";
120
+ position: absolute;
121
+ top: 0.75rem;
122
+ left: -0.5rem;
123
+ width: 0.75rem;
124
+ height: 0.75rem;
125
+ background-color: var(--j-bg);
126
+ border-left: 1px solid var(--j-border);
127
+ border-bottom: 1px solid var(--j-border);
128
+ transform: rotate(45deg);
129
+ }
130
+
131
+ /* Timeline Header */
132
+ .timeline-header {
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: space-between;
136
+ gap: 1rem;
137
+ margin-bottom: 0.5rem;
138
+ }
139
+
140
+ .timeline-title {
141
+ margin: 0;
142
+ font-size: 1rem;
143
+ font-weight: 600;
144
+ color: var(--j-text);
145
+ }
146
+
147
+ .timeline-time {
148
+ font-size: 0.75rem;
149
+ color: var(--j-text-muted);
150
+ white-space: nowrap;
151
+ }
152
+
153
+ .timeline-body {
154
+ font-size: 0.875rem;
155
+ color: var(--j-text-muted);
156
+ }
157
+
158
+ .timeline-body p {
159
+ margin: 0;
160
+ }
161
+
162
+ .timeline-body p + p {
163
+ margin-top: 0.5rem;
164
+ }
165
+
166
+ /* Timeline Footer */
167
+ .timeline-footer {
168
+ display: flex;
169
+ align-items: center;
170
+ gap: 0.75rem;
171
+ margin-top: 0.75rem;
172
+ padding-top: 0.75rem;
173
+ border-top: 1px solid var(--j-border);
174
+ }
175
+
176
+ /* Center Timeline */
177
+ .timeline-center::before {
178
+ left: 50%;
179
+ transform: translateX(-50%);
180
+ }
181
+
182
+ .timeline-center .timeline-item {
183
+ width: 50%;
184
+ padding-left: 0;
185
+ padding-right: 3.5rem;
186
+ }
187
+
188
+ .timeline-center .timeline-item:nth-child(even) {
189
+ margin-left: 50%;
190
+ padding-left: 3.5rem;
191
+ padding-right: 0;
192
+ }
193
+
194
+ .timeline-center .timeline-marker {
195
+ left: auto;
196
+ right: -1.25rem;
197
+ }
198
+
199
+ .timeline-center .timeline-item:nth-child(even) .timeline-marker {
200
+ left: -1.25rem;
201
+ right: auto;
202
+ }
203
+
204
+ .timeline-center .timeline-content::before {
205
+ left: auto;
206
+ right: -0.5rem;
207
+ transform: rotate(-135deg);
208
+ }
209
+
210
+ .timeline-center .timeline-item:nth-child(even) .timeline-content::before {
211
+ left: -0.5rem;
212
+ right: auto;
213
+ transform: rotate(45deg);
214
+ }
215
+
216
+ /* Right Timeline */
217
+ .timeline-right::before {
218
+ left: auto;
219
+ right: 1.25rem;
220
+ }
221
+
222
+ .timeline-right .timeline-item {
223
+ padding-left: 0;
224
+ padding-right: 3.5rem;
225
+ text-align: right;
226
+ }
227
+
228
+ .timeline-right .timeline-marker {
229
+ left: auto;
230
+ right: 0;
231
+ }
232
+
233
+ .timeline-right .timeline-content::before {
234
+ left: auto;
235
+ right: -0.5rem;
236
+ transform: rotate(-135deg);
237
+ }
238
+
239
+ /* Timeline Sizes */
240
+ .timeline-sm .timeline-marker {
241
+ width: 2rem;
242
+ height: 2rem;
243
+ }
244
+
245
+ .timeline-sm::before {
246
+ left: 1rem;
247
+ }
248
+
249
+ .timeline-sm .timeline-item {
250
+ padding-left: 3rem;
251
+ }
252
+
253
+ .timeline-sm .timeline-content {
254
+ padding: 0.75rem 1rem;
255
+ }
256
+
257
+ .timeline-lg .timeline-marker {
258
+ width: 3rem;
259
+ height: 3rem;
260
+ }
261
+
262
+ .timeline-lg::before {
263
+ left: 1.5rem;
264
+ }
265
+
266
+ .timeline-lg .timeline-item {
267
+ padding-left: 4rem;
268
+ }
269
+
270
+ /* Timeline Simple (no cards) */
271
+ .timeline-simple .timeline-content {
272
+ background: none;
273
+ border: none;
274
+ padding: 0;
275
+ }
276
+
277
+ .timeline-simple .timeline-content::before {
278
+ display: none;
279
+ }
280
+
281
+ /* Timeline Compact */
282
+ .timeline-compact .timeline-item {
283
+ padding-bottom: 1rem;
284
+ }
285
+
286
+ .timeline-compact .timeline-content {
287
+ padding: 0.5rem 0.75rem;
288
+ }
289
+
290
+ /* Timeline with Images */
291
+ .timeline-image {
292
+ margin-top: 0.75rem;
293
+ border-radius: var(--j-radius-default, 0.375rem);
294
+ overflow: hidden;
295
+ }
296
+
297
+ .timeline-image img {
298
+ width: 100%;
299
+ height: auto;
300
+ display: block;
301
+ }
302
+
303
+ /* Timeline Activity Feed */
304
+ .timeline-feed .timeline-marker {
305
+ width: 2rem;
306
+ height: 2rem;
307
+ }
308
+
309
+ .timeline-feed::before {
310
+ left: 1rem;
311
+ }
312
+
313
+ .timeline-feed .timeline-item {
314
+ padding-left: 2.75rem;
315
+ padding-bottom: 1rem;
316
+ }
317
+
318
+ .timeline-feed .timeline-content {
319
+ background: none;
320
+ border: none;
321
+ padding: 0;
322
+ }
323
+
324
+ .timeline-feed .timeline-content::before {
325
+ display: none;
326
+ }
327
+
328
+ .timeline-feed .timeline-title {
329
+ font-size: 0.875rem;
330
+ font-weight: 500;
331
+ }
332
+
333
+ .timeline-feed .timeline-body {
334
+ font-size: 0.8125rem;
335
+ }
336
+
337
+ /* Timeline with Avatar */
338
+ .timeline-avatar .timeline-marker {
339
+ padding: 0;
340
+ overflow: hidden;
341
+ }
342
+
343
+ .timeline-avatar .timeline-marker img {
344
+ width: 100%;
345
+ height: 100%;
346
+ object-fit: cover;
347
+ }
348
+
349
+ /* Horizontal Timeline */
350
+ .timeline-horizontal {
351
+ display: flex;
352
+ overflow-x: auto;
353
+ padding-bottom: 1rem;
354
+ }
355
+
356
+ .timeline-horizontal::before {
357
+ top: 1.25rem;
358
+ bottom: auto;
359
+ left: 0;
360
+ right: 0;
361
+ width: auto;
362
+ height: 2px;
363
+ }
364
+
365
+ .timeline-horizontal .timeline-item {
366
+ flex: 0 0 auto;
367
+ width: 200px;
368
+ padding-left: 0;
369
+ padding-top: 3.5rem;
370
+ padding-bottom: 0;
371
+ padding-right: 1rem;
372
+ }
373
+
374
+ .timeline-horizontal .timeline-marker {
375
+ top: 0;
376
+ left: 50%;
377
+ transform: translateX(-50%);
378
+ }
379
+
380
+ .timeline-horizontal .timeline-content::before {
381
+ top: -0.5rem;
382
+ left: 50%;
383
+ transform: translateX(-50%) rotate(135deg);
384
+ }
385
+
386
+ /* Glow Timeline (Futuristic) */
387
+ .timeline-glow .timeline-item-primary .timeline-marker {
388
+ box-shadow: 0 0 15px var(--j-primary);
389
+ }
390
+
391
+ .timeline-glow .timeline-item-success .timeline-marker {
392
+ box-shadow: 0 0 15px var(--j-success);
393
+ }
394
+
395
+ .timeline-glow .timeline-item-warning .timeline-marker {
396
+ box-shadow: 0 0 15px var(--j-warning);
397
+ }
398
+
399
+ .timeline-glow .timeline-item-error .timeline-marker {
400
+ box-shadow: 0 0 15px var(--j-error);
401
+ }
402
+
403
+ /* Dark Timeline */
404
+ .timeline-dark .timeline-content {
405
+ background-color: var(--j-bg-dark, #1f2937);
406
+ border-color: var(--j-border-dark, #374151);
407
+ color: white;
408
+ }
409
+
410
+ .timeline-dark .timeline-title {
411
+ color: white;
412
+ }
413
+
414
+ .timeline-dark .timeline-body {
415
+ color: rgba(255, 255, 255, 0.7);
416
+ }
417
+
418
+ .timeline-dark .timeline-content::before {
419
+ background-color: var(--j-bg-dark, #1f2937);
420
+ border-color: var(--j-border-dark, #374151);
421
+ }
422
+
423
+ /* Responsive */
424
+ @media (max-width: 768px) {
425
+ .timeline-center::before {
426
+ left: 1.25rem;
427
+ transform: none;
428
+ }
429
+
430
+ .timeline-center .timeline-item,
431
+ .timeline-center .timeline-item:nth-child(even) {
432
+ width: 100%;
433
+ margin-left: 0;
434
+ padding-left: 3.5rem;
435
+ padding-right: 0;
436
+ }
437
+
438
+ .timeline-center .timeline-marker,
439
+ .timeline-center .timeline-item:nth-child(even) .timeline-marker {
440
+ left: 0;
441
+ right: auto;
442
+ }
443
+
444
+ .timeline-center .timeline-content::before,
445
+ .timeline-center .timeline-item:nth-child(even) .timeline-content::before {
446
+ left: -0.5rem;
447
+ right: auto;
448
+ transform: rotate(45deg);
449
+ }
450
+ }
451
+ `;
452
+ }