@insforge/nextjs 0.7.3 → 0.7.5

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.
package/src/styles.css CHANGED
@@ -1,737 +1,14 @@
1
1
  /**
2
2
  * InsForge Next.js Component Library Styles
3
- * A standalone CSS file for auth components - no Tailwind required!
3
+ * Powered by Tailwind CSS 4.1
4
4
  */
5
5
 
6
- /* Font Face Declaration */
7
- @font-face {
8
- font-family: 'Manrope';
9
- src: url('./fonts/Manrope-VariableFont_wght.ttf') format('truetype');
10
- font-weight: 100 900;
11
- font-style: normal;
12
- font-display: swap;
13
- }
14
-
15
- /* CSS Variables */
16
- :root {
17
- --font-manrope: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
18
- }
19
-
20
- /* Reset and Base Styles */
21
- .insforge-auth-container * {
22
- box-sizing: border-box;
23
- }
24
-
25
- /* Main Container - App handles layout, we just provide the card */
26
- .insforge-auth-container {
27
- width: 100%;
28
- max-width: 400px;
29
- background: white;
30
- }
31
-
32
- .insforge-branding {
33
- background: #FAFAFA;
34
- padding: 8px 8px 16px 8px;
35
- display: flex;
36
- flex-direction: row;
37
- justify-content: center;
38
- align-items: center;
39
- gap: 4px;
40
- }
41
-
42
- .insforge-branding-text {
43
- color: #000;
44
- font-family: var(--font-manrope);
45
- font-size: 12px;
46
- font-style: normal;
47
- font-weight: 400;
48
- line-height: normal;
49
- }
50
-
51
- /* Form Card */
52
- .insforge-auth-card {
53
- width: 100%;
54
- border-radius: 12px;
55
- overflow: hidden;
56
- box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.25);
57
- }
58
-
59
- .insforge-auth-content {
60
- padding: 24px;
61
- display: flex;
62
- flex-direction: column;
63
- justify-content: center;
64
- align-items: stretch;
65
- gap: 24px;
66
- }
67
-
68
- /* Header */
69
- .insforge-auth-header {
70
- display: flex;
71
- flex-direction: column;
72
- justify-content: start;
73
- align-items: start;
74
- gap: 8px;
75
- }
76
-
77
- .insforge-auth-title {
78
- color: #000;
79
- font-family: Inter;
80
- font-size: 24px;
81
- font-style: normal;
82
- font-weight: 600;
83
- line-height: 32px; /* 133.333% */
84
- }
85
-
86
- .insforge-auth-subtitle {
87
- color: #828282;
88
- font-family: Inter;
89
- font-size: 14px;
90
- font-style: normal;
91
- font-weight: 400;
92
- line-height: 24px; /* 171.429% */
93
- }
94
-
95
- /* Error Banner */
96
- .insforge-error-banner {
97
- display: flex;
98
- padding: 8px 8px 8px 12px;
99
- margin-bottom: 16px;
100
- align-items: center;
101
- gap: 8px;
102
- align-self: stretch;
103
- border-radius: 4px;
104
- border: 2px solid #DC2626;
105
- background: #FEF2F2;
106
- color: #DC2626;
107
- font-family: Inter;
108
- font-size: 14px;
109
- font-style: normal;
110
- font-weight: 400;
111
- line-height: 20px; /* 142.857% */
112
- }
113
-
114
- .insforge-error-icon {
115
- color: #EF4444;
116
- flex-shrink: 0;
117
- width: 24px;
118
- height: 24px;
119
- }
120
-
121
- /* Form Elements */
122
- .insforge-form {
123
- display: flex;
124
- flex-direction: column;
125
- justify-content: center;
126
- align-items: stretch;
127
- gap: 24px;
128
- }
129
-
130
- .insforge-form-group {
131
- display: flex;
132
- flex-direction: column;
133
- justify-content: center;
134
- align-items: stretch;
135
- gap: 4px;
136
- }
137
-
138
- .insforge-form-label-row {
139
- display: flex;
140
- justify-content: space-between;
141
- align-items: center;
142
- }
143
-
144
- .insforge-form-label {
145
- color: #000;
146
- font-family: Inter;
147
- font-size: 14px;
148
- font-style: normal;
149
- font-weight: 400;
150
- line-height: 24px;
151
- }
152
-
153
- .insforge-form-link {
154
- color: #828282;
155
- text-align: right;
156
- font-family: Inter;
157
- font-size: 14px;
158
- font-style: normal;
159
- font-weight: 400;
160
- line-height: 24px;
161
- }
162
-
163
- .insforge-form-link:hover {
164
- color: #828282;
165
- text-decoration: underline;
166
- }
167
-
168
- /* Input Container for Password (with icon) */
169
- .insforge-input-wrapper {
170
- position: relative;
171
- }
172
-
173
- .insforge-input {
174
- width: 100%;
175
- display: flex;
176
- padding: 8px 8px 10px 12px;
177
- align-items: center;
178
- gap: 8px;
179
- align-self: stretch;
180
- border-radius: 4px;
181
- border: 1px solid #BCBCBC;
182
- background: #FFF;
183
- font-family: Inter;
184
- font-size: 16px;
185
- font-style: normal;
186
- font-weight: 400;
187
- line-height: 20px;
188
- }
189
-
190
- .insforge-input::placeholder {
191
- color: #A6A6A6;
192
- }
193
-
194
- .insforge-input:focus {
195
- outline: none;
196
- }
197
-
198
- .insforge-input-with-icon {
199
- padding-right: 3rem;
200
- }
201
-
202
- .insforge-input-icon-btn {
203
- position: absolute;
204
- right: 8px;
205
- top: 50%;
206
- transform: translateY(-50%);
207
- background: transparent;
208
- border: none;
209
- color: #A6A6A6;
210
- cursor: pointer;
211
- transition: color 0.2s;
212
- display: flex;
213
- align-items: center;
214
- justify-content: center;
215
- }
216
-
217
- .insforge-input-icon-btn:hover {
218
- color: #6b7280;
219
- }
220
-
221
- /* Primary Button */
222
- .insforge-btn-primary {
223
- border-radius: 4px;
224
- background: #000;
225
- width: 100%;
226
- display: flex;
227
- margin: 16px 0 0 0;
228
- padding: 8px 16px;
229
- justify-content: center;
230
- align-items: center;
231
- gap: 10px;
232
- align-self: stretch;
233
- color: #FFF;
234
- font-family: Manrope;
235
- font-size: 16px;
236
- font-style: normal;
237
- font-weight: 600;
238
- line-height: normal;
239
- border: none;
240
- cursor: pointer;
241
- }
242
-
243
- .insforge-btn-primary:hover {
244
- background: #303030;
245
- }
246
-
247
- .insforge-btn-primary:disabled {
248
- opacity: 0.5;
249
- cursor: not-allowed;
250
- }
251
-
252
- .insforge-btn-primary .insforge-btn-loader {
253
- display: none;
254
- animation: insforge-spin 1s linear infinite;
255
- }
256
-
257
- .insforge-btn-primary[data-loading] .insforge-btn-loader {
258
- display: block;
259
- }
260
-
261
- .insforge-btn-primary .insforge-btn-check {
262
- display: none;
263
- }
264
-
265
- .insforge-btn-primary[data-confirmed] .insforge-btn-check {
266
- display: block;
267
- }
268
-
269
- /* Text Link Section */
270
- .insforge-text-center {
271
- text-align: center;
272
- color: #828282;
273
- font-family: Inter;
274
- font-size: 14px;
275
- font-style: normal;
276
- font-weight: 400;
277
- line-height: 24px;
278
- }
279
-
280
- .insforge-link-primary {
281
- color: #000;
282
- font-family: Inter;
283
- font-size: 14px;
284
- font-style: normal;
285
- font-weight: 500;
286
- line-height: 24px;
287
- }
288
-
289
- /* Divider */
290
- .insforge-divider {
291
- display: flex;
292
- justify-content: center;
293
- align-items: center;
294
- gap: 24px;
295
- align-self: stretch;
296
- }
297
-
298
- .insforge-divider::before,
299
- .insforge-divider::after {
300
- content: '';
301
- flex: 1;
302
- height: 1px;
303
- background: #C6C6C6;
304
- }
305
-
306
- .insforge-divider-text {
307
- color: #C6C6C6;
308
- font-family: Manrope;
309
- font-size: 14px;
310
- font-style: normal;
311
- font-weight: 600;
312
- line-height: normal;
313
- }
314
-
315
- /* OAuth Section */
316
- .insforge-oauth-container {
317
- display: grid;
318
- gap: 12px;
319
- width: 100%;
320
- }
321
-
322
- /* ============================================================================
323
- SMART OAUTH GRID LAYOUT SYSTEM
324
- Pattern: 1→1x1, 2→1x2, 3→1x3, 4→2x2, 5+→auto (3 per row, last row centered)
325
- ============================================================================ */
326
-
327
- /* 1 provider: single column, full width - displays "Continue with Provider" */
328
- .insforge-oauth-container[data-provider-count="1"] {
329
- grid-template-columns: 1fr;
330
- }
331
-
332
- /* 2 providers: two columns - displays "Provider" */
333
- .insforge-oauth-container[data-provider-count="2"] {
334
- grid-template-columns: repeat(2, 1fr);
335
- }
336
-
337
- /* 3 providers: three columns - icon only */
338
- .insforge-oauth-container[data-provider-count="3"] {
339
- grid-template-columns: repeat(3, 1fr);
340
- }
341
-
342
- /* 4 providers: 2x2 grid - displays "Provider" */
343
- .insforge-oauth-container[data-provider-count="4"] {
344
- grid-template-columns: repeat(2, 1fr);
345
- }
346
-
347
- /* 5+ providers: Universal 6-column grid system
348
- - Grid columns managed by OAuthProviderList component via inline styles
349
- - This provides precise control over button positioning */
350
- .insforge-oauth-container:not([data-provider-count="1"]):not([data-provider-count="2"]):not([data-provider-count="3"]):not([data-provider-count="4"]) {
351
- grid-template-columns: repeat(6, 1fr);
352
- }
353
-
354
- /* OAuth Button */
355
- .insforge-oauth-btn {
356
- display: flex;
357
- width: 100%;
358
- height: 36px;
359
- padding: 8px 12px;
360
- flex-direction: row;
361
- justify-content: center;
362
- align-items: center;
363
- gap: 12px;
364
- border-radius: 6px;
365
- border: 1px solid #E4E4E7;
366
- background: #FFF;
367
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.10);
368
- color: #09090B;
369
- text-align: center;
370
- font-family: Inter;
371
- font-size: 14px;
372
- font-style: normal;
373
- font-weight: 500;
374
- line-height: 20px;
375
- cursor: pointer;
376
- transition: all 0.2s ease;
377
- }
378
-
379
- /* Full mode: show icon + "Continue with Provider" */
380
- .insforge-oauth-btn[data-display-mode="full"] {
381
- justify-content: center;
382
- }
383
-
384
- /* Short mode: show icon + "Provider" */
385
- .insforge-oauth-btn[data-display-mode="short"] {
386
- justify-content: center;
387
- padding: 8px;
388
- gap: 8px;
389
- }
390
-
391
- /* Icon only mode: show only icon */
392
- .insforge-oauth-btn[data-display-mode="icon"] {
393
- justify-content: center;
394
- gap: 0;
395
- }
396
-
397
- .insforge-oauth-btn[data-display-mode="icon"] .insforge-oauth-icon {
398
- display: flex;
399
- align-items: center;
400
- justify-content: center;
401
- }
402
-
403
- .insforge-oauth-btn:hover {
404
- background: #f9fafb;
405
- border-color: #9ca3af;
406
- }
407
-
408
- .insforge-oauth-btn:disabled {
409
- opacity: 0.6;
410
- cursor: not-allowed;
411
- }
412
-
413
- .insforge-oauth-icon {
414
- display: flex;
415
- align-items: center;
416
- justify-content: center;
417
- flex-shrink: 0;
418
- }
419
-
420
- .insforge-oauth-loader {
421
- display: none;
422
- animation: insforge-spin 1s linear infinite;
423
- }
424
-
425
- .insforge-oauth-btn[data-loading] .insforge-oauth-icon {
426
- display: none;
427
- }
428
-
429
- .insforge-oauth-btn[data-loading] .insforge-oauth-loader {
430
- display: block;
431
- }
432
-
433
- /* Spin Animation */
434
- @keyframes insforge-spin {
435
- from {
436
- transform: rotate(0deg);
437
- }
438
- to {
439
- transform: rotate(360deg);
440
- }
441
- }
442
-
443
- /* UserButton Styles */
444
- .insforge-user-button-container {
445
- position: relative;
446
- display: inline-block;
447
- }
448
-
449
- .insforge-user-button {
450
- padding: 0.25rem;
451
- background: transparent;
452
- border: none;
453
- border-radius: 9999px;
454
- cursor: pointer;
455
- transition: all 0.2s;
456
- display: flex;
457
- align-items: center;
458
- justify-content: center;
459
- gap: 0.5rem;
460
- }
461
-
462
- .insforge-user-button:hover {
463
- background: rgba(0, 0, 0, 0.05);
464
- }
465
-
466
- .insforge-user-button-detailed {
467
- border-radius: 0.5rem;
468
- padding: 0.5rem;
469
- }
470
-
471
- .insforge-user-button-info {
472
- display: flex;
473
- flex-direction: column;
474
- align-items: flex-start;
475
- gap: 0.125rem;
476
- }
477
-
478
- .insforge-user-button-name {
479
- font-size: 0.875rem;
480
- font-weight: 600;
481
- color: #111827;
482
- line-height: 1.25rem;
483
- text-align: left;
484
- }
485
-
486
- .insforge-user-button-email {
487
- font-size: 0.75rem;
488
- color: #6b7280;
489
- line-height: 1rem;
490
- text-align: left;
491
- }
492
-
493
- .insforge-user-avatar {
494
- width: 2.5rem;
495
- height: 2.5rem;
496
- border-radius: 9999px;
497
- object-fit: cover;
498
- }
499
-
500
- .insforge-user-avatar-placeholder {
501
- display: flex;
502
- align-items: center;
503
- justify-content: center;
504
- width: 2.5rem;
505
- height: 2.5rem;
506
- background: #3b82f6;
507
- color: white;
508
- font-weight: 600;
509
- font-size: 0.875rem;
510
- border-radius: 9999px;
511
- }
512
-
513
- .insforge-user-dropdown {
514
- position: absolute;
515
- top: 100%;
516
- right: 0;
517
- margin-top: 0.5rem;
518
- min-width: 10rem;
519
- background: white;
520
- border: 1px solid #e5e7eb;
521
- border-radius: 0.5rem;
522
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
523
- z-index: 50;
524
- overflow: hidden;
525
- padding: 0.25rem;
526
- }
527
-
528
- .insforge-sign-out-button {
529
- display: flex;
530
- align-items: center;
531
- justify-content: flex-start;
532
- gap: 0.5rem;
533
- width: 100%;
534
- padding: 0.5rem 0.75rem;
535
- font-size: 0.875rem;
536
- font-family: inherit;
537
- color: #dc2626;
538
- background: transparent;
539
- border: none;
540
- border-radius: 0.375rem;
541
- cursor: pointer;
542
- transition: background 0.2s;
543
- text-align: left;
544
- }
545
-
546
- .insforge-sign-out-button:hover {
547
- background: #fef2f2;
548
- }
549
-
550
- /* Loading State */
551
- .insforge-loading {
552
- display: flex;
553
- justify-content: center;
554
- align-items: center;
555
- padding: 2rem;
556
- color: #6b7280;
557
- font-size: 0.875rem;
558
- }
559
-
560
- /* Password Strength Indicator */
561
- .insforge-password-strength {
562
- display: flex;
563
- flex-direction: column;
564
- gap: 0.25rem;
565
- margin-top: 0.5rem;
566
- }
567
-
568
- .insforge-password-requirement {
569
- height: 1.5rem;
570
- display: flex;
571
- align-items: center;
572
- gap: 0.25rem;
573
- }
574
-
575
- .insforge-password-check {
576
- width: 1.25rem;
577
- height: 1.25rem;
578
- border-radius: 9999px;
579
- display: flex;
580
- border-width: 2px;
581
- border-style: solid;
582
- align-items: center;
583
- justify-content: center;
584
- transition: all 0.2s ease-in-out;
585
- background-color: transparent;
586
- border-color: #a3a3a3;
587
- flex-shrink: 0;
588
- }
589
-
590
- .insforge-password-check-valid {
591
- background-color: #22c55e;
592
- border-color: transparent;
593
- }
594
-
595
- .insforge-password-check-icon {
596
- color: #fff;
597
- stroke-width: 3;
598
- }
599
-
600
- .insforge-password-requirement-label {
601
- color:#000;
602
- font-family: Inter;
603
- font-size: 14px;
604
- font-style: normal;
605
- font-weight: 400;
606
- line-height: 24px;
607
- }
608
-
609
- /* Verification Code Input */
610
- .insforge-verification-code-container {
611
- display: flex;
612
- flex-direction: column;
613
- justify-content: center;
614
- align-items: center;
615
- gap: 24px;
616
- }
617
-
618
- .insforge-verification-instructions {
619
- color: #525252;
620
- font-family: Inter;
621
- font-size: 14px;
622
- font-style: normal;
623
- font-weight: 400;
624
- line-height: 20px;
625
- }
626
-
627
- .insforge-verification-instructions > span {
628
- color: #000;
629
- font-family: Inter;
630
- font-size: 14px;
631
- font-style: normal;
632
- font-weight: 600;
633
- line-height: 20px;
634
- }
635
-
636
- .insforge-verification-code-inputs {
637
- display: flex;
638
- flex-direction: row;
639
- gap: 12px;
640
- justify-content: center;
641
- align-items: center;
642
- }
643
-
644
- .insforge-verification-code-input {
645
- width: 100%;
646
- height: 48px;
647
- padding: 8px 12px;
648
- border-radius: 4px;
649
- border: 1px solid #E0E0E0;
650
- background: #FFF;
651
- text-align: center;
652
- font-size: 16px;
653
- font-style: normal;
654
- line-height: 20px;
655
- font-weight: 600;
656
- font-family: var(--font-manrope);
657
- color: #000;
658
- transition: all 0.2s ease-in-out;
659
- outline: none;
660
- }
661
-
662
- .insforge-verification-code-input:focus {
663
- border-color: #000;
664
- box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
665
- }
666
-
667
- .insforge-verification-code-input:disabled {
668
- background-color: #F5F5F5;
669
- cursor: not-allowed;
670
- opacity: 0.6;
671
- }
672
-
673
- /* Verification Instructions */
674
- .insforge-verification-instructions {
675
- color: #4F4F4F;
676
- font-family: Inter;
677
- font-size: 14px;
678
- font-style: normal;
679
- font-weight: 400;
680
- line-height: 24px;
681
- margin-bottom: 8px;
682
- }
683
-
684
- .insforge-verification-email {
685
- color: #000;
686
- font-weight: 600;
687
- }
688
-
689
- .insforge-resend-code {
690
- color: #525252;
691
- font-family: Inter;
692
- font-size: 14px;
693
- font-style: normal;
694
- font-weight: 400;
695
- line-height: 24px;
696
- text-align: center;
697
- }
698
-
699
- .insforge-resend-link {
700
- color: #000;
701
- font-family: Inter;
702
- font-size: 14px;
703
- font-style: normal;
704
- font-weight: 500;
705
- line-height: 24px;
706
- }
707
-
708
- .insforge-resend-link:hover {
709
- text-decoration: underline;
710
- }
711
-
712
- .insforge-resend-link:disabled {
713
- opacity: 0.5;
714
- cursor: not-allowed;
715
- }
716
-
717
- /* Responsive adjustments */
718
- @media (max-width: 640px) {
719
- .insforge-auth-card {
720
- padding: 2rem 1.5rem;
721
- }
722
-
723
- .insforge-auth-title {
724
- font-size: 1.75rem;
725
- }
726
-
727
- .insforge-verification-code-container {
728
- gap: 8px;
729
- }
730
-
731
- .insforge-verification-code-input {
732
- width: 40px;
733
- height: 48px;
734
- font-size: 20px;
735
- }
736
- }
6
+ @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');
7
+ /* Import Tailwind CSS 4.1 */
8
+ @import "tailwindcss";
737
9
 
10
+ /* Custom design tokens */
11
+ @theme {
12
+ --font-manrope: 'Manrope', sans-serif;
13
+ --font-inter: 'Inter', sans-serif;
14
+ }