@wakastellar/ui 2.4.0 → 3.1.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.stories.d.ts +1 -1
- package/dist/stories/Header.stories.d.ts +1 -1
- package/dist/stories/Page.stories.d.ts +1 -1
- 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 +6 -5
- package/src/blocks/antivirus-dashboard/AntivirusDashboard.stories.tsx +291 -0
- package/src/blocks/antivirus-dashboard/index.tsx +525 -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/file-scan-uploader/FileScanUploader.stories.tsx +257 -0
- package/src/blocks/file-scan-uploader/index.tsx +311 -0
- package/src/blocks/index.ts +163 -11
- package/src/blocks/quarantine-manager/QuarantineManager.stories.tsx +209 -0
- package/src/blocks/quarantine-manager/index.tsx +435 -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/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/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/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/error-boundary/ErrorBoundary.stories.tsx +125 -0
- package/src/components/index.ts +45 -4
- package/src/components/language-selector/LanguageSelector.stories.tsx +112 -0
- package/src/components/theme-selector/ThemeSelector.stories.tsx +77 -0
- package/src/components/toaster/Toaster.stories.tsx +67 -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-audit-log/WakaAuditLog.stories.tsx +73 -0
- package/src/components/waka-autocomplete/WakaAutocomplete.stories.tsx +132 -172
- package/src/components/waka-biometric-prompt/WakaBiometricPrompt.stories.tsx +48 -0
- package/src/components/waka-breadcrumb/WakaBreadcrumb.stories.tsx +74 -191
- 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-capacity-planner/WakaCapacityPlanner.stories.tsx +273 -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-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 +99 -155
- package/src/components/waka-combo-counter/WakaComboCounter.stories.tsx +128 -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-content-recommendation/WakaContentRecommendation.stories.tsx +41 -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-datetime-picker.form-integration/WakaDateTimePickerForm.stories.tsx +79 -0
- package/src/components/waka-dependency-tree/WakaDependencyTree.stories.tsx +72 -0
- package/src/components/waka-device-trust/WakaDeviceTrust.stories.tsx +109 -0
- package/src/components/waka-empty-state/WakaEmptyState.stories.tsx +87 -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 +118 -174
- package/src/components/waka-floating-nav/WakaFloatingNav.stories.tsx +53 -0
- package/src/components/waka-goal-progress/WakaGoalProgress.stories.tsx +137 -0
- package/src/components/waka-hotspot/WakaHotspot.stories.tsx +56 -0
- package/src/components/waka-invoice-preview/WakaInvoicePreview.stories.tsx +169 -0
- package/src/components/waka-kpi-dashboard/WakaKpiDashboard.stories.tsx +46 -0
- package/src/components/waka-level-progress/WakaLevelProgress.stories.tsx +94 -75
- package/src/components/waka-liquid-button/WakaLiquidButton.stories.tsx +45 -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-milestone-road/WakaMilestoneRoad.stories.tsx +143 -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 +110 -280
- package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +132 -268
- 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-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-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-pool/WakaResourcePool.stories.tsx +70 -0
- package/src/components/waka-rich-text-editor/WakaRichTextEditor.stories.tsx +108 -197
- package/src/components/waka-rollback-slider/WakaRollbackSlider.stories.tsx +41 -0
- package/src/components/waka-schedule-picker/WakaSchedulePicker.stories.tsx +64 -0
- package/src/components/waka-season-pass/WakaSeasonPass.stories.tsx +107 -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-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-sla-tracker/WakaSlaTracker.stories.tsx +65 -0
- package/src/components/waka-slider-range/WakaSliderRange.stories.tsx +66 -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-stats-hexagon/WakaStatsHexagon.stories.tsx +161 -0
- package/src/components/waka-stepper/WakaStepper.stories.tsx +137 -410
- package/src/components/waka-swipe-card/WakaSwipeCard.stories.tsx +51 -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-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-timeline/WakaTimeline.stories.tsx +171 -324
- 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-treemap-chart/WakaTreemapChart.stories.tsx +234 -129
- 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-typing-indicator/WakaTypingIndicator.stories.tsx +134 -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-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 +29 -29
- 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,202 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaProductCard, type ProductImage, type ColorVariant, type SizeVariant } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaProductCard> = {
|
|
5
|
+
title: "E-commerce/WakaProductCard",
|
|
6
|
+
component: WakaProductCard,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
name: {
|
|
13
|
+
control: "text",
|
|
14
|
+
description: "Nom du produit",
|
|
15
|
+
},
|
|
16
|
+
price: {
|
|
17
|
+
control: "number",
|
|
18
|
+
description: "Prix du produit",
|
|
19
|
+
},
|
|
20
|
+
originalPrice: {
|
|
21
|
+
control: "number",
|
|
22
|
+
description: "Prix original (barré)",
|
|
23
|
+
},
|
|
24
|
+
rating: {
|
|
25
|
+
control: { type: "number", min: 0, max: 5, step: 0.1 },
|
|
26
|
+
description: "Note du produit",
|
|
27
|
+
},
|
|
28
|
+
reviewCount: {
|
|
29
|
+
control: "number",
|
|
30
|
+
description: "Nombre d'avis",
|
|
31
|
+
},
|
|
32
|
+
isNew: {
|
|
33
|
+
control: "boolean",
|
|
34
|
+
description: "Badge Nouveau",
|
|
35
|
+
},
|
|
36
|
+
isSale: {
|
|
37
|
+
control: "boolean",
|
|
38
|
+
description: "Badge Promo",
|
|
39
|
+
},
|
|
40
|
+
isFavorite: {
|
|
41
|
+
control: "boolean",
|
|
42
|
+
description: "Dans les favoris",
|
|
43
|
+
},
|
|
44
|
+
inStock: {
|
|
45
|
+
control: "boolean",
|
|
46
|
+
description: "En stock",
|
|
47
|
+
},
|
|
48
|
+
showQuickView: {
|
|
49
|
+
control: "boolean",
|
|
50
|
+
description: "Afficher bouton aperçu",
|
|
51
|
+
},
|
|
52
|
+
showAddToCart: {
|
|
53
|
+
control: "boolean",
|
|
54
|
+
description: "Afficher bouton panier",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default meta
|
|
60
|
+
type Story = StoryObj<typeof WakaProductCard>
|
|
61
|
+
|
|
62
|
+
const images: ProductImage[] = [
|
|
63
|
+
{ src: "https://picsum.photos/seed/prod1/400/400", alt: "Vue principale" },
|
|
64
|
+
{ src: "https://picsum.photos/seed/prod2/400/400", alt: "Vue côté" },
|
|
65
|
+
{ src: "https://picsum.photos/seed/prod3/400/400", alt: "Vue détail" },
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
const colors: ColorVariant[] = [
|
|
69
|
+
{ id: "black", label: "Noir", value: "black", color: "#000000" },
|
|
70
|
+
{ id: "white", label: "Blanc", value: "white", color: "#ffffff" },
|
|
71
|
+
{ id: "blue", label: "Bleu", value: "blue", color: "#3b82f6" },
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
const sizes: SizeVariant[] = [
|
|
75
|
+
{ id: "s", label: "S", value: "s" },
|
|
76
|
+
{ id: "m", label: "M", value: "m" },
|
|
77
|
+
{ id: "l", label: "L", value: "l" },
|
|
78
|
+
{ id: "xl", label: "XL", value: "xl", available: false },
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
export const Default: Story = {
|
|
82
|
+
args: {
|
|
83
|
+
name: "T-shirt Premium",
|
|
84
|
+
price: 29.99,
|
|
85
|
+
images,
|
|
86
|
+
rating: 4.5,
|
|
87
|
+
reviewCount: 128,
|
|
88
|
+
inStock: true,
|
|
89
|
+
showQuickView: true,
|
|
90
|
+
showAddToCart: true,
|
|
91
|
+
},
|
|
92
|
+
render: (args) => (
|
|
93
|
+
<div style={{ width: 300 }}>
|
|
94
|
+
<WakaProductCard {...args} />
|
|
95
|
+
</div>
|
|
96
|
+
),
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const OnSale: Story = {
|
|
100
|
+
args: {
|
|
101
|
+
name: "Veste d'hiver",
|
|
102
|
+
price: 89.99,
|
|
103
|
+
originalPrice: 129.99,
|
|
104
|
+
images,
|
|
105
|
+
rating: 4.8,
|
|
106
|
+
reviewCount: 56,
|
|
107
|
+
isSale: true,
|
|
108
|
+
inStock: true,
|
|
109
|
+
showAddToCart: true,
|
|
110
|
+
},
|
|
111
|
+
render: (args) => (
|
|
112
|
+
<div style={{ width: 300 }}>
|
|
113
|
+
<WakaProductCard {...args} />
|
|
114
|
+
</div>
|
|
115
|
+
),
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const NewProduct: Story = {
|
|
119
|
+
args: {
|
|
120
|
+
name: "Sneakers Édition Limitée",
|
|
121
|
+
price: 149.99,
|
|
122
|
+
images,
|
|
123
|
+
rating: 5.0,
|
|
124
|
+
reviewCount: 12,
|
|
125
|
+
isNew: true,
|
|
126
|
+
inStock: true,
|
|
127
|
+
showQuickView: true,
|
|
128
|
+
},
|
|
129
|
+
render: (args) => (
|
|
130
|
+
<div style={{ width: 300 }}>
|
|
131
|
+
<WakaProductCard {...args} />
|
|
132
|
+
</div>
|
|
133
|
+
),
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const WithVariants: Story = {
|
|
137
|
+
args: {
|
|
138
|
+
name: "Polo Classic",
|
|
139
|
+
price: 39.99,
|
|
140
|
+
images,
|
|
141
|
+
colors,
|
|
142
|
+
sizes,
|
|
143
|
+
rating: 4.2,
|
|
144
|
+
reviewCount: 89,
|
|
145
|
+
inStock: true,
|
|
146
|
+
showAddToCart: true,
|
|
147
|
+
},
|
|
148
|
+
render: (args) => (
|
|
149
|
+
<div style={{ width: 300 }}>
|
|
150
|
+
<WakaProductCard {...args} />
|
|
151
|
+
</div>
|
|
152
|
+
),
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const OutOfStock: Story = {
|
|
156
|
+
args: {
|
|
157
|
+
name: "Article épuisé",
|
|
158
|
+
price: 59.99,
|
|
159
|
+
images,
|
|
160
|
+
rating: 4.7,
|
|
161
|
+
reviewCount: 234,
|
|
162
|
+
inStock: false,
|
|
163
|
+
},
|
|
164
|
+
render: (args) => (
|
|
165
|
+
<div style={{ width: 300 }}>
|
|
166
|
+
<WakaProductCard {...args} />
|
|
167
|
+
</div>
|
|
168
|
+
),
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export const Favorite: Story = {
|
|
172
|
+
args: {
|
|
173
|
+
name: "Mon article favori",
|
|
174
|
+
price: 79.99,
|
|
175
|
+
images,
|
|
176
|
+
rating: 4.9,
|
|
177
|
+
reviewCount: 178,
|
|
178
|
+
isFavorite: true,
|
|
179
|
+
inStock: true,
|
|
180
|
+
showAddToCart: true,
|
|
181
|
+
},
|
|
182
|
+
render: (args) => (
|
|
183
|
+
<div style={{ width: 300 }}>
|
|
184
|
+
<WakaProductCard {...args} />
|
|
185
|
+
</div>
|
|
186
|
+
),
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const Minimal: Story = {
|
|
190
|
+
args: {
|
|
191
|
+
name: "Produit simple",
|
|
192
|
+
price: 19.99,
|
|
193
|
+
images: [images[0]],
|
|
194
|
+
inStock: true,
|
|
195
|
+
},
|
|
196
|
+
render: (args) => (
|
|
197
|
+
<div style={{ width: 300 }}>
|
|
198
|
+
<WakaProductCard {...args} />
|
|
199
|
+
</div>
|
|
200
|
+
),
|
|
201
|
+
}
|
|
202
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaProgressOnboarding } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaProgressOnboarding> = {
|
|
5
|
+
title: "UI/WakaProgressOnboarding",
|
|
6
|
+
component: WakaProgressOnboarding,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
currentStep: { control: "number", description: "Étape courante" },
|
|
11
|
+
totalSteps: { control: "number", description: "Total d'étapes" },
|
|
12
|
+
showPercentage: { control: "boolean", description: "Afficher le pourcentage" },
|
|
13
|
+
showStepCount: { control: "boolean", description: "Afficher le compteur" },
|
|
14
|
+
variant: { control: "select", options: ["linear", "circular", "dots"], description: "Variante" },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<typeof WakaProgressOnboarding>
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
args: { currentStep: 2, totalSteps: 5, showPercentage: true, showStepCount: true, variant: "linear" },
|
|
23
|
+
render: (args) => (
|
|
24
|
+
<div style={{ width: 400 }}>
|
|
25
|
+
<WakaProgressOnboarding {...args} />
|
|
26
|
+
</div>
|
|
27
|
+
),
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const Circular: Story = {
|
|
31
|
+
args: { currentStep: 3, totalSteps: 4, showPercentage: true, variant: "circular" },
|
|
32
|
+
render: (args) => <WakaProgressOnboarding {...args} />,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const Dots: Story = {
|
|
36
|
+
args: { currentStep: 2, totalSteps: 6, showStepCount: false, variant: "dots" },
|
|
37
|
+
render: (args) => <WakaProgressOnboarding {...args} />,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Complete: Story = {
|
|
41
|
+
args: { currentStep: 5, totalSteps: 5, showPercentage: true, variant: "linear" },
|
|
42
|
+
render: (args) => (
|
|
43
|
+
<div style={{ width: 400 }}>
|
|
44
|
+
<WakaProgressOnboarding {...args} />
|
|
45
|
+
</div>
|
|
46
|
+
),
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const Starting: Story = {
|
|
50
|
+
args: { currentStep: 1, totalSteps: 5, showStepCount: true, variant: "linear" },
|
|
51
|
+
render: (args) => (
|
|
52
|
+
<div style={{ width: 400 }}>
|
|
53
|
+
<WakaProgressOnboarding {...args} />
|
|
54
|
+
</div>
|
|
55
|
+
),
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaPullToRefresh } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaPullToRefresh> = {
|
|
5
|
+
title: "UI/WakaPullToRefresh",
|
|
6
|
+
component: WakaPullToRefresh,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
threshold: { control: "number", description: "Seuil de déclenchement (px)" },
|
|
11
|
+
showIndicator: { control: "boolean", description: "Afficher l'indicateur" },
|
|
12
|
+
disabled: { control: "boolean", description: "Désactivé" },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof WakaPullToRefresh>
|
|
18
|
+
|
|
19
|
+
const mockRefresh = async () => {
|
|
20
|
+
await new Promise(r => setTimeout(r, 1500))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const SampleContent = () => (
|
|
24
|
+
<div className="tw-space-y-4 tw-p-4">
|
|
25
|
+
{[1, 2, 3, 4, 5].map(i => (
|
|
26
|
+
<div key={i} className="tw-p-4 tw-bg-muted tw-rounded-lg">
|
|
27
|
+
<p className="tw-font-medium">Élément {i}</p>
|
|
28
|
+
<p className="tw-text-sm tw-text-muted-foreground">Tirez vers le bas pour rafraîchir</p>
|
|
29
|
+
</div>
|
|
30
|
+
))}
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
export const Default: Story = {
|
|
35
|
+
args: { threshold: 80, showIndicator: true, children: <SampleContent /> },
|
|
36
|
+
render: (args) => (
|
|
37
|
+
<div style={{ width: 350, height: 400, overflow: "auto" }}>
|
|
38
|
+
<WakaPullToRefresh {...args} onRefresh={mockRefresh} />
|
|
39
|
+
</div>
|
|
40
|
+
),
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Disabled: Story = {
|
|
44
|
+
args: { threshold: 80, disabled: true, children: <SampleContent /> },
|
|
45
|
+
render: (args) => (
|
|
46
|
+
<div style={{ width: 350, height: 400, overflow: "auto" }}>
|
|
47
|
+
<WakaPullToRefresh {...args} />
|
|
48
|
+
</div>
|
|
49
|
+
),
|
|
50
|
+
}
|
|
51
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaRankBadge, RankTier } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaRankBadge> = {
|
|
5
|
+
title: "Components/Gamification/WakaRankBadge",
|
|
6
|
+
component: WakaRankBadge,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
rank: {
|
|
13
|
+
control: "select",
|
|
14
|
+
options: ["bronze", "silver", "gold", "platinum", "diamond", "master", "grandmaster"],
|
|
15
|
+
description: "Rank tier",
|
|
16
|
+
},
|
|
17
|
+
division: {
|
|
18
|
+
control: "select",
|
|
19
|
+
options: [1, 2, 3, 4, 5],
|
|
20
|
+
description: "Division within rank",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
control: "select",
|
|
24
|
+
options: ["sm", "md", "lg", "xl"],
|
|
25
|
+
description: "Size variant",
|
|
26
|
+
},
|
|
27
|
+
showPoints: {
|
|
28
|
+
control: "boolean",
|
|
29
|
+
description: "Show points display",
|
|
30
|
+
},
|
|
31
|
+
showDivision: {
|
|
32
|
+
control: "boolean",
|
|
33
|
+
description: "Show division",
|
|
34
|
+
},
|
|
35
|
+
animated: {
|
|
36
|
+
control: "boolean",
|
|
37
|
+
description: "Enable animations",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default meta
|
|
43
|
+
type Story = StoryObj<typeof WakaRankBadge>
|
|
44
|
+
|
|
45
|
+
export const Default: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
rank: "gold",
|
|
48
|
+
division: 2,
|
|
49
|
+
points: 1500,
|
|
50
|
+
pointsToNext: 500,
|
|
51
|
+
size: "lg",
|
|
52
|
+
showPoints: true,
|
|
53
|
+
showDivision: true,
|
|
54
|
+
animated: true,
|
|
55
|
+
},
|
|
56
|
+
render: (args) => <WakaRankBadge {...args} />,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const AllRanks: Story = {
|
|
60
|
+
render: () => (
|
|
61
|
+
<div className="flex flex-wrap gap-4 justify-center">
|
|
62
|
+
{(["bronze", "silver", "gold", "platinum", "diamond", "master", "grandmaster"] as RankTier[]).map((rank) => (
|
|
63
|
+
<WakaRankBadge
|
|
64
|
+
key={rank}
|
|
65
|
+
rank={rank}
|
|
66
|
+
division={2}
|
|
67
|
+
size="md"
|
|
68
|
+
showDivision
|
|
69
|
+
animated
|
|
70
|
+
/>
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
),
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const Small: Story = {
|
|
77
|
+
args: {
|
|
78
|
+
rank: "platinum",
|
|
79
|
+
size: "sm",
|
|
80
|
+
animated: true,
|
|
81
|
+
},
|
|
82
|
+
render: (args) => <WakaRankBadge {...args} />,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const ExtraLarge: Story = {
|
|
86
|
+
args: {
|
|
87
|
+
rank: "grandmaster",
|
|
88
|
+
size: "xl",
|
|
89
|
+
showDivision: false,
|
|
90
|
+
animated: true,
|
|
91
|
+
},
|
|
92
|
+
render: (args) => <WakaRankBadge {...args} />,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const WithProgress: Story = {
|
|
96
|
+
args: {
|
|
97
|
+
rank: "diamond",
|
|
98
|
+
division: 1,
|
|
99
|
+
points: 2800,
|
|
100
|
+
pointsToNext: 200,
|
|
101
|
+
size: "lg",
|
|
102
|
+
showPoints: true,
|
|
103
|
+
showDivision: true,
|
|
104
|
+
animated: true,
|
|
105
|
+
},
|
|
106
|
+
render: (args) => <WakaRankBadge {...args} />,
|
|
107
|
+
}
|
|
108
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaRatingInput } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaRatingInput> = {
|
|
5
|
+
title: "Forms/WakaRatingInput",
|
|
6
|
+
component: WakaRatingInput,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
value: { control: { type: "number", min: 0, max: 5, step: 0.5 }, description: "Valeur" },
|
|
11
|
+
max: { control: "number", description: "Note maximale" },
|
|
12
|
+
size: { control: "select", options: ["sm", "md", "lg"], description: "Taille" },
|
|
13
|
+
allowHalf: { control: "boolean", description: "Demi-étoiles" },
|
|
14
|
+
readOnly: { control: "boolean", description: "Lecture seule" },
|
|
15
|
+
showValue: { control: "boolean", description: "Afficher la valeur" },
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default meta
|
|
20
|
+
type Story = StoryObj<typeof WakaRatingInput>
|
|
21
|
+
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: { value: 3, max: 5, size: "md", allowHalf: false, showValue: true },
|
|
24
|
+
render: (args) => <WakaRatingInput {...args} />,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const HalfStars: Story = {
|
|
28
|
+
args: { value: 3.5, max: 5, allowHalf: true, showValue: true },
|
|
29
|
+
render: (args) => <WakaRatingInput {...args} />,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const Large: Story = {
|
|
33
|
+
args: { value: 4, max: 5, size: "lg", showValue: true },
|
|
34
|
+
render: (args) => <WakaRatingInput {...args} />,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Small: Story = {
|
|
38
|
+
args: { value: 4.5, max: 5, size: "sm", allowHalf: true },
|
|
39
|
+
render: (args) => <WakaRatingInput {...args} />,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const ReadOnly: Story = {
|
|
43
|
+
args: { value: 4.2, max: 5, readOnly: true, allowHalf: true, showValue: true },
|
|
44
|
+
render: (args) => <WakaRatingInput {...args} />,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const TenStars: Story = {
|
|
48
|
+
args: { value: 7, max: 10, size: "sm" },
|
|
49
|
+
render: (args) => <WakaRatingInput {...args} />,
|
|
50
|
+
}
|
|
51
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaReactionPicker } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaReactionPicker> = {
|
|
5
|
+
title: "Forms/WakaReactionPicker",
|
|
6
|
+
component: WakaReactionPicker,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
showLabels: { control: "boolean", description: "Afficher les labels" },
|
|
11
|
+
multiple: { control: "boolean", description: "Sélection multiple" },
|
|
12
|
+
showCount: { control: "boolean", description: "Afficher le compteur" },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof WakaReactionPicker>
|
|
18
|
+
|
|
19
|
+
const reactions = [
|
|
20
|
+
{ id: "like", emoji: "👍", label: "J'aime", count: 12 },
|
|
21
|
+
{ id: "love", emoji: "❤️", label: "J'adore", count: 5 },
|
|
22
|
+
{ id: "haha", emoji: "😂", label: "Haha", count: 3 },
|
|
23
|
+
{ id: "wow", emoji: "😮", label: "Wow", count: 1 },
|
|
24
|
+
{ id: "sad", emoji: "😢", label: "Triste", count: 0 },
|
|
25
|
+
{ id: "angry", emoji: "😠", label: "En colère", count: 0 },
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: { reactions, showLabels: false, showCount: true },
|
|
30
|
+
render: (args) => <WakaReactionPicker {...args} />,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const WithLabels: Story = {
|
|
34
|
+
args: { reactions, showLabels: true, showCount: true },
|
|
35
|
+
render: (args) => <WakaReactionPicker {...args} />,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const Multiple: Story = {
|
|
39
|
+
args: { reactions, multiple: true, selected: ["like", "love"], showCount: true },
|
|
40
|
+
render: (args) => <WakaReactionPicker {...args} />,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const NoCount: Story = {
|
|
44
|
+
args: { reactions, showLabels: false, showCount: false },
|
|
45
|
+
render: (args) => <WakaReactionPicker {...args} />,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const FewReactions: Story = {
|
|
49
|
+
args: { reactions: reactions.slice(0, 3), showCount: true },
|
|
50
|
+
render: (args) => <WakaReactionPicker {...args} />,
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaRegionMap, type CloudRegion } from "./index"
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof WakaRegionMap> = {
|
|
6
|
+
title: "Components/Data/WakaRegionMap",
|
|
7
|
+
component: WakaRegionMap,
|
|
8
|
+
parameters: { layout: "padded" },
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
argTypes: {
|
|
11
|
+
showLatency: { control: "boolean", description: "Show latency information" },
|
|
12
|
+
showConnections: { control: "boolean", description: "Show connections between user and regions" },
|
|
13
|
+
animated: { control: "boolean", description: "Enable animations" },
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof WakaRegionMap>
|
|
19
|
+
|
|
20
|
+
// Cloud provider regions with proper CloudRegion format
|
|
21
|
+
const cloudRegions: CloudRegion[] = [
|
|
22
|
+
{ id: "us-east-1", name: "US East (N. Virginia)", location: { lat: 37.4, lng: -79.0 }, latency: 45, status: "active", provider: "aws" },
|
|
23
|
+
{ id: "us-west-2", name: "US West (Oregon)", location: { lat: 45.5, lng: -122.7 }, latency: 78, status: "active", provider: "aws" },
|
|
24
|
+
{ id: "eu-west-1", name: "Europe (Ireland)", location: { lat: 53.3, lng: -6.3 }, latency: 120, status: "active", provider: "aws" },
|
|
25
|
+
{ id: "eu-central-1", name: "Europe (Frankfurt)", location: { lat: 50.1, lng: 8.7 }, latency: 95, status: "degraded", provider: "aws" },
|
|
26
|
+
{ id: "ap-northeast-1", name: "Asia Pacific (Tokyo)", location: { lat: 35.7, lng: 139.7 }, latency: 180, status: "active", provider: "aws" },
|
|
27
|
+
{ id: "ap-southeast-1", name: "Asia Pacific (Singapore)", location: { lat: 1.3, lng: 103.8 }, latency: 220, status: "active", provider: "aws" },
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
const gcpRegions: CloudRegion[] = [
|
|
31
|
+
{ id: "us-central1", name: "US Central (Iowa)", location: { lat: 41.6, lng: -93.6 }, latency: 55, status: "active", provider: "gcp" },
|
|
32
|
+
{ id: "europe-west1", name: "Europe West (Belgium)", location: { lat: 50.8, lng: 4.4 }, latency: 110, status: "active", provider: "gcp" },
|
|
33
|
+
{ id: "asia-east1", name: "Asia East (Taiwan)", location: { lat: 25.0, lng: 121.5 }, latency: 195, status: "offline", provider: "gcp" },
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
const azureRegions: CloudRegion[] = [
|
|
37
|
+
{ id: "eastus", name: "East US", location: { lat: 37.3, lng: -79.5 }, latency: 48, status: "active", provider: "azure" },
|
|
38
|
+
{ id: "westeurope", name: "West Europe", location: { lat: 52.4, lng: 4.9 }, latency: 105, status: "active", provider: "azure" },
|
|
39
|
+
{ id: "southeastasia", name: "Southeast Asia", location: { lat: 1.3, lng: 103.8 }, latency: 215, status: "degraded", provider: "azure" },
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
const userLocation = { lat: 48.9, lng: 2.3 } // Paris, France
|
|
43
|
+
|
|
44
|
+
export const Default: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
regions: cloudRegions,
|
|
47
|
+
userLocation,
|
|
48
|
+
showLatency: true,
|
|
49
|
+
showConnections: true,
|
|
50
|
+
animated: true,
|
|
51
|
+
},
|
|
52
|
+
render: (args) => (
|
|
53
|
+
<div style={{ height: 500 }}>
|
|
54
|
+
<WakaRegionMap {...args} />
|
|
55
|
+
</div>
|
|
56
|
+
),
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const MultiCloud: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
regions: [...cloudRegions, ...gcpRegions, ...azureRegions],
|
|
62
|
+
userLocation,
|
|
63
|
+
showLatency: true,
|
|
64
|
+
showConnections: false,
|
|
65
|
+
animated: true,
|
|
66
|
+
},
|
|
67
|
+
render: (args) => (
|
|
68
|
+
<div style={{ height: 500 }}>
|
|
69
|
+
<WakaRegionMap {...args} />
|
|
70
|
+
</div>
|
|
71
|
+
),
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const WithSelectedRegion: Story = {
|
|
75
|
+
args: {
|
|
76
|
+
regions: cloudRegions,
|
|
77
|
+
userLocation,
|
|
78
|
+
selectedRegion: "eu-west-1",
|
|
79
|
+
showLatency: true,
|
|
80
|
+
showConnections: true,
|
|
81
|
+
animated: true,
|
|
82
|
+
},
|
|
83
|
+
render: (args) => (
|
|
84
|
+
<div style={{ height: 500 }}>
|
|
85
|
+
<WakaRegionMap {...args} />
|
|
86
|
+
</div>
|
|
87
|
+
),
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const Interactive: Story = {
|
|
91
|
+
render: () => {
|
|
92
|
+
const [selectedRegion, setSelectedRegion] = React.useState<string | undefined>()
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div className="space-y-4">
|
|
96
|
+
<div style={{ height: 500 }}>
|
|
97
|
+
<WakaRegionMap
|
|
98
|
+
regions={cloudRegions}
|
|
99
|
+
userLocation={userLocation}
|
|
100
|
+
selectedRegion={selectedRegion}
|
|
101
|
+
onRegionSelect={setSelectedRegion}
|
|
102
|
+
showLatency
|
|
103
|
+
showConnections
|
|
104
|
+
animated
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
{selectedRegion && (
|
|
108
|
+
<div className="rounded-lg border bg-muted/50 p-4">
|
|
109
|
+
<p className="text-sm">
|
|
110
|
+
<strong>Selected region:</strong> {cloudRegions.find(r => r.id === selectedRegion)?.name}
|
|
111
|
+
</p>
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
)
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const NoLatency: Story = {
|
|
120
|
+
args: {
|
|
121
|
+
regions: cloudRegions.map(r => ({ ...r, latency: undefined })),
|
|
122
|
+
userLocation,
|
|
123
|
+
showLatency: false,
|
|
124
|
+
showConnections: true,
|
|
125
|
+
animated: true,
|
|
126
|
+
},
|
|
127
|
+
render: (args) => (
|
|
128
|
+
<div style={{ height: 500 }}>
|
|
129
|
+
<WakaRegionMap {...args} />
|
|
130
|
+
</div>
|
|
131
|
+
),
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export const NoConnections: Story = {
|
|
135
|
+
args: {
|
|
136
|
+
regions: cloudRegions,
|
|
137
|
+
userLocation,
|
|
138
|
+
showLatency: true,
|
|
139
|
+
showConnections: false,
|
|
140
|
+
animated: true,
|
|
141
|
+
},
|
|
142
|
+
render: (args) => (
|
|
143
|
+
<div style={{ height: 500 }}>
|
|
144
|
+
<WakaRegionMap {...args} />
|
|
145
|
+
</div>
|
|
146
|
+
),
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export const StaticMap: Story = {
|
|
150
|
+
args: {
|
|
151
|
+
regions: cloudRegions,
|
|
152
|
+
showLatency: true,
|
|
153
|
+
showConnections: false,
|
|
154
|
+
animated: false,
|
|
155
|
+
},
|
|
156
|
+
render: (args) => (
|
|
157
|
+
<div style={{ height: 400 }}>
|
|
158
|
+
<WakaRegionMap {...args} />
|
|
159
|
+
</div>
|
|
160
|
+
),
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export const DegradedAndOffline: Story = {
|
|
164
|
+
args: {
|
|
165
|
+
regions: [
|
|
166
|
+
{ id: "region-1", name: "Primary DC", location: { lat: 40.7, lng: -74.0 }, latency: 25, status: "active", provider: "aws" },
|
|
167
|
+
{ id: "region-2", name: "EU Backup", location: { lat: 51.5, lng: -0.1 }, latency: 150, status: "degraded", provider: "azure" },
|
|
168
|
+
{ id: "region-3", name: "Asia DC", location: { lat: 35.7, lng: 139.7 }, status: "offline", provider: "gcp" },
|
|
169
|
+
{ id: "region-4", name: "Australia", location: { lat: -33.9, lng: 151.2 }, latency: 280, status: "active", provider: "aws" },
|
|
170
|
+
],
|
|
171
|
+
userLocation,
|
|
172
|
+
showLatency: true,
|
|
173
|
+
showConnections: true,
|
|
174
|
+
animated: true,
|
|
175
|
+
},
|
|
176
|
+
render: (args) => (
|
|
177
|
+
<div style={{ height: 500 }}>
|
|
178
|
+
<WakaRegionMap {...args} />
|
|
179
|
+
</div>
|
|
180
|
+
),
|
|
181
|
+
}
|