@wakastellar/ui 1.0.10 → 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/blocks/chat/index.d.ts +2 -0
- package/dist/blocks/chat/widget.d.ts +100 -0
- 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 +71378 -18523
- 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,65 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SLAPeriod = "day" | "week" | "month" | "quarter" | "year";
|
|
3
|
+
export type SLATrend = "up" | "down" | "stable";
|
|
4
|
+
export type SLAStatus = "healthy" | "warning" | "critical" | "breached";
|
|
5
|
+
export interface SLAErrorBudget {
|
|
6
|
+
/** Error budget already used (in minutes or percentage) */
|
|
7
|
+
used: number;
|
|
8
|
+
/** Total error budget available */
|
|
9
|
+
total: number;
|
|
10
|
+
}
|
|
11
|
+
export interface WakaSLATrackerProps {
|
|
12
|
+
/** Current uptime percentage (e.g., 99.95) */
|
|
13
|
+
uptime: number;
|
|
14
|
+
/** SLA target percentage (e.g., 99.9) */
|
|
15
|
+
target: number;
|
|
16
|
+
/** Time period for the SLA measurement */
|
|
17
|
+
period: SLAPeriod;
|
|
18
|
+
/** Total downtime minutes in the period */
|
|
19
|
+
downtimeMinutes?: number;
|
|
20
|
+
/** Number of incidents in the period */
|
|
21
|
+
incidentCount?: number;
|
|
22
|
+
/** Error budget information */
|
|
23
|
+
errorBudget?: SLAErrorBudget;
|
|
24
|
+
/** Trend direction compared to previous period */
|
|
25
|
+
trend?: SLATrend;
|
|
26
|
+
/** Callback when period changes */
|
|
27
|
+
onPeriodChange?: (period: SLAPeriod) => void;
|
|
28
|
+
/** Visual variant */
|
|
29
|
+
variant?: "compact" | "detailed" | "card";
|
|
30
|
+
/** Size variant */
|
|
31
|
+
size?: "sm" | "md" | "lg";
|
|
32
|
+
/** Additional CSS classes */
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function WakaSLATracker({ uptime, target, period, downtimeMinutes, incidentCount, errorBudget, trend, onPeriodChange, variant, size, className, }: WakaSLATrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare namespace WakaSLATracker {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
export interface UseSLATrackerOptions {
|
|
40
|
+
/** Initial uptime percentage */
|
|
41
|
+
initialUptime?: number;
|
|
42
|
+
/** SLA target percentage */
|
|
43
|
+
target: number;
|
|
44
|
+
/** Initial period */
|
|
45
|
+
initialPeriod?: SLAPeriod;
|
|
46
|
+
/** Callback when SLA status changes */
|
|
47
|
+
onStatusChange?: (status: SLAStatus) => void;
|
|
48
|
+
/** Callback when SLA is breached */
|
|
49
|
+
onBreach?: (uptime: number, target: number) => void;
|
|
50
|
+
}
|
|
51
|
+
export declare function useSLATracker({ initialUptime, target, initialPeriod, onStatusChange, onBreach, }: UseSLATrackerOptions): {
|
|
52
|
+
uptime: number;
|
|
53
|
+
target: number;
|
|
54
|
+
period: SLAPeriod;
|
|
55
|
+
status: SLAStatus;
|
|
56
|
+
trend: SLATrend;
|
|
57
|
+
downtimeMinutes: number;
|
|
58
|
+
incidentCount: number;
|
|
59
|
+
errorBudget: SLAErrorBudget;
|
|
60
|
+
setPeriod: React.Dispatch<React.SetStateAction<SLAPeriod>>;
|
|
61
|
+
setUptime: (newUptime: number) => void;
|
|
62
|
+
recordIncident: (durationMinutes: number) => void;
|
|
63
|
+
reset: () => void;
|
|
64
|
+
};
|
|
65
|
+
export default WakaSLATracker;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type ValueFormat = "none" | "currency" | "percentage" | "custom";
|
|
2
|
+
export interface WakaSliderRangeProps {
|
|
3
|
+
/** Minimum bound of the slider */
|
|
4
|
+
min?: number;
|
|
5
|
+
/** Maximum bound of the slider */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Step increment */
|
|
8
|
+
step?: number;
|
|
9
|
+
/** Current range values [minValue, maxValue] */
|
|
10
|
+
value?: [number, number];
|
|
11
|
+
/** Default range values */
|
|
12
|
+
defaultValue?: [number, number];
|
|
13
|
+
/** Callback when values change */
|
|
14
|
+
onChange?: (value: [number, number]) => void;
|
|
15
|
+
/** Callback when dragging starts */
|
|
16
|
+
onChangeStart?: (value: [number, number]) => void;
|
|
17
|
+
/** Callback when dragging ends */
|
|
18
|
+
onChangeEnd?: (value: [number, number]) => void;
|
|
19
|
+
/** Value format type */
|
|
20
|
+
format?: ValueFormat;
|
|
21
|
+
/** Currency code for currency format */
|
|
22
|
+
currencyCode?: string;
|
|
23
|
+
/** Custom format function */
|
|
24
|
+
formatValue?: (value: number) => string;
|
|
25
|
+
/** Show value labels */
|
|
26
|
+
showLabels?: boolean;
|
|
27
|
+
/** Label position */
|
|
28
|
+
labelPosition?: "above" | "handles";
|
|
29
|
+
/** Show tooltip on drag */
|
|
30
|
+
showTooltip?: boolean;
|
|
31
|
+
/** Show tick marks */
|
|
32
|
+
showTicks?: boolean;
|
|
33
|
+
/** Custom tick values */
|
|
34
|
+
tickValues?: number[];
|
|
35
|
+
/** Tick count when tickValues not provided */
|
|
36
|
+
tickCount?: number;
|
|
37
|
+
/** Histogram data for background visualization */
|
|
38
|
+
histogram?: number[];
|
|
39
|
+
/** Histogram height in pixels */
|
|
40
|
+
histogramHeight?: number;
|
|
41
|
+
/** Disabled state */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** Size variant */
|
|
44
|
+
size?: "sm" | "md" | "lg";
|
|
45
|
+
/** Color variant */
|
|
46
|
+
variant?: "default" | "primary" | "success" | "warning" | "danger";
|
|
47
|
+
/** Additional class names */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Aria label for min handle */
|
|
50
|
+
minAriaLabel?: string;
|
|
51
|
+
/** Aria label for max handle */
|
|
52
|
+
maxAriaLabel?: string;
|
|
53
|
+
/** Minimum distance between handles */
|
|
54
|
+
minDistance?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface UseSliderRangeOptions {
|
|
57
|
+
/** Initial range values */
|
|
58
|
+
initialValue?: [number, number];
|
|
59
|
+
/** Minimum bound */
|
|
60
|
+
min?: number;
|
|
61
|
+
/** Maximum bound */
|
|
62
|
+
max?: number;
|
|
63
|
+
/** Step increment */
|
|
64
|
+
step?: number;
|
|
65
|
+
/** Minimum distance between handles */
|
|
66
|
+
minDistance?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface UseSliderRangeReturn {
|
|
69
|
+
/** Current range values */
|
|
70
|
+
value: [number, number];
|
|
71
|
+
/** Set range values */
|
|
72
|
+
setValue: (value: [number, number]) => void;
|
|
73
|
+
/** Set minimum value */
|
|
74
|
+
setMin: (value: number) => void;
|
|
75
|
+
/** Set maximum value */
|
|
76
|
+
setMax: (value: number) => void;
|
|
77
|
+
/** Reset to initial values */
|
|
78
|
+
reset: () => void;
|
|
79
|
+
/** Min bound */
|
|
80
|
+
min: number;
|
|
81
|
+
/** Max bound */
|
|
82
|
+
max: number;
|
|
83
|
+
/** Step */
|
|
84
|
+
step: number;
|
|
85
|
+
}
|
|
86
|
+
export declare function useSliderRange(options?: UseSliderRangeOptions): UseSliderRangeReturn;
|
|
87
|
+
export declare function WakaSliderRange({ min, max, step, value: controlledValue, defaultValue, onChange, onChangeStart, onChangeEnd, format, currencyCode, formatValue: customFormatValue, showLabels, labelPosition, showTooltip, showTicks, tickValues, tickCount, histogram, histogramHeight, disabled, size, variant, className, minAriaLabel, maxAriaLabel, minDistance, }: WakaSliderRangeProps): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
export default WakaSliderRange;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SpinWheelSegment {
|
|
3
|
+
/** Unique identifier for the segment */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Display label for the segment */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Background color for the segment (hex, rgb, or CSS color) */
|
|
8
|
+
color: string;
|
|
9
|
+
/** Optional icon to display in the segment */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Probability weight (higher = more likely to win) */
|
|
12
|
+
weight?: number;
|
|
13
|
+
/** Any additional data associated with this segment */
|
|
14
|
+
value?: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface WakaSpinWheelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
/** Array of wheel segments */
|
|
18
|
+
segments: SpinWheelSegment[];
|
|
19
|
+
/** Callback fired when spin starts */
|
|
20
|
+
onSpin?: () => void;
|
|
21
|
+
/** Callback fired when spin completes with the winning segment */
|
|
22
|
+
onResult?: (segment: SpinWheelSegment) => void;
|
|
23
|
+
/** Optional callback for tick sound on each segment pass */
|
|
24
|
+
onTick?: () => void;
|
|
25
|
+
/** Optional callback when wheel starts slowing down */
|
|
26
|
+
onSlowDown?: () => void;
|
|
27
|
+
/** Controlled spinning state */
|
|
28
|
+
spinning?: boolean;
|
|
29
|
+
/** Controlled result (id of winning segment) */
|
|
30
|
+
result?: string;
|
|
31
|
+
/** Duration of spin animation in milliseconds */
|
|
32
|
+
spinDuration?: number;
|
|
33
|
+
/** Number of full rotations before stopping */
|
|
34
|
+
rotations?: number;
|
|
35
|
+
/** Size of the wheel */
|
|
36
|
+
size?: number | "sm" | "md" | "lg";
|
|
37
|
+
/** Disable the spin button */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/** Custom content for the center button */
|
|
40
|
+
centerContent?: React.ReactNode;
|
|
41
|
+
/** Additional className for the container */
|
|
42
|
+
className?: string;
|
|
43
|
+
/** Show segment labels */
|
|
44
|
+
showLabels?: boolean;
|
|
45
|
+
/** Pointer position */
|
|
46
|
+
pointerPosition?: "top" | "right" | "bottom" | "left";
|
|
47
|
+
/** Custom pointer element */
|
|
48
|
+
customPointer?: React.ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export declare const WakaSpinWheel: React.ForwardRefExoticComponent<WakaSpinWheelProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
export default WakaSpinWheel;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SpotlightResultType = "page" | "action" | "user" | "file" | "setting" | "external";
|
|
3
|
+
export interface SpotlightResult {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
type: SpotlightResultType;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
preview?: React.ReactNode;
|
|
10
|
+
action?: () => void;
|
|
11
|
+
href?: string;
|
|
12
|
+
meta?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SpotlightFilter {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
type?: SpotlightResultType;
|
|
19
|
+
}
|
|
20
|
+
export interface WakaSpotlightProps {
|
|
21
|
+
/** Whether spotlight is open */
|
|
22
|
+
open: boolean;
|
|
23
|
+
/** Callback when open state changes */
|
|
24
|
+
onOpenChange: (open: boolean) => void;
|
|
25
|
+
/** Search function - can be async */
|
|
26
|
+
onSearch: (query: string, filter?: string) => Promise<SpotlightResult[]> | SpotlightResult[];
|
|
27
|
+
/** Available filters */
|
|
28
|
+
filters?: SpotlightFilter[];
|
|
29
|
+
/** Placeholder text */
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/** Recently accessed items */
|
|
32
|
+
recentItems?: SpotlightResult[];
|
|
33
|
+
/** Quick actions shown when empty */
|
|
34
|
+
quickActions?: SpotlightResult[];
|
|
35
|
+
/** Debounce delay in ms */
|
|
36
|
+
debounceMs?: number;
|
|
37
|
+
/** Show preview panel */
|
|
38
|
+
showPreview?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function WakaSpotlight({ open, onOpenChange, onSearch, filters, placeholder, recentItems, quickActions, debounceMs, showPreview, }: WakaSpotlightProps): import("react/jsx-runtime").JSX.Element | null;
|
|
41
|
+
export declare function useSpotlight(): {
|
|
42
|
+
open: boolean;
|
|
43
|
+
onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
|
|
44
|
+
openSpotlight: () => void;
|
|
45
|
+
closeSpotlight: () => void;
|
|
46
|
+
toggleSpotlight: () => void;
|
|
47
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface HexagonStat {
|
|
3
|
+
/** Unique identifier for the stat */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Label displayed at the vertex */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Current value (0-100 by default) */
|
|
8
|
+
value: number;
|
|
9
|
+
/** Maximum value (defaults to 100) */
|
|
10
|
+
max?: number;
|
|
11
|
+
/** Optional icon for the stat */
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
/** Optional description for tooltip */
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface HexagonProfile {
|
|
17
|
+
/** Unique identifier */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Profile name */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Stats data (must have exactly 6 values) */
|
|
22
|
+
stats: number[];
|
|
23
|
+
/** Color for the profile */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** Fill opacity (0-1) */
|
|
26
|
+
fillOpacity?: number;
|
|
27
|
+
}
|
|
28
|
+
export type HexagonColorTheme = "default" | "blue" | "green" | "purple" | "orange" | "pink" | "cyan" | "gradient";
|
|
29
|
+
export interface WakaStatsHexagonProps {
|
|
30
|
+
/** Array of exactly 6 stats */
|
|
31
|
+
stats: HexagonStat[];
|
|
32
|
+
/** Primary profile data */
|
|
33
|
+
profile: HexagonProfile;
|
|
34
|
+
/** Optional comparison profile */
|
|
35
|
+
comparisonProfile?: HexagonProfile;
|
|
36
|
+
/** Size of the hexagon in pixels */
|
|
37
|
+
size?: number;
|
|
38
|
+
/** Number of grid levels */
|
|
39
|
+
levels?: number;
|
|
40
|
+
/** Color theme */
|
|
41
|
+
theme?: HexagonColorTheme;
|
|
42
|
+
/** Custom primary color (overrides theme) */
|
|
43
|
+
primaryColor?: string;
|
|
44
|
+
/** Show grid lines */
|
|
45
|
+
showGrid?: boolean;
|
|
46
|
+
/** Show stat labels */
|
|
47
|
+
showLabels?: boolean;
|
|
48
|
+
/** Show stat values in labels */
|
|
49
|
+
showValues?: boolean;
|
|
50
|
+
/** Show data points */
|
|
51
|
+
showPoints?: boolean;
|
|
52
|
+
/** Enable tooltips */
|
|
53
|
+
showTooltips?: boolean;
|
|
54
|
+
/** Enable animations */
|
|
55
|
+
animated?: boolean;
|
|
56
|
+
/** Animation duration in ms */
|
|
57
|
+
animationDuration?: number;
|
|
58
|
+
/** Show legend */
|
|
59
|
+
showLegend?: boolean;
|
|
60
|
+
/** Custom className */
|
|
61
|
+
className?: string;
|
|
62
|
+
/** Callback when a stat point is clicked */
|
|
63
|
+
onStatClick?: (stat: HexagonStat, value: number) => void;
|
|
64
|
+
}
|
|
65
|
+
export interface UseStatsHexagonOptions {
|
|
66
|
+
/** Initial stats */
|
|
67
|
+
initialStats?: HexagonStat[];
|
|
68
|
+
/** Initial profile */
|
|
69
|
+
initialProfile?: HexagonProfile;
|
|
70
|
+
/** Animation enabled */
|
|
71
|
+
animated?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface UseStatsHexagonReturn {
|
|
74
|
+
/** Current stats */
|
|
75
|
+
stats: HexagonStat[];
|
|
76
|
+
/** Update stats */
|
|
77
|
+
setStats: React.Dispatch<React.SetStateAction<HexagonStat[]>>;
|
|
78
|
+
/** Current profile */
|
|
79
|
+
profile: HexagonProfile;
|
|
80
|
+
/** Update profile */
|
|
81
|
+
setProfile: React.Dispatch<React.SetStateAction<HexagonProfile>>;
|
|
82
|
+
/** Comparison profile */
|
|
83
|
+
comparisonProfile: HexagonProfile | null;
|
|
84
|
+
/** Set comparison profile */
|
|
85
|
+
setComparisonProfile: React.Dispatch<React.SetStateAction<HexagonProfile | null>>;
|
|
86
|
+
/** Update a single stat value */
|
|
87
|
+
updateStat: (id: string, value: number) => void;
|
|
88
|
+
/** Update all profile stats at once */
|
|
89
|
+
updateProfileStats: (stats: number[]) => void;
|
|
90
|
+
/** Reset to initial values */
|
|
91
|
+
reset: () => void;
|
|
92
|
+
/** Active/hovered stat index */
|
|
93
|
+
activeStatIndex: number | null;
|
|
94
|
+
/** Set active stat */
|
|
95
|
+
setActiveStatIndex: React.Dispatch<React.SetStateAction<number | null>>;
|
|
96
|
+
/** Comparison mode enabled */
|
|
97
|
+
isComparing: boolean;
|
|
98
|
+
/** Toggle comparison mode */
|
|
99
|
+
toggleComparison: () => void;
|
|
100
|
+
}
|
|
101
|
+
export declare function useStatsHexagon(options?: UseStatsHexagonOptions): UseStatsHexagonReturn;
|
|
102
|
+
export declare function WakaStatsHexagon({ stats, profile, comparisonProfile, size, levels, theme, primaryColor, showGrid, showLabels, showValues, showPoints, showTooltips, animated, animationDuration, showLegend, className, onStatClick, }: WakaStatsHexagonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
103
|
+
export interface WakaStatsHexagonSimpleProps extends Omit<WakaStatsHexagonProps, "stats" | "profile"> {
|
|
104
|
+
/** Simple data format: array of { label, value } */
|
|
105
|
+
data: Array<{
|
|
106
|
+
label: string;
|
|
107
|
+
value: number;
|
|
108
|
+
max?: number;
|
|
109
|
+
}>;
|
|
110
|
+
/** Profile name */
|
|
111
|
+
profileName?: string;
|
|
112
|
+
}
|
|
113
|
+
export declare function WakaStatsHexagonSimple({ data, profileName, ...props }: WakaStatsHexagonSimpleProps): import("react/jsx-runtime").JSX.Element;
|
|
114
|
+
export interface CharacterStats {
|
|
115
|
+
strength: number;
|
|
116
|
+
dexterity: number;
|
|
117
|
+
intelligence: number;
|
|
118
|
+
wisdom: number;
|
|
119
|
+
charisma: number;
|
|
120
|
+
constitution: number;
|
|
121
|
+
}
|
|
122
|
+
export interface WakaStatsHexagonRPGProps extends Omit<WakaStatsHexagonProps, "stats" | "profile" | "comparisonProfile"> {
|
|
123
|
+
/** Character stats */
|
|
124
|
+
characterStats: CharacterStats;
|
|
125
|
+
/** Character name */
|
|
126
|
+
characterName?: string;
|
|
127
|
+
/** Optional comparison character */
|
|
128
|
+
comparisonStats?: CharacterStats;
|
|
129
|
+
/** Comparison character name */
|
|
130
|
+
comparisonName?: string;
|
|
131
|
+
/** Max stat value (default 20 for D&D style) */
|
|
132
|
+
maxStat?: number;
|
|
133
|
+
}
|
|
134
|
+
export declare function WakaStatsHexagonRPG({ characterStats, characterName, comparisonStats, comparisonName, maxStat, theme, ...props }: WakaStatsHexagonRPGProps): import("react/jsx-runtime").JSX.Element;
|
|
135
|
+
export interface WakaStatsHexagonSkillsProps extends Omit<WakaStatsHexagonProps, "stats" | "profile"> {
|
|
136
|
+
/** Skill categories with values 0-100 */
|
|
137
|
+
skills: {
|
|
138
|
+
technical: number;
|
|
139
|
+
communication: number;
|
|
140
|
+
leadership: number;
|
|
141
|
+
problemSolving: number;
|
|
142
|
+
creativity: number;
|
|
143
|
+
teamwork: number;
|
|
144
|
+
};
|
|
145
|
+
/** Person/team name */
|
|
146
|
+
name?: string;
|
|
147
|
+
}
|
|
148
|
+
export declare function WakaStatsHexagonSkills({ skills, name, theme, ...props }: WakaStatsHexagonSkillsProps): import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
export default WakaStatsHexagon;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type StatusType = "up" | "down" | "degraded" | "maintenance";
|
|
2
|
+
export type ViewType = "year" | "quarter" | "month" | "week";
|
|
3
|
+
export type ColorScheme = "green" | "blue" | "purple" | "orange" | "status";
|
|
4
|
+
export type CellSize = "sm" | "md" | "lg";
|
|
5
|
+
export interface StatusMatrixDataPoint {
|
|
6
|
+
/** Date for the data point */
|
|
7
|
+
date: string | Date;
|
|
8
|
+
/** Value (typically 0-100 or count) */
|
|
9
|
+
value: number;
|
|
10
|
+
/** Status for uptime view */
|
|
11
|
+
status?: StatusType;
|
|
12
|
+
}
|
|
13
|
+
export interface WakaStatusMatrixProps {
|
|
14
|
+
/** Data points for the matrix */
|
|
15
|
+
data: StatusMatrixDataPoint[];
|
|
16
|
+
/** Start date for the range */
|
|
17
|
+
startDate?: Date;
|
|
18
|
+
/** End date for the range */
|
|
19
|
+
endDate?: Date;
|
|
20
|
+
/** View type */
|
|
21
|
+
view?: ViewType;
|
|
22
|
+
/** Color scheme */
|
|
23
|
+
colorScheme?: ColorScheme;
|
|
24
|
+
/** Cell size */
|
|
25
|
+
cellSize?: CellSize;
|
|
26
|
+
/** Show month/week labels */
|
|
27
|
+
showLabels?: boolean;
|
|
28
|
+
/** Show legend */
|
|
29
|
+
showLegend?: boolean;
|
|
30
|
+
/** Callback when a cell is clicked */
|
|
31
|
+
onCellClick?: (date: Date, value: number) => void;
|
|
32
|
+
/** Color for empty cells */
|
|
33
|
+
emptyColor?: string;
|
|
34
|
+
/** Additional CSS classes */
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function WakaStatusMatrix({ data, startDate, endDate, view, colorScheme, cellSize, showLabels, showLegend, onCellClick, emptyColor, className, }: WakaStatusMatrixProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export default WakaStatusMatrix;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface WakaStreakCounterProps {
|
|
2
|
+
/** Current streak count */
|
|
3
|
+
count: number;
|
|
4
|
+
/** Label for the streak */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Size variant */
|
|
7
|
+
size?: "sm" | "default" | "lg" | "xl";
|
|
8
|
+
/** Visual variant */
|
|
9
|
+
variant?: "flame" | "lightning" | "trophy" | "star";
|
|
10
|
+
/** Show animation when count changes */
|
|
11
|
+
animate?: boolean;
|
|
12
|
+
/** Show milestone celebration */
|
|
13
|
+
milestones?: number[];
|
|
14
|
+
/** Best streak for comparison */
|
|
15
|
+
bestStreak?: number;
|
|
16
|
+
/** Custom className */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Show confetti on milestone */
|
|
19
|
+
confetti?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function WakaStreakCounter({ count, label, size, variant, animate, milestones, bestStreak, className, confetti, }: WakaStreakCounterProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export interface WakaMiniStreakProps {
|
|
23
|
+
count: number;
|
|
24
|
+
variant?: "flame" | "lightning" | "trophy" | "star";
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function WakaMiniStreak({ count, variant, className }: WakaMiniStreakProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface WakaSuccessExplosionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Trigger the explosion animation */
|
|
4
|
+
trigger?: boolean;
|
|
5
|
+
/** Callback when animation completes */
|
|
6
|
+
onComplete?: () => void;
|
|
7
|
+
/** Number of confetti particles */
|
|
8
|
+
particleCount?: number;
|
|
9
|
+
/** Duration of the animation in ms */
|
|
10
|
+
duration?: number;
|
|
11
|
+
/** Size of the explosion area */
|
|
12
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
13
|
+
/** Primary color for particles (CSS color or Tailwind class) */
|
|
14
|
+
primaryColor?: string;
|
|
15
|
+
/** Secondary color for particles (CSS color or Tailwind class) */
|
|
16
|
+
secondaryColor?: string;
|
|
17
|
+
/** Accent color for particles (CSS color or Tailwind class) */
|
|
18
|
+
accentColor?: string;
|
|
19
|
+
/** Show the checkmark animation */
|
|
20
|
+
showCheckmark?: boolean;
|
|
21
|
+
/** Checkmark color */
|
|
22
|
+
checkmarkColor?: string;
|
|
23
|
+
/** Auto-hide after animation completes */
|
|
24
|
+
autoHide?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface WakaSuccessExplosionRef {
|
|
27
|
+
/** Trigger the explosion animation */
|
|
28
|
+
explode: () => void;
|
|
29
|
+
/** Reset the component to its initial state */
|
|
30
|
+
reset: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const WakaSuccessExplosion: React.ForwardRefExoticComponent<WakaSuccessExplosionProps & React.RefAttributes<WakaSuccessExplosionRef>>;
|
|
33
|
+
export interface UseSuccessExplosionOptions {
|
|
34
|
+
particleCount?: number;
|
|
35
|
+
duration?: number;
|
|
36
|
+
size?: WakaSuccessExplosionProps["size"];
|
|
37
|
+
primaryColor?: string;
|
|
38
|
+
secondaryColor?: string;
|
|
39
|
+
accentColor?: string;
|
|
40
|
+
showCheckmark?: boolean;
|
|
41
|
+
checkmarkColor?: string;
|
|
42
|
+
autoHide?: boolean;
|
|
43
|
+
onComplete?: () => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function useSuccessExplosion(options?: UseSuccessExplosionOptions): {
|
|
46
|
+
ref: React.RefObject<WakaSuccessExplosionRef>;
|
|
47
|
+
isExploding: boolean;
|
|
48
|
+
explode: () => void;
|
|
49
|
+
reset: () => void;
|
|
50
|
+
ExplosionComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type SwipeDirection = "left" | "right" | "up" | "down";
|
|
4
|
+
export interface SwipeCardData {
|
|
5
|
+
id: string | number;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface WakaSwipeCardProps<T extends SwipeCardData> extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof swipeCardVariants> {
|
|
9
|
+
/** Array of card data to display */
|
|
10
|
+
cards: T[];
|
|
11
|
+
/** Render function for each card */
|
|
12
|
+
renderCard: (card: T, index: number) => React.ReactNode;
|
|
13
|
+
/** Called when a card is swiped */
|
|
14
|
+
onSwipe?: (card: T, direction: SwipeDirection) => void;
|
|
15
|
+
/** Called when swiping starts */
|
|
16
|
+
onSwipeStart?: (card: T, direction: SwipeDirection) => void;
|
|
17
|
+
/** Called during swipe with progress (0-1) */
|
|
18
|
+
onSwipeProgress?: (card: T, direction: SwipeDirection, progress: number) => void;
|
|
19
|
+
/** Threshold to trigger swipe (0-1, default 0.3) */
|
|
20
|
+
swipeThreshold?: number;
|
|
21
|
+
/** Enable/disable specific swipe directions */
|
|
22
|
+
allowedDirections?: SwipeDirection[];
|
|
23
|
+
/** Show overlay indicators during swipe */
|
|
24
|
+
showOverlay?: boolean;
|
|
25
|
+
/** Custom overlay content for each direction */
|
|
26
|
+
overlayContent?: Partial<Record<SwipeDirection, React.ReactNode>>;
|
|
27
|
+
/** Number of visible cards in stack */
|
|
28
|
+
stackSize?: number;
|
|
29
|
+
/** Scale factor for stacked cards */
|
|
30
|
+
stackScale?: number;
|
|
31
|
+
/** Vertical offset for stacked cards */
|
|
32
|
+
stackOffset?: number;
|
|
33
|
+
/** Animation duration in ms */
|
|
34
|
+
animationDuration?: number;
|
|
35
|
+
/** Enable haptic feedback (if available) */
|
|
36
|
+
hapticFeedback?: boolean;
|
|
37
|
+
/** Disable interactions */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/** Called when all cards are swiped */
|
|
40
|
+
onEmpty?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export interface WakaSwipeCardRef {
|
|
43
|
+
swipe: (direction: SwipeDirection) => void;
|
|
44
|
+
rewind: () => void;
|
|
45
|
+
getCurrentCard: () => SwipeCardData | null;
|
|
46
|
+
}
|
|
47
|
+
declare const swipeCardVariants: (props?: ({
|
|
48
|
+
size?: "default" | "sm" | "lg" | "full" | null | undefined;
|
|
49
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
50
|
+
export declare const WakaSwipeCard: <T extends SwipeCardData>(props: WakaSwipeCardProps<T> & {
|
|
51
|
+
ref?: React.ForwardedRef<WakaSwipeCardRef>;
|
|
52
|
+
}) => React.ReactElement;
|
|
53
|
+
export interface WakaSwipeCardActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
54
|
+
/** Reference to the SwipeCard component */
|
|
55
|
+
swipeCardRef: React.RefObject<WakaSwipeCardRef>;
|
|
56
|
+
/** Show rewind button */
|
|
57
|
+
showRewind?: boolean;
|
|
58
|
+
/** Allowed directions to show buttons for */
|
|
59
|
+
directions?: SwipeDirection[];
|
|
60
|
+
/** Button size */
|
|
61
|
+
size?: "sm" | "default" | "lg";
|
|
62
|
+
}
|
|
63
|
+
export declare function WakaSwipeCardActions({ swipeCardRef, showRewind, directions, size, className, ...props }: WakaSwipeCardActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
/** Unique identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Tab label */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Icon element */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Badge content (number or text) */
|
|
10
|
+
badge?: number | string;
|
|
11
|
+
/** Disable the tab */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Tab content (for controlled usage) */
|
|
14
|
+
content?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface WakaTabsMorphProps {
|
|
17
|
+
/** Tab items */
|
|
18
|
+
tabs: TabItem[];
|
|
19
|
+
/** Currently active tab id */
|
|
20
|
+
activeTab?: string;
|
|
21
|
+
/** Default active tab id */
|
|
22
|
+
defaultTab?: string;
|
|
23
|
+
/** Callback when tab changes */
|
|
24
|
+
onChange?: (tabId: string) => void;
|
|
25
|
+
/** Orientation */
|
|
26
|
+
orientation?: "horizontal" | "vertical";
|
|
27
|
+
/** Size variant */
|
|
28
|
+
size?: "sm" | "md" | "lg";
|
|
29
|
+
/** Style variant */
|
|
30
|
+
variant?: "default" | "pills" | "underline" | "enclosed";
|
|
31
|
+
/** Full width tabs */
|
|
32
|
+
fullWidth?: boolean;
|
|
33
|
+
/** Animation duration in ms */
|
|
34
|
+
animationDuration?: number;
|
|
35
|
+
/** Custom className for the tab list */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Custom className for the tab content */
|
|
38
|
+
contentClassName?: string;
|
|
39
|
+
/** Render function for tab content */
|
|
40
|
+
renderContent?: (tab: TabItem) => React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export declare function WakaTabsMorph({ tabs, activeTab, defaultTab, onChange, orientation, size, variant, fullWidth, animationDuration, className, contentClassName, renderContent, }: WakaTabsMorphProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare function useTabs(tabs: TabItem[], initialTab?: string): {
|
|
44
|
+
activeTab: string;
|
|
45
|
+
activeTabData: TabItem | undefined;
|
|
46
|
+
setActiveTab: React.Dispatch<React.SetStateAction<string>>;
|
|
47
|
+
goToTab: (tabId: string) => void;
|
|
48
|
+
goToNext: () => void;
|
|
49
|
+
goToPrevious: () => void;
|
|
50
|
+
goToFirst: () => void;
|
|
51
|
+
goToLast: () => void;
|
|
52
|
+
};
|
|
53
|
+
export interface WakaTabPanelProps {
|
|
54
|
+
/** Tab id this panel corresponds to */
|
|
55
|
+
tabId: string;
|
|
56
|
+
/** Current active tab id */
|
|
57
|
+
activeTab: string;
|
|
58
|
+
/** Panel content */
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
/** Keep panel mounted when not active */
|
|
61
|
+
keepMounted?: boolean;
|
|
62
|
+
/** Custom className */
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
export declare function WakaTabPanel({ tabId, activeTab, children, keepMounted, className, }: WakaTabPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
66
|
+
export default WakaTabsMorph;
|