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,495 @@
1
+ // Carousel/Slider component for JasminCSS
2
+
3
+ export function generateCarouselStyles(config) {
4
+ return `/* Carousel Base */
5
+ .carousel {
6
+ position: relative;
7
+ width: 100%;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .carousel-inner {
12
+ display: flex;
13
+ transition: transform 500ms ease-in-out;
14
+ }
15
+
16
+ .carousel-item {
17
+ flex: 0 0 100%;
18
+ min-width: 100%;
19
+ position: relative;
20
+ }
21
+
22
+ .carousel-item img {
23
+ width: 100%;
24
+ height: auto;
25
+ display: block;
26
+ }
27
+
28
+ /* Carousel Active State */
29
+ .carousel-item:not(.active) {
30
+ display: none;
31
+ }
32
+
33
+ .carousel-item.active {
34
+ display: block;
35
+ }
36
+
37
+ /* Fade Transition */
38
+ .carousel-fade .carousel-inner {
39
+ transition: none;
40
+ }
41
+
42
+ .carousel-fade .carousel-item {
43
+ position: absolute;
44
+ top: 0;
45
+ left: 0;
46
+ width: 100%;
47
+ opacity: 0;
48
+ transition: opacity 500ms ease-in-out;
49
+ }
50
+
51
+ .carousel-fade .carousel-item.active {
52
+ position: relative;
53
+ opacity: 1;
54
+ }
55
+
56
+ /* Carousel Controls */
57
+ .carousel-control {
58
+ position: absolute;
59
+ top: 50%;
60
+ transform: translateY(-50%);
61
+ z-index: 10;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ width: 3rem;
66
+ height: 3rem;
67
+ padding: 0;
68
+ background-color: rgba(255, 255, 255, 0.9);
69
+ border: none;
70
+ border-radius: 50%;
71
+ cursor: pointer;
72
+ color: var(--j-text);
73
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
74
+ transition: all 200ms ease-in-out;
75
+ opacity: 0.8;
76
+ }
77
+
78
+ .carousel-control:hover {
79
+ opacity: 1;
80
+ background-color: white;
81
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
82
+ }
83
+
84
+ .carousel-control:focus {
85
+ outline: none;
86
+ box-shadow: 0 0 0 3px var(--j-primary);
87
+ }
88
+
89
+ .carousel-control-prev {
90
+ left: 1rem;
91
+ }
92
+
93
+ .carousel-control-next {
94
+ right: 1rem;
95
+ }
96
+
97
+ .carousel-control svg,
98
+ .carousel-control-icon {
99
+ width: 1.25rem;
100
+ height: 1.25rem;
101
+ }
102
+
103
+ /* Default arrow icons */
104
+ .carousel-control-prev::before {
105
+ content: "";
106
+ width: 0.625rem;
107
+ height: 0.625rem;
108
+ border-left: 2px solid currentColor;
109
+ border-bottom: 2px solid currentColor;
110
+ transform: rotate(45deg);
111
+ margin-left: 0.125rem;
112
+ }
113
+
114
+ .carousel-control-next::before {
115
+ content: "";
116
+ width: 0.625rem;
117
+ height: 0.625rem;
118
+ border-right: 2px solid currentColor;
119
+ border-bottom: 2px solid currentColor;
120
+ transform: rotate(-45deg);
121
+ margin-right: 0.125rem;
122
+ }
123
+
124
+ .carousel-control:has(svg)::before {
125
+ display: none;
126
+ }
127
+
128
+ /* Dark Controls */
129
+ .carousel-control-dark {
130
+ background-color: rgba(0, 0, 0, 0.7);
131
+ color: white;
132
+ }
133
+
134
+ .carousel-control-dark:hover {
135
+ background-color: rgba(0, 0, 0, 0.85);
136
+ }
137
+
138
+ /* Edge Controls */
139
+ .carousel-control-edge {
140
+ border-radius: 0;
141
+ width: 2.5rem;
142
+ height: 100%;
143
+ top: 0;
144
+ transform: none;
145
+ opacity: 0;
146
+ }
147
+
148
+ .carousel:hover .carousel-control-edge {
149
+ opacity: 0.8;
150
+ }
151
+
152
+ .carousel-control-edge.carousel-control-prev {
153
+ left: 0;
154
+ }
155
+
156
+ .carousel-control-edge.carousel-control-next {
157
+ right: 0;
158
+ }
159
+
160
+ /* Carousel Indicators */
161
+ .carousel-indicators {
162
+ position: absolute;
163
+ bottom: 1rem;
164
+ left: 50%;
165
+ transform: translateX(-50%);
166
+ z-index: 10;
167
+ display: flex;
168
+ gap: 0.5rem;
169
+ padding: 0.5rem;
170
+ margin: 0;
171
+ list-style: none;
172
+ background-color: rgba(0, 0, 0, 0.3);
173
+ border-radius: var(--j-radius-full, 9999px);
174
+ }
175
+
176
+ .carousel-indicator {
177
+ width: 0.625rem;
178
+ height: 0.625rem;
179
+ padding: 0;
180
+ background-color: rgba(255, 255, 255, 0.5);
181
+ border: none;
182
+ border-radius: 50%;
183
+ cursor: pointer;
184
+ transition: all 200ms ease-in-out;
185
+ }
186
+
187
+ .carousel-indicator:hover {
188
+ background-color: rgba(255, 255, 255, 0.75);
189
+ }
190
+
191
+ .carousel-indicator.active {
192
+ background-color: white;
193
+ transform: scale(1.2);
194
+ }
195
+
196
+ /* Line Indicators */
197
+ .carousel-indicators-line .carousel-indicator {
198
+ width: 2rem;
199
+ height: 0.25rem;
200
+ border-radius: var(--j-radius-full, 9999px);
201
+ }
202
+
203
+ .carousel-indicators-line .carousel-indicator.active {
204
+ transform: none;
205
+ width: 2.5rem;
206
+ }
207
+
208
+ /* Number Indicators */
209
+ .carousel-indicators-number {
210
+ background-color: transparent;
211
+ gap: 0;
212
+ }
213
+
214
+ .carousel-indicators-number .carousel-indicator {
215
+ width: auto;
216
+ height: auto;
217
+ padding: 0.25rem 0.625rem;
218
+ background-color: rgba(0, 0, 0, 0.5);
219
+ color: white;
220
+ font-size: 0.75rem;
221
+ border-radius: 0;
222
+ }
223
+
224
+ .carousel-indicators-number .carousel-indicator:first-child {
225
+ border-radius: var(--j-radius-default, 0.375rem) 0 0 var(--j-radius-default, 0.375rem);
226
+ }
227
+
228
+ .carousel-indicators-number .carousel-indicator:last-child {
229
+ border-radius: 0 var(--j-radius-default, 0.375rem) var(--j-radius-default, 0.375rem) 0;
230
+ }
231
+
232
+ .carousel-indicators-number .carousel-indicator.active {
233
+ background-color: var(--j-primary);
234
+ }
235
+
236
+ /* Bottom Indicators */
237
+ .carousel-indicators-bottom {
238
+ position: relative;
239
+ bottom: auto;
240
+ left: auto;
241
+ transform: none;
242
+ margin-top: 1rem;
243
+ justify-content: center;
244
+ }
245
+
246
+ /* Carousel Captions */
247
+ .carousel-caption {
248
+ position: absolute;
249
+ bottom: 2rem;
250
+ left: 50%;
251
+ transform: translateX(-50%);
252
+ z-index: 10;
253
+ max-width: 80%;
254
+ padding: 1rem 1.5rem;
255
+ text-align: center;
256
+ color: white;
257
+ background-color: rgba(0, 0, 0, 0.6);
258
+ border-radius: var(--j-radius-lg, 0.5rem);
259
+ }
260
+
261
+ .carousel-caption-title {
262
+ margin: 0 0 0.5rem;
263
+ font-size: 1.25rem;
264
+ font-weight: 600;
265
+ }
266
+
267
+ .carousel-caption-text {
268
+ margin: 0;
269
+ font-size: 0.875rem;
270
+ opacity: 0.9;
271
+ }
272
+
273
+ /* Bottom Caption */
274
+ .carousel-caption-bottom {
275
+ bottom: 0;
276
+ left: 0;
277
+ right: 0;
278
+ transform: none;
279
+ max-width: 100%;
280
+ border-radius: 0;
281
+ padding: 1.5rem;
282
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
283
+ }
284
+
285
+ /* Multiple Items Carousel */
286
+ .carousel-multi .carousel-inner {
287
+ display: flex;
288
+ }
289
+
290
+ .carousel-multi .carousel-item {
291
+ flex: 0 0 auto;
292
+ display: block;
293
+ }
294
+
295
+ .carousel-multi-2 .carousel-item {
296
+ width: 50%;
297
+ min-width: 50%;
298
+ }
299
+
300
+ .carousel-multi-3 .carousel-item {
301
+ width: 33.333%;
302
+ min-width: 33.333%;
303
+ }
304
+
305
+ .carousel-multi-4 .carousel-item {
306
+ width: 25%;
307
+ min-width: 25%;
308
+ }
309
+
310
+ .carousel-multi-5 .carousel-item {
311
+ width: 20%;
312
+ min-width: 20%;
313
+ }
314
+
315
+ /* Carousel with Gap */
316
+ .carousel-gap .carousel-item {
317
+ padding: 0 0.5rem;
318
+ }
319
+
320
+ .carousel-gap-lg .carousel-item {
321
+ padding: 0 1rem;
322
+ }
323
+
324
+ /* Thumbnail Navigation */
325
+ .carousel-thumbnails {
326
+ display: flex;
327
+ gap: 0.5rem;
328
+ margin-top: 1rem;
329
+ overflow-x: auto;
330
+ padding: 0.25rem;
331
+ }
332
+
333
+ .carousel-thumbnail {
334
+ flex: 0 0 auto;
335
+ width: 4rem;
336
+ height: 4rem;
337
+ padding: 0;
338
+ border: 2px solid transparent;
339
+ border-radius: var(--j-radius-default, 0.375rem);
340
+ overflow: hidden;
341
+ cursor: pointer;
342
+ opacity: 0.6;
343
+ transition: all 200ms ease-in-out;
344
+ }
345
+
346
+ .carousel-thumbnail:hover {
347
+ opacity: 0.8;
348
+ }
349
+
350
+ .carousel-thumbnail.active {
351
+ border-color: var(--j-primary);
352
+ opacity: 1;
353
+ }
354
+
355
+ .carousel-thumbnail img {
356
+ width: 100%;
357
+ height: 100%;
358
+ object-fit: cover;
359
+ }
360
+
361
+ /* Progress Bar */
362
+ .carousel-progress {
363
+ position: absolute;
364
+ bottom: 0;
365
+ left: 0;
366
+ right: 0;
367
+ height: 0.25rem;
368
+ background-color: rgba(255, 255, 255, 0.3);
369
+ z-index: 10;
370
+ }
371
+
372
+ .carousel-progress-bar {
373
+ height: 100%;
374
+ background-color: var(--j-primary);
375
+ transition: width linear;
376
+ }
377
+
378
+ /* Autoplay Indicator */
379
+ .carousel-autoplay-indicator {
380
+ position: absolute;
381
+ top: 1rem;
382
+ right: 1rem;
383
+ z-index: 10;
384
+ display: flex;
385
+ align-items: center;
386
+ justify-content: center;
387
+ width: 2rem;
388
+ height: 2rem;
389
+ background-color: rgba(0, 0, 0, 0.5);
390
+ border-radius: 50%;
391
+ color: white;
392
+ }
393
+
394
+ /* Vertical Carousel */
395
+ .carousel-vertical .carousel-inner {
396
+ flex-direction: column;
397
+ }
398
+
399
+ .carousel-vertical .carousel-item {
400
+ min-width: auto;
401
+ min-height: 100%;
402
+ }
403
+
404
+ .carousel-vertical .carousel-control-prev {
405
+ top: 1rem;
406
+ left: 50%;
407
+ transform: translateX(-50%) rotate(90deg);
408
+ }
409
+
410
+ .carousel-vertical .carousel-control-next {
411
+ top: auto;
412
+ bottom: 1rem;
413
+ left: 50%;
414
+ transform: translateX(-50%) rotate(90deg);
415
+ }
416
+
417
+ .carousel-vertical .carousel-indicators {
418
+ flex-direction: column;
419
+ top: 50%;
420
+ bottom: auto;
421
+ left: auto;
422
+ right: 1rem;
423
+ transform: translateY(-50%);
424
+ }
425
+
426
+ /* Card Carousel */
427
+ .carousel-cards .carousel-item {
428
+ padding: 1rem;
429
+ }
430
+
431
+ /* Fullscreen Carousel */
432
+ .carousel-fullscreen {
433
+ position: fixed;
434
+ top: 0;
435
+ left: 0;
436
+ width: 100vw;
437
+ height: 100vh;
438
+ z-index: 9999;
439
+ background-color: black;
440
+ }
441
+
442
+ .carousel-fullscreen .carousel-item img {
443
+ width: 100%;
444
+ height: 100vh;
445
+ object-fit: contain;
446
+ }
447
+
448
+ /* Lightbox Close */
449
+ .carousel-fullscreen-close {
450
+ position: absolute;
451
+ top: 1rem;
452
+ right: 1rem;
453
+ z-index: 10;
454
+ width: 3rem;
455
+ height: 3rem;
456
+ display: flex;
457
+ align-items: center;
458
+ justify-content: center;
459
+ background-color: rgba(255, 255, 255, 0.1);
460
+ border: none;
461
+ border-radius: 50%;
462
+ color: white;
463
+ cursor: pointer;
464
+ font-size: 1.5rem;
465
+ transition: background-color 200ms ease-in-out;
466
+ }
467
+
468
+ .carousel-fullscreen-close:hover {
469
+ background-color: rgba(255, 255, 255, 0.2);
470
+ }
471
+
472
+ /* Responsive */
473
+ @media (max-width: 768px) {
474
+ .carousel-control {
475
+ width: 2.5rem;
476
+ height: 2.5rem;
477
+ }
478
+
479
+ .carousel-control-prev {
480
+ left: 0.5rem;
481
+ }
482
+
483
+ .carousel-control-next {
484
+ right: 0.5rem;
485
+ }
486
+
487
+ .carousel-multi-3 .carousel-item,
488
+ .carousel-multi-4 .carousel-item,
489
+ .carousel-multi-5 .carousel-item {
490
+ width: 50%;
491
+ min-width: 50%;
492
+ }
493
+ }
494
+ `;
495
+ }