@wakastellar/ui 1.0.12 → 2.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.
- package/README.md +163 -193
- package/dist/charts.cjs.js +1 -0
- package/dist/charts.es.js +16 -0
- package/dist/cn-B-fTneHh.js +1 -0
- package/dist/cn-DzRe1GWm.mjs +21 -0
- package/dist/components/index.d.ts +122 -0
- package/dist/components/waka-3d-pie-chart/index.d.ts +67 -0
- package/dist/components/waka-achievement-unlock/index.d.ts +83 -0
- package/dist/components/waka-activity-feed/index.d.ts +78 -0
- package/dist/components/waka-address-autocomplete/index.d.ts +124 -0
- package/dist/components/waka-alert-stack/index.d.ts +58 -0
- package/dist/components/waka-allocation-matrix/index.d.ts +193 -0
- package/dist/components/waka-approval-chain/index.d.ts +43 -0
- package/dist/components/waka-audit-log/index.d.ts +142 -0
- package/dist/components/waka-badge-showcase/index.d.ts +51 -0
- package/dist/components/waka-biometric-prompt/index.d.ts +84 -0
- package/dist/components/waka-bottom-sheet/index.d.ts +61 -0
- package/dist/components/waka-breadcrumb-path/index.d.ts +46 -0
- package/dist/components/waka-budget-burn/index.d.ts +154 -0
- package/dist/components/waka-capacity-planner/index.d.ts +132 -0
- package/dist/components/waka-cart-summary/index.d.ts +154 -0
- package/dist/components/waka-challenge-timer/index.d.ts +86 -0
- package/dist/components/waka-chat-bubble/index.d.ts +127 -0
- package/dist/components/waka-checklist/index.d.ts +123 -0
- package/dist/components/waka-checkout-stepper/index.d.ts +154 -0
- package/dist/components/waka-cohort-table/index.d.ts +130 -0
- package/dist/components/waka-combo-counter/index.d.ts +53 -0
- package/dist/components/waka-command-bar/index.d.ts +45 -0
- package/dist/components/waka-compare-period/index.d.ts +122 -0
- package/dist/components/waka-connection-matrix/index.d.ts +117 -0
- package/dist/components/waka-contribution-graph/index.d.ts +34 -0
- package/dist/components/waka-cost-breakdown/index.d.ts +50 -0
- package/dist/components/waka-coupon-input/index.d.ts +105 -0
- package/dist/components/waka-credit-card-input/index.d.ts +95 -0
- package/dist/components/waka-daily-reward/index.d.ts +76 -0
- package/dist/components/waka-deployment-lane/index.d.ts +43 -0
- package/dist/components/waka-device-trust/index.d.ts +95 -0
- package/dist/components/waka-dock/index.d.ts +44 -0
- package/dist/components/waka-empty-state/index.d.ts +85 -0
- package/dist/components/waka-error-shake/index.d.ts +49 -0
- package/dist/components/waka-feature-announcement/index.d.ts +112 -0
- package/dist/components/waka-floating-nav/index.d.ts +51 -0
- package/dist/components/waka-flow-diagram/index.d.ts +71 -0
- package/dist/components/waka-funnel-chart/index.d.ts +108 -0
- package/dist/components/waka-glow-card/index.d.ts +32 -0
- package/dist/components/waka-goal-progress/index.d.ts +139 -0
- package/dist/components/waka-haptic-button/index.d.ts +45 -0
- package/dist/components/waka-health-pulse/index.d.ts +28 -0
- package/dist/components/waka-heatmap/index.d.ts +135 -0
- package/dist/components/waka-hotspot/index.d.ts +106 -0
- package/dist/components/waka-incident-timeline/index.d.ts +38 -0
- package/dist/components/waka-invoice-preview/index.d.ts +137 -0
- package/dist/components/waka-kpi-dashboard/index.d.ts +80 -0
- package/dist/components/waka-leaderboard/index.d.ts +85 -0
- package/dist/components/waka-level-progress/index.d.ts +89 -0
- package/dist/components/waka-liquid-button/index.d.ts +41 -0
- package/dist/components/waka-loading-orbit/index.d.ts +90 -0
- package/dist/components/waka-loot-box/index.d.ts +87 -0
- package/dist/components/waka-magic-link/index.d.ts +34 -0
- package/dist/components/waka-magnetic-button/index.d.ts +56 -0
- package/dist/components/waka-mention-input/index.d.ts +106 -0
- package/dist/components/waka-metric-sparkline/index.d.ts +46 -0
- package/dist/components/waka-milestone-road/index.d.ts +91 -0
- package/dist/components/waka-morph-button/index.d.ts +62 -0
- package/dist/components/waka-network-topology/index.d.ts +35 -0
- package/dist/components/waka-orbital-menu/index.d.ts +61 -0
- package/dist/components/waka-order-tracker/index.d.ts +121 -0
- package/dist/components/waka-password-strength/index.d.ts +98 -0
- package/dist/components/waka-payment-method-picker/index.d.ts +88 -0
- package/dist/components/waka-permission-matrix/index.d.ts +197 -0
- package/dist/components/waka-phone-input/index.d.ts +93 -0
- package/dist/components/waka-pipeline-view/index.d.ts +49 -0
- package/dist/components/waka-player-card/index.d.ts +36 -0
- package/dist/components/waka-points-popup/index.d.ts +75 -0
- package/dist/components/waka-power-up/index.d.ts +103 -0
- package/dist/components/waka-presence-indicator/index.d.ts +188 -0
- package/dist/components/waka-pricing-table/index.d.ts +77 -0
- package/dist/components/waka-product-card/index.d.ts +81 -0
- package/dist/components/waka-progress-onboarding/index.d.ts +97 -0
- package/dist/components/waka-pull-to-refresh/index.d.ts +45 -0
- package/dist/components/waka-quest-card/index.d.ts +110 -0
- package/dist/components/waka-quota-bar/index.d.ts +100 -0
- package/dist/components/waka-radar-score/index.d.ts +95 -0
- package/dist/components/waka-rank-badge/index.d.ts +58 -0
- package/dist/components/waka-rating-input/index.d.ts +110 -0
- package/dist/components/waka-reaction-picker/index.d.ts +77 -0
- package/dist/components/waka-region-map/index.d.ts +27 -0
- package/dist/components/waka-resource-gauge/index.d.ts +78 -0
- package/dist/components/waka-resource-pool/index.d.ts +81 -0
- package/dist/components/waka-rollback-slider/index.d.ts +79 -0
- package/dist/components/waka-sankey-diagram/index.d.ts +120 -0
- package/dist/components/waka-schedule-picker/index.d.ts +100 -0
- package/dist/components/waka-scratch-card/index.d.ts +87 -0
- package/dist/components/waka-season-pass/index.d.ts +65 -0
- package/dist/components/waka-security-score/index.d.ts +124 -0
- package/dist/components/waka-server-rack/index.d.ts +44 -0
- package/dist/components/waka-session-manager/index.d.ts +116 -0
- package/dist/components/waka-signature-pad/index.d.ts +87 -0
- package/dist/components/waka-skeleton-wave/index.d.ts +79 -0
- package/dist/components/waka-skill-tree/index.d.ts +78 -0
- package/dist/components/waka-sla-tracker/index.d.ts +65 -0
- package/dist/components/waka-slider-range/index.d.ts +88 -0
- package/dist/components/waka-spin-wheel/index.d.ts +51 -0
- package/dist/components/waka-spotlight/index.d.ts +47 -0
- package/dist/components/waka-stats-hexagon/index.d.ts +149 -0
- package/dist/components/waka-status-matrix/index.d.ts +38 -0
- package/dist/components/waka-streak-counter/index.d.ts +27 -0
- package/dist/components/waka-success-explosion/index.d.ts +51 -0
- package/dist/components/waka-swipe-card/index.d.ts +64 -0
- package/dist/components/waka-tabs-morph/index.d.ts +66 -0
- package/dist/components/waka-tag-input/index.d.ts +134 -0
- package/dist/components/waka-team-banner/index.d.ts +122 -0
- package/dist/components/waka-terminal-output/index.d.ts +48 -0
- package/dist/components/waka-thread-view/index.d.ts +101 -0
- package/dist/components/waka-tilt-card/index.d.ts +36 -0
- package/dist/components/waka-tooltip-tour/index.d.ts +118 -0
- package/dist/components/waka-tour-guide/index.d.ts +122 -0
- package/dist/components/waka-tournament-bracket/index.d.ts +101 -0
- package/dist/components/waka-treemap-chart/index.d.ts +104 -0
- package/dist/components/waka-two-factor-setup/index.d.ts +93 -0
- package/dist/components/waka-typewriter/index.d.ts +98 -0
- package/dist/components/waka-typing-indicator/index.d.ts +64 -0
- package/dist/components/waka-versus-card/index.d.ts +117 -0
- package/dist/components/waka-video-call/index.d.ts +170 -0
- package/dist/components/waka-voice-message/index.d.ts +117 -0
- package/dist/components/waka-welcome-modal/index.d.ts +120 -0
- package/dist/components/waka-xp-bar/index.d.ts +54 -0
- package/dist/export.cjs.js +1 -0
- package/dist/export.d.ts +3 -1
- package/dist/export.es.js +5 -0
- package/dist/index-B9GTFkji.js +1 -0
- package/dist/index-c0jcWyEL.mjs +466 -0
- package/dist/index.cjs.js +2530 -22
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +72081 -19512
- package/dist/rich-text.cjs.js +1 -0
- package/dist/rich-text.es.js +4 -0
- package/dist/types-BOWIoR7j.mjs +1111 -0
- package/dist/types-D2yCJ91P.js +1 -0
- package/dist/useDataTableImport-D8R2HQl6.mjs +229 -0
- package/dist/useDataTableImport-S_hhA5Wo.js +9 -0
- package/package.json +57 -20
- package/src/styles/base.css +108 -0
- package/src/styles/code-highlight.css +82 -86
- package/src/styles/globals-v3.css +9 -0
- package/src/styles/globals.css +57 -74
- package/src/styles/tailwind.preset.js +69 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export interface Resource {
|
|
2
|
+
/** Unique identifier for the resource */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Display name */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Optional category for grouping */
|
|
7
|
+
category?: string;
|
|
8
|
+
/** Maximum capacity (default: 100) */
|
|
9
|
+
capacity?: number;
|
|
10
|
+
/** Custom color for the resource row */
|
|
11
|
+
color?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Consumer {
|
|
14
|
+
/** Unique identifier for the consumer/project */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Display name */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Optional priority level */
|
|
19
|
+
priority?: "low" | "medium" | "high" | "critical";
|
|
20
|
+
/** Custom color for the consumer column */
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface Allocation {
|
|
24
|
+
/** Resource ID */
|
|
25
|
+
resourceId: string;
|
|
26
|
+
/** Consumer ID */
|
|
27
|
+
consumerId: string;
|
|
28
|
+
/** Allocation percentage (0-100+) */
|
|
29
|
+
value: number;
|
|
30
|
+
}
|
|
31
|
+
export type SortField = "name" | "total" | "allocation";
|
|
32
|
+
export type SortDirection = "asc" | "desc";
|
|
33
|
+
export type FilterMode = "all" | "over-allocated" | "under-allocated" | "unallocated";
|
|
34
|
+
export interface AllocationMatrixState {
|
|
35
|
+
/** Current allocations */
|
|
36
|
+
allocations: Map<string, number>;
|
|
37
|
+
/** Selected cell for editing */
|
|
38
|
+
selectedCell: {
|
|
39
|
+
resourceId: string;
|
|
40
|
+
consumerId: string;
|
|
41
|
+
} | null;
|
|
42
|
+
/** Row sort configuration */
|
|
43
|
+
rowSort: {
|
|
44
|
+
field: SortField;
|
|
45
|
+
direction: SortDirection;
|
|
46
|
+
};
|
|
47
|
+
/** Column sort configuration */
|
|
48
|
+
columnSort: {
|
|
49
|
+
field: SortField;
|
|
50
|
+
direction: SortDirection;
|
|
51
|
+
};
|
|
52
|
+
/** Filter mode */
|
|
53
|
+
filterMode: FilterMode;
|
|
54
|
+
/** Search query */
|
|
55
|
+
searchQuery: string;
|
|
56
|
+
/** Dragging state */
|
|
57
|
+
isDragging: boolean;
|
|
58
|
+
/** Drag start value */
|
|
59
|
+
dragStartValue: number;
|
|
60
|
+
}
|
|
61
|
+
export interface AllocationSummary {
|
|
62
|
+
/** Total allocations across all cells */
|
|
63
|
+
totalAllocations: number;
|
|
64
|
+
/** Average allocation per cell */
|
|
65
|
+
averageAllocation: number;
|
|
66
|
+
/** Number of over-allocated resources (>100%) */
|
|
67
|
+
overAllocatedCount: number;
|
|
68
|
+
/** Number of under-allocated resources (<100%) */
|
|
69
|
+
underAllocatedCount: number;
|
|
70
|
+
/** Number of fully allocated resources (=100%) */
|
|
71
|
+
fullyAllocatedCount: number;
|
|
72
|
+
/** Number of unallocated resources (0%) */
|
|
73
|
+
unallocatedCount: number;
|
|
74
|
+
/** Utilization efficiency percentage */
|
|
75
|
+
utilizationEfficiency: number;
|
|
76
|
+
}
|
|
77
|
+
export interface WakaAllocationMatrixProps {
|
|
78
|
+
/** Resources (rows) */
|
|
79
|
+
resources: Resource[];
|
|
80
|
+
/** Consumers/Projects (columns) */
|
|
81
|
+
consumers: Consumer[];
|
|
82
|
+
/** Initial allocations */
|
|
83
|
+
allocations?: Allocation[];
|
|
84
|
+
/** Enable editing */
|
|
85
|
+
editable?: boolean;
|
|
86
|
+
/** Enable drag to adjust allocations */
|
|
87
|
+
enableDrag?: boolean;
|
|
88
|
+
/** Show row totals */
|
|
89
|
+
showRowTotals?: boolean;
|
|
90
|
+
/** Show column totals */
|
|
91
|
+
showColumnTotals?: boolean;
|
|
92
|
+
/** Show summary statistics */
|
|
93
|
+
showSummary?: boolean;
|
|
94
|
+
/** Show filter controls */
|
|
95
|
+
showFilters?: boolean;
|
|
96
|
+
/** Show search */
|
|
97
|
+
showSearch?: boolean;
|
|
98
|
+
/** Over-allocation threshold (default: 100) */
|
|
99
|
+
overAllocationThreshold?: number;
|
|
100
|
+
/** Cell size */
|
|
101
|
+
cellSize?: "sm" | "md" | "lg";
|
|
102
|
+
/** Color scheme for intensity */
|
|
103
|
+
colorScheme?: "blue" | "green" | "purple" | "orange";
|
|
104
|
+
/** Callback when allocation changes */
|
|
105
|
+
onAllocationChange?: (resourceId: string, consumerId: string, value: number) => void;
|
|
106
|
+
/** Callback when allocations are saved */
|
|
107
|
+
onSave?: (allocations: Allocation[]) => void;
|
|
108
|
+
/** Custom value formatter */
|
|
109
|
+
formatValue?: (value: number) => string;
|
|
110
|
+
/** Additional CSS classes */
|
|
111
|
+
className?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface UseAllocationMatrixOptions {
|
|
114
|
+
/** Initial resources */
|
|
115
|
+
resources: Resource[];
|
|
116
|
+
/** Initial consumers */
|
|
117
|
+
consumers: Consumer[];
|
|
118
|
+
/** Initial allocations */
|
|
119
|
+
initialAllocations?: Allocation[];
|
|
120
|
+
/** Over-allocation threshold */
|
|
121
|
+
overAllocationThreshold?: number;
|
|
122
|
+
/** Callback when allocation changes */
|
|
123
|
+
onAllocationChange?: (resourceId: string, consumerId: string, value: number) => void;
|
|
124
|
+
}
|
|
125
|
+
export interface UseAllocationMatrixReturn {
|
|
126
|
+
/** Current allocations map */
|
|
127
|
+
allocations: Map<string, number>;
|
|
128
|
+
/** Set allocation for a cell */
|
|
129
|
+
setAllocation: (resourceId: string, consumerId: string, value: number) => void;
|
|
130
|
+
/** Get allocation for a cell */
|
|
131
|
+
getAllocation: (resourceId: string, consumerId: string) => number;
|
|
132
|
+
/** Get row total */
|
|
133
|
+
getRowTotal: (resourceId: string) => number;
|
|
134
|
+
/** Get column total */
|
|
135
|
+
getColumnTotal: (consumerId: string) => number;
|
|
136
|
+
/** Check if resource is over-allocated */
|
|
137
|
+
isOverAllocated: (resourceId: string) => boolean;
|
|
138
|
+
/** Get summary statistics */
|
|
139
|
+
getSummary: () => AllocationSummary;
|
|
140
|
+
/** Clear all allocations */
|
|
141
|
+
clearAll: () => void;
|
|
142
|
+
/** Reset to initial allocations */
|
|
143
|
+
reset: () => void;
|
|
144
|
+
/** Export allocations as array */
|
|
145
|
+
exportAllocations: () => Allocation[];
|
|
146
|
+
/** Import allocations from array */
|
|
147
|
+
importAllocations: (allocations: Allocation[]) => void;
|
|
148
|
+
/** Selected cell */
|
|
149
|
+
selectedCell: {
|
|
150
|
+
resourceId: string;
|
|
151
|
+
consumerId: string;
|
|
152
|
+
} | null;
|
|
153
|
+
/** Set selected cell */
|
|
154
|
+
setSelectedCell: (cell: {
|
|
155
|
+
resourceId: string;
|
|
156
|
+
consumerId: string;
|
|
157
|
+
} | null) => void;
|
|
158
|
+
/** Row sort */
|
|
159
|
+
rowSort: {
|
|
160
|
+
field: SortField;
|
|
161
|
+
direction: SortDirection;
|
|
162
|
+
};
|
|
163
|
+
/** Set row sort */
|
|
164
|
+
setRowSort: (sort: {
|
|
165
|
+
field: SortField;
|
|
166
|
+
direction: SortDirection;
|
|
167
|
+
}) => void;
|
|
168
|
+
/** Column sort */
|
|
169
|
+
columnSort: {
|
|
170
|
+
field: SortField;
|
|
171
|
+
direction: SortDirection;
|
|
172
|
+
};
|
|
173
|
+
/** Set column sort */
|
|
174
|
+
setColumnSort: (sort: {
|
|
175
|
+
field: SortField;
|
|
176
|
+
direction: SortDirection;
|
|
177
|
+
}) => void;
|
|
178
|
+
/** Filter mode */
|
|
179
|
+
filterMode: FilterMode;
|
|
180
|
+
/** Set filter mode */
|
|
181
|
+
setFilterMode: (mode: FilterMode) => void;
|
|
182
|
+
/** Search query */
|
|
183
|
+
searchQuery: string;
|
|
184
|
+
/** Set search query */
|
|
185
|
+
setSearchQuery: (query: string) => void;
|
|
186
|
+
/** Sorted and filtered resources */
|
|
187
|
+
filteredResources: Resource[];
|
|
188
|
+
/** Sorted consumers */
|
|
189
|
+
sortedConsumers: Consumer[];
|
|
190
|
+
}
|
|
191
|
+
export declare function useAllocationMatrix({ resources, consumers, initialAllocations, overAllocationThreshold, onAllocationChange, }: UseAllocationMatrixOptions): UseAllocationMatrixReturn;
|
|
192
|
+
export declare function WakaAllocationMatrix({ resources, consumers, allocations: initialAllocations, editable, enableDrag, showRowTotals, showColumnTotals, showSummary, showFilters, showSearch, overAllocationThreshold, cellSize, colorScheme, onAllocationChange, onSave, formatValue, className, }: WakaAllocationMatrixProps): import("react/jsx-runtime").JSX.Element;
|
|
193
|
+
export default WakaAllocationMatrix;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type ApprovalStatus = "pending" | "approved" | "rejected" | "skipped";
|
|
2
|
+
export interface Approver {
|
|
3
|
+
/** Unique identifier for the approver */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Approver's display name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Approver's avatar URL */
|
|
8
|
+
avatar?: string;
|
|
9
|
+
/** Approver's role/title */
|
|
10
|
+
role?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ApprovalStep {
|
|
13
|
+
/** Unique identifier for the step */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Approver information */
|
|
16
|
+
approver: Approver;
|
|
17
|
+
/** Current status of the approval step */
|
|
18
|
+
status: ApprovalStatus;
|
|
19
|
+
/** Timestamp when action was taken */
|
|
20
|
+
timestamp?: Date;
|
|
21
|
+
/** Comment left by the approver */
|
|
22
|
+
comment?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface WakaApprovalChainProps {
|
|
25
|
+
/** Array of approval steps */
|
|
26
|
+
steps: ApprovalStep[];
|
|
27
|
+
/** Current user's ID (to show approve/reject actions) */
|
|
28
|
+
currentUserId?: string;
|
|
29
|
+
/** Callback when approve is clicked */
|
|
30
|
+
onApprove?: (stepId: string, comment?: string) => void;
|
|
31
|
+
/** Callback when reject is clicked */
|
|
32
|
+
onReject?: (stepId: string, comment?: string) => void;
|
|
33
|
+
/** Layout variant */
|
|
34
|
+
variant?: "horizontal" | "vertical";
|
|
35
|
+
/** Size variant */
|
|
36
|
+
size?: "sm" | "md" | "lg";
|
|
37
|
+
/** Whether to show comments */
|
|
38
|
+
showComments?: boolean;
|
|
39
|
+
/** Additional CSS classes */
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function WakaApprovalChain({ steps, currentUserId, onApprove, onReject, variant, size, showComments, className, }: WakaApprovalChainProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export default WakaApprovalChain;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export type AuditEventType = "login" | "logout" | "create" | "update" | "delete" | "view" | "export" | "import" | "settings_change" | "permission_change" | "password_change" | "user_invite" | "user_remove" | "api_key_create" | "api_key_revoke" | "mfa_enable" | "mfa_disable" | "session_revoke" | "file_upload" | "file_download" | "payment" | "subscription_change" | "data_export" | "backup" | "restore";
|
|
2
|
+
export type AuditSeverity = "info" | "warning" | "critical";
|
|
3
|
+
export interface AuditUser {
|
|
4
|
+
/** Unique user identifier */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Display name */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Email address */
|
|
9
|
+
email?: string;
|
|
10
|
+
/** Avatar URL */
|
|
11
|
+
avatar?: string;
|
|
12
|
+
/** User role */
|
|
13
|
+
role?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AuditLocation {
|
|
16
|
+
/** City name */
|
|
17
|
+
city?: string;
|
|
18
|
+
/** Country name */
|
|
19
|
+
country?: string;
|
|
20
|
+
/** Country code */
|
|
21
|
+
countryCode?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AuditEvent {
|
|
24
|
+
/** Unique event identifier */
|
|
25
|
+
id: string;
|
|
26
|
+
/** Event type */
|
|
27
|
+
type: AuditEventType;
|
|
28
|
+
/** Severity level */
|
|
29
|
+
severity: AuditSeverity;
|
|
30
|
+
/** User who performed the action */
|
|
31
|
+
user: AuditUser;
|
|
32
|
+
/** Event description */
|
|
33
|
+
description: string;
|
|
34
|
+
/** Detailed action information */
|
|
35
|
+
details?: Record<string, any>;
|
|
36
|
+
/** IP address */
|
|
37
|
+
ipAddress?: string;
|
|
38
|
+
/** User agent string */
|
|
39
|
+
userAgent?: string;
|
|
40
|
+
/** Location information */
|
|
41
|
+
location?: AuditLocation;
|
|
42
|
+
/** Resource affected (e.g., "User: john@example.com") */
|
|
43
|
+
resource?: string;
|
|
44
|
+
/** When the event occurred */
|
|
45
|
+
timestamp: Date;
|
|
46
|
+
/** Session ID */
|
|
47
|
+
sessionId?: string;
|
|
48
|
+
/** Request ID for tracing */
|
|
49
|
+
requestId?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface AuditFilters {
|
|
52
|
+
/** Filter by event types */
|
|
53
|
+
eventTypes?: AuditEventType[];
|
|
54
|
+
/** Filter by severity levels */
|
|
55
|
+
severities?: AuditSeverity[];
|
|
56
|
+
/** Filter by user IDs */
|
|
57
|
+
userIds?: string[];
|
|
58
|
+
/** Search query */
|
|
59
|
+
search?: string;
|
|
60
|
+
/** Start date */
|
|
61
|
+
startDate?: Date;
|
|
62
|
+
/** End date */
|
|
63
|
+
endDate?: Date;
|
|
64
|
+
}
|
|
65
|
+
export interface WakaAuditLogProps {
|
|
66
|
+
/** List of audit events */
|
|
67
|
+
events: AuditEvent[];
|
|
68
|
+
/** Callback when an event is clicked */
|
|
69
|
+
onEventClick?: (event: AuditEvent) => void;
|
|
70
|
+
/** Callback when filters change */
|
|
71
|
+
onFilterChange?: (filters: AuditFilters) => void;
|
|
72
|
+
/** Callback when load more is triggered (pagination/infinite scroll) */
|
|
73
|
+
onLoadMore?: () => void;
|
|
74
|
+
/** Callback when export is requested */
|
|
75
|
+
onExport?: (format: "csv" | "json") => void;
|
|
76
|
+
/** Whether more events can be loaded */
|
|
77
|
+
hasMore?: boolean;
|
|
78
|
+
/** Whether events are currently loading */
|
|
79
|
+
loading?: boolean;
|
|
80
|
+
/** Whether to show filter controls */
|
|
81
|
+
showFilters?: boolean;
|
|
82
|
+
/** Whether to show search */
|
|
83
|
+
showSearch?: boolean;
|
|
84
|
+
/** Whether to show export button */
|
|
85
|
+
showExport?: boolean;
|
|
86
|
+
/** Whether to use infinite scroll instead of pagination */
|
|
87
|
+
infiniteScroll?: boolean;
|
|
88
|
+
/** Maximum number of events to display */
|
|
89
|
+
maxItems?: number;
|
|
90
|
+
/** Available users for filtering */
|
|
91
|
+
users?: AuditUser[];
|
|
92
|
+
/** Custom className */
|
|
93
|
+
className?: string;
|
|
94
|
+
}
|
|
95
|
+
export declare function WakaAuditLog({ events, onEventClick, onFilterChange, onLoadMore, onExport, hasMore, loading, showFilters, showSearch, showExport, infiniteScroll, maxItems, users, className, }: WakaAuditLogProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
export interface UseAuditLogOptions {
|
|
97
|
+
/** Initial events */
|
|
98
|
+
initialEvents?: AuditEvent[];
|
|
99
|
+
/** Maximum events to keep in memory */
|
|
100
|
+
maxEvents?: number;
|
|
101
|
+
/** Initial filters */
|
|
102
|
+
initialFilters?: AuditFilters;
|
|
103
|
+
}
|
|
104
|
+
export interface UseAuditLogReturn {
|
|
105
|
+
/** Current audit events */
|
|
106
|
+
events: AuditEvent[];
|
|
107
|
+
/** Current filters */
|
|
108
|
+
filters: AuditFilters;
|
|
109
|
+
/** Loading state */
|
|
110
|
+
loading: boolean;
|
|
111
|
+
/** Whether more events can be loaded */
|
|
112
|
+
hasMore: boolean;
|
|
113
|
+
/** Add a new event */
|
|
114
|
+
addEvent: (event: AuditEvent) => void;
|
|
115
|
+
/** Add multiple events */
|
|
116
|
+
addEvents: (events: AuditEvent[]) => void;
|
|
117
|
+
/** Remove an event */
|
|
118
|
+
removeEvent: (eventId: string) => void;
|
|
119
|
+
/** Set filters */
|
|
120
|
+
setFilters: (filters: AuditFilters) => void;
|
|
121
|
+
/** Clear all filters */
|
|
122
|
+
clearFilters: () => void;
|
|
123
|
+
/** Load more events */
|
|
124
|
+
loadMore: (fetcher: () => Promise<{
|
|
125
|
+
events: AuditEvent[];
|
|
126
|
+
hasMore: boolean;
|
|
127
|
+
}>) => Promise<void>;
|
|
128
|
+
/** Refresh all events */
|
|
129
|
+
refresh: (events: AuditEvent[]) => void;
|
|
130
|
+
/** Clear all events */
|
|
131
|
+
clear: () => void;
|
|
132
|
+
/** Set loading state */
|
|
133
|
+
setLoading: (loading: boolean) => void;
|
|
134
|
+
/** Set has more state */
|
|
135
|
+
setHasMore: (hasMore: boolean) => void;
|
|
136
|
+
/** Export events to format */
|
|
137
|
+
exportEvents: (format: "csv" | "json") => string;
|
|
138
|
+
/** Get filtered events */
|
|
139
|
+
getFilteredEvents: () => AuditEvent[];
|
|
140
|
+
}
|
|
141
|
+
export declare function useAuditLog({ initialEvents, maxEvents, initialFilters, }?: UseAuditLogOptions): UseAuditLogReturn;
|
|
142
|
+
export default WakaAuditLog;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type BadgeRarity = "common" | "rare" | "epic" | "legendary";
|
|
3
|
+
export interface Badge {
|
|
4
|
+
/** Unique identifier */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Badge name */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Badge description */
|
|
9
|
+
description: string;
|
|
10
|
+
/** Badge icon (React node) */
|
|
11
|
+
icon: React.ReactNode;
|
|
12
|
+
/** Rarity tier */
|
|
13
|
+
rarity: BadgeRarity;
|
|
14
|
+
/** Whether the badge is unlocked */
|
|
15
|
+
unlocked: boolean;
|
|
16
|
+
/** When the badge was unlocked */
|
|
17
|
+
unlockedAt?: Date;
|
|
18
|
+
/** Progress towards unlocking (0-100) */
|
|
19
|
+
progress?: number;
|
|
20
|
+
/** Badge category */
|
|
21
|
+
category?: string;
|
|
22
|
+
/** Whether this is a newly unlocked badge */
|
|
23
|
+
isNew?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface WakaBadgeShowcaseProps {
|
|
26
|
+
/** Array of badges to display */
|
|
27
|
+
badges: Badge[];
|
|
28
|
+
/** Callback when a badge is clicked */
|
|
29
|
+
onBadgeClick?: (id: string) => void;
|
|
30
|
+
/** Display variant */
|
|
31
|
+
variant?: "grid" | "list" | "showcase";
|
|
32
|
+
/** Whether to show locked badges */
|
|
33
|
+
showLocked?: boolean;
|
|
34
|
+
/** Whether to show progress indicators */
|
|
35
|
+
showProgress?: boolean;
|
|
36
|
+
/** Number of columns for grid layout */
|
|
37
|
+
columns?: number;
|
|
38
|
+
/** Size of badge icons */
|
|
39
|
+
size?: "sm" | "md" | "lg";
|
|
40
|
+
/** Additional CSS classes */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function WakaBadgeShowcase({ badges, onBadgeClick, variant, showLocked, showProgress, columns, size, className, }: WakaBadgeShowcaseProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function WakaBadgeShowcaseCompact(props: Omit<WakaBadgeShowcaseProps, "variant" | "size" | "columns">): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function WakaBadgeShowcaseList(props: Omit<WakaBadgeShowcaseProps, "variant">): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function WakaBadgeShowcaseHero(props: Omit<WakaBadgeShowcaseProps, "variant" | "size">): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export interface WakaBadgeStatsProps {
|
|
48
|
+
badges: Badge[];
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare function WakaBadgeStats({ badges, className }: WakaBadgeStatsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type BiometricType = "fingerprint" | "face" | "iris" | "voice";
|
|
3
|
+
export type BiometricState = "idle" | "scanning" | "success" | "error";
|
|
4
|
+
export interface BiometricPromptConfig {
|
|
5
|
+
/** Type of biometric authentication */
|
|
6
|
+
type: BiometricType;
|
|
7
|
+
/** Custom label for the biometric type */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Custom icon component */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface WakaBiometricPromptProps {
|
|
13
|
+
/** Available biometric types */
|
|
14
|
+
biometricTypes?: BiometricPromptConfig[];
|
|
15
|
+
/** Currently selected biometric type */
|
|
16
|
+
selectedType?: BiometricType;
|
|
17
|
+
/** Callback when biometric type changes */
|
|
18
|
+
onTypeChange?: (type: BiometricType) => void;
|
|
19
|
+
/** Title text */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Description text */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Current authentication state */
|
|
24
|
+
state?: BiometricState;
|
|
25
|
+
/** Error message when state is "error" */
|
|
26
|
+
errorMessage?: string;
|
|
27
|
+
/** Callback when authentication is initiated */
|
|
28
|
+
onAuthenticate?: () => void | Promise<void>;
|
|
29
|
+
/** Callback when retry is clicked */
|
|
30
|
+
onRetry?: () => void;
|
|
31
|
+
/** Callback when cancel is clicked */
|
|
32
|
+
onCancel?: () => void;
|
|
33
|
+
/** Callback when fallback to password is clicked */
|
|
34
|
+
onFallbackToPassword?: () => void;
|
|
35
|
+
/** Show fallback to password option */
|
|
36
|
+
showPasswordFallback?: boolean;
|
|
37
|
+
/** Show cancel button */
|
|
38
|
+
showCancel?: boolean;
|
|
39
|
+
/** Custom scanning duration in ms (for demo purposes) */
|
|
40
|
+
scanningDuration?: number;
|
|
41
|
+
/** Success message */
|
|
42
|
+
successMessage?: string;
|
|
43
|
+
/** Additional CSS classes */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Size variant */
|
|
46
|
+
size?: "sm" | "md" | "lg";
|
|
47
|
+
/** Color scheme */
|
|
48
|
+
colorScheme?: "default" | "primary" | "dark";
|
|
49
|
+
}
|
|
50
|
+
export interface UseBiometricPromptOptions {
|
|
51
|
+
/** Initial biometric type */
|
|
52
|
+
initialType?: BiometricType;
|
|
53
|
+
/** Simulated scanning duration */
|
|
54
|
+
scanningDuration?: number;
|
|
55
|
+
/** Simulated success rate (0-1, for demo) */
|
|
56
|
+
successRate?: number;
|
|
57
|
+
/** Callback on successful authentication */
|
|
58
|
+
onSuccess?: () => void;
|
|
59
|
+
/** Callback on authentication error */
|
|
60
|
+
onError?: (error: string) => void;
|
|
61
|
+
/** Actual authentication function */
|
|
62
|
+
authenticate?: () => Promise<boolean>;
|
|
63
|
+
}
|
|
64
|
+
export interface UseBiometricPromptReturn {
|
|
65
|
+
/** Current state */
|
|
66
|
+
state: BiometricState;
|
|
67
|
+
/** Current biometric type */
|
|
68
|
+
selectedType: BiometricType;
|
|
69
|
+
/** Error message if any */
|
|
70
|
+
errorMessage: string | null;
|
|
71
|
+
/** Set biometric type */
|
|
72
|
+
setSelectedType: (type: BiometricType) => void;
|
|
73
|
+
/** Start authentication */
|
|
74
|
+
startAuthentication: () => Promise<void>;
|
|
75
|
+
/** Retry authentication */
|
|
76
|
+
retry: () => void;
|
|
77
|
+
/** Reset to idle state */
|
|
78
|
+
reset: () => void;
|
|
79
|
+
/** Cancel authentication */
|
|
80
|
+
cancel: () => void;
|
|
81
|
+
}
|
|
82
|
+
export declare function useBiometricPrompt(options?: UseBiometricPromptOptions): UseBiometricPromptReturn;
|
|
83
|
+
export declare const WakaBiometricPrompt: React.ForwardRefExoticComponent<WakaBiometricPromptProps & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
export default WakaBiometricPrompt;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type SnapPoint = number | "content" | "full";
|
|
4
|
+
export interface WakaBottomSheetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onDragStart" | "onDragEnd">, VariantProps<typeof bottomSheetVariants> {
|
|
5
|
+
/** Whether the sheet is open */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Callback when open state changes */
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
/** Snap points as percentages (0-100) or special values */
|
|
10
|
+
snapPoints?: SnapPoint[];
|
|
11
|
+
/** Default snap point index */
|
|
12
|
+
defaultSnapPoint?: number;
|
|
13
|
+
/** Current snap point index (controlled) */
|
|
14
|
+
snapPoint?: number;
|
|
15
|
+
/** Callback when snap point changes */
|
|
16
|
+
onSnapPointChange?: (index: number) => void;
|
|
17
|
+
/** Whether to show backdrop */
|
|
18
|
+
showBackdrop?: boolean;
|
|
19
|
+
/** Whether clicking backdrop closes sheet */
|
|
20
|
+
closeOnBackdropClick?: boolean;
|
|
21
|
+
/** Whether to show drag handle */
|
|
22
|
+
showHandle?: boolean;
|
|
23
|
+
/** Whether to block scroll when open */
|
|
24
|
+
blockScroll?: boolean;
|
|
25
|
+
/** Enable haptic feedback */
|
|
26
|
+
hapticFeedback?: boolean;
|
|
27
|
+
/** Custom header content */
|
|
28
|
+
header?: React.ReactNode;
|
|
29
|
+
/** Custom footer content */
|
|
30
|
+
footer?: React.ReactNode;
|
|
31
|
+
/** Main content */
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
/** Callback when drag starts */
|
|
34
|
+
onDragStart?: () => void;
|
|
35
|
+
/** Callback when drag ends */
|
|
36
|
+
onDragEnd?: (snapPointIndex: number) => void;
|
|
37
|
+
/** Animation duration in ms */
|
|
38
|
+
animationDuration?: number;
|
|
39
|
+
/** Enable keyboard escape to close */
|
|
40
|
+
closeOnEscape?: boolean;
|
|
41
|
+
}
|
|
42
|
+
declare const bottomSheetVariants: (props?: ({
|
|
43
|
+
variant?: "default" | "flat" | "glass" | null | undefined;
|
|
44
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
45
|
+
export declare const WakaBottomSheet: React.ForwardRefExoticComponent<WakaBottomSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export interface UseBottomSheetOptions {
|
|
47
|
+
defaultOpen?: boolean;
|
|
48
|
+
defaultSnapPoint?: number;
|
|
49
|
+
onOpenChange?: (open: boolean) => void;
|
|
50
|
+
onSnapPointChange?: (index: number) => void;
|
|
51
|
+
}
|
|
52
|
+
export declare function useBottomSheet(options?: UseBottomSheetOptions): {
|
|
53
|
+
open: boolean;
|
|
54
|
+
snapPoint: number;
|
|
55
|
+
onOpenChange: (newOpen: boolean) => void;
|
|
56
|
+
onSnapPointChange: (index: number) => void;
|
|
57
|
+
openSheet: (snapPointIndex?: number) => void;
|
|
58
|
+
closeSheet: () => void;
|
|
59
|
+
toggleSheet: () => void;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface BreadcrumbPathItem {
|
|
3
|
+
/** Unique identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Label for the item */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Icon element */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** URL or href */
|
|
10
|
+
href?: string;
|
|
11
|
+
/** Click handler */
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
/** Additional data */
|
|
14
|
+
data?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface WakaBreadcrumbPathProps {
|
|
17
|
+
/** Breadcrumb items */
|
|
18
|
+
items: BreadcrumbPathItem[];
|
|
19
|
+
/** Maximum visible items (will collapse middle items) */
|
|
20
|
+
maxItems?: number;
|
|
21
|
+
/** Show SVG path connecting items */
|
|
22
|
+
showPath?: boolean;
|
|
23
|
+
/** Path color */
|
|
24
|
+
pathColor?: string;
|
|
25
|
+
/** Path stroke width */
|
|
26
|
+
pathStrokeWidth?: number;
|
|
27
|
+
/** Animation duration in ms */
|
|
28
|
+
animationDuration?: number;
|
|
29
|
+
/** Size variant */
|
|
30
|
+
size?: "sm" | "md" | "lg";
|
|
31
|
+
/** Custom render for items */
|
|
32
|
+
renderItem?: (item: BreadcrumbPathItem, isLast: boolean) => React.ReactNode;
|
|
33
|
+
/** Custom className */
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function WakaBreadcrumbPath({ items, maxItems, showPath, pathColor, pathStrokeWidth, animationDuration, size, renderItem, className, }: WakaBreadcrumbPathProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function useBreadcrumbPath(initialItems?: BreadcrumbPathItem[]): {
|
|
38
|
+
items: BreadcrumbPathItem[];
|
|
39
|
+
push: (item: BreadcrumbPathItem) => void;
|
|
40
|
+
pop: () => void;
|
|
41
|
+
goTo: (id: string) => void;
|
|
42
|
+
reset: (newItems?: BreadcrumbPathItem[]) => void;
|
|
43
|
+
replace: (id: string, newItem: BreadcrumbPathItem) => void;
|
|
44
|
+
setItems: React.Dispatch<React.SetStateAction<BreadcrumbPathItem[]>>;
|
|
45
|
+
};
|
|
46
|
+
export default WakaBreadcrumbPath;
|