@openwarelabs/blocks 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -10
- package/dist/app-shells/Shell01/Shell01.d.cts +6 -0
- package/dist/app-shells/Shell01/Shell01.d.ts +6 -0
- package/dist/app-shells/Shell01/Shell01.types.d.cts +48 -0
- package/dist/app-shells/Shell01/Shell01.types.d.ts +48 -0
- package/dist/app-shells/Shell02/Shell02.d.cts +7 -0
- package/dist/app-shells/Shell02/Shell02.d.ts +7 -0
- package/dist/app-shells/Shell02/Shell02.types.d.cts +50 -0
- package/dist/app-shells/Shell02/Shell02.types.d.ts +50 -0
- package/dist/app-shells/Shell03/Shell03.d.cts +6 -0
- package/dist/app-shells/Shell03/Shell03.d.ts +6 -0
- package/dist/app-shells/Shell03/Shell03.types.d.cts +73 -0
- package/dist/app-shells/Shell03/Shell03.types.d.ts +73 -0
- package/dist/app-shells/Shell04/Shell04.d.cts +6 -0
- package/dist/app-shells/Shell04/Shell04.d.ts +6 -0
- package/dist/app-shells/Shell04/Shell04.types.d.cts +68 -0
- package/dist/app-shells/Shell04/Shell04.types.d.ts +68 -0
- package/dist/blog/Blog01/Blog01.d.cts +3 -0
- package/dist/blog/Blog01/Blog01.d.ts +3 -0
- package/dist/blog/Blog01/Blog01.types.d.cts +55 -0
- package/dist/blog/Blog01/Blog01.types.d.ts +55 -0
- package/dist/blog/Blog02/Blog02.d.cts +3 -0
- package/dist/blog/Blog02/Blog02.d.ts +3 -0
- package/dist/blog/Blog02/Blog02.types.d.cts +51 -0
- package/dist/blog/Blog02/Blog02.types.d.ts +51 -0
- package/dist/blog/Blog03/Blog03.d.cts +3 -0
- package/dist/blog/Blog03/Blog03.d.ts +3 -0
- package/dist/blog/Blog03/Blog03.types.d.cts +66 -0
- package/dist/blog/Blog03/Blog03.types.d.ts +66 -0
- package/dist/blog/Blog04/Blog04.d.cts +3 -0
- package/dist/blog/Blog04/Blog04.d.ts +3 -0
- package/dist/blog/Blog04/Blog04.types.d.cts +64 -0
- package/dist/blog/Blog04/Blog04.types.d.ts +64 -0
- package/dist/chat/Chat01/Chat01.d.cts +6 -0
- package/dist/chat/Chat01/Chat01.d.ts +6 -0
- package/dist/chat/Chat01/Chat01.types.d.cts +95 -0
- package/dist/chat/Chat01/Chat01.types.d.ts +95 -0
- package/dist/chat/Chat02/Chat02.d.cts +6 -0
- package/dist/chat/Chat02/Chat02.d.ts +6 -0
- package/dist/chat/Chat02/Chat02.types.d.cts +70 -0
- package/dist/chat/Chat02/Chat02.types.d.ts +70 -0
- package/dist/chat/Chat03/Chat03.d.cts +6 -0
- package/dist/chat/Chat03/Chat03.d.ts +6 -0
- package/dist/chat/Chat03/Chat03.types.d.cts +96 -0
- package/dist/chat/Chat03/Chat03.types.d.ts +96 -0
- package/dist/contact/Contact01/Contact01.d.cts +3 -0
- package/dist/contact/Contact01/Contact01.d.ts +3 -0
- package/dist/contact/Contact01/Contact01.types.d.cts +103 -0
- package/dist/contact/Contact01/Contact01.types.d.ts +103 -0
- package/dist/contact/Contact02/Contact02.d.cts +3 -0
- package/dist/contact/Contact02/Contact02.d.ts +3 -0
- package/dist/contact/Contact02/Contact02.types.d.cts +56 -0
- package/dist/contact/Contact02/Contact02.types.d.ts +56 -0
- package/dist/dashboards/Dashboard01/Dashboard01.d.cts +3 -0
- package/dist/dashboards/Dashboard01/Dashboard01.d.ts +3 -0
- package/dist/dashboards/Dashboard01/Dashboard01.types.d.cts +53 -0
- package/dist/dashboards/Dashboard01/Dashboard01.types.d.ts +53 -0
- package/dist/dashboards/Dashboard02/Dashboard02.d.cts +3 -0
- package/dist/dashboards/Dashboard02/Dashboard02.d.ts +3 -0
- package/dist/dashboards/Dashboard02/Dashboard02.types.d.cts +74 -0
- package/dist/dashboards/Dashboard02/Dashboard02.types.d.ts +74 -0
- package/dist/dashboards/Dashboard03/Dashboard03.d.cts +6 -0
- package/dist/dashboards/Dashboard03/Dashboard03.d.ts +6 -0
- package/dist/dashboards/Dashboard03/Dashboard03.types.d.cts +131 -0
- package/dist/dashboards/Dashboard03/Dashboard03.types.d.ts +131 -0
- package/dist/empty-states/Empty01/Empty01.d.cts +3 -0
- package/dist/empty-states/Empty01/Empty01.d.ts +3 -0
- package/dist/empty-states/Empty01/Empty01.types.d.cts +94 -0
- package/dist/empty-states/Empty01/Empty01.types.d.ts +94 -0
- package/dist/empty-states/Empty02/Empty02.d.cts +3 -0
- package/dist/empty-states/Empty02/Empty02.d.ts +3 -0
- package/dist/empty-states/Empty02/Empty02.types.d.cts +72 -0
- package/dist/empty-states/Empty02/Empty02.types.d.ts +72 -0
- package/dist/empty-states/Empty03/Empty03.d.cts +3 -0
- package/dist/empty-states/Empty03/Empty03.d.ts +3 -0
- package/dist/empty-states/Empty03/Empty03.types.d.cts +72 -0
- package/dist/empty-states/Empty03/Empty03.types.d.ts +72 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.d.cts +3 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.d.ts +3 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.types.d.cts +48 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.types.d.ts +48 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.d.cts +3 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.d.ts +3 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.types.d.cts +45 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.types.d.ts +45 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.d.cts +3 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.d.ts +3 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.types.d.cts +45 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.types.d.ts +45 -0
- package/dist/faq/Faq01/Faq01.d.cts +3 -0
- package/dist/faq/Faq01/Faq01.d.ts +3 -0
- package/dist/faq/Faq01/Faq01.types.d.cts +23 -0
- package/dist/faq/Faq01/Faq01.types.d.ts +23 -0
- package/dist/faq/Faq02/Faq02.d.cts +3 -0
- package/dist/faq/Faq02/Faq02.d.ts +3 -0
- package/dist/faq/Faq02/Faq02.types.d.cts +24 -0
- package/dist/faq/Faq02/Faq02.types.d.ts +24 -0
- package/dist/faq/Faq03/Faq03.d.cts +3 -0
- package/dist/faq/Faq03/Faq03.d.ts +3 -0
- package/dist/faq/Faq03/Faq03.types.d.cts +42 -0
- package/dist/faq/Faq03/Faq03.types.d.ts +42 -0
- package/dist/forms/Form01/Form01.d.cts +3 -0
- package/dist/forms/Form01/Form01.d.ts +3 -0
- package/dist/forms/Form01/Form01.types.d.cts +20 -0
- package/dist/forms/Form01/Form01.types.d.ts +20 -0
- package/dist/forms/Form02/Form02.d.cts +3 -0
- package/dist/forms/Form02/Form02.d.ts +3 -0
- package/dist/forms/Form02/Form02.types.d.cts +38 -0
- package/dist/forms/Form02/Form02.types.d.ts +38 -0
- package/dist/forms/Form03/Form03.d.cts +3 -0
- package/dist/forms/Form03/Form03.d.ts +3 -0
- package/dist/forms/Form03/Form03.types.d.cts +55 -0
- package/dist/forms/Form03/Form03.types.d.ts +55 -0
- package/dist/index.cjs +6190 -22
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +135 -1
- package/dist/index.d.ts +135 -1
- package/dist/index.js +6220 -19
- package/dist/index.js.map +4 -4
- package/dist/lists-and-tables/List01/List01.d.cts +6 -0
- package/dist/lists-and-tables/List01/List01.d.ts +6 -0
- package/dist/lists-and-tables/List01/List01.types.d.cts +60 -0
- package/dist/lists-and-tables/List01/List01.types.d.ts +60 -0
- package/dist/lists-and-tables/List02/List02.d.cts +3 -0
- package/dist/lists-and-tables/List02/List02.d.ts +3 -0
- package/dist/lists-and-tables/List02/List02.types.d.cts +54 -0
- package/dist/lists-and-tables/List02/List02.types.d.ts +54 -0
- package/dist/lists-and-tables/List03/List03.d.cts +3 -0
- package/dist/lists-and-tables/List03/List03.d.ts +3 -0
- package/dist/lists-and-tables/List03/List03.types.d.cts +41 -0
- package/dist/lists-and-tables/List03/List03.types.d.ts +41 -0
- package/dist/lists-and-tables/List04/List04.d.cts +3 -0
- package/dist/lists-and-tables/List04/List04.d.ts +3 -0
- package/dist/lists-and-tables/List04/List04.types.d.cts +67 -0
- package/dist/lists-and-tables/List04/List04.types.d.ts +67 -0
- package/dist/logo-clouds/Logos01/Logos01.d.cts +3 -0
- package/dist/logo-clouds/Logos01/Logos01.d.ts +3 -0
- package/dist/logo-clouds/Logos01/Logos01.types.d.cts +13 -0
- package/dist/logo-clouds/Logos01/Logos01.types.d.ts +13 -0
- package/dist/logo-clouds/Logos02/Logos02.d.cts +3 -0
- package/dist/logo-clouds/Logos02/Logos02.d.ts +3 -0
- package/dist/logo-clouds/Logos02/Logos02.types.d.cts +28 -0
- package/dist/logo-clouds/Logos02/Logos02.types.d.ts +28 -0
- package/dist/logo-clouds/Logos03/Logos03.d.cts +3 -0
- package/dist/logo-clouds/Logos03/Logos03.d.ts +3 -0
- package/dist/logo-clouds/Logos03/Logos03.types.d.cts +23 -0
- package/dist/logo-clouds/Logos03/Logos03.types.d.ts +23 -0
- package/dist/newsletter/Newsletter01/Newsletter01.d.cts +3 -0
- package/dist/newsletter/Newsletter01/Newsletter01.d.ts +3 -0
- package/dist/newsletter/Newsletter01/Newsletter01.types.d.cts +39 -0
- package/dist/newsletter/Newsletter01/Newsletter01.types.d.ts +39 -0
- package/dist/newsletter/Newsletter02/Newsletter02.d.cts +3 -0
- package/dist/newsletter/Newsletter02/Newsletter02.d.ts +3 -0
- package/dist/newsletter/Newsletter02/Newsletter02.types.d.cts +42 -0
- package/dist/newsletter/Newsletter02/Newsletter02.types.d.ts +42 -0
- package/dist/notifications/Notifications01/Notifications01.d.cts +3 -0
- package/dist/notifications/Notifications01/Notifications01.d.ts +3 -0
- package/dist/notifications/Notifications01/Notifications01.types.d.cts +74 -0
- package/dist/notifications/Notifications01/Notifications01.types.d.ts +74 -0
- package/dist/notifications/Notifications02/Notifications02.d.cts +3 -0
- package/dist/notifications/Notifications02/Notifications02.d.ts +3 -0
- package/dist/notifications/Notifications02/Notifications02.types.d.cts +65 -0
- package/dist/notifications/Notifications02/Notifications02.types.d.ts +65 -0
- package/dist/notifications/Notifications03/Notifications03.d.cts +3 -0
- package/dist/notifications/Notifications03/Notifications03.d.ts +3 -0
- package/dist/notifications/Notifications03/Notifications03.types.d.cts +87 -0
- package/dist/notifications/Notifications03/Notifications03.types.d.ts +87 -0
- package/dist/onboarding/Onboarding01/Onboarding01.d.cts +3 -0
- package/dist/onboarding/Onboarding01/Onboarding01.d.ts +3 -0
- package/dist/onboarding/Onboarding01/Onboarding01.types.d.cts +46 -0
- package/dist/onboarding/Onboarding01/Onboarding01.types.d.ts +46 -0
- package/dist/onboarding/Onboarding02/Onboarding02.d.cts +3 -0
- package/dist/onboarding/Onboarding02/Onboarding02.d.ts +3 -0
- package/dist/onboarding/Onboarding02/Onboarding02.types.d.cts +68 -0
- package/dist/onboarding/Onboarding02/Onboarding02.types.d.ts +68 -0
- package/dist/onboarding/Onboarding03/Onboarding03.d.cts +3 -0
- package/dist/onboarding/Onboarding03/Onboarding03.d.ts +3 -0
- package/dist/onboarding/Onboarding03/Onboarding03.types.d.cts +38 -0
- package/dist/onboarding/Onboarding03/Onboarding03.types.d.ts +38 -0
- package/dist/page-headings/PageHeading01/PageHeading01.d.cts +6 -0
- package/dist/page-headings/PageHeading01/PageHeading01.d.ts +6 -0
- package/dist/page-headings/PageHeading01/PageHeading01.types.d.cts +35 -0
- package/dist/page-headings/PageHeading01/PageHeading01.types.d.ts +35 -0
- package/dist/page-headings/PageHeading02/PageHeading02.d.cts +3 -0
- package/dist/page-headings/PageHeading02/PageHeading02.d.ts +3 -0
- package/dist/page-headings/PageHeading02/PageHeading02.types.d.cts +49 -0
- package/dist/page-headings/PageHeading02/PageHeading02.types.d.ts +49 -0
- package/dist/page-headings/PageHeading03/PageHeading03.d.cts +6 -0
- package/dist/page-headings/PageHeading03/PageHeading03.d.ts +6 -0
- package/dist/page-headings/PageHeading03/PageHeading03.types.d.cts +83 -0
- package/dist/page-headings/PageHeading03/PageHeading03.types.d.ts +83 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.d.cts +3 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.d.ts +3 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.types.d.cts +9 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.types.d.ts +9 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.d.cts +3 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.d.ts +3 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.types.d.cts +12 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.types.d.ts +12 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.d.cts +3 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.d.ts +3 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.types.d.cts +12 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.types.d.ts +12 -0
- package/dist/settings/Settings01/Settings01.d.cts +3 -0
- package/dist/settings/Settings01/Settings01.d.ts +3 -0
- package/dist/settings/Settings01/Settings01.types.d.cts +46 -0
- package/dist/settings/Settings01/Settings01.types.d.ts +46 -0
- package/dist/settings/Settings02/Settings02.d.cts +3 -0
- package/dist/settings/Settings02/Settings02.d.ts +3 -0
- package/dist/settings/Settings02/Settings02.types.d.cts +45 -0
- package/dist/settings/Settings02/Settings02.types.d.ts +45 -0
- package/dist/settings/Settings03/Settings03.d.cts +3 -0
- package/dist/settings/Settings03/Settings03.d.ts +3 -0
- package/dist/settings/Settings03/Settings03.types.d.cts +132 -0
- package/dist/settings/Settings03/Settings03.types.d.ts +132 -0
- package/dist/settings/Settings04/Settings04.d.cts +3 -0
- package/dist/settings/Settings04/Settings04.d.ts +3 -0
- package/dist/settings/Settings04/Settings04.types.d.cts +124 -0
- package/dist/settings/Settings04/Settings04.types.d.ts +124 -0
- package/dist/settings/Settings05/Settings05.d.cts +3 -0
- package/dist/settings/Settings05/Settings05.d.ts +3 -0
- package/dist/settings/Settings05/Settings05.types.d.cts +94 -0
- package/dist/settings/Settings05/Settings05.types.d.ts +94 -0
- package/dist/shared/AppWorkspaceItems.d.cts +3 -0
- package/dist/shared/AppWorkspaceItems.d.ts +3 -0
- package/dist/shared/BlockActions.d.cts +1 -1
- package/dist/shared/BlockActions.d.ts +1 -1
- package/dist/shared/BlockMenuItems.d.cts +3 -0
- package/dist/shared/BlockMenuItems.d.ts +3 -0
- package/dist/shared/appShell.d.cts +19 -0
- package/dist/shared/appShell.d.ts +19 -0
- package/dist/shared/icons.d.cts +59 -13
- package/dist/shared/icons.d.ts +59 -13
- package/dist/shared/shared.types.d.cts +128 -0
- package/dist/shared/shared.types.d.ts +128 -0
- package/dist/shared/tableColumns.d.cts +10 -0
- package/dist/shared/tableColumns.d.ts +10 -0
- package/dist/sign-in/SignIn01/SignIn01.d.cts +3 -0
- package/dist/sign-in/SignIn01/SignIn01.d.ts +3 -0
- package/dist/sign-in/SignIn01/SignIn01.types.d.cts +52 -0
- package/dist/sign-in/SignIn01/SignIn01.types.d.ts +52 -0
- package/dist/sign-in/SignIn02/SignIn02.d.cts +3 -0
- package/dist/sign-in/SignIn02/SignIn02.d.ts +3 -0
- package/dist/sign-in/SignIn02/SignIn02.types.d.cts +79 -0
- package/dist/sign-in/SignIn02/SignIn02.types.d.ts +79 -0
- package/dist/sign-in/SignIn03/SignIn03.d.cts +3 -0
- package/dist/sign-in/SignIn03/SignIn03.d.ts +3 -0
- package/dist/sign-in/SignIn03/SignIn03.types.d.cts +51 -0
- package/dist/sign-in/SignIn03/SignIn03.types.d.ts +51 -0
- package/dist/sign-in/SignIn04/SignIn04.d.cts +3 -0
- package/dist/sign-in/SignIn04/SignIn04.d.ts +3 -0
- package/dist/sign-in/SignIn04/SignIn04.types.d.cts +56 -0
- package/dist/sign-in/SignIn04/SignIn04.types.d.ts +56 -0
- package/dist/sign-in/SignIn05/SignIn05.d.cts +3 -0
- package/dist/sign-in/SignIn05/SignIn05.d.ts +3 -0
- package/dist/sign-in/SignIn05/SignIn05.types.d.cts +86 -0
- package/dist/sign-in/SignIn05/SignIn05.types.d.ts +86 -0
- package/dist/stats/Stats01/Stats01.d.cts +3 -0
- package/dist/stats/Stats01/Stats01.d.ts +3 -0
- package/dist/stats/Stats01/Stats01.types.d.cts +19 -0
- package/dist/stats/Stats01/Stats01.types.d.ts +19 -0
- package/dist/stats/Stats02/Stats02.d.cts +3 -0
- package/dist/stats/Stats02/Stats02.d.ts +3 -0
- package/dist/stats/Stats02/Stats02.types.d.cts +30 -0
- package/dist/stats/Stats02/Stats02.types.d.ts +30 -0
- package/dist/stats/Stats03/Stats03.d.cts +3 -0
- package/dist/stats/Stats03/Stats03.d.ts +3 -0
- package/dist/stats/Stats03/Stats03.types.d.cts +24 -0
- package/dist/stats/Stats03/Stats03.types.d.ts +24 -0
- package/dist/styles.css +11992 -2727
- package/dist/team/Team01/Team01.d.cts +3 -0
- package/dist/team/Team01/Team01.d.ts +3 -0
- package/dist/team/Team01/Team01.types.d.cts +25 -0
- package/dist/team/Team01/Team01.types.d.ts +25 -0
- package/dist/team/Team02/Team02.d.cts +3 -0
- package/dist/team/Team02/Team02.d.ts +3 -0
- package/dist/team/Team02/Team02.types.d.cts +37 -0
- package/dist/team/Team02/Team02.types.d.ts +37 -0
- package/dist/testimonials/Testimonial01/Testimonial01.d.cts +3 -0
- package/dist/testimonials/Testimonial01/Testimonial01.d.ts +3 -0
- package/dist/testimonials/Testimonial01/Testimonial01.types.d.cts +21 -0
- package/dist/testimonials/Testimonial01/Testimonial01.types.d.ts +21 -0
- package/dist/testimonials/Testimonial02/Testimonial02.d.cts +3 -0
- package/dist/testimonials/Testimonial02/Testimonial02.d.ts +3 -0
- package/dist/testimonials/Testimonial02/Testimonial02.types.d.cts +25 -0
- package/dist/testimonials/Testimonial02/Testimonial02.types.d.ts +25 -0
- package/dist/testimonials/Testimonial03/Testimonial03.d.cts +3 -0
- package/dist/testimonials/Testimonial03/Testimonial03.d.ts +3 -0
- package/dist/testimonials/Testimonial03/Testimonial03.types.d.cts +45 -0
- package/dist/testimonials/Testimonial03/Testimonial03.types.d.ts +45 -0
- package/package.json +3 -3
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { SignInProvider } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface SignIn02Labels {
|
|
4
|
+
/** @default "Work email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** @default "Password" */
|
|
9
|
+
password?: string;
|
|
10
|
+
/** Under the password until there's an error. @default `At least ${passwordMinLength} characters.` */
|
|
11
|
+
passwordHint?: string;
|
|
12
|
+
/** The form's button. @default "Create account" */
|
|
13
|
+
submit?: string;
|
|
14
|
+
/** The word on the line between the providers and the form. @default "or" */
|
|
15
|
+
separator?: string;
|
|
16
|
+
/** The plate's name for screen readers. @default "About the product" */
|
|
17
|
+
plate?: string;
|
|
18
|
+
/** @default "Enter your work email." */
|
|
19
|
+
emailEmpty?: string;
|
|
20
|
+
/** @default "That doesn't look like an email address." */
|
|
21
|
+
emailInvalid?: string;
|
|
22
|
+
/** @default "Choose a password." */
|
|
23
|
+
passwordEmpty?: string;
|
|
24
|
+
/** When the password is too short, given how many characters it still needs. @default `Add ${missing} more characters.` */
|
|
25
|
+
passwordShort?(missing: number): string;
|
|
26
|
+
}
|
|
27
|
+
/** What was typed into the form. */
|
|
28
|
+
export interface SignIn02Values {
|
|
29
|
+
/** The email address, trimmed. */
|
|
30
|
+
email: string;
|
|
31
|
+
password: string;
|
|
32
|
+
}
|
|
33
|
+
/** A quote at the foot of the plate. */
|
|
34
|
+
export interface SignIn02Quote {
|
|
35
|
+
/** The words, with their quotation marks. */
|
|
36
|
+
text: ReactNode;
|
|
37
|
+
/** Who said it: "Lena Fischer, Head of Platform at Halcyon". */
|
|
38
|
+
author: ReactNode;
|
|
39
|
+
/** A small outlined label after the name, such as "Sample quote". */
|
|
40
|
+
badge?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export interface SignIn02Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
43
|
+
/** The product's name at the top left, with its mark before it (an `<img>` or an inline SVG about 24px square). */
|
|
44
|
+
brand: {
|
|
45
|
+
name: ReactNode;
|
|
46
|
+
logo?: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
/** The form's heading: "Create your account". */
|
|
49
|
+
title: ReactNode;
|
|
50
|
+
/** A line under it. */
|
|
51
|
+
description?: ReactNode;
|
|
52
|
+
/** Buttons above the form for signing up with another account. */
|
|
53
|
+
providers?: SignInProvider[];
|
|
54
|
+
/** Starts signing up with a provider. While its promise is pending the button shows a spinner. */
|
|
55
|
+
onProviderSelect?(id: string): void | Promise<void>;
|
|
56
|
+
/** Creates the account, once the email is valid and the password long enough. While its promise is pending the button shows a spinner; if it throws, its message shows under the email. */
|
|
57
|
+
onSubmit?(values: SignIn02Values): void | Promise<void>;
|
|
58
|
+
/** The shortest password it takes.
|
|
59
|
+
* @default 12 */
|
|
60
|
+
passwordMinLength?: number;
|
|
61
|
+
/** Small print under the button, such as the terms you agree to. */
|
|
62
|
+
terms?: ReactNode;
|
|
63
|
+
/** A line at the foot of the form's side: "Already have an account? Sign in". */
|
|
64
|
+
footer?: ReactNode;
|
|
65
|
+
/** A short line at the top of the plate, after a brass dot. */
|
|
66
|
+
eyebrow?: ReactNode;
|
|
67
|
+
/** The plate's headline. */
|
|
68
|
+
headline?: ReactNode;
|
|
69
|
+
/** The product on the plate: a screenshot, or a picture drawn with components. */
|
|
70
|
+
visual?: ReactNode;
|
|
71
|
+
/** A quote under it. */
|
|
72
|
+
quote?: SignIn02Quote;
|
|
73
|
+
/** Words that aren't content (the fields' labels, the button, the messages), in English unless you pass your own. */
|
|
74
|
+
labels?: SignIn02Labels;
|
|
75
|
+
}
|
|
76
|
+
export interface SignIn02Errors {
|
|
77
|
+
email?: string;
|
|
78
|
+
password?: string;
|
|
79
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { SignInProvider } from "../../shared/shared.types.js";
|
|
3
|
+
export interface SignIn02Labels {
|
|
4
|
+
/** @default "Work email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** @default "Password" */
|
|
9
|
+
password?: string;
|
|
10
|
+
/** Under the password until there's an error. @default `At least ${passwordMinLength} characters.` */
|
|
11
|
+
passwordHint?: string;
|
|
12
|
+
/** The form's button. @default "Create account" */
|
|
13
|
+
submit?: string;
|
|
14
|
+
/** The word on the line between the providers and the form. @default "or" */
|
|
15
|
+
separator?: string;
|
|
16
|
+
/** The plate's name for screen readers. @default "About the product" */
|
|
17
|
+
plate?: string;
|
|
18
|
+
/** @default "Enter your work email." */
|
|
19
|
+
emailEmpty?: string;
|
|
20
|
+
/** @default "That doesn't look like an email address." */
|
|
21
|
+
emailInvalid?: string;
|
|
22
|
+
/** @default "Choose a password." */
|
|
23
|
+
passwordEmpty?: string;
|
|
24
|
+
/** When the password is too short, given how many characters it still needs. @default `Add ${missing} more characters.` */
|
|
25
|
+
passwordShort?(missing: number): string;
|
|
26
|
+
}
|
|
27
|
+
/** What was typed into the form. */
|
|
28
|
+
export interface SignIn02Values {
|
|
29
|
+
/** The email address, trimmed. */
|
|
30
|
+
email: string;
|
|
31
|
+
password: string;
|
|
32
|
+
}
|
|
33
|
+
/** A quote at the foot of the plate. */
|
|
34
|
+
export interface SignIn02Quote {
|
|
35
|
+
/** The words, with their quotation marks. */
|
|
36
|
+
text: ReactNode;
|
|
37
|
+
/** Who said it: "Lena Fischer, Head of Platform at Halcyon". */
|
|
38
|
+
author: ReactNode;
|
|
39
|
+
/** A small outlined label after the name, such as "Sample quote". */
|
|
40
|
+
badge?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export interface SignIn02Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
43
|
+
/** The product's name at the top left, with its mark before it (an `<img>` or an inline SVG about 24px square). */
|
|
44
|
+
brand: {
|
|
45
|
+
name: ReactNode;
|
|
46
|
+
logo?: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
/** The form's heading: "Create your account". */
|
|
49
|
+
title: ReactNode;
|
|
50
|
+
/** A line under it. */
|
|
51
|
+
description?: ReactNode;
|
|
52
|
+
/** Buttons above the form for signing up with another account. */
|
|
53
|
+
providers?: SignInProvider[];
|
|
54
|
+
/** Starts signing up with a provider. While its promise is pending the button shows a spinner. */
|
|
55
|
+
onProviderSelect?(id: string): void | Promise<void>;
|
|
56
|
+
/** Creates the account, once the email is valid and the password long enough. While its promise is pending the button shows a spinner; if it throws, its message shows under the email. */
|
|
57
|
+
onSubmit?(values: SignIn02Values): void | Promise<void>;
|
|
58
|
+
/** The shortest password it takes.
|
|
59
|
+
* @default 12 */
|
|
60
|
+
passwordMinLength?: number;
|
|
61
|
+
/** Small print under the button, such as the terms you agree to. */
|
|
62
|
+
terms?: ReactNode;
|
|
63
|
+
/** A line at the foot of the form's side: "Already have an account? Sign in". */
|
|
64
|
+
footer?: ReactNode;
|
|
65
|
+
/** A short line at the top of the plate, after a brass dot. */
|
|
66
|
+
eyebrow?: ReactNode;
|
|
67
|
+
/** The plate's headline. */
|
|
68
|
+
headline?: ReactNode;
|
|
69
|
+
/** The product on the plate: a screenshot, or a picture drawn with components. */
|
|
70
|
+
visual?: ReactNode;
|
|
71
|
+
/** A quote under it. */
|
|
72
|
+
quote?: SignIn02Quote;
|
|
73
|
+
/** Words that aren't content (the fields' labels, the button, the messages), in English unless you pass your own. */
|
|
74
|
+
labels?: SignIn02Labels;
|
|
75
|
+
}
|
|
76
|
+
export interface SignIn02Errors {
|
|
77
|
+
email?: string;
|
|
78
|
+
password?: string;
|
|
79
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn03Props } from "./SignIn03.types.cjs";
|
|
2
|
+
/** Signing in with a link by email: one field, then a page saying where the link went, with a way to send it again. */
|
|
3
|
+
export declare function SignIn03({ brand, link, title, description, onSubmit, onResend, cooldown, sentDescription, sentNote, labels, className, ...props }: SignIn03Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn03Props } from "./SignIn03.types.js";
|
|
2
|
+
/** Signing in with a link by email: one field, then a page saying where the link went, with a way to send it again. */
|
|
3
|
+
export declare function SignIn03({ brand, link, title, description, onSubmit, onResend, cooldown, sentDescription, sentNote, labels, className, ...props }: SignIn03Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockLink } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface SignIn03Labels {
|
|
4
|
+
/** @default "Email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** The form's button. @default "Email me a link" */
|
|
9
|
+
submit?: string;
|
|
10
|
+
/** @default "Enter your email address." */
|
|
11
|
+
emailEmpty?: string;
|
|
12
|
+
/** @default "That doesn't look like an email address." */
|
|
13
|
+
emailInvalid?: string;
|
|
14
|
+
/** Shown when `onSubmit` fails without a message of its own. @default "That didn't go through. Try again in a moment." */
|
|
15
|
+
failed?: string;
|
|
16
|
+
/** The second page's heading. @default "Check your email" */
|
|
17
|
+
sentTitle?: string;
|
|
18
|
+
/** @default "Send the link again" */
|
|
19
|
+
resend?: string;
|
|
20
|
+
/** The resend button while it waits, given the seconds left. @default `Send again in ${seconds} s` */
|
|
21
|
+
resendIn?(seconds: number): string;
|
|
22
|
+
/** The button that goes back to the form. @default "Use a different email" */
|
|
23
|
+
back?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SignIn03Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
26
|
+
/** The product's name at the top left, with its mark before it (an `<img>` or an inline SVG about 24px square). */
|
|
27
|
+
brand: {
|
|
28
|
+
name: ReactNode;
|
|
29
|
+
logo?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/** A link at the top right, such as "Sign in with a password". */
|
|
32
|
+
link?: BlockLink;
|
|
33
|
+
/** The form's heading: "Sign in with email". */
|
|
34
|
+
title: ReactNode;
|
|
35
|
+
/** A line under it. */
|
|
36
|
+
description?: ReactNode;
|
|
37
|
+
/** Sends the link, once the address is valid. While its promise is pending the button shows a spinner; if it throws, its message shows under the field. Then the page says where the link went. */
|
|
38
|
+
onSubmit?(email: string): void | Promise<void>;
|
|
39
|
+
/** Sends another link from the second page; the button waits `cooldown` seconds after each one. */
|
|
40
|
+
onResend?(email: string): void | Promise<void>;
|
|
41
|
+
/** Seconds before another link can be sent.
|
|
42
|
+
* @default 30 */
|
|
43
|
+
cooldown?: number;
|
|
44
|
+
/** The second page's line, given the address on a line of its own to put in it.
|
|
45
|
+
* @default (email) => <>We sent a sign-in link to{email}It works once, for the next 15 minutes, on any device.</> */
|
|
46
|
+
sentDescription?(email: ReactNode): ReactNode;
|
|
47
|
+
/** Small print at the foot of the second page: where else to look for the email. */
|
|
48
|
+
sentNote?: ReactNode;
|
|
49
|
+
/** Words that aren't content (the field's label, the buttons, the messages), in English unless you pass your own. */
|
|
50
|
+
labels?: SignIn03Labels;
|
|
51
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockLink } from "../../shared/shared.types.js";
|
|
3
|
+
export interface SignIn03Labels {
|
|
4
|
+
/** @default "Email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** The form's button. @default "Email me a link" */
|
|
9
|
+
submit?: string;
|
|
10
|
+
/** @default "Enter your email address." */
|
|
11
|
+
emailEmpty?: string;
|
|
12
|
+
/** @default "That doesn't look like an email address." */
|
|
13
|
+
emailInvalid?: string;
|
|
14
|
+
/** Shown when `onSubmit` fails without a message of its own. @default "That didn't go through. Try again in a moment." */
|
|
15
|
+
failed?: string;
|
|
16
|
+
/** The second page's heading. @default "Check your email" */
|
|
17
|
+
sentTitle?: string;
|
|
18
|
+
/** @default "Send the link again" */
|
|
19
|
+
resend?: string;
|
|
20
|
+
/** The resend button while it waits, given the seconds left. @default `Send again in ${seconds} s` */
|
|
21
|
+
resendIn?(seconds: number): string;
|
|
22
|
+
/** The button that goes back to the form. @default "Use a different email" */
|
|
23
|
+
back?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SignIn03Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
26
|
+
/** The product's name at the top left, with its mark before it (an `<img>` or an inline SVG about 24px square). */
|
|
27
|
+
brand: {
|
|
28
|
+
name: ReactNode;
|
|
29
|
+
logo?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/** A link at the top right, such as "Sign in with a password". */
|
|
32
|
+
link?: BlockLink;
|
|
33
|
+
/** The form's heading: "Sign in with email". */
|
|
34
|
+
title: ReactNode;
|
|
35
|
+
/** A line under it. */
|
|
36
|
+
description?: ReactNode;
|
|
37
|
+
/** Sends the link, once the address is valid. While its promise is pending the button shows a spinner; if it throws, its message shows under the field. Then the page says where the link went. */
|
|
38
|
+
onSubmit?(email: string): void | Promise<void>;
|
|
39
|
+
/** Sends another link from the second page; the button waits `cooldown` seconds after each one. */
|
|
40
|
+
onResend?(email: string): void | Promise<void>;
|
|
41
|
+
/** Seconds before another link can be sent.
|
|
42
|
+
* @default 30 */
|
|
43
|
+
cooldown?: number;
|
|
44
|
+
/** The second page's line, given the address on a line of its own to put in it.
|
|
45
|
+
* @default (email) => <>We sent a sign-in link to{email}It works once, for the next 15 minutes, on any device.</> */
|
|
46
|
+
sentDescription?(email: ReactNode): ReactNode;
|
|
47
|
+
/** Small print at the foot of the second page: where else to look for the email. */
|
|
48
|
+
sentNote?: ReactNode;
|
|
49
|
+
/** Words that aren't content (the field's label, the buttons, the messages), in English unless you pass your own. */
|
|
50
|
+
labels?: SignIn03Labels;
|
|
51
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn04Props } from "./SignIn04.types.cjs";
|
|
2
|
+
/** Six boxes for the code from an authenticator app, checked as the last digit goes in, with a backup code as the way round. */
|
|
3
|
+
export declare function SignIn04({ title, description, onVerify, footer, labels, className, ...props }: SignIn04Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn04Props } from "./SignIn04.types.js";
|
|
2
|
+
/** Six boxes for the code from an authenticator app, checked as the last digit goes in, with a backup code as the way round. */
|
|
3
|
+
export declare function SignIn04({ title, description, onVerify, footer, labels, className, ...props }: SignIn04Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface SignIn04Labels {
|
|
3
|
+
/** The code boxes' name for screen readers. @default "Six-digit code" */
|
|
4
|
+
code?: string;
|
|
5
|
+
/** Under the boxes. @default "It's checked as soon as you type the last digit." */
|
|
6
|
+
codeHint?: string;
|
|
7
|
+
/** Under the boxes while the code is checked. @default "Checking the code…" */
|
|
8
|
+
checking?: string;
|
|
9
|
+
/** Under the boxes when the code is wrong. @default "That code didn't work. Codes change every 30 seconds, so try the newest one." */
|
|
10
|
+
wrong?: string;
|
|
11
|
+
/** The heading for a backup code. @default "Use a backup code" */
|
|
12
|
+
backupTitle?: string;
|
|
13
|
+
/** The line under it. @default "Enter one of the codes you saved when you turned on two-factor. Each one works once." */
|
|
14
|
+
backupDescription?: string;
|
|
15
|
+
/** @default "Backup code" */
|
|
16
|
+
backupCode?: string;
|
|
17
|
+
/** @default "xxxx-xxxx" */
|
|
18
|
+
backupPlaceholder?: string;
|
|
19
|
+
/** @default "Backup codes have 8 letters and numbers, like 4f7k-29xq." */
|
|
20
|
+
backupInvalid?: string;
|
|
21
|
+
/** The checkbox for remembering the device. @default "Don't ask again on this device for 30 days" */
|
|
22
|
+
trust?: string;
|
|
23
|
+
/** The form's button. @default "Verify" */
|
|
24
|
+
submit?: string;
|
|
25
|
+
/** @default "Use a backup code instead" */
|
|
26
|
+
useBackup?: string;
|
|
27
|
+
/** @default "Use your authenticator app" */
|
|
28
|
+
useApp?: string;
|
|
29
|
+
/** The heading once the code is right. @default "You're in" */
|
|
30
|
+
doneTitle?: string;
|
|
31
|
+
/** The line under it. @default "Taking you to your workspace…" */
|
|
32
|
+
doneDescription?: string;
|
|
33
|
+
}
|
|
34
|
+
/** A code to check. */
|
|
35
|
+
export interface SignIn04Values {
|
|
36
|
+
/** Six digits from the app, or a backup code in lower case. */
|
|
37
|
+
code: string;
|
|
38
|
+
/** Where the code came from. */
|
|
39
|
+
method: "app" | "backup";
|
|
40
|
+
/** Whether they ticked "Don't ask again on this device". */
|
|
41
|
+
trust: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface SignIn04Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
44
|
+
/** The heading over the code boxes: "Enter your code". */
|
|
45
|
+
title: ReactNode;
|
|
46
|
+
/** A line under it: which app, and for what. */
|
|
47
|
+
description?: ReactNode;
|
|
48
|
+
/** Checks the code, as soon as the sixth digit is typed (or the form is sent). Return false, or throw, when it's wrong: the boxes turn red and say so. Otherwise the card says they're in. */
|
|
49
|
+
onVerify?(values: SignIn04Values): boolean | void | Promise<boolean | void>;
|
|
50
|
+
/** A line under the card, such as who's signing in and a "Not you?" link. It goes once they're in. */
|
|
51
|
+
footer?: ReactNode;
|
|
52
|
+
/** Words that aren't content (the fields' labels, the buttons, the messages), in English unless you pass your own. */
|
|
53
|
+
labels?: SignIn04Labels;
|
|
54
|
+
}
|
|
55
|
+
export type SignIn04Mode = "app" | "backup";
|
|
56
|
+
export type SignIn04Status = "idle" | "checking" | "wrong" | "done";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface SignIn04Labels {
|
|
3
|
+
/** The code boxes' name for screen readers. @default "Six-digit code" */
|
|
4
|
+
code?: string;
|
|
5
|
+
/** Under the boxes. @default "It's checked as soon as you type the last digit." */
|
|
6
|
+
codeHint?: string;
|
|
7
|
+
/** Under the boxes while the code is checked. @default "Checking the code…" */
|
|
8
|
+
checking?: string;
|
|
9
|
+
/** Under the boxes when the code is wrong. @default "That code didn't work. Codes change every 30 seconds, so try the newest one." */
|
|
10
|
+
wrong?: string;
|
|
11
|
+
/** The heading for a backup code. @default "Use a backup code" */
|
|
12
|
+
backupTitle?: string;
|
|
13
|
+
/** The line under it. @default "Enter one of the codes you saved when you turned on two-factor. Each one works once." */
|
|
14
|
+
backupDescription?: string;
|
|
15
|
+
/** @default "Backup code" */
|
|
16
|
+
backupCode?: string;
|
|
17
|
+
/** @default "xxxx-xxxx" */
|
|
18
|
+
backupPlaceholder?: string;
|
|
19
|
+
/** @default "Backup codes have 8 letters and numbers, like 4f7k-29xq." */
|
|
20
|
+
backupInvalid?: string;
|
|
21
|
+
/** The checkbox for remembering the device. @default "Don't ask again on this device for 30 days" */
|
|
22
|
+
trust?: string;
|
|
23
|
+
/** The form's button. @default "Verify" */
|
|
24
|
+
submit?: string;
|
|
25
|
+
/** @default "Use a backup code instead" */
|
|
26
|
+
useBackup?: string;
|
|
27
|
+
/** @default "Use your authenticator app" */
|
|
28
|
+
useApp?: string;
|
|
29
|
+
/** The heading once the code is right. @default "You're in" */
|
|
30
|
+
doneTitle?: string;
|
|
31
|
+
/** The line under it. @default "Taking you to your workspace…" */
|
|
32
|
+
doneDescription?: string;
|
|
33
|
+
}
|
|
34
|
+
/** A code to check. */
|
|
35
|
+
export interface SignIn04Values {
|
|
36
|
+
/** Six digits from the app, or a backup code in lower case. */
|
|
37
|
+
code: string;
|
|
38
|
+
/** Where the code came from. */
|
|
39
|
+
method: "app" | "backup";
|
|
40
|
+
/** Whether they ticked "Don't ask again on this device". */
|
|
41
|
+
trust: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface SignIn04Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
44
|
+
/** The heading over the code boxes: "Enter your code". */
|
|
45
|
+
title: ReactNode;
|
|
46
|
+
/** A line under it: which app, and for what. */
|
|
47
|
+
description?: ReactNode;
|
|
48
|
+
/** Checks the code, as soon as the sixth digit is typed (or the form is sent). Return false, or throw, when it's wrong: the boxes turn red and say so. Otherwise the card says they're in. */
|
|
49
|
+
onVerify?(values: SignIn04Values): boolean | void | Promise<boolean | void>;
|
|
50
|
+
/** A line under the card, such as who's signing in and a "Not you?" link. It goes once they're in. */
|
|
51
|
+
footer?: ReactNode;
|
|
52
|
+
/** Words that aren't content (the fields' labels, the buttons, the messages), in English unless you pass your own. */
|
|
53
|
+
labels?: SignIn04Labels;
|
|
54
|
+
}
|
|
55
|
+
export type SignIn04Mode = "app" | "backup";
|
|
56
|
+
export type SignIn04Status = "idle" | "checking" | "wrong" | "done";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn05Props } from "./SignIn05.types.cjs";
|
|
2
|
+
/** Resetting a password on one card: ask for the email, then a new password with what it needs, then done. */
|
|
3
|
+
export declare function SignIn05({ brand, backLink, title, description, onRequestLink, onSavePassword, rules, doneDescription, onContinue, labels, className, ...props }: SignIn05Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn05Props } from "./SignIn05.types.js";
|
|
2
|
+
/** Resetting a password on one card: ask for the email, then a new password with what it needs, then done. */
|
|
3
|
+
export declare function SignIn05({ brand, backLink, title, description, onRequestLink, onSavePassword, rules, doneDescription, onContinue, labels, className, ...props }: SignIn05Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockLink } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface SignIn05Labels {
|
|
4
|
+
/** @default "Email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** The first step's button. @default "Email me a reset link" */
|
|
9
|
+
sendLink?: string;
|
|
10
|
+
/** @default "Enter the email you use to sign in." */
|
|
11
|
+
emailEmpty?: string;
|
|
12
|
+
/** @default "That doesn't look like an email address." */
|
|
13
|
+
emailInvalid?: string;
|
|
14
|
+
/** Shown when a callback fails without a message of its own. @default "That didn't go through. Try again in a moment." */
|
|
15
|
+
failed?: string;
|
|
16
|
+
/** The second step's heading. @default "Choose a new password" */
|
|
17
|
+
chooseTitle?: string;
|
|
18
|
+
/** The line under it, given their address in bold. @default (email) => <>For {email}. You'll be signed in as soon as it's saved.</> */
|
|
19
|
+
chooseDescription?(email: ReactNode): ReactNode;
|
|
20
|
+
/** @default "New password" */
|
|
21
|
+
password?: string;
|
|
22
|
+
/** @default "Show password" */
|
|
23
|
+
showPassword?: string;
|
|
24
|
+
/** @default "Hide password" */
|
|
25
|
+
hidePassword?: string;
|
|
26
|
+
/** The list of rules' name for screen readers. @default "Your password needs" */
|
|
27
|
+
rules?: string;
|
|
28
|
+
/** Read out after a rule that's met. @default " (done)" */
|
|
29
|
+
ruleMet?: string;
|
|
30
|
+
/** Read out after a rule that isn't. @default " (not yet)" */
|
|
31
|
+
ruleNotMet?: string;
|
|
32
|
+
/** @default "Choose a new password." */
|
|
33
|
+
passwordEmpty?: string;
|
|
34
|
+
/** When none of the rules are met, given how many there are. @default "Your password needs all three things below." */
|
|
35
|
+
passwordNeedsAll?(count: number): string;
|
|
36
|
+
/** When some aren't, given what's missing joined with commas and "and". @default `Your password still needs ${missing}.` */
|
|
37
|
+
passwordNeeds?(missing: string): string;
|
|
38
|
+
/** The second step's button. @default "Save password and sign in" */
|
|
39
|
+
save?: string;
|
|
40
|
+
/** The last step's heading. @default "Password changed" */
|
|
41
|
+
doneTitle?: string;
|
|
42
|
+
/** The last step's button. @default "Continue" */
|
|
43
|
+
continue?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Something a new password needs. */
|
|
46
|
+
export interface SignIn05Rule {
|
|
47
|
+
/** In the list under the field: "At least 12 characters". */
|
|
48
|
+
label: string;
|
|
49
|
+
/** In the error, after "still needs": "at least 12 characters". */
|
|
50
|
+
missing: string;
|
|
51
|
+
/** Whether the password meets it. */
|
|
52
|
+
test(password: string): boolean;
|
|
53
|
+
}
|
|
54
|
+
/** The new password, for the account. */
|
|
55
|
+
export interface SignIn05Values {
|
|
56
|
+
/** The address from the first step, trimmed. */
|
|
57
|
+
email: string;
|
|
58
|
+
password: string;
|
|
59
|
+
}
|
|
60
|
+
export interface SignIn05Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
61
|
+
/** The product's name at the top left, with its mark before it (an `<img>` or an inline SVG about 24px square). */
|
|
62
|
+
brand: {
|
|
63
|
+
name: ReactNode;
|
|
64
|
+
logo?: ReactNode;
|
|
65
|
+
};
|
|
66
|
+
/** The link back at the top right: "Back to sign in". */
|
|
67
|
+
backLink?: BlockLink;
|
|
68
|
+
/** The first step's heading: "Reset your password". */
|
|
69
|
+
title: ReactNode;
|
|
70
|
+
/** The line under it. */
|
|
71
|
+
description?: ReactNode;
|
|
72
|
+
/** Emails the reset link, once the address is valid. While its promise is pending the button shows a spinner; if it throws, its message shows under the field. Then the next step shows; in a real flow it's the page the link opens. */
|
|
73
|
+
onRequestLink?(email: string): void | Promise<void>;
|
|
74
|
+
/** Saves the new password, once it meets every rule. Pending and errors as above; then the last step shows. */
|
|
75
|
+
onSavePassword?(values: SignIn05Values): void | Promise<void>;
|
|
76
|
+
/** What a new password needs, ticked off as it's typed.
|
|
77
|
+
* @default at least 12 characters, upper and lower case letters, and a number */
|
|
78
|
+
rules?: SignIn05Rule[];
|
|
79
|
+
/** The last step's line, under "Password changed". */
|
|
80
|
+
doneDescription?: ReactNode;
|
|
81
|
+
/** The last step's button, which usually opens the app. Without it the button starts again from the first step. */
|
|
82
|
+
onContinue?(): void;
|
|
83
|
+
/** Words that aren't content (the fields' labels, the buttons, the messages), in English unless you pass your own. */
|
|
84
|
+
labels?: SignIn05Labels;
|
|
85
|
+
}
|
|
86
|
+
export type SignIn05Step = "email" | "password" | "done";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockLink } from "../../shared/shared.types.js";
|
|
3
|
+
export interface SignIn05Labels {
|
|
4
|
+
/** @default "Email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** The first step's button. @default "Email me a reset link" */
|
|
9
|
+
sendLink?: string;
|
|
10
|
+
/** @default "Enter the email you use to sign in." */
|
|
11
|
+
emailEmpty?: string;
|
|
12
|
+
/** @default "That doesn't look like an email address." */
|
|
13
|
+
emailInvalid?: string;
|
|
14
|
+
/** Shown when a callback fails without a message of its own. @default "That didn't go through. Try again in a moment." */
|
|
15
|
+
failed?: string;
|
|
16
|
+
/** The second step's heading. @default "Choose a new password" */
|
|
17
|
+
chooseTitle?: string;
|
|
18
|
+
/** The line under it, given their address in bold. @default (email) => <>For {email}. You'll be signed in as soon as it's saved.</> */
|
|
19
|
+
chooseDescription?(email: ReactNode): ReactNode;
|
|
20
|
+
/** @default "New password" */
|
|
21
|
+
password?: string;
|
|
22
|
+
/** @default "Show password" */
|
|
23
|
+
showPassword?: string;
|
|
24
|
+
/** @default "Hide password" */
|
|
25
|
+
hidePassword?: string;
|
|
26
|
+
/** The list of rules' name for screen readers. @default "Your password needs" */
|
|
27
|
+
rules?: string;
|
|
28
|
+
/** Read out after a rule that's met. @default " (done)" */
|
|
29
|
+
ruleMet?: string;
|
|
30
|
+
/** Read out after a rule that isn't. @default " (not yet)" */
|
|
31
|
+
ruleNotMet?: string;
|
|
32
|
+
/** @default "Choose a new password." */
|
|
33
|
+
passwordEmpty?: string;
|
|
34
|
+
/** When none of the rules are met, given how many there are. @default "Your password needs all three things below." */
|
|
35
|
+
passwordNeedsAll?(count: number): string;
|
|
36
|
+
/** When some aren't, given what's missing joined with commas and "and". @default `Your password still needs ${missing}.` */
|
|
37
|
+
passwordNeeds?(missing: string): string;
|
|
38
|
+
/** The second step's button. @default "Save password and sign in" */
|
|
39
|
+
save?: string;
|
|
40
|
+
/** The last step's heading. @default "Password changed" */
|
|
41
|
+
doneTitle?: string;
|
|
42
|
+
/** The last step's button. @default "Continue" */
|
|
43
|
+
continue?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Something a new password needs. */
|
|
46
|
+
export interface SignIn05Rule {
|
|
47
|
+
/** In the list under the field: "At least 12 characters". */
|
|
48
|
+
label: string;
|
|
49
|
+
/** In the error, after "still needs": "at least 12 characters". */
|
|
50
|
+
missing: string;
|
|
51
|
+
/** Whether the password meets it. */
|
|
52
|
+
test(password: string): boolean;
|
|
53
|
+
}
|
|
54
|
+
/** The new password, for the account. */
|
|
55
|
+
export interface SignIn05Values {
|
|
56
|
+
/** The address from the first step, trimmed. */
|
|
57
|
+
email: string;
|
|
58
|
+
password: string;
|
|
59
|
+
}
|
|
60
|
+
export interface SignIn05Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
61
|
+
/** The product's name at the top left, with its mark before it (an `<img>` or an inline SVG about 24px square). */
|
|
62
|
+
brand: {
|
|
63
|
+
name: ReactNode;
|
|
64
|
+
logo?: ReactNode;
|
|
65
|
+
};
|
|
66
|
+
/** The link back at the top right: "Back to sign in". */
|
|
67
|
+
backLink?: BlockLink;
|
|
68
|
+
/** The first step's heading: "Reset your password". */
|
|
69
|
+
title: ReactNode;
|
|
70
|
+
/** The line under it. */
|
|
71
|
+
description?: ReactNode;
|
|
72
|
+
/** Emails the reset link, once the address is valid. While its promise is pending the button shows a spinner; if it throws, its message shows under the field. Then the next step shows; in a real flow it's the page the link opens. */
|
|
73
|
+
onRequestLink?(email: string): void | Promise<void>;
|
|
74
|
+
/** Saves the new password, once it meets every rule. Pending and errors as above; then the last step shows. */
|
|
75
|
+
onSavePassword?(values: SignIn05Values): void | Promise<void>;
|
|
76
|
+
/** What a new password needs, ticked off as it's typed.
|
|
77
|
+
* @default at least 12 characters, upper and lower case letters, and a number */
|
|
78
|
+
rules?: SignIn05Rule[];
|
|
79
|
+
/** The last step's line, under "Password changed". */
|
|
80
|
+
doneDescription?: ReactNode;
|
|
81
|
+
/** The last step's button, which usually opens the app. Without it the button starts again from the first step. */
|
|
82
|
+
onContinue?(): void;
|
|
83
|
+
/** Words that aren't content (the fields' labels, the buttons, the messages), in English unless you pass your own. */
|
|
84
|
+
labels?: SignIn05Labels;
|
|
85
|
+
}
|
|
86
|
+
export type SignIn05Step = "email" | "password" | "done";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface Stats01Stat {
|
|
3
|
+
/** The figure: "4,200", "1.9". */
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
/** A unit after it at half its size, in the muted colour: "M", "min", "%". */
|
|
6
|
+
unit?: ReactNode;
|
|
7
|
+
/** What it counts, shown under the figure: "teams ship with Acme". */
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface Stats01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
11
|
+
/** A small line in a Chip above the title, such as the section's name. */
|
|
12
|
+
eyebrow?: ReactNode;
|
|
13
|
+
/** The section's heading, centred over the numbers. */
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
/** The numbers, in a row split by hairlines (two by two on smaller screens). Four look best. */
|
|
16
|
+
stats: Stats01Stat[];
|
|
17
|
+
/** A small line under the numbers, after a brass dot, such as where they come from. */
|
|
18
|
+
note?: ReactNode;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface Stats01Stat {
|
|
3
|
+
/** The figure: "4,200", "1.9". */
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
/** A unit after it at half its size, in the muted colour: "M", "min", "%". */
|
|
6
|
+
unit?: ReactNode;
|
|
7
|
+
/** What it counts, shown under the figure: "teams ship with Acme". */
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface Stats01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
11
|
+
/** A small line in a Chip above the title, such as the section's name. */
|
|
12
|
+
eyebrow?: ReactNode;
|
|
13
|
+
/** The section's heading, centred over the numbers. */
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
/** The numbers, in a row split by hairlines (two by two on smaller screens). Four look best. */
|
|
16
|
+
stats: Stats01Stat[];
|
|
17
|
+
/** A small line under the numbers, after a brass dot, such as where they come from. */
|
|
18
|
+
note?: ReactNode;
|
|
19
|
+
}
|