@wakastellar/ui 2.3.5 → 3.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/dist/blocks/antivirus-dashboard/index.d.ts +44 -0
- package/dist/blocks/clamav-service-status/index.d.ts +35 -0
- package/dist/blocks/file-scan-uploader/index.d.ts +29 -0
- package/dist/blocks/index.d.ts +18 -9
- package/dist/blocks/quarantine-manager/index.d.ts +27 -0
- package/dist/blocks/scan-history-log/index.d.ts +28 -0
- package/dist/blocks/scan-policy-editor/index.d.ts +27 -0
- package/dist/blocks/scan-report-generator/index.d.ts +47 -0
- package/dist/blocks/signature-database-manager/index.d.ts +39 -0
- package/dist/blocks/threat-alert-banner/index.d.ts +26 -0
- package/dist/components/index.d.ts +4 -4
- package/dist/components/waka-signature-pad/index.d.ts +1 -1
- package/dist/exceljs.min-BcLLX0PC.js +29 -0
- package/dist/exceljs.min-KOayaaQ4.mjs +23013 -0
- package/dist/export.cjs.js +1 -1
- package/dist/export.d.ts +2 -2
- package/dist/export.es.js +1 -1
- package/dist/index.cjs.js +136 -136
- package/dist/index.es.js +29978 -27215
- package/dist/stories/Button.d.ts +14 -0
- package/dist/stories/Button.stories.d.ts +8 -0
- package/dist/stories/Header.d.ts +11 -0
- package/dist/stories/Header.stories.d.ts +6 -0
- package/dist/stories/Page.d.ts +2 -0
- package/dist/stories/Page.stories.d.ts +6 -0
- package/dist/useDataTableImport-COVnvslz.js +9 -0
- package/dist/useDataTableImport-DAlxBY8w.mjs +237 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/logger.d.ts +9 -0
- package/package.json +14 -6
- package/src/blocks/activity-timeline/ActivityTimeline.stories.tsx +460 -0
- package/src/blocks/antivirus-dashboard/AntivirusDashboard.stories.tsx +291 -0
- package/src/blocks/antivirus-dashboard/index.tsx +525 -0
- package/src/blocks/apm-overview/APMOverview.stories.tsx +435 -0
- package/src/blocks/auth-2fa/Auth2FA.stories.tsx +308 -0
- package/src/blocks/calendar-view/CalendarView.stories.tsx +398 -0
- package/src/blocks/chat/Chat.stories.tsx +466 -0
- package/src/blocks/chat-interface/ChatInterface.stories.tsx +412 -0
- package/src/blocks/checkout-flow/CheckoutFlow.stories.tsx +408 -0
- package/src/blocks/cicd-builder/CICDBuilder.stories.tsx +499 -0
- package/src/blocks/clamav-service-status/ClamAVServiceStatus.stories.tsx +195 -0
- package/src/blocks/clamav-service-status/index.tsx +370 -0
- package/src/blocks/cloud-cost-dashboard/CloudCostDashboard.stories.tsx +356 -0
- package/src/blocks/container-orchestrator/ContainerOrchestrator.stories.tsx +461 -0
- package/src/blocks/dashboard/Dashboard.stories.tsx +559 -0
- package/src/blocks/dashboard-kpi/DashboardKPI.stories.tsx +422 -0
- package/src/blocks/database-admin/DatabaseAdmin.stories.tsx +393 -0
- package/src/blocks/deployment-dashboard/DeploymentDashboard.stories.tsx +457 -0
- package/src/blocks/empty-states/EmptyStates.stories.tsx +467 -0
- package/src/blocks/error-pages/ErrorPages.stories.tsx +401 -0
- package/src/blocks/faq/FAQ.stories.tsx +416 -0
- package/src/blocks/file-manager/FileManager.stories.tsx +413 -0
- package/src/blocks/file-scan-uploader/FileScanUploader.stories.tsx +257 -0
- package/src/blocks/file-scan-uploader/index.tsx +311 -0
- package/src/blocks/footer/Footer.stories.tsx +328 -0
- package/src/blocks/gitops-sync-status/GitOpsSyncStatus.stories.tsx +529 -0
- package/src/blocks/header/WakaHeader.stories.tsx +455 -0
- package/src/blocks/headtab/Headtab.stories.tsx +369 -0
- package/src/blocks/i18n-editor/I18nEditor.stories.tsx +451 -0
- package/src/blocks/incident-manager/IncidentManager.stories.tsx +464 -0
- package/src/blocks/index.ts +163 -11
- package/src/blocks/infrastructure-map/InfrastructureMap.stories.tsx +533 -0
- package/src/blocks/kanban-board/KanbanBoard.stories.tsx +494 -0
- package/src/blocks/landing/WakaLanding.stories.tsx +449 -0
- package/src/blocks/language-selector/LanguageSelector.stories.tsx +345 -0
- package/src/blocks/layout/Layout.stories.tsx +373 -0
- package/src/blocks/login/Login.stories.tsx +443 -0
- package/src/blocks/on-call-schedule/OnCallSchedule.stories.tsx +381 -0
- package/src/blocks/player-profile/PlayerProfile.stories.tsx +316 -0
- package/src/blocks/pricing/WakaPricing.stories.tsx +530 -0
- package/src/blocks/profile/Profile.stories.tsx +371 -0
- package/src/blocks/quarantine-manager/QuarantineManager.stories.tsx +209 -0
- package/src/blocks/quarantine-manager/index.tsx +435 -0
- package/src/blocks/release-notes/ReleaseNotes.stories.tsx +431 -0
- package/src/blocks/scan-history-log/ScanHistoryLog.stories.tsx +231 -0
- package/src/blocks/scan-history-log/index.tsx +406 -0
- package/src/blocks/scan-policy-editor/ScanPolicyEditor.stories.tsx +106 -0
- package/src/blocks/scan-policy-editor/index.tsx +418 -0
- package/src/blocks/scan-report-generator/ScanReportGenerator.stories.tsx +232 -0
- package/src/blocks/scan-report-generator/index.tsx +612 -0
- package/src/blocks/settings/Settings.stories.tsx +520 -0
- package/src/blocks/sidebar/WakaSidebar.stories.tsx +513 -0
- package/src/blocks/sidebar/index.tsx +2 -1
- package/src/blocks/signature-database-manager/SignatureDatabaseManager.stories.tsx +279 -0
- package/src/blocks/signature-database-manager/index.tsx +470 -0
- package/src/blocks/theme-creator-block/ThemeCreatorBlock.stories.tsx +370 -0
- package/src/blocks/theme-creator-block/index.tsx +16 -2
- package/src/blocks/threat-alert-banner/ThreatAlertBanner.stories.tsx +152 -0
- package/src/blocks/threat-alert-banner/index.tsx +320 -0
- package/src/blocks/user-management/UserManagement.stories.tsx +411 -0
- package/src/blocks/wizard/Wizard.stories.tsx +683 -0
- package/src/components/DataTable/DataTable.stories.tsx +203 -0
- package/src/components/DataTable/hooks/useDataTableExport.ts +38 -31
- package/src/components/DataTable/hooks/useDataTableImport.ts +31 -20
- package/src/components/accordion/Accordion.stories.tsx +93 -0
- package/src/components/alert/Alert.stories.tsx +95 -0
- package/src/components/alert-dialog/AlertDialog.stories.tsx +126 -0
- package/src/components/aspect-ratio/AspectRatio.stories.tsx +118 -0
- package/src/components/avatar/Avatar.stories.tsx +104 -0
- package/src/components/button/Button.stories.tsx +12 -1
- package/src/components/calendar/Calendar.stories.tsx +102 -0
- package/src/components/card/Card.stories.tsx +125 -0
- package/src/components/checkbox/Checkbox.stories.tsx +100 -0
- package/src/components/code/Code.stories.tsx +402 -0
- package/src/components/collapsible/Collapsible.stories.tsx +123 -0
- package/src/components/command/Command.stories.tsx +207 -0
- package/src/components/context-menu/ContextMenu.stories.tsx +220 -0
- package/src/components/dialog/Dialog.stories.tsx +157 -0
- package/src/components/dropdown-menu/DropdownMenu.stories.tsx +225 -0
- package/src/components/error-boundary/ErrorBoundary.stories.tsx +125 -0
- package/src/components/form/Form.stories.tsx +413 -0
- package/src/components/hover-card/HoverCard.stories.tsx +148 -0
- package/src/components/index.ts +45 -4
- package/src/components/input-otp/InputOTP.stories.tsx +255 -0
- package/src/components/label/Label.stories.tsx +68 -0
- package/src/components/language-selector/LanguageSelector.stories.tsx +112 -0
- package/src/components/menubar/Menubar.stories.tsx +278 -0
- package/src/components/navigation-menu/NavigationMenu.stories.tsx +202 -0
- package/src/components/popover/Popover.stories.tsx +199 -0
- package/src/components/progress/Progress.stories.tsx +104 -0
- package/src/components/radio-group/RadioGroup.stories.tsx +138 -0
- package/src/components/scroll-area/ScrollArea.stories.tsx +153 -0
- package/src/components/select/Select.stories.tsx +146 -0
- package/src/components/separator/Separator.stories.tsx +117 -0
- package/src/components/sheet/Sheet.stories.tsx +195 -0
- package/src/components/skeleton/Skeleton.stories.tsx +114 -0
- package/src/components/slider/Slider.stories.tsx +157 -0
- package/src/components/switch/Switch.stories.tsx +114 -0
- package/src/components/table/Table.stories.tsx +153 -0
- package/src/components/tabs/Tabs.stories.tsx +155 -0
- package/src/components/textarea/Textarea.stories.tsx +116 -0
- package/src/components/theme-selector/ThemeSelector.stories.tsx +77 -0
- package/src/components/toast/Toast.stories.tsx +160 -0
- package/src/components/toaster/Toaster.stories.tsx +67 -0
- package/src/components/toggle/Toggle.stories.tsx +125 -0
- package/src/components/tooltip/Tooltip.stories.tsx +133 -0
- package/src/components/typography/Typography.stories.tsx +207 -0
- package/src/components/waka-3d-pie-chart/Waka3DPieChart.stories.tsx +308 -0
- package/src/components/waka-achievement-unlock/WakaAchievementUnlock.stories.tsx +353 -0
- package/src/components/waka-activity-feed/WakaActivityFeed.stories.tsx +116 -0
- package/src/components/waka-ad-banner/WakaAdBanner.stories.tsx +102 -0
- package/src/components/waka-ad-fallback/WakaAdFallback.stories.tsx +117 -0
- package/src/components/waka-ad-inline/WakaAdInline.stories.tsx +105 -0
- package/src/components/waka-ad-interstitial/WakaAdInterstitial.stories.tsx +92 -0
- package/src/components/waka-ad-placeholder/WakaAdPlaceholder.stories.tsx +89 -0
- package/src/components/waka-ad-provider/WakaAdProvider.stories.tsx +110 -0
- package/src/components/waka-ad-sidebar/WakaAdSidebar.stories.tsx +89 -0
- package/src/components/waka-ad-sidebar/index.tsx +3 -2
- package/src/components/waka-ad-sticky-footer/WakaAdStickyFooter.stories.tsx +88 -0
- package/src/components/waka-address-autocomplete/WakaAddressAutocomplete.stories.tsx +46 -0
- package/src/components/waka-admincrumb/WakaAdmincrumb.stories.tsx +166 -0
- package/src/components/waka-alert-panel/WakaAlertPanel.stories.tsx +45 -0
- package/src/components/waka-alert-stack/WakaAlertStack.stories.tsx +62 -0
- package/src/components/waka-allocation-matrix/WakaAllocationMatrix.stories.tsx +68 -0
- package/src/components/waka-approval-chain/WakaApprovalChain.stories.tsx +63 -0
- package/src/components/waka-artifact-list/WakaArtifactList.stories.tsx +258 -0
- package/src/components/waka-audit-log/WakaAuditLog.stories.tsx +73 -0
- package/src/components/waka-autocomplete/WakaAutocomplete.stories.tsx +184 -0
- package/src/components/waka-badge-showcase/WakaBadgeShowcase.stories.tsx +269 -0
- package/src/components/waka-barcode/WakaBarcode.stories.tsx +227 -0
- package/src/components/waka-biometric-prompt/WakaBiometricPrompt.stories.tsx +48 -0
- package/src/components/waka-bottom-sheet/WakaBottomSheet.stories.tsx +408 -0
- package/src/components/waka-breadcrumb/WakaBreadcrumb.stories.tsx +120 -0
- package/src/components/waka-breadcrumb-path/WakaBreadcrumbPath.stories.tsx +40 -0
- package/src/components/waka-budget-burn/WakaBudgetBurn.stories.tsx +86 -0
- package/src/components/waka-build-matrix/WakaBuildMatrix.stories.tsx +328 -0
- package/src/components/waka-capacity-planner/WakaCapacityPlanner.stories.tsx +273 -0
- package/src/components/waka-carousel/WakaCarousel.stories.tsx +296 -0
- package/src/components/waka-cart-summary/WakaCartSummary.stories.tsx +176 -0
- package/src/components/waka-cart-summary/index.tsx +19 -10
- package/src/components/waka-challenge-timer/WakaChallengeTimer.stories.tsx +98 -0
- package/src/components/waka-charts/WakaCharts.stories.tsx +519 -0
- package/src/components/waka-chat-bubble/WakaChatBubble.stories.tsx +118 -0
- package/src/components/waka-checklist/WakaChecklist.stories.tsx +71 -0
- package/src/components/waka-checkout-stepper/WakaCheckoutStepper.stories.tsx +102 -0
- package/src/components/waka-cohort-table/WakaCohortTable.stories.tsx +56 -0
- package/src/components/waka-color-picker/WakaColorPicker.stories.tsx +144 -0
- package/src/components/waka-combo-counter/WakaComboCounter.stories.tsx +128 -0
- package/src/components/waka-combobox/WakaCombobox.stories.tsx +250 -0
- package/src/components/waka-command-bar/WakaCommandBar.stories.tsx +45 -0
- package/src/components/waka-compare-period/WakaComparePeriod.stories.tsx +76 -0
- package/src/components/waka-config-comparator/WakaConfigComparator.stories.tsx +143 -0
- package/src/components/waka-connection-matrix/WakaConnectionMatrix.stories.tsx +52 -0
- package/src/components/waka-container-list/WakaContainerList.stories.tsx +315 -0
- package/src/components/waka-content-recommendation/WakaContentRecommendation.stories.tsx +41 -0
- package/src/components/waka-contribution-graph/WakaContributionGraph.stories.tsx +354 -0
- package/src/components/waka-cost-breakdown/WakaCostBreakdown.stories.tsx +348 -0
- package/src/components/waka-coupon-input/WakaCouponInput.stories.tsx +126 -0
- package/src/components/waka-credit-card-input/WakaCreditCardInput.stories.tsx +120 -0
- package/src/components/waka-daily-reward/WakaDailyReward.stories.tsx +365 -0
- package/src/components/waka-database-card/WakaDatabaseCard.stories.tsx +306 -0
- package/src/components/waka-date-range-picker/WakaDateRangePicker.stories.tsx +339 -0
- package/src/components/waka-datetime-picker/WakaDateTimePicker.stories.tsx +317 -0
- package/src/components/waka-datetime-picker.form-integration/WakaDateTimePickerForm.stories.tsx +79 -0
- package/src/components/waka-dependency-tree/WakaDependencyTree.stories.tsx +72 -0
- package/src/components/waka-deployment-lane/WakaDeploymentLane.stories.tsx +292 -0
- package/src/components/waka-device-trust/WakaDeviceTrust.stories.tsx +109 -0
- package/src/components/waka-dock/WakaDock.stories.tsx +332 -0
- package/src/components/waka-drawer/WakaDrawer.stories.tsx +437 -0
- package/src/components/waka-empty-state/WakaEmptyState.stories.tsx +87 -0
- package/src/components/waka-env-var-editor/WakaEnvVarEditor.stories.tsx +263 -0
- package/src/components/waka-error-shake/WakaErrorShake.stories.tsx +410 -0
- package/src/components/waka-feature-announcement/WakaFeatureAnnouncement.stories.tsx +47 -0
- package/src/components/waka-feature-flag-row/WakaFeatureFlagRow.stories.tsx +188 -0
- package/src/components/waka-file-upload/WakaFileUpload.stories.tsx +183 -0
- package/src/components/waka-floating-nav/WakaFloatingNav.stories.tsx +53 -0
- package/src/components/waka-flow-diagram/WakaFlowDiagram.stories.tsx +365 -0
- package/src/components/waka-funnel-chart/WakaFunnelChart.stories.tsx +281 -0
- package/src/components/waka-glow-card/WakaGlowCard.stories.tsx +274 -0
- package/src/components/waka-goal-progress/WakaGoalProgress.stories.tsx +137 -0
- package/src/components/waka-haptic-button/WakaHapticButton.stories.tsx +349 -0
- package/src/components/waka-health-pulse/WakaHealthPulse.stories.tsx +293 -0
- package/src/components/waka-heatmap/WakaHeatmap.stories.tsx +376 -0
- package/src/components/waka-hotspot/WakaHotspot.stories.tsx +56 -0
- package/src/components/waka-image/WakaImage.stories.tsx +255 -0
- package/src/components/waka-incident-timeline/WakaIncidentTimeline.stories.tsx +300 -0
- package/src/components/waka-invoice-preview/WakaInvoicePreview.stories.tsx +169 -0
- package/src/components/waka-kanban/WakaKanban.stories.tsx +399 -0
- package/src/components/waka-kpi-dashboard/WakaKpiDashboard.stories.tsx +46 -0
- package/src/components/waka-kubernetes-overview/WakaKubernetesOverview.stories.tsx +281 -0
- package/src/components/waka-leaderboard/WakaLeaderboard.stories.tsx +300 -0
- package/src/components/waka-level-progress/WakaLevelProgress.stories.tsx +332 -0
- package/src/components/waka-liquid-button/WakaLiquidButton.stories.tsx +45 -0
- package/src/components/waka-loading-orbit/WakaLoadingOrbit.stories.tsx +413 -0
- package/src/components/waka-log-viewer/WakaLogViewer.stories.tsx +312 -0
- package/src/components/waka-loot-box/WakaLootBox.stories.tsx +374 -0
- package/src/components/waka-magic-link/WakaMagicLink.stories.tsx +61 -0
- package/src/components/waka-magnetic-button/WakaMagneticButton.stories.tsx +40 -0
- package/src/components/waka-mention-input/WakaMentionInput.stories.tsx +140 -0
- package/src/components/waka-metric-sparkline/WakaMetricSparkline.stories.tsx +312 -0
- package/src/components/waka-migration-list/WakaMigrationList.stories.tsx +289 -0
- package/src/components/waka-milestone-road/WakaMilestoneRoad.stories.tsx +143 -0
- package/src/components/waka-modal/WakaModal.stories.tsx +434 -0
- package/src/components/waka-morph-button/WakaMorphButton.stories.tsx +405 -0
- package/src/components/waka-network-topology/WakaNetworkTopology.stories.tsx +364 -0
- package/src/components/waka-notifications/WakaNotifications.stories.tsx +290 -0
- package/src/components/waka-number-input/WakaNumberInput.stories.tsx +282 -0
- package/src/components/waka-orbital-menu/WakaOrbitalMenu.stories.tsx +54 -0
- package/src/components/waka-order-tracker/WakaOrderTracker.stories.tsx +163 -0
- package/src/components/waka-outstream-video/WakaOutstreamVideo.stories.tsx +94 -0
- package/src/components/waka-pagination/WakaPagination.stories.tsx +158 -0
- package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +182 -0
- package/src/components/waka-payment-method-picker/WakaPaymentMethodPicker.stories.tsx +141 -0
- package/src/components/waka-permission-matrix/WakaPermissionMatrix.stories.tsx +124 -0
- package/src/components/waka-phone-input/WakaPhoneInput.stories.tsx +56 -0
- package/src/components/waka-pipeline-view/WakaPipelineView.stories.tsx +386 -0
- package/src/components/waka-player-card/WakaPlayerCard.stories.tsx +333 -0
- package/src/components/waka-pod-card/WakaPodCard.stories.tsx +435 -0
- package/src/components/waka-points-popup/WakaPointsPopup.stories.tsx +96 -0
- package/src/components/waka-power-up/WakaPowerUp.stories.tsx +121 -0
- package/src/components/waka-presence-indicator/WakaPresenceIndicator.stories.tsx +49 -0
- package/src/components/waka-pricing-table/WakaPricingTable.stories.tsx +159 -0
- package/src/components/waka-product-card/WakaProductCard.stories.tsx +202 -0
- package/src/components/waka-progress-onboarding/WakaProgressOnboarding.stories.tsx +57 -0
- package/src/components/waka-pull-to-refresh/WakaPullToRefresh.stories.tsx +51 -0
- package/src/components/waka-qrcode/WakaQRCode.stories.tsx +232 -0
- package/src/components/waka-query-explain/WakaQueryExplain.stories.tsx +407 -0
- package/src/components/waka-quest-card/WakaQuestCard.stories.tsx +394 -0
- package/src/components/waka-quota-bar/WakaQuotaBar.stories.tsx +435 -0
- package/src/components/waka-radar-score/WakaRadarScore.stories.tsx +372 -0
- package/src/components/waka-rank-badge/WakaRankBadge.stories.tsx +108 -0
- package/src/components/waka-rating-input/WakaRatingInput.stories.tsx +51 -0
- package/src/components/waka-reaction-picker/WakaReactionPicker.stories.tsx +52 -0
- package/src/components/waka-region-map/WakaRegionMap.stories.tsx +181 -0
- package/src/components/waka-resource-gauge/WakaResourceGauge.stories.tsx +366 -0
- package/src/components/waka-resource-pool/WakaResourcePool.stories.tsx +70 -0
- package/src/components/waka-rich-text-editor/WakaRichTextEditor.stories.tsx +149 -0
- package/src/components/waka-rollback-slider/WakaRollbackSlider.stories.tsx +41 -0
- package/src/components/waka-sankey-diagram/WakaSankeyDiagram.stories.tsx +389 -0
- package/src/components/waka-schedule-picker/WakaSchedulePicker.stories.tsx +64 -0
- package/src/components/waka-scratch-card/WakaScratchCard.stories.tsx +388 -0
- package/src/components/waka-season-pass/WakaSeasonPass.stories.tsx +107 -0
- package/src/components/waka-secret-card/WakaSecretCard.stories.tsx +314 -0
- package/src/components/waka-security-scan-result/WakaSecurityScanResult.stories.tsx +146 -0
- package/src/components/waka-security-score/WakaSecurityScore.stories.tsx +63 -0
- package/src/components/waka-segmented-control/WakaSegmentedControl.stories.tsx +309 -0
- package/src/components/waka-server-rack/WakaServerRack.stories.tsx +382 -0
- package/src/components/waka-service-graph/WakaServiceGraph.stories.tsx +262 -0
- package/src/components/waka-session-manager/WakaSessionManager.stories.tsx +68 -0
- package/src/components/waka-signature-pad/WakaSignaturePad.stories.tsx +159 -0
- package/src/components/waka-signature-pad/index.tsx +5 -3
- package/src/components/waka-skeleton-wave/WakaSkeletonWave.stories.tsx +321 -0
- package/src/components/waka-skill-tree/WakaSkillTree.stories.tsx +308 -0
- package/src/components/waka-sla-tracker/WakaSlaTracker.stories.tsx +65 -0
- package/src/components/waka-slider-range/WakaSliderRange.stories.tsx +66 -0
- package/src/components/waka-spin-wheel/WakaSpinWheel.stories.tsx +368 -0
- package/src/components/waka-spinner/WakaSpinner.stories.tsx +156 -0
- package/src/components/waka-sponsored-badge/WakaSponsoredBadge.stories.tsx +60 -0
- package/src/components/waka-sponsored-card/WakaSponsoredCard.stories.tsx +64 -0
- package/src/components/waka-sponsored-feed/WakaSponsoredFeed.stories.tsx +58 -0
- package/src/components/waka-spotlight/WakaSpotlight.stories.tsx +53 -0
- package/src/components/waka-stat/WakaStat.stories.tsx +334 -0
- package/src/components/waka-stats-hexagon/WakaStatsHexagon.stories.tsx +161 -0
- package/src/components/waka-status-matrix/WakaStatusMatrix.stories.tsx +331 -0
- package/src/components/waka-stepper/WakaStepper.stories.tsx +195 -0
- package/src/components/waka-streak-counter/WakaStreakCounter.stories.tsx +235 -0
- package/src/components/waka-success-explosion/WakaSuccessExplosion.stories.tsx +389 -0
- package/src/components/waka-swipe-card/WakaSwipeCard.stories.tsx +51 -0
- package/src/components/waka-tabs-morph/WakaTabsMorph.stories.tsx +471 -0
- package/src/components/waka-tag-input/WakaTagInput.stories.tsx +224 -0
- package/src/components/waka-team-banner/WakaTeamBanner.stories.tsx +50 -0
- package/src/components/waka-terminal-output/WakaTerminalOutput.stories.tsx +351 -0
- package/src/components/waka-test-report/WakaTestReport.stories.tsx +322 -0
- package/src/components/waka-theme-creator/WakaThemeCreator.stories.tsx +58 -0
- package/src/components/waka-theme-manager/WakaThemeManager.stories.tsx +298 -0
- package/src/components/waka-theme-manager/index.tsx +6 -11
- package/src/components/waka-thread-view/WakaThreadView.stories.tsx +143 -0
- package/src/components/waka-tilt-card/WakaTiltCard.stories.tsx +300 -0
- package/src/components/waka-time-picker/WakaTimePicker.stories.tsx +227 -0
- package/src/components/waka-timeline/WakaTimeline.stories.tsx +230 -0
- package/src/components/waka-tooltip-tour/WakaTooltipTour.stories.tsx +92 -0
- package/src/components/waka-tour-guide/WakaTourGuide.stories.tsx +89 -0
- package/src/components/waka-tournament-bracket/WakaTournamentBracket.stories.tsx +375 -0
- package/src/components/waka-trace-viewer/WakaTraceViewer.stories.tsx +445 -0
- package/src/components/waka-tree/WakaTree.stories.tsx +359 -0
- package/src/components/waka-treemap-chart/WakaTreemapChart.stories.tsx +483 -0
- package/src/components/waka-treemap-chart/index.tsx +2 -2
- package/src/components/waka-two-factor-setup/WakaTwoFactorSetup.stories.tsx +142 -0
- package/src/components/waka-typewriter/WakaTypewriter.stories.tsx +366 -0
- package/src/components/waka-typing-indicator/WakaTypingIndicator.stories.tsx +134 -0
- package/src/components/waka-versus-card/WakaVersusCard.stories.tsx +530 -0
- package/src/components/waka-video/WakaVideo.stories.tsx +203 -0
- package/src/components/waka-video-ad/WakaVideoAd.stories.tsx +138 -0
- package/src/components/waka-video-call/WakaVideoCall.stories.tsx +186 -0
- package/src/components/waka-video-overlay/WakaVideoOverlay.stories.tsx +100 -0
- package/src/components/waka-virtual-list/WakaVirtualList.stories.tsx +273 -0
- package/src/components/waka-voice-message/WakaVoiceMessage.stories.tsx +190 -0
- package/src/components/waka-welcome-modal/WakaWelcomeModal.stories.tsx +87 -0
- package/src/components/waka-xp-bar/WakaXPBar.stories.tsx +305 -0
- package/dist/useDataTableImport-D8R2HQl6.mjs +0 -229
- package/dist/useDataTableImport-S_hhA5Wo.js +0 -9
- package/src/components/DataTable/README.md +0 -446
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { WakaContributionGraph } from './index'
|
|
3
|
+
import type { ContributionDay } from './index'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
|
|
6
|
+
// Generate sample contribution data for the past year
|
|
7
|
+
function generateContributionData(days: number = 365): ContributionDay[] {
|
|
8
|
+
const data: ContributionDay[] = []
|
|
9
|
+
const today = new Date()
|
|
10
|
+
|
|
11
|
+
for (let i = days - 1; i >= 0; i--) {
|
|
12
|
+
const date = new Date(today)
|
|
13
|
+
date.setDate(date.getDate() - i)
|
|
14
|
+
|
|
15
|
+
// Generate realistic pattern: more activity on weekdays, less on weekends
|
|
16
|
+
const dayOfWeek = date.getDay()
|
|
17
|
+
const isWeekend = dayOfWeek === 0 || dayOfWeek === 6
|
|
18
|
+
const baseChance = isWeekend ? 0.3 : 0.7
|
|
19
|
+
|
|
20
|
+
let count = 0
|
|
21
|
+
if (Math.random() < baseChance) {
|
|
22
|
+
// Generate contribution count with some variation
|
|
23
|
+
const max = isWeekend ? 5 : 15
|
|
24
|
+
count = Math.floor(Math.random() * max)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
data.push({
|
|
28
|
+
date: date.toISOString().split('T')[0],
|
|
29
|
+
count,
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return data
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// High activity data
|
|
37
|
+
function generateHighActivityData(): ContributionDay[] {
|
|
38
|
+
const data: ContributionDay[] = []
|
|
39
|
+
const today = new Date()
|
|
40
|
+
|
|
41
|
+
for (let i = 364; i >= 0; i--) {
|
|
42
|
+
const date = new Date(today)
|
|
43
|
+
date.setDate(date.getDate() - i)
|
|
44
|
+
|
|
45
|
+
data.push({
|
|
46
|
+
date: date.toISOString().split('T')[0],
|
|
47
|
+
count: Math.floor(Math.random() * 20) + 5,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return data
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Sparse data
|
|
55
|
+
function generateSparseData(): ContributionDay[] {
|
|
56
|
+
const data: ContributionDay[] = []
|
|
57
|
+
const today = new Date()
|
|
58
|
+
|
|
59
|
+
for (let i = 364; i >= 0; i--) {
|
|
60
|
+
const date = new Date(today)
|
|
61
|
+
date.setDate(date.getDate() - i)
|
|
62
|
+
|
|
63
|
+
data.push({
|
|
64
|
+
date: date.toISOString().split('T')[0],
|
|
65
|
+
count: Math.random() < 0.2 ? Math.floor(Math.random() * 5) : 0,
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return data
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const defaultData = generateContributionData()
|
|
73
|
+
const highActivityData = generateHighActivityData()
|
|
74
|
+
const sparseData = generateSparseData()
|
|
75
|
+
|
|
76
|
+
const meta: Meta<typeof WakaContributionGraph> = {
|
|
77
|
+
title: 'Components/Charts/WakaContributionGraph',
|
|
78
|
+
component: WakaContributionGraph,
|
|
79
|
+
parameters: {
|
|
80
|
+
layout: 'centered',
|
|
81
|
+
docs: {
|
|
82
|
+
description: {
|
|
83
|
+
component: 'A GitHub-style contribution graph showing activity over time with customizable colors and tooltips.',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
tags: ['autodocs'],
|
|
88
|
+
argTypes: {
|
|
89
|
+
colorScheme: {
|
|
90
|
+
control: 'select',
|
|
91
|
+
options: ['green', 'blue', 'purple', 'orange', 'pink'],
|
|
92
|
+
description: 'Color scheme for cells',
|
|
93
|
+
},
|
|
94
|
+
cellSize: {
|
|
95
|
+
control: { type: 'range', min: 8, max: 16, step: 1 },
|
|
96
|
+
description: 'Size of each cell',
|
|
97
|
+
},
|
|
98
|
+
cellGap: {
|
|
99
|
+
control: { type: 'range', min: 1, max: 4, step: 1 },
|
|
100
|
+
description: 'Gap between cells',
|
|
101
|
+
},
|
|
102
|
+
showMonthLabels: {
|
|
103
|
+
control: 'boolean',
|
|
104
|
+
description: 'Show month labels',
|
|
105
|
+
},
|
|
106
|
+
showDayLabels: {
|
|
107
|
+
control: 'boolean',
|
|
108
|
+
description: 'Show day of week labels',
|
|
109
|
+
},
|
|
110
|
+
showTooltip: {
|
|
111
|
+
control: 'boolean',
|
|
112
|
+
description: 'Show tooltip on hover',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default meta
|
|
118
|
+
type Story = StoryObj<typeof WakaContributionGraph>
|
|
119
|
+
|
|
120
|
+
export const Default: Story = {
|
|
121
|
+
args: {
|
|
122
|
+
data: defaultData,
|
|
123
|
+
colorScheme: 'green',
|
|
124
|
+
cellSize: 12,
|
|
125
|
+
cellGap: 2,
|
|
126
|
+
showMonthLabels: true,
|
|
127
|
+
showDayLabels: true,
|
|
128
|
+
showTooltip: true,
|
|
129
|
+
},
|
|
130
|
+
render: (args) => <WakaContributionGraph {...args} />,
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const ColorSchemes: Story = {
|
|
134
|
+
render: () => (
|
|
135
|
+
<div className="space-y-6">
|
|
136
|
+
<div>
|
|
137
|
+
<p className="text-sm text-muted-foreground mb-2">Green (Default)</p>
|
|
138
|
+
<WakaContributionGraph data={defaultData} colorScheme="green" />
|
|
139
|
+
</div>
|
|
140
|
+
<div>
|
|
141
|
+
<p className="text-sm text-muted-foreground mb-2">Blue</p>
|
|
142
|
+
<WakaContributionGraph data={defaultData} colorScheme="blue" />
|
|
143
|
+
</div>
|
|
144
|
+
<div>
|
|
145
|
+
<p className="text-sm text-muted-foreground mb-2">Purple</p>
|
|
146
|
+
<WakaContributionGraph data={defaultData} colorScheme="purple" />
|
|
147
|
+
</div>
|
|
148
|
+
<div>
|
|
149
|
+
<p className="text-sm text-muted-foreground mb-2">Orange</p>
|
|
150
|
+
<WakaContributionGraph data={defaultData} colorScheme="orange" />
|
|
151
|
+
</div>
|
|
152
|
+
<div>
|
|
153
|
+
<p className="text-sm text-muted-foreground mb-2">Pink</p>
|
|
154
|
+
<WakaContributionGraph data={defaultData} colorScheme="pink" />
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
),
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export const CellSizes: Story = {
|
|
161
|
+
render: () => (
|
|
162
|
+
<div className="space-y-6">
|
|
163
|
+
<div>
|
|
164
|
+
<p className="text-sm text-muted-foreground mb-2">Small (8px)</p>
|
|
165
|
+
<WakaContributionGraph data={defaultData} cellSize={8} cellGap={1} />
|
|
166
|
+
</div>
|
|
167
|
+
<div>
|
|
168
|
+
<p className="text-sm text-muted-foreground mb-2">Medium (11px - Default)</p>
|
|
169
|
+
<WakaContributionGraph data={defaultData} cellSize={11} cellGap={2} />
|
|
170
|
+
</div>
|
|
171
|
+
<div>
|
|
172
|
+
<p className="text-sm text-muted-foreground mb-2">Large (14px)</p>
|
|
173
|
+
<WakaContributionGraph data={defaultData} cellSize={14} cellGap={3} />
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
),
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export const HighActivity: Story = {
|
|
180
|
+
render: () => (
|
|
181
|
+
<div className="space-y-2">
|
|
182
|
+
<p className="text-sm text-muted-foreground">Highly active contributor</p>
|
|
183
|
+
<WakaContributionGraph data={highActivityData} />
|
|
184
|
+
</div>
|
|
185
|
+
),
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export const SparseActivity: Story = {
|
|
189
|
+
render: () => (
|
|
190
|
+
<div className="space-y-2">
|
|
191
|
+
<p className="text-sm text-muted-foreground">Occasional contributor</p>
|
|
192
|
+
<WakaContributionGraph data={sparseData} />
|
|
193
|
+
</div>
|
|
194
|
+
),
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export const WithoutLabels: Story = {
|
|
198
|
+
render: () => (
|
|
199
|
+
<div className="space-y-6">
|
|
200
|
+
<div>
|
|
201
|
+
<p className="text-sm text-muted-foreground mb-2">No month labels</p>
|
|
202
|
+
<WakaContributionGraph data={defaultData} showMonthLabels={false} />
|
|
203
|
+
</div>
|
|
204
|
+
<div>
|
|
205
|
+
<p className="text-sm text-muted-foreground mb-2">No day labels</p>
|
|
206
|
+
<WakaContributionGraph data={defaultData} showDayLabels={false} />
|
|
207
|
+
</div>
|
|
208
|
+
<div>
|
|
209
|
+
<p className="text-sm text-muted-foreground mb-2">No labels</p>
|
|
210
|
+
<WakaContributionGraph data={defaultData} showMonthLabels={false} showDayLabels={false} />
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
),
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export const NoTooltip: Story = {
|
|
217
|
+
render: () => <WakaContributionGraph data={defaultData} showTooltip={false} />,
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export const CustomColors: Story = {
|
|
221
|
+
render: () => (
|
|
222
|
+
<WakaContributionGraph
|
|
223
|
+
data={defaultData}
|
|
224
|
+
colors={['#fef3c7', '#fcd34d', '#f59e0b', '#d97706', '#92400e']}
|
|
225
|
+
/>
|
|
226
|
+
),
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export const Interactive: Story = {
|
|
230
|
+
render: () => {
|
|
231
|
+
const [selectedDay, setSelectedDay] = React.useState<ContributionDay | null>(null)
|
|
232
|
+
|
|
233
|
+
return (
|
|
234
|
+
<div className="space-y-4">
|
|
235
|
+
<WakaContributionGraph
|
|
236
|
+
data={defaultData}
|
|
237
|
+
onDayClick={(day) => setSelectedDay(day)}
|
|
238
|
+
/>
|
|
239
|
+
{selectedDay && (
|
|
240
|
+
<div className="p-4 border rounded-lg bg-muted/50">
|
|
241
|
+
<p className="text-sm text-muted-foreground">{selectedDay.date}</p>
|
|
242
|
+
<p className="text-2xl font-bold">
|
|
243
|
+
{selectedDay.count} contribution{selectedDay.count !== 1 ? 's' : ''}
|
|
244
|
+
</p>
|
|
245
|
+
</div>
|
|
246
|
+
)}
|
|
247
|
+
</div>
|
|
248
|
+
)
|
|
249
|
+
},
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export const GitHubProfile: Story = {
|
|
253
|
+
render: () => {
|
|
254
|
+
const stats = {
|
|
255
|
+
total: defaultData.reduce((sum, d) => sum + d.count, 0),
|
|
256
|
+
activeDays: defaultData.filter((d) => d.count > 0).length,
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return (
|
|
260
|
+
<div className="w-[900px] p-6 border rounded-lg">
|
|
261
|
+
<div className="flex items-center gap-4 mb-6">
|
|
262
|
+
<div className="w-16 h-16 rounded-full bg-gradient-to-br from-violet-500 to-purple-600" />
|
|
263
|
+
<div>
|
|
264
|
+
<h3 className="text-xl font-bold">developer_jane</h3>
|
|
265
|
+
<p className="text-sm text-muted-foreground">
|
|
266
|
+
{stats.total} contributions in the last year
|
|
267
|
+
</p>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
<WakaContributionGraph data={defaultData} />
|
|
271
|
+
<div className="flex items-center justify-end gap-2 mt-4 text-xs text-muted-foreground">
|
|
272
|
+
<span>Less</span>
|
|
273
|
+
<div className="flex gap-1">
|
|
274
|
+
{['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39'].map((color) => (
|
|
275
|
+
<div
|
|
276
|
+
key={color}
|
|
277
|
+
className="w-3 h-3 rounded-sm"
|
|
278
|
+
style={{ backgroundColor: color }}
|
|
279
|
+
/>
|
|
280
|
+
))}
|
|
281
|
+
</div>
|
|
282
|
+
<span>More</span>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
)
|
|
286
|
+
},
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export const CompactWidget: Story = {
|
|
290
|
+
render: () => {
|
|
291
|
+
// Last 3 months only
|
|
292
|
+
const recentData = defaultData.slice(-90)
|
|
293
|
+
|
|
294
|
+
return (
|
|
295
|
+
<div className="p-4 border rounded-lg w-fit">
|
|
296
|
+
<h4 className="text-sm font-medium mb-2">Recent Activity</h4>
|
|
297
|
+
<WakaContributionGraph
|
|
298
|
+
data={recentData}
|
|
299
|
+
cellSize={10}
|
|
300
|
+
cellGap={2}
|
|
301
|
+
showMonthLabels={false}
|
|
302
|
+
showDayLabels={false}
|
|
303
|
+
/>
|
|
304
|
+
</div>
|
|
305
|
+
)
|
|
306
|
+
},
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export const MultipleUsers: Story = {
|
|
310
|
+
render: () => (
|
|
311
|
+
<div className="space-y-8">
|
|
312
|
+
<div>
|
|
313
|
+
<div className="flex items-center gap-2 mb-2">
|
|
314
|
+
<div className="w-6 h-6 rounded-full bg-blue-500" />
|
|
315
|
+
<span className="font-medium">alice</span>
|
|
316
|
+
<span className="text-sm text-muted-foreground">2,847 contributions</span>
|
|
317
|
+
</div>
|
|
318
|
+
<WakaContributionGraph data={highActivityData} colorScheme="blue" cellSize={9} />
|
|
319
|
+
</div>
|
|
320
|
+
<div>
|
|
321
|
+
<div className="flex items-center gap-2 mb-2">
|
|
322
|
+
<div className="w-6 h-6 rounded-full bg-green-500" />
|
|
323
|
+
<span className="font-medium">bob</span>
|
|
324
|
+
<span className="text-sm text-muted-foreground">1,234 contributions</span>
|
|
325
|
+
</div>
|
|
326
|
+
<WakaContributionGraph data={defaultData} colorScheme="green" cellSize={9} />
|
|
327
|
+
</div>
|
|
328
|
+
<div>
|
|
329
|
+
<div className="flex items-center gap-2 mb-2">
|
|
330
|
+
<div className="w-6 h-6 rounded-full bg-purple-500" />
|
|
331
|
+
<span className="font-medium">carol</span>
|
|
332
|
+
<span className="text-sm text-muted-foreground">342 contributions</span>
|
|
333
|
+
</div>
|
|
334
|
+
<WakaContributionGraph data={sparseData} colorScheme="purple" cellSize={9} />
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
),
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export const CustomTooltip: Story = {
|
|
341
|
+
render: () => (
|
|
342
|
+
<WakaContributionGraph
|
|
343
|
+
data={defaultData}
|
|
344
|
+
tooltipFormatter={(day) =>
|
|
345
|
+
`${day.count} commit${day.count !== 1 ? 's' : ''} on ${new Date(day.date).toLocaleDateString('en-US', {
|
|
346
|
+
weekday: 'long',
|
|
347
|
+
year: 'numeric',
|
|
348
|
+
month: 'long',
|
|
349
|
+
day: 'numeric',
|
|
350
|
+
})}`
|
|
351
|
+
}
|
|
352
|
+
/>
|
|
353
|
+
),
|
|
354
|
+
}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { WakaCostBreakdown, useCostBreakdown } from './index'
|
|
3
|
+
import type { CostItem } from './index'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
|
|
6
|
+
const cloudCostData: CostItem[] = [
|
|
7
|
+
{
|
|
8
|
+
id: 'compute',
|
|
9
|
+
name: 'Compute',
|
|
10
|
+
value: 0,
|
|
11
|
+
change: 12.5,
|
|
12
|
+
children: [
|
|
13
|
+
{ id: 'ec2', name: 'EC2 Instances', value: 4500, change: 8.2 },
|
|
14
|
+
{ id: 'lambda', name: 'Lambda', value: 1200, change: 25.0 },
|
|
15
|
+
{ id: 'ecs', name: 'ECS/Fargate', value: 2300, change: -5.0 },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 'storage',
|
|
20
|
+
name: 'Storage',
|
|
21
|
+
value: 0,
|
|
22
|
+
change: -3.2,
|
|
23
|
+
children: [
|
|
24
|
+
{ id: 's3', name: 'S3', value: 2000, change: 2.0 },
|
|
25
|
+
{ id: 'ebs', name: 'EBS Volumes', value: 1500, change: -8.0 },
|
|
26
|
+
{ id: 'glacier', name: 'Glacier', value: 300, change: 0 },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'database',
|
|
31
|
+
name: 'Database',
|
|
32
|
+
value: 0,
|
|
33
|
+
change: 5.8,
|
|
34
|
+
children: [
|
|
35
|
+
{ id: 'rds', name: 'RDS', value: 3200, change: 10.0 },
|
|
36
|
+
{ id: 'dynamodb', name: 'DynamoDB', value: 800, change: -2.0 },
|
|
37
|
+
{ id: 'elasticache', name: 'ElastiCache', value: 600, change: 15.0 },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'network',
|
|
42
|
+
name: 'Network',
|
|
43
|
+
value: 0,
|
|
44
|
+
change: 18.0,
|
|
45
|
+
children: [
|
|
46
|
+
{ id: 'data-transfer', name: 'Data Transfer', value: 1800, change: 20.0 },
|
|
47
|
+
{ id: 'cloudfront', name: 'CloudFront', value: 900, change: 15.0 },
|
|
48
|
+
{ id: 'route53', name: 'Route 53', value: 100, change: 0 },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{ id: 'other', name: 'Other Services', value: 1200, change: 5.0 },
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
const departmentBudgetData: CostItem[] = [
|
|
55
|
+
{
|
|
56
|
+
id: 'engineering',
|
|
57
|
+
name: 'Engineering',
|
|
58
|
+
value: 0,
|
|
59
|
+
color: '#3b82f6',
|
|
60
|
+
children: [
|
|
61
|
+
{ id: 'salaries-eng', name: 'Salaries', value: 450000 },
|
|
62
|
+
{ id: 'tools-eng', name: 'Tools & Licenses', value: 35000 },
|
|
63
|
+
{ id: 'infra', name: 'Infrastructure', value: 80000 },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'marketing',
|
|
68
|
+
name: 'Marketing',
|
|
69
|
+
value: 0,
|
|
70
|
+
color: '#22c55e',
|
|
71
|
+
children: [
|
|
72
|
+
{ id: 'salaries-mkt', name: 'Salaries', value: 180000 },
|
|
73
|
+
{ id: 'ads', name: 'Advertising', value: 120000 },
|
|
74
|
+
{ id: 'events', name: 'Events', value: 50000 },
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 'sales',
|
|
79
|
+
name: 'Sales',
|
|
80
|
+
value: 0,
|
|
81
|
+
color: '#f59e0b',
|
|
82
|
+
children: [
|
|
83
|
+
{ id: 'salaries-sales', name: 'Salaries', value: 320000 },
|
|
84
|
+
{ id: 'commissions', name: 'Commissions', value: 95000 },
|
|
85
|
+
{ id: 'travel', name: 'Travel', value: 45000 },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'operations',
|
|
90
|
+
name: 'Operations',
|
|
91
|
+
value: 0,
|
|
92
|
+
color: '#8b5cf6',
|
|
93
|
+
children: [
|
|
94
|
+
{ id: 'salaries-ops', name: 'Salaries', value: 150000 },
|
|
95
|
+
{ id: 'facilities', name: 'Facilities', value: 80000 },
|
|
96
|
+
{ id: 'legal', name: 'Legal & Compliance', value: 40000 },
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
const simpleData: CostItem[] = [
|
|
102
|
+
{ id: 'rent', name: 'Rent', value: 2500 },
|
|
103
|
+
{ id: 'utilities', name: 'Utilities', value: 350 },
|
|
104
|
+
{ id: 'groceries', name: 'Groceries', value: 600 },
|
|
105
|
+
{ id: 'transport', name: 'Transport', value: 400 },
|
|
106
|
+
{ id: 'entertainment', name: 'Entertainment', value: 250 },
|
|
107
|
+
{ id: 'savings', name: 'Savings', value: 800 },
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
const meta: Meta<typeof WakaCostBreakdown> = {
|
|
111
|
+
title: 'Components/Charts/WakaCostBreakdown',
|
|
112
|
+
component: WakaCostBreakdown,
|
|
113
|
+
parameters: {
|
|
114
|
+
layout: 'centered',
|
|
115
|
+
docs: {
|
|
116
|
+
description: {
|
|
117
|
+
component: 'A cost breakdown visualization with treemap and sunburst variants, drill-down navigation, and comparison indicators.',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
tags: ['autodocs'],
|
|
122
|
+
argTypes: {
|
|
123
|
+
variant: {
|
|
124
|
+
control: 'select',
|
|
125
|
+
options: ['treemap', 'sunburst'],
|
|
126
|
+
description: 'Visualization variant',
|
|
127
|
+
},
|
|
128
|
+
currency: {
|
|
129
|
+
control: 'text',
|
|
130
|
+
description: 'Currency symbol',
|
|
131
|
+
},
|
|
132
|
+
showLegend: {
|
|
133
|
+
control: 'boolean',
|
|
134
|
+
description: 'Show legend sidebar',
|
|
135
|
+
},
|
|
136
|
+
showComparison: {
|
|
137
|
+
control: 'boolean',
|
|
138
|
+
description: 'Show comparison indicators',
|
|
139
|
+
},
|
|
140
|
+
animated: {
|
|
141
|
+
control: 'boolean',
|
|
142
|
+
description: 'Enable animations',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export default meta
|
|
148
|
+
type Story = StoryObj<typeof WakaCostBreakdown>
|
|
149
|
+
|
|
150
|
+
export const Default: Story = {
|
|
151
|
+
args: {
|
|
152
|
+
data: cloudCostData,
|
|
153
|
+
currency: '$',
|
|
154
|
+
},
|
|
155
|
+
render: (args) => <WakaCostBreakdown {...args} />,
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export const TreemapVariant: Story = {
|
|
159
|
+
render: () => (
|
|
160
|
+
<WakaCostBreakdown
|
|
161
|
+
data={departmentBudgetData}
|
|
162
|
+
variant="treemap"
|
|
163
|
+
currency="$"
|
|
164
|
+
/>
|
|
165
|
+
),
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export const SunburstVariant: Story = {
|
|
169
|
+
render: () => (
|
|
170
|
+
<WakaCostBreakdown
|
|
171
|
+
data={departmentBudgetData}
|
|
172
|
+
variant="sunburst"
|
|
173
|
+
currency="$"
|
|
174
|
+
/>
|
|
175
|
+
),
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export const WithComparison: Story = {
|
|
179
|
+
render: () => (
|
|
180
|
+
<WakaCostBreakdown
|
|
181
|
+
data={cloudCostData}
|
|
182
|
+
showComparison
|
|
183
|
+
currency="$"
|
|
184
|
+
/>
|
|
185
|
+
),
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export const SimpleData: Story = {
|
|
189
|
+
render: () => (
|
|
190
|
+
<WakaCostBreakdown
|
|
191
|
+
data={simpleData}
|
|
192
|
+
currency="$"
|
|
193
|
+
showComparison={false}
|
|
194
|
+
/>
|
|
195
|
+
),
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export const NoLegend: Story = {
|
|
199
|
+
render: () => (
|
|
200
|
+
<WakaCostBreakdown
|
|
201
|
+
data={cloudCostData}
|
|
202
|
+
showLegend={false}
|
|
203
|
+
currency="$"
|
|
204
|
+
/>
|
|
205
|
+
),
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export const DrillDownExample: Story = {
|
|
209
|
+
render: () => (
|
|
210
|
+
<div className="space-y-4">
|
|
211
|
+
<p className="text-sm text-muted-foreground text-center">
|
|
212
|
+
Click on a category to drill down into its subcategories
|
|
213
|
+
</p>
|
|
214
|
+
<WakaCostBreakdown
|
|
215
|
+
data={cloudCostData}
|
|
216
|
+
currency="$"
|
|
217
|
+
showComparison
|
|
218
|
+
onItemClick={(id, path) => console.log('Clicked:', id, 'Path:', path)}
|
|
219
|
+
/>
|
|
220
|
+
</div>
|
|
221
|
+
),
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export const CustomFormatter: Story = {
|
|
225
|
+
render: () => (
|
|
226
|
+
<WakaCostBreakdown
|
|
227
|
+
data={cloudCostData}
|
|
228
|
+
currency=""
|
|
229
|
+
formatValue={(value) => {
|
|
230
|
+
if (value >= 1000) {
|
|
231
|
+
return `${(value / 1000).toFixed(1)}K USD`
|
|
232
|
+
}
|
|
233
|
+
return `${value} USD`
|
|
234
|
+
}}
|
|
235
|
+
/>
|
|
236
|
+
),
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export const WithHook: Story = {
|
|
240
|
+
render: () => {
|
|
241
|
+
const { path, drillDown, drillUp, reset, getCurrentData } = useCostBreakdown({
|
|
242
|
+
data: cloudCostData,
|
|
243
|
+
onDrillDown: (path) => console.log('Drill down:', path),
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
const currentData = getCurrentData()
|
|
247
|
+
|
|
248
|
+
return (
|
|
249
|
+
<div className="space-y-4">
|
|
250
|
+
<div className="flex gap-2 items-center">
|
|
251
|
+
<button
|
|
252
|
+
onClick={drillUp}
|
|
253
|
+
disabled={path.length === 0}
|
|
254
|
+
className="px-3 py-1 text-sm border rounded hover:bg-muted disabled:opacity-50"
|
|
255
|
+
>
|
|
256
|
+
Back
|
|
257
|
+
</button>
|
|
258
|
+
<button
|
|
259
|
+
onClick={reset}
|
|
260
|
+
className="px-3 py-1 text-sm border rounded hover:bg-muted"
|
|
261
|
+
>
|
|
262
|
+
Reset
|
|
263
|
+
</button>
|
|
264
|
+
<span className="text-sm text-muted-foreground">
|
|
265
|
+
Path: {path.length === 0 ? 'Root' : path.join(' / ')}
|
|
266
|
+
</span>
|
|
267
|
+
</div>
|
|
268
|
+
<WakaCostBreakdown
|
|
269
|
+
data={cloudCostData}
|
|
270
|
+
currency="$"
|
|
271
|
+
/>
|
|
272
|
+
</div>
|
|
273
|
+
)
|
|
274
|
+
},
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export const CloudCostDashboard: Story = {
|
|
278
|
+
render: () => (
|
|
279
|
+
<div className="w-[750px] p-6 border rounded-lg">
|
|
280
|
+
<div className="flex justify-between items-start mb-6">
|
|
281
|
+
<div>
|
|
282
|
+
<h3 className="text-xl font-semibold">Cloud Cost Analysis</h3>
|
|
283
|
+
<p className="text-sm text-muted-foreground">December 2024</p>
|
|
284
|
+
</div>
|
|
285
|
+
<div className="text-right">
|
|
286
|
+
<p className="text-sm text-muted-foreground">Month-over-Month</p>
|
|
287
|
+
<p className="text-lg font-semibold text-red-600">+8.5%</p>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
<WakaCostBreakdown
|
|
291
|
+
data={cloudCostData}
|
|
292
|
+
currency="$"
|
|
293
|
+
showComparison
|
|
294
|
+
/>
|
|
295
|
+
</div>
|
|
296
|
+
),
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export const DepartmentBudgetDashboard: Story = {
|
|
300
|
+
render: () => (
|
|
301
|
+
<div className="w-[750px] p-6 border rounded-lg">
|
|
302
|
+
<div className="mb-6">
|
|
303
|
+
<h3 className="text-xl font-semibold">Department Budget Allocation</h3>
|
|
304
|
+
<p className="text-sm text-muted-foreground">Fiscal Year 2024</p>
|
|
305
|
+
</div>
|
|
306
|
+
<WakaCostBreakdown
|
|
307
|
+
data={departmentBudgetData}
|
|
308
|
+
variant="sunburst"
|
|
309
|
+
currency="$"
|
|
310
|
+
/>
|
|
311
|
+
</div>
|
|
312
|
+
),
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export const ComparisonVariants: Story = {
|
|
316
|
+
render: () => (
|
|
317
|
+
<div className="space-y-8">
|
|
318
|
+
<div>
|
|
319
|
+
<h4 className="text-sm font-medium mb-2">Treemap View</h4>
|
|
320
|
+
<WakaCostBreakdown
|
|
321
|
+
data={simpleData}
|
|
322
|
+
variant="treemap"
|
|
323
|
+
currency="$"
|
|
324
|
+
showLegend={false}
|
|
325
|
+
/>
|
|
326
|
+
</div>
|
|
327
|
+
<div>
|
|
328
|
+
<h4 className="text-sm font-medium mb-2">Sunburst View</h4>
|
|
329
|
+
<WakaCostBreakdown
|
|
330
|
+
data={simpleData}
|
|
331
|
+
variant="sunburst"
|
|
332
|
+
currency="$"
|
|
333
|
+
showLegend={false}
|
|
334
|
+
/>
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
),
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export const NoAnimation: Story = {
|
|
341
|
+
render: () => (
|
|
342
|
+
<WakaCostBreakdown
|
|
343
|
+
data={cloudCostData}
|
|
344
|
+
animated={false}
|
|
345
|
+
currency="$"
|
|
346
|
+
/>
|
|
347
|
+
),
|
|
348
|
+
}
|