@plitzi/sdk-elements 0.39.12 → 0.39.14
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/CHANGELOG.md +28 -0
- package/dist/Element/PluginManager.mjs +13 -13
- package/dist/Element/hooks/useElementState.d.ts +1 -1
- package/dist/Element/hooks/useFullscreenInteractions.d.ts +11 -0
- package/dist/Element/hooks/useFullscreenInteractions.mjs +14 -0
- package/dist/Element/hooks/useRootElementInteractions.mjs +93 -87
- package/dist/builder/ruleFields.d.ts +1 -1
- package/dist/builder/ruleFields.mjs +5 -0
- package/dist/dataSource/GlobalSources.mjs +121 -104
- package/dist/dataSource/useAudienceScope.mjs +2 -1
- package/dist/dataSource/usePageClock.d.ts +12 -0
- package/dist/dataSource/usePageClock.mjs +19 -0
- package/dist/elements/basic/Countdown/Countdown.d.ts +23 -0
- package/dist/elements/basic/Countdown/Countdown.mjs +58 -0
- package/dist/elements/basic/Countdown/Settings.d.ts +12 -0
- package/dist/elements/basic/Countdown/Settings.mjs +94 -0
- package/dist/elements/basic/Countdown/declaration.d.ts +72 -0
- package/dist/elements/basic/Countdown/declaration.mjs +58 -0
- package/dist/elements/basic/Countdown/index.d.ts +69 -0
- package/dist/elements/basic/Countdown/index.mjs +5 -0
- package/dist/elements/declarations/index.d.ts +508 -7
- package/dist/elements/declarations/index.mjs +84 -72
- package/dist/elements/index.d.ts +13 -3
- package/dist/elements/index.mjs +76 -66
- package/dist/elements/media/Image/Image.d.ts +6 -1
- package/dist/elements/media/Image/Image.mjs +44 -35
- package/dist/elements/media/Image/Settings.d.ts +2 -1
- package/dist/elements/media/Image/Settings.mjs +26 -19
- package/dist/elements/media/Image/declaration.d.ts +2 -0
- package/dist/elements/media/Image/declaration.mjs +2 -1
- package/dist/elements/media/Image/index.d.ts +2 -0
- package/dist/elements/settings.mjs +92 -80
- package/dist/elements/structure/Container/Container.d.ts +2 -4
- package/dist/elements/structure/Container/Container.mjs +5 -6
- package/dist/elements/structure/Container/Settings.d.ts +1 -2
- package/dist/elements/structure/Container/Settings.mjs +5 -19
- package/dist/elements/structure/Container/declaration.d.ts +1 -2
- package/dist/elements/structure/Container/declaration.mjs +1 -3
- package/dist/elements/structure/Container/index.d.ts +1 -2
- package/dist/elements/structure/Disclosure/Disclosure.d.ts +26 -0
- package/dist/elements/structure/Disclosure/Disclosure.mjs +49 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/DisclosureSummary.d.ts +16 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/DisclosureSummary.mjs +19 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/Settings.d.ts +7 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/Settings.mjs +20 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/declaration.d.ts +59 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/declaration.mjs +47 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/index.d.ts +57 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/index.mjs +5 -0
- package/dist/elements/structure/Disclosure/Settings.d.ts +10 -0
- package/dist/elements/structure/Disclosure/Settings.mjs +47 -0
- package/dist/elements/structure/Disclosure/declaration.d.ts +66 -0
- package/dist/elements/structure/Disclosure/declaration.mjs +55 -0
- package/dist/elements/structure/Disclosure/index.d.ts +121 -0
- package/dist/elements/structure/Disclosure/index.mjs +9 -0
- package/dist/elements/structure/Disclosure/useDetails.d.ts +27 -0
- package/dist/elements/structure/Disclosure/useDetails.mjs +49 -0
- package/dist/elements/structure/TimeWindow/TimeWindow.mjs +29 -25
- package/dist/elements/structure/TimeWindow/TimeWindowContext.d.ts +6 -0
- package/dist/elements/structure/TimeWindow/TimeWindowContext.mjs +4 -0
- package/dist/elements/{testing → structure}/Variants/Settings.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/Settings.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/VariantItem.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/declaration.d.ts +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/declaration.mjs +2 -2
- package/dist/elements/{testing → structure}/Variants/VariantItem/index.d.ts +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/index.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/Variants.mjs +12 -12
- package/dist/elements/{testing → structure/Variants}/childOfItem.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/declaration.d.ts +1 -1
- package/dist/elements/{testing → structure}/Variants/declaration.mjs +3 -3
- package/dist/elements/{testing → structure}/Variants/index.d.ts +2 -2
- package/dist/elements/{testing → structure}/Variants/index.mjs +1 -1
- package/dist/elements/user/Account/Account.d.ts +25 -0
- package/dist/elements/user/Account/Account.mjs +104 -0
- package/dist/elements/user/Account/Settings.d.ts +10 -0
- package/dist/elements/user/Account/Settings.mjs +47 -0
- package/dist/elements/user/Account/declaration.d.ts +143 -0
- package/dist/elements/user/Account/declaration.mjs +123 -0
- package/dist/elements/user/Account/index.d.ts +141 -0
- package/dist/elements/user/Account/index.mjs +5 -0
- package/dist/elements/user/Avatar/Avatar.d.ts +19 -0
- package/dist/elements/user/Avatar/Avatar.mjs +26 -0
- package/dist/elements/user/Avatar/AvatarFace.d.ts +15 -0
- package/dist/elements/user/Avatar/AvatarFace.mjs +28 -0
- package/dist/elements/user/Avatar/Settings.d.ts +9 -0
- package/dist/elements/user/Avatar/Settings.mjs +38 -0
- package/dist/elements/user/Avatar/declaration.d.ts +65 -0
- package/dist/elements/user/Avatar/declaration.mjs +53 -0
- package/dist/elements/user/Avatar/faces.d.ts +10 -0
- package/dist/elements/user/Avatar/faces.mjs +10 -0
- package/dist/elements/user/Avatar/index.d.ts +63 -0
- package/dist/elements/user/Avatar/index.mjs +5 -0
- package/dist/elements/user/SignInForm/Settings.d.ts +16 -0
- package/dist/elements/user/SignInForm/Settings.mjs +64 -0
- package/dist/elements/user/SignInForm/SignInForm.d.ts +34 -0
- package/dist/elements/user/SignInForm/SignInForm.mjs +112 -0
- package/dist/elements/user/SignInForm/declaration.d.ts +120 -0
- package/dist/elements/user/SignInForm/declaration.mjs +99 -0
- package/dist/elements/user/SignInForm/index.d.ts +118 -0
- package/dist/elements/user/SignInForm/index.mjs +5 -0
- package/dist/index.d.ts +514 -6
- package/dist/index.mjs +84 -74
- package/package.json +7 -7
- /package/dist/elements/{testing → structure}/Variants/Settings.d.ts +0 -0
- /package/dist/elements/{testing → structure}/Variants/VariantItem/Settings.d.ts +0 -0
- /package/dist/elements/{testing → structure}/Variants/VariantItem/VariantItem.d.ts +0 -0
- /package/dist/elements/{testing → structure}/Variants/Variants.d.ts +0 -0
- /package/dist/elements/{testing → structure/Variants}/childOfItem.d.ts +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import e from "../../../Element/hocs/withElement.mjs";
|
|
2
|
+
import t from "../../../Element/hooks/useElement.mjs";
|
|
3
|
+
import { RootElement as n } from "../../../Element/RootElement.mjs";
|
|
4
|
+
import { use as r, useCallback as i, useId as a, useMemo as o, useState as s } from "react";
|
|
5
|
+
import { usePlitzi as c } from "@plitzi/sdk-shared/hooks";
|
|
6
|
+
import { useCommonStore as l, useSdkStore as u } from "@plitzi/sdk-shared/store";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
import p from "clsx";
|
|
9
|
+
import { AuthContext as m } from "@plitzi/sdk-auth";
|
|
10
|
+
// src/elements/user/SignInForm/SignInForm.tsx
|
|
11
|
+
var h = (e, t) => {
|
|
12
|
+
switch (e) {
|
|
13
|
+
case "unverified": return t.unverifiedMessage;
|
|
14
|
+
case "inactive":
|
|
15
|
+
case "revoked": return t.blockedMessage;
|
|
16
|
+
case "sso-required": return t.ssoMessage;
|
|
17
|
+
case "network": return t.networkMessage;
|
|
18
|
+
default: return t.wrongMessage;
|
|
19
|
+
}
|
|
20
|
+
}, g = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : void 0, _ = (e, t) => {
|
|
21
|
+
let n = e.get(t);
|
|
22
|
+
return typeof n == "string" ? n : "";
|
|
23
|
+
}, v = ({ ref: e, className: v = "", usernameLabel: y = "Email", passwordLabel: b = "Password", codeLabel: x = "Code", submitLabel: S = "Sign in", redirectTo: C = "", wrongMessage: w = "That email or password is not right.", unverifiedMessage: T = "Confirm your email first: the link is in your inbox.", blockedMessage: E = "This account cannot sign in.", ssoMessage: D = "Your organization signs you in with its own single sign-on.", networkMessage: O = "Signing in could not be reached. Try again in a moment." }) => {
|
|
24
|
+
let { definition: { styleSelectors: k } } = t(), { settings: { previewMode: A } } = c(), j = r(m), [M] = l("navigation.queryParams.redirect"), [N] = u("navigation.navigate"), P = a(), [F, I] = s(""), [L, R] = s(""), [z, B] = s(!1), V = !A, H = o(() => ({
|
|
25
|
+
wrongMessage: w,
|
|
26
|
+
unverifiedMessage: T,
|
|
27
|
+
blockedMessage: E,
|
|
28
|
+
ssoMessage: D,
|
|
29
|
+
networkMessage: O
|
|
30
|
+
}), [
|
|
31
|
+
w,
|
|
32
|
+
T,
|
|
33
|
+
E,
|
|
34
|
+
D,
|
|
35
|
+
O
|
|
36
|
+
]), U = !V && j.provider === "server", W = !V && !j.provider, G = i(() => {
|
|
37
|
+
let e = C || g(M);
|
|
38
|
+
e && N(e);
|
|
39
|
+
}, [
|
|
40
|
+
N,
|
|
41
|
+
M,
|
|
42
|
+
C
|
|
43
|
+
]), K = i(async (e) => {
|
|
44
|
+
if (e.preventDefault(), V || z || !j.login) return;
|
|
45
|
+
let t = new FormData(e.currentTarget);
|
|
46
|
+
B(!0), R("");
|
|
47
|
+
let n = await j.login(F ? {
|
|
48
|
+
mode: "mfa",
|
|
49
|
+
mfaToken: F,
|
|
50
|
+
code: _(t, "code")
|
|
51
|
+
} : {
|
|
52
|
+
username: _(t, "username"),
|
|
53
|
+
password: _(t, "password")
|
|
54
|
+
});
|
|
55
|
+
B(!1), n.ok ? G() : n.reason === "mfa" ? I(n.mfaToken) : R(h(n.reason, H));
|
|
56
|
+
}, [
|
|
57
|
+
V,
|
|
58
|
+
z,
|
|
59
|
+
j,
|
|
60
|
+
F,
|
|
61
|
+
G,
|
|
62
|
+
H
|
|
63
|
+
]), q = (e, t, n) => /* @__PURE__ */ f("div", {
|
|
64
|
+
className: p("plitzi-component__sign-in-form-field", k.field),
|
|
65
|
+
children: [/* @__PURE__ */ d("label", {
|
|
66
|
+
className: p("plitzi-component__sign-in-form-label", k.label),
|
|
67
|
+
htmlFor: `${P}-${e}`,
|
|
68
|
+
children: t
|
|
69
|
+
}), /* @__PURE__ */ d("input", {
|
|
70
|
+
id: `${P}-${e}`,
|
|
71
|
+
name: e,
|
|
72
|
+
className: p("plitzi-component__sign-in-form-input", k.input),
|
|
73
|
+
required: !0,
|
|
74
|
+
...n
|
|
75
|
+
})]
|
|
76
|
+
}, e), J = p("plitzi-component__sign-in-form-submit", k.submit), Y = W ? "Signing in is not set up for this site." : L;
|
|
77
|
+
return /* @__PURE__ */ f(n, {
|
|
78
|
+
ref: e,
|
|
79
|
+
className: p("plitzi-component__sign-in-form", v),
|
|
80
|
+
children: [U ? /* @__PURE__ */ d("button", {
|
|
81
|
+
type: "button",
|
|
82
|
+
className: J,
|
|
83
|
+
onClick: () => void j.login?.({}),
|
|
84
|
+
children: S
|
|
85
|
+
}) : /* @__PURE__ */ f("form", {
|
|
86
|
+
className: "plitzi-component__sign-in-form-fields",
|
|
87
|
+
onSubmit: (e) => void K(e),
|
|
88
|
+
noValidate: V,
|
|
89
|
+
children: [F ? q("code", x, {
|
|
90
|
+
type: "text",
|
|
91
|
+
inputMode: "numeric",
|
|
92
|
+
autoComplete: "one-time-code"
|
|
93
|
+
}) : [q("username", y, {
|
|
94
|
+
type: "email",
|
|
95
|
+
autoComplete: "username"
|
|
96
|
+
}), q("password", b, {
|
|
97
|
+
type: "password",
|
|
98
|
+
autoComplete: "current-password"
|
|
99
|
+
})], /* @__PURE__ */ d("button", {
|
|
100
|
+
type: "submit",
|
|
101
|
+
className: J,
|
|
102
|
+
disabled: z || W,
|
|
103
|
+
children: S
|
|
104
|
+
})]
|
|
105
|
+
}), /* @__PURE__ */ d("p", {
|
|
106
|
+
className: p("plitzi-component__sign-in-form-problem", k.problem),
|
|
107
|
+
role: "alert",
|
|
108
|
+
children: Y
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
}, y = e(v);
|
|
112
|
+
export { v as SignInForm, y as default };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { SignInFormProps } from './SignInForm';
|
|
2
|
+
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
|
+
/** What this element can be authored with — its component's own props, minus what the runtime supplies. */
|
|
4
|
+
export type SignInFormAttributes = AuthorableAttributes<SignInFormProps>;
|
|
5
|
+
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
|
+
readonly type: "signInForm";
|
|
7
|
+
readonly contentAttributes: readonly ["usernameLabel", "passwordLabel", "codeLabel", "submitLabel"];
|
|
8
|
+
readonly content: {
|
|
9
|
+
readonly attributes: {
|
|
10
|
+
readonly usernameLabel: "Email";
|
|
11
|
+
readonly passwordLabel: "Password";
|
|
12
|
+
readonly codeLabel: "Code";
|
|
13
|
+
readonly submitLabel: "Sign in";
|
|
14
|
+
readonly redirectTo: "";
|
|
15
|
+
readonly wrongMessage: "That email or password is not right.";
|
|
16
|
+
readonly unverifiedMessage: "Confirm your email first: the link is in your inbox.";
|
|
17
|
+
readonly blockedMessage: "This account cannot sign in.";
|
|
18
|
+
readonly ssoMessage: "Your organization signs you in with its own single sign-on.";
|
|
19
|
+
readonly networkMessage: "Signing in could not be reached. Try again in a moment.";
|
|
20
|
+
};
|
|
21
|
+
readonly definition: {
|
|
22
|
+
readonly label: "Sign-in Form";
|
|
23
|
+
readonly description: string;
|
|
24
|
+
readonly items: [];
|
|
25
|
+
readonly styleSelectors: {
|
|
26
|
+
readonly field: "";
|
|
27
|
+
readonly label: "";
|
|
28
|
+
readonly input: "";
|
|
29
|
+
readonly submit: "";
|
|
30
|
+
readonly problem: "";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly market: {
|
|
34
|
+
readonly category: "user";
|
|
35
|
+
readonly icon: "fa-solid fa-right-to-bracket";
|
|
36
|
+
};
|
|
37
|
+
readonly defaultStyle: {
|
|
38
|
+
readonly style: {
|
|
39
|
+
readonly base: {
|
|
40
|
+
readonly default: {
|
|
41
|
+
readonly display: "flex";
|
|
42
|
+
readonly 'flex-direction': "column";
|
|
43
|
+
readonly gap: "12px";
|
|
44
|
+
readonly 'max-width': "360px";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly field: {
|
|
48
|
+
readonly default: {
|
|
49
|
+
readonly display: "flex";
|
|
50
|
+
readonly 'flex-direction': "column";
|
|
51
|
+
readonly gap: "4px";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
readonly label: {
|
|
55
|
+
readonly default: {
|
|
56
|
+
readonly 'font-size': "0.875em";
|
|
57
|
+
readonly 'font-weight': 500;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly input: {
|
|
61
|
+
readonly default: {
|
|
62
|
+
readonly 'padding-top': "8px";
|
|
63
|
+
readonly 'padding-right': "10px";
|
|
64
|
+
readonly 'padding-bottom': "8px";
|
|
65
|
+
readonly 'padding-left': "10px";
|
|
66
|
+
readonly border: "1px solid light-dark(oklch(0.871 0.006 286.286), oklch(0.37 0.013 285.805))";
|
|
67
|
+
readonly 'border-top-left-radius': "8px";
|
|
68
|
+
readonly 'border-top-right-radius': "8px";
|
|
69
|
+
readonly 'border-bottom-left-radius': "8px";
|
|
70
|
+
readonly 'border-bottom-right-radius': "8px";
|
|
71
|
+
readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
|
|
72
|
+
readonly color: "inherit";
|
|
73
|
+
readonly font: "inherit";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly submit: {
|
|
77
|
+
readonly default: {
|
|
78
|
+
readonly 'padding-top': "10px";
|
|
79
|
+
readonly 'padding-right': "14px";
|
|
80
|
+
readonly 'padding-bottom': "10px";
|
|
81
|
+
readonly 'padding-left': "14px";
|
|
82
|
+
readonly 'border-top-width': "0px";
|
|
83
|
+
readonly 'border-right-width': "0px";
|
|
84
|
+
readonly 'border-bottom-width': "0px";
|
|
85
|
+
readonly 'border-left-width': "0px";
|
|
86
|
+
readonly 'border-top-left-radius': "8px";
|
|
87
|
+
readonly 'border-top-right-radius': "8px";
|
|
88
|
+
readonly 'border-bottom-left-radius': "8px";
|
|
89
|
+
readonly 'border-bottom-right-radius': "8px";
|
|
90
|
+
readonly 'background-color': "light-dark(oklch(0.21 0.006 285.885), oklch(0.985 0 0))";
|
|
91
|
+
readonly color: "light-dark(oklch(0.985 0 0), oklch(0.21 0.006 285.885))";
|
|
92
|
+
readonly font: "inherit";
|
|
93
|
+
readonly 'font-weight': 600;
|
|
94
|
+
readonly cursor: "pointer";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly problem: {
|
|
98
|
+
readonly default: {
|
|
99
|
+
readonly margin: "0px";
|
|
100
|
+
readonly color: "light-dark(oklch(0.505 0.213 27.518), oklch(0.704 0.191 22.216))";
|
|
101
|
+
readonly 'font-size': "0.875em";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly subTypes: {};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
}, Partial<{
|
|
109
|
+
wrongMessage?: string | undefined;
|
|
110
|
+
unverifiedMessage?: string | undefined;
|
|
111
|
+
blockedMessage?: string | undefined;
|
|
112
|
+
ssoMessage?: string | undefined;
|
|
113
|
+
networkMessage?: string | undefined;
|
|
114
|
+
usernameLabel?: string | undefined;
|
|
115
|
+
passwordLabel?: string | undefined;
|
|
116
|
+
codeLabel?: string | undefined;
|
|
117
|
+
submitLabel?: string | undefined;
|
|
118
|
+
redirectTo?: string | undefined;
|
|
119
|
+
}>>;
|
|
120
|
+
export default declaration;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { elementDeclaration as e } from "@plitzi/sdk-shared/authoring";
|
|
2
|
+
var t = e()({
|
|
3
|
+
type: "signInForm",
|
|
4
|
+
contentAttributes: [
|
|
5
|
+
"usernameLabel",
|
|
6
|
+
"passwordLabel",
|
|
7
|
+
"codeLabel",
|
|
8
|
+
"submitLabel"
|
|
9
|
+
],
|
|
10
|
+
content: {
|
|
11
|
+
attributes: {
|
|
12
|
+
usernameLabel: "Email",
|
|
13
|
+
passwordLabel: "Password",
|
|
14
|
+
codeLabel: "Code",
|
|
15
|
+
submitLabel: "Sign in",
|
|
16
|
+
redirectTo: "",
|
|
17
|
+
wrongMessage: "That email or password is not right.",
|
|
18
|
+
unverifiedMessage: "Confirm your email first: the link is in your inbox.",
|
|
19
|
+
blockedMessage: "This account cannot sign in.",
|
|
20
|
+
ssoMessage: "Your organization signs you in with its own single sign-on.",
|
|
21
|
+
networkMessage: "Signing in could not be reached. Try again in a moment."
|
|
22
|
+
},
|
|
23
|
+
definition: {
|
|
24
|
+
label: "Sign-in Form",
|
|
25
|
+
description: "The space’s sign-in. Through a provider that signs in by going out and back (`userProvider: \"server\"` — \"Sign in with Plitzi\" on the platform), one button; against the space’s own (`basic`), an email and a password, then the code of a second factor when the account has one. Each refusal says what it is — a wrong password, an address not confirmed, a blocked account, single sign-on, no network — in words of its own (`wrongMessage`…), and once in, a visitor goes to `redirectTo`, or back to the `?redirect=` of this site they were sent with. Its slots style each part: `field`, `label`, `input`, `submit`, `problem`.",
|
|
26
|
+
items: [],
|
|
27
|
+
styleSelectors: {
|
|
28
|
+
field: "",
|
|
29
|
+
label: "",
|
|
30
|
+
input: "",
|
|
31
|
+
submit: "",
|
|
32
|
+
problem: ""
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
market: {
|
|
36
|
+
category: "user",
|
|
37
|
+
icon: "fa-solid fa-right-to-bracket"
|
|
38
|
+
},
|
|
39
|
+
defaultStyle: {
|
|
40
|
+
style: {
|
|
41
|
+
base: { default: {
|
|
42
|
+
display: "flex",
|
|
43
|
+
"flex-direction": "column",
|
|
44
|
+
gap: "12px",
|
|
45
|
+
"max-width": "360px"
|
|
46
|
+
} },
|
|
47
|
+
field: { default: {
|
|
48
|
+
display: "flex",
|
|
49
|
+
"flex-direction": "column",
|
|
50
|
+
gap: "4px"
|
|
51
|
+
} },
|
|
52
|
+
label: { default: {
|
|
53
|
+
"font-size": "0.875em",
|
|
54
|
+
"font-weight": 500
|
|
55
|
+
} },
|
|
56
|
+
input: { default: {
|
|
57
|
+
"padding-top": "8px",
|
|
58
|
+
"padding-right": "10px",
|
|
59
|
+
"padding-bottom": "8px",
|
|
60
|
+
"padding-left": "10px",
|
|
61
|
+
border: "1px solid light-dark(oklch(0.871 0.006 286.286), oklch(0.37 0.013 285.805))",
|
|
62
|
+
"border-top-left-radius": "8px",
|
|
63
|
+
"border-top-right-radius": "8px",
|
|
64
|
+
"border-bottom-left-radius": "8px",
|
|
65
|
+
"border-bottom-right-radius": "8px",
|
|
66
|
+
"background-color": "light-dark(white, oklch(0.21 0.006 285.885))",
|
|
67
|
+
color: "inherit",
|
|
68
|
+
font: "inherit"
|
|
69
|
+
} },
|
|
70
|
+
submit: { default: {
|
|
71
|
+
"padding-top": "10px",
|
|
72
|
+
"padding-right": "14px",
|
|
73
|
+
"padding-bottom": "10px",
|
|
74
|
+
"padding-left": "14px",
|
|
75
|
+
"border-top-width": "0px",
|
|
76
|
+
"border-right-width": "0px",
|
|
77
|
+
"border-bottom-width": "0px",
|
|
78
|
+
"border-left-width": "0px",
|
|
79
|
+
"border-top-left-radius": "8px",
|
|
80
|
+
"border-top-right-radius": "8px",
|
|
81
|
+
"border-bottom-left-radius": "8px",
|
|
82
|
+
"border-bottom-right-radius": "8px",
|
|
83
|
+
"background-color": "light-dark(oklch(0.21 0.006 285.885), oklch(0.985 0 0))",
|
|
84
|
+
color: "light-dark(oklch(0.985 0 0), oklch(0.21 0.006 285.885))",
|
|
85
|
+
font: "inherit",
|
|
86
|
+
"font-weight": 600,
|
|
87
|
+
cursor: "pointer"
|
|
88
|
+
} },
|
|
89
|
+
problem: { default: {
|
|
90
|
+
margin: "0px",
|
|
91
|
+
color: "light-dark(oklch(0.505 0.213 27.518), oklch(0.704 0.191 22.216))",
|
|
92
|
+
"font-size": "0.875em"
|
|
93
|
+
} }
|
|
94
|
+
},
|
|
95
|
+
subTypes: {}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export { t as default };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const SignInForm: import('react').FC<import('../../..').WithElementProps<import('./SignInForm').SignInFormProps>> & {
|
|
2
|
+
readonly type: "signInForm";
|
|
3
|
+
readonly contentAttributes: readonly ["usernameLabel", "passwordLabel", "codeLabel", "submitLabel"];
|
|
4
|
+
readonly content: {
|
|
5
|
+
readonly attributes: {
|
|
6
|
+
readonly usernameLabel: "Email";
|
|
7
|
+
readonly passwordLabel: "Password";
|
|
8
|
+
readonly codeLabel: "Code";
|
|
9
|
+
readonly submitLabel: "Sign in";
|
|
10
|
+
readonly redirectTo: "";
|
|
11
|
+
readonly wrongMessage: "That email or password is not right.";
|
|
12
|
+
readonly unverifiedMessage: "Confirm your email first: the link is in your inbox.";
|
|
13
|
+
readonly blockedMessage: "This account cannot sign in.";
|
|
14
|
+
readonly ssoMessage: "Your organization signs you in with its own single sign-on.";
|
|
15
|
+
readonly networkMessage: "Signing in could not be reached. Try again in a moment.";
|
|
16
|
+
};
|
|
17
|
+
readonly definition: {
|
|
18
|
+
readonly label: "Sign-in Form";
|
|
19
|
+
readonly description: string;
|
|
20
|
+
readonly items: [];
|
|
21
|
+
readonly styleSelectors: {
|
|
22
|
+
readonly field: "";
|
|
23
|
+
readonly label: "";
|
|
24
|
+
readonly input: "";
|
|
25
|
+
readonly submit: "";
|
|
26
|
+
readonly problem: "";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly market: {
|
|
30
|
+
readonly category: "user";
|
|
31
|
+
readonly icon: "fa-solid fa-right-to-bracket";
|
|
32
|
+
};
|
|
33
|
+
readonly defaultStyle: {
|
|
34
|
+
readonly style: {
|
|
35
|
+
readonly base: {
|
|
36
|
+
readonly default: {
|
|
37
|
+
readonly display: "flex";
|
|
38
|
+
readonly 'flex-direction': "column";
|
|
39
|
+
readonly gap: "12px";
|
|
40
|
+
readonly 'max-width': "360px";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly field: {
|
|
44
|
+
readonly default: {
|
|
45
|
+
readonly display: "flex";
|
|
46
|
+
readonly 'flex-direction': "column";
|
|
47
|
+
readonly gap: "4px";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
readonly label: {
|
|
51
|
+
readonly default: {
|
|
52
|
+
readonly 'font-size': "0.875em";
|
|
53
|
+
readonly 'font-weight': 500;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly input: {
|
|
57
|
+
readonly default: {
|
|
58
|
+
readonly 'padding-top': "8px";
|
|
59
|
+
readonly 'padding-right': "10px";
|
|
60
|
+
readonly 'padding-bottom': "8px";
|
|
61
|
+
readonly 'padding-left': "10px";
|
|
62
|
+
readonly border: "1px solid light-dark(oklch(0.871 0.006 286.286), oklch(0.37 0.013 285.805))";
|
|
63
|
+
readonly 'border-top-left-radius': "8px";
|
|
64
|
+
readonly 'border-top-right-radius': "8px";
|
|
65
|
+
readonly 'border-bottom-left-radius': "8px";
|
|
66
|
+
readonly 'border-bottom-right-radius': "8px";
|
|
67
|
+
readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
|
|
68
|
+
readonly color: "inherit";
|
|
69
|
+
readonly font: "inherit";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
readonly submit: {
|
|
73
|
+
readonly default: {
|
|
74
|
+
readonly 'padding-top': "10px";
|
|
75
|
+
readonly 'padding-right': "14px";
|
|
76
|
+
readonly 'padding-bottom': "10px";
|
|
77
|
+
readonly 'padding-left': "14px";
|
|
78
|
+
readonly 'border-top-width': "0px";
|
|
79
|
+
readonly 'border-right-width': "0px";
|
|
80
|
+
readonly 'border-bottom-width': "0px";
|
|
81
|
+
readonly 'border-left-width': "0px";
|
|
82
|
+
readonly 'border-top-left-radius': "8px";
|
|
83
|
+
readonly 'border-top-right-radius': "8px";
|
|
84
|
+
readonly 'border-bottom-left-radius': "8px";
|
|
85
|
+
readonly 'border-bottom-right-radius': "8px";
|
|
86
|
+
readonly 'background-color': "light-dark(oklch(0.21 0.006 285.885), oklch(0.985 0 0))";
|
|
87
|
+
readonly color: "light-dark(oklch(0.985 0 0), oklch(0.21 0.006 285.885))";
|
|
88
|
+
readonly font: "inherit";
|
|
89
|
+
readonly 'font-weight': 600;
|
|
90
|
+
readonly cursor: "pointer";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
readonly problem: {
|
|
94
|
+
readonly default: {
|
|
95
|
+
readonly margin: "0px";
|
|
96
|
+
readonly color: "light-dark(oklch(0.505 0.213 27.518), oklch(0.704 0.191 22.216))";
|
|
97
|
+
readonly 'font-size': "0.875em";
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly subTypes: {};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
} & {
|
|
105
|
+
content: import('@plitzi/sdk-shared/authoring').ElementContentDefaults;
|
|
106
|
+
} & import('@plitzi/sdk-shared/authoring').ElementAttributesBrand<Partial<{
|
|
107
|
+
wrongMessage?: string | undefined;
|
|
108
|
+
unverifiedMessage?: string | undefined;
|
|
109
|
+
blockedMessage?: string | undefined;
|
|
110
|
+
ssoMessage?: string | undefined;
|
|
111
|
+
networkMessage?: string | undefined;
|
|
112
|
+
usernameLabel?: string | undefined;
|
|
113
|
+
passwordLabel?: string | undefined;
|
|
114
|
+
codeLabel?: string | undefined;
|
|
115
|
+
submitLabel?: string | undefined;
|
|
116
|
+
redirectTo?: string | undefined;
|
|
117
|
+
}>>;
|
|
118
|
+
export default SignInForm;
|