@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,45 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type HapticPattern = "light" | "medium" | "heavy" | "success" | "warning" | "error" | "selection" | number[];
|
|
4
|
+
export interface WakaHapticButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof hapticButtonVariants> {
|
|
5
|
+
/** Render as child component */
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
/** Haptic pattern on press */
|
|
8
|
+
hapticPattern?: HapticPattern;
|
|
9
|
+
/** Enable/disable haptic feedback */
|
|
10
|
+
hapticEnabled?: boolean;
|
|
11
|
+
/** Enable ripple effect */
|
|
12
|
+
ripple?: boolean;
|
|
13
|
+
/** Ripple color (CSS color value) */
|
|
14
|
+
rippleColor?: string;
|
|
15
|
+
/** Ripple duration in ms */
|
|
16
|
+
rippleDuration?: number;
|
|
17
|
+
/** Enable press scale animation */
|
|
18
|
+
pressScale?: boolean;
|
|
19
|
+
/** Scale factor on press (0-1) */
|
|
20
|
+
pressScaleFactor?: number;
|
|
21
|
+
/** Enable glow effect on press */
|
|
22
|
+
glowOnPress?: boolean;
|
|
23
|
+
/** Glow color (CSS color value) */
|
|
24
|
+
glowColor?: string;
|
|
25
|
+
/** Loading state */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Icon to show before children */
|
|
28
|
+
leftIcon?: React.ReactNode;
|
|
29
|
+
/** Icon to show after children */
|
|
30
|
+
rightIcon?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
declare const hapticButtonVariants: (props?: ({
|
|
33
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "gradient" | "glass" | "neon" | null | undefined;
|
|
34
|
+
size?: "default" | "sm" | "lg" | "icon" | "xl" | "icon-sm" | "icon-lg" | null | undefined;
|
|
35
|
+
rounded?: "default" | "sm" | "lg" | "full" | null | undefined;
|
|
36
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
37
|
+
export declare const WakaHapticButton: React.ForwardRefExoticComponent<WakaHapticButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
export interface WakaHapticIconButtonProps extends Omit<WakaHapticButtonProps, "children" | "leftIcon" | "rightIcon"> {
|
|
39
|
+
/** Icon to display */
|
|
40
|
+
icon: React.ReactNode;
|
|
41
|
+
/** Accessible label */
|
|
42
|
+
"aria-label": string;
|
|
43
|
+
}
|
|
44
|
+
export declare const WakaHapticIconButton: React.ForwardRefExoticComponent<WakaHapticIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type HealthStatus = "healthy" | "warning" | "critical" | "down" | "unknown";
|
|
2
|
+
export interface WakaHealthPulseProps {
|
|
3
|
+
/** Current health status of the service */
|
|
4
|
+
status: HealthStatus;
|
|
5
|
+
/** Pulse rate in beats per minute (affects animation speed) */
|
|
6
|
+
pulseRate?: number;
|
|
7
|
+
/** Actual metric value to display */
|
|
8
|
+
value?: number;
|
|
9
|
+
/** Label for the health monitor */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Unit for the value (e.g., "req/s", "ms") */
|
|
12
|
+
unit?: string;
|
|
13
|
+
/** Size variant */
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
/** Whether to show the value display */
|
|
16
|
+
showValue?: boolean;
|
|
17
|
+
/** Whether to animate the pulse */
|
|
18
|
+
animated?: boolean;
|
|
19
|
+
/** Custom colors per status */
|
|
20
|
+
colors?: Partial<Record<HealthStatus, string>>;
|
|
21
|
+
/** Additional CSS classes */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function WakaHealthPulse({ status, pulseRate, value, label, unit, size, showValue, animated, colors, className, }: WakaHealthPulseProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare namespace WakaHealthPulse {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
28
|
+
export default WakaHealthPulse;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export interface HeatmapCell {
|
|
2
|
+
/** Row index */
|
|
3
|
+
row: number;
|
|
4
|
+
/** Column index */
|
|
5
|
+
col: number;
|
|
6
|
+
/** Cell value */
|
|
7
|
+
value: number;
|
|
8
|
+
/** Optional custom label for the cell */
|
|
9
|
+
label?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface HeatmapData {
|
|
12
|
+
/** 2D array of values (rows x cols) */
|
|
13
|
+
values: number[][];
|
|
14
|
+
/** Row labels */
|
|
15
|
+
rowLabels?: string[];
|
|
16
|
+
/** Column labels */
|
|
17
|
+
columnLabels?: string[];
|
|
18
|
+
}
|
|
19
|
+
export type ColorSchemeType = "sequential" | "diverging";
|
|
20
|
+
export interface ColorScheme {
|
|
21
|
+
/** Type of color scheme */
|
|
22
|
+
type: ColorSchemeType;
|
|
23
|
+
/** Colors array (for sequential: low to high, for diverging: negative to neutral to positive) */
|
|
24
|
+
colors: string[];
|
|
25
|
+
}
|
|
26
|
+
export interface HeatmapSelection {
|
|
27
|
+
/** Selected cell row */
|
|
28
|
+
row: number;
|
|
29
|
+
/** Selected cell column */
|
|
30
|
+
col: number;
|
|
31
|
+
/** Cell value */
|
|
32
|
+
value: number;
|
|
33
|
+
}
|
|
34
|
+
export interface UseHeatmapOptions {
|
|
35
|
+
/** Initial zoom level */
|
|
36
|
+
initialZoom?: number;
|
|
37
|
+
/** Minimum zoom level */
|
|
38
|
+
minZoom?: number;
|
|
39
|
+
/** Maximum zoom level */
|
|
40
|
+
maxZoom?: number;
|
|
41
|
+
/** Initial pan position */
|
|
42
|
+
initialPan?: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
};
|
|
46
|
+
/** Callback when selection changes */
|
|
47
|
+
onSelectionChange?: (selection: HeatmapSelection | null) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface UseHeatmapReturn {
|
|
50
|
+
/** Current zoom level */
|
|
51
|
+
zoom: number;
|
|
52
|
+
/** Current pan position */
|
|
53
|
+
pan: {
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
};
|
|
57
|
+
/** Currently selected cell */
|
|
58
|
+
selectedCell: HeatmapSelection | null;
|
|
59
|
+
/** Whether the user is currently panning */
|
|
60
|
+
isPanning: boolean;
|
|
61
|
+
/** Zoom in by a step */
|
|
62
|
+
zoomIn: () => void;
|
|
63
|
+
/** Zoom out by a step */
|
|
64
|
+
zoomOut: () => void;
|
|
65
|
+
/** Reset zoom to initial level */
|
|
66
|
+
resetZoom: () => void;
|
|
67
|
+
/** Set pan position */
|
|
68
|
+
setPan: (pan: {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
}) => void;
|
|
72
|
+
/** Reset pan to initial position */
|
|
73
|
+
resetPan: () => void;
|
|
74
|
+
/** Select a cell */
|
|
75
|
+
selectCell: (selection: HeatmapSelection | null) => void;
|
|
76
|
+
/** Start panning */
|
|
77
|
+
startPanning: () => void;
|
|
78
|
+
/** Stop panning */
|
|
79
|
+
stopPanning: () => void;
|
|
80
|
+
/** Handle mouse movement for panning */
|
|
81
|
+
handlePanMove: (dx: number, dy: number) => void;
|
|
82
|
+
}
|
|
83
|
+
export interface WakaHeatmapProps {
|
|
84
|
+
/** Heatmap data */
|
|
85
|
+
data: HeatmapData;
|
|
86
|
+
/** Width of the heatmap container */
|
|
87
|
+
width?: number;
|
|
88
|
+
/** Height of the heatmap container */
|
|
89
|
+
height?: number;
|
|
90
|
+
/** Cell size in pixels */
|
|
91
|
+
cellSize?: number;
|
|
92
|
+
/** Gap between cells in pixels */
|
|
93
|
+
cellGap?: number;
|
|
94
|
+
/** Color scheme to use */
|
|
95
|
+
colorScheme?: ColorScheme;
|
|
96
|
+
/** Predefined color scheme name */
|
|
97
|
+
colorSchemeName?: "blues" | "greens" | "reds" | "viridis" | "plasma" | "coolwarm" | "rdylgn";
|
|
98
|
+
/** Show row labels */
|
|
99
|
+
showRowLabels?: boolean;
|
|
100
|
+
/** Show column labels */
|
|
101
|
+
showColumnLabels?: boolean;
|
|
102
|
+
/** Show color scale legend */
|
|
103
|
+
showLegend?: boolean;
|
|
104
|
+
/** Show min/max value indicators */
|
|
105
|
+
showMinMax?: boolean;
|
|
106
|
+
/** Show tooltip on hover */
|
|
107
|
+
showTooltip?: boolean;
|
|
108
|
+
/** Enable cell selection on click */
|
|
109
|
+
enableSelection?: boolean;
|
|
110
|
+
/** Enable zoom functionality */
|
|
111
|
+
enableZoom?: boolean;
|
|
112
|
+
/** Enable pan functionality when zoomed */
|
|
113
|
+
enablePan?: boolean;
|
|
114
|
+
/** Enable export as image */
|
|
115
|
+
enableExport?: boolean;
|
|
116
|
+
/** Initial zoom level */
|
|
117
|
+
initialZoom?: number;
|
|
118
|
+
/** Minimum zoom level */
|
|
119
|
+
minZoom?: number;
|
|
120
|
+
/** Maximum zoom level */
|
|
121
|
+
maxZoom?: number;
|
|
122
|
+
/** Custom value formatter for tooltip */
|
|
123
|
+
valueFormatter?: (value: number) => string;
|
|
124
|
+
/** Callback when a cell is clicked */
|
|
125
|
+
onCellClick?: (cell: HeatmapSelection) => void;
|
|
126
|
+
/** Callback when selection changes */
|
|
127
|
+
onSelectionChange?: (selection: HeatmapSelection | null) => void;
|
|
128
|
+
/** Additional CSS classes */
|
|
129
|
+
className?: string;
|
|
130
|
+
/** Heatmap title */
|
|
131
|
+
title?: string;
|
|
132
|
+
}
|
|
133
|
+
export declare function useHeatmap(options?: UseHeatmapOptions): UseHeatmapReturn;
|
|
134
|
+
export declare function WakaHeatmap({ data, width, height, cellSize, cellGap, colorScheme, colorSchemeName, showRowLabels, showColumnLabels, showLegend, showMinMax, showTooltip, enableSelection, enableZoom, enablePan, enableExport, initialZoom, minZoom, maxZoom, valueFormatter, onCellClick, onSelectionChange, className, title, }: WakaHeatmapProps): import("react/jsx-runtime").JSX.Element;
|
|
135
|
+
export default WakaHeatmap;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type HotspotVariant = "dot" | "icon" | "badge";
|
|
3
|
+
export type HotspotSize = "sm" | "default" | "lg";
|
|
4
|
+
export type HotspotPosition = "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
5
|
+
export type HotspotTrigger = "click" | "hover" | "both";
|
|
6
|
+
export type HotspotIconType = "help" | "info" | "lightbulb" | "star" | "zap" | "alert";
|
|
7
|
+
export interface WakaHotspotProps {
|
|
8
|
+
/** Unique identifier for seen state persistence */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Tooltip content */
|
|
11
|
+
content: React.ReactNode;
|
|
12
|
+
/** Optional title for the tooltip */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Hotspot variant */
|
|
15
|
+
variant?: HotspotVariant;
|
|
16
|
+
/** Icon type for icon/badge variants */
|
|
17
|
+
iconType?: HotspotIconType;
|
|
18
|
+
/** Custom icon element */
|
|
19
|
+
customIcon?: React.ReactNode;
|
|
20
|
+
/** Size of the hotspot */
|
|
21
|
+
size?: HotspotSize;
|
|
22
|
+
/** Tooltip position relative to hotspot */
|
|
23
|
+
position?: HotspotPosition;
|
|
24
|
+
/** How to trigger the tooltip */
|
|
25
|
+
trigger?: HotspotTrigger;
|
|
26
|
+
/** Auto-dismiss tooltip after ms (0 to disable) */
|
|
27
|
+
autoDismissMs?: number;
|
|
28
|
+
/** Show only once (remember seen state in localStorage) */
|
|
29
|
+
showOnce?: boolean;
|
|
30
|
+
/** Storage key prefix for seen state */
|
|
31
|
+
storageKeyPrefix?: string;
|
|
32
|
+
/** Primary color for the hotspot */
|
|
33
|
+
color?: "primary" | "secondary" | "destructive" | "warning" | "success" | "info";
|
|
34
|
+
/** Custom color (CSS color value) */
|
|
35
|
+
customColor?: string;
|
|
36
|
+
/** Z-index for the hotspot and tooltip */
|
|
37
|
+
zIndex?: number;
|
|
38
|
+
/** Disable pulse animation */
|
|
39
|
+
disablePulse?: boolean;
|
|
40
|
+
/** Disable appear animation */
|
|
41
|
+
disableAppearAnimation?: boolean;
|
|
42
|
+
/** Called when hotspot is shown */
|
|
43
|
+
onShow?: () => void;
|
|
44
|
+
/** Called when hotspot is hidden */
|
|
45
|
+
onHide?: () => void;
|
|
46
|
+
/** Called when tooltip is dismissed */
|
|
47
|
+
onDismiss?: () => void;
|
|
48
|
+
/** Called when seen for first time (showOnce mode) */
|
|
49
|
+
onFirstSeen?: () => void;
|
|
50
|
+
/** Custom className for hotspot */
|
|
51
|
+
className?: string;
|
|
52
|
+
/** Custom className for tooltip */
|
|
53
|
+
tooltipClassName?: string;
|
|
54
|
+
/** Badge text (for badge variant) */
|
|
55
|
+
badgeText?: string;
|
|
56
|
+
/** Children to wrap (hotspot will be positioned relative to this) */
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
}
|
|
59
|
+
export interface HotspotState {
|
|
60
|
+
isVisible: boolean;
|
|
61
|
+
hasSeen: boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare function WakaHotspot({ id, content, title, variant, iconType, customIcon, size, position, trigger, autoDismissMs, showOnce, storageKeyPrefix, color, customColor, zIndex, disablePulse, disableAppearAnimation, onShow, onHide, onDismiss, onFirstSeen, className, tooltipClassName, badgeText, children, }: WakaHotspotProps): import("react/jsx-runtime").JSX.Element | null;
|
|
64
|
+
export interface UseHotspotOptions {
|
|
65
|
+
/** Unique identifier for the hotspot */
|
|
66
|
+
id: string;
|
|
67
|
+
/** Show only once (remember seen state) */
|
|
68
|
+
showOnce?: boolean;
|
|
69
|
+
/** Storage key prefix */
|
|
70
|
+
storageKeyPrefix?: string;
|
|
71
|
+
/** Auto-show on mount */
|
|
72
|
+
autoShow?: boolean;
|
|
73
|
+
/** Delay before auto-show (ms) */
|
|
74
|
+
autoShowDelay?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare function useHotspot({ id, showOnce, storageKeyPrefix, autoShow, autoShowDelay, }: UseHotspotOptions): HotspotState & {
|
|
77
|
+
show: () => void;
|
|
78
|
+
hide: () => void;
|
|
79
|
+
dismiss: () => void;
|
|
80
|
+
reset: () => void;
|
|
81
|
+
};
|
|
82
|
+
export interface HotspotStep {
|
|
83
|
+
id: string;
|
|
84
|
+
content: React.ReactNode;
|
|
85
|
+
title?: string;
|
|
86
|
+
position?: HotspotPosition;
|
|
87
|
+
}
|
|
88
|
+
export interface WakaHotspotGroupProps {
|
|
89
|
+
/** Steps to show in sequence */
|
|
90
|
+
steps: HotspotStep[];
|
|
91
|
+
/** Whether the tour is active */
|
|
92
|
+
active: boolean;
|
|
93
|
+
/** Current step index */
|
|
94
|
+
currentStep?: number;
|
|
95
|
+
/** Called when step changes */
|
|
96
|
+
onStepChange?: (step: number) => void;
|
|
97
|
+
/** Called when tour completes */
|
|
98
|
+
onComplete?: () => void;
|
|
99
|
+
/** Called when tour is skipped */
|
|
100
|
+
onSkip?: () => void;
|
|
101
|
+
/** Show step indicator */
|
|
102
|
+
showStepIndicator?: boolean;
|
|
103
|
+
/** Common props for all hotspots */
|
|
104
|
+
hotspotProps?: Partial<WakaHotspotProps>;
|
|
105
|
+
}
|
|
106
|
+
export declare function WakaHotspotGroup({ steps, active, currentStep: controlledStep, onStepChange, onComplete, onSkip, showStepIndicator, hotspotProps, }: WakaHotspotGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type IncidentSeverity = "critical" | "major" | "minor" | "info";
|
|
2
|
+
export type IncidentStatus = "investigating" | "identified" | "monitoring" | "resolved";
|
|
3
|
+
export interface IncidentUpdate {
|
|
4
|
+
message: string;
|
|
5
|
+
timestamp: Date;
|
|
6
|
+
status: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IncidentImpact {
|
|
9
|
+
services?: number;
|
|
10
|
+
users?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface Incident {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
severity: IncidentSeverity;
|
|
17
|
+
status: IncidentStatus;
|
|
18
|
+
startedAt: Date;
|
|
19
|
+
resolvedAt?: Date;
|
|
20
|
+
impact?: IncidentImpact;
|
|
21
|
+
updates?: IncidentUpdate[];
|
|
22
|
+
}
|
|
23
|
+
export interface WakaIncidentTimelineProps {
|
|
24
|
+
/** List of incidents to display */
|
|
25
|
+
incidents: Incident[];
|
|
26
|
+
/** Callback when an incident is clicked */
|
|
27
|
+
onIncidentClick?: (id: string) => void;
|
|
28
|
+
/** Whether to show filter controls */
|
|
29
|
+
showFilters?: boolean;
|
|
30
|
+
/** Whether to show impact indicators */
|
|
31
|
+
showImpact?: boolean;
|
|
32
|
+
/** Maximum number of incidents to display */
|
|
33
|
+
maxItems?: number;
|
|
34
|
+
/** Additional CSS classes */
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function WakaIncidentTimeline({ incidents, onIncidentClick, showFilters, showImpact, maxItems, className, }: WakaIncidentTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export default WakaIncidentTimeline;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export type InvoiceStatus = "paid" | "pending" | "overdue" | "draft";
|
|
2
|
+
export type CurrencyCode = "USD" | "EUR" | "GBP" | "JPY" | "CAD" | "AUD" | "CHF" | "CNY" | "INR" | "BRL";
|
|
3
|
+
export interface Address {
|
|
4
|
+
/** Company or person name */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Street address line 1 */
|
|
7
|
+
street1: string;
|
|
8
|
+
/** Street address line 2 (optional) */
|
|
9
|
+
street2?: string;
|
|
10
|
+
/** City */
|
|
11
|
+
city: string;
|
|
12
|
+
/** State/Province/Region */
|
|
13
|
+
state?: string;
|
|
14
|
+
/** Postal/ZIP code */
|
|
15
|
+
postalCode: string;
|
|
16
|
+
/** Country */
|
|
17
|
+
country: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CompanyInfo {
|
|
20
|
+
/** Company name */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Company logo URL (optional) */
|
|
23
|
+
logo?: string;
|
|
24
|
+
/** Company address */
|
|
25
|
+
address: Address;
|
|
26
|
+
/** Company email */
|
|
27
|
+
email?: string;
|
|
28
|
+
/** Company phone */
|
|
29
|
+
phone?: string;
|
|
30
|
+
/** Tax ID / VAT number */
|
|
31
|
+
taxId?: string;
|
|
32
|
+
/** Website */
|
|
33
|
+
website?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface LineItem {
|
|
36
|
+
/** Unique identifier */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Item description */
|
|
39
|
+
description: string;
|
|
40
|
+
/** Quantity */
|
|
41
|
+
quantity: number;
|
|
42
|
+
/** Unit (optional, e.g., "hrs", "pcs", "units") */
|
|
43
|
+
unit?: string;
|
|
44
|
+
/** Unit price */
|
|
45
|
+
unitPrice: number;
|
|
46
|
+
/** Tax rate for this item (as decimal, e.g., 0.20 for 20%) */
|
|
47
|
+
taxRate?: number;
|
|
48
|
+
/** Discount for this item (as decimal, e.g., 0.10 for 10%) */
|
|
49
|
+
discount?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface BankDetails {
|
|
52
|
+
/** Bank name */
|
|
53
|
+
bankName: string;
|
|
54
|
+
/** Account holder name */
|
|
55
|
+
accountName: string;
|
|
56
|
+
/** Account number or IBAN */
|
|
57
|
+
accountNumber: string;
|
|
58
|
+
/** Routing number / Sort code / BIC/SWIFT */
|
|
59
|
+
routingNumber?: string;
|
|
60
|
+
/** Additional reference */
|
|
61
|
+
reference?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface InvoiceData {
|
|
64
|
+
/** Invoice number */
|
|
65
|
+
invoiceNumber: string;
|
|
66
|
+
/** Invoice date */
|
|
67
|
+
invoiceDate: Date | string;
|
|
68
|
+
/** Due date */
|
|
69
|
+
dueDate: Date | string;
|
|
70
|
+
/** Invoice status */
|
|
71
|
+
status: InvoiceStatus;
|
|
72
|
+
/** Company/Sender information */
|
|
73
|
+
company: CompanyInfo;
|
|
74
|
+
/** Bill to address */
|
|
75
|
+
billTo: Address;
|
|
76
|
+
/** Ship to address (optional, if different from bill to) */
|
|
77
|
+
shipTo?: Address;
|
|
78
|
+
/** Line items */
|
|
79
|
+
items: LineItem[];
|
|
80
|
+
/** Currency code */
|
|
81
|
+
currency: CurrencyCode;
|
|
82
|
+
/** Global tax rate (if not per-item) */
|
|
83
|
+
taxRate?: number;
|
|
84
|
+
/** Global discount amount */
|
|
85
|
+
discountAmount?: number;
|
|
86
|
+
/** Global discount percentage (as decimal) */
|
|
87
|
+
discountPercentage?: number;
|
|
88
|
+
/** Shipping cost */
|
|
89
|
+
shippingCost?: number;
|
|
90
|
+
/** Payment terms */
|
|
91
|
+
paymentTerms?: string;
|
|
92
|
+
/** Notes to customer */
|
|
93
|
+
notes?: string;
|
|
94
|
+
/** Bank details for payment */
|
|
95
|
+
bankDetails?: BankDetails;
|
|
96
|
+
/** Purchase order number */
|
|
97
|
+
poNumber?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface WakaInvoicePreviewProps {
|
|
100
|
+
/** Invoice data */
|
|
101
|
+
invoice: InvoiceData;
|
|
102
|
+
/** Show print button */
|
|
103
|
+
showPrintButton?: boolean;
|
|
104
|
+
/** Show download button */
|
|
105
|
+
showDownloadButton?: boolean;
|
|
106
|
+
/** Callback when print is clicked */
|
|
107
|
+
onPrint?: () => void;
|
|
108
|
+
/** Callback when download is clicked */
|
|
109
|
+
onDownload?: () => void;
|
|
110
|
+
/** Compact mode for smaller displays */
|
|
111
|
+
compact?: boolean;
|
|
112
|
+
/** Show bank details section */
|
|
113
|
+
showBankDetails?: boolean;
|
|
114
|
+
/** Additional CSS classes */
|
|
115
|
+
className?: string;
|
|
116
|
+
}
|
|
117
|
+
declare function formatCurrency(amount: number, currency: CurrencyCode): string;
|
|
118
|
+
declare function formatDate(date: Date | string, locale?: string): string;
|
|
119
|
+
export declare function WakaInvoicePreview({ invoice, showPrintButton, showDownloadButton, onPrint, onDownload, compact, showBankDetails, className, }: WakaInvoicePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
120
|
+
export interface UseInvoiceOptions {
|
|
121
|
+
items: LineItem[];
|
|
122
|
+
taxRate?: number;
|
|
123
|
+
discountAmount?: number;
|
|
124
|
+
discountPercentage?: number;
|
|
125
|
+
shippingCost?: number;
|
|
126
|
+
}
|
|
127
|
+
export declare function useInvoice({ items, taxRate, discountAmount, discountPercentage, shippingCost, }: UseInvoiceOptions): {
|
|
128
|
+
subtotal: number;
|
|
129
|
+
taxAmount: number;
|
|
130
|
+
discount: number;
|
|
131
|
+
shippingCost: number;
|
|
132
|
+
total: number;
|
|
133
|
+
itemCount: number;
|
|
134
|
+
totalQuantity: number;
|
|
135
|
+
};
|
|
136
|
+
export { formatCurrency, formatDate };
|
|
137
|
+
export default WakaInvoicePreview;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TrendDirection = "up" | "down" | "neutral";
|
|
3
|
+
export type KPICardSize = "1x1" | "2x1" | "1x2" | "2x2";
|
|
4
|
+
export interface SparklineData {
|
|
5
|
+
value: number;
|
|
6
|
+
timestamp?: number | Date;
|
|
7
|
+
}
|
|
8
|
+
export interface KPIData {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
value: string | number;
|
|
12
|
+
previousValue?: string | number;
|
|
13
|
+
trend?: TrendDirection;
|
|
14
|
+
trendValue?: string;
|
|
15
|
+
unit?: string;
|
|
16
|
+
sparklineData?: SparklineData[];
|
|
17
|
+
target?: {
|
|
18
|
+
value: number;
|
|
19
|
+
label?: string;
|
|
20
|
+
};
|
|
21
|
+
color?: "default" | "primary" | "success" | "warning" | "destructive" | "blue" | "purple";
|
|
22
|
+
icon?: React.ReactNode;
|
|
23
|
+
size?: KPICardSize;
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
lastUpdated?: Date;
|
|
26
|
+
data?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export interface WakaKPIDashboardProps {
|
|
29
|
+
/** KPI data items */
|
|
30
|
+
kpis: KPIData[];
|
|
31
|
+
/** Number of columns in the grid */
|
|
32
|
+
columns?: 2 | 3 | 4 | 6;
|
|
33
|
+
/** Gap between cards */
|
|
34
|
+
gap?: "sm" | "md" | "lg";
|
|
35
|
+
/** Enable drag to reorder */
|
|
36
|
+
draggable?: boolean;
|
|
37
|
+
/** Callback when KPIs are reordered */
|
|
38
|
+
onReorder?: (kpis: KPIData[]) => void;
|
|
39
|
+
/** Callback to refresh a specific KPI */
|
|
40
|
+
onRefresh?: (kpiId: string) => void;
|
|
41
|
+
/** Callback when a KPI card is clicked */
|
|
42
|
+
onCardClick?: (kpi: KPIData) => void;
|
|
43
|
+
/** Show loading skeleton for all cards */
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
/** Custom card renderer */
|
|
46
|
+
renderCard?: (kpi: KPIData) => React.ReactNode;
|
|
47
|
+
/** Additional CSS classes */
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface KPICardProps {
|
|
51
|
+
kpi: KPIData;
|
|
52
|
+
onRefresh?: (kpiId: string) => void;
|
|
53
|
+
onClick?: (kpi: KPIData) => void;
|
|
54
|
+
draggable?: boolean;
|
|
55
|
+
onDragStart?: (e: React.DragEvent, kpiId: string) => void;
|
|
56
|
+
}
|
|
57
|
+
export declare function KPICard({ kpi, onRefresh, onClick, draggable, onDragStart, }: KPICardProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function WakaKPIDashboard({ kpis, columns, gap, draggable, onReorder, onRefresh, onCardClick, loading, renderCard, className, }: WakaKPIDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export interface UseKPIDashboardOptions {
|
|
60
|
+
initialKPIs?: KPIData[];
|
|
61
|
+
refreshInterval?: number;
|
|
62
|
+
onRefresh?: (kpiId: string) => Promise<KPIData | null>;
|
|
63
|
+
}
|
|
64
|
+
export declare function useKPIDashboard(options?: UseKPIDashboardOptions): {
|
|
65
|
+
kpis: KPIData[];
|
|
66
|
+
setKPIs: React.Dispatch<React.SetStateAction<KPIData[]>>;
|
|
67
|
+
loading: boolean;
|
|
68
|
+
refreshKPI: (kpiId: string) => Promise<void>;
|
|
69
|
+
refreshAll: () => Promise<void>;
|
|
70
|
+
updateKPI: (kpiId: string, updates: Partial<KPIData>) => void;
|
|
71
|
+
addKPI: (kpi: KPIData) => void;
|
|
72
|
+
removeKPI: (kpiId: string) => void;
|
|
73
|
+
reorderKPIs: (newKPIs: KPIData[]) => void;
|
|
74
|
+
calculateTrend: (currentValue: number, previousValue: number) => {
|
|
75
|
+
direction: TrendDirection;
|
|
76
|
+
value: string;
|
|
77
|
+
};
|
|
78
|
+
isRefreshing: (kpiId: string) => boolean;
|
|
79
|
+
};
|
|
80
|
+
export default WakaKPIDashboard;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export interface LeaderboardEntry {
|
|
2
|
+
/** Unique identifier */
|
|
3
|
+
id: string;
|
|
4
|
+
/** User display name */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Avatar URL or initials */
|
|
7
|
+
avatar?: string;
|
|
8
|
+
/** Current score/points */
|
|
9
|
+
score: number;
|
|
10
|
+
/** Current rank position */
|
|
11
|
+
rank: number;
|
|
12
|
+
/** Previous rank (for animation) */
|
|
13
|
+
previousRank?: number;
|
|
14
|
+
/** Additional metadata */
|
|
15
|
+
metadata?: Record<string, string | number>;
|
|
16
|
+
/** Whether this is the current user */
|
|
17
|
+
isCurrentUser?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface WakaLeaderboardProps {
|
|
20
|
+
/** Leaderboard entries */
|
|
21
|
+
entries: LeaderboardEntry[];
|
|
22
|
+
/** Title of the leaderboard */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Show podium for top 3 */
|
|
25
|
+
showPodium?: boolean;
|
|
26
|
+
/** Animate rank changes */
|
|
27
|
+
animateRankChanges?: boolean;
|
|
28
|
+
/** Maximum entries to show (excluding podium) */
|
|
29
|
+
maxEntries?: number;
|
|
30
|
+
/** Score label (e.g., "points", "XP", "wins") */
|
|
31
|
+
scoreLabel?: string;
|
|
32
|
+
/** Format score function */
|
|
33
|
+
formatScore?: (score: number) => string;
|
|
34
|
+
/** Current user ID (for highlighting) */
|
|
35
|
+
currentUserId?: string;
|
|
36
|
+
/** Callback when entry is clicked */
|
|
37
|
+
onEntryClick?: (entry: LeaderboardEntry) => void;
|
|
38
|
+
/** Show rank change indicators */
|
|
39
|
+
showRankChange?: boolean;
|
|
40
|
+
/** Size variant */
|
|
41
|
+
size?: "sm" | "default" | "lg";
|
|
42
|
+
/** Custom className */
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface WakaPodiumProps {
|
|
46
|
+
/** Top 3 entries */
|
|
47
|
+
entries: LeaderboardEntry[];
|
|
48
|
+
/** Size variant */
|
|
49
|
+
size?: "sm" | "default" | "lg";
|
|
50
|
+
/** Score label */
|
|
51
|
+
scoreLabel?: string;
|
|
52
|
+
/** Format score function */
|
|
53
|
+
formatScore?: (score: number) => string;
|
|
54
|
+
/** Callback when entry is clicked */
|
|
55
|
+
onEntryClick?: (entry: LeaderboardEntry) => void;
|
|
56
|
+
/** Custom className */
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function WakaPodium({ entries, size, scoreLabel, formatScore, onEntryClick, className, }: WakaPodiumProps): import("react/jsx-runtime").JSX.Element | null;
|
|
60
|
+
export declare function WakaLeaderboard({ entries, title, showPodium, animateRankChanges, maxEntries, scoreLabel, formatScore, currentUserId, onEntryClick, showRankChange, size, className, }: WakaLeaderboardProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export interface WakaMiniLeaderboardProps {
|
|
62
|
+
entries: LeaderboardEntry[];
|
|
63
|
+
maxEntries?: number;
|
|
64
|
+
currentUserId?: string;
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function WakaMiniLeaderboard({ entries, maxEntries, currentUserId, className, }: WakaMiniLeaderboardProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
export interface UseLeaderboardOptions {
|
|
69
|
+
/** Initial entries */
|
|
70
|
+
entries: LeaderboardEntry[];
|
|
71
|
+
/** Sort direction */
|
|
72
|
+
sortDirection?: "asc" | "desc";
|
|
73
|
+
/** Auto-update rankings when scores change */
|
|
74
|
+
autoRank?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare function useLeaderboard({ entries: initialEntries, sortDirection, autoRank, }: UseLeaderboardOptions): {
|
|
77
|
+
entries: LeaderboardEntry[];
|
|
78
|
+
updateScore: (id: string, score: number) => void;
|
|
79
|
+
addEntry: (entry: Omit<LeaderboardEntry, "rank">) => void;
|
|
80
|
+
removeEntry: (id: string) => void;
|
|
81
|
+
refresh: (newEntries: LeaderboardEntry[]) => void;
|
|
82
|
+
topEntry: LeaderboardEntry;
|
|
83
|
+
getEntry: (id: string) => LeaderboardEntry | undefined;
|
|
84
|
+
getRank: (id: string) => number | undefined;
|
|
85
|
+
};
|