@zitadel/components 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +346 -0
- package/dist/atoms/index.d.mts +2 -0
- package/dist/atoms/index.d.ts +9 -0
- package/dist/atoms/index.d.ts.map +1 -0
- package/dist/atoms/index.mjs +2 -0
- package/dist/atoms/zl-alert.d.ts +56 -0
- package/dist/atoms/zl-alert.d.ts.map +1 -0
- package/dist/atoms/zl-button.d.ts +83 -0
- package/dist/atoms/zl-button.d.ts.map +1 -0
- package/dist/atoms/zl-card.d.ts +46 -0
- package/dist/atoms/zl-card.d.ts.map +1 -0
- package/dist/atoms/zl-field.d.ts +73 -0
- package/dist/atoms/zl-field.d.ts.map +1 -0
- package/dist/atoms/zl-icon.d.ts +48 -0
- package/dist/atoms/zl-icon.d.ts.map +1 -0
- package/dist/atoms/zl-page-shell.d.ts +42 -0
- package/dist/atoms/zl-page-shell.d.ts.map +1 -0
- package/dist/atoms/zl-passkey.d.ts +118 -0
- package/dist/atoms/zl-passkey.d.ts.map +1 -0
- package/dist/atoms/zl-pill.d.ts +55 -0
- package/dist/atoms/zl-pill.d.ts.map +1 -0
- package/dist/atoms-CmOTltTH.mjs +1311 -0
- package/dist/atoms-CmOTltTH.mjs.map +1 -0
- package/dist/index-7FDHEpv5.d.mts +996 -0
- package/dist/index-7FDHEpv5.d.mts.map +1 -0
- package/dist/index-DIUFZjXw.d.mts +6696 -0
- package/dist/index-DIUFZjXw.d.mts.map +1 -0
- package/dist/index-DaOSCm0T.d.mts +249 -0
- package/dist/index-DaOSCm0T.d.mts.map +1 -0
- package/dist/index-bZEvwHtq.d.mts +996 -0
- package/dist/index-bZEvwHtq.d.mts.map +1 -0
- package/dist/index.d.mts +31 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/internal/base64url.d.ts +18 -0
- package/dist/internal/base64url.d.ts.map +1 -0
- package/dist/internal/unique-id.d.ts +2 -0
- package/dist/internal/unique-id.d.ts.map +1 -0
- package/dist/manifest-DCC2FxCE.d.mts +39 -0
- package/dist/manifest-DCC2FxCE.d.mts.map +1 -0
- package/dist/manifest.d.ts +36 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifests.d.mts +9 -0
- package/dist/manifests.d.mts.map +1 -0
- package/dist/manifests.d.ts +6 -0
- package/dist/manifests.d.ts.map +1 -0
- package/dist/manifests.mjs +30 -0
- package/dist/manifests.mjs.map +1 -0
- package/dist/orchestrator/api-client.d.ts +33 -0
- package/dist/orchestrator/api-client.d.ts.map +1 -0
- package/dist/orchestrator/branding-to-tokens.d.ts +28 -0
- package/dist/orchestrator/branding-to-tokens.d.ts.map +1 -0
- package/dist/orchestrator/branding-validator.d.ts +7 -0
- package/dist/orchestrator/branding-validator.d.ts.map +1 -0
- package/dist/orchestrator/branding.d.ts +76 -0
- package/dist/orchestrator/branding.d.ts.map +1 -0
- package/dist/orchestrator/font-loader.d.ts +2 -0
- package/dist/orchestrator/font-loader.d.ts.map +1 -0
- package/dist/orchestrator/index.d.mts +2 -0
- package/dist/orchestrator/index.d.ts +25 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.mjs +2 -0
- package/dist/orchestrator/liquid.d.ts +28 -0
- package/dist/orchestrator/liquid.d.ts.map +1 -0
- package/dist/orchestrator/locales/de.d.ts +9 -0
- package/dist/orchestrator/locales/de.d.ts.map +1 -0
- package/dist/orchestrator/locales/en.d.ts +13 -0
- package/dist/orchestrator/locales/en.d.ts.map +1 -0
- package/dist/orchestrator/locales/index.d.ts +12 -0
- package/dist/orchestrator/locales/index.d.ts.map +1 -0
- package/dist/orchestrator/mandatory-gates.d.ts +26 -0
- package/dist/orchestrator/mandatory-gates.d.ts.map +1 -0
- package/dist/orchestrator/sanitiser.d.ts +6 -0
- package/dist/orchestrator/sanitiser.d.ts.map +1 -0
- package/dist/orchestrator/template-context.d.ts +55 -0
- package/dist/orchestrator/template-context.d.ts.map +1 -0
- package/dist/orchestrator/template-names.d.ts +16 -0
- package/dist/orchestrator/template-names.d.ts.map +1 -0
- package/dist/orchestrator/templates/auth-form.liquid.d.ts +14 -0
- package/dist/orchestrator/templates/auth-form.liquid.d.ts.map +1 -0
- package/dist/orchestrator/templates/default.liquid.d.ts +23 -0
- package/dist/orchestrator/templates/default.liquid.d.ts.map +1 -0
- package/dist/orchestrator/templates/passkey-upsell.liquid.d.ts +15 -0
- package/dist/orchestrator/templates/passkey-upsell.liquid.d.ts.map +1 -0
- package/dist/orchestrator/templates/signed-in.liquid.d.ts +20 -0
- package/dist/orchestrator/templates/signed-in.liquid.d.ts.map +1 -0
- package/dist/orchestrator/theme-controller.d.ts +30 -0
- package/dist/orchestrator/theme-controller.d.ts.map +1 -0
- package/dist/orchestrator/zitadel-login.d.ts +182 -0
- package/dist/orchestrator/zitadel-login.d.ts.map +1 -0
- package/dist/orchestrator/zitadel-logout.d.ts +86 -0
- package/dist/orchestrator/zitadel-logout.d.ts.map +1 -0
- package/dist/orchestrator-CNKo2WQG.mjs +3336 -0
- package/dist/orchestrator-CNKo2WQG.mjs.map +1 -0
- package/dist/styles/base.d.ts +7 -0
- package/dist/styles/base.d.ts.map +1 -0
- package/dist/styles/focus-ring.d.ts +7 -0
- package/dist/styles/focus-ring.d.ts.map +1 -0
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/surface.d.ts +8 -0
- package/dist/styles/surface.d.ts.map +1 -0
- package/dist/styles/tokens.d.ts +11 -0
- package/dist/styles/tokens.d.ts.map +1 -0
- package/dist/tokens/index.d.mts +2 -0
- package/dist/tokens/index.d.ts +9 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.mjs +2 -0
- package/dist/tokens-TXmurodq.mjs +244 -0
- package/dist/tokens-TXmurodq.mjs.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zl-field.d.ts","sourceRoot":"","sources":["../../src/atoms/zl-field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAOrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,cAAc,CAAC;AAGtB;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF,OAAgB,MAAM,4BAGpB;IAEU,QAAQ,CAAC,IAAI,SAAM;IACnB,QAAQ,CAAC,KAAK,SAAM;IACpB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAU;IACpC,QAAQ,CAAC,KAAK,SAAM;IACpB,QAAQ,CAAC,WAAW,SAAM;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAa;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IACjD,QAAQ,CAAC,KAAK,SAAM;IACpB,QAAQ,CAAC,OAAO,SAAM;IACe,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CACpF;IACsC,QAAQ,CAAC,mBAAmB,SACzD;IACoC,QAAQ,CAAC,YAAY,UAAQ;IACzD,QAAQ,CAAC,QAAQ,UAAS;IACX,QAAQ,CAAC,QAAQ,UAAS;IAC1B,QAAQ,CAAC,OAAO,UAAS;IAE5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IAEhD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmB;IAE7C,cAGC;IAEQ,iBAAiB,IAAI,IAAI,CAGjC;IAEQ,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAIvD;IAED,iBAAiB,IAAI,IAAI,CAExB;IAED,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEnD;IAEQ,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAE3C;IAEQ,MAAM,oCA2Ed;IAED,OAAO,CAAC,cAAc;IA6BtB,OAAO,CAAC,kBAAkB;IAqC1B,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,oBAAoB,CAG1B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;IAEF,OAAO,CAAC,WAAW,CAWjB;IAEF,OAAO,CAAC,WAAW,CAUjB;IAEF,OAAO,CAAC,YAAY,CAIlB;IAEF,OAAO,CAAC,aAAa,CAenB;CACH;AAED,eAAO,MAAM,eAAe,EAAE,YAmCpB,CAAC;AAEX,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { AtomManifest } from "../manifest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Atom: `<zl-icon>` — renders a curated glyph from the Lucide icon library.
|
|
5
|
+
*
|
|
6
|
+
* The Figma design system (file `8UjCXw8yemgljmbkWGrSfE`, Icons set
|
|
7
|
+
* `4103:10466`, sizes `16 | 24`) is explicitly built on Lucide. Rather than redrawing every glyph as an
|
|
8
|
+
* inline `<path>` (which inevitably drifts), we curate the auth surface's
|
|
9
|
+
* subset by importing each canonical Lucide node and exposing a stable
|
|
10
|
+
* kebab-case `name` API. To add a glyph: import it from `lucide`, add an
|
|
11
|
+
* entry to {@link ICON_NODES}, and extend the {@link IconName} union.
|
|
12
|
+
*
|
|
13
|
+
* Colour: by default the icon inherits `currentColor`. Set `tone` to one
|
|
14
|
+
* of the semantic states to pick up `--zl-color-icon-{error|success|disabled}`
|
|
15
|
+
* directly. The "palette" colour tokens (`--zl-color-icon-default-*`) are
|
|
16
|
+
* not exposed as `tone` values; consumers wanting those set `color:` on
|
|
17
|
+
* the host.
|
|
18
|
+
*
|
|
19
|
+
* Accessibility: glyphs with an entry in {@link DEFAULT_LABELS} expose an
|
|
20
|
+
* `aria-label` so they're meaningful when used standalone. When the icon
|
|
21
|
+
* is purely decorative (e.g. sitting next to a visible button label),
|
|
22
|
+
* pass `decorative` to force `aria-hidden="true"` and `role="presentation"`,
|
|
23
|
+
* which prevents the icon's name from leaking into the parent's
|
|
24
|
+
* accessible name (e.g. avoids "Loading Loading" on a loading button).
|
|
25
|
+
*/
|
|
26
|
+
export declare class ZlIcon extends LitElement {
|
|
27
|
+
static styles: import("lit").CSSResult[];
|
|
28
|
+
accessor name: IconName;
|
|
29
|
+
accessor size: IconSize;
|
|
30
|
+
accessor tone: IconTone;
|
|
31
|
+
accessor spin: boolean;
|
|
32
|
+
accessor decorative: boolean;
|
|
33
|
+
accessor label: string | undefined;
|
|
34
|
+
render(): import("lit").TemplateResult<1>;
|
|
35
|
+
}
|
|
36
|
+
/** Public, kebab-case glyph IDs. Add a new one by extending both this union and {@link ICON_NODES}. */
|
|
37
|
+
export type IconName = "plus" | "arrow-right" | "arrow-left" | "spinner" | "check" | "cross" | "warning" | "alert-circle" | "info" | "passkey" | "user" | "eye" | "eye-off";
|
|
38
|
+
/** Auth-surface glyph list — keep playgrounds and parity tests in sync. */
|
|
39
|
+
export declare const SHIPPED_ICON_NAMES: readonly ["plus", "arrow-right", "arrow-left", "spinner", "check", "cross", "warning", "alert-circle", "info", "passkey", "user", "eye", "eye-off"];
|
|
40
|
+
export type IconSize = "16" | "24";
|
|
41
|
+
export type IconTone = "default" | "error" | "success" | "disabled";
|
|
42
|
+
export declare const zlIconManifest: AtomManifest;
|
|
43
|
+
declare global {
|
|
44
|
+
interface HTMLElementTagNameMap {
|
|
45
|
+
"zl-icon": ZlIcon;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=zl-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zl-icon.d.ts","sourceRoot":"","sources":["../../src/atoms/zl-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAuBhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,MAAO,SAAQ,UAAU;IAEpC,OAAgB,MAAM,4BAAwC;IAElD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAU;IAEhB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAQ;IAE/B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAa;IAErB,QAAQ,CAAC,IAAI,UAAS;IAEtB,QAAQ,CAAC,UAAU,UAAS;IAE5D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAa;IAElD,MAAM,oCA0Bd;CACF;AAED,uGAAuG;AACvG,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,aAAa,GACb,YAAY,GACZ,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,cAAc,GACd,MAAM,GACN,SAAS,GACT,MAAM,GACN,KAAK,GACL,SAAS,CAAC;AAEd,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,qJAcS,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnC,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAoDpE,eAAO,MAAM,cAAc,EAAE,YAMnB,CAAC;AAEX,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { AtomManifest } from "../manifest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Atom: `<zl-page-shell>` — the full-bleed auth-page chrome the
|
|
5
|
+
* orchestrator injects around every flow template. Responsible for the
|
|
6
|
+
* dark background, vertical centring, responsive padding, and footer
|
|
7
|
+
* attribution slot.
|
|
8
|
+
*
|
|
9
|
+
* Spec lineage (file `xkvBjkOJ8ENuHdTGZHXezK`):
|
|
10
|
+
* - 2xl frames (1536 × 960), e.g. sign-up `6593:141741`, passkey
|
|
11
|
+
* `6594:630`, signed-in `6596:132844`. The outer wrapper uses
|
|
12
|
+
* `py-[52px]` (vertical padding) with `p-[16px]` (spacing-03) on
|
|
13
|
+
* the inner Form container, giving 52px / 16px at 2xl.
|
|
14
|
+
*
|
|
15
|
+
* Per-state Figma values:
|
|
16
|
+
*
|
|
17
|
+
* background surface.default-black (#0f0f11)
|
|
18
|
+
* color text.primary-white (#f4f4f6) inherited
|
|
19
|
+
* min-height 100vh — anchors footer to the viewport bottom even on
|
|
20
|
+
* short cards
|
|
21
|
+
* padding @md+ padding-block 52px, padding-inline 16px (matches
|
|
22
|
+
* Figma 2xl wrapper). 52px isn't a token; use raw value.
|
|
23
|
+
* padding @xs (< 48rem)
|
|
24
|
+
* padding-block 32px (spacing-05), padding-inline 16px
|
|
25
|
+
* (spacing-03) — tighter so the card breathes on
|
|
26
|
+
* narrow phones.
|
|
27
|
+
* gap 24px (spacing-04) between header / main / footer slots
|
|
28
|
+
* footer min-height 1.5rem to reserve room for the attribution
|
|
29
|
+
* pill even when the slot is empty (prevents jitter).
|
|
30
|
+
*/
|
|
31
|
+
export declare class ZlPageShell extends LitElement {
|
|
32
|
+
static styles: import("lit").CSSResult[];
|
|
33
|
+
render(): import("lit").TemplateResult<1>;
|
|
34
|
+
private lightDomSlotFilled;
|
|
35
|
+
}
|
|
36
|
+
export declare const zlPageShellManifest: AtomManifest;
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
"zl-page-shell": ZlPageShell;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=zl-page-shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zl-page-shell.d.ts","sourceRoot":"","sources":["../../src/atoms/zl-page-shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,WAAY,SAAQ,UAAU;IACzC,OAAgB,MAAM,4BAGpB;IAEO,MAAM,oCAsBd;IAED,OAAO,CAAC,kBAAkB;CAM3B;AAED,eAAO,MAAM,mBAAmB,EAAE,YAMxB,CAAC;AAEX,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,qBAAqB;QAC7B,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { AtomManifest } from "../manifest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Detail shape emitted by the `zl-passkey-result` event.
|
|
5
|
+
*
|
|
6
|
+
* Mirrors the `passkey-proof.yaml` schema (serialized PublicKeyCredential)
|
|
7
|
+
* plus the `challenge_id` the orchestrator needs for the submit body.
|
|
8
|
+
*/
|
|
9
|
+
export type ZlPasskeyResultDetail = {
|
|
10
|
+
challenge_id: string;
|
|
11
|
+
method: "passkey";
|
|
12
|
+
proof: {
|
|
13
|
+
id: string;
|
|
14
|
+
rawId: string;
|
|
15
|
+
type: "public-key";
|
|
16
|
+
response: {
|
|
17
|
+
clientDataJSON: string;
|
|
18
|
+
attestationObject?: string;
|
|
19
|
+
authenticatorData?: string;
|
|
20
|
+
signature?: string;
|
|
21
|
+
userHandle?: string;
|
|
22
|
+
};
|
|
23
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Detail shape emitted by the `zl-passkey-error` event.
|
|
28
|
+
*/
|
|
29
|
+
export type ZlPasskeyErrorDetail = {
|
|
30
|
+
challenge_id: string;
|
|
31
|
+
error: string;
|
|
32
|
+
aborted: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Atom: `<zl-passkey>` — invisible WebAuthn ceremony handler.
|
|
36
|
+
*
|
|
37
|
+
* This component is intentionally invisible. It is mounted by the Liquid
|
|
38
|
+
* template when `step.challenge.type === "passkey"`. On mount, it reads
|
|
39
|
+
* the challenge options from attributes, triggers the appropriate
|
|
40
|
+
* `navigator.credentials` ceremony, and emits the result.
|
|
41
|
+
*
|
|
42
|
+
* The orchestrator listens for `zl-passkey-result` to auto-submit the
|
|
43
|
+
* proof via `challenge_response` on the flow submit body.
|
|
44
|
+
*
|
|
45
|
+
* Two modes:
|
|
46
|
+
* - `ceremony="authenticate"` → `navigator.credentials.get()` (login)
|
|
47
|
+
* - `ceremony="register"` → `navigator.credentials.create()` (registration)
|
|
48
|
+
*
|
|
49
|
+
* The options are passed as a JSON string via the `options` attribute (or
|
|
50
|
+
* as a JS object via the `.options` property). These are the
|
|
51
|
+
* `PublicKeyCredentialRequestOptions` or `PublicKeyCredentialCreationOptions`
|
|
52
|
+
* straight from the server's challenge response.
|
|
53
|
+
*
|
|
54
|
+
* Spec: ADR 011 — Passkey Action Contract
|
|
55
|
+
*/
|
|
56
|
+
export declare class ZlPasskey extends LitElement {
|
|
57
|
+
/**
|
|
58
|
+
* Which WebAuthn ceremony to perform.
|
|
59
|
+
* - `authenticate` → `navigator.credentials.get()` (default, login)
|
|
60
|
+
* - `register` → `navigator.credentials.create()` (passkey enrollment)
|
|
61
|
+
*/
|
|
62
|
+
accessor ceremony: "authenticate" | "register";
|
|
63
|
+
/**
|
|
64
|
+
* Server-side challenge identifier. Echoed back in the result event
|
|
65
|
+
* so the orchestrator can include it in `challenge_response.challenge_id`.
|
|
66
|
+
*/
|
|
67
|
+
accessor challengeId: string;
|
|
68
|
+
/**
|
|
69
|
+
* WebAuthn options from the server. Accepts either:
|
|
70
|
+
* - A JSON string (via HTML attribute)
|
|
71
|
+
* - A JS object (via property binding)
|
|
72
|
+
*
|
|
73
|
+
* For `ceremony="authenticate"`: `PublicKeyCredentialRequestOptions`
|
|
74
|
+
* For `ceremony="register"`: `PublicKeyCredentialCreationOptions`
|
|
75
|
+
*/
|
|
76
|
+
accessor options: Record<string, unknown> | null;
|
|
77
|
+
/**
|
|
78
|
+
* When true, the ceremony is not started automatically on mount.
|
|
79
|
+
* The consumer must call `startCeremony()` manually.
|
|
80
|
+
*/
|
|
81
|
+
accessor manual: boolean;
|
|
82
|
+
private abortController;
|
|
83
|
+
connectedCallback(): void;
|
|
84
|
+
disconnectedCallback(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Abort any in-flight WebAuthn ceremony. Called automatically when the
|
|
87
|
+
* component disconnects (step change, page navigation).
|
|
88
|
+
*/
|
|
89
|
+
abort(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Trigger the WebAuthn ceremony. Resolves when the ceremony completes
|
|
92
|
+
* or rejects on error/abort.
|
|
93
|
+
*/
|
|
94
|
+
startCeremony(): Promise<void>;
|
|
95
|
+
private getCredential;
|
|
96
|
+
private createCredential;
|
|
97
|
+
/**
|
|
98
|
+
* Decode a list of credential descriptors from the server's base64url
|
|
99
|
+
* format to the browser's ArrayBuffer format.
|
|
100
|
+
*/
|
|
101
|
+
private decodeCredentialDescriptors;
|
|
102
|
+
/**
|
|
103
|
+
* Serialize a `PublicKeyCredential` to the JSON shape defined in
|
|
104
|
+
* `passkey-proof.yaml`. All `ArrayBuffer` fields are base64url-encoded.
|
|
105
|
+
*/
|
|
106
|
+
private serializeCredential;
|
|
107
|
+
private emitResult;
|
|
108
|
+
private emitError;
|
|
109
|
+
/** Invisible component — no shadow DOM rendering needed. */
|
|
110
|
+
createRenderRoot(): this;
|
|
111
|
+
}
|
|
112
|
+
export declare const zlPasskeyManifest: AtomManifest;
|
|
113
|
+
declare global {
|
|
114
|
+
interface HTMLElementTagNameMap {
|
|
115
|
+
"zl-passkey": ZlPasskey;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=zl-passkey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zl-passkey.d.ts","sourceRoot":"","sources":["../../src/atoms/zl-passkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE;YACR,cAAc,EAAE,MAAM,CAAC;YACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;QACF,uBAAuB,CAAC,EAAE,UAAU,GAAG,gBAAgB,CAAC;KACzD,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC;;;;OAIG;IACS,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,UAAU,CAAkB;IAE5E;;;OAGG;IACsC,QAAQ,CAAC,WAAW,SAAM;IAEnE;;;;;;;OAOG;IAiBH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAQ;IAExD;;;OAGG;IAC0B,QAAQ,CAAC,MAAM,UAAS;IAErD,OAAO,CAAC,eAAe,CAAgC;IAE9C,iBAAiB,IAAI,IAAI,CAKjC;IAEQ,oBAAoB,IAAI,IAAI,CAGpC;IAED;;;OAGG;IACH,KAAK,IAAI,IAAI,CAGZ;IAED;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAqCnC;YAKa,aAAa;YAyBb,gBAAgB;IAyC9B;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAWnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA2C3B,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,SAAS;IAejB,4DAA4D;IACnD,gBAAgB,IAAI,IAAI,CAEhC;CACF;AAED,eAAO,MAAM,iBAAiB,EAAE,YAOtB,CAAC;AAEX,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { AtomManifest } from "../manifest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Atom: `<zl-pill>` — small inline chip used for status and attribution.
|
|
5
|
+
*
|
|
6
|
+
* Spec lineage (file `xkvBjkOJ8ENuHdTGZHXezK`):
|
|
7
|
+
* - canonical instance: node `6593:141767` ("Social media" frame =
|
|
8
|
+
* "Secured with Zitadel" attribution pill on every sign-in screen).
|
|
9
|
+
*
|
|
10
|
+
* Two roles in scope:
|
|
11
|
+
* - **Attribution pill** ("Secured with Zitadel") rendered by the
|
|
12
|
+
* orchestrator footer when `branding.attribution` is enabled. This is
|
|
13
|
+
* the only canonical pill in the Figma screens; its spec is the
|
|
14
|
+
* source of truth for every dimension.
|
|
15
|
+
* - **Status pill** (decorative `tone` variants — pink / purple /
|
|
16
|
+
* orange / success) reuses the same geometry and typography, only
|
|
17
|
+
* swapping the tint colour. The tones don't have screen instances in
|
|
18
|
+
* Figma yet; when they ship, re-verify each tone against its master.
|
|
19
|
+
*
|
|
20
|
+
* Per-state Figma values (from node `6593:141767`):
|
|
21
|
+
*
|
|
22
|
+
* surface bg layered linear-gradient(182deg,
|
|
23
|
+
* rgba(72,74,87,0.6) 28.65%,
|
|
24
|
+
* rgba(15,15,17,0.6) 81.82%)
|
|
25
|
+
* over surface.default-primary-gray (#252528)
|
|
26
|
+
* border 1px solid #484a57 (our token: border.default-gray-200 —
|
|
27
|
+
* Figma calls this "default-gray-100"; our gray primitive
|
|
28
|
+
* ladder is offset by one slot, so map to gray-200)
|
|
29
|
+
* radius 100px (full pill)
|
|
30
|
+
* size 186×40px frame (`get_metadata` on `6593:141767`)
|
|
31
|
+
* padding 16px inline (spacing-03) / 10px block (spacing metadata:
|
|
32
|
+
* text y=10, line 20px, frame height 40px)
|
|
33
|
+
* gap 8px (spacing-02)
|
|
34
|
+
* font Arimo Regular 14/20, letter-spacing 0, color
|
|
35
|
+
* text.primary-white (#f4f4f6), text-transform none
|
|
36
|
+
* focus-vis 2px solid focus.color, offset 2px
|
|
37
|
+
*
|
|
38
|
+
* content "Secured with" + 65×16 logotype SVG (`attribution-markup.ts`);
|
|
39
|
+
* logotype `margin-top: 2px` (Figma text y=10, logotype y=12)
|
|
40
|
+
*/
|
|
41
|
+
export declare class ZlPill extends LitElement {
|
|
42
|
+
static styles: import("lit").CSSResult[];
|
|
43
|
+
accessor tone: "neutral" | "pink" | "purple" | "orange" | "success";
|
|
44
|
+
accessor href: string | undefined;
|
|
45
|
+
accessor ariaLabel: string | null;
|
|
46
|
+
private surfaceClasses;
|
|
47
|
+
render(): import("lit").TemplateResult<1>;
|
|
48
|
+
}
|
|
49
|
+
export declare const zlPillManifest: AtomManifest;
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
"zl-pill": ZlPill;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=zl-pill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zl-pill.d.ts","sourceRoot":"","sources":["../../src/atoms/zl-pill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAMhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBACa,MAAO,SAAQ,UAAU;IACpC,OAAgB,MAAM,4BAA6D;IAEvE,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAa;IAEhF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAa;IAE1D,SACkB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElD,OAAO,CAAC,cAAc;IAIb,MAAM,oCAYd;CACF;AAED,eAAO,MAAM,cAAc,EAAE,YAMnB,CAAC;AAEX,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|