@tomny-dev/uzi 0.12.0 → 0.13.0-pr.108.359.1.db8e67d

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 (91) hide show
  1. package/dist/components/auth-form/AuthForm.d.ts +24 -0
  2. package/dist/components/auth-form/AuthForm.d.ts.map +1 -0
  3. package/dist/components/auth-form/AuthForm.test.d.ts +2 -0
  4. package/dist/components/auth-form/AuthForm.test.d.ts.map +1 -0
  5. package/dist/components/auth-pages/AuthPages.d.ts.map +1 -1
  6. package/dist/index.cjs +13 -9
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +11 -10
  10. package/dist/index63.js +15 -21
  11. package/dist/index63.js.map +1 -1
  12. package/dist/index64.cjs +21 -30
  13. package/dist/index64.cjs.map +1 -1
  14. package/dist/index64.js +51 -44
  15. package/dist/index64.js.map +1 -1
  16. package/dist/index65.cjs +52 -43
  17. package/dist/index65.cjs.map +1 -1
  18. package/dist/index65.js +14 -50
  19. package/dist/index65.js.map +1 -1
  20. package/dist/index66.cjs +15 -69
  21. package/dist/index66.cjs.map +1 -1
  22. package/dist/index66.js +25 -414
  23. package/dist/index66.js.map +1 -1
  24. package/dist/index67.cjs +25 -416
  25. package/dist/index67.cjs.map +1 -1
  26. package/dist/index67.js +56 -58
  27. package/dist/index67.js.map +1 -1
  28. package/dist/index68.cjs +82 -85
  29. package/dist/index68.cjs.map +1 -1
  30. package/dist/index68.js +420 -226
  31. package/dist/index68.js.map +1 -1
  32. package/dist/index69.cjs +421 -225
  33. package/dist/index69.cjs.map +1 -1
  34. package/dist/index69.js +58 -42
  35. package/dist/index69.js.map +1 -1
  36. package/dist/index70.cjs +85 -61
  37. package/dist/index70.cjs.map +1 -1
  38. package/dist/index70.js +236 -76
  39. package/dist/index70.js.map +1 -1
  40. package/dist/index71.cjs +235 -75
  41. package/dist/index71.cjs.map +1 -1
  42. package/dist/index71.js +42 -20
  43. package/dist/index71.js.map +1 -1
  44. package/dist/index72.cjs +60 -27
  45. package/dist/index72.cjs.map +1 -1
  46. package/dist/index72.js +73 -88
  47. package/dist/index72.js.map +1 -1
  48. package/dist/index73.cjs +73 -90
  49. package/dist/index73.cjs.map +1 -1
  50. package/dist/index73.js +17 -15
  51. package/dist/index73.js.map +1 -1
  52. package/dist/index74.cjs +22 -19
  53. package/dist/index74.cjs.map +1 -1
  54. package/dist/index74.js +85 -143
  55. package/dist/index74.js.map +1 -1
  56. package/dist/index75.cjs +87 -143
  57. package/dist/index75.cjs.map +1 -1
  58. package/dist/index75.js +19 -91
  59. package/dist/index75.js.map +1 -1
  60. package/dist/index76.cjs +27 -135
  61. package/dist/index76.cjs.map +1 -1
  62. package/dist/index76.js +140 -673
  63. package/dist/index76.js.map +1 -1
  64. package/dist/index77.cjs +140 -673
  65. package/dist/index77.cjs.map +1 -1
  66. package/dist/index77.js +91 -31
  67. package/dist/index77.js.map +1 -1
  68. package/dist/index78.cjs +135 -45
  69. package/dist/index78.cjs.map +1 -1
  70. package/dist/index78.js +667 -206
  71. package/dist/index78.js.map +1 -1
  72. package/dist/index79.cjs +667 -204
  73. package/dist/index79.cjs.map +1 -1
  74. package/dist/index79.js +31 -15
  75. package/dist/index79.js.map +1 -1
  76. package/dist/index80.cjs +45 -21
  77. package/dist/index80.cjs.map +1 -1
  78. package/dist/index80.js +224 -29
  79. package/dist/index80.js.map +1 -1
  80. package/dist/index81.cjs +224 -30
  81. package/dist/index81.cjs.map +1 -1
  82. package/dist/index81.js +19 -0
  83. package/dist/index81.js.map +1 -0
  84. package/dist/index82.cjs +25 -0
  85. package/dist/index82.cjs.map +1 -0
  86. package/dist/index82.js +36 -0
  87. package/dist/index82.js.map +1 -0
  88. package/dist/index83.cjs +37 -0
  89. package/dist/index83.cjs.map +1 -0
  90. package/dist/style.css +13 -3
  91. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index65.js","names":[],"sources":["../src/components/auth-pages/auth-pages.module.css"],"sourcesContent":["/* ── Layout ── */\n.authLayout {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n min-height: 100dvh;\n padding: 24px;\n background: var(--background);\n}\n\n.authCard {\n width: 100%;\n max-width: 400px;\n border-radius: var(--ts-card-radius, 12px);\n border: 1px solid var(--ts-card-border, var(--border));\n background: var(--ts-card-bg, var(--card));\n color: var(--ts-card-fg, var(--foreground));\n box-shadow: var(--ts-card-shadow, 0 16px 36px rgba(0, 0, 0, 0.28));\n padding: 20px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.authBrand {\n display: flex;\n justify-content: center;\n margin-bottom: 4px;\n}\n\n.authBrand svg {\n width: 40px;\n height: 40px;\n color: var(--primary);\n}\n\n.authHeader {\n text-align: center;\n}\n\n.authTitle {\n font-size: 1.25rem;\n font-weight: 600;\n line-height: 1.4;\n margin: 0;\n color: var(--foreground);\n}\n\n.authSubtitle {\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin-top: 4px;\n margin-bottom: 0;\n line-height: 1.4;\n}\n\n/* ── Form ── */\n.authForm {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n/* ── Field ── */\n.field {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.label {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.2;\n color: var(--foreground);\n}\n\n.input {\n display: flex;\n width: 100%;\n min-height: 2.25rem;\n border-radius: 0.5rem;\n border: 1px solid var(--input);\n background: var(--background);\n color: var(--foreground);\n padding: 0.25rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n box-shadow: var(--ts-input-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));\n transition: border-color 0.15s ease, background 0.15s ease;\n font-family: inherit;\n}\n\n.input::placeholder {\n color: var(--muted-foreground);\n}\n\n.input:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* ── Error ── */\n.error {\n font-size: 0.8rem;\n color: var(--destructive);\n margin-top: 2px;\n}\n\n/* ── Password wrapper ── */\n.passwordWrapper {\n position: relative;\n}\n\n.passwordWrapper .input {\n padding-right: 2.5rem;\n}\n\n.toggle {\n position: absolute;\n right: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n background: none;\n border: none;\n padding: 0.25rem;\n cursor: pointer;\n color: var(--muted-foreground);\n border-radius: 4px;\n transition: color 0.15s, background 0.15s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.toggle:hover {\n color: var(--foreground);\n background: var(--accent);\n}\n\n.toggle:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.eyeIcon {\n width: 1.125rem;\n height: 1.125rem;\n}\n\n/* ── Checkbox row ── */\n.checkboxRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.checkboxLabel {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 0.875rem;\n color: var(--foreground);\n cursor: pointer;\n}\n\n.checkbox {\n width: 1rem;\n height: 1rem;\n accent-color: var(--primary);\n border-radius: 4px;\n cursor: pointer;\n}\n\n.checkbox:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.forgotLink {\n font-size: 0.875rem;\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.forgotLink:hover {\n text-decoration: underline;\n}\n\n.checkboxLink {\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.checkboxLink:hover {\n text-decoration: underline;\n}\n\n/* ── Submit button ── */\n.submitButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n font-family: inherit;\n font-weight: 600;\n border-radius: 8px;\n border: 1px solid transparent;\n cursor: pointer;\n text-decoration: none;\n transition: opacity 0.15s, border-color 0.15s, color 0.15s, background 0.15s;\n white-space: nowrap;\n line-height: 1;\n font-size: 0.95rem;\n min-height: 2.25rem;\n padding: 10px 22px;\n background: var(--primary);\n color: var(--primary-foreground);\n}\n\n.submitButton:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.submitButton:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.submitButton:hover:not(:disabled) {\n opacity: 0.88;\n}\n\n/* ── Spinner ── */\n.spinner {\n width: 1rem;\n height: 1rem;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top-color: white;\n border-radius: 50%;\n animation: spin 0.6s linear infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\n/* ── Divider ── */\n.divider {\n border: none;\n border-top: 1px solid var(--border);\n margin: 0;\n}\n\n/* ── Footer ── */\n.authFooter {\n text-align: center;\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin: 0;\n}\n\n.authFooter a {\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.authFooter a:hover {\n text-decoration: underline;\n}\n\n/* ── Sent state ── */\n.sentMessage {\n text-align: center;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.sentText {\n font-size: 0.875rem;\n color: var(--foreground);\n line-height: 1.5;\n}\n\n.sentText strong {\n font-weight: 600;\n}\n\n.backLink {\n font-size: 0.875rem;\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.backLink:hover {\n text-decoration: underline;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"index65.js","names":[],"sources":["../src/components/auth-card/auth-card.module.css"],"sourcesContent":[".authLayout {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n min-height: 100dvh;\n padding: 20px;\n background: var(--background);\n}\n\n.authCard {\n width: 100%;\n max-width: 400px;\n border-radius: var(--ts-card-radius, 12px);\n border: 1px solid var(--ts-card-border, var(--border));\n background: var(--ts-card-bg, var(--card));\n color: var(--ts-card-fg, var(--foreground));\n box-shadow: var(--ts-card-shadow, 0 16px 36px rgba(0, 0, 0, 0.28));\n padding: 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.authBrand {\n display: flex;\n justify-content: center;\n margin-bottom: 4px;\n}\n\n.authBrand svg {\n width: 40px;\n height: 40px;\n color: var(--primary);\n}\n\n.authHeader {\n text-align: center;\n}\n\n.authTitle {\n font-size: 1.25rem;\n font-weight: 600;\n line-height: 1.4;\n margin: 0;\n color: var(--foreground);\n}\n\n.authSubtitle {\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin-top: 8px;\n margin-bottom: 0;\n line-height: 1.4;\n}\n\n.authBody {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.divider {\n border: none;\n border-top: 1px solid var(--border);\n margin: 0;\n}\n\n.authFooter {\n text-align: center;\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin: 0;\n}\n\n.authFooter a {\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.authFooter a:hover {\n text-decoration: underline;\n}\n"],"mappings":""}
package/dist/index66.cjs CHANGED
@@ -1,88 +1,34 @@
1
- //#region src/components/auth-pages/auth-pages.module.css
2
- var authLayout = "uzi-auth-pages-module__authLayout__i-FlB";
3
- var authCard = "uzi-auth-pages-module__authCard__toOGS";
4
- var authBrand = "uzi-auth-pages-module__authBrand__7yOdw";
5
- var authHeader = "uzi-auth-pages-module__authHeader__V-wcl";
6
- var authTitle = "uzi-auth-pages-module__authTitle__1bgLI";
7
- var authSubtitle = "uzi-auth-pages-module__authSubtitle__sGXxg";
8
- var authForm = "uzi-auth-pages-module__authForm__4MucP";
9
- var field = "uzi-auth-pages-module__field__Ajl6w";
10
- var label = "uzi-auth-pages-module__label__MdsqJ";
11
- var input = "uzi-auth-pages-module__input__yijT9";
12
- var error = "uzi-auth-pages-module__error__7Mhyi";
13
- var passwordWrapper = "uzi-auth-pages-module__passwordWrapper__P0bez";
14
- var toggle = "uzi-auth-pages-module__toggle__T7HaZ";
15
- var eyeIcon = "uzi-auth-pages-module__eyeIcon__ab2Ts";
16
- var checkboxRow = "uzi-auth-pages-module__checkboxRow__Rq-84";
17
- var checkboxLabel = "uzi-auth-pages-module__checkboxLabel__poKs-";
18
- var checkbox = "uzi-auth-pages-module__checkbox__KOQQe";
19
- var forgotLink = "uzi-auth-pages-module__forgotLink__5q-vL";
20
- var checkboxLink = "uzi-auth-pages-module__checkboxLink__kAkKg";
21
- var submitButton = "uzi-auth-pages-module__submitButton__mlGxT";
22
- var spinner = "uzi-auth-pages-module__spinner__seK4F";
23
- var spin = "uzi-auth-pages-module__spin__hYpWH";
24
- var divider = "uzi-auth-pages-module__divider__Debmu";
25
- var authFooter = "uzi-auth-pages-module__authFooter__SEaGh";
26
- var sentMessage = "uzi-auth-pages-module__sentMessage__vLBoY";
27
- var sentText = "uzi-auth-pages-module__sentText__qyJkF";
28
- var backLink = "uzi-auth-pages-module__backLink__ezB3X";
29
- var auth_pages_module_default = {
1
+ //#region src/components/auth-card/auth-card.module.css
2
+ var authLayout = "uzi-auth-card-module__authLayout__GHr1j";
3
+ var authCard = "uzi-auth-card-module__authCard__ZYYit";
4
+ var authBrand = "uzi-auth-card-module__authBrand__ZCDVm";
5
+ var authHeader = "uzi-auth-card-module__authHeader__NB6UQ";
6
+ var authTitle = "uzi-auth-card-module__authTitle__VtHLn";
7
+ var authSubtitle = "uzi-auth-card-module__authSubtitle__ZupId";
8
+ var authBody = "uzi-auth-card-module__authBody__PTyaL";
9
+ var divider = "uzi-auth-card-module__divider__D8r12";
10
+ var authFooter = "uzi-auth-card-module__authFooter__C5s--";
11
+ var auth_card_module_default = {
30
12
  authLayout,
31
13
  authCard,
32
14
  authBrand,
33
15
  authHeader,
34
16
  authTitle,
35
17
  authSubtitle,
36
- authForm,
37
- field,
38
- label,
39
- input,
40
- error,
41
- passwordWrapper,
42
- toggle,
43
- eyeIcon,
44
- checkboxRow,
45
- checkboxLabel,
46
- checkbox,
47
- forgotLink,
48
- checkboxLink,
49
- submitButton,
50
- spinner,
51
- spin,
18
+ authBody,
52
19
  divider,
53
- authFooter,
54
- sentMessage,
55
- sentText,
56
- backLink
20
+ authFooter
57
21
  };
58
22
  //#endregion
23
+ exports.authBody = authBody;
59
24
  exports.authBrand = authBrand;
60
25
  exports.authCard = authCard;
61
26
  exports.authFooter = authFooter;
62
- exports.authForm = authForm;
63
27
  exports.authHeader = authHeader;
64
28
  exports.authLayout = authLayout;
65
29
  exports.authSubtitle = authSubtitle;
66
30
  exports.authTitle = authTitle;
67
- exports.backLink = backLink;
68
- exports.checkbox = checkbox;
69
- exports.checkboxLabel = checkboxLabel;
70
- exports.checkboxLink = checkboxLink;
71
- exports.checkboxRow = checkboxRow;
72
- exports.default = auth_pages_module_default;
31
+ exports.default = auth_card_module_default;
73
32
  exports.divider = divider;
74
- exports.error = error;
75
- exports.eyeIcon = eyeIcon;
76
- exports.field = field;
77
- exports.forgotLink = forgotLink;
78
- exports.input = input;
79
- exports.label = label;
80
- exports.passwordWrapper = passwordWrapper;
81
- exports.sentMessage = sentMessage;
82
- exports.sentText = sentText;
83
- exports.spin = spin;
84
- exports.spinner = spinner;
85
- exports.submitButton = submitButton;
86
- exports.toggle = toggle;
87
33
 
88
34
  //# sourceMappingURL=index66.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index66.cjs","names":[],"sources":["../src/components/auth-pages/auth-pages.module.css"],"sourcesContent":["/* ── Layout ── */\n.authLayout {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n min-height: 100dvh;\n padding: 24px;\n background: var(--background);\n}\n\n.authCard {\n width: 100%;\n max-width: 400px;\n border-radius: var(--ts-card-radius, 12px);\n border: 1px solid var(--ts-card-border, var(--border));\n background: var(--ts-card-bg, var(--card));\n color: var(--ts-card-fg, var(--foreground));\n box-shadow: var(--ts-card-shadow, 0 16px 36px rgba(0, 0, 0, 0.28));\n padding: 20px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.authBrand {\n display: flex;\n justify-content: center;\n margin-bottom: 4px;\n}\n\n.authBrand svg {\n width: 40px;\n height: 40px;\n color: var(--primary);\n}\n\n.authHeader {\n text-align: center;\n}\n\n.authTitle {\n font-size: 1.25rem;\n font-weight: 600;\n line-height: 1.4;\n margin: 0;\n color: var(--foreground);\n}\n\n.authSubtitle {\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin-top: 4px;\n margin-bottom: 0;\n line-height: 1.4;\n}\n\n/* ── Form ── */\n.authForm {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n/* ── Field ── */\n.field {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.label {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.2;\n color: var(--foreground);\n}\n\n.input {\n display: flex;\n width: 100%;\n min-height: 2.25rem;\n border-radius: 0.5rem;\n border: 1px solid var(--input);\n background: var(--background);\n color: var(--foreground);\n padding: 0.25rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n box-shadow: var(--ts-input-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));\n transition: border-color 0.15s ease, background 0.15s ease;\n font-family: inherit;\n}\n\n.input::placeholder {\n color: var(--muted-foreground);\n}\n\n.input:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* ── Error ── */\n.error {\n font-size: 0.8rem;\n color: var(--destructive);\n margin-top: 2px;\n}\n\n/* ── Password wrapper ── */\n.passwordWrapper {\n position: relative;\n}\n\n.passwordWrapper .input {\n padding-right: 2.5rem;\n}\n\n.toggle {\n position: absolute;\n right: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n background: none;\n border: none;\n padding: 0.25rem;\n cursor: pointer;\n color: var(--muted-foreground);\n border-radius: 4px;\n transition: color 0.15s, background 0.15s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.toggle:hover {\n color: var(--foreground);\n background: var(--accent);\n}\n\n.toggle:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.eyeIcon {\n width: 1.125rem;\n height: 1.125rem;\n}\n\n/* ── Checkbox row ── */\n.checkboxRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.checkboxLabel {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 0.875rem;\n color: var(--foreground);\n cursor: pointer;\n}\n\n.checkbox {\n width: 1rem;\n height: 1rem;\n accent-color: var(--primary);\n border-radius: 4px;\n cursor: pointer;\n}\n\n.checkbox:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.forgotLink {\n font-size: 0.875rem;\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.forgotLink:hover {\n text-decoration: underline;\n}\n\n.checkboxLink {\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.checkboxLink:hover {\n text-decoration: underline;\n}\n\n/* ── Submit button ── */\n.submitButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n font-family: inherit;\n font-weight: 600;\n border-radius: 8px;\n border: 1px solid transparent;\n cursor: pointer;\n text-decoration: none;\n transition: opacity 0.15s, border-color 0.15s, color 0.15s, background 0.15s;\n white-space: nowrap;\n line-height: 1;\n font-size: 0.95rem;\n min-height: 2.25rem;\n padding: 10px 22px;\n background: var(--primary);\n color: var(--primary-foreground);\n}\n\n.submitButton:focus-visible {\n outline: var(--focus-ring);\n outline-offset: var(--focus-ring-offset);\n}\n\n.submitButton:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.submitButton:hover:not(:disabled) {\n opacity: 0.88;\n}\n\n/* ── Spinner ── */\n.spinner {\n width: 1rem;\n height: 1rem;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top-color: white;\n border-radius: 50%;\n animation: spin 0.6s linear infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\n/* ── Divider ── */\n.divider {\n border: none;\n border-top: 1px solid var(--border);\n margin: 0;\n}\n\n/* ── Footer ── */\n.authFooter {\n text-align: center;\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin: 0;\n}\n\n.authFooter a {\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.authFooter a:hover {\n text-decoration: underline;\n}\n\n/* ── Sent state ── */\n.sentMessage {\n text-align: center;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.sentText {\n font-size: 0.875rem;\n color: var(--foreground);\n line-height: 1.5;\n}\n\n.sentText strong {\n font-weight: 600;\n}\n\n.backLink {\n font-size: 0.875rem;\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.backLink:hover {\n text-decoration: underline;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"index66.cjs","names":[],"sources":["../src/components/auth-card/auth-card.module.css"],"sourcesContent":[".authLayout {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n min-height: 100dvh;\n padding: 20px;\n background: var(--background);\n}\n\n.authCard {\n width: 100%;\n max-width: 400px;\n border-radius: var(--ts-card-radius, 12px);\n border: 1px solid var(--ts-card-border, var(--border));\n background: var(--ts-card-bg, var(--card));\n color: var(--ts-card-fg, var(--foreground));\n box-shadow: var(--ts-card-shadow, 0 16px 36px rgba(0, 0, 0, 0.28));\n padding: 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.authBrand {\n display: flex;\n justify-content: center;\n margin-bottom: 4px;\n}\n\n.authBrand svg {\n width: 40px;\n height: 40px;\n color: var(--primary);\n}\n\n.authHeader {\n text-align: center;\n}\n\n.authTitle {\n font-size: 1.25rem;\n font-weight: 600;\n line-height: 1.4;\n margin: 0;\n color: var(--foreground);\n}\n\n.authSubtitle {\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin-top: 8px;\n margin-bottom: 0;\n line-height: 1.4;\n}\n\n.authBody {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.divider {\n border: none;\n border-top: 1px solid var(--border);\n margin: 0;\n}\n\n.authFooter {\n text-align: center;\n font-size: 0.875rem;\n color: var(--muted-foreground);\n margin: 0;\n}\n\n.authFooter a {\n color: var(--primary);\n text-decoration: none;\n font-weight: 500;\n}\n\n.authFooter a:hover {\n text-decoration: underline;\n}\n"],"mappings":""}
package/dist/index66.js CHANGED
@@ -1,439 +1,50 @@
1
1
  import { cx } from "./index3.js";
2
- import auth_pages_module_default from "./index65.js";
2
+ import auth_card_module_default from "./index65.js";
3
3
  import * as React from "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/auth-pages/AuthPages.tsx
6
- function EyeIcon({ open }) {
7
- if (open) return /* @__PURE__ */ jsxs("svg", {
8
- viewBox: "0 0 24 24",
9
- fill: "none",
10
- "aria-hidden": "true",
11
- className: auth_pages_module_default.eyeIcon,
12
- children: [/* @__PURE__ */ jsx("path", {
13
- d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z",
14
- stroke: "currentColor",
15
- strokeWidth: "2"
16
- }), /* @__PURE__ */ jsx("circle", {
17
- cx: "12",
18
- cy: "12",
19
- r: "3",
20
- stroke: "currentColor",
21
- strokeWidth: "2"
22
- })]
23
- });
24
- return /* @__PURE__ */ jsxs("svg", {
25
- viewBox: "0 0 24 24",
26
- fill: "none",
27
- "aria-hidden": "true",
28
- className: auth_pages_module_default.eyeIcon,
29
- children: [
30
- /* @__PURE__ */ jsx("path", {
31
- d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94",
32
- stroke: "currentColor",
33
- strokeWidth: "2"
34
- }),
35
- /* @__PURE__ */ jsx("path", {
36
- d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19",
37
- stroke: "currentColor",
38
- strokeWidth: "2"
39
- }),
40
- /* @__PURE__ */ jsx("line", {
41
- x1: "1",
42
- y1: "1",
43
- x2: "23",
44
- y2: "23",
45
- stroke: "currentColor",
46
- strokeWidth: "2"
47
- })
48
- ]
49
- });
50
- }
51
- function Field({ label, id, children, error }) {
52
- return /* @__PURE__ */ jsxs("div", {
53
- className: auth_pages_module_default.field,
54
- children: [
55
- /* @__PURE__ */ jsx("label", {
56
- htmlFor: id,
57
- className: auth_pages_module_default.label,
58
- children: label
59
- }),
60
- children,
61
- error && /* @__PURE__ */ jsx("span", {
62
- className: auth_pages_module_default.error,
63
- children: error
64
- })
65
- ]
66
- });
67
- }
68
- function PasswordField({ id, label, placeholder, value, onChange, error }) {
69
- const [show, setShow] = React.useState(false);
70
- const toggleRef = React.useRef(null);
71
- return /* @__PURE__ */ jsx(Field, {
72
- label: label ?? "Password",
73
- id,
74
- error,
75
- children: /* @__PURE__ */ jsxs("div", {
76
- className: auth_pages_module_default.passwordWrapper,
77
- children: [/* @__PURE__ */ jsx("input", {
78
- id,
79
- type: show ? "text" : "password",
80
- placeholder,
81
- value,
82
- onChange,
83
- className: auth_pages_module_default.input
84
- }), /* @__PURE__ */ jsx("button", {
85
- ref: toggleRef,
86
- type: "button",
87
- onClick: () => setShow((s) => !s),
88
- className: auth_pages_module_default.toggle,
89
- "aria-label": show ? "Hide password" : "Show password",
90
- children: /* @__PURE__ */ jsx(EyeIcon, { open: show })
91
- })]
92
- })
93
- });
94
- }
95
- function CheckboxRow({ label, linkText, linkHref, checked, onChange }) {
96
- if (!label) return null;
97
- return /* @__PURE__ */ jsxs("div", {
98
- className: auth_pages_module_default.checkboxRow,
99
- children: [/* @__PURE__ */ jsxs("label", {
100
- className: auth_pages_module_default.checkboxLabel,
101
- children: [/* @__PURE__ */ jsx("input", {
102
- type: "checkbox",
103
- className: auth_pages_module_default.checkbox,
104
- checked,
105
- onChange: (e) => onChange?.(e.target.checked)
106
- }), /* @__PURE__ */ jsx("span", { children: label })]
107
- }), linkHref && /* @__PURE__ */ jsx("a", {
108
- href: linkHref,
109
- className: auth_pages_module_default.forgotLink,
110
- children: linkText
111
- })]
112
- });
113
- }
114
- function SignInPage({ title = "Sign in", subtitle, footer, onSubmit, loading = false, brand, className, emailPlaceholder = "Email address", passwordPlaceholder = "Password", rememberLabel = "Remember me", forgotLinkText = "Forgot password?", forgotLinkHref }) {
115
- const id = React.useId();
116
- const [email, setEmail] = React.useState("");
117
- const [password, setPassword] = React.useState("");
118
- const [rememberMe, setRememberMe] = React.useState(false);
119
- const [errors, setErrors] = React.useState({});
120
- const [submitted, setSubmitted] = React.useState(false);
121
- const validate = () => {
122
- const newErrors = {};
123
- if (!email.trim()) newErrors.email = "Email is required";
124
- else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) newErrors.email = "Enter a valid email";
125
- if (!password) newErrors.password = "Password is required";
126
- setErrors(newErrors);
127
- return Object.keys(newErrors).length === 0;
128
- };
129
- const handleSubmit = (e) => {
130
- e.preventDefault();
131
- setSubmitted(true);
132
- if (!validate()) return;
133
- onSubmit?.({
134
- email,
135
- password,
136
- rememberMe
137
- });
138
- };
5
+ //#region src/components/auth-card/AuthCard.tsx
6
+ /**
7
+ * AuthCard — a centered card layout for auth pages.
8
+ *
9
+ * - Centered vertically and horizontally on screen
10
+ * - Brand → title → subtitle → form → divider → footer
11
+ * - No auth logic — just the visual template
12
+ */
13
+ var AuthCard = React.forwardRef(({ title, subtitle, children, footer, brand, className }, ref) => {
139
14
  return /* @__PURE__ */ jsx("div", {
140
- className: cx(auth_pages_module_default.authLayout, className),
15
+ className: cx(auth_card_module_default.authLayout, className),
16
+ ref,
141
17
  children: /* @__PURE__ */ jsxs("div", {
142
- className: auth_pages_module_default.authCard,
18
+ className: auth_card_module_default.authCard,
143
19
  children: [
144
20
  brand && /* @__PURE__ */ jsx("div", {
145
- className: auth_pages_module_default.authBrand,
21
+ className: auth_card_module_default.authBrand,
146
22
  children: brand
147
23
  }),
148
24
  /* @__PURE__ */ jsxs("div", {
149
- className: auth_pages_module_default.authHeader,
25
+ className: auth_card_module_default.authHeader,
150
26
  children: [/* @__PURE__ */ jsx("h1", {
151
- className: auth_pages_module_default.authTitle,
27
+ className: auth_card_module_default.authTitle,
152
28
  children: title
153
29
  }), subtitle && /* @__PURE__ */ jsx("p", {
154
- className: auth_pages_module_default.authSubtitle,
30
+ className: auth_card_module_default.authSubtitle,
155
31
  children: subtitle
156
32
  })]
157
33
  }),
158
- /* @__PURE__ */ jsxs("form", {
159
- onSubmit: handleSubmit,
160
- className: auth_pages_module_default.authForm,
161
- children: [
162
- /* @__PURE__ */ jsx(Field, {
163
- label: emailPlaceholder,
164
- id: id + "-email",
165
- error: submitted ? errors.email : void 0,
166
- children: /* @__PURE__ */ jsx("input", {
167
- id: id + "-email",
168
- type: "email",
169
- placeholder: "you@example.com",
170
- value: email,
171
- onChange: (e) => setEmail(e.target.value),
172
- className: auth_pages_module_default.input,
173
- autoComplete: "email",
174
- autoFocus: true
175
- })
176
- }),
177
- /* @__PURE__ */ jsx(PasswordField, {
178
- label: passwordPlaceholder,
179
- id: id + "-password",
180
- placeholder: passwordPlaceholder,
181
- value: password,
182
- onChange: (e) => {
183
- setPassword(e.target.value);
184
- if (submitted) setSubmitted(false);
185
- },
186
- error: submitted ? errors.password : void 0
187
- }),
188
- /* @__PURE__ */ jsx(CheckboxRow, {
189
- label: rememberLabel,
190
- linkText: forgotLinkText,
191
- linkHref: forgotLinkHref,
192
- checked: rememberMe,
193
- onChange: (c) => {
194
- setRememberMe(c);
195
- if (submitted) setSubmitted(false);
196
- }
197
- }),
198
- /* @__PURE__ */ jsx("button", {
199
- type: "submit",
200
- disabled: loading,
201
- className: auth_pages_module_default.submitButton,
202
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: auth_pages_module_default.spinner }), "Signing in..."] }) : "Sign in"
203
- })
204
- ]
205
- }),
206
- footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_pages_module_default.divider }), /* @__PURE__ */ jsx("p", {
207
- className: auth_pages_module_default.authFooter,
208
- children: footer
209
- })] })
210
- ]
211
- })
212
- });
213
- }
214
- function SignUpPage({ title = "Create an account", subtitle, footer, onSubmit, loading = false, brand, className, emailPlaceholder = "Email address", passwordPlaceholder = "Password", confirmPasswordPlaceholder = "Confirm password", checkboxLabel, checkboxLinkText, checkboxLinkHref }) {
215
- const id = React.useId();
216
- const [email, setEmail] = React.useState("");
217
- const [password, setPassword] = React.useState("");
218
- const [confirmPassword, setConfirmPassword] = React.useState("");
219
- const [agreed, setAgreed] = React.useState(false);
220
- const [errors, setErrors] = React.useState({});
221
- const [submitted, setSubmitted] = React.useState(false);
222
- const validate = () => {
223
- const newErrors = {};
224
- if (!email.trim()) newErrors.email = "Email is required";
225
- else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) newErrors.email = "Enter a valid email";
226
- if (!password) newErrors.password = "Password is required";
227
- else if (password.length < 8) newErrors.password = "At least 8 characters";
228
- if (password !== confirmPassword) newErrors.confirmPassword = "Passwords do not match";
229
- if (!agreed) newErrors.agreed = "You must agree to continue";
230
- setErrors(newErrors);
231
- return Object.keys(newErrors).length === 0;
232
- };
233
- const handleSubmit = (e) => {
234
- e.preventDefault();
235
- setSubmitted(true);
236
- if (!validate()) return;
237
- onSubmit?.({
238
- email,
239
- password,
240
- agreed
241
- });
242
- };
243
- return /* @__PURE__ */ jsx("div", {
244
- className: cx(auth_pages_module_default.authLayout, className),
245
- children: /* @__PURE__ */ jsxs("div", {
246
- className: auth_pages_module_default.authCard,
247
- children: [
248
- brand && /* @__PURE__ */ jsx("div", {
249
- className: auth_pages_module_default.authBrand,
250
- children: brand
251
- }),
252
- /* @__PURE__ */ jsxs("div", {
253
- className: auth_pages_module_default.authHeader,
254
- children: [/* @__PURE__ */ jsx("h1", {
255
- className: auth_pages_module_default.authTitle,
256
- children: title
257
- }), subtitle && /* @__PURE__ */ jsx("p", {
258
- className: auth_pages_module_default.authSubtitle,
259
- children: subtitle
260
- })]
261
- }),
262
- /* @__PURE__ */ jsxs("form", {
263
- onSubmit: handleSubmit,
264
- className: auth_pages_module_default.authForm,
265
- children: [
266
- /* @__PURE__ */ jsx(Field, {
267
- label: emailPlaceholder,
268
- id: id + "-email",
269
- error: submitted ? errors.email : void 0,
270
- children: /* @__PURE__ */ jsx("input", {
271
- id: id + "-email",
272
- type: "email",
273
- placeholder: "you@example.com",
274
- value: email,
275
- onChange: (e) => {
276
- setEmail(e.target.value);
277
- if (submitted) setSubmitted(false);
278
- },
279
- className: auth_pages_module_default.input,
280
- autoComplete: "email",
281
- autoFocus: true
282
- })
283
- }),
284
- /* @__PURE__ */ jsx(PasswordField, {
285
- label: passwordPlaceholder,
286
- id: id + "-password",
287
- placeholder: passwordPlaceholder,
288
- value: password,
289
- onChange: (e) => {
290
- setPassword(e.target.value);
291
- if (submitted) setSubmitted(false);
292
- },
293
- error: submitted ? errors.password : void 0
294
- }),
295
- /* @__PURE__ */ jsx(PasswordField, {
296
- label: confirmPasswordPlaceholder,
297
- id: id + "-confirm",
298
- placeholder: confirmPasswordPlaceholder,
299
- value: confirmPassword,
300
- onChange: (e) => {
301
- setConfirmPassword(e.target.value);
302
- if (submitted) setSubmitted(false);
303
- },
304
- error: submitted ? errors.confirmPassword : void 0
305
- }),
306
- checkboxLabel && /* @__PURE__ */ jsx("div", {
307
- className: auth_pages_module_default.checkboxRow,
308
- children: /* @__PURE__ */ jsxs("label", {
309
- className: auth_pages_module_default.checkboxLabel,
310
- children: [/* @__PURE__ */ jsx("input", {
311
- id: id + "-agreed",
312
- type: "checkbox",
313
- checked: agreed,
314
- onChange: (e) => {
315
- setAgreed(e.target.checked);
316
- if (submitted) setSubmitted(false);
317
- },
318
- className: auth_pages_module_default.checkbox
319
- }), /* @__PURE__ */ jsx("span", { children: checkboxLinkText ? /* @__PURE__ */ jsxs(Fragment, { children: [
320
- "I agree to the",
321
- " ",
322
- /* @__PURE__ */ jsx("a", {
323
- href: checkboxLinkHref,
324
- className: auth_pages_module_default.checkboxLink,
325
- children: checkboxLinkText
326
- })
327
- ] }) : checkboxLabel })]
328
- })
329
- }),
330
- submitted && errors.agreed && /* @__PURE__ */ jsx("span", {
331
- className: auth_pages_module_default.error,
332
- children: errors.agreed
333
- }),
334
- /* @__PURE__ */ jsx("button", {
335
- type: "submit",
336
- disabled: loading,
337
- className: auth_pages_module_default.submitButton,
338
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: auth_pages_module_default.spinner }), "Creating account..."] }) : "Create account"
339
- })
340
- ]
341
- }),
342
- footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_pages_module_default.divider }), /* @__PURE__ */ jsx("p", {
343
- className: auth_pages_module_default.authFooter,
344
- children: footer
345
- })] })
346
- ]
347
- })
348
- });
349
- }
350
- function ForgotPasswordPage({ title = "Reset password", subtitle = "Enter your email and we'll send a reset link", footer, onSubmit, loading = false, brand, className, emailPlaceholder = "Email address", buttonText = "Send reset link", backLinkText = "Back to sign in", backLinkHref = "/signin" }) {
351
- const id = React.useId();
352
- const [email, setEmail] = React.useState("");
353
- const [error, setError] = React.useState("");
354
- const [sent, setSent] = React.useState(false);
355
- const handleSubmit = (e) => {
356
- e.preventDefault();
357
- if (!email.trim()) {
358
- setError("Email is required");
359
- return;
360
- }
361
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
362
- setError("Enter a valid email");
363
- return;
364
- }
365
- onSubmit?.({ email });
366
- setSent(true);
367
- };
368
- return /* @__PURE__ */ jsx("div", {
369
- className: cx(auth_pages_module_default.authLayout, className),
370
- children: /* @__PURE__ */ jsxs("div", {
371
- className: auth_pages_module_default.authCard,
372
- children: [
373
- brand && /* @__PURE__ */ jsx("div", {
374
- className: auth_pages_module_default.authBrand,
375
- children: brand
376
- }),
377
- /* @__PURE__ */ jsxs("div", {
378
- className: auth_pages_module_default.authHeader,
379
- children: [/* @__PURE__ */ jsx("h1", {
380
- className: auth_pages_module_default.authTitle,
381
- children: title
382
- }), subtitle && /* @__PURE__ */ jsx("p", {
383
- className: auth_pages_module_default.authSubtitle,
384
- children: subtitle
385
- })]
386
- }),
387
- sent ? /* @__PURE__ */ jsxs("div", {
388
- className: auth_pages_module_default.sentMessage,
389
- children: [/* @__PURE__ */ jsxs("p", {
390
- className: auth_pages_module_default.sentText,
391
- children: [
392
- "If an account exists for ",
393
- /* @__PURE__ */ jsx("strong", { children: email }),
394
- ", you'll receive a reset link shortly."
395
- ]
396
- }), /* @__PURE__ */ jsx("a", {
397
- href: backLinkHref,
398
- className: auth_pages_module_default.backLink,
399
- children: backLinkText
400
- })]
401
- }) : /* @__PURE__ */ jsxs("form", {
402
- onSubmit: handleSubmit,
403
- className: auth_pages_module_default.authForm,
404
- children: [/* @__PURE__ */ jsx(Field, {
405
- label: emailPlaceholder,
406
- id: id + "-email",
407
- error,
408
- children: /* @__PURE__ */ jsx("input", {
409
- id: id + "-email",
410
- type: "email",
411
- placeholder: "you@example.com",
412
- value: email,
413
- onChange: (e) => {
414
- setEmail(e.target.value);
415
- setError("");
416
- },
417
- className: auth_pages_module_default.input,
418
- autoComplete: "email",
419
- autoFocus: true
420
- })
421
- }), /* @__PURE__ */ jsx("button", {
422
- type: "submit",
423
- disabled: loading,
424
- className: auth_pages_module_default.submitButton,
425
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: auth_pages_module_default.spinner }), "Sending..."] }) : buttonText
426
- })]
34
+ /* @__PURE__ */ jsx("div", {
35
+ className: auth_card_module_default.authBody,
36
+ children
427
37
  }),
428
- footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_pages_module_default.divider }), /* @__PURE__ */ jsx("p", {
429
- className: auth_pages_module_default.authFooter,
38
+ footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_card_module_default.divider }), /* @__PURE__ */ jsx("p", {
39
+ className: auth_card_module_default.authFooter,
430
40
  children: footer
431
41
  })] })
432
42
  ]
433
43
  })
434
44
  });
435
- }
45
+ });
46
+ AuthCard.displayName = "AuthCard";
436
47
  //#endregion
437
- export { ForgotPasswordPage, SignInPage, SignUpPage };
48
+ export { AuthCard };
438
49
 
439
50
  //# sourceMappingURL=index66.js.map