@danxbot/ui 18.2.1 → 18.4.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 +8212 -8036
- package/dist/index.js.map +1 -1
- package/dist/types/components/Popover.d.ts +9 -8
- package/dist/types/components/SortMenu.d.ts +1 -1
- package/dist/types/components/rbac/AccessRequestPanel.d.ts +35 -0
- package/dist/types/components/rbac/RoleKeyPicker.d.ts +22 -0
- package/dist/types/components/rbac/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -127,14 +127,15 @@ interface TooltipBaseProps {
|
|
|
127
127
|
* question about the popup ("can this be entered?"), never about a flag
|
|
128
128
|
* named after its own negation.
|
|
129
129
|
*
|
|
130
|
-
* DEFAULT
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
130
|
+
* DEFAULT FALSE (DX-4349). A tooltip is a label, not a surface (see
|
|
131
|
+
* `content`: "anything interactive belongs in a Popover"), and a label
|
|
132
|
+
* that holds itself open under the pointer is a trap wherever marks sit
|
|
133
|
+
* side by side: the popup is drawn right over the neighbouring marks, so
|
|
134
|
+
* moving toward the next one lands on the popup, keeps it open and blocks
|
|
135
|
+
* the mark underneath. Opt IN only for a tooltip whose text a reader must
|
|
136
|
+
* be able to point into and keep reading (WCAG 1.4.13 "hoverable") and that
|
|
137
|
+
* sits clear of other controls.
|
|
138
|
+
* @default false
|
|
138
139
|
*/
|
|
139
140
|
enterable?: boolean;
|
|
140
141
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Permission, Role } from "./types";
|
|
2
|
+
export type AccessRequestKind = "session" | "worker";
|
|
3
|
+
export type AccessRequestState = "pending" | "approved" | "denied" | "expired" | "claimed";
|
|
4
|
+
export interface AccessRequest {
|
|
5
|
+
kind: AccessRequestKind;
|
|
6
|
+
/** The session title or the worker id: what the requester calls itself. */
|
|
7
|
+
label: string;
|
|
8
|
+
repo?: string;
|
|
9
|
+
machine?: string;
|
|
10
|
+
/** The address the request came from. */
|
|
11
|
+
requesterIp?: string;
|
|
12
|
+
clientVersion?: string;
|
|
13
|
+
/** ISO instant. */
|
|
14
|
+
requestedAt: string;
|
|
15
|
+
/** ISO instant. Shown while the request is pending. */
|
|
16
|
+
expiresAt?: string;
|
|
17
|
+
/** The short code the requester also displays. Compared by eye, never entered. */
|
|
18
|
+
confirmCode: string;
|
|
19
|
+
/** The label of the role granted. Shown once the request is approved or claimed. */
|
|
20
|
+
roleLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AccessRequestPanelProps {
|
|
23
|
+
request: AccessRequest;
|
|
24
|
+
state: AccessRequestState;
|
|
25
|
+
/** The roles the approver may grant. */
|
|
26
|
+
roles: Role[];
|
|
27
|
+
/** The permission catalog, used to name the permissions that make a role unavailable. */
|
|
28
|
+
permissions: Permission[];
|
|
29
|
+
/** What the approver holds. A role holding anything outside this set cannot be chosen. */
|
|
30
|
+
ownPermissionKeys: string[];
|
|
31
|
+
onApprove: (roleId: string) => Promise<void>;
|
|
32
|
+
onDeny: () => Promise<void>;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, onApprove, onDeny, className, }: AccessRequestPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Permission, Role } from "./types";
|
|
2
|
+
export interface RoleKeyPickerProps {
|
|
3
|
+
roles: Role[];
|
|
4
|
+
/** The permission catalog, used to name the permissions that make a role unavailable. */
|
|
5
|
+
permissions: Permission[];
|
|
6
|
+
/** What the issuer holds. A role holding anything outside this set cannot be chosen. */
|
|
7
|
+
ownPermissionKeys: string[];
|
|
8
|
+
/** The chosen role id, or `""` for none. */
|
|
9
|
+
value: string;
|
|
10
|
+
onValueChange: (roleId: string) => void;
|
|
11
|
+
/** The group's visible heading. */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** One line under the heading. */
|
|
14
|
+
description?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Whether `roleId` names a role in `roles` that the issuer may choose. */
|
|
19
|
+
export declare function isRoleSelectable(roleId: string, roles: Role[], own: ReadonlySet<string>): boolean;
|
|
20
|
+
/** The id of the selectable role holding the fewest permissions (the first of any tie), or `""` when none is selectable. */
|
|
21
|
+
export declare function leastPrivilegeRoleId(roles: Role[], own: ReadonlySet<string>): string;
|
|
22
|
+
export declare function RoleKeyPicker({ roles, permissions, ownPermissionKeys, value, onValueChange, label, description, disabled, className, }: RoleKeyPickerProps): import("react").JSX.Element;
|
|
@@ -12,7 +12,9 @@ export * from "./RolesPermissionsPage";
|
|
|
12
12
|
export * from "./MembersPanel";
|
|
13
13
|
export * from "./ChangePasswordForm";
|
|
14
14
|
export * from "./SessionsList";
|
|
15
|
+
export * from "./RoleKeyPicker";
|
|
15
16
|
export * from "./ApiKeysPanel";
|
|
17
|
+
export * from "./AccessRequestPanel";
|
|
16
18
|
export * from "./InvitationsList";
|
|
17
19
|
export * from "./InviteMembersDialog";
|
|
18
20
|
export * from "./Brand";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ export { cellLabel, eventLabel, formatDateRange, longDate, monthTitle, timeOfDay
|
|
|
148
148
|
export { initialFocusDay, isInMonth, nextDayForKey, useGridNavigation, type GridNavigation, type GridNavigationOptions, } from "./components/calendar/use-grid-navigation";
|
|
149
149
|
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";
|
|
150
150
|
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";
|
|
151
|
-
export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiKeysPanel, 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 ApiKey, 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";
|
|
151
|
+
export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiKeysPanel, AccessRequestPanel, 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 ApiKey, type AccessRequestPanelProps, type AccessRequest, type AccessRequestKind, type AccessRequestState, 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";
|
|
152
152
|
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";
|
|
153
153
|
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";
|
|
154
154
|
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";
|