@zitadel/components 0.1.0-alpha.4 → 0.1.0-alpha.8
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 +33 -19
- package/dist/atoms/index.d.mts +1 -1
- package/dist/atoms/index.mjs +1 -1
- package/dist/{atoms-Dh5J7QwT.mjs → atoms-B25wiDqb.mjs} +2 -2
- package/dist/atoms-B25wiDqb.mjs.map +1 -0
- package/dist/default-Cpl78hQN.mjs +6 -0
- package/dist/default-Cpl78hQN.mjs.map +1 -0
- package/dist/{index-DQryonsO.d.mts → index-DVDCrfkv.d.mts} +360 -337
- package/dist/index-DVDCrfkv.d.mts.map +1 -0
- package/dist/{index-D0NA2hMc.d.mts → index-DZ82Y3_z.d.mts} +6 -6
- package/dist/{index-D0NA2hMc.d.mts.map → index-DZ82Y3_z.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -4
- package/dist/manifests.mjs +1 -1
- package/dist/orchestrator/index.d.mts +2 -2
- package/dist/orchestrator/index.mjs +2 -2
- package/dist/{orchestrator-DGp8rCN7.mjs → orchestrator-CW9zixuw.mjs} +58 -39
- package/dist/orchestrator-CW9zixuw.mjs.map +1 -0
- package/dist/standalone.mjs +56 -37
- package/dist/tokens/index.mjs +1 -1
- package/dist/{tokens-TXmurodq.mjs → tokens-BQ_augxi.mjs} +2 -2
- package/dist/{tokens-TXmurodq.mjs.map → tokens-BQ_augxi.mjs.map} +1 -1
- package/package.json +2 -16
- package/dist/atoms/index.d.ts +0 -9
- package/dist/atoms/index.d.ts.map +0 -1
- package/dist/atoms/zl-alert.d.ts +0 -56
- package/dist/atoms/zl-alert.d.ts.map +0 -1
- package/dist/atoms/zl-button.d.ts +0 -99
- package/dist/atoms/zl-button.d.ts.map +0 -1
- package/dist/atoms/zl-card.d.ts +0 -53
- package/dist/atoms/zl-card.d.ts.map +0 -1
- package/dist/atoms/zl-field.d.ts +0 -90
- package/dist/atoms/zl-field.d.ts.map +0 -1
- package/dist/atoms/zl-icon.d.ts +0 -48
- package/dist/atoms/zl-icon.d.ts.map +0 -1
- package/dist/atoms/zl-page-shell.d.ts +0 -48
- package/dist/atoms/zl-page-shell.d.ts.map +0 -1
- package/dist/atoms/zl-passkey.d.ts +0 -123
- package/dist/atoms/zl-passkey.d.ts.map +0 -1
- package/dist/atoms/zl-pill.d.ts +0 -54
- package/dist/atoms/zl-pill.d.ts.map +0 -1
- package/dist/atoms-Dh5J7QwT.mjs.map +0 -1
- package/dist/default-BG5uwuAm.mjs +0 -6
- package/dist/default-BG5uwuAm.mjs.map +0 -1
- package/dist/index-DQryonsO.d.mts.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/base64url.d.ts +0 -18
- package/dist/internal/base64url.d.ts.map +0 -1
- package/dist/internal/emit.d.ts +0 -12
- package/dist/internal/emit.d.ts.map +0 -1
- package/dist/internal/escape-html.d.ts +0 -10
- package/dist/internal/escape-html.d.ts.map +0 -1
- package/dist/internal/unique-id.d.ts +0 -2
- package/dist/internal/unique-id.d.ts.map +0 -1
- package/dist/manifest.d.ts +0 -36
- package/dist/manifest.d.ts.map +0 -1
- package/dist/manifests.d.ts +0 -6
- package/dist/manifests.d.ts.map +0 -1
- package/dist/orchestrator/api-client.d.ts +0 -33
- package/dist/orchestrator/api-client.d.ts.map +0 -1
- package/dist/orchestrator/branding-to-tokens.d.ts +0 -28
- package/dist/orchestrator/branding-to-tokens.d.ts.map +0 -1
- package/dist/orchestrator/branding-validator.d.ts +0 -7
- package/dist/orchestrator/branding-validator.d.ts.map +0 -1
- package/dist/orchestrator/branding.d.ts +0 -76
- package/dist/orchestrator/branding.d.ts.map +0 -1
- package/dist/orchestrator/font-loader.d.ts +0 -2
- package/dist/orchestrator/font-loader.d.ts.map +0 -1
- package/dist/orchestrator/index.d.ts +0 -23
- package/dist/orchestrator/index.d.ts.map +0 -1
- package/dist/orchestrator/liquid.d.ts +0 -31
- package/dist/orchestrator/liquid.d.ts.map +0 -1
- package/dist/orchestrator/locales/de.d.ts +0 -16
- package/dist/orchestrator/locales/de.d.ts.map +0 -1
- package/dist/orchestrator/locales/en.d.ts +0 -19
- package/dist/orchestrator/locales/en.d.ts.map +0 -1
- package/dist/orchestrator/locales/index.d.ts +0 -13
- package/dist/orchestrator/locales/index.d.ts.map +0 -1
- package/dist/orchestrator/locales/it.d.ts +0 -14
- package/dist/orchestrator/locales/it.d.ts.map +0 -1
- package/dist/orchestrator/mandatory-gates.d.ts +0 -26
- package/dist/orchestrator/mandatory-gates.d.ts.map +0 -1
- package/dist/orchestrator/resolve-api.d.ts +0 -37
- package/dist/orchestrator/resolve-api.d.ts.map +0 -1
- package/dist/orchestrator/sanitiser.d.ts +0 -6
- package/dist/orchestrator/sanitiser.d.ts.map +0 -1
- package/dist/orchestrator/template-context.d.ts +0 -55
- package/dist/orchestrator/template-context.d.ts.map +0 -1
- package/dist/orchestrator/template-names.d.ts +0 -16
- package/dist/orchestrator/template-names.d.ts.map +0 -1
- package/dist/orchestrator/theme-controller.d.ts +0 -30
- package/dist/orchestrator/theme-controller.d.ts.map +0 -1
- package/dist/orchestrator/zitadel-login.d.ts +0 -213
- package/dist/orchestrator/zitadel-login.d.ts.map +0 -1
- package/dist/orchestrator/zitadel-logout.d.ts +0 -114
- package/dist/orchestrator/zitadel-logout.d.ts.map +0 -1
- package/dist/orchestrator-DGp8rCN7.mjs.map +0 -1
- package/dist/styles/base.d.ts +0 -7
- package/dist/styles/base.d.ts.map +0 -1
- package/dist/styles/focus-ring.d.ts +0 -7
- package/dist/styles/focus-ring.d.ts.map +0 -1
- package/dist/styles/index.d.ts +0 -5
- package/dist/styles/index.d.ts.map +0 -1
- package/dist/styles/surface.d.ts +0 -8
- package/dist/styles/surface.d.ts.map +0 -1
- package/dist/styles/tokens.d.ts +0 -11
- package/dist/styles/tokens.d.ts.map +0 -1
- package/dist/tokens/index.d.ts +0 -9
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as __decorate, b as t, v as focusVisibleStyles, x as emit, y as baseHostStyles } from "./atoms-
|
|
2
|
-
import { r as tokensCss } from "./tokens-
|
|
3
|
-
import { t as default_default } from "./default-
|
|
1
|
+
import { _ as __decorate, b as t, v as focusVisibleStyles, x as emit, y as baseHostStyles } from "./atoms-B25wiDqb.mjs";
|
|
2
|
+
import { r as tokensCss } from "./tokens-BQ_augxi.mjs";
|
|
3
|
+
import { t as default_default } from "./default-Cpl78hQN.mjs";
|
|
4
4
|
import { manifestRegistry } from "./manifests.mjs";
|
|
5
5
|
import { LitElement, css, html, nothing } from "lit";
|
|
6
6
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1572,30 +1572,35 @@ function sanitiseUrl(value, field, issues) {
|
|
|
1572
1572
|
//#endregion
|
|
1573
1573
|
//#region src/orchestrator/font-loader.ts
|
|
1574
1574
|
/**
|
|
1575
|
-
* Inject `branding.font_url` as `<link rel="stylesheet">`
|
|
1576
|
-
* `<
|
|
1575
|
+
* Inject `branding.font_url` as `<link rel="stylesheet">` into the host
|
|
1576
|
+
* document's `<head>`. Per `docs/design/branding/templates.md`:
|
|
1577
1577
|
*
|
|
1578
1578
|
* "The `font_url` stylesheet is injected by the orchestrator; the template
|
|
1579
1579
|
* does not emit the `<link>` tag itself."
|
|
1580
1580
|
*
|
|
1581
|
+
* The link must live at document level, not inside the shadow root:
|
|
1582
|
+
* browsers ignore `@font-face` rules declared in shadow-tree stylesheets,
|
|
1583
|
+
* so a shadow-scoped link would never register the font faces and every
|
|
1584
|
+
* branded font silently falls back to the system stack. `font-family`
|
|
1585
|
+
* references inside the shadow tree resolve against document-level faces.
|
|
1586
|
+
*
|
|
1581
1587
|
* Idempotent: calling with the same URL is a no-op; calling with a new URL
|
|
1582
1588
|
* replaces the previous link. Calling with `null`/`undefined` removes any
|
|
1583
1589
|
* previously injected link.
|
|
1584
1590
|
*/
|
|
1585
1591
|
const LINK_ID = "zl-font-link";
|
|
1586
1592
|
function applyFontUrl(shadowRoot, fontUrl) {
|
|
1587
|
-
const
|
|
1593
|
+
const ownerDocument = shadowRoot.ownerDocument ?? document;
|
|
1594
|
+
const existing = ownerDocument.head.querySelector(`link#${LINK_ID}`);
|
|
1588
1595
|
if (!fontUrl) {
|
|
1589
1596
|
existing?.remove();
|
|
1590
1597
|
return;
|
|
1591
1598
|
}
|
|
1592
|
-
|
|
1593
|
-
existing?.remove();
|
|
1594
|
-
const link = (shadowRoot.ownerDocument ?? document).createElement("link");
|
|
1599
|
+
const link = existing ?? ownerDocument.createElement("link");
|
|
1595
1600
|
link.id = LINK_ID;
|
|
1596
1601
|
link.rel = "stylesheet";
|
|
1597
|
-
link.href = fontUrl;
|
|
1598
|
-
|
|
1602
|
+
if (link.href !== fontUrl) link.href = fontUrl;
|
|
1603
|
+
if (!existing) ownerDocument.head.appendChild(link);
|
|
1599
1604
|
}
|
|
1600
1605
|
//#endregion
|
|
1601
1606
|
//#region src/internal/escape-html.ts
|
|
@@ -1628,17 +1633,14 @@ function patchMandatoryGates(html, step, locale) {
|
|
|
1628
1633
|
}
|
|
1629
1634
|
function collectMissingAtoms(fragment, step, locale) {
|
|
1630
1635
|
const additions = [];
|
|
1631
|
-
if (step.fields) for (const
|
|
1636
|
+
if (step.fields) for (const field of step.fields) {
|
|
1632
1637
|
if (!field.required) continue;
|
|
1633
|
-
if (hasFieldFor(fragment, name)) continue;
|
|
1634
|
-
additions.push(buildField(name, field.text_key, field.type, locale, field.required));
|
|
1638
|
+
if (hasFieldFor(fragment, field.name)) continue;
|
|
1639
|
+
additions.push(buildField(field.name, field.text_key, field.type, locale, field.required));
|
|
1635
1640
|
}
|
|
1636
1641
|
if (step.actions && !hasPrimaryButton(fragment)) {
|
|
1637
|
-
const primary =
|
|
1638
|
-
if (primary)
|
|
1639
|
-
const [name, action] = primary;
|
|
1640
|
-
additions.push(buildSubmit(name, action.text_key, locale));
|
|
1641
|
-
}
|
|
1642
|
+
const primary = step.actions.find((action) => action.primary);
|
|
1643
|
+
if (primary) additions.push(buildSubmit(primary.name, primary.text_key, locale));
|
|
1642
1644
|
}
|
|
1643
1645
|
return additions;
|
|
1644
1646
|
}
|
|
@@ -1823,8 +1825,9 @@ const en = {
|
|
|
1823
1825
|
"identifier.description": "Enter your email to continue",
|
|
1824
1826
|
"identifier.field.email": "Work email",
|
|
1825
1827
|
"identifier.field.email.placeholder": "you@company.com",
|
|
1826
|
-
"identifier.
|
|
1827
|
-
"identifier.action.
|
|
1828
|
+
"identifier.field.password": "Password",
|
|
1829
|
+
"identifier.action.submit": "Sign in",
|
|
1830
|
+
"identifier.action.continue": "Sign in",
|
|
1828
1831
|
"identifier.action.passkey": "Sign in with a passkey",
|
|
1829
1832
|
"identifier.action.register.lead": "Don't have an account? ",
|
|
1830
1833
|
"identifier.action.register.link": "Sign up",
|
|
@@ -1873,7 +1876,7 @@ const en = {
|
|
|
1873
1876
|
"password.action.register.lead": "Don't have an account? ",
|
|
1874
1877
|
"password.action.register.link": "Sign up",
|
|
1875
1878
|
"register.title": "Create your account",
|
|
1876
|
-
"register.description": "
|
|
1879
|
+
"register.description": "",
|
|
1877
1880
|
"register.field.email": "Work email",
|
|
1878
1881
|
"register.field.email.placeholder": "you@company.com",
|
|
1879
1882
|
"register.field.password": "Password",
|
|
@@ -1881,8 +1884,10 @@ const en = {
|
|
|
1881
1884
|
"register.field.givenName": "Given name",
|
|
1882
1885
|
"register.field.familyName": "Family name",
|
|
1883
1886
|
"register.field.dateOfBirth": "Date of birth",
|
|
1887
|
+
"register.field.dateOfBirth.placeholder": "YYYY-MM-DD",
|
|
1888
|
+
"register.field.dateOfBirth.help": "Use YYYY-MM-DD.",
|
|
1884
1889
|
"register.action.password": "Continue with password",
|
|
1885
|
-
"register.action.passkey": "
|
|
1890
|
+
"register.action.passkey": "Continue with a passkey",
|
|
1886
1891
|
"register.action.submit": "Sign up",
|
|
1887
1892
|
"register.action.sign_in.lead": "Already have an account? ",
|
|
1888
1893
|
"register.action.sign_in.link": "Sign in",
|
|
@@ -1921,8 +1926,9 @@ const de = {
|
|
|
1921
1926
|
"identifier.description": "Gib deine E-Mail-Adresse ein, um fortzufahren",
|
|
1922
1927
|
"identifier.field.email": "E-Mail",
|
|
1923
1928
|
"identifier.field.email.placeholder": "du@unternehmen.com",
|
|
1924
|
-
"identifier.
|
|
1925
|
-
"identifier.action.
|
|
1929
|
+
"identifier.field.password": "Passwort",
|
|
1930
|
+
"identifier.action.submit": "Anmelden",
|
|
1931
|
+
"identifier.action.continue": "Anmelden",
|
|
1926
1932
|
"identifier.action.passkey": "Mit Passkey anmelden",
|
|
1927
1933
|
"identifier.action.register.lead": "Noch kein Konto? ",
|
|
1928
1934
|
"identifier.action.register.link": "Registrieren",
|
|
@@ -1971,13 +1977,18 @@ const de = {
|
|
|
1971
1977
|
"password.action.register.lead": "Noch kein Konto? ",
|
|
1972
1978
|
"password.action.register.link": "Registrieren",
|
|
1973
1979
|
"register.title": "Konto erstellen",
|
|
1974
|
-
"register.description": "
|
|
1980
|
+
"register.description": "",
|
|
1975
1981
|
"register.field.email": "E-Mail",
|
|
1976
1982
|
"register.field.email.placeholder": "du@unternehmen.com",
|
|
1977
1983
|
"register.field.password": "Passwort",
|
|
1978
1984
|
"register.field.password.help": "Mindestens 8 Zeichen, einschließlich eines Sonderzeichens und einer Zahl.",
|
|
1985
|
+
"register.field.givenName": "Vorname",
|
|
1986
|
+
"register.field.familyName": "Nachname",
|
|
1987
|
+
"register.field.dateOfBirth": "Geburtsdatum",
|
|
1988
|
+
"register.field.dateOfBirth.placeholder": "JJJJ-MM-TT",
|
|
1989
|
+
"register.field.dateOfBirth.help": "Verwende JJJJ-MM-TT.",
|
|
1979
1990
|
"register.action.password": "Mit Passwort fortfahren",
|
|
1980
|
-
"register.action.passkey": "
|
|
1991
|
+
"register.action.passkey": "Weiter mit Passkey",
|
|
1981
1992
|
"register.action.submit": "Registrieren",
|
|
1982
1993
|
"register.action.sign_in.lead": "Bereits ein Konto? ",
|
|
1983
1994
|
"register.action.sign_in.link": "Anmelden",
|
|
@@ -2015,8 +2026,9 @@ const it = {
|
|
|
2015
2026
|
"identifier.description": "Inserisci la tua e-mail per continuare",
|
|
2016
2027
|
"identifier.field.email": "E-mail aziendale",
|
|
2017
2028
|
"identifier.field.email.placeholder": "tu@azienda.com",
|
|
2018
|
-
"identifier.
|
|
2019
|
-
"identifier.action.
|
|
2029
|
+
"identifier.field.password": "Password",
|
|
2030
|
+
"identifier.action.submit": "Accedi",
|
|
2031
|
+
"identifier.action.continue": "Accedi",
|
|
2020
2032
|
"identifier.action.passkey": "Accedi con passkey",
|
|
2021
2033
|
"identifier.action.register.lead": "Non hai un account? ",
|
|
2022
2034
|
"identifier.action.register.link": "Registrati",
|
|
@@ -2065,13 +2077,18 @@ const it = {
|
|
|
2065
2077
|
"password.action.register.lead": "Non hai un account? ",
|
|
2066
2078
|
"password.action.register.link": "Registrati",
|
|
2067
2079
|
"register.title": "Crea il tuo account",
|
|
2068
|
-
"register.description": "
|
|
2080
|
+
"register.description": "",
|
|
2069
2081
|
"register.field.email": "E-mail aziendale",
|
|
2070
2082
|
"register.field.email.placeholder": "tu@azienda.com",
|
|
2071
2083
|
"register.field.password": "Password",
|
|
2072
2084
|
"register.field.password.help": "Almeno 8 caratteri, incluso un simbolo e un numero.",
|
|
2085
|
+
"register.field.givenName": "Nome",
|
|
2086
|
+
"register.field.familyName": "Cognome",
|
|
2087
|
+
"register.field.dateOfBirth": "Data di nascita",
|
|
2088
|
+
"register.field.dateOfBirth.placeholder": "AAAA-MM-GG",
|
|
2089
|
+
"register.field.dateOfBirth.help": "Usa AAAA-MM-GG.",
|
|
2073
2090
|
"register.action.password": "Continua con password",
|
|
2074
|
-
"register.action.passkey": "
|
|
2091
|
+
"register.action.passkey": "Continua con passkey",
|
|
2075
2092
|
"register.action.submit": "Registrati",
|
|
2076
2093
|
"register.action.sign_in.lead": "Hai già un account? ",
|
|
2077
2094
|
"register.action.sign_in.link": "Accedi",
|
|
@@ -2640,14 +2657,16 @@ let ZitadelLogin = class ZitadelLogin extends LitElement {
|
|
|
2640
2657
|
renderStep(step, engine) {
|
|
2641
2658
|
const tenantSource = typeof this.branding?.liquid_template === "string" && this.branding.liquid_template.length > 0 ? this.branding.liquid_template : null;
|
|
2642
2659
|
const errors = step.error ? step.error.startsWith("error.") ? [{ text_key: step.error }] : [{ message: step.error }] : [];
|
|
2660
|
+
const fields = step.fields ?? [];
|
|
2661
|
+
const actions = step.actions ?? [];
|
|
2643
2662
|
const context = {
|
|
2644
2663
|
step: {
|
|
2645
2664
|
name: step.name,
|
|
2646
2665
|
complete: step.complete,
|
|
2647
2666
|
texts: step.texts ?? {}
|
|
2648
2667
|
},
|
|
2649
|
-
fields
|
|
2650
|
-
actions
|
|
2668
|
+
fields,
|
|
2669
|
+
actions,
|
|
2651
2670
|
gates: step.gates ?? {},
|
|
2652
2671
|
sso_providers: step.sso_providers ?? [],
|
|
2653
2672
|
challenge: step.challenge ?? null,
|
|
@@ -2834,11 +2853,11 @@ let ZitadelLogin = class ZitadelLogin extends LitElement {
|
|
|
2834
2853
|
this.loading = true;
|
|
2835
2854
|
try {
|
|
2836
2855
|
const formValues = this.captureValuesFromFields();
|
|
2837
|
-
const
|
|
2856
|
+
const stepFields = this.response.step.fields ?? [];
|
|
2838
2857
|
const fields = {};
|
|
2839
|
-
for (const
|
|
2840
|
-
const value = formValues[
|
|
2841
|
-
if (value !== void 0) fields[
|
|
2858
|
+
for (const f of stepFields) {
|
|
2859
|
+
const value = formValues[f.name];
|
|
2860
|
+
if (value !== void 0) fields[f.name] = value;
|
|
2842
2861
|
}
|
|
2843
2862
|
const body = {
|
|
2844
2863
|
session_token,
|
|
@@ -2893,7 +2912,7 @@ ZitadelLogin = __decorate([customElement("zitadel-login")], ZitadelLogin);
|
|
|
2893
2912
|
function collectInitialValues(step) {
|
|
2894
2913
|
const values = {};
|
|
2895
2914
|
if (!step.fields) return values;
|
|
2896
|
-
for (const
|
|
2915
|
+
for (const field of step.fields) values[field.name] = typeof field.value === "string" ? field.value : "";
|
|
2897
2916
|
return values;
|
|
2898
2917
|
}
|
|
2899
2918
|
//#endregion
|
|
@@ -3340,4 +3359,4 @@ function fillTemplateTokens(fragment, name, email, initial) {
|
|
|
3340
3359
|
//#endregion
|
|
3341
3360
|
export { buildBrandingStylesheet as _, createSanitiser as a, startFlow as b, de as c, MANDATORY_GATES_MARKER as d, mandatoryGatesMarkerComment as f, applyBrandingTokens as g, validateBranding as h, layout_chrome_default as i, en as l, applyFontUrl as m, ZitadelLogin as n, builtinLocales as o, patchMandatoryGates as p, ThemeController as r, it as s, ZitadelLogout as t, TEMPLATE_NAMES as u, resolveTheme as v, submitStep as x, getCurrentStep as y };
|
|
3342
3361
|
|
|
3343
|
-
//# sourceMappingURL=orchestrator-
|
|
3362
|
+
//# sourceMappingURL=orchestrator-CW9zixuw.mjs.map
|