@danxbot/ui 22.1.0 → 23.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.
@@ -20,6 +20,19 @@ export interface AccessRequest {
20
20
  /** The label of the role granted. Shown once the request is approved or claimed. */
21
21
  roleLabel?: string;
22
22
  }
23
+ /**
24
+ * DX-4856: the key a claim minted, and what a person may do with it. Pass it once the requester holds a key; omit it before that.
25
+ * `revokedAt` set means the key was revoked: the panel reads Revoked and offers nothing. Otherwise `onRevoke` (pass it only for a
26
+ * person allowed to revoke this key) adds a Revoke key button behind a confirmation dialog.
27
+ */
28
+ export interface IssuedKey {
29
+ /** ISO instant the key was revoked. */
30
+ revokedAt?: string;
31
+ /** Who revoked it, when a person did. */
32
+ revokedBy?: string;
33
+ /** Revokes the key. A rejection shows its message in the panel; a resolution leaves the panel as it was until the consumer hands it `revokedAt`. */
34
+ onRevoke?: () => Promise<void>;
35
+ }
23
36
  export interface AccessRequestPanelProps {
24
37
  request: AccessRequest;
25
38
  state: AccessRequestState;
@@ -46,6 +59,8 @@ export interface AccessRequestPanelProps {
46
59
  * disabled until what was typed matches `request.confirmCode`, ignoring case and spaces. Deny stays available.
47
60
  */
48
61
  confirmCodeEntry?: boolean;
62
+ /** DX-4856: the key this request minted, with its revoke. Used only in the `claimed` state. */
63
+ issuedKey?: IssuedKey;
49
64
  className?: string;
50
65
  }
51
- export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, confirmCodeEntry, className, }: AccessRequestPanelProps): import("react").JSX.Element;
66
+ export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, confirmCodeEntry, issuedKey, className, }: AccessRequestPanelProps): import("react").JSX.Element;
@@ -7,9 +7,10 @@ export interface ExpiredNote {
7
7
  /** What the requester must do to get access, e.g. "The agent must reconnect and ask again.". */
8
8
  nextStep: string;
9
9
  }
10
- export declare function ApprovalHeader({ title, state }: {
10
+ export declare function ApprovalHeader({ title, state, revokedLabel }: {
11
11
  title: string;
12
12
  state: AccessRequestState;
13
+ revokedLabel?: string;
13
14
  }): import("react").JSX.Element;
14
15
  /** The code is for comparing, never copying: plain large text, no copy control (see `AccessRequestPanel`). */
15
16
  export declare function ConfirmCodeCallout({ code }: {
@@ -157,7 +157,7 @@ export { cellLabel, eventLabel, formatDateRange, longDate, monthTitle, timeOfDay
157
157
  export { initialFocusDay, isInMonth, nextDayForKey, useGridNavigation, type GridNavigation, type GridNavigationOptions, } from "./components/calendar/use-grid-navigation";
158
158
  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";
159
159
  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";
160
- 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 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";
160
+ 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";
161
161
  export { AuthLayout, AcceptInvitationCard, SignupCard, TermsAcceptance, LoginForm, ForgotPasswordForm, ResetPasswordForm, type AuthLayoutProps, type AcceptInvitationCardProps, type SignupCardProps, type TermsAcceptanceProps, type LoginFormProps, type ForgotPasswordFormProps, type ResetPasswordFormProps, } from "./components/auth";
162
162
  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";
163
163
  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";
@@ -89,6 +89,22 @@ export interface RbacStrings {
89
89
  noRoleBody: string;
90
90
  /** Description under the role picker; `isDefault` is true when the consumer's default role was preselected. */
91
91
  roleHint: (roleLabel: string, isDefault: boolean) => string;
92
+ /** DX-4856: the header badge and readout title once the key this request minted was revoked. */
93
+ revoked: string;
94
+ /** DX-4856: readout body for a revoked key; `when` is the formatted instant, `by` the revoker's name when a person did it. */
95
+ revokedBody: (when: string, by: string | undefined) => string;
96
+ /** DX-4856: label of the button that starts revoking the key. */
97
+ revokeKey: string;
98
+ /** DX-4856: title of the confirmation dialog. */
99
+ revokeTitle: string;
100
+ /** DX-4856: body of the confirmation dialog. */
101
+ revokeBody: string;
102
+ /** DX-4856: the dialog's dismiss button. */
103
+ revokeCancel: string;
104
+ /** DX-4856: title of the error shown when the revoke failed. */
105
+ revokeFailedTitle: string;
106
+ /** DX-4856: message of that error when the rejection carried none. */
107
+ revokeFailedMessage: string;
92
108
  };
93
109
  /** `PermissionRequestPanel`. */
94
110
  permissionRequest: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "22.1.0",
3
+ "version": "23.0.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",