@danxbot/ui 15.1.0 → 15.2.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.
@@ -0,0 +1,28 @@
1
+ export interface AcceptInvitationCardProps {
2
+ teamName: string;
3
+ teamLogoUrl?: string;
4
+ inviterName: string;
5
+ roleLabel: string;
6
+ email: string;
7
+ /** True when an account already exists for `email`, server-reported. */
8
+ accountExists: boolean;
9
+ /** Set when the CURRENT VIEWER is already signed in with a session whose
10
+ * email matches `email` — consumer-computed (this component has no notion
11
+ * of sessions). Renders a one-click join instead of a form. */
12
+ signedInAsMatchingUser?: {
13
+ name: string;
14
+ } | null;
15
+ loading?: boolean;
16
+ /** A server-side error surfaced after a failed submit (username taken, expired token, ...). */
17
+ error?: string;
18
+ onCreateAccount: (input: {
19
+ name: string;
20
+ username: string;
21
+ password: string;
22
+ }) => void;
23
+ onJoinAsSignedInUser?: () => void;
24
+ /** Offered when `accountExists` is true but the viewer isn't signed in as that email. */
25
+ onSignInInstead?: () => void;
26
+ className?: string;
27
+ }
28
+ export declare function AcceptInvitationCard({ teamName, teamLogoUrl, inviterName, roleLabel, email, accountExists, signedInAsMatchingUser, loading, error, onCreateAccount, onJoinAsSignedInUser, onSignInInstead, className, }: AcceptInvitationCardProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+ export interface AuthLayoutProps {
3
+ /** The team/product mark — an `<img>`, an SVG, or a text wordmark. Omit for no logo slot at all. */
4
+ logo?: ReactNode;
5
+ title: ReactNode;
6
+ subtitle?: ReactNode;
7
+ /** A link or note below the card ("Don't have an account? Ask your team admin.", "Back to sign in"). */
8
+ footer?: ReactNode;
9
+ children: ReactNode;
10
+ className?: string;
11
+ }
12
+ export declare function AuthLayout({ logo, title, subtitle, footer, children, className }: AuthLayoutProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./AuthLayout";
2
+ export * from "./AcceptInvitationCard";
@@ -0,0 +1,26 @@
1
+ export type InvitationStatus = "pending" | "accepted" | "revoked" | "expired";
2
+ export interface InvitationsListItem {
3
+ id: string;
4
+ email: string;
5
+ roleLabel: string;
6
+ status: InvitationStatus;
7
+ createdAt: string;
8
+ invitedByName?: string;
9
+ }
10
+ export interface InvitationsListProps {
11
+ invitations: InvitationsListItem[];
12
+ onResend: (id: string) => void;
13
+ onRevoke: (id: string) => void;
14
+ /**
15
+ * Copies the invite link for manual sharing (card architecture: "the admin
16
+ * UI can also copy the invite link"). Omit to hide the copy control
17
+ * entirely — a consumer whose invite creation response never surfaced a raw
18
+ * token (e.g. a page reload after create) has nothing to copy.
19
+ */
20
+ onCopyLink?: (id: string) => void;
21
+ /** The id of a row currently mid-mutation (resend or revoke). */
22
+ busyId?: string | null;
23
+ emptyState?: React.ReactNode;
24
+ className?: string;
25
+ }
26
+ export declare function InvitationsList({ invitations, onResend, onRevoke, onCopyLink, busyId, emptyState, className, }: InvitationsListProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
@@ -0,0 +1,21 @@
1
+ import type { Role } from "./types";
2
+ export interface InviteMembersDialogProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ /** The roles an invitee may be given — the role Select's options. */
6
+ assignableRoles: Role[];
7
+ /** Disables the form and shows a busy submit button while the invite request is in flight. */
8
+ loading?: boolean;
9
+ /**
10
+ * A server-side error surfaced after a failed submit (e.g. "invite_exists"
11
+ * for one address) — rendered as a `Callout`. The dialog has no notion of
12
+ * WHY a send failed; the consumer's own error copy goes here verbatim.
13
+ */
14
+ error?: string;
15
+ onSubmit: (input: {
16
+ emails: string[];
17
+ roleId: string;
18
+ }) => void;
19
+ className?: string;
20
+ }
21
+ export declare function InviteMembersDialog({ open, onOpenChange, assignableRoles, loading, error, onSubmit, className, }: InviteMembersDialogProps): import("react").JSX.Element;
@@ -13,3 +13,5 @@ export * from "./MembersPanel";
13
13
  export * from "./ChangePasswordForm";
14
14
  export * from "./SessionsList";
15
15
  export * from "./ApiTokensPanel";
16
+ export * from "./InvitationsList";
17
+ export * from "./InviteMembersDialog";
@@ -127,7 +127,8 @@ export { cellLabel, eventLabel, formatDateRange, longDate, monthTitle, timeOfDay
127
127
  export { initialFocusDay, isInMonth, nextDayForKey, useGridNavigation, type GridNavigation, type GridNavigationOptions, } from "./components/calendar/use-grid-navigation";
128
128
  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";
129
129
  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 TimeSegment, type TimedEvent, type VisibleRange, } from "./lib/calendar";
130
- export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiTokensPanel, 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 ApiTokensPanelProps, type ApiToken, type Permission, type Role, type User, type Team, type TeamMembership, } from "./components/rbac";
130
+ export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiTokensPanel, InvitationsList, InviteMembersDialog, 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 ApiTokensPanelProps, type ApiToken, type InvitationsListProps, type InvitationsListItem, type InvitationStatus, type InviteMembersDialogProps, type Permission, type Role, type User, type Team, type TeamMembership, } from "./components/rbac";
131
+ export { AuthLayout, AcceptInvitationCard, type AuthLayoutProps, type AcceptInvitationCardProps, } from "./components/auth";
131
132
  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";
132
133
  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";
133
134
  export { confidenceLevel, CONFIDENCE_LEVEL_LABELS, type ConfidenceLevel } from "./lib/confidence";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "15.1.0",
3
+ "version": "15.2.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",