tempest-react-sdk 0.80.0 → 0.82.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 (247) hide show
  1. package/README.md +40 -10
  2. package/bin/create-tempest-app.e2e.test.mjs +31 -0
  3. package/bin/create-tempest-app.mjs +11 -1
  4. package/bin/lib/component/generate.test.mjs +13 -1
  5. package/bin/lib/doctor/doctor.e2e.test.mjs +29 -0
  6. package/bin/lib/doctor/vitest.mjs +120 -0
  7. package/bin/lib/doctor/vitest.test.mjs +139 -0
  8. package/bin/lib/fs/contain.mjs +7 -0
  9. package/bin/lib/openapi/escape.mjs +68 -4
  10. package/bin/lib/openapi/generate.hostile.test.mjs +150 -1
  11. package/bin/lib/openapi/generate.mjs +78 -13
  12. package/bin/lib/openapi/generate.test.mjs +13 -1
  13. package/bin/lib/openapi/pattern-risk.mjs +134 -0
  14. package/bin/lib/openapi/pattern-risk.test.mjs +45 -0
  15. package/bin/tempest-gen.test.mjs +100 -0
  16. package/bin/tempest.mjs +24 -8
  17. package/dist/access/use-can.cjs +1 -1
  18. package/dist/access/use-can.cjs.map +1 -1
  19. package/dist/access/use-can.js +25 -28
  20. package/dist/access/use-can.js.map +1 -1
  21. package/dist/auth/create-tempest-auth.cjs +1 -1
  22. package/dist/auth/create-tempest-auth.cjs.map +1 -1
  23. package/dist/auth/create-tempest-auth.js +234 -122
  24. package/dist/auth/create-tempest-auth.js.map +1 -1
  25. package/dist/auth/session-identity.cjs +2 -0
  26. package/dist/auth/session-identity.cjs.map +1 -0
  27. package/dist/auth/session-identity.js +12 -0
  28. package/dist/auth/session-identity.js.map +1 -0
  29. package/dist/br/boleto.cjs +1 -1
  30. package/dist/br/boleto.cjs.map +1 -1
  31. package/dist/br/boleto.js +2 -1
  32. package/dist/br/boleto.js.map +1 -1
  33. package/dist/br.d.ts +22 -3
  34. package/dist/components/AuthForm/AuthFieldControl.cjs +2 -0
  35. package/dist/components/AuthForm/AuthFieldControl.cjs.map +1 -0
  36. package/dist/components/AuthForm/AuthFieldControl.js +85 -0
  37. package/dist/components/AuthForm/AuthFieldControl.js.map +1 -0
  38. package/dist/components/AuthForm/AuthForm.cjs +2 -0
  39. package/dist/components/AuthForm/AuthForm.cjs.map +1 -0
  40. package/dist/components/AuthForm/AuthForm.js +83 -0
  41. package/dist/components/AuthForm/AuthForm.js.map +1 -0
  42. package/dist/components/AuthForm/AuthForm.module.cjs +3 -0
  43. package/dist/components/AuthForm/AuthForm.module.cjs.map +1 -0
  44. package/dist/components/AuthForm/AuthForm.module.js +14 -0
  45. package/dist/components/AuthForm/AuthForm.module.js.map +1 -0
  46. package/dist/components/AuthForm/AuthLinks.cjs +2 -0
  47. package/dist/components/AuthForm/AuthLinks.cjs.map +1 -0
  48. package/dist/components/AuthForm/AuthLinks.js +32 -0
  49. package/dist/components/AuthForm/AuthLinks.js.map +1 -0
  50. package/dist/components/AuthForm/ForgotPasswordForm.cjs +2 -0
  51. package/dist/components/AuthForm/ForgotPasswordForm.cjs.map +1 -0
  52. package/dist/components/AuthForm/ForgotPasswordForm.js +32 -0
  53. package/dist/components/AuthForm/ForgotPasswordForm.js.map +1 -0
  54. package/dist/components/AuthForm/LoginForm.cjs +2 -0
  55. package/dist/components/AuthForm/LoginForm.cjs.map +1 -0
  56. package/dist/components/AuthForm/LoginForm.js +39 -0
  57. package/dist/components/AuthForm/LoginForm.js.map +1 -0
  58. package/dist/components/AuthForm/ResetPasswordForm.cjs +2 -0
  59. package/dist/components/AuthForm/ResetPasswordForm.cjs.map +1 -0
  60. package/dist/components/AuthForm/ResetPasswordForm.js +39 -0
  61. package/dist/components/AuthForm/ResetPasswordForm.js.map +1 -0
  62. package/dist/components/AuthForm/SignUpForm.cjs +2 -0
  63. package/dist/components/AuthForm/SignUpForm.cjs.map +1 -0
  64. package/dist/components/AuthForm/SignUpForm.js +32 -0
  65. package/dist/components/AuthForm/SignUpForm.js.map +1 -0
  66. package/dist/components/AuthForm/auth-defaults.cjs +2 -0
  67. package/dist/components/AuthForm/auth-defaults.cjs.map +1 -0
  68. package/dist/components/AuthForm/auth-defaults.js +54 -0
  69. package/dist/components/AuthForm/auth-defaults.js.map +1 -0
  70. package/dist/components/AuthForm/auth-schemas.cjs +2 -0
  71. package/dist/components/AuthForm/auth-schemas.cjs.map +1 -0
  72. package/dist/components/AuthForm/auth-schemas.js +26 -0
  73. package/dist/components/AuthForm/auth-schemas.js.map +1 -0
  74. package/dist/components/AuthPage/AuthPage.cjs +2 -0
  75. package/dist/components/AuthPage/AuthPage.cjs.map +1 -0
  76. package/dist/components/AuthPage/AuthPage.js +97 -0
  77. package/dist/components/AuthPage/AuthPage.js.map +1 -0
  78. package/dist/components/AuthPage/AuthPage.module.cjs +3 -0
  79. package/dist/components/AuthPage/AuthPage.module.cjs.map +1 -0
  80. package/dist/components/AuthPage/AuthPage.module.js +24 -0
  81. package/dist/components/AuthPage/AuthPage.module.js.map +1 -0
  82. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
  83. package/dist/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
  84. package/dist/components/Breadcrumbs/Breadcrumbs.js +22 -21
  85. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  86. package/dist/components/Button/Button.cjs +1 -1
  87. package/dist/components/Button/Button.cjs.map +1 -1
  88. package/dist/components/Button/Button.js +41 -40
  89. package/dist/components/Button/Button.js.map +1 -1
  90. package/dist/components/Chat/ChatAttachments.cjs +1 -1
  91. package/dist/components/Chat/ChatAttachments.cjs.map +1 -1
  92. package/dist/components/Chat/ChatAttachments.js +38 -38
  93. package/dist/components/FilterBar/filter-apply.cjs +1 -1
  94. package/dist/components/FilterBar/filter-apply.cjs.map +1 -1
  95. package/dist/components/FilterBar/filter-apply.js +7 -7
  96. package/dist/components/Form/Form.cjs +1 -1
  97. package/dist/components/Form/Form.cjs.map +1 -1
  98. package/dist/components/Form/Form.js +30 -32
  99. package/dist/components/Form/Form.js.map +1 -1
  100. package/dist/components/Layout/Layout.cjs +1 -1
  101. package/dist/components/Layout/Layout.cjs.map +1 -1
  102. package/dist/components/Layout/Layout.js +25 -24
  103. package/dist/components/Layout/Layout.js.map +1 -1
  104. package/dist/components/Layout/gap.cjs +2 -0
  105. package/dist/components/Layout/gap.cjs.map +1 -0
  106. package/dist/components/Layout/gap.js +15 -0
  107. package/dist/components/Layout/gap.js.map +1 -0
  108. package/dist/components/NavigationMenu/NavigationMenu.cjs +1 -1
  109. package/dist/components/NavigationMenu/NavigationMenu.cjs.map +1 -1
  110. package/dist/components/NavigationMenu/NavigationMenu.js +71 -70
  111. package/dist/components/NavigationMenu/NavigationMenu.js.map +1 -1
  112. package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
  113. package/dist/components/Sidebar/Sidebar.js.map +1 -1
  114. package/dist/components/Sidebar/SidebarEntry.cjs +1 -1
  115. package/dist/components/Sidebar/SidebarEntry.cjs.map +1 -1
  116. package/dist/components/Sidebar/SidebarEntry.js +30 -29
  117. package/dist/components/Sidebar/SidebarEntry.js.map +1 -1
  118. package/dist/data/create-data-provider.cjs +1 -1
  119. package/dist/data/create-data-provider.cjs.map +1 -1
  120. package/dist/data/create-data-provider.js +1 -2
  121. package/dist/data/create-data-provider.js.map +1 -1
  122. package/dist/forms/index.js +7 -7
  123. package/dist/forms/masked-inputs.cjs +1 -1
  124. package/dist/forms/masked-inputs.cjs.map +1 -1
  125. package/dist/forms/masked-inputs.js +15 -15
  126. package/dist/forms/validate-form.cjs +1 -1
  127. package/dist/forms/validate-form.cjs.map +1 -1
  128. package/dist/forms/validate-form.js +6 -1
  129. package/dist/forms/validate-form.js.map +1 -1
  130. package/dist/forms/zod-resolver.cjs +1 -1
  131. package/dist/forms/zod-resolver.cjs.map +1 -1
  132. package/dist/forms/zod-resolver.js +8 -3
  133. package/dist/forms/zod-resolver.js.map +1 -1
  134. package/dist/http/api-client.cjs +1 -1
  135. package/dist/http/api-client.cjs.map +1 -1
  136. package/dist/http/api-client.js +137 -116
  137. package/dist/http/api-client.js.map +1 -1
  138. package/dist/http/credential-scope.cjs +1 -1
  139. package/dist/http/credential-scope.cjs.map +1 -1
  140. package/dist/http/credential-scope.js +33 -9
  141. package/dist/http/credential-scope.js.map +1 -1
  142. package/dist/http/presigned-post.cjs.map +1 -1
  143. package/dist/http/presigned-post.js.map +1 -1
  144. package/dist/http/resumable-upload.cjs +1 -1
  145. package/dist/http/resumable-upload.cjs.map +1 -1
  146. package/dist/http/resumable-upload.js +140 -134
  147. package/dist/http/resumable-upload.js.map +1 -1
  148. package/dist/http/upload-with-progress.cjs +1 -1
  149. package/dist/http/upload-with-progress.cjs.map +1 -1
  150. package/dist/http/upload-with-progress.js +17 -17
  151. package/dist/http/upload-with-progress.js.map +1 -1
  152. package/dist/http/use-describe-api-error.cjs +1 -1
  153. package/dist/http/use-describe-api-error.cjs.map +1 -1
  154. package/dist/http/use-describe-api-error.js +9 -9
  155. package/dist/oauth/GoogleSignIn.cjs +1 -1
  156. package/dist/oauth/GoogleSignIn.cjs.map +1 -1
  157. package/dist/oauth/GoogleSignIn.js +5 -4
  158. package/dist/oauth/GoogleSignIn.js.map +1 -1
  159. package/dist/offline/create-offline-sync.cjs +1 -1
  160. package/dist/offline/create-offline-sync.cjs.map +1 -1
  161. package/dist/offline/create-offline-sync.js +108 -68
  162. package/dist/offline/create-offline-sync.js.map +1 -1
  163. package/dist/query/offline-persistence.cjs +1 -1
  164. package/dist/query/offline-persistence.cjs.map +1 -1
  165. package/dist/query/offline-persistence.js +54 -44
  166. package/dist/query/offline-persistence.js.map +1 -1
  167. package/dist/sse/create-event-stream.cjs +1 -1
  168. package/dist/sse/create-event-stream.cjs.map +1 -1
  169. package/dist/sse/create-event-stream.js +48 -41
  170. package/dist/sse/create-event-stream.js.map +1 -1
  171. package/dist/sse/ticket-event-stream.cjs +1 -1
  172. package/dist/sse/ticket-event-stream.cjs.map +1 -1
  173. package/dist/sse/ticket-event-stream.js +48 -19
  174. package/dist/sse/ticket-event-stream.js.map +1 -1
  175. package/dist/sse/use-event-stream.cjs +1 -1
  176. package/dist/sse/use-event-stream.cjs.map +1 -1
  177. package/dist/sse/use-event-stream.js +19 -14
  178. package/dist/sse/use-event-stream.js.map +1 -1
  179. package/dist/styles/AuthForm.css +2 -0
  180. package/dist/styles/AuthPage.css +2 -0
  181. package/dist/styles/component/AuthForm.css +9 -0
  182. package/dist/styles/component/AuthPage.css +29 -0
  183. package/dist/styles/forms.css +36 -0
  184. package/dist/styles/manifest.json +63 -0
  185. package/dist/styles.css +1 -1
  186. package/dist/sw/background-sync.cjs +1 -1
  187. package/dist/sw/background-sync.cjs.map +1 -1
  188. package/dist/sw/background-sync.js +132 -112
  189. package/dist/sw/background-sync.js.map +1 -1
  190. package/dist/sw/cache.cjs +1 -1
  191. package/dist/sw/cache.cjs.map +1 -1
  192. package/dist/sw/cache.js +36 -30
  193. package/dist/sw/cache.js.map +1 -1
  194. package/dist/sw/create-push-handler.cjs +1 -1
  195. package/dist/sw/create-push-handler.cjs.map +1 -1
  196. package/dist/sw/create-push-handler.js +20 -10
  197. package/dist/sw/create-push-handler.js.map +1 -1
  198. package/dist/sw.d.ts +93 -28
  199. package/dist/tabular/compact.cjs +1 -1
  200. package/dist/tabular/compact.cjs.map +1 -1
  201. package/dist/tabular/compact.js +35 -16
  202. package/dist/tabular/compact.js.map +1 -1
  203. package/dist/tabular/manifest.cjs +1 -1
  204. package/dist/tabular/manifest.cjs.map +1 -1
  205. package/dist/tabular/manifest.js +33 -15
  206. package/dist/tabular/manifest.js.map +1 -1
  207. package/dist/tabular.d.ts +11 -1
  208. package/dist/tempest-react-sdk.cjs +1 -1
  209. package/dist/tempest-react-sdk.d.ts +1057 -83
  210. package/dist/tempest-react-sdk.js +373 -365
  211. package/dist/theme/initial-theme.cjs +4 -4
  212. package/dist/theme/initial-theme.cjs.map +1 -1
  213. package/dist/theme/initial-theme.js +8 -5
  214. package/dist/theme/initial-theme.js.map +1 -1
  215. package/dist/utils/compressed-storage.cjs +1 -1
  216. package/dist/utils/compressed-storage.cjs.map +1 -1
  217. package/dist/utils/compressed-storage.js +13 -7
  218. package/dist/utils/compressed-storage.js.map +1 -1
  219. package/dist/utils/format.cjs +1 -1
  220. package/dist/utils/format.cjs.map +1 -1
  221. package/dist/utils/format.js +25 -25
  222. package/dist/utils/numbers.cjs +1 -1
  223. package/dist/utils/numbers.cjs.map +1 -1
  224. package/dist/utils/numbers.js +7 -7
  225. package/dist/utils/objects.cjs +1 -1
  226. package/dist/utils/objects.cjs.map +1 -1
  227. package/dist/utils/objects.js +13 -7
  228. package/dist/utils/objects.js.map +1 -1
  229. package/dist/utils/safe-url.cjs +1 -1
  230. package/dist/utils/safe-url.cjs.map +1 -1
  231. package/dist/utils/safe-url.js +4 -1
  232. package/dist/utils/safe-url.js.map +1 -1
  233. package/dist/webrtc/peer-mesh.cjs +1 -1
  234. package/dist/webrtc/peer-mesh.cjs.map +1 -1
  235. package/dist/webrtc/peer-mesh.js +7 -1
  236. package/dist/webrtc/peer-mesh.js.map +1 -1
  237. package/dist/ws/create-web-socket.cjs +1 -1
  238. package/dist/ws/create-web-socket.cjs.map +1 -1
  239. package/dist/ws/create-web-socket.js +77 -61
  240. package/dist/ws/create-web-socket.js.map +1 -1
  241. package/dist/ws/use-web-socket.cjs +1 -1
  242. package/dist/ws/use-web-socket.cjs.map +1 -1
  243. package/dist/ws/use-web-socket.js +4 -3
  244. package/dist/ws/use-web-socket.js.map +1 -1
  245. package/package.json +1 -1
  246. package/template-pwa/src/pwa.tsx +42 -0
  247. package/template-pwa/src/sw.ts +15 -10
@@ -0,0 +1,32 @@
1
+ import { FORGOT_PASSWORD_FIELDS as e } from "./auth-defaults.js";
2
+ import { AuthForm as t } from "./AuthForm.js";
3
+ import { AuthPrompt as n } from "./AuthLinks.js";
4
+ import { forgotPasswordSchema as r } from "./auth-schemas.js";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ //#region src/components/AuthForm/ForgotPasswordForm.tsx
7
+ var a = {
8
+ signInPrompt: "Lembrou a senha?",
9
+ signIn: "Entrar"
10
+ };
11
+ function o({ schema: o, fields: s, links: c, labels: l, submitLabel: u = "Enviar link", ...d }) {
12
+ let f = {
13
+ ...a,
14
+ ...l
15
+ };
16
+ return /* @__PURE__ */ i(t, {
17
+ ...d,
18
+ schema: o ?? r,
19
+ fields: s ?? e,
20
+ labels: l,
21
+ submitLabel: u,
22
+ afterSubmit: /* @__PURE__ */ i(n, {
23
+ prompt: f.signInPrompt,
24
+ label: f.signIn,
25
+ to: c?.signIn
26
+ })
27
+ });
28
+ }
29
+ //#endregion
30
+ export { o as ForgotPasswordForm };
31
+
32
+ //# sourceMappingURL=ForgotPasswordForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForgotPasswordForm.js","names":["DEFAULT_LABELS","ForgotPasswordForm","props","text","labels","AuthForm","schema","forgotPasswordSchema","fields","FORGOT_PASSWORD_FIELDS","AuthPrompt","links"],"sources":["../../../src/components/AuthForm/ForgotPasswordForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { FORGOT_PASSWORD_FIELDS } from \"./auth-defaults\";\nimport { AuthPrompt } from \"./AuthLinks\";\nimport { forgotPasswordSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\n\n/** Sentences of {@link ForgotPasswordForm}, PT-BR by default. */\nexport interface ForgotPasswordFormLabels extends AuthFormLabels {\n /** Default `\"Lembrou a senha?\"`. */\n signInPrompt: string;\n /** Default `\"Entrar\"`. */\n signIn: string;\n}\n\n/** Routes the forgot-password form links to. */\nexport interface ForgotPasswordFormLinks {\n /** \"Entrar\" link, under the form. */\n signIn?: string;\n}\n\nexport interface ForgotPasswordFormProps<\n TSchema extends z.ZodTypeAny = typeof forgotPasswordSchema,\n> extends AuthPresetProps<TSchema> {\n /** Where the links go. */\n links?: ForgotPasswordFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<ForgotPasswordFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<ForgotPasswordFormLabels, keyof AuthFormLabels> = {\n signInPrompt: \"Lembrou a senha?\",\n signIn: \"Entrar\",\n};\n\n/**\n * \"Forgot password\" form: the e-mail the reset link goes to.\n *\n * The confirmation screen after a successful submit is the app's call — most\n * backends answer the same whether or not the address exists, so the copy\n * belongs next to the backend's policy, not here.\n *\n * @example\n * const [sent, setSent] = useState(false);\n * <ForgotPasswordForm\n * onSubmit={async (values) => { await api.post(\"/auth/forgot-password\", { body: values }); setSent(true); }}\n * links={{ signIn: \"/login\" }}\n * />\n */\nexport function ForgotPasswordForm<TSchema extends z.ZodTypeAny = typeof forgotPasswordSchema>({\n schema,\n fields,\n links,\n labels,\n submitLabel = \"Enviar link\",\n ...props\n}: ForgotPasswordFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (forgotPasswordSchema as unknown as TSchema)}\n fields={\n fields ?? (FORGOT_PASSWORD_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])\n }\n labels={labels}\n submitLabel={submitLabel}\n afterSubmit={\n <AuthPrompt prompt={text.signInPrompt} label={text.signIn} to={links?.signIn} />\n }\n />\n );\n}\n"],"mappings":";;;;;;AA+BA,IAAMA,IAAuE;CACzE,cAAc;CACd,QAAQ;AACZ;AAgBA,SAAgBC,EAA+E,EAC3F,WACA,WACA,UACA,WACA,iBAAc,eACd,GAAGC,KACyC;CAC5C,IAAMC,IAAO;EAAE,GAAGH;EAAgB,GAAGI;CAAO;CAC5C,OACI,kBAACC,GAAD;EACI,GAAIH;EACJ,QAAQI,KAAWC;EACnB,QACIC,KAAWC;EAEP;EACK;EACb,aACI,kBAACC,GAAD;GAAY,QAAQP,EAAK;GAAc,OAAOA,EAAK;GAAQ,IAAIQ,GAAO;EAAS,CAAA;CAEtF,CAAA;AAET"}
@@ -0,0 +1,2 @@
1
+ const e=require("./auth-defaults.cjs"),t=require("./AuthForm.module.cjs"),n=require("./AuthForm.cjs"),r=require("./AuthLinks.cjs"),i=require("./auth-schemas.cjs");let a=require("react/jsx-runtime");var o={forgotPassword:`Esqueceu a senha?`,signUpPrompt:`Não tem uma conta?`,signUp:`Cadastre-se`};function s({schema:s,fields:c,links:l,labels:u,submitLabel:d=`Entrar`,...f}){let p={...o,...u};return(0,a.jsx)(n.AuthForm,{...f,schema:s??i.loginSchema,fields:c??e.LOGIN_FIELDS,labels:u,submitLabel:d,beforeSubmit:l?.forgotPassword!==void 0&&(0,a.jsx)(r.AuthLink,{to:l.forgotPassword,className:t.default.forgot,children:p.forgotPassword}),afterSubmit:(0,a.jsx)(r.AuthPrompt,{prompt:p.signUpPrompt,label:p.signUp,to:l?.signUp})})}exports.LoginForm=s;
2
+ //# sourceMappingURL=LoginForm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginForm.cjs","names":["AuthForm","loginSchema","LOGIN_FIELDS","AuthLink","styles","AuthPrompt","require_auth_defaults","require_AuthForm_module","require_AuthForm","require_AuthLinks","require_auth_schemas","react_jsx_runtime","DEFAULT_LABELS","LoginForm","props","text","labels","schema","fields","links"],"sources":["../../../src/components/AuthForm/LoginForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { LOGIN_FIELDS } from \"./auth-defaults\";\nimport { AuthLink, AuthPrompt } from \"./AuthLinks\";\nimport { loginSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\nimport styles from \"./AuthForm.module.css\";\n\n/** Sentences of {@link LoginForm}, PT-BR by default. */\nexport interface LoginFormLabels extends AuthFormLabels {\n /** Default `\"Esqueceu a senha?\"`. */\n forgotPassword: string;\n /** Default `\"Não tem uma conta?\"`. */\n signUpPrompt: string;\n /** Default `\"Cadastre-se\"`. */\n signUp: string;\n}\n\n/** Routes the login form links to. Each link is rendered only when its route is set. */\nexport interface LoginFormLinks {\n /** \"Esqueceu a senha?\" link, above the submit button. */\n forgotPassword?: string;\n /** \"Cadastre-se\" link, under the form. */\n signUp?: string;\n}\n\nexport interface LoginFormProps<\n TSchema extends z.ZodTypeAny = typeof loginSchema,\n> extends AuthPresetProps<TSchema> {\n /** Where the links go. */\n links?: LoginFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<LoginFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<LoginFormLabels, keyof AuthFormLabels> = {\n forgotPassword: \"Esqueceu a senha?\",\n signUpPrompt: \"Não tem uma conta?\",\n signUp: \"Cadastre-se\",\n};\n\n/**\n * Sign-in form: e-mail and password, \"forgot password\" link, sign-up line and a\n * slot for social buttons.\n *\n * `AuthForm` with the defaults every app wrote by hand: the e-mail trimmed and\n * lower-cased before validation, `current-password` autocomplete so the saved\n * password is offered, and the two links in the place users look for them. What\n * happens on success — storing the session, redirecting — stays in `onSubmit`.\n *\n * @example\n * <LoginForm\n * onSubmit={async (values) => { await auth.login(values); navigate(\"/\"); }}\n * links={{ forgotPassword: \"/recuperar-senha\", signUp: \"/cadastro\" }}\n * social={<GoogleSignIn component={GoogleLogin} onSuccess={signInWithGoogle} />}\n * />\n */\nexport function LoginForm<TSchema extends z.ZodTypeAny = typeof loginSchema>({\n schema,\n fields,\n links,\n labels,\n submitLabel = \"Entrar\",\n ...props\n}: LoginFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (loginSchema as unknown as TSchema)}\n fields={fields ?? (LOGIN_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])}\n labels={labels}\n submitLabel={submitLabel}\n beforeSubmit={\n links?.forgotPassword !== undefined && (\n <AuthLink to={links.forgotPassword} className={styles.forgot}>\n {text.forgotPassword}\n </AuthLink>\n )\n }\n afterSubmit={\n <AuthPrompt prompt={text.signUpPrompt} label={text.signUp} to={links?.signUp} />\n }\n />\n );\n}\n"],"mappings":"A,sMAoCA,IAAMY,EAA8D,CAChE,eAAgB,oBAChB,aAAc,qBACd,OAAQ,aACZ,EAkBA,SAAgBC,EAA6D,CACzE,SACA,SACA,QACA,SACA,cAAc,SACd,GAAGC,GACgC,CACnC,IAAMC,EAAO,CAAE,GAAGH,EAAgB,GAAGI,CAAO,EAC5C,OACI,EAAAL,EAAA,IAAA,CAACX,EAAAA,SAAD,CACI,GAAIc,EACJ,OAAQG,GAAWhB,EAAAA,YACnB,OAAQiB,GAAWhB,EAAAA,aACX,SACK,cACb,aACIiB,GAAO,iBAAmB,IAAA,KACtB,EAAAR,EAAA,IAAA,CAACR,EAAAA,SAAD,CAAU,GAAIgB,EAAM,eAAgB,UAAWf,EAAAA,QAAO,OACjD,SAAAW,EAAK,cACA,CAAA,EAGlB,aACI,EAAAJ,EAAA,IAAA,CAACN,EAAAA,WAAD,CAAY,OAAQU,EAAK,aAAc,MAAOA,EAAK,OAAQ,GAAII,GAAO,MAAS,CAAA,CAEtF,CAAA,CAET,C"}
@@ -0,0 +1,39 @@
1
+ import { LOGIN_FIELDS as e } from "./auth-defaults.js";
2
+ import t from "./AuthForm.module.js";
3
+ import { AuthForm as n } from "./AuthForm.js";
4
+ import { AuthLink as r, AuthPrompt as i } from "./AuthLinks.js";
5
+ import { loginSchema as a } from "./auth-schemas.js";
6
+ import { jsx as o } from "react/jsx-runtime";
7
+ //#region src/components/AuthForm/LoginForm.tsx
8
+ var s = {
9
+ forgotPassword: "Esqueceu a senha?",
10
+ signUpPrompt: "Não tem uma conta?",
11
+ signUp: "Cadastre-se"
12
+ };
13
+ function c({ schema: c, fields: l, links: u, labels: d, submitLabel: f = "Entrar", ...p }) {
14
+ let m = {
15
+ ...s,
16
+ ...d
17
+ };
18
+ return /* @__PURE__ */ o(n, {
19
+ ...p,
20
+ schema: c ?? a,
21
+ fields: l ?? e,
22
+ labels: d,
23
+ submitLabel: f,
24
+ beforeSubmit: u?.forgotPassword !== void 0 && /* @__PURE__ */ o(r, {
25
+ to: u.forgotPassword,
26
+ className: t.forgot,
27
+ children: m.forgotPassword
28
+ }),
29
+ afterSubmit: /* @__PURE__ */ o(i, {
30
+ prompt: m.signUpPrompt,
31
+ label: m.signUp,
32
+ to: u?.signUp
33
+ })
34
+ });
35
+ }
36
+ //#endregion
37
+ export { c as LoginForm };
38
+
39
+ //# sourceMappingURL=LoginForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginForm.js","names":["styles","AuthForm_module_default","DEFAULT_LABELS","LoginForm","props","text","labels","AuthForm","schema","loginSchema","fields","LOGIN_FIELDS","links","AuthLink","AuthPrompt"],"sources":["../../../src/components/AuthForm/LoginForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { LOGIN_FIELDS } from \"./auth-defaults\";\nimport { AuthLink, AuthPrompt } from \"./AuthLinks\";\nimport { loginSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\nimport styles from \"./AuthForm.module.css\";\n\n/** Sentences of {@link LoginForm}, PT-BR by default. */\nexport interface LoginFormLabels extends AuthFormLabels {\n /** Default `\"Esqueceu a senha?\"`. */\n forgotPassword: string;\n /** Default `\"Não tem uma conta?\"`. */\n signUpPrompt: string;\n /** Default `\"Cadastre-se\"`. */\n signUp: string;\n}\n\n/** Routes the login form links to. Each link is rendered only when its route is set. */\nexport interface LoginFormLinks {\n /** \"Esqueceu a senha?\" link, above the submit button. */\n forgotPassword?: string;\n /** \"Cadastre-se\" link, under the form. */\n signUp?: string;\n}\n\nexport interface LoginFormProps<\n TSchema extends z.ZodTypeAny = typeof loginSchema,\n> extends AuthPresetProps<TSchema> {\n /** Where the links go. */\n links?: LoginFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<LoginFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<LoginFormLabels, keyof AuthFormLabels> = {\n forgotPassword: \"Esqueceu a senha?\",\n signUpPrompt: \"Não tem uma conta?\",\n signUp: \"Cadastre-se\",\n};\n\n/**\n * Sign-in form: e-mail and password, \"forgot password\" link, sign-up line and a\n * slot for social buttons.\n *\n * `AuthForm` with the defaults every app wrote by hand: the e-mail trimmed and\n * lower-cased before validation, `current-password` autocomplete so the saved\n * password is offered, and the two links in the place users look for them. What\n * happens on success — storing the session, redirecting — stays in `onSubmit`.\n *\n * @example\n * <LoginForm\n * onSubmit={async (values) => { await auth.login(values); navigate(\"/\"); }}\n * links={{ forgotPassword: \"/recuperar-senha\", signUp: \"/cadastro\" }}\n * social={<GoogleSignIn component={GoogleLogin} onSuccess={signInWithGoogle} />}\n * />\n */\nexport function LoginForm<TSchema extends z.ZodTypeAny = typeof loginSchema>({\n schema,\n fields,\n links,\n labels,\n submitLabel = \"Entrar\",\n ...props\n}: LoginFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (loginSchema as unknown as TSchema)}\n fields={fields ?? (LOGIN_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])}\n labels={labels}\n submitLabel={submitLabel}\n beforeSubmit={\n links?.forgotPassword !== undefined && (\n <AuthLink to={links.forgotPassword} className={styles.forgot}>\n {text.forgotPassword}\n </AuthLink>\n )\n }\n afterSubmit={\n <AuthPrompt prompt={text.signUpPrompt} label={text.signUp} to={links?.signUp} />\n }\n />\n );\n}\n"],"mappings":";;;;;;;AAoCA,IAAME,IAA8D;CAChE,gBAAgB;CAChB,cAAc;CACd,QAAQ;AACZ;AAkBA,SAAgBC,EAA6D,EACzE,WACA,WACA,UACA,WACA,iBAAc,UACd,GAAGC,KACgC;CACnC,IAAMC,IAAO;EAAE,GAAGH;EAAgB,GAAGI;CAAO;CAC5C,OACI,kBAACC,GAAD;EACI,GAAIH;EACJ,QAAQI,KAAWC;EACnB,QAAQC,KAAWC;EACX;EACK;EACb,cACIC,GAAO,mBAAmB,KAAA,KACtB,kBAACC,GAAD;GAAU,IAAID,EAAM;GAAgB,WAAWZ,EAAO;GACjD,UAAAK,EAAK;EACA,CAAA;EAGlB,aACI,kBAACS,GAAD;GAAY,QAAQT,EAAK;GAAc,OAAOA,EAAK;GAAQ,IAAIO,GAAO;EAAS,CAAA;CAEtF,CAAA;AAET"}
@@ -0,0 +1,2 @@
1
+ const e=require("./auth-defaults.cjs"),t=require("./AuthForm.module.cjs"),n=require("./AuthForm.cjs"),r=require("./AuthLinks.cjs"),i=require("./auth-schemas.cjs");let a=require("react/jsx-runtime");var o={signInPrompt:`Lembrou a senha?`,signIn:`Entrar`,hints:`Requisitos da senha`};function s({schema:s,fields:c,hints:l,links:u,labels:d,submitLabel:f=`Redefinir senha`,...p}){let m={...o,...d};return(0,a.jsx)(n.AuthForm,{...p,schema:s??i.resetPasswordSchema,fields:c??e.RESET_PASSWORD_FIELDS,labels:d,submitLabel:f,beforeSubmit:l!==void 0&&l.length>0&&(0,a.jsx)(`ul`,{className:t.default.hints,"aria-label":m.hints,children:l.map((e,t)=>(0,a.jsx)(`li`,{children:e},t))}),afterSubmit:(0,a.jsx)(r.AuthPrompt,{prompt:m.signInPrompt,label:m.signIn,to:u?.signIn})})}exports.ResetPasswordForm=s;
2
+ //# sourceMappingURL=ResetPasswordForm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResetPasswordForm.cjs","names":["AuthForm","resetPasswordSchema","RESET_PASSWORD_FIELDS","styles","AuthPrompt","require_auth_defaults","require_AuthForm_module","require_AuthForm","require_AuthLinks","require_auth_schemas","react_jsx_runtime","DEFAULT_LABELS","ResetPasswordForm","props","text","labels","schema","fields","hints","hint","index","links"],"sources":["../../../src/components/AuthForm/ResetPasswordForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { RESET_PASSWORD_FIELDS } from \"./auth-defaults\";\nimport { AuthPrompt } from \"./AuthLinks\";\nimport { resetPasswordSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\nimport styles from \"./AuthForm.module.css\";\n\n/** Sentences of {@link ResetPasswordForm}, PT-BR by default. */\nexport interface ResetPasswordFormLabels extends AuthFormLabels {\n /** Default `\"Lembrou a senha?\"`. */\n signInPrompt: string;\n /** Default `\"Entrar\"`. */\n signIn: string;\n /** Accessible name of the hints list. Default `\"Requisitos da senha\"`. */\n hints: string;\n}\n\n/** Routes the reset-password form links to. */\nexport interface ResetPasswordFormLinks {\n /** \"Entrar\" link, under the form. */\n signIn?: string;\n}\n\nexport interface ResetPasswordFormProps<\n TSchema extends z.ZodTypeAny = typeof resetPasswordSchema,\n> extends AuthPresetProps<TSchema> {\n /**\n * Password requirements listed above the submit button (\"Pelo menos 8\n * caracteres\", \"Uma letra maiúscula\"). Kept as text the app writes, because\n * only the backend knows its rules.\n */\n hints?: ReactNode[];\n /** Where the links go. */\n links?: ResetPasswordFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<ResetPasswordFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<ResetPasswordFormLabels, keyof AuthFormLabels> = {\n signInPrompt: \"Lembrou a senha?\",\n signIn: \"Entrar\",\n hints: \"Requisitos da senha\",\n};\n\n/**\n * \"Choose a new password\" form: password and confirmation, with the mismatch\n * reported under the confirmation field.\n *\n * The reset token stays out of the fields: it comes from the URL, and the app\n * adds it in `onSubmit` — `{ ...values, token }` — where it also decides what an\n * expired token looks like.\n *\n * @example\n * const [params] = useSearchParams();\n * <ResetPasswordForm\n * hints={[\"Pelo menos 8 caracteres\"]}\n * onSubmit={async (values) => {\n * await api.post(\"/auth/reset-password\", { body: { ...values, token: params.get(\"token\") } });\n * }}\n * />\n */\nexport function ResetPasswordForm<TSchema extends z.ZodTypeAny = typeof resetPasswordSchema>({\n schema,\n fields,\n hints,\n links,\n labels,\n submitLabel = \"Redefinir senha\",\n ...props\n}: ResetPasswordFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (resetPasswordSchema as unknown as TSchema)}\n fields={\n fields ?? (RESET_PASSWORD_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])\n }\n labels={labels}\n submitLabel={submitLabel}\n beforeSubmit={\n hints !== undefined &&\n hints.length > 0 && (\n <ul className={styles.hints} aria-label={text.hints}>\n {hints.map((hint, index) => (\n <li key={index}>{hint}</li>\n ))}\n </ul>\n )\n }\n afterSubmit={\n <AuthPrompt prompt={text.signInPrompt} label={text.signIn} to={links?.signIn} />\n }\n />\n );\n}\n"],"mappings":"A,sMAwCA,IAAMW,EAAsE,CACxE,aAAc,mBACd,OAAQ,SACR,MAAO,qBACX,EAmBA,SAAgBC,EAA6E,CACzF,SACA,SACA,QACA,QACA,SACA,cAAc,kBACd,GAAGC,GACwC,CAC3C,IAAMC,EAAO,CAAE,GAAGH,EAAgB,GAAGI,CAAO,EAC5C,OACI,EAAAL,EAAA,IAAA,CAACV,EAAAA,SAAD,CACI,GAAIa,EACJ,OAAQG,GAAWf,EAAAA,oBACnB,OACIgB,GAAWf,EAAAA,sBAEP,SACK,cACb,aACIgB,IAAU,IAAA,IACVA,EAAM,OAAS,IACX,EAAAR,EAAA,IAAA,CAAC,KAAD,CAAI,UAAWP,EAAAA,QAAO,MAAO,aAAYW,EAAK,MACzC,SAAAI,EAAM,KAAK,EAAM,KACd,EAAAR,EAAA,IAAA,CAAC,KAAD,CAAA,SAAiBS,CAAS,EAAjBC,CAAiB,CAC7B,CACD,CAAA,EAGZ,aACI,EAAAV,EAAA,IAAA,CAACN,EAAAA,WAAD,CAAY,OAAQU,EAAK,aAAc,MAAOA,EAAK,OAAQ,GAAIO,GAAO,MAAS,CAAA,CAEtF,CAAA,CAET,C"}
@@ -0,0 +1,39 @@
1
+ import { RESET_PASSWORD_FIELDS as e } from "./auth-defaults.js";
2
+ import t from "./AuthForm.module.js";
3
+ import { AuthForm as n } from "./AuthForm.js";
4
+ import { AuthPrompt as r } from "./AuthLinks.js";
5
+ import { resetPasswordSchema as i } from "./auth-schemas.js";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ //#region src/components/AuthForm/ResetPasswordForm.tsx
8
+ var o = {
9
+ signInPrompt: "Lembrou a senha?",
10
+ signIn: "Entrar",
11
+ hints: "Requisitos da senha"
12
+ };
13
+ function s({ schema: s, fields: c, hints: l, links: u, labels: d, submitLabel: f = "Redefinir senha", ...p }) {
14
+ let m = {
15
+ ...o,
16
+ ...d
17
+ };
18
+ return /* @__PURE__ */ a(n, {
19
+ ...p,
20
+ schema: s ?? i,
21
+ fields: c ?? e,
22
+ labels: d,
23
+ submitLabel: f,
24
+ beforeSubmit: l !== void 0 && l.length > 0 && /* @__PURE__ */ a("ul", {
25
+ className: t.hints,
26
+ "aria-label": m.hints,
27
+ children: l.map((e, t) => /* @__PURE__ */ a("li", { children: e }, t))
28
+ }),
29
+ afterSubmit: /* @__PURE__ */ a(r, {
30
+ prompt: m.signInPrompt,
31
+ label: m.signIn,
32
+ to: u?.signIn
33
+ })
34
+ });
35
+ }
36
+ //#endregion
37
+ export { s as ResetPasswordForm };
38
+
39
+ //# sourceMappingURL=ResetPasswordForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResetPasswordForm.js","names":["styles","AuthForm_module_default","DEFAULT_LABELS","ResetPasswordForm","props","text","labels","AuthForm","schema","resetPasswordSchema","fields","RESET_PASSWORD_FIELDS","hints","hint","index","AuthPrompt","links"],"sources":["../../../src/components/AuthForm/ResetPasswordForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { RESET_PASSWORD_FIELDS } from \"./auth-defaults\";\nimport { AuthPrompt } from \"./AuthLinks\";\nimport { resetPasswordSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\nimport styles from \"./AuthForm.module.css\";\n\n/** Sentences of {@link ResetPasswordForm}, PT-BR by default. */\nexport interface ResetPasswordFormLabels extends AuthFormLabels {\n /** Default `\"Lembrou a senha?\"`. */\n signInPrompt: string;\n /** Default `\"Entrar\"`. */\n signIn: string;\n /** Accessible name of the hints list. Default `\"Requisitos da senha\"`. */\n hints: string;\n}\n\n/** Routes the reset-password form links to. */\nexport interface ResetPasswordFormLinks {\n /** \"Entrar\" link, under the form. */\n signIn?: string;\n}\n\nexport interface ResetPasswordFormProps<\n TSchema extends z.ZodTypeAny = typeof resetPasswordSchema,\n> extends AuthPresetProps<TSchema> {\n /**\n * Password requirements listed above the submit button (\"Pelo menos 8\n * caracteres\", \"Uma letra maiúscula\"). Kept as text the app writes, because\n * only the backend knows its rules.\n */\n hints?: ReactNode[];\n /** Where the links go. */\n links?: ResetPasswordFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<ResetPasswordFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<ResetPasswordFormLabels, keyof AuthFormLabels> = {\n signInPrompt: \"Lembrou a senha?\",\n signIn: \"Entrar\",\n hints: \"Requisitos da senha\",\n};\n\n/**\n * \"Choose a new password\" form: password and confirmation, with the mismatch\n * reported under the confirmation field.\n *\n * The reset token stays out of the fields: it comes from the URL, and the app\n * adds it in `onSubmit` — `{ ...values, token }` — where it also decides what an\n * expired token looks like.\n *\n * @example\n * const [params] = useSearchParams();\n * <ResetPasswordForm\n * hints={[\"Pelo menos 8 caracteres\"]}\n * onSubmit={async (values) => {\n * await api.post(\"/auth/reset-password\", { body: { ...values, token: params.get(\"token\") } });\n * }}\n * />\n */\nexport function ResetPasswordForm<TSchema extends z.ZodTypeAny = typeof resetPasswordSchema>({\n schema,\n fields,\n hints,\n links,\n labels,\n submitLabel = \"Redefinir senha\",\n ...props\n}: ResetPasswordFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (resetPasswordSchema as unknown as TSchema)}\n fields={\n fields ?? (RESET_PASSWORD_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])\n }\n labels={labels}\n submitLabel={submitLabel}\n beforeSubmit={\n hints !== undefined &&\n hints.length > 0 && (\n <ul className={styles.hints} aria-label={text.hints}>\n {hints.map((hint, index) => (\n <li key={index}>{hint}</li>\n ))}\n </ul>\n )\n }\n afterSubmit={\n <AuthPrompt prompt={text.signInPrompt} label={text.signIn} to={links?.signIn} />\n }\n />\n );\n}\n"],"mappings":";;;;;;;AAwCA,IAAME,IAAsE;CACxE,cAAc;CACd,QAAQ;CACR,OAAO;AACX;AAmBA,SAAgBC,EAA6E,EACzF,WACA,WACA,UACA,UACA,WACA,iBAAc,mBACd,GAAGC,KACwC;CAC3C,IAAMC,IAAO;EAAE,GAAGH;EAAgB,GAAGI;CAAO;CAC5C,OACI,kBAACC,GAAD;EACI,GAAIH;EACJ,QAAQI,KAAWC;EACnB,QACIC,KAAWC;EAEP;EACK;EACb,cACIC,MAAU,KAAA,KACVA,EAAM,SAAS,KACX,kBAAC,MAAD;GAAI,WAAWZ,EAAO;GAAO,cAAYK,EAAK;GACzC,UAAAO,EAAM,KAAK,GAAM,MACd,kBAAC,MAAD,EAAA,UAAiBC,EAAS,GAAjBC,CAAiB,CAC7B;EACD,CAAA;EAGZ,aACI,kBAACC,GAAD;GAAY,QAAQV,EAAK;GAAc,OAAOA,EAAK;GAAQ,IAAIW,GAAO;EAAS,CAAA;CAEtF,CAAA;AAET"}
@@ -0,0 +1,2 @@
1
+ const e=require("./auth-defaults.cjs"),t=require("./AuthForm.cjs"),n=require("./AuthLinks.cjs"),r=require("./auth-schemas.cjs");let i=require("react/jsx-runtime");var a={signInPrompt:`Já tem uma conta?`,signIn:`Entrar`};function o({schema:o,fields:s,links:c,labels:l,submitLabel:u=`Criar conta`,...d}){let f={...a,...l};return(0,i.jsx)(t.AuthForm,{...d,schema:o??r.signUpSchema,fields:s??e.SIGN_UP_FIELDS,labels:l,submitLabel:u,afterSubmit:(0,i.jsx)(n.AuthPrompt,{prompt:f.signInPrompt,label:f.signIn,to:c?.signIn})})}exports.SignUpForm=o;
2
+ //# sourceMappingURL=SignUpForm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignUpForm.cjs","names":["AuthForm","signUpSchema","SIGN_UP_FIELDS","AuthPrompt","require_auth_defaults","require_AuthForm","require_AuthLinks","require_auth_schemas","react_jsx_runtime","DEFAULT_LABELS","SignUpForm","props","text","labels","schema","fields","links"],"sources":["../../../src/components/AuthForm/SignUpForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { SIGN_UP_FIELDS } from \"./auth-defaults\";\nimport { AuthPrompt } from \"./AuthLinks\";\nimport { signUpSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\n\n/** Sentences of {@link SignUpForm}, PT-BR by default. */\nexport interface SignUpFormLabels extends AuthFormLabels {\n /** Default `\"Já tem uma conta?\"`. */\n signInPrompt: string;\n /** Default `\"Entrar\"`. */\n signIn: string;\n}\n\n/** Routes the sign-up form links to. */\nexport interface SignUpFormLinks {\n /** \"Entrar\" link, under the form. */\n signIn?: string;\n}\n\nexport interface SignUpFormProps<\n TSchema extends z.ZodTypeAny = typeof signUpSchema,\n> extends AuthPresetProps<TSchema> {\n /** Where the links go. */\n links?: SignUpFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<SignUpFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<SignUpFormLabels, keyof AuthFormLabels> = {\n signInPrompt: \"Já tem uma conta?\",\n signIn: \"Entrar\",\n};\n\n/**\n * Sign-up form: name, e-mail and password by default, plus the \"Já tem uma conta?\"\n * line.\n *\n * Apps differ most here — a phone, a CPF, a terms checkbox — so the usual call\n * passes `fields` and a `schema` built with `signUpSchema.extend({...})`. The\n * password defaults to `new-password` autocomplete, which is what makes a\n * password manager offer to generate one.\n *\n * @example\n * <SignUpForm\n * schema={signUpSchema.extend({ terms: z.literal(true, \"Aceite os termos\") })}\n * fields={[...SIGN_UP_FIELDS, { name: \"terms\", type: \"checkbox\", label: \"Aceito os termos\" }]}\n * onSubmit={async (values) => { await api.post(\"/auth/register\", { body: values }); }}\n * links={{ signIn: \"/login\" }}\n * />\n */\nexport function SignUpForm<TSchema extends z.ZodTypeAny = typeof signUpSchema>({\n schema,\n fields,\n links,\n labels,\n submitLabel = \"Criar conta\",\n ...props\n}: SignUpFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (signUpSchema as unknown as TSchema)}\n fields={fields ?? (SIGN_UP_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])}\n labels={labels}\n submitLabel={submitLabel}\n afterSubmit={\n <AuthPrompt prompt={text.signInPrompt} label={text.signIn} to={links?.signIn} />\n }\n />\n );\n}\n"],"mappings":"A,mKA+BA,IAAMS,EAA+D,CACjE,aAAc,oBACd,OAAQ,QACZ,EAmBA,SAAgBC,EAA+D,CAC3E,SACA,SACA,QACA,SACA,cAAc,cACd,GAAGC,GACiC,CACpC,IAAMC,EAAO,CAAE,GAAGH,EAAgB,GAAGI,CAAO,EAC5C,OACI,EAAAL,EAAA,IAAA,CAACR,EAAAA,SAAD,CACI,GAAIW,EACJ,OAAQG,GAAWb,EAAAA,aACnB,OAAQc,GAAWb,EAAAA,eACX,SACK,cACb,aACI,EAAAM,EAAA,IAAA,CAACL,EAAAA,WAAD,CAAY,OAAQS,EAAK,aAAc,MAAOA,EAAK,OAAQ,GAAII,GAAO,MAAS,CAAA,CAEtF,CAAA,CAET,C"}
@@ -0,0 +1,32 @@
1
+ import { SIGN_UP_FIELDS as e } from "./auth-defaults.js";
2
+ import { AuthForm as t } from "./AuthForm.js";
3
+ import { AuthPrompt as n } from "./AuthLinks.js";
4
+ import { signUpSchema as r } from "./auth-schemas.js";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ //#region src/components/AuthForm/SignUpForm.tsx
7
+ var a = {
8
+ signInPrompt: "Já tem uma conta?",
9
+ signIn: "Entrar"
10
+ };
11
+ function o({ schema: o, fields: s, links: c, labels: l, submitLabel: u = "Criar conta", ...d }) {
12
+ let f = {
13
+ ...a,
14
+ ...l
15
+ };
16
+ return /* @__PURE__ */ i(t, {
17
+ ...d,
18
+ schema: o ?? r,
19
+ fields: s ?? e,
20
+ labels: l,
21
+ submitLabel: u,
22
+ afterSubmit: /* @__PURE__ */ i(n, {
23
+ prompt: f.signInPrompt,
24
+ label: f.signIn,
25
+ to: c?.signIn
26
+ })
27
+ });
28
+ }
29
+ //#endregion
30
+ export { o as SignUpForm };
31
+
32
+ //# sourceMappingURL=SignUpForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignUpForm.js","names":["DEFAULT_LABELS","SignUpForm","props","text","labels","AuthForm","schema","signUpSchema","fields","SIGN_UP_FIELDS","AuthPrompt","links"],"sources":["../../../src/components/AuthForm/SignUpForm.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport { AuthForm } from \"./AuthForm\";\nimport { SIGN_UP_FIELDS } from \"./auth-defaults\";\nimport { AuthPrompt } from \"./AuthLinks\";\nimport { signUpSchema } from \"./auth-schemas\";\nimport type { AuthField, AuthFieldName, AuthFormLabels, AuthPresetProps } from \"./types\";\n\n/** Sentences of {@link SignUpForm}, PT-BR by default. */\nexport interface SignUpFormLabels extends AuthFormLabels {\n /** Default `\"Já tem uma conta?\"`. */\n signInPrompt: string;\n /** Default `\"Entrar\"`. */\n signIn: string;\n}\n\n/** Routes the sign-up form links to. */\nexport interface SignUpFormLinks {\n /** \"Entrar\" link, under the form. */\n signIn?: string;\n}\n\nexport interface SignUpFormProps<\n TSchema extends z.ZodTypeAny = typeof signUpSchema,\n> extends AuthPresetProps<TSchema> {\n /** Where the links go. */\n links?: SignUpFormLinks;\n /** Overrides for the fixed sentences. */\n labels?: Partial<SignUpFormLabels>;\n}\n\nconst DEFAULT_LABELS: Omit<SignUpFormLabels, keyof AuthFormLabels> = {\n signInPrompt: \"Já tem uma conta?\",\n signIn: \"Entrar\",\n};\n\n/**\n * Sign-up form: name, e-mail and password by default, plus the \"Já tem uma conta?\"\n * line.\n *\n * Apps differ most here — a phone, a CPF, a terms checkbox — so the usual call\n * passes `fields` and a `schema` built with `signUpSchema.extend({...})`. The\n * password defaults to `new-password` autocomplete, which is what makes a\n * password manager offer to generate one.\n *\n * @example\n * <SignUpForm\n * schema={signUpSchema.extend({ terms: z.literal(true, \"Aceite os termos\") })}\n * fields={[...SIGN_UP_FIELDS, { name: \"terms\", type: \"checkbox\", label: \"Aceito os termos\" }]}\n * onSubmit={async (values) => { await api.post(\"/auth/register\", { body: values }); }}\n * links={{ signIn: \"/login\" }}\n * />\n */\nexport function SignUpForm<TSchema extends z.ZodTypeAny = typeof signUpSchema>({\n schema,\n fields,\n links,\n labels,\n submitLabel = \"Criar conta\",\n ...props\n}: SignUpFormProps<TSchema>): ReactNode {\n const text = { ...DEFAULT_LABELS, ...labels };\n return (\n <AuthForm<TSchema>\n {...props}\n schema={schema ?? (signUpSchema as unknown as TSchema)}\n fields={fields ?? (SIGN_UP_FIELDS as readonly AuthField<AuthFieldName<TSchema>>[])}\n labels={labels}\n submitLabel={submitLabel}\n afterSubmit={\n <AuthPrompt prompt={text.signInPrompt} label={text.signIn} to={links?.signIn} />\n }\n />\n );\n}\n"],"mappings":";;;;;;AA+BA,IAAMA,IAA+D;CACjE,cAAc;CACd,QAAQ;AACZ;AAmBA,SAAgBC,EAA+D,EAC3E,WACA,WACA,UACA,WACA,iBAAc,eACd,GAAGC,KACiC;CACpC,IAAMC,IAAO;EAAE,GAAGH;EAAgB,GAAGI;CAAO;CAC5C,OACI,kBAACC,GAAD;EACI,GAAIH;EACJ,QAAQI,KAAWC;EACnB,QAAQC,KAAWC;EACX;EACK;EACb,aACI,kBAACC,GAAD;GAAY,QAAQP,EAAK;GAAc,OAAOA,EAAK;GAAQ,IAAIQ,GAAO;EAAS,CAAA;CAEtF,CAAA;AAET"}
@@ -0,0 +1,2 @@
1
+ var e={divider:`ou`,error:`Não foi possível concluir agora. Tente de novo.`},t=[{name:`email`,type:`email`,label:`E-mail`,placeholder:`voce@exemplo.com`},{name:`password`,type:`password`,label:`Senha`}],n=[{name:`name`,label:`Nome`,autoComplete:`name`},{name:`email`,type:`email`,label:`E-mail`,placeholder:`voce@exemplo.com`},{name:`password`,type:`password`,label:`Senha`,autoComplete:`new-password`,showStrength:!0}],r=[{name:`email`,type:`email`,label:`E-mail`,placeholder:`voce@exemplo.com`,helperText:`Enviaremos um link para você criar uma nova senha.`}],i=[{name:`password`,type:`password`,label:`Nova senha`,autoComplete:`new-password`,showStrength:!0},{name:`confirmPassword`,type:`password`,label:`Confirme a nova senha`,autoComplete:`new-password`}];exports.DEFAULT_AUTH_FORM_LABELS=e,exports.FORGOT_PASSWORD_FIELDS=r,exports.LOGIN_FIELDS=t,exports.RESET_PASSWORD_FIELDS=i,exports.SIGN_UP_FIELDS=n;
2
+ //# sourceMappingURL=auth-defaults.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-defaults.cjs","names":["DEFAULT_AUTH_FORM_LABELS","LOGIN_FIELDS","SIGN_UP_FIELDS","FORGOT_PASSWORD_FIELDS","RESET_PASSWORD_FIELDS"],"sources":["../../../src/components/AuthForm/auth-defaults.ts"],"sourcesContent":["import type { AuthField, AuthFormLabels } from \"./types\";\n\n/** PT-BR defaults of {@link AuthFormLabels}. */\nexport const DEFAULT_AUTH_FORM_LABELS: AuthFormLabels = {\n divider: \"ou\",\n error: \"Não foi possível concluir agora. Tente de novo.\",\n};\n\n/**\n * Default fields of `LoginForm`: e-mail and password.\n *\n * Exported, like the other presets' lists, so an app extends the defaults\n * (`[...LOGIN_FIELDS, { name: \"remember\", type: \"checkbox\", … }]`) instead of\n * retyping them.\n */\nexport const LOGIN_FIELDS: readonly AuthField<\"email\" | \"password\">[] = [\n { name: \"email\", type: \"email\", label: \"E-mail\", placeholder: \"voce@exemplo.com\" },\n { name: \"password\", type: \"password\", label: \"Senha\" },\n];\n\n/** Default fields of `SignUpForm`: name, e-mail and a password with strength meter. */\nexport const SIGN_UP_FIELDS: readonly AuthField<\"name\" | \"email\" | \"password\">[] = [\n { name: \"name\", label: \"Nome\", autoComplete: \"name\" },\n { name: \"email\", type: \"email\", label: \"E-mail\", placeholder: \"voce@exemplo.com\" },\n {\n name: \"password\",\n type: \"password\",\n label: \"Senha\",\n autoComplete: \"new-password\",\n showStrength: true,\n },\n];\n\n/** Default fields of `ForgotPasswordForm`: the e-mail, with a line saying what happens next. */\nexport const FORGOT_PASSWORD_FIELDS: readonly AuthField<\"email\">[] = [\n {\n name: \"email\",\n type: \"email\",\n label: \"E-mail\",\n placeholder: \"voce@exemplo.com\",\n helperText: \"Enviaremos um link para você criar uma nova senha.\",\n },\n];\n\n/** Default fields of `ResetPasswordForm`: new password (with strength meter) and confirmation. */\nexport const RESET_PASSWORD_FIELDS: readonly AuthField<\"password\" | \"confirmPassword\">[] = [\n {\n name: \"password\",\n type: \"password\",\n label: \"Nova senha\",\n autoComplete: \"new-password\",\n showStrength: true,\n },\n {\n name: \"confirmPassword\",\n type: \"password\",\n label: \"Confirme a nova senha\",\n autoComplete: \"new-password\",\n },\n];\n"],"mappings":"AAGA,IAAaA,EAA2C,CACpD,QAAS,KACT,MAAO,iDACX,EASaC,EAA2D,CACpE,CAAE,KAAM,QAAS,KAAM,QAAS,MAAO,SAAU,YAAa,kBAAmB,EACjF,CAAE,KAAM,WAAY,KAAM,WAAY,MAAO,OAAQ,CACzD,EAGaC,EAAsE,CAC/E,CAAE,KAAM,OAAQ,MAAO,OAAQ,aAAc,MAAO,EACpD,CAAE,KAAM,QAAS,KAAM,QAAS,MAAO,SAAU,YAAa,kBAAmB,EACjF,CACI,KAAM,WACN,KAAM,WACN,MAAO,QACP,aAAc,eACd,aAAc,EAClB,CACJ,EAGaC,EAAwD,CACjE,CACI,KAAM,QACN,KAAM,QACN,MAAO,SACP,YAAa,mBACb,WAAY,oDAChB,CACJ,EAGaC,EAA8E,CACvF,CACI,KAAM,WACN,KAAM,WACN,MAAO,aACP,aAAc,eACd,aAAc,EAClB,EACA,CACI,KAAM,kBACN,KAAM,WACN,MAAO,wBACP,aAAc,cAClB,CACJ,E"}
@@ -0,0 +1,54 @@
1
+ //#region src/components/AuthForm/auth-defaults.ts
2
+ var e = {
3
+ divider: "ou",
4
+ error: "Não foi possível concluir agora. Tente de novo."
5
+ }, t = [{
6
+ name: "email",
7
+ type: "email",
8
+ label: "E-mail",
9
+ placeholder: "voce@exemplo.com"
10
+ }, {
11
+ name: "password",
12
+ type: "password",
13
+ label: "Senha"
14
+ }], n = [
15
+ {
16
+ name: "name",
17
+ label: "Nome",
18
+ autoComplete: "name"
19
+ },
20
+ {
21
+ name: "email",
22
+ type: "email",
23
+ label: "E-mail",
24
+ placeholder: "voce@exemplo.com"
25
+ },
26
+ {
27
+ name: "password",
28
+ type: "password",
29
+ label: "Senha",
30
+ autoComplete: "new-password",
31
+ showStrength: !0
32
+ }
33
+ ], r = [{
34
+ name: "email",
35
+ type: "email",
36
+ label: "E-mail",
37
+ placeholder: "voce@exemplo.com",
38
+ helperText: "Enviaremos um link para você criar uma nova senha."
39
+ }], i = [{
40
+ name: "password",
41
+ type: "password",
42
+ label: "Nova senha",
43
+ autoComplete: "new-password",
44
+ showStrength: !0
45
+ }, {
46
+ name: "confirmPassword",
47
+ type: "password",
48
+ label: "Confirme a nova senha",
49
+ autoComplete: "new-password"
50
+ }];
51
+ //#endregion
52
+ export { e as DEFAULT_AUTH_FORM_LABELS, r as FORGOT_PASSWORD_FIELDS, t as LOGIN_FIELDS, i as RESET_PASSWORD_FIELDS, n as SIGN_UP_FIELDS };
53
+
54
+ //# sourceMappingURL=auth-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-defaults.js","names":["DEFAULT_AUTH_FORM_LABELS","LOGIN_FIELDS","SIGN_UP_FIELDS","FORGOT_PASSWORD_FIELDS","RESET_PASSWORD_FIELDS"],"sources":["../../../src/components/AuthForm/auth-defaults.ts"],"sourcesContent":["import type { AuthField, AuthFormLabels } from \"./types\";\n\n/** PT-BR defaults of {@link AuthFormLabels}. */\nexport const DEFAULT_AUTH_FORM_LABELS: AuthFormLabels = {\n divider: \"ou\",\n error: \"Não foi possível concluir agora. Tente de novo.\",\n};\n\n/**\n * Default fields of `LoginForm`: e-mail and password.\n *\n * Exported, like the other presets' lists, so an app extends the defaults\n * (`[...LOGIN_FIELDS, { name: \"remember\", type: \"checkbox\", … }]`) instead of\n * retyping them.\n */\nexport const LOGIN_FIELDS: readonly AuthField<\"email\" | \"password\">[] = [\n { name: \"email\", type: \"email\", label: \"E-mail\", placeholder: \"voce@exemplo.com\" },\n { name: \"password\", type: \"password\", label: \"Senha\" },\n];\n\n/** Default fields of `SignUpForm`: name, e-mail and a password with strength meter. */\nexport const SIGN_UP_FIELDS: readonly AuthField<\"name\" | \"email\" | \"password\">[] = [\n { name: \"name\", label: \"Nome\", autoComplete: \"name\" },\n { name: \"email\", type: \"email\", label: \"E-mail\", placeholder: \"voce@exemplo.com\" },\n {\n name: \"password\",\n type: \"password\",\n label: \"Senha\",\n autoComplete: \"new-password\",\n showStrength: true,\n },\n];\n\n/** Default fields of `ForgotPasswordForm`: the e-mail, with a line saying what happens next. */\nexport const FORGOT_PASSWORD_FIELDS: readonly AuthField<\"email\">[] = [\n {\n name: \"email\",\n type: \"email\",\n label: \"E-mail\",\n placeholder: \"voce@exemplo.com\",\n helperText: \"Enviaremos um link para você criar uma nova senha.\",\n },\n];\n\n/** Default fields of `ResetPasswordForm`: new password (with strength meter) and confirmation. */\nexport const RESET_PASSWORD_FIELDS: readonly AuthField<\"password\" | \"confirmPassword\">[] = [\n {\n name: \"password\",\n type: \"password\",\n label: \"Nova senha\",\n autoComplete: \"new-password\",\n showStrength: true,\n },\n {\n name: \"confirmPassword\",\n type: \"password\",\n label: \"Confirme a nova senha\",\n autoComplete: \"new-password\",\n },\n];\n"],"mappings":";AAGA,IAAaA,IAA2C;CACpD,SAAS;CACT,OAAO;AACX,GASaC,IAA2D,CACpE;CAAE,MAAM;CAAS,MAAM;CAAS,OAAO;CAAU,aAAa;AAAmB,GACjF;CAAE,MAAM;CAAY,MAAM;CAAY,OAAO;AAAQ,CACzD,GAGaC,IAAsE;CAC/E;EAAE,MAAM;EAAQ,OAAO;EAAQ,cAAc;CAAO;CACpD;EAAE,MAAM;EAAS,MAAM;EAAS,OAAO;EAAU,aAAa;CAAmB;CACjF;EACI,MAAM;EACN,MAAM;EACN,OAAO;EACP,cAAc;EACd,cAAc;CAClB;AACJ,GAGaC,IAAwD,CACjE;CACI,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,YAAY;AAChB,CACJ,GAGaC,IAA8E,CACvF;CACI,MAAM;CACN,MAAM;CACN,OAAO;CACP,cAAc;CACd,cAAc;AAClB,GACA;CACI,MAAM;CACN,MAAM;CACN,OAAO;CACP,cAAc;AAClB,CACJ"}
@@ -0,0 +1,2 @@
1
+ let e=require("zod");function t(){return e.z.string().trim().toLowerCase().min(1,`Informe seu e-mail`).pipe(e.z.email(`Informe um e-mail válido`))}function n(t=`A senha deve ter no mínimo 8 caracteres`){return e.z.string().min(8,t)}var r=e.z.object({email:t(),password:n()}),i=e.z.object({name:e.z.string().trim().min(3,`Informe seu nome completo`),email:t(),password:n()}),a=e.z.object({email:t()}),o=e.z.object({password:n(),confirmPassword:e.z.string().min(1,`Confirme a nova senha`)}).refine(e=>e.password===e.confirmPassword,{message:`As senhas não coincidem`,path:[`confirmPassword`]});exports.authEmail=t,exports.authPassword=n,exports.forgotPasswordSchema=a,exports.loginSchema=r,exports.resetPasswordSchema=o,exports.signUpSchema=i;
2
+ //# sourceMappingURL=auth-schemas.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-schemas.cjs","names":["z","zod","authEmail","authPassword","message","loginSchema","signUpSchema","forgotPasswordSchema","resetPasswordSchema","values"],"sources":["../../../src/components/AuthForm/auth-schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * An e-mail field: trimmed and lower-cased *before* it is validated.\n *\n * The order is the point. Validating first rejects `\" ana@x.com\"` pasted with a\n * trailing space from a password manager, and a backend that compares e-mails\n * case-sensitively creates a second account for `Ana@x.com`. An empty value gets\n * its own sentence instead of \"e-mail inválido\", which reads like an accusation\n * on a field the user simply has not reached yet.\n *\n * @returns A schema producing the normalized address.\n */\nexport function authEmail(): z.ZodPipe<z.ZodString, z.ZodEmail> {\n return z\n .string()\n .trim()\n .toLowerCase()\n .min(1, \"Informe seu e-mail\")\n .pipe(z.email(\"Informe um e-mail válido\"));\n}\n\n/**\n * A password field with the minimum length every Tempest backend enforces.\n *\n * @param message - Sentence shown below 8 characters.\n * @returns The password schema.\n */\nexport function authPassword(\n message: string = \"A senha deve ter no mínimo 8 caracteres\",\n): z.ZodString {\n return z.string().min(8, message);\n}\n\n/** Default schema of `LoginForm`: normalized e-mail + password of at least 8 characters. */\nexport const loginSchema = z.object({\n email: authEmail(),\n password: authPassword(),\n});\n\n/**\n * Default schema of `SignUpForm`: name, e-mail and password.\n *\n * Exported so an app adds its own fields with `.extend()` instead of rewriting\n * the three it shares with every other app — see the phone and terms example in\n * the docs.\n */\nexport const signUpSchema = z.object({\n name: z.string().trim().min(3, \"Informe seu nome completo\"),\n email: authEmail(),\n password: authPassword(),\n});\n\n/** Default schema of `ForgotPasswordForm`: the e-mail the reset link goes to. */\nexport const forgotPasswordSchema = z.object({\n email: authEmail(),\n});\n\n/**\n * Default schema of `ResetPasswordForm`: new password and its confirmation.\n *\n * The mismatch is reported on `confirmPassword` (`path`), so the message lands\n * under the field the user has to fix rather than in a form-level alert.\n */\nexport const resetPasswordSchema = z\n .object({\n password: authPassword(),\n confirmPassword: z.string().min(1, \"Confirme a nova senha\"),\n })\n .refine((values) => values.password === values.confirmPassword, {\n message: \"As senhas não coincidem\",\n path: [\"confirmPassword\"],\n });\n"],"mappings":"A,qBAaA,SAAgBE,GAAgD,CAC5D,OAAOF,EAAAA,EACF,OAAO,CAAC,CACR,KAAK,CAAC,CACN,YAAY,CAAC,CACb,IAAI,EAAG,oBAAoB,CAAC,CAC5B,KAAKA,EAAAA,EAAE,MAAM,0BAA0B,CAAC,CACjD,CAQA,SAAgBG,EACZ,EAAkB,0CACP,CACX,OAAOH,EAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,EAAGI,CAAO,CACpC,CAGA,IAAaC,EAAcL,EAAAA,EAAE,OAAO,CAChC,MAAOE,EAAU,EACjB,SAAUC,EAAa,CAC3B,CAAC,EASYG,EAAeN,EAAAA,EAAE,OAAO,CACjC,KAAMA,EAAAA,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAG,2BAA2B,EAC1D,MAAOE,EAAU,EACjB,SAAUC,EAAa,CAC3B,CAAC,EAGYI,EAAuBP,EAAAA,EAAE,OAAO,CACzC,MAAOE,EAAU,CACrB,CAAC,EAQYM,EAAsBR,EAAAA,EAC9B,OAAO,CACJ,SAAUG,EAAa,EACvB,gBAAiBH,EAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,EAAG,uBAAuB,CAC9D,CAAC,CAAC,CACD,OAAQ,GAAWS,EAAO,WAAaA,EAAO,gBAAiB,CAC5D,QAAS,0BACT,KAAM,CAAC,iBAAiB,CAC5B,CAAC,E"}
@@ -0,0 +1,26 @@
1
+ import { z as e } from "zod";
2
+ //#region src/components/AuthForm/auth-schemas.ts
3
+ function t() {
4
+ return e.string().trim().toLowerCase().min(1, "Informe seu e-mail").pipe(e.email("Informe um e-mail válido"));
5
+ }
6
+ function n(t = "A senha deve ter no mínimo 8 caracteres") {
7
+ return e.string().min(8, t);
8
+ }
9
+ var r = e.object({
10
+ email: t(),
11
+ password: n()
12
+ }), i = e.object({
13
+ name: e.string().trim().min(3, "Informe seu nome completo"),
14
+ email: t(),
15
+ password: n()
16
+ }), a = e.object({ email: t() }), o = e.object({
17
+ password: n(),
18
+ confirmPassword: e.string().min(1, "Confirme a nova senha")
19
+ }).refine((e) => e.password === e.confirmPassword, {
20
+ message: "As senhas não coincidem",
21
+ path: ["confirmPassword"]
22
+ });
23
+ //#endregion
24
+ export { t as authEmail, n as authPassword, a as forgotPasswordSchema, r as loginSchema, o as resetPasswordSchema, i as signUpSchema };
25
+
26
+ //# sourceMappingURL=auth-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-schemas.js","names":["authEmail","z","authPassword","message","loginSchema","signUpSchema","forgotPasswordSchema","resetPasswordSchema","values"],"sources":["../../../src/components/AuthForm/auth-schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * An e-mail field: trimmed and lower-cased *before* it is validated.\n *\n * The order is the point. Validating first rejects `\" ana@x.com\"` pasted with a\n * trailing space from a password manager, and a backend that compares e-mails\n * case-sensitively creates a second account for `Ana@x.com`. An empty value gets\n * its own sentence instead of \"e-mail inválido\", which reads like an accusation\n * on a field the user simply has not reached yet.\n *\n * @returns A schema producing the normalized address.\n */\nexport function authEmail(): z.ZodPipe<z.ZodString, z.ZodEmail> {\n return z\n .string()\n .trim()\n .toLowerCase()\n .min(1, \"Informe seu e-mail\")\n .pipe(z.email(\"Informe um e-mail válido\"));\n}\n\n/**\n * A password field with the minimum length every Tempest backend enforces.\n *\n * @param message - Sentence shown below 8 characters.\n * @returns The password schema.\n */\nexport function authPassword(\n message: string = \"A senha deve ter no mínimo 8 caracteres\",\n): z.ZodString {\n return z.string().min(8, message);\n}\n\n/** Default schema of `LoginForm`: normalized e-mail + password of at least 8 characters. */\nexport const loginSchema = z.object({\n email: authEmail(),\n password: authPassword(),\n});\n\n/**\n * Default schema of `SignUpForm`: name, e-mail and password.\n *\n * Exported so an app adds its own fields with `.extend()` instead of rewriting\n * the three it shares with every other app — see the phone and terms example in\n * the docs.\n */\nexport const signUpSchema = z.object({\n name: z.string().trim().min(3, \"Informe seu nome completo\"),\n email: authEmail(),\n password: authPassword(),\n});\n\n/** Default schema of `ForgotPasswordForm`: the e-mail the reset link goes to. */\nexport const forgotPasswordSchema = z.object({\n email: authEmail(),\n});\n\n/**\n * Default schema of `ResetPasswordForm`: new password and its confirmation.\n *\n * The mismatch is reported on `confirmPassword` (`path`), so the message lands\n * under the field the user has to fix rather than in a form-level alert.\n */\nexport const resetPasswordSchema = z\n .object({\n password: authPassword(),\n confirmPassword: z.string().min(1, \"Confirme a nova senha\"),\n })\n .refine((values) => values.password === values.confirmPassword, {\n message: \"As senhas não coincidem\",\n path: [\"confirmPassword\"],\n });\n"],"mappings":";;AAaA,SAAgBA,IAAgD;CAC5D,OAAOC,EACF,OAAO,CAAC,CACR,KAAK,CAAC,CACN,YAAY,CAAC,CACb,IAAI,GAAG,oBAAoB,CAAC,CAC5B,KAAKA,EAAE,MAAM,0BAA0B,CAAC;AACjD;AAQA,SAAgBC,EACZ,IAAkB,2CACP;CACX,OAAOD,EAAE,OAAO,CAAC,CAAC,IAAI,GAAGE,CAAO;AACpC;AAGA,IAAaC,IAAcH,EAAE,OAAO;CAChC,OAAOD,EAAU;CACjB,UAAUE,EAAa;AAC3B,CAAC,GASYG,IAAeJ,EAAE,OAAO;CACjC,MAAMA,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,2BAA2B;CAC1D,OAAOD,EAAU;CACjB,UAAUE,EAAa;AAC3B,CAAC,GAGYI,IAAuBL,EAAE,OAAO,EACzC,OAAOD,EAAU,EACrB,CAAC,GAQYO,IAAsBN,EAC9B,OAAO;CACJ,UAAUC,EAAa;CACvB,iBAAiBD,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,uBAAuB;AAC9D,CAAC,CAAC,CACD,QAAQ,MAAWO,EAAO,aAAaA,EAAO,iBAAiB;CAC5D,SAAS;CACT,MAAM,CAAC,iBAAiB;AAC5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ const e=require("../../utils/cn.cjs"),t=require("../../utils/safe-url.cjs"),n=require("../../hooks/use-media-query.cjs"),r=require("./AuthPage.module.cjs");let i=require("react"),a=require("react/jsx-runtime"),o=require("react-router");var s=`Voltar`;function c({back:e}){let n=typeof e==`string`?{to:e}:e,i=t.vettedHref(n.to);if(n.to!==void 0&&i===void 0&&n.onClick===void 0)return null;let c={...n,to:i},l=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`svg`,{"aria-hidden":!0,width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:(0,a.jsx)(`path`,{d:`M19 12H5m6-7-7 7 7 7`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,a.jsx)(`span`,{children:c.label??s})]});return c.to===void 0?(0,a.jsx)(`button`,{type:`button`,onClick:c.onClick,className:r.default.back,children:l}):(0,a.jsx)(o.Link,{to:c.to,onClick:c.onClick,className:r.default.back,children:l})}function l({brand:t,title:o,subtitle:s,aside:l,variant:u=`split`,breakpoint:d=768,back:f,footer:p,headingLevel:m=1,as:h=`main`,children:g,className:_,style:v,...y}){let b=n.useMediaQuery(`(min-width: ${d}px)`),x=u===`card`?`card`:b?`split`:`stacked`,S={"--tempest-auth-page-aside-bg":l?.background,"--tempest-auth-page-aside-fg":l?.color,...v},C=o===void 0?null:(0,i.createElement)(`h${m}`,{className:r.default.title},o);return(0,i.createElement)(h,{...y,className:e.cn(r.default.root,r.default[x],_),style:S,"data-layout":x},x!==`card`&&(0,a.jsxs)(`div`,{className:r.default.aside,children:[f!==void 0&&(0,a.jsx)(c,{back:f}),t!==void 0&&(0,a.jsx)(`div`,{className:r.default.brand,children:t}),l?.content!==void 0&&(0,a.jsx)(`div`,{className:r.default.asideContent,children:l.content})]}),x===`card`&&f!==void 0&&(0,a.jsx)(`div`,{className:r.default.cardBack,children:(0,a.jsx)(c,{back:f})}),(0,a.jsx)(`div`,{className:r.default.panel,children:(0,a.jsxs)(`div`,{className:r.default.sheet,children:[x===`card`&&t!==void 0&&(0,a.jsx)(`div`,{className:r.default.cardBrand,children:t}),(C||s!==void 0)&&(0,a.jsxs)(`div`,{className:r.default.header,children:[C,s!==void 0&&(0,a.jsx)(`p`,{className:r.default.subtitle,children:s})]}),g,p!==void 0&&(0,a.jsx)(`div`,{className:r.default.footer,children:p})]})}))}exports.AuthPage=l;
2
+ //# sourceMappingURL=AuthPage.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthPage.cjs","names":["vettedHref","_Fragment","Link","styles","useMediaQuery","createElement","cn","require_cn","require_safe_url","require_use_media_query","require_AuthPage_module","react","react_jsx_runtime","react_router","DEFAULT_BACK_LABEL","BackAction","given","back","to","action","content","AuthPage","props","wide","breakpoint","layout","variant","rootStyle","aside","style","heading","title","headingLevel","as","className","brand","subtitle","children","footer"],"sources":["../../../src/components/AuthPage/AuthPage.tsx"],"sourcesContent":["import { createElement } from \"react\";\nimport type { CSSProperties, HTMLAttributes, ReactNode } from \"react\";\nimport { Link } from \"react-router\";\nimport { useMediaQuery } from \"@/hooks/use-media-query\";\nimport { cn } from \"@/utils/cn\";\nimport { vettedHref } from \"@/utils/safe-url\";\nimport styles from \"./AuthPage.module.css\";\n\n/** How the page is laid out: brand panel beside the form, or one centered card. */\nexport type AuthPageVariant = \"split\" | \"card\";\n\n/** Heading level of the page title. */\nexport type AuthPageHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\n/** The brand panel of a `split` page — the colored half on desktop, the colored top on mobile. */\nexport interface AuthPageAside {\n /**\n * Any CSS `background` value: a color, a token, a gradient, an image.\n * Defaults to `var(--tempest-primary)`, so a themed app gets its brand color\n * without passing anything.\n */\n background?: string;\n /**\n * Text color over that background. Defaults to `var(--tempest-text-on-primary)`,\n * which is only right while the background is the primary color — set it\n * together with a custom `background` so the back button and the app name\n * keep their contrast.\n */\n color?: string;\n /** Extra content under the brand on the panel: a tagline, an illustration. */\n content?: ReactNode;\n}\n\n/** The back action, as an object when the label or the behavior is not the default. */\nexport interface AuthPageBackAction {\n /**\n * Route to navigate to, rendered as a router `Link`. Passes through\n * `safeLinkUrl`: a destination it rejects is dropped, leaving the button with\n * `onClick` or, without one, no back action at all.\n */\n to?: string;\n /** Visible label (and accessible name). Default `\"Voltar\"`. */\n label?: string;\n /** Click handler — used alone (a `<button>`) or together with `to`. */\n onClick?: () => void;\n}\n\nexport interface AuthPageProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Logo and/or app name, shown on the brand panel (split) or at the top of the card. */\n brand?: ReactNode;\n /** Page title, rendered as a heading — e.g. `\"Bem-vindo!\"`. */\n title?: ReactNode;\n /** Line under the title — e.g. `\"Entre com sua conta para continuar\"`. */\n subtitle?: ReactNode;\n /** Brand panel colors and extra content. */\n aside?: AuthPageAside;\n /**\n * `split` (default): colored top + rounded white sheet below `breakpoint`,\n * 50/50 brand panel and form at or above it. `card`: one centered card at\n * every width — the internal-panel login.\n */\n variant?: AuthPageVariant;\n /**\n * Viewport width, in px, at which `split` turns into two columns. Default\n * `768`, the width every hand-built auth screen this replaces switched at —\n * deliberately not the `1024` of `useBreakpoint`, which is about navigation\n * chrome, not about whether a form fits beside a brand panel.\n */\n breakpoint?: number;\n /** Back action: a route string, or an object with `to`/`label`/`onClick`. Omit to hide it. */\n back?: string | AuthPageBackAction;\n /** Content under the form, inside the sheet or card — legal text, a secondary link. */\n footer?: ReactNode;\n /** Heading level of `title`. Default `1`, since the auth screen is usually the whole page. */\n headingLevel?: AuthPageHeadingLevel;\n /**\n * Root element. Default `\"main\"`, the page's main landmark. Use `\"div\"` when\n * the page is rendered inside a layout that already owns a `<main>` — two\n * nested main landmarks are an accessibility violation.\n */\n as?: \"main\" | \"div\";\n /** The form — usually an `AuthForm` or one of its presets. */\n children?: ReactNode;\n}\n\nconst DEFAULT_BACK_LABEL = \"Voltar\";\n\n/**\n * Render the back action, as a router link or a plain button.\n *\n * The route is vetted with `safeLinkUrl`'s allowlist: the router `Link` writes it to\n * `href`, and React 18 — inside the peer range — keeps a `javascript:` href\n * verbatim. A rejected route with no `onClick` renders nothing, because a back\n * button that does nothing is worse than none.\n *\n * @param props - The `back` prop, already present.\n * @returns The link or button, labelled by its visible text, or `null`.\n */\nfunction BackAction({ back }: { back: string | AuthPageBackAction }): ReactNode {\n const given: AuthPageBackAction = typeof back === \"string\" ? { to: back } : back;\n const to = vettedHref(given.to);\n if (given.to !== undefined && to === undefined && given.onClick === undefined) return null;\n const action: AuthPageBackAction = { ...given, to };\n const content = (\n <>\n <svg aria-hidden width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M19 12H5m6-7-7 7 7 7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n <span>{action.label ?? DEFAULT_BACK_LABEL}</span>\n </>\n );\n if (action.to !== undefined) {\n return (\n <Link to={action.to} onClick={action.onClick} className={styles.back}>\n {content}\n </Link>\n );\n }\n return (\n <button type=\"button\" onClick={action.onClick} className={styles.back}>\n {content}\n </button>\n );\n}\n\n/**\n * The layout shell of a sign-in, sign-up or password-recovery screen.\n *\n * Every app was hand-building the same page around its form: a colored top with\n * the logo and a back button over a white sheet with rounded top corners on\n * mobile, a 50/50 brand panel and form on desktop, a \"Bem-vindo!\" heading. This\n * component is that page, so the app passes only the brand and the form.\n *\n * The switch between the two layouts is a JavaScript media query, not a CSS\n * `@media` rule, because the breakpoint is a prop: a CSS media query cannot read a\n * custom property. `useMediaQuery` evaluates synchronously on the first render, so\n * a client-rendered page does not flash the wrong layout.\n *\n * @example\n * <AuthPage brand={<img src=\"/logo.svg\" alt=\"Acme\" />} back=\"/\" title=\"Bem-vindo!\">\n * <LoginForm onSubmit={signIn} links={{ forgotPassword: \"/recuperar\", signUp: \"/cadastro\" }} />\n * </AuthPage>\n */\nexport function AuthPage({\n brand,\n title,\n subtitle,\n aside,\n variant = \"split\",\n breakpoint = 768,\n back,\n footer,\n headingLevel = 1,\n as = \"main\",\n children,\n className,\n style,\n ...props\n}: AuthPageProps): ReactNode {\n const wide = useMediaQuery(`(min-width: ${breakpoint}px)`);\n const layout = variant === \"card\" ? \"card\" : wide ? \"split\" : \"stacked\";\n const rootStyle = {\n \"--tempest-auth-page-aside-bg\": aside?.background,\n \"--tempest-auth-page-aside-fg\": aside?.color,\n ...style,\n } as CSSProperties;\n const heading =\n title === undefined\n ? null\n : createElement(`h${headingLevel}`, { className: styles.title }, title);\n\n return createElement(\n as,\n {\n ...props,\n className: cn(styles.root, styles[layout], className),\n style: rootStyle,\n \"data-layout\": layout,\n },\n layout !== \"card\" && (\n <div className={styles.aside}>\n {back !== undefined && <BackAction back={back} />}\n {brand !== undefined && <div className={styles.brand}>{brand}</div>}\n {aside?.content !== undefined && (\n <div className={styles.asideContent}>{aside.content}</div>\n )}\n </div>\n ),\n layout === \"card\" && back !== undefined && (\n <div className={styles.cardBack}>\n <BackAction back={back} />\n </div>\n ),\n <div className={styles.panel}>\n <div className={styles.sheet}>\n {layout === \"card\" && brand !== undefined && (\n <div className={styles.cardBrand}>{brand}</div>\n )}\n {(heading || subtitle !== undefined) && (\n <div className={styles.header}>\n {heading}\n {subtitle !== undefined && <p className={styles.subtitle}>{subtitle}</p>}\n </div>\n )}\n {children}\n {footer !== undefined && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>,\n );\n}\n"],"mappings":"A,4OAqFA,IAAMc,EAAqB,SAa3B,SAASC,EAAW,CAAE,QAA0D,CAC5E,IAAMC,EAA4B,OAAOC,GAAS,SAAW,CAAE,GAAIA,CAAK,EAAIA,EACtEC,EAAKlB,EAAAA,WAAWgB,EAAM,EAAE,EAC9B,GAAIA,EAAM,KAAO,IAAA,IAAaE,IAAO,IAAA,IAAaF,EAAM,UAAY,IAAA,GAAW,OAAO,KACtF,IAAMG,EAA6B,CAAE,GAAGH,EAAO,IAAG,EAC5CI,GACF,EAAAR,EAAA,KAAA,CAAAX,EAAAA,SAAA,CAAA,SAAA,EACI,EAAAW,EAAA,IAAA,CAAC,MAAD,CAAK,cAAA,GAAY,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAC7D,UAAA,EAAAA,EAAA,IAAA,CAAC,OAAD,CACI,EAAE,uBACF,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,OAClB,CAAA,CACA,CAAA,GACL,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAA,SAAOO,EAAO,OAASL,CAAyB,CAAA,CAClD,CAAA,CAAA,EASN,OAPIK,EAAO,KAAO,IAAA,IAQd,EAAAP,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,QAASO,EAAO,QAAS,UAAWhB,EAAAA,QAAO,KAC5D,SAAAiB,CACG,CAAA,GARJ,EAAAR,EAAA,IAAA,CAACV,EAAAA,KAAD,CAAM,GAAIiB,EAAO,GAAI,QAASA,EAAO,QAAS,UAAWhB,EAAAA,QAAO,KAC3D,SAAAiB,CACC,CAAA,CAQlB,CAoBA,SAAgBC,EAAS,CACrB,QACA,QACA,WACA,QACA,UAAU,QACV,aAAa,IACb,OACA,SACA,eAAe,EACf,KAAK,OACL,WACA,YACA,QACA,GAAGC,GACsB,CACzB,IAAMC,EAAOnB,EAAAA,cAAc,eAAeoB,EAAW,IAAI,EACnDC,EAASC,IAAY,OAAS,OAASH,EAAO,QAAU,UACxDI,EAAY,CACd,+BAAgCC,GAAO,WACvC,+BAAgCA,GAAO,MACvC,GAAGC,CACP,EACMC,EACFC,IAAU,IAAA,GACJ,MAAA,EACA1B,EAAAA,cAAAA,CAAc,IAAI2B,IAAgB,CAAE,UAAW7B,EAAAA,QAAO,KAAM,EAAG4B,CAAK,EAE9E,OAAA,EAAO1B,EAAAA,cAAAA,CACH4B,EACA,CACI,GAAGX,EACH,UAAWhB,EAAAA,GAAGH,EAAAA,QAAO,KAAMA,EAAAA,QAAOsB,GAASS,CAAS,EACpD,MAAOP,EACP,cAAeF,CACnB,EACAA,IAAW,SACP,EAAAb,EAAA,KAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,MAAvB,SAAA,CACKc,IAAS,IAAA,KAAa,EAAAL,EAAA,IAAA,CAACG,EAAD,CAAkB,MAAO,CAAA,EAC/CoB,IAAU,IAAA,KAAa,EAAAvB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,MAAQ,SAAAgC,CAAW,CAAA,EACjEP,GAAO,UAAY,IAAA,KAChB,EAAAhB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,aAAe,SAAAyB,EAAM,OAAa,CAAA,CAE5D,CAET,CAAA,EAAAH,IAAW,QAAUR,IAAS,IAAA,KAC1B,EAAAL,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,SACnB,UAAA,EAAAS,EAAA,IAAA,CAACG,EAAD,CAAkB,MAAO,CAAA,CACxB,CAAA,GAET,EAAAH,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,MACnB,UAAA,EAAAS,EAAA,KAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,MAAvB,SAAA,CACKsB,IAAW,QAAUU,IAAU,IAAA,KAC5B,EAAAvB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,UAAY,SAAAgC,CAAW,CAAA,GAEhDL,GAAWM,IAAa,IAAA,MACtB,EAAAxB,EAAA,KAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,OAAvB,SAAA,CACK2B,EACAM,IAAa,IAAA,KAAa,EAAAxB,EAAA,IAAA,CAAC,IAAD,CAAG,UAAWT,EAAAA,QAAO,SAAW,SAAAiC,CAAY,CAAA,CACtE,C,GAERC,EACAC,IAAW,IAAA,KAAa,EAAA1B,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWT,EAAAA,QAAO,OAAS,SAAAmC,CAAY,CAAA,CACpE,C,EACJ,CAAA,CACT,CACJ,C"}
@@ -0,0 +1,97 @@
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { vettedHref as t } from "../../utils/safe-url.js";
3
+ import { useMediaQuery as n } from "../../hooks/use-media-query.js";
4
+ import r from "./AuthPage.module.js";
5
+ import { createElement as i } from "react";
6
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ import { Link as c } from "react-router";
8
+ //#region src/components/AuthPage/AuthPage.tsx
9
+ var l = "Voltar";
10
+ function u({ back: e }) {
11
+ let n = typeof e == "string" ? { to: e } : e, i = t(n.to);
12
+ if (n.to !== void 0 && i === void 0 && n.onClick === void 0) return null;
13
+ let u = {
14
+ ...n,
15
+ to: i
16
+ }, d = /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("svg", {
17
+ "aria-hidden": !0,
18
+ width: "20",
19
+ height: "20",
20
+ viewBox: "0 0 24 24",
21
+ fill: "none",
22
+ children: /* @__PURE__ */ o("path", {
23
+ d: "M19 12H5m6-7-7 7 7 7",
24
+ stroke: "currentColor",
25
+ strokeWidth: "2",
26
+ strokeLinecap: "round",
27
+ strokeLinejoin: "round"
28
+ })
29
+ }), /* @__PURE__ */ o("span", { children: u.label ?? l })] });
30
+ return u.to === void 0 ? /* @__PURE__ */ o("button", {
31
+ type: "button",
32
+ onClick: u.onClick,
33
+ className: r.back,
34
+ children: d
35
+ }) : /* @__PURE__ */ o(c, {
36
+ to: u.to,
37
+ onClick: u.onClick,
38
+ className: r.back,
39
+ children: d
40
+ });
41
+ }
42
+ function d({ brand: t, title: a, subtitle: c, aside: l, variant: d = "split", breakpoint: f = 768, back: p, footer: m, headingLevel: h = 1, as: g = "main", children: _, className: v, style: y, ...b }) {
43
+ let x = n(`(min-width: ${f}px)`), S = d === "card" ? "card" : x ? "split" : "stacked", C = {
44
+ "--tempest-auth-page-aside-bg": l?.background,
45
+ "--tempest-auth-page-aside-fg": l?.color,
46
+ ...y
47
+ }, w = a === void 0 ? null : i(`h${h}`, { className: r.title }, a);
48
+ return i(g, {
49
+ ...b,
50
+ className: e(r.root, r[S], v),
51
+ style: C,
52
+ "data-layout": S
53
+ }, S !== "card" && /* @__PURE__ */ s("div", {
54
+ className: r.aside,
55
+ children: [
56
+ p !== void 0 && /* @__PURE__ */ o(u, { back: p }),
57
+ t !== void 0 && /* @__PURE__ */ o("div", {
58
+ className: r.brand,
59
+ children: t
60
+ }),
61
+ l?.content !== void 0 && /* @__PURE__ */ o("div", {
62
+ className: r.asideContent,
63
+ children: l.content
64
+ })
65
+ ]
66
+ }), S === "card" && p !== void 0 && /* @__PURE__ */ o("div", {
67
+ className: r.cardBack,
68
+ children: /* @__PURE__ */ o(u, { back: p })
69
+ }), /* @__PURE__ */ o("div", {
70
+ className: r.panel,
71
+ children: /* @__PURE__ */ s("div", {
72
+ className: r.sheet,
73
+ children: [
74
+ S === "card" && t !== void 0 && /* @__PURE__ */ o("div", {
75
+ className: r.cardBrand,
76
+ children: t
77
+ }),
78
+ (w || c !== void 0) && /* @__PURE__ */ s("div", {
79
+ className: r.header,
80
+ children: [w, c !== void 0 && /* @__PURE__ */ o("p", {
81
+ className: r.subtitle,
82
+ children: c
83
+ })]
84
+ }),
85
+ _,
86
+ m !== void 0 && /* @__PURE__ */ o("div", {
87
+ className: r.footer,
88
+ children: m
89
+ })
90
+ ]
91
+ })
92
+ }));
93
+ }
94
+ //#endregion
95
+ export { d as AuthPage };
96
+
97
+ //# sourceMappingURL=AuthPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthPage.js","names":["_Fragment","styles","AuthPage_module_default","Fragment$1","DEFAULT_BACK_LABEL","BackAction","given","back","to","vettedHref","action","content","Link","AuthPage","props","wide","useMediaQuery","breakpoint","layout","variant","rootStyle","aside","style","heading","title","createElement","headingLevel","as","cn","className","brand","subtitle","children","footer"],"sources":["../../../src/components/AuthPage/AuthPage.tsx"],"sourcesContent":["import { createElement } from \"react\";\nimport type { CSSProperties, HTMLAttributes, ReactNode } from \"react\";\nimport { Link } from \"react-router\";\nimport { useMediaQuery } from \"@/hooks/use-media-query\";\nimport { cn } from \"@/utils/cn\";\nimport { vettedHref } from \"@/utils/safe-url\";\nimport styles from \"./AuthPage.module.css\";\n\n/** How the page is laid out: brand panel beside the form, or one centered card. */\nexport type AuthPageVariant = \"split\" | \"card\";\n\n/** Heading level of the page title. */\nexport type AuthPageHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\n/** The brand panel of a `split` page — the colored half on desktop, the colored top on mobile. */\nexport interface AuthPageAside {\n /**\n * Any CSS `background` value: a color, a token, a gradient, an image.\n * Defaults to `var(--tempest-primary)`, so a themed app gets its brand color\n * without passing anything.\n */\n background?: string;\n /**\n * Text color over that background. Defaults to `var(--tempest-text-on-primary)`,\n * which is only right while the background is the primary color — set it\n * together with a custom `background` so the back button and the app name\n * keep their contrast.\n */\n color?: string;\n /** Extra content under the brand on the panel: a tagline, an illustration. */\n content?: ReactNode;\n}\n\n/** The back action, as an object when the label or the behavior is not the default. */\nexport interface AuthPageBackAction {\n /**\n * Route to navigate to, rendered as a router `Link`. Passes through\n * `safeLinkUrl`: a destination it rejects is dropped, leaving the button with\n * `onClick` or, without one, no back action at all.\n */\n to?: string;\n /** Visible label (and accessible name). Default `\"Voltar\"`. */\n label?: string;\n /** Click handler — used alone (a `<button>`) or together with `to`. */\n onClick?: () => void;\n}\n\nexport interface AuthPageProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Logo and/or app name, shown on the brand panel (split) or at the top of the card. */\n brand?: ReactNode;\n /** Page title, rendered as a heading — e.g. `\"Bem-vindo!\"`. */\n title?: ReactNode;\n /** Line under the title — e.g. `\"Entre com sua conta para continuar\"`. */\n subtitle?: ReactNode;\n /** Brand panel colors and extra content. */\n aside?: AuthPageAside;\n /**\n * `split` (default): colored top + rounded white sheet below `breakpoint`,\n * 50/50 brand panel and form at or above it. `card`: one centered card at\n * every width — the internal-panel login.\n */\n variant?: AuthPageVariant;\n /**\n * Viewport width, in px, at which `split` turns into two columns. Default\n * `768`, the width every hand-built auth screen this replaces switched at —\n * deliberately not the `1024` of `useBreakpoint`, which is about navigation\n * chrome, not about whether a form fits beside a brand panel.\n */\n breakpoint?: number;\n /** Back action: a route string, or an object with `to`/`label`/`onClick`. Omit to hide it. */\n back?: string | AuthPageBackAction;\n /** Content under the form, inside the sheet or card — legal text, a secondary link. */\n footer?: ReactNode;\n /** Heading level of `title`. Default `1`, since the auth screen is usually the whole page. */\n headingLevel?: AuthPageHeadingLevel;\n /**\n * Root element. Default `\"main\"`, the page's main landmark. Use `\"div\"` when\n * the page is rendered inside a layout that already owns a `<main>` — two\n * nested main landmarks are an accessibility violation.\n */\n as?: \"main\" | \"div\";\n /** The form — usually an `AuthForm` or one of its presets. */\n children?: ReactNode;\n}\n\nconst DEFAULT_BACK_LABEL = \"Voltar\";\n\n/**\n * Render the back action, as a router link or a plain button.\n *\n * The route is vetted with `safeLinkUrl`'s allowlist: the router `Link` writes it to\n * `href`, and React 18 — inside the peer range — keeps a `javascript:` href\n * verbatim. A rejected route with no `onClick` renders nothing, because a back\n * button that does nothing is worse than none.\n *\n * @param props - The `back` prop, already present.\n * @returns The link or button, labelled by its visible text, or `null`.\n */\nfunction BackAction({ back }: { back: string | AuthPageBackAction }): ReactNode {\n const given: AuthPageBackAction = typeof back === \"string\" ? { to: back } : back;\n const to = vettedHref(given.to);\n if (given.to !== undefined && to === undefined && given.onClick === undefined) return null;\n const action: AuthPageBackAction = { ...given, to };\n const content = (\n <>\n <svg aria-hidden width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M19 12H5m6-7-7 7 7 7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n <span>{action.label ?? DEFAULT_BACK_LABEL}</span>\n </>\n );\n if (action.to !== undefined) {\n return (\n <Link to={action.to} onClick={action.onClick} className={styles.back}>\n {content}\n </Link>\n );\n }\n return (\n <button type=\"button\" onClick={action.onClick} className={styles.back}>\n {content}\n </button>\n );\n}\n\n/**\n * The layout shell of a sign-in, sign-up or password-recovery screen.\n *\n * Every app was hand-building the same page around its form: a colored top with\n * the logo and a back button over a white sheet with rounded top corners on\n * mobile, a 50/50 brand panel and form on desktop, a \"Bem-vindo!\" heading. This\n * component is that page, so the app passes only the brand and the form.\n *\n * The switch between the two layouts is a JavaScript media query, not a CSS\n * `@media` rule, because the breakpoint is a prop: a CSS media query cannot read a\n * custom property. `useMediaQuery` evaluates synchronously on the first render, so\n * a client-rendered page does not flash the wrong layout.\n *\n * @example\n * <AuthPage brand={<img src=\"/logo.svg\" alt=\"Acme\" />} back=\"/\" title=\"Bem-vindo!\">\n * <LoginForm onSubmit={signIn} links={{ forgotPassword: \"/recuperar\", signUp: \"/cadastro\" }} />\n * </AuthPage>\n */\nexport function AuthPage({\n brand,\n title,\n subtitle,\n aside,\n variant = \"split\",\n breakpoint = 768,\n back,\n footer,\n headingLevel = 1,\n as = \"main\",\n children,\n className,\n style,\n ...props\n}: AuthPageProps): ReactNode {\n const wide = useMediaQuery(`(min-width: ${breakpoint}px)`);\n const layout = variant === \"card\" ? \"card\" : wide ? \"split\" : \"stacked\";\n const rootStyle = {\n \"--tempest-auth-page-aside-bg\": aside?.background,\n \"--tempest-auth-page-aside-fg\": aside?.color,\n ...style,\n } as CSSProperties;\n const heading =\n title === undefined\n ? null\n : createElement(`h${headingLevel}`, { className: styles.title }, title);\n\n return createElement(\n as,\n {\n ...props,\n className: cn(styles.root, styles[layout], className),\n style: rootStyle,\n \"data-layout\": layout,\n },\n layout !== \"card\" && (\n <div className={styles.aside}>\n {back !== undefined && <BackAction back={back} />}\n {brand !== undefined && <div className={styles.brand}>{brand}</div>}\n {aside?.content !== undefined && (\n <div className={styles.asideContent}>{aside.content}</div>\n )}\n </div>\n ),\n layout === \"card\" && back !== undefined && (\n <div className={styles.cardBack}>\n <BackAction back={back} />\n </div>\n ),\n <div className={styles.panel}>\n <div className={styles.sheet}>\n {layout === \"card\" && brand !== undefined && (\n <div className={styles.cardBrand}>{brand}</div>\n )}\n {(heading || subtitle !== undefined) && (\n <div className={styles.header}>\n {heading}\n {subtitle !== undefined && <p className={styles.subtitle}>{subtitle}</p>}\n </div>\n )}\n {children}\n {footer !== undefined && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>,\n );\n}\n"],"mappings":";;;;;;;;AAqFA,IAAMI,IAAqB;AAa3B,SAASC,EAAW,EAAE,WAA0D;CAC5E,IAAMC,IAA4B,OAAOC,KAAS,WAAW,EAAE,IAAIA,EAAK,IAAIA,GACtEC,IAAKC,EAAWH,EAAM,EAAE;CAC9B,IAAIA,EAAM,OAAO,KAAA,KAAaE,MAAO,KAAA,KAAaF,EAAM,YAAY,KAAA,GAAW,OAAO;CACtF,IAAMI,IAA6B;EAAE,GAAGJ;EAAO;CAAG,GAC5CK,IACF,kBAAAX,GAAA,EAAA,UAAA,CACI,kBAAC,OAAD;EAAK,eAAA;EAAY,OAAM;EAAK,QAAO;EAAK,SAAQ;EAAY,MAAK;EAC7D,UAAA,kBAAC,QAAD;GACI,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;EAClB,CAAA;CACA,CAAA,GACL,kBAAC,QAAD,EAAA,UAAOU,EAAO,SAASN,EAAyB,CAAA,CAClD,EAAA,CAAA;CASN,OAPIM,EAAO,OAAO,KAAA,IAQd,kBAAC,UAAD;EAAQ,MAAK;EAAS,SAASA,EAAO;EAAS,WAAWT,EAAO;EAC5D,UAAAU;CACG,CAAA,IARJ,kBAACC,GAAD;EAAM,IAAIF,EAAO;EAAI,SAASA,EAAO;EAAS,WAAWT,EAAO;EAC3D,UAAAU;CACC,CAAA;AAQlB;AAoBA,SAAgBE,EAAS,EACrB,UACA,UACA,aACA,UACA,aAAU,SACV,gBAAa,KACb,SACA,WACA,kBAAe,GACf,QAAK,QACL,aACA,cACA,UACA,GAAGC,KACsB;CACzB,IAAMC,IAAOC,EAAc,eAAeC,EAAW,IAAI,GACnDC,IAASC,MAAY,SAAS,SAASJ,IAAO,UAAU,WACxDK,IAAY;EACd,gCAAgCC,GAAO;EACvC,gCAAgCA,GAAO;EACvC,GAAGC;CACP,GACMC,IACFC,MAAU,KAAA,IACJ,OACAC,EAAc,IAAIC,KAAgB,EAAE,WAAWzB,EAAO,MAAM,GAAGuB,CAAK;CAE9E,OAAOC,EACHE,GACA;EACI,GAAGb;EACH,WAAWc,EAAG3B,EAAO,MAAMA,EAAOiB,IAASW,CAAS;EACpD,OAAOT;EACP,eAAeF;CACnB,GACAA,MAAW,UACP,kBAAC,OAAD;EAAK,WAAWjB,EAAO;EAAvB,UAAA;GACKM,MAAS,KAAA,KAAa,kBAACF,GAAD,EAAkB,QAAO,CAAA;GAC/CyB,MAAU,KAAA,KAAa,kBAAC,OAAD;IAAK,WAAW7B,EAAO;IAAQ,UAAA6B;GAAW,CAAA;GACjET,GAAO,YAAY,KAAA,KAChB,kBAAC,OAAD;IAAK,WAAWpB,EAAO;IAAe,UAAAoB,EAAM;GAAa,CAAA;EAE5D;CAET,CAAA,GAAAH,MAAW,UAAUX,MAAS,KAAA,KAC1B,kBAAC,OAAD;EAAK,WAAWN,EAAO;EACnB,UAAA,kBAACI,GAAD,EAAkB,QAAO,CAAA;CACxB,CAAA,GAET,kBAAC,OAAD;EAAK,WAAWJ,EAAO;EACnB,UAAA,kBAAC,OAAD;GAAK,WAAWA,EAAO;GAAvB,UAAA;IACKiB,MAAW,UAAUY,MAAU,KAAA,KAC5B,kBAAC,OAAD;KAAK,WAAW7B,EAAO;KAAY,UAAA6B;IAAW,CAAA;KAEhDP,KAAWQ,MAAa,KAAA,MACtB,kBAAC,OAAD;KAAK,WAAW9B,EAAO;KAAvB,UAAA,CACKsB,GACAQ,MAAa,KAAA,KAAa,kBAAC,KAAD;MAAG,WAAW9B,EAAO;MAAW,UAAA8B;KAAY,CAAA,CACtE;;IAERC;IACAC,MAAW,KAAA,KAAa,kBAAC,OAAD;KAAK,WAAWhC,EAAO;KAAS,UAAAgC;IAAY,CAAA;GACpE;;CACJ,CAAA,CACT;AACJ"}
@@ -0,0 +1,3 @@
1
+ require("../../styles/component/AuthPage.css");
2
+ var e=`tempest_root_7FM9A`,t=`tempest_aside_iQvZx`,n=`tempest_brand_ucf0I`,r=`tempest_asideContent_27MiH`,i=`tempest_back_wf1QC`,a=`tempest_panel_4yoaM`,o=`tempest_sheet_BV27x`,s=`tempest_header_fglsK`,c=`tempest_title_US-kY`,l=`tempest_subtitle_IHFzn`,u=`tempest_footer_n5iU8`,d=`tempest_stacked_r5S3c`,f=`tempest_split_Jd8Ru`,p=`tempest_card_DgL6v`,m=`tempest_cardBack_911m6`,h=`tempest_cardBrand_U9HuK`,g={root:e,aside:t,brand:n,asideContent:r,back:i,panel:a,sheet:o,header:s,title:c,subtitle:l,footer:u,stacked:d,split:f,card:p,cardBack:m,cardBrand:h};exports.aside=t,exports.asideContent=r,exports.back=i,exports.brand=n,exports.card=p,exports.cardBack=m,exports.cardBrand=h,exports.default=g,exports.footer=u,exports.header=s,exports.panel=a,exports.root=e,exports.sheet=o,exports.split=f,exports.stacked=d,exports.subtitle=l,exports.title=c;
3
+ //# sourceMappingURL=AuthPage.module.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthPage.module.cjs","names":["root","aside","brand","asideContent","back","panel","sheet","header","title","subtitle","footer","stacked","split","card","cardBack","cardBrand","AuthPage_module_default"],"sources":["../../../src/components/AuthPage/AuthPage.module.css"],"sourcesContent":["/* ============================================================\n * AuthPage — the shell around a sign-in / sign-up form.\n *\n * Three layouts, chosen in JS (the breakpoint is a prop, and a CSS\n * media query cannot read a custom property):\n *\n * stacked colored top with back + brand, then a sheet with large\n * rounded top corners that holds the form (mobile)\n * split brand panel and form side by side, 50/50 (desktop)\n * card one centered card at every width (internal panels)\n *\n * The brand color travels as two component-scoped properties set\n * inline from the `aside` prop, falling back to the primary token.\n * ============================================================ */\n.root {\n --tempest-auth-page-bg: var(--tempest-auth-page-aside-bg, var(--tempest-primary));\n --tempest-auth-page-fg: var(--tempest-auth-page-aside-fg, var(--tempest-text-on-primary));\n box-sizing: border-box;\n min-height: 100dvh;\n width: 100%;\n color: var(--tempest-text);\n font-family: var(--tempest-font-sans);\n}\n\n/* ---------- brand panel ---------- */\n.aside {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--tempest-space-4);\n color: var(--tempest-auth-page-fg);\n text-align: center;\n}\n\n.brand {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--tempest-space-2);\n font-size: var(--tempest-text-2xl);\n font-weight: var(--tempest-weight-bold);\n}\n\n.brand img,\n.brand svg {\n max-width: 100%;\n height: auto;\n}\n\n.asideContent {\n max-width: 28rem;\n font-size: var(--tempest-text-md);\n line-height: var(--tempest-leading-relaxed);\n}\n\n.back {\n display: inline-flex;\n align-items: center;\n gap: var(--tempest-space-2);\n min-height: 44px;\n padding: var(--tempest-space-2) var(--tempest-space-3);\n border: 0;\n border-radius: var(--tempest-radius-md);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: var(--tempest-text-md);\n font-weight: var(--tempest-weight-medium);\n text-decoration: none;\n cursor: pointer;\n}\n\n.back:hover {\n text-decoration: underline;\n}\n\n.back:focus-visible {\n outline: var(--tempest-focus-ring-width) solid currentColor;\n outline-offset: var(--tempest-focus-ring-offset);\n}\n\n/* ---------- form panel ---------- */\n.panel {\n display: flex;\n justify-content: center;\n background: var(--tempest-bg);\n}\n\n.sheet {\n display: flex;\n flex-direction: column;\n gap: var(--tempest-space-5);\n width: 100%;\n max-width: 28rem;\n}\n\n.header {\n display: flex;\n flex-direction: column;\n gap: var(--tempest-space-1);\n}\n\n.title {\n margin: 0;\n color: var(--tempest-text);\n font-size: var(--tempest-text-3xl);\n font-weight: var(--tempest-weight-bold);\n line-height: var(--tempest-leading-tight);\n}\n\n.subtitle {\n margin: 0;\n color: var(--tempest-text-muted);\n font-size: var(--tempest-text-md);\n}\n\n.footer {\n color: var(--tempest-text-muted);\n font-size: var(--tempest-text-sm);\n text-align: center;\n}\n\n/* ---------- stacked (below the breakpoint) ---------- */\n.stacked {\n display: flex;\n flex-direction: column;\n background: var(--tempest-auth-page-bg);\n}\n\n.stacked .aside {\n padding: calc(var(--tempest-space-16) + var(--tempest-safe-area-top, 0px))\n var(--tempest-space-5) var(--tempest-space-10);\n}\n\n.stacked .back {\n position: absolute;\n top: calc(var(--tempest-space-3) + var(--tempest-safe-area-top, 0px));\n left: var(--tempest-space-2);\n}\n\n.stacked .panel {\n flex: 1;\n padding: var(--tempest-space-8) var(--tempest-space-5)\n calc(var(--tempest-space-8) + var(--tempest-safe-area-bottom, 0px));\n border-top-left-radius: calc(var(--tempest-radius-2xl) * 2);\n border-top-right-radius: calc(var(--tempest-radius-2xl) * 2);\n}\n\n/* ---------- split (at or above the breakpoint) ---------- */\n.split {\n display: grid;\n grid-template-columns: 1fr 1fr;\n}\n\n.split .aside {\n padding: var(--tempest-space-12);\n background: var(--tempest-auth-page-bg);\n}\n\n.split .back {\n position: absolute;\n top: var(--tempest-space-5);\n left: var(--tempest-space-5);\n}\n\n.split .panel {\n align-items: center;\n padding: var(--tempest-space-12) var(--tempest-space-8);\n}\n\n/* ---------- card (every width) ---------- */\n.card {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--tempest-space-3);\n padding: var(--tempest-space-5);\n background: var(--tempest-auth-page-aside-bg, var(--tempest-surface));\n}\n\n.cardBack {\n width: 100%;\n max-width: 28rem;\n color: var(--tempest-auth-page-aside-fg, var(--tempest-text));\n}\n\n.card .panel {\n width: 100%;\n max-width: 28rem;\n padding: var(--tempest-space-8) var(--tempest-space-6);\n border: 1px solid var(--tempest-border);\n border-radius: var(--tempest-radius-xl);\n box-shadow: var(--tempest-shadow-md);\n}\n\n.cardBrand {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--tempest-space-2);\n color: var(--tempest-primary);\n font-size: var(--tempest-text-2xl);\n font-weight: var(--tempest-weight-bold);\n text-align: center;\n}\n\n.card .header {\n text-align: center;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .back {\n transition: var(--tempest-transition-color);\n }\n}\n"],"mappings":";"}
@@ -0,0 +1,24 @@
1
+ import "../../styles/component/AuthPage.css";
2
+ //#region src/components/AuthPage/AuthPage.module.css
3
+ var e = "tempest_root_7FM9A", t = "tempest_aside_iQvZx", n = "tempest_brand_ucf0I", r = "tempest_asideContent_27MiH", i = "tempest_back_wf1QC", a = "tempest_panel_4yoaM", o = "tempest_sheet_BV27x", s = "tempest_header_fglsK", c = "tempest_title_US-kY", l = "tempest_subtitle_IHFzn", u = "tempest_footer_n5iU8", d = "tempest_stacked_r5S3c", f = "tempest_split_Jd8Ru", p = "tempest_card_DgL6v", m = "tempest_cardBack_911m6", h = "tempest_cardBrand_U9HuK", g = {
4
+ root: e,
5
+ aside: t,
6
+ brand: n,
7
+ asideContent: r,
8
+ back: i,
9
+ panel: a,
10
+ sheet: o,
11
+ header: s,
12
+ title: c,
13
+ subtitle: l,
14
+ footer: u,
15
+ stacked: d,
16
+ split: f,
17
+ card: p,
18
+ cardBack: m,
19
+ cardBrand: h
20
+ };
21
+ //#endregion
22
+ export { t as aside, r as asideContent, i as back, n as brand, p as card, m as cardBack, h as cardBrand, g as default, u as footer, s as header, a as panel, e as root, o as sheet, f as split, d as stacked, l as subtitle, c as title };
23
+
24
+ //# sourceMappingURL=AuthPage.module.js.map