@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,81 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ProductImage {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ProductVariant {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
available?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ColorVariant extends ProductVariant {
|
|
13
|
+
color: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SizeVariant extends ProductVariant {
|
|
16
|
+
}
|
|
17
|
+
export interface WakaProductCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** Product name */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Product price */
|
|
21
|
+
price: number;
|
|
22
|
+
/** Original price before discount */
|
|
23
|
+
originalPrice?: number;
|
|
24
|
+
/** Currency symbol */
|
|
25
|
+
currency?: string;
|
|
26
|
+
/** Product images */
|
|
27
|
+
images: ProductImage[];
|
|
28
|
+
/** Product rating (0-5) */
|
|
29
|
+
rating?: number;
|
|
30
|
+
/** Number of reviews */
|
|
31
|
+
reviewCount?: number;
|
|
32
|
+
/** Discount percentage badge */
|
|
33
|
+
discountBadge?: string;
|
|
34
|
+
/** Custom badge text */
|
|
35
|
+
customBadge?: string;
|
|
36
|
+
/** Color variants */
|
|
37
|
+
colorVariants?: ColorVariant[];
|
|
38
|
+
/** Size variants */
|
|
39
|
+
sizeVariants?: SizeVariant[];
|
|
40
|
+
/** Whether product is in stock */
|
|
41
|
+
inStock?: boolean;
|
|
42
|
+
/** Whether product is in wishlist */
|
|
43
|
+
isWishlisted?: boolean;
|
|
44
|
+
/** Show quick view button */
|
|
45
|
+
showQuickView?: boolean;
|
|
46
|
+
/** Image gallery mode */
|
|
47
|
+
galleryMode?: "thumbnails" | "dots";
|
|
48
|
+
/** Called when add to cart is clicked */
|
|
49
|
+
onAddToCart?: () => void;
|
|
50
|
+
/** Called when wishlist button is clicked */
|
|
51
|
+
onWishlistToggle?: (isWishlisted: boolean) => void;
|
|
52
|
+
/** Called when quick view is clicked */
|
|
53
|
+
onQuickView?: () => void;
|
|
54
|
+
/** Called when color variant is selected */
|
|
55
|
+
onColorSelect?: (variant: ColorVariant) => void;
|
|
56
|
+
/** Called when size variant is selected */
|
|
57
|
+
onSizeSelect?: (variant: SizeVariant) => void;
|
|
58
|
+
/** Selected color variant ID */
|
|
59
|
+
selectedColorId?: string;
|
|
60
|
+
/** Selected size variant ID */
|
|
61
|
+
selectedSizeId?: string;
|
|
62
|
+
/** Card size variant */
|
|
63
|
+
size?: "sm" | "default" | "lg";
|
|
64
|
+
}
|
|
65
|
+
export declare function WakaProductCard({ name, price, originalPrice, currency, images, rating, reviewCount, discountBadge, customBadge, colorVariants, sizeVariants, inStock, isWishlisted, showQuickView, galleryMode, onAddToCart, onWishlistToggle, onQuickView, onColorSelect, onSizeSelect, selectedColorId, selectedSizeId, size, className, ...props }: WakaProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export interface WakaProductGridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
67
|
+
/** Number of columns */
|
|
68
|
+
columns?: 2 | 3 | 4 | 5;
|
|
69
|
+
/** Gap between items */
|
|
70
|
+
gap?: "sm" | "md" | "lg";
|
|
71
|
+
/** Children */
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
export declare function WakaProductGrid({ columns, gap, className, children, ...props }: WakaProductGridProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export interface WakaProductCardSkeletonProps {
|
|
76
|
+
/** Card size */
|
|
77
|
+
size?: "sm" | "default" | "lg";
|
|
78
|
+
/** Show variants placeholder */
|
|
79
|
+
showVariants?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare function WakaProductCardSkeleton({ size, showVariants, }: WakaProductCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface OnboardingStep {
|
|
3
|
+
/** Unique identifier for the step */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Label for the step (displayed in full variant) */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Optional description */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Optional icon for the step */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Whether the step is completed */
|
|
12
|
+
completed?: boolean;
|
|
13
|
+
/** Whether the step is optional */
|
|
14
|
+
optional?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type OnboardingVariant = "mini" | "full";
|
|
17
|
+
export type OnboardingOrientation = "horizontal" | "vertical";
|
|
18
|
+
export type OnboardingColor = "default" | "blue" | "green" | "purple" | "orange" | "custom";
|
|
19
|
+
export interface WakaProgressOnboardingProps {
|
|
20
|
+
/** List of onboarding steps */
|
|
21
|
+
steps: OnboardingStep[];
|
|
22
|
+
/** Current step index (0-indexed) */
|
|
23
|
+
currentStep: number;
|
|
24
|
+
/** Variant: mini (compact for headers) or full (with labels) */
|
|
25
|
+
variant?: OnboardingVariant;
|
|
26
|
+
/** Orientation of the progress bar */
|
|
27
|
+
orientation?: OnboardingOrientation;
|
|
28
|
+
/** Show percentage completion */
|
|
29
|
+
showPercentage?: boolean;
|
|
30
|
+
/** Show step markers/dots */
|
|
31
|
+
showStepMarkers?: boolean;
|
|
32
|
+
/** Animate progress fill */
|
|
33
|
+
animated?: boolean;
|
|
34
|
+
/** Color theme */
|
|
35
|
+
color?: OnboardingColor;
|
|
36
|
+
/** Custom primary color (when color is "custom") */
|
|
37
|
+
customColor?: string;
|
|
38
|
+
/** Show confetti animation on completion */
|
|
39
|
+
showConfettiOnComplete?: boolean;
|
|
40
|
+
/** Dismissible - show close button */
|
|
41
|
+
dismissible?: boolean;
|
|
42
|
+
/** Callback when dismissed */
|
|
43
|
+
onDismiss?: () => void;
|
|
44
|
+
/** Callback when step is clicked (for clickable steps) */
|
|
45
|
+
onStepClick?: (stepIndex: number) => void;
|
|
46
|
+
/** Whether steps are clickable */
|
|
47
|
+
clickable?: boolean;
|
|
48
|
+
/** Additional class name */
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ProgressOnboardingState {
|
|
52
|
+
/** Current step index */
|
|
53
|
+
currentStep: number;
|
|
54
|
+
/** List of steps */
|
|
55
|
+
steps: OnboardingStep[];
|
|
56
|
+
/** Whether onboarding is completed */
|
|
57
|
+
isCompleted: boolean;
|
|
58
|
+
/** Whether onboarding is dismissed */
|
|
59
|
+
isDismissed: boolean;
|
|
60
|
+
/** Percentage completion */
|
|
61
|
+
percentage: number;
|
|
62
|
+
}
|
|
63
|
+
export interface UseProgressOnboardingOptions {
|
|
64
|
+
/** Initial steps configuration */
|
|
65
|
+
initialSteps: OnboardingStep[];
|
|
66
|
+
/** Initial current step */
|
|
67
|
+
initialStep?: number;
|
|
68
|
+
/** Callback when onboarding is completed */
|
|
69
|
+
onComplete?: () => void;
|
|
70
|
+
/** Callback when step changes */
|
|
71
|
+
onStepChange?: (step: number) => void;
|
|
72
|
+
/** Persist state in localStorage */
|
|
73
|
+
persistKey?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface UseProgressOnboardingReturn extends ProgressOnboardingState {
|
|
76
|
+
/** Go to a specific step */
|
|
77
|
+
goToStep: (stepIndex: number) => void;
|
|
78
|
+
/** Go to next step */
|
|
79
|
+
nextStep: () => void;
|
|
80
|
+
/** Go to previous step */
|
|
81
|
+
prevStep: () => void;
|
|
82
|
+
/** Mark a step as completed */
|
|
83
|
+
completeStep: (stepId: string) => void;
|
|
84
|
+
/** Mark a step as incomplete */
|
|
85
|
+
uncompleteStep: (stepId: string) => void;
|
|
86
|
+
/** Mark current step as complete and go to next */
|
|
87
|
+
completeAndNext: () => void;
|
|
88
|
+
/** Dismiss the onboarding */
|
|
89
|
+
dismiss: () => void;
|
|
90
|
+
/** Reset the onboarding */
|
|
91
|
+
reset: () => void;
|
|
92
|
+
/** Update steps */
|
|
93
|
+
setSteps: (steps: OnboardingStep[]) => void;
|
|
94
|
+
}
|
|
95
|
+
export declare function WakaProgressOnboarding({ steps, currentStep, variant, orientation, showPercentage, showStepMarkers, animated, color, customColor, showConfettiOnComplete, dismissible, onDismiss, onStepClick, clickable, className, }: WakaProgressOnboardingProps): import("react/jsx-runtime").JSX.Element | null;
|
|
96
|
+
export declare function useProgressOnboarding({ initialSteps, initialStep, onComplete, onStepChange, persistKey, }: UseProgressOnboardingOptions): UseProgressOnboardingReturn;
|
|
97
|
+
export default WakaProgressOnboarding;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type RefreshState = "idle" | "pulling" | "ready" | "refreshing" | "complete";
|
|
4
|
+
export interface WakaPullToRefreshProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof pullToRefreshVariants> {
|
|
5
|
+
/** Async function to call on refresh */
|
|
6
|
+
onRefresh: () => Promise<void>;
|
|
7
|
+
/** Pull distance required to trigger refresh (default: 80) */
|
|
8
|
+
pullThreshold?: number;
|
|
9
|
+
/** Maximum pull distance (default: 150) */
|
|
10
|
+
maxPull?: number;
|
|
11
|
+
/** Resistance factor when pulling (default: 0.5) */
|
|
12
|
+
resistance?: number;
|
|
13
|
+
/** Custom indicator component */
|
|
14
|
+
indicator?: React.ReactNode | ((state: RefreshState, progress: number) => React.ReactNode);
|
|
15
|
+
/** Custom pulling text */
|
|
16
|
+
pullingText?: string;
|
|
17
|
+
/** Custom ready text */
|
|
18
|
+
readyText?: string;
|
|
19
|
+
/** Custom refreshing text */
|
|
20
|
+
refreshingText?: string;
|
|
21
|
+
/** Custom complete text */
|
|
22
|
+
completeText?: string;
|
|
23
|
+
/** Enable haptic feedback */
|
|
24
|
+
hapticFeedback?: boolean;
|
|
25
|
+
/** Disable pull-to-refresh */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Called when pull state changes */
|
|
28
|
+
onStateChange?: (state: RefreshState) => void;
|
|
29
|
+
/** Children to render as scrollable content */
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
declare const pullToRefreshVariants: (props?: ({
|
|
33
|
+
variant?: "default" | "ios" | "material" | null | undefined;
|
|
34
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
35
|
+
export declare const WakaPullToRefresh: React.ForwardRefExoticComponent<WakaPullToRefreshProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export interface UsePullToRefreshOptions {
|
|
37
|
+
onRefresh: () => Promise<void>;
|
|
38
|
+
onStateChange?: (state: RefreshState) => void;
|
|
39
|
+
}
|
|
40
|
+
export declare function usePullToRefresh({ onRefresh, onStateChange }: UsePullToRefreshOptions): {
|
|
41
|
+
state: RefreshState;
|
|
42
|
+
isRefreshing: boolean;
|
|
43
|
+
refresh: () => Promise<void>;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface QuestObjective {
|
|
3
|
+
/** Unique identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Objective description */
|
|
6
|
+
text: string;
|
|
7
|
+
/** Whether the objective is completed */
|
|
8
|
+
completed: boolean;
|
|
9
|
+
/** Current progress value (for countable objectives) */
|
|
10
|
+
current?: number;
|
|
11
|
+
/** Target value (for countable objectives) */
|
|
12
|
+
target?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface QuestReward {
|
|
15
|
+
/** Type of reward */
|
|
16
|
+
type: "xp" | "badge" | "item" | "currency";
|
|
17
|
+
/** Value of the reward (number for XP/currency, string for badge/item names) */
|
|
18
|
+
value: number | string;
|
|
19
|
+
/** Optional custom icon */
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface QuestChainInfo {
|
|
23
|
+
/** Chain identifier */
|
|
24
|
+
chainId: string;
|
|
25
|
+
/** Chain name */
|
|
26
|
+
chainName: string;
|
|
27
|
+
/** Current quest position in chain (1-indexed) */
|
|
28
|
+
currentPosition: number;
|
|
29
|
+
/** Total quests in chain */
|
|
30
|
+
totalQuests: number;
|
|
31
|
+
/** Previous quest ID (if any) */
|
|
32
|
+
previousQuestId?: string;
|
|
33
|
+
/** Next quest ID (if any) */
|
|
34
|
+
nextQuestId?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface Quest {
|
|
37
|
+
/** Unique identifier */
|
|
38
|
+
id: string;
|
|
39
|
+
/** Quest title */
|
|
40
|
+
title: string;
|
|
41
|
+
/** Quest description */
|
|
42
|
+
description: string;
|
|
43
|
+
/** Quest type */
|
|
44
|
+
type: "daily" | "weekly" | "story" | "challenge" | "achievement";
|
|
45
|
+
/** Difficulty level */
|
|
46
|
+
difficulty: "easy" | "medium" | "hard" | "legendary";
|
|
47
|
+
/** List of objectives */
|
|
48
|
+
objectives: QuestObjective[];
|
|
49
|
+
/** List of rewards */
|
|
50
|
+
rewards: QuestReward[];
|
|
51
|
+
/** Expiration date for timed quests */
|
|
52
|
+
expiresAt?: Date;
|
|
53
|
+
/** Overall progress percentage (0-100) */
|
|
54
|
+
progress: number;
|
|
55
|
+
/** Current quest status */
|
|
56
|
+
status: "available" | "in_progress" | "completed" | "claimed" | "expired" | "abandoned";
|
|
57
|
+
/** Quest chain information (if part of a series) */
|
|
58
|
+
chainInfo?: QuestChainInfo;
|
|
59
|
+
/** Whether the quest can be abandoned */
|
|
60
|
+
canAbandon?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface WakaQuestCardProps {
|
|
63
|
+
/** Quest data */
|
|
64
|
+
quest: Quest;
|
|
65
|
+
/** Callback when claiming rewards */
|
|
66
|
+
onClaim?: (questId: string) => void;
|
|
67
|
+
/** Callback when clicking an objective */
|
|
68
|
+
onObjectiveClick?: (questId: string, objectiveId: string) => void;
|
|
69
|
+
/** Callback when abandoning a quest */
|
|
70
|
+
onAbandon?: (questId: string) => void;
|
|
71
|
+
/** Callback when clicking on chain navigation */
|
|
72
|
+
onChainNavigate?: (questId: string, direction: "previous" | "next") => void;
|
|
73
|
+
/** Display variant */
|
|
74
|
+
variant?: "compact" | "detailed";
|
|
75
|
+
/** Show abandon confirmation dialog */
|
|
76
|
+
showAbandonConfirm?: boolean;
|
|
77
|
+
/** Custom className */
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare function WakaQuestCard({ quest, onClaim, onObjectiveClick, onAbandon, onChainNavigate, variant, showAbandonConfirm, className, }: WakaQuestCardProps): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare function WakaQuestCardSkeleton({ variant }: {
|
|
82
|
+
variant?: "compact" | "detailed";
|
|
83
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export interface WakaQuestListProps {
|
|
85
|
+
quests: Quest[];
|
|
86
|
+
variant?: "compact" | "detailed";
|
|
87
|
+
emptyMessage?: string;
|
|
88
|
+
onClaim?: (questId: string) => void;
|
|
89
|
+
onObjectiveClick?: (questId: string, objectiveId: string) => void;
|
|
90
|
+
className?: string;
|
|
91
|
+
}
|
|
92
|
+
export declare function WakaQuestList({ quests, variant, emptyMessage, onClaim, onObjectiveClick, className, }: WakaQuestListProps): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
export interface UseQuestsOptions {
|
|
94
|
+
initialQuests: Quest[];
|
|
95
|
+
onQuestComplete?: (quest: Quest) => void;
|
|
96
|
+
onQuestClaimed?: (quest: Quest) => void;
|
|
97
|
+
}
|
|
98
|
+
export declare function useQuests({ initialQuests, onQuestComplete, onQuestClaimed }: UseQuestsOptions): {
|
|
99
|
+
quests: Quest[];
|
|
100
|
+
setQuests: React.Dispatch<React.SetStateAction<Quest[]>>;
|
|
101
|
+
updateObjective: (questId: string, objectiveId: string, completed: boolean) => void;
|
|
102
|
+
incrementObjective: (questId: string, objectiveId: string, amount?: number) => void;
|
|
103
|
+
claimQuest: (questId: string) => void;
|
|
104
|
+
addQuest: (quest: Quest) => void;
|
|
105
|
+
removeQuest: (questId: string) => void;
|
|
106
|
+
getQuestsByStatus: (status: Quest["status"]) => Quest[];
|
|
107
|
+
getQuestsByType: (type: Quest["type"]) => Quest[];
|
|
108
|
+
activeQuests: Quest[];
|
|
109
|
+
completedQuests: Quest[];
|
|
110
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export interface WakaQuotaBarColors {
|
|
2
|
+
/** Color for normal usage (below soft limit) */
|
|
3
|
+
normal: string;
|
|
4
|
+
/** Color for warning zone (approaching soft limit) */
|
|
5
|
+
warning: string;
|
|
6
|
+
/** Color for danger zone (approaching hard limit) */
|
|
7
|
+
danger: string;
|
|
8
|
+
/** Color for overflow (exceeding hard limit) */
|
|
9
|
+
overflow: string;
|
|
10
|
+
}
|
|
11
|
+
export interface WakaQuotaBarProps {
|
|
12
|
+
/** Current usage value */
|
|
13
|
+
current: number;
|
|
14
|
+
/** Soft limit threshold (optional warning point) */
|
|
15
|
+
softLimit?: number;
|
|
16
|
+
/** Hard limit (maximum allowed) */
|
|
17
|
+
hardLimit: number;
|
|
18
|
+
/** Label for the quota bar */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Unit of measurement (e.g., "GB", "MB", "items") */
|
|
21
|
+
unit?: string;
|
|
22
|
+
/** Show value labels */
|
|
23
|
+
showLabels?: boolean;
|
|
24
|
+
/** Show limit markers on the bar */
|
|
25
|
+
showMarkers?: boolean;
|
|
26
|
+
/** Size variant */
|
|
27
|
+
size?: "sm" | "md" | "lg";
|
|
28
|
+
/** Visual variant */
|
|
29
|
+
variant?: "simple" | "detailed";
|
|
30
|
+
/** Enable fill animation */
|
|
31
|
+
animated?: boolean;
|
|
32
|
+
/** Custom color configuration */
|
|
33
|
+
colors?: Partial<WakaQuotaBarColors>;
|
|
34
|
+
/** Custom value formatter */
|
|
35
|
+
formatValue?: (value: number) => string;
|
|
36
|
+
/** Additional CSS classes */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function WakaQuotaBar({ current, softLimit, hardLimit, label, unit, showLabels, showMarkers, size, variant, animated, colors: customColors, formatValue, className, }: WakaQuotaBarProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface QuotaResource {
|
|
41
|
+
/** Unique identifier for the resource */
|
|
42
|
+
id: string;
|
|
43
|
+
/** Display label */
|
|
44
|
+
label: string;
|
|
45
|
+
/** Current usage */
|
|
46
|
+
current: number;
|
|
47
|
+
/** Soft limit (optional) */
|
|
48
|
+
softLimit?: number;
|
|
49
|
+
/** Hard limit */
|
|
50
|
+
hardLimit: number;
|
|
51
|
+
/** Unit of measurement */
|
|
52
|
+
unit?: string;
|
|
53
|
+
/** Custom colors */
|
|
54
|
+
colors?: Partial<WakaQuotaBarColors>;
|
|
55
|
+
}
|
|
56
|
+
export interface WakaMultiQuotaBarProps {
|
|
57
|
+
/** Array of quota resources to display */
|
|
58
|
+
resources: QuotaResource[];
|
|
59
|
+
/** Show all resource details in a compact layout */
|
|
60
|
+
compact?: boolean;
|
|
61
|
+
/** Size variant */
|
|
62
|
+
size?: "sm" | "md" | "lg";
|
|
63
|
+
/** Enable animations */
|
|
64
|
+
animated?: boolean;
|
|
65
|
+
/** Custom value formatter */
|
|
66
|
+
formatValue?: (value: number) => string;
|
|
67
|
+
/** Additional CSS classes */
|
|
68
|
+
className?: string;
|
|
69
|
+
}
|
|
70
|
+
export declare function WakaMultiQuotaBar({ resources, compact, size, animated, formatValue, className, }: WakaMultiQuotaBarProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
export interface UseQuotaOptions {
|
|
72
|
+
/** Initial current value */
|
|
73
|
+
initialValue?: number;
|
|
74
|
+
/** Soft limit */
|
|
75
|
+
softLimit?: number;
|
|
76
|
+
/** Hard limit */
|
|
77
|
+
hardLimit: number;
|
|
78
|
+
/** Callback when approaching soft limit */
|
|
79
|
+
onApproachingSoftLimit?: (current: number) => void;
|
|
80
|
+
/** Callback when approaching hard limit */
|
|
81
|
+
onApproachingHardLimit?: (current: number) => void;
|
|
82
|
+
/** Callback when exceeding hard limit */
|
|
83
|
+
onOverflow?: (current: number, overflow: number) => void;
|
|
84
|
+
/** Threshold percentage for "approaching" (default: 80%) */
|
|
85
|
+
approachingThreshold?: number;
|
|
86
|
+
}
|
|
87
|
+
export declare function useQuota({ initialValue, softLimit, hardLimit, onApproachingSoftLimit, onApproachingHardLimit, onOverflow, approachingThreshold, }: UseQuotaOptions): {
|
|
88
|
+
current: number;
|
|
89
|
+
usagePercentage: number;
|
|
90
|
+
softLimitPercentage: number | undefined;
|
|
91
|
+
isOverflow: boolean;
|
|
92
|
+
overflowAmount: number;
|
|
93
|
+
remaining: number;
|
|
94
|
+
zone: "overflow" | "warning" | "normal" | "danger";
|
|
95
|
+
add: (amount: number) => void;
|
|
96
|
+
subtract: (amount: number) => void;
|
|
97
|
+
set: (value: number) => void;
|
|
98
|
+
reset: () => void;
|
|
99
|
+
};
|
|
100
|
+
export default WakaQuotaBar;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RadarDataPoint {
|
|
3
|
+
/** Label for the axis */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Value (0-100) */
|
|
6
|
+
value: number;
|
|
7
|
+
/** Optional maximum value (defaults to 100) */
|
|
8
|
+
max?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RadarDataSet {
|
|
11
|
+
/** Unique identifier */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Label for the dataset */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Data points matching the axes */
|
|
16
|
+
data: number[];
|
|
17
|
+
/** Color for the dataset */
|
|
18
|
+
color?: string;
|
|
19
|
+
/** Fill opacity (0-1) */
|
|
20
|
+
fillOpacity?: number;
|
|
21
|
+
/** Stroke width */
|
|
22
|
+
strokeWidth?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface WakaRadarScoreProps {
|
|
25
|
+
/** Axis labels */
|
|
26
|
+
axes: string[];
|
|
27
|
+
/** Data sets to display */
|
|
28
|
+
datasets: RadarDataSet[];
|
|
29
|
+
/** Size of the chart in pixels */
|
|
30
|
+
size?: number;
|
|
31
|
+
/** Number of grid levels */
|
|
32
|
+
levels?: number;
|
|
33
|
+
/** Maximum value for the scale */
|
|
34
|
+
maxValue?: number;
|
|
35
|
+
/** Show grid lines */
|
|
36
|
+
showGrid?: boolean;
|
|
37
|
+
/** Show axis labels */
|
|
38
|
+
showLabels?: boolean;
|
|
39
|
+
/** Show data points */
|
|
40
|
+
showPoints?: boolean;
|
|
41
|
+
/** Show values on hover */
|
|
42
|
+
showTooltip?: boolean;
|
|
43
|
+
/** Animate the chart on mount */
|
|
44
|
+
animated?: boolean;
|
|
45
|
+
/** Animation duration in ms */
|
|
46
|
+
animationDuration?: number;
|
|
47
|
+
/** Custom className */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Legend position */
|
|
50
|
+
legendPosition?: "none" | "top" | "bottom" | "left" | "right";
|
|
51
|
+
/** Grid color */
|
|
52
|
+
gridColor?: string;
|
|
53
|
+
/** Axis color */
|
|
54
|
+
axisColor?: string;
|
|
55
|
+
/** Label color */
|
|
56
|
+
labelColor?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function useRadarScore(datasets: RadarDataSet[]): {
|
|
59
|
+
activeDataset: string | null;
|
|
60
|
+
setActiveDataset: React.Dispatch<React.SetStateAction<string | null>>;
|
|
61
|
+
hoveredPoint: {
|
|
62
|
+
datasetId: string;
|
|
63
|
+
axisIndex: number;
|
|
64
|
+
} | null;
|
|
65
|
+
setHoveredPoint: React.Dispatch<React.SetStateAction<{
|
|
66
|
+
datasetId: string;
|
|
67
|
+
axisIndex: number;
|
|
68
|
+
} | null>>;
|
|
69
|
+
};
|
|
70
|
+
export declare function WakaRadarScore({ axes, datasets, size, levels, maxValue, showGrid, showLabels, showPoints, showTooltip, animated, animationDuration, className, legendPosition, gridColor, axisColor, labelColor, }: WakaRadarScoreProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
export interface WakaRadarScoreSimpleProps extends Omit<WakaRadarScoreProps, "datasets" | "axes"> {
|
|
72
|
+
/** Data points with labels and values */
|
|
73
|
+
data: RadarDataPoint[];
|
|
74
|
+
/** Color for the chart */
|
|
75
|
+
color?: string;
|
|
76
|
+
/** Fill opacity */
|
|
77
|
+
fillOpacity?: number;
|
|
78
|
+
}
|
|
79
|
+
export declare function WakaRadarScoreSimple({ data, color, fillOpacity, ...props }: WakaRadarScoreSimpleProps): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export interface WakaRadarScoreCompareProps extends Omit<WakaRadarScoreProps, "datasets"> {
|
|
81
|
+
/** First dataset */
|
|
82
|
+
dataA: {
|
|
83
|
+
label: string;
|
|
84
|
+
data: number[];
|
|
85
|
+
color?: string;
|
|
86
|
+
};
|
|
87
|
+
/** Second dataset */
|
|
88
|
+
dataB: {
|
|
89
|
+
label: string;
|
|
90
|
+
data: number[];
|
|
91
|
+
color?: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export declare function WakaRadarScoreCompare({ dataA, dataB, ...props }: WakaRadarScoreCompareProps): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
export default WakaRadarScore;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type RankTier = "bronze" | "silver" | "gold" | "platinum" | "diamond" | "master" | "grandmaster";
|
|
2
|
+
export type RankDivision = 1 | 2 | 3 | 4 | 5;
|
|
3
|
+
export type RankSize = "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export interface WakaRankBadgeProps {
|
|
5
|
+
/** Current rank tier */
|
|
6
|
+
rank: RankTier;
|
|
7
|
+
/** Division within the rank (1 = highest, 5 = lowest) */
|
|
8
|
+
division?: RankDivision;
|
|
9
|
+
/** Current points */
|
|
10
|
+
points?: number;
|
|
11
|
+
/** Points needed for next rank/division */
|
|
12
|
+
pointsToNext?: number;
|
|
13
|
+
/** Size variant */
|
|
14
|
+
size?: RankSize;
|
|
15
|
+
/** Show points display */
|
|
16
|
+
showPoints?: boolean;
|
|
17
|
+
/** Show division display */
|
|
18
|
+
showDivision?: boolean;
|
|
19
|
+
/** Enable animations */
|
|
20
|
+
animated?: boolean;
|
|
21
|
+
/** Previous rank for promotion animation */
|
|
22
|
+
previousRank?: RankTier;
|
|
23
|
+
/** Additional CSS classes */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function WakaRankBadge({ rank, division, points, pointsToNext, size, showPoints, showDivision, animated, previousRank, className, }: WakaRankBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export interface WakaRankBadgeGroupProps {
|
|
28
|
+
/** Current rank to highlight */
|
|
29
|
+
currentRank: RankTier;
|
|
30
|
+
/** Size of badges */
|
|
31
|
+
size?: RankSize;
|
|
32
|
+
/** Show all ranks or only nearby ranks */
|
|
33
|
+
showAll?: boolean;
|
|
34
|
+
/** Number of ranks to show on each side of current */
|
|
35
|
+
range?: number;
|
|
36
|
+
/** Additional CSS classes */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function WakaRankBadgeGroup({ currentRank, size, showAll, range, className, }: WakaRankBadgeGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface UseRankOptions {
|
|
41
|
+
initialRank?: RankTier;
|
|
42
|
+
initialDivision?: RankDivision;
|
|
43
|
+
initialPoints?: number;
|
|
44
|
+
pointsPerDivision?: number;
|
|
45
|
+
pointsPerRank?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface UseRankReturn {
|
|
48
|
+
rank: RankTier;
|
|
49
|
+
division: RankDivision;
|
|
50
|
+
points: number;
|
|
51
|
+
pointsToNext: number;
|
|
52
|
+
previousRank: RankTier | undefined;
|
|
53
|
+
addPoints: (amount: number) => void;
|
|
54
|
+
setRank: (rank: RankTier, division?: RankDivision) => void;
|
|
55
|
+
reset: () => void;
|
|
56
|
+
}
|
|
57
|
+
export declare function useRank(options?: UseRankOptions): UseRankReturn;
|
|
58
|
+
export default WakaRankBadge;
|