@danxbot/ui 26.2.0 → 26.3.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/dist/index.js +7171 -7151
- package/dist/index.js.map +1 -1
- package/dist/types/components/auth/AcceptInvitationCard.d.ts +28 -14
- package/dist/types/components/auth/LoginForm.d.ts +4 -5
- package/dist/types/components/auth/SignInProviders.d.ts +17 -1
- package/dist/types/components/auth/SignupCard.d.ts +35 -16
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lib/i18n/areas/auth-provenance-flows.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type ProviderContinuation, type VerifiedIdentity } from "./SignInProviders";
|
|
2
2
|
import { type TermsAcceptanceProps } from "./TermsAcceptance";
|
|
3
|
-
|
|
3
|
+
/** What the new-account form hands over; the password mode adds `password`, the verified mode does not. */
|
|
4
|
+
type AcceptInvitationAccount = {
|
|
5
|
+
name: string;
|
|
6
|
+
username: string;
|
|
7
|
+
acceptedTerms: true;
|
|
8
|
+
};
|
|
9
|
+
/** What the person typed before a provider round trip, handed back on return. */
|
|
10
|
+
export interface AcceptInvitationInitialValues {
|
|
11
|
+
name?: string;
|
|
12
|
+
username?: string;
|
|
13
|
+
acceptedTerms?: boolean;
|
|
14
|
+
}
|
|
15
|
+
type AcceptInvitationCardBase = {
|
|
4
16
|
teamName: string;
|
|
5
17
|
teamLogoUrl?: string;
|
|
6
18
|
inviterName: string;
|
|
@@ -21,20 +33,22 @@ export type AcceptInvitationCardProps = {
|
|
|
21
33
|
termsHref: string;
|
|
22
34
|
/** Runs on that link's click; see `TermsAcceptance`. */
|
|
23
35
|
onOpenTerms?: TermsAcceptanceProps["onOpenTerms"];
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
name: string;
|
|
27
|
-
username: string;
|
|
28
|
-
password: string | null;
|
|
29
|
-
acceptedTerms: true;
|
|
30
|
-
}) => void;
|
|
31
|
-
/** Set once a provider has verified the person; replaces the password field. */
|
|
32
|
-
verifiedIdentity?: VerifiedIdentity | null;
|
|
36
|
+
/** Seeds the new-account form (read once, on mount): what `onContinueWithProvider` reported before the redirect. */
|
|
37
|
+
initialValues?: AcceptInvitationInitialValues;
|
|
33
38
|
onJoinAsSignedInUser?: () => void;
|
|
34
39
|
/** Offered when `accountExists` is true but the viewer isn't signed in as that email. */
|
|
35
40
|
onSignInInstead?: () => void;
|
|
36
41
|
className?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
};
|
|
43
|
+
export type AcceptInvitationCardProps = AcceptInvitationCardBase & ProviderContinuation<AcceptInvitationAccount> & ({
|
|
44
|
+
verifiedIdentity?: undefined;
|
|
45
|
+
onCreateAccount: (input: AcceptInvitationAccount & {
|
|
46
|
+
password: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
} | {
|
|
49
|
+
/** Set once a provider has verified the person; replaces the password field. */
|
|
50
|
+
verifiedIdentity: VerifiedIdentity;
|
|
51
|
+
onCreateAccount: (input: AcceptInvitationAccount) => void;
|
|
52
|
+
});
|
|
53
|
+
export declare function AcceptInvitationCard(props: AcceptInvitationCardProps): import("react").JSX.Element;
|
|
54
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import { type ProviderSelection } from "./SignInProviders";
|
|
3
|
+
export type LoginFormProps = {
|
|
3
4
|
onSubmit: (identifier: string, password: string) => Promise<void>;
|
|
4
5
|
/** Rendered beside the password field's label — typically a "Forgot password?" link. */
|
|
5
6
|
forgotPasswordLink?: ReactNode;
|
|
6
7
|
submitLabel?: string;
|
|
7
|
-
/** DX-5095 — other ways in (typically `SignInProviders`), rendered below the form under an "or" divider. */
|
|
8
|
-
alternatives?: ReactNode;
|
|
9
8
|
className?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function LoginForm({ onSubmit, forgotPasswordLink, submitLabel,
|
|
9
|
+
} & ProviderSelection;
|
|
10
|
+
export declare function LoginForm({ onSubmit, forgotPasswordLink, submitLabel, providers, onSelectProvider, pendingProvider, className, }: LoginFormProps): import("react").JSX.Element;
|
|
@@ -11,9 +11,14 @@ export interface SignInProvidersProps {
|
|
|
11
11
|
pending?: SignInProviderId | null;
|
|
12
12
|
/** Blocks the row without a pending provider. */
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Draws the "or" rule above the row. The rule belongs to the row, not to the form around it, so an empty `providers`
|
|
16
|
+
* list renders neither: there is no way to get an orphan divider (DX-5095).
|
|
17
|
+
*/
|
|
18
|
+
divided?: boolean;
|
|
14
19
|
className?: string;
|
|
15
20
|
}
|
|
16
|
-
export declare function SignInProviders({ providers, onSelect, pending, disabled, className }: SignInProvidersProps): import("react").JSX.Element | null;
|
|
21
|
+
export declare function SignInProviders({ providers, onSelect, pending, disabled, divided, className, }: SignInProvidersProps): import("react").JSX.Element | null;
|
|
17
22
|
/** A verified identity from a provider: the account is created from it, so no password exists to ask for. */
|
|
18
23
|
export interface VerifiedIdentity {
|
|
19
24
|
provider: SignInProviderId;
|
|
@@ -34,6 +39,17 @@ export type ProviderContinuation<Ctx> = {
|
|
|
34
39
|
/** The provider whose round trip has started; disables the row. */
|
|
35
40
|
pendingProvider?: SignInProviderId | null;
|
|
36
41
|
};
|
|
42
|
+
/** The provider buttons of a form that signs an existing account in: all three props or none. */
|
|
43
|
+
export type ProviderSelection = {
|
|
44
|
+
providers?: undefined;
|
|
45
|
+
onSelectProvider?: undefined;
|
|
46
|
+
pendingProvider?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
providers: readonly SignInProvider[];
|
|
49
|
+
onSelectProvider: (id: SignInProviderId) => void;
|
|
50
|
+
/** The provider whose round trip has started; disables the row. */
|
|
51
|
+
pendingProvider?: SignInProviderId | null;
|
|
52
|
+
};
|
|
37
53
|
/** The "or" rule between a form and its provider buttons. */
|
|
38
54
|
export declare function OrDivider({ className }: {
|
|
39
55
|
className?: string;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { type PasswordRequirementRule } from "../PasswordRequirements";
|
|
2
2
|
import { type ProviderContinuation, type VerifiedIdentity } from "./SignInProviders";
|
|
3
3
|
import { type TermsAcceptanceProps } from "./TermsAcceptance";
|
|
4
|
-
|
|
4
|
+
/** What the account form hands over; the password mode adds `password`, the verified mode does not. */
|
|
5
|
+
type SignupAccount = {
|
|
6
|
+
code: string;
|
|
7
|
+
name: string;
|
|
8
|
+
username: string;
|
|
9
|
+
email: string;
|
|
10
|
+
teamName: string;
|
|
11
|
+
acceptedTerms: true;
|
|
12
|
+
};
|
|
13
|
+
/** What the person typed before a provider round trip, handed back on return (the code comes back as `initialCode`). */
|
|
14
|
+
export interface SignupInitialValues {
|
|
15
|
+
name?: string;
|
|
16
|
+
username?: string;
|
|
17
|
+
teamName?: string;
|
|
18
|
+
acceptedTerms?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type SignupCardBase = {
|
|
5
21
|
/** A code already known (the sign-up link's). Checked on mount, then shown read-only while it is good. */
|
|
6
22
|
initialCode?: string;
|
|
7
23
|
/**
|
|
@@ -17,27 +33,30 @@ export type SignupCardProps = {
|
|
|
17
33
|
termsHref: string;
|
|
18
34
|
/** Runs on that link's click; see `TermsAcceptance`. */
|
|
19
35
|
onOpenTerms?: TermsAcceptanceProps["onOpenTerms"];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
name: string;
|
|
23
|
-
username: string;
|
|
24
|
-
email: string;
|
|
25
|
-
teamName: string;
|
|
26
|
-
/** `null` exactly when `verifiedIdentity` is set. */
|
|
27
|
-
password: string | null;
|
|
28
|
-
acceptedTerms: true;
|
|
29
|
-
}) => void;
|
|
30
|
-
/** Set once a provider has verified the person; replaces the password field and fills the email. */
|
|
31
|
-
verifiedIdentity?: VerifiedIdentity | null;
|
|
36
|
+
/** Seeds the account form (read once, on mount): what `onContinueWithProvider` reported before the redirect. */
|
|
37
|
+
initialValues?: SignupInitialValues;
|
|
32
38
|
loading?: boolean;
|
|
33
39
|
/** A server-side error surfaced after a failed submit (username taken, rate limited, ...). */
|
|
34
40
|
error?: string;
|
|
35
41
|
/** Offered beneath the card for a visitor who already has an account. */
|
|
36
42
|
onSignInInstead?: () => void;
|
|
37
43
|
className?: string;
|
|
38
|
-
}
|
|
44
|
+
};
|
|
45
|
+
export type SignupCardProps = SignupCardBase & ProviderContinuation<{
|
|
39
46
|
code: string;
|
|
47
|
+
name: string;
|
|
48
|
+
username: string;
|
|
40
49
|
teamName: string;
|
|
41
50
|
acceptedTerms: true;
|
|
42
|
-
}
|
|
43
|
-
|
|
51
|
+
}> & ({
|
|
52
|
+
verifiedIdentity?: undefined;
|
|
53
|
+
onSignup: (input: SignupAccount & {
|
|
54
|
+
password: string;
|
|
55
|
+
}) => void;
|
|
56
|
+
} | {
|
|
57
|
+
/** Set once a provider has verified the person; replaces the password field and fills the email. */
|
|
58
|
+
verifiedIdentity: VerifiedIdentity;
|
|
59
|
+
onSignup: (input: SignupAccount) => void;
|
|
60
|
+
});
|
|
61
|
+
export declare function SignupCard(props: SignupCardProps): import("react").JSX.Element;
|
|
62
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ export { initialFocusDay, isInMonth, nextDayForKey, useGridNavigation, type Grid
|
|
|
160
160
|
export { AmbiguousTimeError, addDays, addDuration, addMonths, atMidnight, atTime, comparePlainDate, dayFraction, dayLengthMs, dayOfWeek, daysBetween, daysInMonth, endOfMonth, hoursInDay, instantAtFraction, instantToPlainDate, instantToPlainDateTime, isSameDate, isoDateString, isoDateTimeString, monthGridDays, nextDay, offsetAt, parsePlainDate, plainDateTimeToInstant, relativeAge, startOfDay, startOfMonth, startOfWeek, weekDays, type CalendarDuration, type Disambiguation, type Instant, type PlainDate, type PlainDateTime, type TimeZone, } from "./lib/time";
|
|
161
161
|
export { allDayBandSegment, dayKey, daySlots, isAllDay, packBand, packLanes, snapFractionToInstant, timeSegments, timedBandSegment, type AllDayEvent, type BandInput, type BandOptions, type BandPlacement, type BandResult, type BandSegment, type CalendarEvent, type CalendarEventId, type CalendarView, type DaySlot, type DragKind, type EventDraft, type EventPalette, type LaneInput, type LaneOptions, type LanePlacement, type PaletteEntry, type PaletteKey, type TimeSegment, type TimedEvent, type VisibleRange, } from "./lib/calendar";
|
|
162
162
|
export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiKeysPanel, AgentKeysList, AccessRequestPanel, PermissionRequestPanel, RoleKeyPicker, isRoleSelectable, leastPrivilegeRoleId, InvitationsList, InviteMembersDialog, Brand, TeamSettingsForm, DangerZone, type RBACProviderProps, type RBACHookResult, type CanProps, type AccountMenuProps, type TeamSwitcherProps, type DevToolsPopoverProps, type RolePermissionMatrixProps, type RoleEditorDialogProps, type RoleEditorDialogSubmitInput, type ProfileFormProps, type ProfileFormAccount, type ProfileFormSaveInput, type ProfilePageProps, type RolesPermissionsPageProps, type MembersPanelProps, type MembersPanelMember, type ChangePasswordFormProps, type SessionsListProps, type Session, type ApiKeysPanelProps, type AgentKeysListProps, type ApiKey, type KeyGrant, type KeyRoleEditor, type AccessRequestPanelProps, type AccessRequest, type AccessRequestKind, type IssuedKey, type AccessRequestState, type ExpiredNote, type PermissionRequestPanelProps, type PermissionRequest, type RoleKeyPickerProps, type InvitationsListProps, type InvitationsListItem, type InvitationStatus, type InviteMembersDialogProps, type Permission, type Role, type User, type Team, type TeamMembership, type BrandProps, type TeamSettingsFormProps, type TeamSettingsFormTeam, type TeamSettingsFormSaveInput, type DangerZoneProps, } from "./components/rbac";
|
|
163
|
-
export { AuthLayout, AcceptInvitationCard, SignupCard, SignInProviders, TermsAcceptance, LoginForm, ForgotPasswordForm, ResetPasswordForm, type AuthLayoutProps, type AcceptInvitationCardProps, type SignupCardProps, type SignInProvidersProps, type SignInProvider, type SignInProviderId, type VerifiedIdentity, type ProviderContinuation, type TermsAcceptanceProps, type LoginFormProps, type ForgotPasswordFormProps, type ResetPasswordFormProps, } from "./components/auth";
|
|
163
|
+
export { AuthLayout, AcceptInvitationCard, SignupCard, SignInProviders, TermsAcceptance, LoginForm, ForgotPasswordForm, ResetPasswordForm, type AuthLayoutProps, type AcceptInvitationCardProps, type SignupCardProps, type SignupInitialValues, type AcceptInvitationInitialValues, type SignInProvidersProps, type ProviderSelection, type SignInProvider, type SignInProviderId, type VerifiedIdentity, type ProviderContinuation, type TermsAcceptanceProps, type LoginFormProps, type ForgotPasswordFormProps, type ResetPasswordFormProps, } from "./components/auth";
|
|
164
164
|
export { UseCaseCard, RoadmapItemCard, RoadmapSwimlaneBoard, UseCaseLedgerPage, RoadmapPage, PhaseManager, TrackManager, deriveRoadmapItemStatus, isFullyBuilt, isUnbuilt, trackIds, trackProgress, toneForIndex, CATEGORY_TONES, type Domain, type Phase, type Track, type RoadmapItem, type RoadmapItemStatus, type UseCase, type UseCaseStatus, type UseCaseDecision, type UseCaseCardProps, type RoadmapItemCardProps, type RoadmapSwimlaneBoardProps, type UseCaseLedgerPageProps, type RoadmapPageProps, type PhaseManagerProps, type TrackManagerProps, } from "./components/roadmap";
|
|
165
165
|
export { ProvenanceDisclosure, ProvenanceDetail, ProvenanceBadge, ConfidenceReadout, ConfidenceMeter, ConfidenceBar, provenanceStateLabel, confidenceBand, confidenceScore, scoredConfidence, ratedConfidence, type ProvenanceRecord, type ProvenanceState, type ProvenanceSource, type ProvenanceCheck, type ProvenanceCall, type ProvenanceSignoff, type ConfidenceBand, type ConfidenceScore, type ProvenanceConfidence, type ConfidenceReadoutProps, type ConfidenceBarProps, type ConfidenceBarSize, type ProvenanceDisclosureProps, type ProvenanceDetailProps, type ProvenanceDetailTitleAs, type ProvenanceTriggerBadge, type ProvenanceBadgeProps, type ProvenanceBadgeAppearance, type ConfidenceMeterProps, } from "./components/provenance";
|
|
166
166
|
export { confidenceLevel, CONFIDENCE_LEVEL_LABELS, type ConfidenceLevel } from "./lib/confidence";
|
|
@@ -83,6 +83,8 @@ export interface AuthProvenanceFlowsStrings {
|
|
|
83
83
|
email: string;
|
|
84
84
|
/** Helper text when the code reserves the email address. */
|
|
85
85
|
emailReserved: string;
|
|
86
|
+
/** Error under the email field when a provider verified a different address than the one the code is reserved for. */
|
|
87
|
+
emailLockMismatch: (reservedEmail: string) => string;
|
|
86
88
|
/** Label of the team-name field. */
|
|
87
89
|
teamName: string;
|
|
88
90
|
/** Helper text under the team-name field. */
|