@nebulr-group/bridge-svelte 0.5.0 → 0.5.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.
@@ -32,6 +32,20 @@
32
32
  onError?: (error: Error) => void;
33
33
  onSsoClick?: (connectionType: string) => void;
34
34
  heading?: string;
35
+ /**
36
+ * TBP-537 — renders in place of `heading` on the CREDENTIALS step only.
37
+ *
38
+ * Sub-steps (forgot-password, magic-link, passkey-request) each own their
39
+ * heading, so a consumer that wraps this component in its own titled layout
40
+ * ends up stacking two headings the moment the user leaves the credentials
41
+ * step — "Log in to your account" sitting above "Create a passkey".
42
+ *
43
+ * Passing the outer title down as a snippet puts every step's heading under
44
+ * this component's control: the consumer's markup (title + subtitle, or
45
+ * whatever it needs) appears on the credentials step and disappears on the
46
+ * others, without the consumer having to track which step is active.
47
+ */
48
+ headingSnippet?: Snippet;
35
49
  ssoConnections?: FederationConnection[];
36
50
  /**
37
51
  * SSO kickoff strategy for the built-in SsoButtons.
@@ -54,6 +68,7 @@
54
68
  onError,
55
69
  onSsoClick,
56
70
  heading = '',
71
+ headingSnippet,
57
72
  ssoConnections = [],
58
73
  ssoMode = 'redirect',
59
74
  footer,
@@ -299,7 +314,7 @@
299
314
 
300
315
  <!-- Credentials step (email + password together) -->
301
316
  {:else}
302
- <AuthFormWrapper {heading} class={className} {style} {...rest}>
317
+ <AuthFormWrapper {heading} {headingSnippet} class={className} {style} {...rest}>
303
318
  {#if error}
304
319
  <Alert variant="error">{error}</Alert>
305
320
  {/if}
@@ -17,6 +17,20 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
17
17
  onError?: (error: Error) => void;
18
18
  onSsoClick?: (connectionType: string) => void;
19
19
  heading?: string;
20
+ /**
21
+ * TBP-537 — renders in place of `heading` on the CREDENTIALS step only.
22
+ *
23
+ * Sub-steps (forgot-password, magic-link, passkey-request) each own their
24
+ * heading, so a consumer that wraps this component in its own titled layout
25
+ * ends up stacking two headings the moment the user leaves the credentials
26
+ * step — "Log in to your account" sitting above "Create a passkey".
27
+ *
28
+ * Passing the outer title down as a snippet puts every step's heading under
29
+ * this component's control: the consumer's markup (title + subtitle, or
30
+ * whatever it needs) appears on the credentials step and disappears on the
31
+ * others, without the consumer having to track which step is active.
32
+ */
33
+ headingSnippet?: Snippet;
20
34
  ssoConnections?: FederationConnection[];
21
35
  /**
22
36
  * SSO kickoff strategy for the built-in SsoButtons.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebulr-group/bridge-svelte",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Bridge Svelte library, This library helps you to add bridge authentication and feature flags, and payments to your svelte application.",
5
5
  "author": "Iman Pouya",
6
6
  "license": "MIT",