@slyxup/ui 0.2.7 → 0.2.9

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 (35) hide show
  1. package/README.md +4 -1
  2. package/dist/components/SignIn/SignIn.d.ts.map +1 -1
  3. package/dist/components/SignIn/SignIn.js +2 -1
  4. package/dist/components/SignIn/SignIn.js.map +1 -1
  5. package/dist/components/SignUp/SignUp.d.ts.map +1 -1
  6. package/dist/components/SignUp/SignUp.js +2 -1
  7. package/dist/components/SignUp/SignUp.js.map +1 -1
  8. package/dist/components/SocialButtons/SocialButtons.d.ts.map +1 -1
  9. package/dist/components/SocialButtons/SocialButtons.js +2 -1
  10. package/dist/components/SocialButtons/SocialButtons.js.map +1 -1
  11. package/dist/components/UserButton/UserButton.d.ts +5 -1
  12. package/dist/components/UserButton/UserButton.d.ts.map +1 -1
  13. package/dist/components/UserButton/UserButton.js +6 -2
  14. package/dist/components/UserButton/UserButton.js.map +1 -1
  15. package/dist/components/UserProfile/UserProfile.d.ts.map +1 -1
  16. package/dist/components/UserProfile/UserProfile.js +248 -27
  17. package/dist/components/UserProfile/UserProfile.js.map +1 -1
  18. package/dist/index.d.ts +3 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/styles.d.ts +1 -1
  23. package/dist/styles.d.ts.map +1 -1
  24. package/dist/styles.js +269 -0
  25. package/dist/styles.js.map +1 -1
  26. package/package.json +9 -9
  27. package/src/components/SignIn/SignIn.tsx +2 -1
  28. package/src/components/SignUp/SignUp.tsx +2 -1
  29. package/src/components/SocialButtons/SocialButtons.tsx +2 -1
  30. package/src/components/UserButton/UserButton.tsx +12 -2
  31. package/src/components/UserProfile/UserProfile.tsx +556 -61
  32. package/src/index.ts +12 -1
  33. package/src/styles.ts +269 -0
  34. package/.turbo/turbo-build.log +0 -4
  35. package/LICENSE +0 -21
package/src/index.ts CHANGED
@@ -3,7 +3,10 @@ export { KeyholeMark, GoogleIcon, GitHubIcon, CheckIcon } from './icons';
3
3
 
4
4
  export { SignIn, type SignInProps } from './components/SignIn/SignIn';
5
5
  export { SignUp, type SignUpProps } from './components/SignUp/SignUp';
6
- export { UserButton } from './components/UserButton/UserButton';
6
+ export {
7
+ UserButton,
8
+ type UserButtonProps,
9
+ } from './components/UserButton/UserButton';
7
10
  export {
8
11
  UserProfile,
9
12
  type UserProfileProps,
@@ -24,6 +27,14 @@ export {
24
27
  SocialButtons,
25
28
  type SocialButtonsProps,
26
29
  } from './components/SocialButtons/SocialButtons';
30
+ export {
31
+ BillingPortal,
32
+ type BillingPortalProps,
33
+ } from './components/BillingPortal/BillingPortal';
34
+ export {
35
+ PricingTable,
36
+ type PricingTableProps,
37
+ } from './components/PricingTable/PricingTable';
27
38
 
28
39
  import { useEffect } from 'react';
29
40
  import { injectStyles } from './styles';
package/src/styles.ts CHANGED
@@ -308,6 +308,275 @@ export const CSS = `
308
308
  background: color-mix(in srgb, var(--slx-success) 9%, transparent);
309
309
  border: 1px solid color-mix(in srgb, var(--slx-success) 30%, transparent);
310
310
  }
311
+ .slx-badge-ok { color: var(--slx-success); background: color-mix(in srgb, var(--slx-success) 9%, transparent); border-color: color-mix(in srgb, var(--slx-success) 30%, transparent); }
312
+ .slx-badge-warn { color: #b45309; background: color-mix(in srgb, #f59e0b 10%, transparent); border-color: color-mix(in srgb, #f59e0b 30%, transparent); }
313
+ .slx-badge-accent { color: var(--slx-accent); background: var(--slx-accent-soft); border-color: color-mix(in srgb, var(--slx-accent) 30%, transparent); }
314
+ .slyxup-root:not(.slyxup-light) .slx-badge-warn { color: #fbbf24; }
315
+
316
+ /* ── Modal overlay ── */
317
+ .slx-overlay {
318
+ position: fixed; inset: 0; z-index: 9999;
319
+ display: flex; align-items: center; justify-content: center;
320
+ background: rgba(12, 12, 18, 0.55);
321
+ backdrop-filter: blur(6px);
322
+ animation: slx-rise .2s cubic-bezier(.22,.9,.32,1) both;
323
+ padding: 16px;
324
+ overflow-y: auto;
325
+ box-sizing: border-box;
326
+ }
327
+
328
+ /* ── UserProfile ── */
329
+ .slx-profile-modal {
330
+ display: flex; flex-direction: column;
331
+ width: 720px; max-width: calc(100vw - 32px);
332
+ max-height: min(85vh, 720px);
333
+ background: var(--slx-bg);
334
+ border-radius: var(--slx-radius-lg);
335
+ box-shadow: var(--slx-shadow-pop);
336
+ overflow: hidden;
337
+ animation: slx-rise .28s cubic-bezier(.22,.9,.32,1) both;
338
+ box-sizing: border-box;
339
+ }
340
+ .slx-profile-head {
341
+ display: flex; align-items: center; justify-content: space-between;
342
+ padding: 22px 28px 18px;
343
+ border-bottom: 1px solid var(--slx-border);
344
+ flex-shrink: 0;
345
+ background: var(--slx-bg);
346
+ position: relative;
347
+ z-index: 1;
348
+ }
349
+ .slx-profile-title {
350
+ font-family: var(--slx-display);
351
+ font-size: 18px; font-weight: 650; letter-spacing: -0.02em;
352
+ color: var(--slx-ink-strong);
353
+ margin: 0;
354
+ }
355
+ .slx-profile-close {
356
+ width: 32px; height: 32px; border-radius: 8px;
357
+ display: flex; align-items: center; justify-content: center;
358
+ background: none; border: 1px solid var(--slx-border);
359
+ color: var(--slx-muted); cursor: pointer; font-size: 16px;
360
+ transition: background .12s, color .12s, border-color .12s;
361
+ position: relative;
362
+ z-index: 2;
363
+ pointer-events: auto;
364
+ flex-shrink: 0;
365
+ -webkit-tap-highlight-color: transparent;
366
+ touch-action: manipulation;
367
+ }
368
+ .slx-profile-close:hover { background: var(--slx-bg-subtle); color: var(--slx-ink); border-color: var(--slx-border-strong); }
369
+ .slx-profile-close:active { transform: scale(.95); }
370
+ .slx-profile-close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--slx-accent-soft); }
371
+
372
+ .slx-profile-body {
373
+ display: flex; flex: 1; min-height: 380px;
374
+ overflow: hidden;
375
+ min-width: 0;
376
+ }
377
+
378
+ /* ── Left nav ── */
379
+ .slx-profile-nav {
380
+ width: 200px; flex-shrink: 0;
381
+ display: flex; flex-direction: column; gap: 2px;
382
+ padding: 12px 8px;
383
+ border-right: 1px solid var(--slx-border);
384
+ background: var(--slx-bg-subtle);
385
+ }
386
+ .slx-profile-nav-btn {
387
+ display: flex; align-items: center; gap: 9px;
388
+ font: inherit; font-size: 13.5px; font-weight: 500;
389
+ color: var(--slx-muted); background: none; border: none;
390
+ border-radius: var(--slx-radius-sm);
391
+ padding: 9px 12px; cursor: pointer; text-align: left;
392
+ transition: background .12s, color .12s;
393
+ }
394
+ .slx-profile-nav-btn:hover { background: color-mix(in srgb, var(--slx-ink) 5%, transparent); color: var(--slx-ink); }
395
+ .slx-profile-nav-btn.on { background: var(--slx-bg); color: var(--slx-ink-strong); font-weight: 600; box-shadow: 0 1px 3px rgba(18,18,28,.06); }
396
+ .slx-profile-nav-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--slx-accent-soft); }
397
+
398
+ /* ── Content area ── */
399
+ .slx-profile-content {
400
+ flex: 1; overflow-y: auto; padding: 24px 28px 28px;
401
+ }
402
+ .slx-profile-sec { margin-bottom: 28px; }
403
+ .slx-profile-sec:last-child { margin-bottom: 0; }
404
+ .slx-sec-title {
405
+ font-family: var(--slx-display);
406
+ font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
407
+ color: var(--slx-ink-strong);
408
+ margin: 0 0 14px; padding-bottom: 10px;
409
+ border-bottom: 1px solid var(--slx-border);
410
+ }
411
+
412
+ /* ── Avatar ── */
413
+ .slx-avatar-row {
414
+ display: flex; align-items: center; gap: 16px;
415
+ margin-bottom: 20px;
416
+ }
417
+ .slx-avatar-lg {
418
+ width: 64px; height: 64px; border-radius: 50%;
419
+ flex-shrink: 0;
420
+ display: flex; align-items: center; justify-content: center;
421
+ font-size: 24px; font-weight: 700; color: #fff;
422
+ background: linear-gradient(135deg, var(--slx-accent), #8b5cf6);
423
+ overflow: hidden;
424
+ box-shadow: 0 2px 8px rgba(91,91,214,.3);
425
+ }
426
+ .slx-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
427
+
428
+ /* ── Row (email etc.) ── */
429
+ .slx-row-value { font-size: 14px; font-weight: 500; color: var(--slx-ink-strong); margin: 0; }
430
+ .slx-row-label { font-size: 12px; color: var(--slx-muted); margin: 2px 0 0; }
431
+
432
+ /* ── Sessions ── */
433
+ .slx-session {
434
+ display: flex; align-items: center; justify-content: space-between;
435
+ padding: 12px 14px; border-radius: var(--slx-radius-sm);
436
+ border: 1px solid var(--slx-border);
437
+ background: var(--slx-bg-subtle);
438
+ margin-bottom: 8px;
439
+ transition: border-color .12s;
440
+ }
441
+ .slx-session:hover { border-color: var(--slx-border-strong); }
442
+ .slx-session-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
443
+ .slx-session-device { font-size: 13.5px; font-weight: 550; color: var(--slx-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
444
+ .slx-session-sub { font-size: 12px; color: var(--slx-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
445
+
446
+ /* ── Danger zone ── */
447
+ .slx-danger-zone {
448
+ border: 1px solid color-mix(in srgb, var(--slx-danger) 30%, transparent);
449
+ border-radius: var(--slx-radius);
450
+ padding: 18px 20px;
451
+ background: color-mix(in srgb, var(--slx-danger) 4%, transparent);
452
+ }
453
+ .slx-danger-title {
454
+ font-size: 14px; font-weight: 650; color: var(--slx-danger);
455
+ margin: 0 0 6px;
456
+ }
457
+ .slx-danger-desc {
458
+ font-size: 13px; color: var(--slx-muted); line-height: 1.5;
459
+ margin: 0 0 16px;
460
+ }
461
+ .slx-btn-danger-outline {
462
+ font: inherit; font-size: 13px; font-weight: 550;
463
+ color: var(--slx-danger); background: none;
464
+ border: 1px solid color-mix(in srgb, var(--slx-danger) 35%, transparent);
465
+ border-radius: var(--slx-radius-sm);
466
+ padding: 7px 14px; cursor: pointer;
467
+ transition: background .12s, border-color .12s;
468
+ }
469
+ .slx-btn-danger-outline:hover { background: color-mix(in srgb, var(--slx-danger) 8%, transparent); border-color: var(--slx-danger); }
470
+ .slx-btn-danger-outline:active { transform: scale(.98); }
471
+ .slx-btn-danger-outline:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--slx-danger) 20%, transparent); }
472
+ .slx-btn-danger-outline[disabled] { opacity: .5; cursor: not-allowed; }
473
+
474
+ /* ── Billing (inside UserProfile) ── */
475
+ .slx-billing-card {
476
+ border: 1px solid var(--slx-border);
477
+ border-radius: var(--slx-radius);
478
+ padding: 18px 20px;
479
+ background: var(--slx-bg-subtle);
480
+ margin-bottom: 16px;
481
+ }
482
+ .slx-billing-plan { font-size: 15px; font-weight: 650; color: var(--slx-ink-strong); margin: 0 0 4px; }
483
+ .slx-billing-detail { font-size: 13px; color: var(--slx-muted); margin: 2px 0; }
484
+ .slx-billing-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
485
+ .slx-billing-status-active { color: var(--slx-success); }
486
+ .slx-billing-status-trialing { color: var(--slx-accent); }
487
+ .slx-billing-status-canceled { color: var(--slx-danger); }
488
+ .slx-invoice-row {
489
+ display: flex; align-items: center; justify-content: space-between;
490
+ padding: 10px 0; border-bottom: 1px solid var(--slx-border);
491
+ font-size: 13px;
492
+ gap: 8px;
493
+ flex-wrap: wrap;
494
+ }
495
+ .slx-invoice-row:last-child { border-bottom: none; }
496
+ .slx-invoice-date { color: var(--slx-muted); }
497
+ .slx-invoice-amount { font-weight: 600; color: var(--slx-ink-strong); }
498
+
499
+ /* ── Billing plans grid (responsive) ── */
500
+ .slx-billing-plans {
501
+ display: grid;
502
+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
503
+ gap: 12px;
504
+ margin-top: 12px;
505
+ }
506
+ .slx-plan-card {
507
+ border: 1px solid var(--slx-border);
508
+ border-radius: var(--slx-radius);
509
+ padding: 16px;
510
+ background: var(--slx-bg);
511
+ display: flex;
512
+ flex-direction: column;
513
+ position: relative;
514
+ transition: border-color .15s, box-shadow .15s;
515
+ }
516
+ .slx-plan-card:hover { border-color: var(--slx-border-strong); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
517
+ .slx-plan-card.popular { border-color: var(--slx-accent); box-shadow: 0 0 0 1px var(--slx-accent-soft); }
518
+ .slx-plan-badge {
519
+ position: absolute; top: -10px; right: 12px;
520
+ font-size: 10px; font-weight: 700; letter-spacing: .05em;
521
+ color: #fff; background: linear-gradient(135deg, var(--slx-accent), #8b5cf6);
522
+ padding: 3px 8px; border-radius: 999px;
523
+ }
524
+ .slx-plan-name { font-size: 14px; font-weight: 600; color: var(--slx-ink-strong); margin: 0 0 6px; }
525
+ .slx-plan-price { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; color: var(--slx-ink-strong); }
526
+ .slx-plan-interval { font-size: 13px; color: var(--slx-muted); font-weight: 400; }
527
+ .slx-plan-features { list-style: none; margin: 12px 0 16px; padding: 0; flex: 1; }
528
+ .slx-plan-features li { font-size: 13px; color: var(--slx-ink); padding: 4px 0 4px 20px; position: relative; line-height: 1.45; }
529
+ .slx-plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--slx-success); font-weight: 700; font-size: 12px; }
530
+ .slx-plan-cta { width: 100%; margin-top: auto; }
531
+ .slx-billing-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
532
+ .slx-btn-secondary {
533
+ font: inherit; font-size: 13px; font-weight: 550;
534
+ color: var(--slx-ink); background: var(--slx-bg);
535
+ border: 1px solid var(--slx-border-strong); border-radius: var(--slx-radius-sm);
536
+ padding: 8px 14px; cursor: pointer;
537
+ transition: background .12s, border-color .12s;
538
+ display: inline-flex; align-items: center; justify-content: center; gap: 6px;
539
+ }
540
+ .slx-btn-secondary:hover { background: var(--slx-bg-subtle); }
541
+ .slx-btn-secondary:active { transform: scale(.98); }
542
+ .slx-btn-secondary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--slx-accent-soft); }
543
+ .slx-btn-secondary[disabled] { opacity: .55; cursor: not-allowed; }
544
+ .slx-billing-empty { text-align: center; padding: 24px 16px; color: var(--slx-muted); font-size: 13px; line-height: 1.5; }
545
+
546
+ /* ── Mobile friendliness for UserProfile ── */
547
+ @media (max-width: 680px) {
548
+ .slx-overlay { align-items: flex-start; padding: 12px; }
549
+ .slx-profile-modal {
550
+ width: 100%; max-width: 100%;
551
+ max-height: calc(100vh - 24px);
552
+ max-height: calc(100dvh - 24px);
553
+ margin: auto;
554
+ border-radius: var(--slx-radius-lg);
555
+ }
556
+ .slx-profile-body { flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; }
557
+ .slx-profile-nav {
558
+ width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden;
559
+ border-right: none; border-bottom: 1px solid var(--slx-border);
560
+ padding: 8px; gap: 6px; scrollbar-width: none; -ms-overflow-style: none;
561
+ -webkit-overflow-scrolling: touch;
562
+ flex-shrink: 0;
563
+ }
564
+ .slx-profile-nav::-webkit-scrollbar { display: none; }
565
+ .slx-profile-nav-btn { white-space: nowrap; flex-shrink: 0; font-size: 13px; padding: 8px 12px; }
566
+ .slx-profile-content { padding: 16px; overflow: visible; }
567
+ .slx-profile-head { padding: 16px 16px 12px; }
568
+ .slx-profile-close { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 18px; border-radius: 10px; }
569
+ .slx-avatar-row { gap: 12px; flex-wrap: wrap; }
570
+ .slx-billing-plans { grid-template-columns: 1fr; }
571
+ .slx-session { flex-direction: column; align-items: flex-start; gap: 10px; }
572
+ .slx-session .slx-btn-danger-outline { align-self: stretch; text-align: center; justify-content: center; }
573
+ .slx-invoice-row { flex-wrap: wrap; gap: 6px; }
574
+ }
575
+ @media (max-width: 380px) {
576
+ .slx-profile-content { padding: 12px; }
577
+ .slx-profile-head { padding: 12px 12px 10px; }
578
+ .slx-profile-title { font-size: 16px; }
579
+ }
311
580
  `;
312
581
 
313
582
  let injected = false;
@@ -1,4 +0,0 @@
1
-
2
- > @slyxup/ui@0.2.7 build /home/runner/work/stack/stack/packages/ui
3
- > tsc -p tsconfig.json
4
-
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 SlyxUp
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.