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,412 @@
1
+ export function generateButtonStyles(config) {
2
+ return `/* Button Base */
3
+ .btn {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: 0.5rem;
8
+ padding: 0.625rem 1.25rem;
9
+ font-size: 0.875rem;
10
+ font-weight: 500;
11
+ line-height: 1.25rem;
12
+ border-radius: var(--j-radius-default, 0.5rem);
13
+ border: 1px solid transparent;
14
+ cursor: pointer;
15
+ transition: all 150ms ease-in-out;
16
+ text-decoration: none;
17
+ white-space: nowrap;
18
+ user-select: none;
19
+ }
20
+
21
+ .btn:focus-visible {
22
+ outline: 2px solid var(--j-ring, var(--j-primary));
23
+ outline-offset: 2px;
24
+ }
25
+
26
+ .btn:disabled,
27
+ .btn[disabled] {
28
+ opacity: 0.5;
29
+ cursor: not-allowed;
30
+ pointer-events: none;
31
+ }
32
+
33
+ /* Button Sizes */
34
+ .btn-xs {
35
+ padding: 0.25rem 0.625rem;
36
+ font-size: 0.75rem;
37
+ line-height: 1rem;
38
+ gap: 0.25rem;
39
+ }
40
+
41
+ .btn-sm {
42
+ padding: 0.5rem 1rem;
43
+ font-size: 0.8125rem;
44
+ line-height: 1.125rem;
45
+ }
46
+
47
+ .btn-lg {
48
+ padding: 0.75rem 1.5rem;
49
+ font-size: 1rem;
50
+ line-height: 1.5rem;
51
+ }
52
+
53
+ .btn-xl {
54
+ padding: 1rem 2rem;
55
+ font-size: 1.125rem;
56
+ line-height: 1.75rem;
57
+ }
58
+
59
+ /* Primary Button */
60
+ .btn-primary {
61
+ background-color: var(--j-primary);
62
+ color: white;
63
+ border-color: var(--j-primary);
64
+ }
65
+
66
+ .btn-primary:hover {
67
+ filter: brightness(1.1);
68
+ transform: translateY(-1px);
69
+ }
70
+
71
+ .btn-primary:active {
72
+ filter: brightness(0.95);
73
+ transform: translateY(0);
74
+ }
75
+
76
+ /* Secondary Button */
77
+ .btn-secondary {
78
+ background-color: var(--j-secondary);
79
+ color: white;
80
+ border-color: var(--j-secondary);
81
+ }
82
+
83
+ .btn-secondary:hover {
84
+ filter: brightness(1.1);
85
+ transform: translateY(-1px);
86
+ }
87
+
88
+ /* Accent Button */
89
+ .btn-accent {
90
+ background-color: var(--j-accent);
91
+ color: white;
92
+ border-color: var(--j-accent);
93
+ }
94
+
95
+ .btn-accent:hover {
96
+ filter: brightness(1.1);
97
+ transform: translateY(-1px);
98
+ }
99
+
100
+ /* Success Button */
101
+ .btn-success {
102
+ background-color: var(--j-success);
103
+ color: white;
104
+ border-color: var(--j-success);
105
+ }
106
+
107
+ .btn-success:hover {
108
+ filter: brightness(1.1);
109
+ }
110
+
111
+ /* Warning Button */
112
+ .btn-warning {
113
+ background-color: var(--j-warning);
114
+ color: white;
115
+ border-color: var(--j-warning);
116
+ }
117
+
118
+ .btn-warning:hover {
119
+ filter: brightness(1.1);
120
+ }
121
+
122
+ /* Error/Danger Button */
123
+ .btn-error,
124
+ .btn-danger {
125
+ background-color: var(--j-error);
126
+ color: white;
127
+ border-color: var(--j-error);
128
+ }
129
+
130
+ .btn-error:hover,
131
+ .btn-danger:hover {
132
+ filter: brightness(1.1);
133
+ }
134
+
135
+ /* Info Button */
136
+ .btn-info {
137
+ background-color: var(--j-info);
138
+ color: white;
139
+ border-color: var(--j-info);
140
+ }
141
+
142
+ .btn-info:hover {
143
+ filter: brightness(1.1);
144
+ }
145
+
146
+ /* Outline Variants */
147
+ .btn-outline {
148
+ background-color: transparent;
149
+ border-color: currentColor;
150
+ }
151
+
152
+ .btn-outline-primary {
153
+ background-color: transparent;
154
+ color: var(--j-primary);
155
+ border-color: var(--j-primary);
156
+ }
157
+
158
+ .btn-outline-primary:hover {
159
+ background-color: var(--j-primary);
160
+ color: white;
161
+ }
162
+
163
+ .btn-outline-secondary {
164
+ background-color: transparent;
165
+ color: var(--j-secondary);
166
+ border-color: var(--j-secondary);
167
+ }
168
+
169
+ .btn-outline-secondary:hover {
170
+ background-color: var(--j-secondary);
171
+ color: white;
172
+ }
173
+
174
+ .btn-outline-accent {
175
+ background-color: transparent;
176
+ color: var(--j-accent);
177
+ border-color: var(--j-accent);
178
+ }
179
+
180
+ .btn-outline-accent:hover {
181
+ background-color: var(--j-accent);
182
+ color: white;
183
+ }
184
+
185
+ .btn-outline-error,
186
+ .btn-outline-danger {
187
+ background-color: transparent;
188
+ color: var(--j-error);
189
+ border-color: var(--j-error);
190
+ }
191
+
192
+ .btn-outline-error:hover,
193
+ .btn-outline-danger:hover {
194
+ background-color: var(--j-error);
195
+ color: white;
196
+ }
197
+
198
+ /* Ghost Button */
199
+ .btn-ghost {
200
+ background-color: transparent;
201
+ border-color: transparent;
202
+ color: var(--j-text);
203
+ }
204
+
205
+ .btn-ghost:hover {
206
+ background-color: var(--j-bg-subtle);
207
+ }
208
+
209
+ .btn-ghost-primary {
210
+ background-color: transparent;
211
+ border-color: transparent;
212
+ color: var(--j-primary);
213
+ }
214
+
215
+ .btn-ghost-primary:hover {
216
+ background-color: color-mix(in srgb, var(--j-primary) 10%, transparent);
217
+ }
218
+
219
+ /* Soft/Light Variants */
220
+ .btn-soft-primary {
221
+ background-color: color-mix(in srgb, var(--j-primary) 15%, transparent);
222
+ color: var(--j-primary);
223
+ border-color: transparent;
224
+ }
225
+
226
+ .btn-soft-primary:hover {
227
+ background-color: color-mix(in srgb, var(--j-primary) 25%, transparent);
228
+ }
229
+
230
+ .btn-soft-secondary {
231
+ background-color: color-mix(in srgb, var(--j-secondary) 15%, transparent);
232
+ color: var(--j-secondary);
233
+ border-color: transparent;
234
+ }
235
+
236
+ .btn-soft-secondary:hover {
237
+ background-color: color-mix(in srgb, var(--j-secondary) 25%, transparent);
238
+ }
239
+
240
+ .btn-soft-success {
241
+ background-color: color-mix(in srgb, var(--j-success) 15%, transparent);
242
+ color: var(--j-success);
243
+ border-color: transparent;
244
+ }
245
+
246
+ .btn-soft-error {
247
+ background-color: color-mix(in srgb, var(--j-error) 15%, transparent);
248
+ color: var(--j-error);
249
+ border-color: transparent;
250
+ }
251
+
252
+ /* Link Button */
253
+ .btn-link {
254
+ background-color: transparent;
255
+ border-color: transparent;
256
+ color: var(--j-primary);
257
+ padding: 0;
258
+ text-decoration: underline;
259
+ text-underline-offset: 2px;
260
+ }
261
+
262
+ .btn-link:hover {
263
+ text-decoration-thickness: 2px;
264
+ }
265
+
266
+ /* Glow Button (Futuristic) */
267
+ .btn-glow {
268
+ background-color: var(--j-primary);
269
+ color: white;
270
+ border-color: var(--j-primary);
271
+ box-shadow: 0 0 20px color-mix(in srgb, var(--j-primary) 50%, transparent);
272
+ }
273
+
274
+ .btn-glow:hover {
275
+ box-shadow: 0 0 30px color-mix(in srgb, var(--j-primary) 70%, transparent);
276
+ transform: translateY(-2px);
277
+ }
278
+
279
+ .btn-glow-secondary {
280
+ background-color: var(--j-secondary);
281
+ color: white;
282
+ border-color: var(--j-secondary);
283
+ box-shadow: 0 0 20px color-mix(in srgb, var(--j-secondary) 50%, transparent);
284
+ }
285
+
286
+ .btn-glow-secondary:hover {
287
+ box-shadow: 0 0 30px color-mix(in srgb, var(--j-secondary) 70%, transparent);
288
+ }
289
+
290
+ /* Gradient Button */
291
+ .btn-gradient {
292
+ background: linear-gradient(135deg, var(--j-primary), var(--j-secondary));
293
+ color: white;
294
+ border: none;
295
+ }
296
+
297
+ .btn-gradient:hover {
298
+ background: linear-gradient(135deg, var(--j-secondary), var(--j-primary));
299
+ transform: translateY(-1px);
300
+ }
301
+
302
+ /* Glass Button */
303
+ .btn-glass {
304
+ background: rgba(255, 255, 255, 0.1);
305
+ backdrop-filter: blur(12px);
306
+ -webkit-backdrop-filter: blur(12px);
307
+ border: 1px solid rgba(255, 255, 255, 0.2);
308
+ color: white;
309
+ }
310
+
311
+ .btn-glass:hover {
312
+ background: rgba(255, 255, 255, 0.2);
313
+ }
314
+
315
+ /* Icon Button */
316
+ .btn-icon {
317
+ padding: 0.625rem;
318
+ aspect-ratio: 1;
319
+ }
320
+
321
+ .btn-icon.btn-xs {
322
+ padding: 0.25rem;
323
+ }
324
+
325
+ .btn-icon.btn-sm {
326
+ padding: 0.5rem;
327
+ }
328
+
329
+ .btn-icon.btn-lg {
330
+ padding: 0.75rem;
331
+ }
332
+
333
+ .btn-icon.btn-xl {
334
+ padding: 1rem;
335
+ }
336
+
337
+ /* Rounded/Pill Button */
338
+ .btn-pill {
339
+ border-radius: 9999px;
340
+ }
341
+
342
+ /* Full Width */
343
+ .btn-block {
344
+ width: 100%;
345
+ }
346
+
347
+ /* Button Group */
348
+ .btn-group {
349
+ display: inline-flex;
350
+ }
351
+
352
+ .btn-group > .btn {
353
+ border-radius: 0;
354
+ }
355
+
356
+ .btn-group > .btn:first-child {
357
+ border-top-left-radius: var(--j-radius-default, 0.5rem);
358
+ border-bottom-left-radius: var(--j-radius-default, 0.5rem);
359
+ }
360
+
361
+ .btn-group > .btn:last-child {
362
+ border-top-right-radius: var(--j-radius-default, 0.5rem);
363
+ border-bottom-right-radius: var(--j-radius-default, 0.5rem);
364
+ }
365
+
366
+ .btn-group > .btn:not(:last-child) {
367
+ border-right-width: 0;
368
+ }
369
+
370
+ .btn-group-vertical {
371
+ display: inline-flex;
372
+ flex-direction: column;
373
+ }
374
+
375
+ .btn-group-vertical > .btn {
376
+ border-radius: 0;
377
+ }
378
+
379
+ .btn-group-vertical > .btn:first-child {
380
+ border-top-left-radius: var(--j-radius-default, 0.5rem);
381
+ border-top-right-radius: var(--j-radius-default, 0.5rem);
382
+ }
383
+
384
+ .btn-group-vertical > .btn:last-child {
385
+ border-bottom-left-radius: var(--j-radius-default, 0.5rem);
386
+ border-bottom-right-radius: var(--j-radius-default, 0.5rem);
387
+ }
388
+
389
+ .btn-group-vertical > .btn:not(:last-child) {
390
+ border-bottom-width: 0;
391
+ }
392
+
393
+ /* Loading State */
394
+ .btn-loading {
395
+ position: relative;
396
+ color: transparent !important;
397
+ pointer-events: none;
398
+ }
399
+
400
+ .btn-loading::after {
401
+ content: "";
402
+ position: absolute;
403
+ width: 1em;
404
+ height: 1em;
405
+ border: 2px solid currentColor;
406
+ border-right-color: transparent;
407
+ border-radius: 50%;
408
+ animation: j-spin 0.6s linear infinite;
409
+ color: white;
410
+ }
411
+ `;
412
+ }