@skdx/web-components-blocks 0.34.0 → 0.35.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/custom-elements.json +5067 -285
- package/dist/chat-composer/ChatComposer.cjs +41 -0
- package/dist/chat-composer/ChatComposer.d.cts +125 -0
- package/dist/chat-composer/ChatComposer.d.ts +125 -0
- package/dist/chat-composer/ChatComposer.js +41 -0
- package/dist/chat-composer/index.cjs +1 -0
- package/dist/chat-composer/index.d.cts +1 -0
- package/dist/chat-composer/index.d.ts +1 -0
- package/dist/chat-composer/index.js +1 -0
- package/dist/chat-message/ChatMessage.cjs +26 -0
- package/dist/chat-message/ChatMessage.d.cts +74 -0
- package/dist/chat-message/ChatMessage.d.ts +74 -0
- package/dist/chat-message/ChatMessage.js +26 -0
- package/dist/chat-message/index.cjs +1 -0
- package/dist/chat-message/index.d.cts +1 -0
- package/dist/chat-message/index.d.ts +1 -0
- package/dist/chat-message/index.js +1 -0
- package/dist/comment/Comment.cjs +26 -0
- package/dist/comment/Comment.d.cts +66 -0
- package/dist/comment/Comment.d.ts +66 -0
- package/dist/comment/Comment.js +26 -0
- package/dist/comment/index.cjs +1 -0
- package/dist/comment/index.d.cts +1 -0
- package/dist/comment/index.d.ts +1 -0
- package/dist/comment/index.js +1 -0
- package/dist/comment-thread/CommentThread.cjs +27 -0
- package/dist/comment-thread/CommentThread.d.cts +67 -0
- package/dist/comment-thread/CommentThread.d.ts +67 -0
- package/dist/comment-thread/CommentThread.js +27 -0
- package/dist/comment-thread/index.cjs +1 -0
- package/dist/comment-thread/index.d.cts +1 -0
- package/dist/comment-thread/index.d.ts +1 -0
- package/dist/comment-thread/index.js +1 -0
- package/dist/confirm-dialog/ConfirmDialog.cjs +38 -0
- package/dist/confirm-dialog/ConfirmDialog.d.cts +101 -0
- package/dist/confirm-dialog/ConfirmDialog.d.ts +101 -0
- package/dist/confirm-dialog/ConfirmDialog.js +38 -0
- package/dist/confirm-dialog/index.cjs +1 -0
- package/dist/confirm-dialog/index.d.cts +1 -0
- package/dist/confirm-dialog/index.d.ts +1 -0
- package/dist/confirm-dialog/index.js +1 -0
- package/dist/conversation-list/ConversationList.cjs +52 -0
- package/dist/conversation-list/ConversationList.d.cts +124 -0
- package/dist/conversation-list/ConversationList.d.ts +124 -0
- package/dist/conversation-list/ConversationList.js +52 -0
- package/dist/conversation-list/index.cjs +1 -0
- package/dist/conversation-list/index.d.cts +1 -0
- package/dist/conversation-list/index.d.ts +1 -0
- package/dist/conversation-list/index.js +1 -0
- package/dist/empty-state/EmptyState.cjs +29 -0
- package/dist/empty-state/EmptyState.d.cts +69 -0
- package/dist/empty-state/EmptyState.d.ts +69 -0
- package/dist/empty-state/EmptyState.js +29 -0
- package/dist/empty-state/index.cjs +1 -0
- package/dist/empty-state/index.d.cts +1 -0
- package/dist/empty-state/index.d.ts +1 -0
- package/dist/empty-state/index.js +1 -0
- package/dist/filter-bar/FilterBar.cjs +44 -0
- package/dist/filter-bar/FilterBar.d.cts +110 -0
- package/dist/filter-bar/FilterBar.d.ts +110 -0
- package/dist/filter-bar/FilterBar.js +44 -0
- package/dist/filter-bar/index.cjs +1 -0
- package/dist/filter-bar/index.d.cts +1 -0
- package/dist/filter-bar/index.d.ts +1 -0
- package/dist/filter-bar/index.js +1 -0
- package/dist/forgot-password-page/ForgotPasswordPage.cjs +57 -0
- package/dist/forgot-password-page/ForgotPasswordPage.d.cts +95 -0
- package/dist/forgot-password-page/ForgotPasswordPage.d.ts +95 -0
- package/dist/forgot-password-page/ForgotPasswordPage.js +57 -0
- package/dist/forgot-password-page/index.cjs +1 -0
- package/dist/forgot-password-page/index.d.cts +1 -0
- package/dist/forgot-password-page/index.d.ts +1 -0
- package/dist/forgot-password-page/index.js +1 -0
- package/dist/form-section/FormSection.cjs +28 -0
- package/dist/form-section/FormSection.d.cts +63 -0
- package/dist/form-section/FormSection.d.ts +63 -0
- package/dist/form-section/FormSection.js +28 -0
- package/dist/form-section/index.cjs +1 -0
- package/dist/form-section/index.d.cts +1 -0
- package/dist/form-section/index.d.ts +1 -0
- package/dist/form-section/index.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1 -1
- package/dist/internal/slots.cjs +1 -1
- package/dist/internal/slots.d.cts +2 -0
- package/dist/internal/slots.d.ts +2 -0
- package/dist/internal/slots.js +1 -1
- package/dist/notification-center/NotificationCenter.cjs +74 -0
- package/dist/notification-center/NotificationCenter.d.cts +147 -0
- package/dist/notification-center/NotificationCenter.d.ts +147 -0
- package/dist/notification-center/NotificationCenter.js +74 -0
- package/dist/notification-center/index.cjs +1 -0
- package/dist/notification-center/index.d.cts +1 -0
- package/dist/notification-center/index.d.ts +1 -0
- package/dist/notification-center/index.js +1 -0
- package/dist/onboarding-checklist/OnboardingChecklist.cjs +55 -0
- package/dist/onboarding-checklist/OnboardingChecklist.d.cts +89 -0
- package/dist/onboarding-checklist/OnboardingChecklist.d.ts +89 -0
- package/dist/onboarding-checklist/OnboardingChecklist.js +55 -0
- package/dist/onboarding-checklist/index.cjs +1 -0
- package/dist/onboarding-checklist/index.d.cts +1 -0
- package/dist/onboarding-checklist/index.d.ts +1 -0
- package/dist/onboarding-checklist/index.js +1 -0
- package/dist/reset-password-page/ResetPasswordPage.cjs +59 -0
- package/dist/reset-password-page/ResetPasswordPage.d.cts +104 -0
- package/dist/reset-password-page/ResetPasswordPage.d.ts +104 -0
- package/dist/reset-password-page/ResetPasswordPage.js +59 -0
- package/dist/reset-password-page/index.cjs +1 -0
- package/dist/reset-password-page/index.d.cts +1 -0
- package/dist/reset-password-page/index.d.ts +1 -0
- package/dist/reset-password-page/index.js +1 -0
- package/dist/sign-up-page/SignUpPage.cjs +97 -0
- package/dist/sign-up-page/SignUpPage.d.cts +133 -0
- package/dist/sign-up-page/SignUpPage.d.ts +133 -0
- package/dist/sign-up-page/SignUpPage.js +97 -0
- package/dist/sign-up-page/index.cjs +1 -0
- package/dist/sign-up-page/index.d.cts +1 -0
- package/dist/sign-up-page/index.d.ts +1 -0
- package/dist/sign-up-page/index.js +1 -0
- package/dist/stat-card/StatCard.cjs +61 -0
- package/dist/stat-card/StatCard.d.cts +90 -0
- package/dist/stat-card/StatCard.d.ts +90 -0
- package/dist/stat-card/StatCard.js +61 -0
- package/dist/stat-card/index.cjs +1 -0
- package/dist/stat-card/index.d.cts +1 -0
- package/dist/stat-card/index.d.ts +1 -0
- package/dist/stat-card/index.js +1 -0
- package/dist/usage-card/UsageCard.cjs +42 -0
- package/dist/usage-card/UsageCard.d.cts +81 -0
- package/dist/usage-card/UsageCard.d.ts +81 -0
- package/dist/usage-card/UsageCard.js +42 -0
- package/dist/usage-card/index.cjs +1 -0
- package/dist/usage-card/index.d.cts +1 -0
- package/dist/usage-card/index.d.ts +1 -0
- package/dist/usage-card/index.js +1 -0
- package/dist/usage-card/usage.cjs +1 -0
- package/dist/usage-card/usage.d.cts +18 -0
- package/dist/usage-card/usage.d.ts +18 -0
- package/dist/usage-card/usage.js +1 -0
- package/dist/user-menu/UserMenu.cjs +30 -0
- package/dist/user-menu/UserMenu.d.cts +84 -0
- package/dist/user-menu/UserMenu.d.ts +84 -0
- package/dist/user-menu/UserMenu.js +30 -0
- package/dist/user-menu/index.cjs +1 -0
- package/dist/user-menu/index.d.cts +1 -0
- package/dist/user-menu/index.d.ts +1 -0
- package/dist/user-menu/index.js +1 -0
- package/dist/verification-page/VerificationPage.cjs +63 -0
- package/dist/verification-page/VerificationPage.d.cts +149 -0
- package/dist/verification-page/VerificationPage.d.ts +149 -0
- package/dist/verification-page/VerificationPage.js +63 -0
- package/dist/verification-page/index.cjs +1 -0
- package/dist/verification-page/index.d.cts +1 -0
- package/dist/verification-page/index.d.ts +1 -0
- package/dist/verification-page/index.js +1 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.cjs +69 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.d.cts +165 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.d.ts +165 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.js +69 -0
- package/dist/workspace-switcher/index.cjs +1 -0
- package/dist/workspace-switcher/index.d.cts +1 -0
- package/dist/workspace-switcher/index.d.ts +1 -0
- package/dist/workspace-switcher/index.js +1 -0
- package/package.json +272 -6
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import '@skdx/web-components/alert';
|
|
3
|
+
import '@skdx/web-components/button';
|
|
4
|
+
import '@skdx/web-components/field';
|
|
5
|
+
import '@skdx/web-components/form';
|
|
6
|
+
import '@skdx/web-components/heading';
|
|
7
|
+
import '@skdx/web-components/password-input';
|
|
8
|
+
/** What a `reset-password` event carries: the new password the form held. */
|
|
9
|
+
export interface SkdxResetPasswordDetail {
|
|
10
|
+
/** The new password, already matched against the confirmation when one renders. */
|
|
11
|
+
password: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reset-password block: a new-password field with its rules, an optional
|
|
15
|
+
* confirmation matched against it, and a submit button, replaced entirely by a
|
|
16
|
+
* success alert once the change is accepted.
|
|
17
|
+
*
|
|
18
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
19
|
+
* targets: `.skdx-reset-password-page` on the host, then `__panel`, `__title`,
|
|
20
|
+
* `__error`, `__success`, `__form`, `__field`, `__requirements`, `__submit`
|
|
21
|
+
* and `__footer`.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <skdx-reset-password-page
|
|
26
|
+
* id="reset"
|
|
27
|
+
* confirm-password-label="Confirm new password"
|
|
28
|
+
* >
|
|
29
|
+
* <span slot="requirements">At least 12 characters.</span>
|
|
30
|
+
* </skdx-reset-password-page>
|
|
31
|
+
* <script>
|
|
32
|
+
* document
|
|
33
|
+
* .getElementById('reset')
|
|
34
|
+
* .addEventListener('reset-password', (event) => console.log(event.detail.password));
|
|
35
|
+
* </script>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @slot - Extra fields rendered inside the form, above the submit button.
|
|
39
|
+
* @slot requirements - Password rules used as the new-password field's description.
|
|
40
|
+
* @slot footer - Navigation below the form, such as a link back to the sign-in page.
|
|
41
|
+
* @fires reset-password - Fires with `{ password }` when the form submits with a valid password that matches the confirmation.
|
|
42
|
+
*/
|
|
43
|
+
export declare class SkdxResetPasswordPage extends LitElement {
|
|
44
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
45
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
46
|
+
/**
|
|
47
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
48
|
+
* @default 'Choose a new password'
|
|
49
|
+
*/
|
|
50
|
+
title: string;
|
|
51
|
+
/**
|
|
52
|
+
* Message rendered into a derived error Alert above the form. The block never clears it.
|
|
53
|
+
* @default undefined — no error region renders.
|
|
54
|
+
*/
|
|
55
|
+
error?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Confirmation rendered into a derived success Alert that replaces the form entirely.
|
|
58
|
+
* @default undefined — the form renders instead.
|
|
59
|
+
*/
|
|
60
|
+
success?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Marks the request in flight, making the submit button busy while both fields stay editable.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
pending: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Label of the field where the new password is typed.
|
|
68
|
+
* @default 'New password'
|
|
69
|
+
*/
|
|
70
|
+
passwordLabel: string;
|
|
71
|
+
/**
|
|
72
|
+
* Label of the confirmation field; supplying it is what turns password matching on.
|
|
73
|
+
* @default undefined — no confirmation field renders.
|
|
74
|
+
*/
|
|
75
|
+
confirmPasswordLabel?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Validation message pushed onto the confirmation field when the two passwords differ.
|
|
78
|
+
* @default 'Passwords do not match'
|
|
79
|
+
*/
|
|
80
|
+
passwordMismatchMessage: string;
|
|
81
|
+
/**
|
|
82
|
+
* Text of the form's submit button.
|
|
83
|
+
* @default 'Update password'
|
|
84
|
+
*/
|
|
85
|
+
submitLabel: string;
|
|
86
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
87
|
+
private readonly titleId;
|
|
88
|
+
connectedCallback(): void;
|
|
89
|
+
disconnectedCallback(): void;
|
|
90
|
+
/** Whether the consumer supplied content for `name` — still true once it has been moved in. */
|
|
91
|
+
private hasSlotted;
|
|
92
|
+
private region;
|
|
93
|
+
private get contentRegion();
|
|
94
|
+
private get hasContent();
|
|
95
|
+
protected updated(): void;
|
|
96
|
+
private readonly handleSubmit;
|
|
97
|
+
private readonly clearMismatch;
|
|
98
|
+
render(): TemplateResult;
|
|
99
|
+
}
|
|
100
|
+
declare global {
|
|
101
|
+
interface HTMLElementTagNameMap {
|
|
102
|
+
'skdx-reset-password-page': SkdxResetPasswordPage;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import '@skdx/web-components/alert';
|
|
3
|
+
import '@skdx/web-components/button';
|
|
4
|
+
import '@skdx/web-components/field';
|
|
5
|
+
import '@skdx/web-components/form';
|
|
6
|
+
import '@skdx/web-components/heading';
|
|
7
|
+
import '@skdx/web-components/password-input';
|
|
8
|
+
/** What a `reset-password` event carries: the new password the form held. */
|
|
9
|
+
export interface SkdxResetPasswordDetail {
|
|
10
|
+
/** The new password, already matched against the confirmation when one renders. */
|
|
11
|
+
password: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reset-password block: a new-password field with its rules, an optional
|
|
15
|
+
* confirmation matched against it, and a submit button, replaced entirely by a
|
|
16
|
+
* success alert once the change is accepted.
|
|
17
|
+
*
|
|
18
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
19
|
+
* targets: `.skdx-reset-password-page` on the host, then `__panel`, `__title`,
|
|
20
|
+
* `__error`, `__success`, `__form`, `__field`, `__requirements`, `__submit`
|
|
21
|
+
* and `__footer`.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <skdx-reset-password-page
|
|
26
|
+
* id="reset"
|
|
27
|
+
* confirm-password-label="Confirm new password"
|
|
28
|
+
* >
|
|
29
|
+
* <span slot="requirements">At least 12 characters.</span>
|
|
30
|
+
* </skdx-reset-password-page>
|
|
31
|
+
* <script>
|
|
32
|
+
* document
|
|
33
|
+
* .getElementById('reset')
|
|
34
|
+
* .addEventListener('reset-password', (event) => console.log(event.detail.password));
|
|
35
|
+
* </script>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @slot - Extra fields rendered inside the form, above the submit button.
|
|
39
|
+
* @slot requirements - Password rules used as the new-password field's description.
|
|
40
|
+
* @slot footer - Navigation below the form, such as a link back to the sign-in page.
|
|
41
|
+
* @fires reset-password - Fires with `{ password }` when the form submits with a valid password that matches the confirmation.
|
|
42
|
+
*/
|
|
43
|
+
export declare class SkdxResetPasswordPage extends LitElement {
|
|
44
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
45
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
46
|
+
/**
|
|
47
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
48
|
+
* @default 'Choose a new password'
|
|
49
|
+
*/
|
|
50
|
+
title: string;
|
|
51
|
+
/**
|
|
52
|
+
* Message rendered into a derived error Alert above the form. The block never clears it.
|
|
53
|
+
* @default undefined — no error region renders.
|
|
54
|
+
*/
|
|
55
|
+
error?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Confirmation rendered into a derived success Alert that replaces the form entirely.
|
|
58
|
+
* @default undefined — the form renders instead.
|
|
59
|
+
*/
|
|
60
|
+
success?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Marks the request in flight, making the submit button busy while both fields stay editable.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
pending: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Label of the field where the new password is typed.
|
|
68
|
+
* @default 'New password'
|
|
69
|
+
*/
|
|
70
|
+
passwordLabel: string;
|
|
71
|
+
/**
|
|
72
|
+
* Label of the confirmation field; supplying it is what turns password matching on.
|
|
73
|
+
* @default undefined — no confirmation field renders.
|
|
74
|
+
*/
|
|
75
|
+
confirmPasswordLabel?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Validation message pushed onto the confirmation field when the two passwords differ.
|
|
78
|
+
* @default 'Passwords do not match'
|
|
79
|
+
*/
|
|
80
|
+
passwordMismatchMessage: string;
|
|
81
|
+
/**
|
|
82
|
+
* Text of the form's submit button.
|
|
83
|
+
* @default 'Update password'
|
|
84
|
+
*/
|
|
85
|
+
submitLabel: string;
|
|
86
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
87
|
+
private readonly titleId;
|
|
88
|
+
connectedCallback(): void;
|
|
89
|
+
disconnectedCallback(): void;
|
|
90
|
+
/** Whether the consumer supplied content for `name` — still true once it has been moved in. */
|
|
91
|
+
private hasSlotted;
|
|
92
|
+
private region;
|
|
93
|
+
private get contentRegion();
|
|
94
|
+
private get hasContent();
|
|
95
|
+
protected updated(): void;
|
|
96
|
+
private readonly handleSubmit;
|
|
97
|
+
private readonly clearMismatch;
|
|
98
|
+
render(): TemplateResult;
|
|
99
|
+
}
|
|
100
|
+
declare global {
|
|
101
|
+
interface HTMLElementTagNameMap {
|
|
102
|
+
'skdx-reset-password-page': SkdxResetPasswordPage;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var g=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var r=(l,n,e,i)=>{for(var s=i>1?void 0:i?b(n,e):n,a=l.length-1,c;a>=0;a--)(c=l[a])&&(s=(i?c(n,e,s):c(s))||s);return i&&s&&g(n,e,s),s};import{html as o,LitElement as f,nothing as p}from"lit";import{property as d}from"lit/decorators.js";import{customElement as k}from"../internal/define.js";import{emit as x}from"../internal/events.js";import{hasUnslottedChild as w,placeSlotted as v}from"../internal/slots.js";import"@skdx/web-components/alert";import"@skdx/web-components/button";import"@skdx/web-components/field";import"@skdx/web-components/form";import"@skdx/web-components/heading";import"@skdx/web-components/password-input";var m="data-skdx-reset-password-page-generated",y="data-skdx-reset-password-page-content",u="confirmPassword",$=0,t=class extends f{constructor(){super(...arguments);this.title="Choose a new password";this.pending=!1;this.passwordLabel="New password";this.passwordMismatchMessage="Passwords do not match";this.submitLabel="Update password";this.titleId=`skdx-reset-password-page-title-${++$}`;this.handleSubmit=e=>{let i=e.target?.closest("skdx-form");if(!i)return;e.preventDefault();let s=h(i,"password")?.value??"",a=h(i,u);if(a&&a.value!==s){a.setCustomValidity(this.passwordMismatchMessage),a.reportValidity();return}x(this,"reset-password",{password:s})};this.clearMismatch=e=>{e.target.setCustomValidity("")}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),this.addEventListener("submit",this.handleSubmit),queueMicrotask(()=>this.requestUpdate())}disconnectedCallback(){this.removeEventListener("submit",this.handleSubmit),super.disconnectedCallback()}hasSlotted(e){return this.querySelector(`[slot="${e}"]`)!==null}region(e){return this.querySelector(`.skdx-reset-password-page__${e}`)}get contentRegion(){return this.querySelector(`[${y}]`)}get hasContent(){return w(this,m)||(this.contentRegion?.hasChildNodes()??!1)}updated(){v(this,m,{requirements:this.region("requirements"),footer:this.region("footer")},this.contentRegion)}render(){return o`
|
|
2
|
+
<div
|
|
3
|
+
class="skdx-reset-password-page__panel"
|
|
4
|
+
data-skdx-reset-password-page-generated
|
|
5
|
+
>
|
|
6
|
+
<skdx-heading
|
|
7
|
+
class="skdx-reset-password-page__title"
|
|
8
|
+
as="h1"
|
|
9
|
+
id=${this.titleId}
|
|
10
|
+
>${this.title}</skdx-heading
|
|
11
|
+
>
|
|
12
|
+
${this.error?o`<skdx-alert
|
|
13
|
+
class="skdx-reset-password-page__error"
|
|
14
|
+
.status=${"danger"}
|
|
15
|
+
>${this.error}</skdx-alert
|
|
16
|
+
>`:p}
|
|
17
|
+
${this.success?o`<skdx-alert
|
|
18
|
+
class="skdx-reset-password-page__success"
|
|
19
|
+
.status=${"success"}
|
|
20
|
+
>${this.success}</skdx-alert
|
|
21
|
+
>`:o`<skdx-form class="skdx-reset-password-page__form">
|
|
22
|
+
<form>
|
|
23
|
+
<skdx-field
|
|
24
|
+
class="skdx-reset-password-page__field"
|
|
25
|
+
label=${this.passwordLabel}
|
|
26
|
+
required
|
|
27
|
+
>
|
|
28
|
+
<skdx-password-input
|
|
29
|
+
name="password"
|
|
30
|
+
required
|
|
31
|
+
></skdx-password-input>
|
|
32
|
+
${this.hasSlotted("requirements")?o`<skdx-field-description
|
|
33
|
+
class="skdx-reset-password-page__requirements"
|
|
34
|
+
></skdx-field-description>`:p}
|
|
35
|
+
</skdx-field>
|
|
36
|
+
${this.confirmPasswordLabel===void 0?p:o`<skdx-field
|
|
37
|
+
class="skdx-reset-password-page__field"
|
|
38
|
+
label=${this.confirmPasswordLabel}
|
|
39
|
+
required
|
|
40
|
+
>
|
|
41
|
+
<skdx-password-input
|
|
42
|
+
name=${u}
|
|
43
|
+
required
|
|
44
|
+
@value-change=${this.clearMismatch}
|
|
45
|
+
></skdx-password-input>
|
|
46
|
+
</skdx-field>`}
|
|
47
|
+
${this.hasContent?o`<div data-skdx-reset-password-page-content></div>`:p}
|
|
48
|
+
<skdx-button
|
|
49
|
+
class="skdx-reset-password-page__submit"
|
|
50
|
+
type="submit"
|
|
51
|
+
?loading=${this.pending}
|
|
52
|
+
?disabled=${this.pending}
|
|
53
|
+
>${this.submitLabel}</skdx-button
|
|
54
|
+
>
|
|
55
|
+
</form>
|
|
56
|
+
</skdx-form>`}
|
|
57
|
+
${this.hasSlotted("footer")?o`<div class="skdx-reset-password-page__footer"></div>`:p}
|
|
58
|
+
</div>
|
|
59
|
+
`}};r([d({type:String})],t.prototype,"title",2),r([d({type:String})],t.prototype,"error",2),r([d({type:String})],t.prototype,"success",2),r([d({type:Boolean})],t.prototype,"pending",2),r([d({type:String,attribute:"password-label"})],t.prototype,"passwordLabel",2),r([d({type:String,attribute:"confirm-password-label"})],t.prototype,"confirmPasswordLabel",2),r([d({type:String,attribute:"password-mismatch-message"})],t.prototype,"passwordMismatchMessage",2),r([d({type:String,attribute:"submit-label"})],t.prototype,"submitLabel",2),t=r([k("skdx-reset-password-page","reset-password-page","root")],t);function h(l,n){return l.querySelector(`[name="${n}"]`)}export{t as SkdxResetPasswordPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var p=(s,e)=>{for(var a in e)d(s,a,{get:e[a],enumerable:!0})},w=(s,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of P(e))!k.call(s,t)&&t!==a&&d(s,t,{get:()=>e[t],enumerable:!(o=x(e,t))||o.enumerable});return s};var R=s=>w(d({},"__esModule",{value:!0}),s);var S={};p(S,{SkdxResetPasswordPage:()=>r.SkdxResetPasswordPage});module.exports=R(S);var r=require("./ResetPasswordPage.cjs");0&&(module.exports={SkdxResetPasswordPage});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SkdxResetPasswordPage, type SkdxResetPasswordDetail } from './ResetPasswordPage.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SkdxResetPasswordPage, type SkdxResetPasswordDetail } from './ResetPasswordPage.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SkdxResetPasswordPage as t}from"./ResetPasswordPage.js";export{t as SkdxResetPasswordPage};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var L=(r,t)=>{for(var e in t)u(r,e,{get:t[e],enumerable:!0})},$=(r,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _(t))!y.call(r,s)&&s!==e&&u(r,s,{get:()=>t[s],enumerable:!(a=h(t,s))||a.enumerable});return r};var E=r=>$(u({},"__esModule",{value:!0}),r),n=(r,t,e,a)=>{for(var s=a>1?void 0:a?h(t,e):t,o=r.length-1,p;o>=0;o--)(p=r[o])&&(s=(a?p(t,e,s):p(s))||s);return a&&s&&u(t,e,s),s};var q={};L(q,{SkdxSignUpPage:()=>d});module.exports=E(q);var i=require("lit"),l=require("lit/decorators.js"),k=require("../internal/define.cjs"),g=require("../internal/events.cjs"),m=require("../internal/slots.cjs"),f=require("../sign-in-page/index.cjs"),S=require("@skdx/web-components/alert"),H=require("@skdx/web-components/button"),V=require("@skdx/web-components/checkbox"),I=require("@skdx/web-components/divider"),R=require("@skdx/web-components/field"),A=require("@skdx/web-components/form"),D=require("@skdx/web-components/heading"),N=require("@skdx/web-components/password-input"),F=require("@skdx/web-components/text-field");var x="data-skdx-sign-up-page-generated",w="data-skdx-sign-up-page-content",b="confirmPassword",M=0,d=class extends i.LitElement{constructor(){super(...arguments);this.title="Create account";this.pending=!1;this.emailLabel="Email";this.passwordLabel="Password";this.passwordMismatchMessage="Passwords do not match";this.submitLabel="Create account";this.titleId=`skdx-sign-up-page-title-${++M}`;this.handleSubmit=e=>{let a=e.target?.closest("skdx-form");if(!a)return;e.preventDefault();let s=c(a,"password"),o=v(a,b);if(o&&o.value!==s){o.setCustomValidity(this.passwordMismatchMessage),o.reportValidity();return}let p={providerId:"credentials",email:c(a,"email"),password:s};this.nameLabel!==void 0&&(p.name=c(a,"name")),this.hasSlotted("terms")&&(p.termsAccepted=C(a)),(0,g.emit)(this,"sign-up",p)};this.clearMismatch=e=>{e.target.setCustomValidity("")}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),this.addEventListener("submit",this.handleSubmit),queueMicrotask(()=>this.requestUpdate())}disconnectedCallback(){this.removeEventListener("submit",this.handleSubmit),super.disconnectedCallback()}hasSlotted(e){return this.querySelector(`[slot="${e}"]`)!==null}region(e){return this.querySelector(`.skdx-sign-up-page__${e}`)}get termsLabel(){return this.querySelector(".skdx-sign-up-page__terms skdx-checkbox > span")}get contentRegion(){return this.querySelector(`[${w}]`)}get hasContent(){return(0,m.hasUnslottedChild)(this,x)||(this.contentRegion?.hasChildNodes()??!1)}updated(){(0,m.placeSlotted)(this,x,{terms:this.termsLabel,footer:this.region("footer")},this.contentRegion)}signUpWithProvider(e){(0,g.emit)(this,"sign-up",{providerId:e})}render(){let e=this.providers??[],a=this.getProviderLabel??f.defaultProviderLabel;return i.html`
|
|
2
|
+
<div
|
|
3
|
+
class="skdx-sign-up-page__panel"
|
|
4
|
+
data-skdx-sign-up-page-generated
|
|
5
|
+
>
|
|
6
|
+
<skdx-heading
|
|
7
|
+
class="skdx-sign-up-page__title"
|
|
8
|
+
as="h1"
|
|
9
|
+
id=${this.titleId}
|
|
10
|
+
>${this.title}</skdx-heading
|
|
11
|
+
>
|
|
12
|
+
${this.error?i.html`<skdx-alert
|
|
13
|
+
class="skdx-sign-up-page__error"
|
|
14
|
+
.status=${"danger"}
|
|
15
|
+
>${this.error}</skdx-alert
|
|
16
|
+
>`:i.nothing}
|
|
17
|
+
${e.length?i.html`<div class="skdx-sign-up-page__providers">
|
|
18
|
+
${e.map(s=>i.html`<skdx-button
|
|
19
|
+
class="skdx-sign-up-page__provider"
|
|
20
|
+
type="button"
|
|
21
|
+
data-provider=${s.id}
|
|
22
|
+
@click=${()=>this.signUpWithProvider(s.id)}
|
|
23
|
+
>${a(s)}</skdx-button
|
|
24
|
+
>`)}
|
|
25
|
+
</div>
|
|
26
|
+
<skdx-divider class="skdx-sign-up-page__divider"></skdx-divider>`:i.nothing}
|
|
27
|
+
<skdx-form class="skdx-sign-up-page__form">
|
|
28
|
+
<form>
|
|
29
|
+
${this.nameLabel===void 0?i.nothing:i.html`<skdx-field
|
|
30
|
+
class="skdx-sign-up-page__field"
|
|
31
|
+
label=${this.nameLabel}
|
|
32
|
+
required
|
|
33
|
+
>
|
|
34
|
+
<skdx-text-field
|
|
35
|
+
name="name"
|
|
36
|
+
required
|
|
37
|
+
>
|
|
38
|
+
<skdx-text-field-input autocomplete="name"></skdx-text-field-input>
|
|
39
|
+
</skdx-text-field>
|
|
40
|
+
</skdx-field>`}
|
|
41
|
+
<skdx-field
|
|
42
|
+
class="skdx-sign-up-page__field"
|
|
43
|
+
label=${this.emailLabel}
|
|
44
|
+
required
|
|
45
|
+
>
|
|
46
|
+
<skdx-text-field
|
|
47
|
+
name="email"
|
|
48
|
+
type="email"
|
|
49
|
+
required
|
|
50
|
+
>
|
|
51
|
+
<skdx-text-field-input
|
|
52
|
+
type="email"
|
|
53
|
+
autocomplete="email"
|
|
54
|
+
></skdx-text-field-input>
|
|
55
|
+
</skdx-text-field>
|
|
56
|
+
</skdx-field>
|
|
57
|
+
<skdx-field
|
|
58
|
+
class="skdx-sign-up-page__field"
|
|
59
|
+
label=${this.passwordLabel}
|
|
60
|
+
required
|
|
61
|
+
>
|
|
62
|
+
<skdx-password-input
|
|
63
|
+
name="password"
|
|
64
|
+
required
|
|
65
|
+
></skdx-password-input>
|
|
66
|
+
</skdx-field>
|
|
67
|
+
${this.confirmPasswordLabel===void 0?i.nothing:i.html`<skdx-field
|
|
68
|
+
class="skdx-sign-up-page__field"
|
|
69
|
+
label=${this.confirmPasswordLabel}
|
|
70
|
+
required
|
|
71
|
+
>
|
|
72
|
+
<skdx-password-input
|
|
73
|
+
name=${b}
|
|
74
|
+
required
|
|
75
|
+
@value-change=${this.clearMismatch}
|
|
76
|
+
></skdx-password-input>
|
|
77
|
+
</skdx-field>`}
|
|
78
|
+
${this.hasContent?i.html`<div data-skdx-sign-up-page-content></div>`:i.nothing}
|
|
79
|
+
${this.hasSlotted("terms")?i.html`<skdx-field class="skdx-sign-up-page__terms">
|
|
80
|
+
<skdx-checkbox
|
|
81
|
+
name="terms"
|
|
82
|
+
required
|
|
83
|
+
><span></span
|
|
84
|
+
></skdx-checkbox>
|
|
85
|
+
</skdx-field>`:i.nothing}
|
|
86
|
+
<skdx-button
|
|
87
|
+
class="skdx-sign-up-page__submit"
|
|
88
|
+
type="submit"
|
|
89
|
+
?loading=${this.pending}
|
|
90
|
+
?disabled=${this.pending}
|
|
91
|
+
>${this.submitLabel}</skdx-button
|
|
92
|
+
>
|
|
93
|
+
</form>
|
|
94
|
+
</skdx-form>
|
|
95
|
+
${this.hasSlotted("footer")?i.html`<div class="skdx-sign-up-page__footer"></div>`:i.nothing}
|
|
96
|
+
</div>
|
|
97
|
+
`}};n([(0,l.property)({type:String})],d.prototype,"title",2),n([(0,l.property)({attribute:!1})],d.prototype,"providers",2),n([(0,l.property)({type:String})],d.prototype,"error",2),n([(0,l.property)({type:Boolean})],d.prototype,"pending",2),n([(0,l.property)({type:String,attribute:"name-label"})],d.prototype,"nameLabel",2),n([(0,l.property)({type:String,attribute:"email-label"})],d.prototype,"emailLabel",2),n([(0,l.property)({type:String,attribute:"password-label"})],d.prototype,"passwordLabel",2),n([(0,l.property)({type:String,attribute:"confirm-password-label"})],d.prototype,"confirmPasswordLabel",2),n([(0,l.property)({type:String,attribute:"password-mismatch-message"})],d.prototype,"passwordMismatchMessage",2),n([(0,l.property)({type:String,attribute:"submit-label"})],d.prototype,"submitLabel",2),n([(0,l.property)({attribute:!1})],d.prototype,"getProviderLabel",2),d=n([(0,k.customElement)("skdx-sign-up-page","sign-up-page","root")],d);function v(r,t){return r.querySelector(`[name="${t}"]`)}function c(r,t){return v(r,t)?.value??""}function C(r){return r.querySelector('[name="terms"]')?.checked===!0}0&&(module.exports={SkdxSignUpPage});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import { type SkdxSignInProvider } from '../sign-in-page/index.cjs';
|
|
3
|
+
import '@skdx/web-components/alert';
|
|
4
|
+
import '@skdx/web-components/button';
|
|
5
|
+
import '@skdx/web-components/checkbox';
|
|
6
|
+
import '@skdx/web-components/divider';
|
|
7
|
+
import '@skdx/web-components/field';
|
|
8
|
+
import '@skdx/web-components/form';
|
|
9
|
+
import '@skdx/web-components/heading';
|
|
10
|
+
import '@skdx/web-components/password-input';
|
|
11
|
+
import '@skdx/web-components/text-field';
|
|
12
|
+
/** What a `sign-up` event carries: the chosen provider, plus the values of the fields that rendered. */
|
|
13
|
+
export interface SkdxSignUpDetail {
|
|
14
|
+
/** The `id` of the provider the user chose, or `'credentials'` for the form. */
|
|
15
|
+
providerId: string;
|
|
16
|
+
/** The name the form held; absent unless the name field rendered. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** The email the form held; absent for a provider button. */
|
|
19
|
+
email?: string;
|
|
20
|
+
/** The password the form held, already matched against the confirmation. */
|
|
21
|
+
password?: string;
|
|
22
|
+
/** Whether the terms checkbox was ticked; absent unless the terms field rendered. */
|
|
23
|
+
termsAccepted?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Sign-up block: provider buttons, a credentials form with optional name,
|
|
27
|
+
* confirmation and terms fields, and a footer.
|
|
28
|
+
*
|
|
29
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
30
|
+
* targets: `.skdx-sign-up-page` on the host, then `__panel`, `__title`,
|
|
31
|
+
* `__error`, `__providers`, `__provider`, `__divider`, `__form`, `__field`,
|
|
32
|
+
* `__terms`, `__submit` and `__footer`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <skdx-sign-up-page
|
|
37
|
+
* id="sign-up"
|
|
38
|
+
* confirm-password-label="Confirm password"
|
|
39
|
+
* >
|
|
40
|
+
* <span slot="terms">I accept the terms.</span>
|
|
41
|
+
* </skdx-sign-up-page>
|
|
42
|
+
* <script>
|
|
43
|
+
* document
|
|
44
|
+
* .getElementById('sign-up')
|
|
45
|
+
* .addEventListener('sign-up', (event) => console.log(event.detail));
|
|
46
|
+
* </script>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @slot - Extra fields rendered inside the form, above the terms and the submit button.
|
|
50
|
+
* @slot terms - Terms copy and links used as the label of the required terms checkbox.
|
|
51
|
+
* @slot footer - Navigation below the form, such as a link back to the sign-in page.
|
|
52
|
+
* @fires sign-up - Fires with `{ providerId, name?, email?, password?, termsAccepted? }` when a provider button is activated or the form submits with matching, valid fields.
|
|
53
|
+
*/
|
|
54
|
+
export declare class SkdxSignUpPage extends LitElement {
|
|
55
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
56
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
57
|
+
/**
|
|
58
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
59
|
+
* @default 'Create account'
|
|
60
|
+
*/
|
|
61
|
+
title: string;
|
|
62
|
+
/**
|
|
63
|
+
* Third-party providers, in render order, each rendering one button above the credentials form.
|
|
64
|
+
* @default undefined — no providers region and no divider render.
|
|
65
|
+
*/
|
|
66
|
+
providers?: readonly SkdxSignInProvider[];
|
|
67
|
+
/**
|
|
68
|
+
* Message rendered into a derived error Alert above the form. The block never clears it.
|
|
69
|
+
* @default undefined — no error region renders.
|
|
70
|
+
*/
|
|
71
|
+
error?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Marks the request in flight, making the submit button busy while every field stays editable.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
pending: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Label of the name field; supplying it is what makes that field render at all.
|
|
79
|
+
* @default undefined — no name field renders.
|
|
80
|
+
*/
|
|
81
|
+
nameLabel?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Label of the email field in the credentials form.
|
|
84
|
+
* @default 'Email'
|
|
85
|
+
*/
|
|
86
|
+
emailLabel: string;
|
|
87
|
+
/**
|
|
88
|
+
* Label of the password field in the credentials form.
|
|
89
|
+
* @default 'Password'
|
|
90
|
+
*/
|
|
91
|
+
passwordLabel: string;
|
|
92
|
+
/**
|
|
93
|
+
* Label of the confirmation field; supplying it is what turns password matching on.
|
|
94
|
+
* @default undefined — no confirmation field renders.
|
|
95
|
+
*/
|
|
96
|
+
confirmPasswordLabel?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Validation message pushed onto the confirmation field when the two passwords differ.
|
|
99
|
+
* @default 'Passwords do not match'
|
|
100
|
+
*/
|
|
101
|
+
passwordMismatchMessage: string;
|
|
102
|
+
/**
|
|
103
|
+
* Text of the credentials form's submit button.
|
|
104
|
+
* @default 'Create account'
|
|
105
|
+
*/
|
|
106
|
+
submitLabel: string;
|
|
107
|
+
/**
|
|
108
|
+
* Formats a provider button's text from its entry.
|
|
109
|
+
* @default defaultProviderLabel — reads "Sign in with Google".
|
|
110
|
+
*/
|
|
111
|
+
getProviderLabel?: (provider: SkdxSignInProvider) => string;
|
|
112
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
113
|
+
private readonly titleId;
|
|
114
|
+
connectedCallback(): void;
|
|
115
|
+
disconnectedCallback(): void;
|
|
116
|
+
/** Whether the consumer supplied content for `name` — still true once it has been moved in. */
|
|
117
|
+
private hasSlotted;
|
|
118
|
+
private region;
|
|
119
|
+
/** The span inside the terms checkbox that the `terms` slot is moved into. */
|
|
120
|
+
private get termsLabel();
|
|
121
|
+
private get contentRegion();
|
|
122
|
+
private get hasContent();
|
|
123
|
+
protected updated(): void;
|
|
124
|
+
private readonly handleSubmit;
|
|
125
|
+
private readonly clearMismatch;
|
|
126
|
+
private signUpWithProvider;
|
|
127
|
+
render(): TemplateResult;
|
|
128
|
+
}
|
|
129
|
+
declare global {
|
|
130
|
+
interface HTMLElementTagNameMap {
|
|
131
|
+
'skdx-sign-up-page': SkdxSignUpPage;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import { type SkdxSignInProvider } from '../sign-in-page/index.js';
|
|
3
|
+
import '@skdx/web-components/alert';
|
|
4
|
+
import '@skdx/web-components/button';
|
|
5
|
+
import '@skdx/web-components/checkbox';
|
|
6
|
+
import '@skdx/web-components/divider';
|
|
7
|
+
import '@skdx/web-components/field';
|
|
8
|
+
import '@skdx/web-components/form';
|
|
9
|
+
import '@skdx/web-components/heading';
|
|
10
|
+
import '@skdx/web-components/password-input';
|
|
11
|
+
import '@skdx/web-components/text-field';
|
|
12
|
+
/** What a `sign-up` event carries: the chosen provider, plus the values of the fields that rendered. */
|
|
13
|
+
export interface SkdxSignUpDetail {
|
|
14
|
+
/** The `id` of the provider the user chose, or `'credentials'` for the form. */
|
|
15
|
+
providerId: string;
|
|
16
|
+
/** The name the form held; absent unless the name field rendered. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** The email the form held; absent for a provider button. */
|
|
19
|
+
email?: string;
|
|
20
|
+
/** The password the form held, already matched against the confirmation. */
|
|
21
|
+
password?: string;
|
|
22
|
+
/** Whether the terms checkbox was ticked; absent unless the terms field rendered. */
|
|
23
|
+
termsAccepted?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Sign-up block: provider buttons, a credentials form with optional name,
|
|
27
|
+
* confirmation and terms fields, and a footer.
|
|
28
|
+
*
|
|
29
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
30
|
+
* targets: `.skdx-sign-up-page` on the host, then `__panel`, `__title`,
|
|
31
|
+
* `__error`, `__providers`, `__provider`, `__divider`, `__form`, `__field`,
|
|
32
|
+
* `__terms`, `__submit` and `__footer`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <skdx-sign-up-page
|
|
37
|
+
* id="sign-up"
|
|
38
|
+
* confirm-password-label="Confirm password"
|
|
39
|
+
* >
|
|
40
|
+
* <span slot="terms">I accept the terms.</span>
|
|
41
|
+
* </skdx-sign-up-page>
|
|
42
|
+
* <script>
|
|
43
|
+
* document
|
|
44
|
+
* .getElementById('sign-up')
|
|
45
|
+
* .addEventListener('sign-up', (event) => console.log(event.detail));
|
|
46
|
+
* </script>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @slot - Extra fields rendered inside the form, above the terms and the submit button.
|
|
50
|
+
* @slot terms - Terms copy and links used as the label of the required terms checkbox.
|
|
51
|
+
* @slot footer - Navigation below the form, such as a link back to the sign-in page.
|
|
52
|
+
* @fires sign-up - Fires with `{ providerId, name?, email?, password?, termsAccepted? }` when a provider button is activated or the form submits with matching, valid fields.
|
|
53
|
+
*/
|
|
54
|
+
export declare class SkdxSignUpPage extends LitElement {
|
|
55
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
56
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
57
|
+
/**
|
|
58
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
59
|
+
* @default 'Create account'
|
|
60
|
+
*/
|
|
61
|
+
title: string;
|
|
62
|
+
/**
|
|
63
|
+
* Third-party providers, in render order, each rendering one button above the credentials form.
|
|
64
|
+
* @default undefined — no providers region and no divider render.
|
|
65
|
+
*/
|
|
66
|
+
providers?: readonly SkdxSignInProvider[];
|
|
67
|
+
/**
|
|
68
|
+
* Message rendered into a derived error Alert above the form. The block never clears it.
|
|
69
|
+
* @default undefined — no error region renders.
|
|
70
|
+
*/
|
|
71
|
+
error?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Marks the request in flight, making the submit button busy while every field stays editable.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
pending: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Label of the name field; supplying it is what makes that field render at all.
|
|
79
|
+
* @default undefined — no name field renders.
|
|
80
|
+
*/
|
|
81
|
+
nameLabel?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Label of the email field in the credentials form.
|
|
84
|
+
* @default 'Email'
|
|
85
|
+
*/
|
|
86
|
+
emailLabel: string;
|
|
87
|
+
/**
|
|
88
|
+
* Label of the password field in the credentials form.
|
|
89
|
+
* @default 'Password'
|
|
90
|
+
*/
|
|
91
|
+
passwordLabel: string;
|
|
92
|
+
/**
|
|
93
|
+
* Label of the confirmation field; supplying it is what turns password matching on.
|
|
94
|
+
* @default undefined — no confirmation field renders.
|
|
95
|
+
*/
|
|
96
|
+
confirmPasswordLabel?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Validation message pushed onto the confirmation field when the two passwords differ.
|
|
99
|
+
* @default 'Passwords do not match'
|
|
100
|
+
*/
|
|
101
|
+
passwordMismatchMessage: string;
|
|
102
|
+
/**
|
|
103
|
+
* Text of the credentials form's submit button.
|
|
104
|
+
* @default 'Create account'
|
|
105
|
+
*/
|
|
106
|
+
submitLabel: string;
|
|
107
|
+
/**
|
|
108
|
+
* Formats a provider button's text from its entry.
|
|
109
|
+
* @default defaultProviderLabel — reads "Sign in with Google".
|
|
110
|
+
*/
|
|
111
|
+
getProviderLabel?: (provider: SkdxSignInProvider) => string;
|
|
112
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
113
|
+
private readonly titleId;
|
|
114
|
+
connectedCallback(): void;
|
|
115
|
+
disconnectedCallback(): void;
|
|
116
|
+
/** Whether the consumer supplied content for `name` — still true once it has been moved in. */
|
|
117
|
+
private hasSlotted;
|
|
118
|
+
private region;
|
|
119
|
+
/** The span inside the terms checkbox that the `terms` slot is moved into. */
|
|
120
|
+
private get termsLabel();
|
|
121
|
+
private get contentRegion();
|
|
122
|
+
private get hasContent();
|
|
123
|
+
protected updated(): void;
|
|
124
|
+
private readonly handleSubmit;
|
|
125
|
+
private readonly clearMismatch;
|
|
126
|
+
private signUpWithProvider;
|
|
127
|
+
render(): TemplateResult;
|
|
128
|
+
}
|
|
129
|
+
declare global {
|
|
130
|
+
interface HTMLElementTagNameMap {
|
|
131
|
+
'skdx-sign-up-page': SkdxSignUpPage;
|
|
132
|
+
}
|
|
133
|
+
}
|