@owlmeans/web-auth-email 0.0.0-stage → 0.1.19

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 (263) hide show
  1. package/README.md +116 -2
  2. package/THIRD-PARTY-NOTICES.txt +24 -0
  3. package/agent-meta/manifest.json +16 -0
  4. package/agent-meta/skills/web-auth-email/SKILL.md +119 -0
  5. package/build/@/components/ui/alert.d.ts +10 -0
  6. package/build/@/components/ui/alert.d.ts.map +1 -0
  7. package/build/@/components/ui/alert.js +26 -0
  8. package/build/@/components/ui/alert.js.map +1 -0
  9. package/build/@/components/ui/button.d.ts +11 -0
  10. package/build/@/components/ui/button.d.ts.map +1 -0
  11. package/build/@/components/ui/button.js +32 -0
  12. package/build/@/components/ui/button.js.map +1 -0
  13. package/build/@/components/ui/card.d.ts +10 -0
  14. package/build/@/components/ui/card.d.ts.map +1 -0
  15. package/build/@/components/ui/card.js +25 -0
  16. package/build/@/components/ui/card.js.map +1 -0
  17. package/build/@/components/ui/input.d.ts +4 -0
  18. package/build/@/components/ui/input.d.ts.map +1 -0
  19. package/build/@/components/ui/input.js +7 -0
  20. package/build/@/components/ui/input.js.map +1 -0
  21. package/build/@/components/ui/label.d.ts +5 -0
  22. package/build/@/components/ui/label.d.ts.map +1 -0
  23. package/build/@/components/ui/label.js +8 -0
  24. package/build/@/components/ui/label.js.map +1 -0
  25. package/build/@/lib/utils.d.ts +3 -0
  26. package/build/@/lib/utils.d.ts.map +1 -0
  27. package/build/@/lib/utils.js +6 -0
  28. package/build/@/lib/utils.js.map +1 -0
  29. package/build/append.d.ts +23 -0
  30. package/build/append.d.ts.map +1 -0
  31. package/build/append.js +49 -0
  32. package/build/append.js.map +1 -0
  33. package/build/components/connected.d.ts +8 -0
  34. package/build/components/connected.d.ts.map +1 -0
  35. package/build/components/connected.js +16 -0
  36. package/build/components/connected.js.map +1 -0
  37. package/build/components/credit.d.ts +5 -0
  38. package/build/components/credit.d.ts.map +1 -0
  39. package/build/components/credit.js +16 -0
  40. package/build/components/credit.js.map +1 -0
  41. package/build/components/fields.d.ts +23 -0
  42. package/build/components/fields.d.ts.map +1 -0
  43. package/build/components/fields.js +39 -0
  44. package/build/components/fields.js.map +1 -0
  45. package/build/components/index.d.ts +9 -0
  46. package/build/components/index.d.ts.map +1 -0
  47. package/build/components/index.js +8 -0
  48. package/build/components/index.js.map +1 -0
  49. package/build/components/offer.d.ts +9 -0
  50. package/build/components/offer.d.ts.map +1 -0
  51. package/build/components/offer.js +99 -0
  52. package/build/components/offer.js.map +1 -0
  53. package/build/components/panel.d.ts +12 -0
  54. package/build/components/panel.d.ts.map +1 -0
  55. package/build/components/panel.js +129 -0
  56. package/build/components/panel.js.map +1 -0
  57. package/build/components/route.d.ts +9 -0
  58. package/build/components/route.d.ts.map +1 -0
  59. package/build/components/route.js +17 -0
  60. package/build/components/route.js.map +1 -0
  61. package/build/components/screen.d.ts +17 -0
  62. package/build/components/screen.d.ts.map +1 -0
  63. package/build/components/screen.js +79 -0
  64. package/build/components/screen.js.map +1 -0
  65. package/build/components/types.d.ts +81 -0
  66. package/build/components/types.d.ts.map +1 -0
  67. package/build/components/types.js +2 -0
  68. package/build/components/types.js.map +1 -0
  69. package/build/consts.d.ts +37 -0
  70. package/build/consts.d.ts.map +1 -0
  71. package/build/consts.js +43 -0
  72. package/build/consts.js.map +1 -0
  73. package/build/entrypoints.d.ts +10 -0
  74. package/build/entrypoints.d.ts.map +1 -0
  75. package/build/entrypoints.js +14 -0
  76. package/build/entrypoints.js.map +1 -0
  77. package/build/hooks/consts.local.d.ts +4 -0
  78. package/build/hooks/consts.local.d.ts.map +1 -0
  79. package/build/hooks/consts.local.js +9 -0
  80. package/build/hooks/consts.local.js.map +1 -0
  81. package/build/hooks/types.d.ts +78 -0
  82. package/build/hooks/types.d.ts.map +1 -0
  83. package/build/hooks/types.js +2 -0
  84. package/build/hooks/types.js.map +1 -0
  85. package/build/hooks/use-email-login.d.ts +13 -0
  86. package/build/hooks/use-email-login.d.ts.map +1 -0
  87. package/build/hooks/use-email-login.js +208 -0
  88. package/build/hooks/use-email-login.js.map +1 -0
  89. package/build/hooks/use-password.d.ts +13 -0
  90. package/build/hooks/use-password.d.ts.map +1 -0
  91. package/build/hooks/use-password.js +118 -0
  92. package/build/hooks/use-password.js.map +1 -0
  93. package/build/hooks/use-translate.d.ts +7 -0
  94. package/build/hooks/use-translate.d.ts.map +1 -0
  95. package/build/hooks/use-translate.js +12 -0
  96. package/build/hooks/use-translate.js.map +1 -0
  97. package/build/i18n/auth/be.json +7 -0
  98. package/build/i18n/auth/de.json +7 -0
  99. package/build/i18n/auth/en.json +7 -0
  100. package/build/i18n/auth/es.json +7 -0
  101. package/build/i18n/auth/fr.json +7 -0
  102. package/build/i18n/auth/pl.json +7 -0
  103. package/build/i18n/auth/ru.json +7 -0
  104. package/build/i18n/auth/uk.json +7 -0
  105. package/build/i18n/be.json +100 -0
  106. package/build/i18n/de.json +100 -0
  107. package/build/i18n/en.json +100 -0
  108. package/build/i18n/es.json +100 -0
  109. package/build/i18n/fr.json +100 -0
  110. package/build/i18n/pl.json +100 -0
  111. package/build/i18n/ru.json +100 -0
  112. package/build/i18n/uk.json +100 -0
  113. package/build/i18n.d.ts +2 -0
  114. package/build/i18n.d.ts.map +1 -0
  115. package/build/i18n.js +40 -0
  116. package/build/i18n.js.map +1 -0
  117. package/build/index.d.ts +23 -0
  118. package/build/index.d.ts.map +1 -0
  119. package/build/index.js +17 -0
  120. package/build/index.js.map +1 -0
  121. package/build/password/types.d.ts +39 -0
  122. package/build/password/types.d.ts.map +1 -0
  123. package/build/password/types.js +2 -0
  124. package/build/password/types.js.map +1 -0
  125. package/build/password.d.ts +4 -0
  126. package/build/password.d.ts.map +1 -0
  127. package/build/password.js +45 -0
  128. package/build/password.js.map +1 -0
  129. package/build/plugin.d.ts +10 -0
  130. package/build/plugin.d.ts.map +1 -0
  131. package/build/plugin.js +21 -0
  132. package/build/plugin.js.map +1 -0
  133. package/build/refusal/consts.local.d.ts +3 -0
  134. package/build/refusal/consts.local.d.ts.map +1 -0
  135. package/build/refusal/consts.local.js +3 -0
  136. package/build/refusal/consts.local.js.map +1 -0
  137. package/build/refusal/types.d.ts +38 -0
  138. package/build/refusal/types.d.ts.map +1 -0
  139. package/build/refusal/types.js +2 -0
  140. package/build/refusal/types.js.map +1 -0
  141. package/build/refusal.d.ts +4 -0
  142. package/build/refusal.d.ts.map +1 -0
  143. package/build/refusal.js +131 -0
  144. package/build/refusal.js.map +1 -0
  145. package/build/service.d.ts +12 -0
  146. package/build/service.d.ts.map +1 -0
  147. package/build/service.js +66 -0
  148. package/build/service.js.map +1 -0
  149. package/build/state/types.d.ts +90 -0
  150. package/build/state/types.d.ts.map +1 -0
  151. package/build/state/types.js +2 -0
  152. package/build/state/types.js.map +1 -0
  153. package/build/state.d.ts +4 -0
  154. package/build/state.d.ts.map +1 -0
  155. package/build/state.js +98 -0
  156. package/build/state.js.map +1 -0
  157. package/build/step.d.ts +16 -0
  158. package/build/step.d.ts.map +1 -0
  159. package/build/step.js +31 -0
  160. package/build/step.js.map +1 -0
  161. package/build/storage/types.d.ts +42 -0
  162. package/build/storage/types.d.ts.map +1 -0
  163. package/build/storage/types.js +2 -0
  164. package/build/storage/types.js.map +1 -0
  165. package/build/storage.d.ts +4 -0
  166. package/build/storage.d.ts.map +1 -0
  167. package/build/storage.js +100 -0
  168. package/build/storage.js.map +1 -0
  169. package/build/types.d.ts +102 -0
  170. package/build/types.d.ts.map +1 -0
  171. package/build/types.js +2 -0
  172. package/build/types.js.map +1 -0
  173. package/build/utils/account.d.ts +4 -0
  174. package/build/utils/account.d.ts.map +1 -0
  175. package/build/utils/account.js +11 -0
  176. package/build/utils/account.js.map +1 -0
  177. package/build/utils/locale.d.ts +6 -0
  178. package/build/utils/locale.d.ts.map +1 -0
  179. package/build/utils/locale.js +10 -0
  180. package/build/utils/locale.js.map +1 -0
  181. package/build/utils/text/types.d.ts +23 -0
  182. package/build/utils/text/types.d.ts.map +1 -0
  183. package/build/utils/text/types.js +2 -0
  184. package/build/utils/text/types.js.map +1 -0
  185. package/build/utils/text.d.ts +4 -0
  186. package/build/utils/text.d.ts.map +1 -0
  187. package/build/utils/text.js +26 -0
  188. package/build/utils/text.js.map +1 -0
  189. package/build/utils.d.ts +8 -0
  190. package/build/utils.d.ts.map +1 -0
  191. package/build/utils.js +9 -0
  192. package/build/utils.js.map +1 -0
  193. package/components.json +21 -0
  194. package/package.json +71 -4
  195. package/src/@/components/ui/alert.tsx +70 -0
  196. package/src/@/components/ui/button.tsx +60 -0
  197. package/src/@/components/ui/card.tsx +93 -0
  198. package/src/@/components/ui/input.tsx +22 -0
  199. package/src/@/components/ui/label.tsx +23 -0
  200. package/src/@/globals.css +57 -0
  201. package/src/@/lib/utils.ts +6 -0
  202. package/src/append.ts +65 -0
  203. package/src/components/connected.tsx +36 -0
  204. package/src/components/credit.tsx +30 -0
  205. package/src/components/fields.tsx +112 -0
  206. package/src/components/index.ts +8 -0
  207. package/src/components/offer.tsx +197 -0
  208. package/src/components/panel.tsx +299 -0
  209. package/src/components/route.tsx +20 -0
  210. package/src/components/screen.tsx +253 -0
  211. package/src/components/types.ts +85 -0
  212. package/src/consts.ts +53 -0
  213. package/src/entrypoints.ts +15 -0
  214. package/src/hooks/consts.local.ts +12 -0
  215. package/src/hooks/types.ts +79 -0
  216. package/src/hooks/use-email-login.ts +234 -0
  217. package/src/hooks/use-password.ts +137 -0
  218. package/src/hooks/use-translate.ts +14 -0
  219. package/src/i18n/auth/be.json +7 -0
  220. package/src/i18n/auth/de.json +7 -0
  221. package/src/i18n/auth/en.json +7 -0
  222. package/src/i18n/auth/es.json +7 -0
  223. package/src/i18n/auth/fr.json +7 -0
  224. package/src/i18n/auth/pl.json +7 -0
  225. package/src/i18n/auth/ru.json +7 -0
  226. package/src/i18n/auth/uk.json +7 -0
  227. package/src/i18n/be.json +100 -0
  228. package/src/i18n/de.json +100 -0
  229. package/src/i18n/en.json +100 -0
  230. package/src/i18n/es.json +100 -0
  231. package/src/i18n/fr.json +100 -0
  232. package/src/i18n/pl.json +100 -0
  233. package/src/i18n/ru.json +100 -0
  234. package/src/i18n/uk.json +100 -0
  235. package/src/i18n.ts +43 -0
  236. package/src/index.ts +22 -0
  237. package/src/password/types.ts +43 -0
  238. package/src/password.ts +65 -0
  239. package/src/plugin.ts +22 -0
  240. package/src/refusal/consts.local.ts +2 -0
  241. package/src/refusal/types.ts +64 -0
  242. package/src/refusal.ts +145 -0
  243. package/src/service.ts +95 -0
  244. package/src/state/types.ts +72 -0
  245. package/src/state.ts +115 -0
  246. package/src/step.ts +38 -0
  247. package/src/storage/types.ts +43 -0
  248. package/src/storage.ts +113 -0
  249. package/src/types.ts +111 -0
  250. package/src/utils/account.ts +12 -0
  251. package/src/utils/locale.ts +11 -0
  252. package/src/utils/text/types.ts +24 -0
  253. package/src/utils/text.ts +34 -0
  254. package/src/utils.ts +9 -0
  255. package/tests/helpers.ts +22 -0
  256. package/tests/i18n.spec.ts +94 -0
  257. package/tests/package-boundary.spec.ts +35 -0
  258. package/tests/password.spec.ts +56 -0
  259. package/tests/refusal.spec.ts +91 -0
  260. package/tests/state.spec.ts +99 -0
  261. package/tests/step.spec.ts +82 -0
  262. package/tests/storage.spec.ts +83 -0
  263. package/tsconfig.json +21 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected.js","sourceRoot":"","sources":["../../src/components/connected.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG1C;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAoC,CAAC,EACtE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,GAClD,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,qBAAqB,EAAE,CAAA;IACnC,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;IAEnD,OAAO,KAAC,aAAa,IACnB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAE,KAAK,CAAC,OAAO,EACxB,SAAS,EAAE,KAAK,CAAC,OAAO,EACxB,QAAQ,EAAE,KAAK,CAAC,MAAM,EACtB,QAAQ,EAAE,KAAK,CAAC,MAAM,EACtB,SAAS,EAAE,SAAS,IAAI,GAAG,EAC3B,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { FC } from 'react';
2
+ import type { EmailLoginCreditProps } from './types.js';
3
+ /** The chooser card's bottom line, composed from the same configuration (`login.credit`, `brand`). */
4
+ export declare const EmailLoginCredit: FC<EmailLoginCreditProps>;
5
+ //# sourceMappingURL=credit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credit.d.ts","sourceRoot":"","sources":["../../src/components/credit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAM/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEvD,sGAAsG;AACtG,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAoBtD,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from '@owlmeans/client';
3
+ import { resolveCredit } from '@owlmeans/client-auth/login';
4
+ import { cn } from '../@/lib/utils.js';
5
+ import { OWLMEANS_URL } from '../consts.js';
6
+ /** The chooser card's bottom line, composed from the same configuration (`login.credit`, `brand`). */
7
+ export const EmailLoginCredit = ({ t, className }) => {
8
+ const ctx = useContext();
9
+ const cfg = ctx.cfg;
10
+ const credit = resolveCredit(cfg.security?.auth?.login?.credit, cfg.brand, ctx.cfg.service);
11
+ if (!credit.poweredBy && credit.line == null) {
12
+ return null;
13
+ }
14
+ return _jsxs("p", { "data-email-login-credit": true, className: cn('text-center text-xs text-muted-foreground', className), children: [credit.poweredBy && _jsx("a", { href: OWLMEANS_URL, target: "_blank", rel: "noopener noreferrer", className: "underline-offset-4 hover:text-foreground hover:underline", children: t('login.powered', 'Powered by OwlMeans') }), credit.poweredBy && credit.line != null && _jsx("span", { "aria-hidden": "true", children: " \u00B7 " }), credit.line != null && _jsx("span", { children: credit.line })] });
15
+ };
16
+ //# sourceMappingURL=credit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credit.js","sourceRoot":"","sources":["../../src/components/credit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3D,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAG3C,sGAAsG;AACtG,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC9E,MAAM,GAAG,GAAG,UAAU,EAAE,CAAA;IACxB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAmB,CAAA;IACnC,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3F,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,8CAA2B,SAAS,EAAE,EAAE,CAAC,2CAA2C,EAAE,SAAS,CAAC,aACpG,MAAM,CAAC,SAAS,IAAI,YACnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,0DAA0D,YAEnE,CAAC,CAAC,eAAe,EAAE,qBAAqB,CAAC,GACxC,EACH,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,8BAAkB,MAAM,yBAAW,EAC9E,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,yBAAO,MAAM,CAAC,IAAI,GAAQ,IAChD,CAAA;AACN,CAAC,CAAA"}
@@ -0,0 +1,23 @@
1
+ import type { FC } from 'react';
2
+ import type { CaptchaNoticeProps, PasswordInputProps, PinInputProps, RefusalAlertProps, SubmitButtonProps } from './types.js';
3
+ /**
4
+ * A password field with its show/hide toggle inside the box. The toggle is a real button with an
5
+ * accessible name that says what it will do, and a 44px target.
6
+ */
7
+ export declare const PasswordInput: FC<PasswordInputProps>;
8
+ /** The PIN field: numeric keypad on a phone, the mailed code offered by the keyboard's autofill. */
9
+ export declare const PinInput: FC<PinInputProps>;
10
+ /**
11
+ * The step's primary action. Never the HTML `disabled` attribute: a disabled button swallows the
12
+ * press and tells nobody anything, so a blocked or busy action carries `aria-disabled` and its
13
+ * handler explains (or ignores the second press).
14
+ */
15
+ export declare const SubmitButton: FC<SubmitButtonProps>;
16
+ /** A refusal in the reader's language, announced as it appears. */
17
+ export declare const RefusalAlert: FC<RefusalAlertProps>;
18
+ /**
19
+ * Google's notice. The loader hides the reCAPTCHA badge, and a page that hides it has to say this
20
+ * itself, with both links.
21
+ */
22
+ export declare const CaptchaNotice: FC<CaptchaNoticeProps>;
23
+ //# sourceMappingURL=fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/components/fields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAQ/B,OAAO,KAAK,EACV,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAC5F,MAAM,YAAY,CAAA;AAEnB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAyBhD,CAAA;AAED,oGAAoG;AACpG,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAUtC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAY9C,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CASzC,CAAA;AAEN;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAoBhD,CAAA"}
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Eye, EyeOff, Loader2 } from 'lucide-react';
3
+ import { Button } from '../@/components/ui/button.js';
4
+ import { Input } from '../@/components/ui/input.js';
5
+ import { cn } from '../@/lib/utils.js';
6
+ import { RECAPTCHA_PRIVACY_URL, RECAPTCHA_TERMS_URL } from '../consts.js';
7
+ import { emailRefusalHelper } from '../refusal.js';
8
+ import { textUtils } from '../utils/text.js';
9
+ /**
10
+ * A password field with its show/hide toggle inside the box. The toggle is a real button with an
11
+ * accessible name that says what it will do, and a 44px target.
12
+ */
13
+ export const PasswordInput = ({ reveal, onReveal, showLabel, hideLabel, toggleProps, className, ...props }) => (_jsxs("div", { className: "relative", children: [_jsx(Input, { ...props, type: reveal ? 'text' : 'password', autoCapitalize: "none", autoCorrect: "off", spellCheck: false, className: cn('h-11 pr-12 text-base', className) }), _jsx(Button, { type: "button", variant: "ghost", ...toggleProps, "aria-label": reveal ? hideLabel : showLabel, "aria-pressed": reveal, title: reveal ? hideLabel : showLabel, className: "absolute inset-y-0 right-0 h-11 w-11 rounded-l-none text-muted-foreground hover:text-foreground", onClick: () => onReveal(!reveal), children: reveal ? _jsx(EyeOff, { "aria-hidden": true }) : _jsx(Eye, { "aria-hidden": true }) })] }));
14
+ /** The PIN field: numeric keypad on a phone, the mailed code offered by the keyboard's autofill. */
15
+ export const PinInput = ({ length, className, ...props }) => (_jsx(Input, { ...props, type: "text", inputMode: "numeric", autoComplete: "one-time-code", pattern: "[0-9]*", maxLength: length, className: cn('h-12 text-center font-mono text-2xl tracking-[0.4em]', className) }));
16
+ /**
17
+ * The step's primary action. Never the HTML `disabled` attribute: a disabled button swallows the
18
+ * press and tells nobody anything, so a blocked or busy action carries `aria-disabled` and its
19
+ * handler explains (or ignores the second press).
20
+ */
21
+ export const SubmitButton = ({ busy, blocked = false, className, children, ...props }) => (_jsxs(Button, { type: "submit", ...props, "aria-disabled": busy || blocked || undefined, "aria-busy": busy || undefined, "data-blocked": blocked ? 'true' : undefined, className: cn('h-11 w-full gap-2 text-base', (busy || blocked) && 'opacity-60', className), children: [busy && _jsx(Loader2, { className: "animate-spin", "aria-hidden": true }), children] }));
22
+ /** A refusal in the reader's language, announced as it appears. */
23
+ export const RefusalAlert = ({ refusal, t, locale, marker, className }) => refusal == null
24
+ ? null
25
+ : _jsx("p", { role: "alert", [marker]: '', "data-refusal": refusal.kind, className: cn('text-center text-sm text-destructive', className), children: emailRefusalHelper.messageOf(refusal, t, locale) });
26
+ /**
27
+ * Google's notice. The loader hides the reCAPTCHA badge, and a page that hides it has to say this
28
+ * itself, with both links.
29
+ */
30
+ export const CaptchaNotice = ({ t, className }) => {
31
+ const parts = textUtils.parts(t('captcha.notice', 'This site is protected by reCAPTCHA and the Google {{privacy}} and {{terms}} apply.'), {
32
+ privacy: { text: t('captcha.privacy', 'Privacy Policy'), href: RECAPTCHA_PRIVACY_URL },
33
+ terms: { text: t('captcha.terms', 'Terms of Service'), href: RECAPTCHA_TERMS_URL },
34
+ });
35
+ return _jsx("p", { "data-email-login-captcha": true, className: cn('text-center text-xs text-muted-foreground', className), children: parts.map((part, index) => part.href != null
36
+ ? _jsx("a", { href: part.href, target: "_blank", rel: "noopener noreferrer", className: "underline underline-offset-2 hover:text-foreground", children: part.text }, index)
37
+ : _jsx("span", { children: part.text }, index)) });
38
+ };
39
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/components/fields.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAK5C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EACpD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,EACzE,EAAE,EAAE,CAAC,CACJ,eAAK,SAAS,EAAC,UAAU,aACvB,KAAC,KAAK,OACA,KAAK,EACT,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,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I,IAAI;YAC3C,CAAC,CAAC,YAEA,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,oDAAoD,YAC9D,IAAI,CAAC,IAAI,IALJ,KAAK,CAKI;YAChB,CAAC,CAAC,yBAAmB,IAAI,CAAC,IAAI,IAAjB,KAAK,CAAoB,CAAC,GACvC,CAAA;AACN,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ export * from './screen.js';
2
+ export * from './route.js';
3
+ export * from './offer.js';
4
+ export * from './panel.js';
5
+ export * from './connected.js';
6
+ export * from './fields.js';
7
+ export * from './credit.js';
8
+ export type * from './types.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './screen.js';
2
+ export * from './route.js';
3
+ export * from './offer.js';
4
+ export * from './panel.js';
5
+ export * from './connected.js';
6
+ export * from './fields.js';
7
+ export * from './credit.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { RoutedComponent } from '@owlmeans/client';
2
+ /**
3
+ * The post-sign-in offer: "Set a password for faster sign-in", right after a PIN sign-in of a
4
+ * person who has none and never declined one. The fresh sign-in's one-use ticket confirms it — no
5
+ * second PIN. "Not now" declines (the step is not offered again); both answers forget the ticket
6
+ * and move the sign-in on to the next step or the landing.
7
+ */
8
+ export declare const PasswordOfferScreen: RoutedComponent;
9
+ //# sourceMappingURL=offer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["../../src/components/offer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAwBvD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAqKjC,CAAA"}
@@ -0,0 +1,99 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useId, useMemo, useRef, useState } from 'react';
3
+ import { useContext } from '@owlmeans/client';
4
+ import { useLanguage } from '@owlmeans/client-i18n';
5
+ import { useContinueLogin } from '@owlmeans/client-auth/login';
6
+ import { EMAIL_LOGIN_SERVICE, EMAIL_PASSWORD_MAX_LENGTH, EMAIL_PASSWORD_MIN_LENGTH, } from '@owlmeans/auth-email';
7
+ import { logger } from '@owlmeans/log';
8
+ import { Button } from '../@/components/ui/button.js';
9
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../@/components/ui/card.js';
10
+ import { Label } from '../@/components/ui/label.js';
11
+ import { EMAIL_OFFER_LOGIN_STEP } from '../consts.js';
12
+ import { useEmailAuthTranslate } from '../hooks/use-translate.js';
13
+ import { passwordPanelHelper } from '../password.js';
14
+ import { emailRefusalHelper } from '../refusal.js';
15
+ import { emailStorageHelper } from '../storage.js';
16
+ import { textUtils } from '../utils/text.js';
17
+ import { signedInAccount } from '../utils/account.js';
18
+ import { PasswordInput, RefusalAlert, SubmitButton } from './fields.js';
19
+ const log = logger('auth-email');
20
+ /**
21
+ * The post-sign-in offer: "Set a password for faster sign-in", right after a PIN sign-in of a
22
+ * person who has none and never declined one. The fresh sign-in's one-use ticket confirms it — no
23
+ * second PIN. "Not now" declines (the step is not offered again); both answers forget the ticket
24
+ * and move the sign-in on to the next step or the landing.
25
+ */
26
+ export const PasswordOfferScreen = () => {
27
+ const t = useEmailAuthTranslate();
28
+ const [locale] = useLanguage();
29
+ const ctx = useContext();
30
+ const continueLogin = useContinueLogin();
31
+ const id = useId();
32
+ const client = ctx.service(EMAIL_LOGIN_SERVICE);
33
+ const ticket = useMemo(() => emailStorageHelper.offer(signedInAccount(ctx)), [ctx]);
34
+ const [password, setPassword] = useState('');
35
+ const [repeat, setRepeat] = useState('');
36
+ const [reveal, setReveal] = useState(false);
37
+ const [busy, setBusy] = useState(null);
38
+ const [refusal, setRefusal] = useState(null);
39
+ const advanced = useRef(false);
40
+ const advance = async () => {
41
+ if (advanced.current) {
42
+ return;
43
+ }
44
+ advanced.current = true;
45
+ emailStorageHelper.dropOffer();
46
+ await continueLogin({ after: EMAIL_OFFER_LOGIN_STEP });
47
+ };
48
+ // Nothing to offer on this visit (a reload after the answer, an expired ticket): move on.
49
+ useEffect(() => {
50
+ if (ticket == null) {
51
+ void advance();
52
+ }
53
+ }, [ticket]);
54
+ const save = async (event) => {
55
+ event?.preventDefault();
56
+ if (busy != null || ticket == null) {
57
+ return;
58
+ }
59
+ const block = passwordPanelHelper.passwordBlock(password, repeat);
60
+ if (block != null) {
61
+ setRefusal(block);
62
+ return;
63
+ }
64
+ setBusy('save');
65
+ setRefusal(null);
66
+ try {
67
+ await client.setPassword({ password, offer: ticket, device: emailStorageHelper.deviceId() });
68
+ await advance();
69
+ }
70
+ catch (error) {
71
+ const next = emailRefusalHelper.refusalOf(error, 'offer');
72
+ log.debug('Password offer refused', { kind: next.kind });
73
+ if (next.kind === 'offer-expired') {
74
+ emailStorageHelper.dropOffer();
75
+ }
76
+ setRefusal(next);
77
+ setBusy(null);
78
+ }
79
+ };
80
+ const skip = async () => {
81
+ if (busy != null) {
82
+ return;
83
+ }
84
+ setBusy('skip');
85
+ try {
86
+ await client.declinePassword();
87
+ }
88
+ catch (error) {
89
+ // Declining is a courtesy to the next sign-in; failing it must not hold this one up.
90
+ log.debug('Password offer decline failed', { kind: emailRefusalHelper.refusalOf(error, 'offer').kind });
91
+ }
92
+ await advance();
93
+ };
94
+ const mismatch = refusal?.kind === 'mismatch';
95
+ return _jsx("div", { "data-email-offer-screen": true, style: { minHeight: '100dvh' }, className: "flex w-full items-center justify-center p-4", children: _jsxs(Card, { "data-email-offer": true, "data-state": ticket == null ? 'leaving' : busy ?? 'ready', className: "w-full max-w-sm", children: [_jsxs(CardHeader, { className: "items-center gap-2 text-center", children: [_jsx(CardTitle, { className: "text-xl", children: t('offer.title', 'Set a password for faster sign-in') }), _jsx(CardDescription, { children: t('offer.description', 'Next time, sign in with your email and password instead of waiting for a code.') })] }), _jsx(CardContent, { children: _jsxs("form", { noValidate: true, onSubmit: event => void save(event), className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2 text-left", children: [_jsx(Label, { htmlFor: `${id}-password`, children: t('offer.password-label', 'New password') }), _jsx(PasswordInput, { id: `${id}-password`, name: "new-password", "data-email-offer-password": true, autoComplete: "new-password", autoFocus: true, maxLength: EMAIL_PASSWORD_MAX_LENGTH, value: password, readOnly: busy != null, "aria-invalid": refusal?.kind === 'weak' || refusal?.kind === 'password-empty' || undefined, "aria-describedby": `${id}-hint`, reveal: reveal, onReveal: setReveal, showLabel: t('login.show-password', 'Show password'), hideLabel: t('login.hide-password', 'Hide password'), toggleProps: { 'data-email-offer-toggle': '' }, onChange: event => { setPassword(event.target.value); setRefusal(null); } }), _jsx("p", { id: `${id}-hint`, className: "text-xs text-muted-foreground", children: textUtils.fill(t('offer.hint', '{{min}} to {{max}} characters.'), {
96
+ min: EMAIL_PASSWORD_MIN_LENGTH, max: EMAIL_PASSWORD_MAX_LENGTH,
97
+ }) })] }), _jsxs("div", { className: "flex flex-col gap-2 text-left", children: [_jsx(Label, { htmlFor: `${id}-repeat`, children: t('offer.repeat-label', 'Repeat the password') }), _jsx(PasswordInput, { id: `${id}-repeat`, name: "repeat-password", "data-email-offer-repeat": true, autoComplete: "new-password", maxLength: EMAIL_PASSWORD_MAX_LENGTH, value: repeat, readOnly: busy != null, "aria-invalid": mismatch || undefined, reveal: reveal, onReveal: setReveal, showLabel: t('login.show-password', 'Show password'), hideLabel: t('login.hide-password', 'Hide password'), onChange: event => { setRepeat(event.target.value); setRefusal(null); } })] }), _jsx(RefusalAlert, { refusal: refusal, t: t, locale: locale, marker: "data-email-offer-error" }), _jsx(SubmitButton, { "data-email-offer-save": true, busy: busy === 'save', blocked: ticket == null || passwordPanelHelper.passwordBlock(password, repeat) != null, children: busy === 'save' ? t('offer.saving', 'Saving…') : t('offer.save', 'Save password') }), _jsx(Button, { type: "button", variant: "outline", "data-email-offer-skip": true, "aria-disabled": busy != null || undefined, "aria-busy": busy === 'skip' || undefined, className: "h-11 w-full text-base", onClick: () => void skip(), children: t('offer.skip', 'Not now') }), _jsx("p", { className: "text-center text-xs text-muted-foreground", children: t('offer.later', 'You can always set a password later in your account settings.') })] }) })] }) });
98
+ };
99
+ //# sourceMappingURL=offer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer.js","sourceRoot":"","sources":["../../src/components/offer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EACL,mBAAmB,EAAE,yBAAyB,EAAE,yBAAyB,GAC1E,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAA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AAI,IAAI,IAAI,mBAAmB,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,YAErF,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,GACrE,EACf,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,SAAS,kDAEF,IAAI,IAAI,IAAI,IAAI,SAAS,eAC7B,IAAI,KAAK,MAAM,IAAI,SAAS,EACvC,SAAS,EAAC,uBAAuB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,YAEzB,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,GACpB,EACT,YAAG,SAAS,EAAC,2CAA2C,YACrD,CAAC,CAAC,aAAa,EAAE,+DAA+D,CAAC,GAChF,IACC,GACK,IACT,GACH,CAAA;AACR,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { type FC } from 'react';
2
+ import type { PasswordPanelProps } from './types.js';
3
+ /**
4
+ * The account's password: off on this deployment (a short notice), none yet (Set), or one (Change,
5
+ * Remove). Every action is confirmed by a PIN mailed to the account's own address: "Send code",
6
+ * then the code (and the new password, twice, for set and change), then Confirm.
7
+ *
8
+ * Presentational by contract — it performs no I/O, renders what it is given and reports what was
9
+ * pressed. `ConnectedPasswordPanel` is this panel wired to `usePassword`.
10
+ */
11
+ export declare const PasswordPanel: FC<PasswordPanelProps>;
12
+ //# sourceMappingURL=panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/components/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAA;AAahE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAoBpD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAiQhD,CAAA"}
@@ -0,0 +1,129 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId, useState } from 'react';
3
+ import { Loader2 } from 'lucide-react';
4
+ import { EMAIL_PASSWORD_MAX_LENGTH, EMAIL_PIN_LENGTH } from '@owlmeans/auth-email';
5
+ import { Button } from '../@/components/ui/button.js';
6
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../@/components/ui/card.js';
7
+ import { Label } from '../@/components/ui/label.js';
8
+ import { cn } from '../@/lib/utils.js';
9
+ import { passwordPanelHelper } from '../password.js';
10
+ import { textUtils } from '../utils/text.js';
11
+ import { PasswordInput, PinInput, RefusalAlert, SubmitButton } from './fields.js';
12
+ const english = (_key, defaultValue) => defaultValue;
13
+ /** A record's moment in the reader's language, or null when it has none worth showing. */
14
+ const dateOf = (value, locale) => {
15
+ if (value == null) {
16
+ return null;
17
+ }
18
+ const date = new Date(value);
19
+ if (Number.isNaN(date.getTime())) {
20
+ return null;
21
+ }
22
+ try {
23
+ return new Intl.DateTimeFormat(locale, { dateStyle: 'medium' }).format(date);
24
+ }
25
+ catch {
26
+ return date.toISOString().slice(0, 10);
27
+ }
28
+ };
29
+ /**
30
+ * The account's password: off on this deployment (a short notice), none yet (Set), or one (Change,
31
+ * Remove). Every action is confirmed by a PIN mailed to the account's own address: "Send code",
32
+ * then the code (and the new password, twice, for set and change), then Confirm.
33
+ *
34
+ * Presentational by contract — it performs no I/O, renders what it is given and reports what was
35
+ * pressed. `ConnectedPasswordPanel` is this panel wired to `usePassword`.
36
+ */
37
+ export const PasswordPanel = ({ status, loading = false, busy = false, pending = null, refusal = null, done = null, onSendPin, onConfirm, onCancel, onReload, title, description, translate, locale, className, }) => {
38
+ const t = translate ?? english;
39
+ const id = useId();
40
+ const [action, setAction] = useState(null);
41
+ const [pin, setPin] = useState('');
42
+ const [password, setPassword] = useState('');
43
+ const [repeat, setRepeat] = useState('');
44
+ const [reveal, setReveal] = useState(false);
45
+ const [local, setLocal] = useState(null);
46
+ const state = passwordPanelHelper.stateOf(status, loading);
47
+ const actions = passwordPanelHelper.actionsOf(status);
48
+ const sent = action != null && pending === passwordPanelHelper.purposeOf(action);
49
+ const withPassword = action != null && passwordPanelHelper.needsPassword(action);
50
+ const shown = local ?? refusal;
51
+ const reset = () => {
52
+ setAction(null);
53
+ setPin('');
54
+ setPassword('');
55
+ setRepeat('');
56
+ setReveal(false);
57
+ setLocal(null);
58
+ };
59
+ const open = (next) => {
60
+ reset();
61
+ setAction(next);
62
+ if (pending != null) {
63
+ onCancel();
64
+ }
65
+ };
66
+ const close = () => {
67
+ reset();
68
+ onCancel();
69
+ };
70
+ const send = async () => {
71
+ if (action == null || busy) {
72
+ return;
73
+ }
74
+ setLocal(null);
75
+ setPin('');
76
+ await onSendPin(passwordPanelHelper.purposeOf(action));
77
+ };
78
+ const submit = async (event) => {
79
+ event.preventDefault();
80
+ if (action == null || busy) {
81
+ return;
82
+ }
83
+ if (!sent) {
84
+ await send();
85
+ return;
86
+ }
87
+ const block = passwordPanelHelper.confirmBlock(action, { pin, password, repeat });
88
+ if (block != null) {
89
+ setLocal(block);
90
+ return;
91
+ }
92
+ setLocal(null);
93
+ if (await onConfirm(action, withPassword ? { pin, password } : { pin })) {
94
+ reset();
95
+ }
96
+ };
97
+ const updated = state === 'set' ? dateOf(status?.updatedAt, locale) : null;
98
+ const control = 'h-11 text-base';
99
+ const summary = (() => {
100
+ switch (state) {
101
+ case 'loading':
102
+ return _jsxs("p", { role: "status", className: "flex items-center gap-2 text-sm text-muted-foreground", children: [_jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": true }), t('password.loading', 'Loading…')] });
103
+ case 'unreadable':
104
+ return _jsxs("div", { className: "flex flex-col items-start gap-1 text-sm", children: [_jsx("p", { className: "text-destructive", children: t('password.unreadable', "We couldn't load your password settings.") }), onReload != null && _jsx(Button, { type: "button", variant: "link", "data-email-password-retry": true, className: "h-11 px-0", onClick: () => void onReload(), children: t('password.retry', 'Try again') })] });
105
+ case 'off':
106
+ return _jsx("p", { "data-email-password-notice": true, className: "text-sm text-muted-foreground", children: t('password.off', 'Password sign-in is not available here. Sign in with a code sent to your email.') });
107
+ case 'unset':
108
+ return _jsx("p", { className: "text-sm", children: t('password.unset', "You don't have a password yet. You sign in with a code sent to your email.") });
109
+ default:
110
+ return _jsxs("p", { className: "text-sm", children: [t('password.set', 'You have a password.'), updated != null && _jsxs(_Fragment, { children: [" ", textUtils.fill(t('password.updated', 'Last changed {{date}}.'), { date: updated })] })] });
111
+ }
112
+ })();
113
+ return _jsxs(Card, { "data-email-password-panel": true, "data-state": state, className: className, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: title ?? t('password.title', 'Password') }), _jsx(CardDescription, { children: description ?? t('password.description', 'Sign in with your email and a password instead of a code.') })] }), _jsxs(CardContent, { className: "flex flex-col gap-4", children: [summary, done != null && action == null && _jsxs("p", { role: "status", "data-email-password-success": done, className: "text-sm", children: [done === 'remove'
114
+ ? t('password.done.remove', 'Your password has been removed.')
115
+ : done === 'change'
116
+ ? t('password.done.change', 'Your password has been changed.')
117
+ : t('password.done.set', 'Your password has been set.'), ' ', t('password.devices', 'Other devices will need a code the next time they sign in.')] }), action == null && actions.length > 0 && _jsx("div", { className: "flex flex-col gap-2 sm:flex-row", children: actions.map(next => _jsx(Button, { type: "button", variant: "outline", "data-email-password-action": next, className: cn(control, next === 'remove' && 'text-destructive hover:text-destructive'), onClick: () => open(next), children: next === 'remove'
118
+ ? t('password.action.remove', 'Remove password')
119
+ : next === 'change'
120
+ ? t('password.action.change', 'Change password')
121
+ : t('password.action.set', 'Set a password') }, next)) }), action != null && _jsxs("form", { noValidate: true, "data-email-password-form": action, "data-sent": sent ? 'true' : undefined, className: "flex flex-col gap-4", onSubmit: event => void submit(event), children: [_jsx("p", { className: "text-sm text-muted-foreground", children: action === 'remove'
122
+ ? t('password.explain.remove', "Without a password you sign in with a code sent to your email. We'll email you a code to confirm.")
123
+ : action === 'change'
124
+ ? t('password.explain.change', "To change your password, confirm it's you with a code we'll email you.")
125
+ : t('password.explain.set', "To set a password, confirm it's you with a code we'll email you.") }), sent && _jsxs(_Fragment, { children: [_jsx("p", { role: "status", "data-email-password-sent": true, className: "text-sm", children: t('password.sent', 'We sent a code to your email.') }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: `${id}-pin`, children: t('password.pin-label', 'Code from the email') }), _jsx(PinInput, { id: `${id}-pin`, name: "pin", "data-email-password-pin": true, length: EMAIL_PIN_LENGTH, value: pin, readOnly: busy, autoFocus: true, "aria-invalid": shown?.kind === 'code' || shown?.kind === 'pin-format' || undefined, className: "max-w-60", onChange: event => { setPin(event.target.value.replace(/\D/g, '').slice(0, EMAIL_PIN_LENGTH)); setLocal(null); } })] }), withPassword && _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: `${id}-new`, children: t('password.new-label', 'New password') }), _jsx(PasswordInput, { id: `${id}-new`, name: "new-password", "data-email-password-new": true, autoComplete: "new-password", maxLength: EMAIL_PASSWORD_MAX_LENGTH, value: password, readOnly: busy, "aria-invalid": shown?.kind === 'weak' || shown?.kind === 'password-empty' || undefined, reveal: reveal, onReveal: setReveal, showLabel: t('login.show-password', 'Show password'), hideLabel: t('login.hide-password', 'Hide password'), toggleProps: { 'data-email-password-toggle': '' }, onChange: event => { setPassword(event.target.value); setLocal(null); } })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: `${id}-repeat`, children: t('password.repeat-label', 'Repeat the password') }), _jsx(PasswordInput, { id: `${id}-repeat`, name: "repeat-password", "data-email-password-repeat": true, autoComplete: "new-password", maxLength: EMAIL_PASSWORD_MAX_LENGTH, value: repeat, readOnly: busy, "aria-invalid": shown?.kind === 'mismatch' || undefined, reveal: reveal, onReveal: setReveal, showLabel: t('login.show-password', 'Show password'), hideLabel: t('login.hide-password', 'Hide password'), onChange: event => { setRepeat(event.target.value); setLocal(null); } })] })] })] }), _jsx(RefusalAlert, { refusal: shown, t: t, locale: locale, marker: "data-email-password-error", className: "text-left" }), _jsxs("div", { className: "flex flex-col gap-2 sm:flex-row", children: [sent
126
+ ? _jsx(SubmitButton, { "data-email-password-confirm": true, busy: busy, blocked: passwordPanelHelper.confirmBlock(action, { pin, password, repeat }) != null, className: "sm:w-auto", children: busy ? t('password.confirming', 'Saving…') : t('password.confirm', 'Confirm') })
127
+ : _jsx(SubmitButton, { "data-email-password-send": true, busy: busy, className: "sm:w-auto", children: busy ? t('password.sending', 'Sending…') : t('password.send', 'Send code') }), sent && _jsx(Button, { type: "button", variant: "link", "data-email-password-resend": true, "aria-disabled": busy || undefined, className: control, onClick: () => void send(), children: t('password.resend', 'Send a new code') }), _jsx(Button, { type: "button", variant: "ghost", "data-email-password-cancel": true, className: control, onClick: close, children: t('password.cancel', 'Cancel') })] })] })] })] });
128
+ };
129
+ //# sourceMappingURL=panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel.js","sourceRoot":"","sources":["../../src/components/panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAA2B,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtG,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE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C,eAAe,EAAE,WAAW,CAAC,GAC9D,EAChB,IAAI,IAAI,KAAC,MAAM,IACd,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,MAAM,uDAEC,IAAI,IAAI,SAAS,EAChC,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,YAEzB,CAAC,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GACjC,EACT,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,OAAO,sCAEf,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,KAAK,YAEb,CAAC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,GACxB,IACL,IACD,IACK,IACT,CAAA;AACT,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { FC } from 'react';
2
+ import type { AuthenticationRendererProps } from '@owlmeans/client-auth/manager';
3
+ /**
4
+ * What the e-mail method's authentication route renders: the screen registered for this context
5
+ * (`appendEmailLogin({ screen })`, or a replacement from `registerEmailLoginScreen`), else the
6
+ * package's own.
7
+ */
8
+ export declare const EmailLoginRoute: FC<Partial<AuthenticationRendererProps>>;
9
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../src/components/route.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAKhF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAOpE,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from '@owlmeans/client';
3
+ import { EMAIL_LOGIN_SERVICE } from '@owlmeans/auth-email';
4
+ import { LocalizedEmailLoginScreen } from './screen.js';
5
+ /**
6
+ * What the e-mail method's authentication route renders: the screen registered for this context
7
+ * (`appendEmailLogin({ screen })`, or a replacement from `registerEmailLoginScreen`), else the
8
+ * package's own.
9
+ */
10
+ export const EmailLoginRoute = () => {
11
+ const ctx = useContext();
12
+ const Screen = ctx.hasService(EMAIL_LOGIN_SERVICE)
13
+ ? ctx.service(EMAIL_LOGIN_SERVICE).screen() ?? LocalizedEmailLoginScreen
14
+ : LocalizedEmailLoginScreen;
15
+ return _jsx(Screen, {});
16
+ };
17
+ //# sourceMappingURL=route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/components/route.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6C,GAAG,EAAE;IAC5E,MAAM,GAAG,GAAG,UAAU,EAAE,CAAA;IACxB,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC;QAChD,CAAC,CAAC,GAAG,CAAC,OAAO,CAA0B,mBAAmB,CAAC,CAAC,MAAM,EAAE,IAAI,yBAAyB;QACjG,CAAC,CAAC,yBAAyB,CAAA;IAE7B,OAAO,KAAC,MAAM,KAAG,CAAA;AACnB,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { type FC } from 'react';
2
+ import type { EmailLoginScreenProps } from '../types.js';
3
+ /**
4
+ * The e-mail sign-in card — the chooser card's twin (`@owlmeans/web-panel`'s `LoginScreen`): the
5
+ * same centred card, logo, title, subtitle and footer slot, the same inline viewport height.
6
+ *
7
+ * Three steps share it: the address ("Receive authentication PIN code"), the mailed PIN, and — only
8
+ * where the deployment offers passwords — the address with a password. Enter submits the step on
9
+ * screen. Nothing on it is ever natively `disabled`.
10
+ *
11
+ * Pure with respect to i18n: `translate` is a prop (English without it), `locale` too.
12
+ * `LocalizedEmailLoginScreen` binds both to the application's own.
13
+ */
14
+ export declare const EmailLoginScreen: FC<EmailLoginScreenProps>;
15
+ /** {@link EmailLoginScreen} bound to the application's own translations and language. */
16
+ export declare const LocalizedEmailLoginScreen: FC<EmailLoginScreenProps>;
17
+ //# sourceMappingURL=screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/components/screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAA;AAatE,OAAO,KAAK,EAAE,qBAAqB,EAAa,MAAM,aAAa,CAAA;AAMnE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsNtD,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,qBAAqB,CAK/D,CAAA"}