@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,40 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaMagneticButton } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaMagneticButton> = {
|
|
5
|
+
title: "UI/WakaMagneticButton",
|
|
6
|
+
component: WakaMagneticButton,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
variant: { control: "select", options: ["default", "secondary", "destructive", "outline", "ghost", "gradient"], description: "Variante" },
|
|
11
|
+
magneticEnabled: { control: "boolean", description: "Effet magnétique" },
|
|
12
|
+
attractionRadius: { control: "number", description: "Rayon d'attraction (px)" },
|
|
13
|
+
attractionStrength: { control: { type: "range", min: 0, max: 1, step: 0.1 }, description: "Force" },
|
|
14
|
+
followDuration: { control: "number", description: "Durée animation (ms)" },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<typeof WakaMagneticButton>
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
args: { children: "Hover me!", variant: "default", magneticEnabled: true, attractionRadius: 100, attractionStrength: 0.3 },
|
|
23
|
+
render: (args) => <WakaMagneticButton {...args} />,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const StrongAttraction: Story = {
|
|
27
|
+
args: { children: "Strong Pull", variant: "gradient", magneticEnabled: true, attractionRadius: 150, attractionStrength: 0.6 },
|
|
28
|
+
render: (args) => <WakaMagneticButton {...args} />,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Outline: Story = {
|
|
32
|
+
args: { children: "Outline Magnetic", variant: "outline", magneticEnabled: true },
|
|
33
|
+
render: (args) => <WakaMagneticButton {...args} />,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Disabled: Story = {
|
|
37
|
+
args: { children: "No Effect", variant: "default", magneticEnabled: false },
|
|
38
|
+
render: (args) => <WakaMagneticButton {...args} />,
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaMentionInput, type MentionItem } from "./index"
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import { User, Hash } from "lucide-react"
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof WakaMentionInput> = {
|
|
7
|
+
title: "Communication/WakaMentionInput",
|
|
8
|
+
component: WakaMentionInput,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
},
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
argTypes: {
|
|
14
|
+
placeholder: {
|
|
15
|
+
control: "text",
|
|
16
|
+
description: "Texte placeholder",
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
control: "boolean",
|
|
20
|
+
description: "État désactivé",
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
control: "text",
|
|
24
|
+
description: "Message d'erreur",
|
|
25
|
+
},
|
|
26
|
+
maxLength: {
|
|
27
|
+
control: "number",
|
|
28
|
+
description: "Limite de caractères",
|
|
29
|
+
},
|
|
30
|
+
maxMentions: {
|
|
31
|
+
control: "number",
|
|
32
|
+
description: "Limite de mentions",
|
|
33
|
+
},
|
|
34
|
+
showCharacterCount: {
|
|
35
|
+
control: "boolean",
|
|
36
|
+
description: "Afficher le compteur de caractères",
|
|
37
|
+
},
|
|
38
|
+
showMentionCount: {
|
|
39
|
+
control: "boolean",
|
|
40
|
+
description: "Afficher le compteur de mentions",
|
|
41
|
+
},
|
|
42
|
+
minHeight: {
|
|
43
|
+
control: "number",
|
|
44
|
+
description: "Hauteur minimale",
|
|
45
|
+
},
|
|
46
|
+
maxHeight: {
|
|
47
|
+
control: "number",
|
|
48
|
+
description: "Hauteur maximale",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default meta
|
|
54
|
+
type Story = StoryObj<typeof WakaMentionInput>
|
|
55
|
+
|
|
56
|
+
const sampleUsers: MentionItem[] = [
|
|
57
|
+
{ id: "1", type: "user", display: "Alice Martin", value: "alice", avatar: "https://i.pravatar.cc/150?u=alice" },
|
|
58
|
+
{ id: "2", type: "user", display: "Bob Dupont", value: "bob", avatar: "https://i.pravatar.cc/150?u=bob" },
|
|
59
|
+
{ id: "3", type: "user", display: "Charlie Bernard", value: "charlie", avatar: "https://i.pravatar.cc/150?u=charlie" },
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
const sampleChannels: MentionItem[] = [
|
|
63
|
+
{ id: "c1", type: "channel", display: "general", value: "general", description: "Discussion générale" },
|
|
64
|
+
{ id: "c2", type: "channel", display: "random", value: "random", description: "Discussions diverses" },
|
|
65
|
+
{ id: "c3", type: "channel", display: "dev", value: "dev", description: "Équipe développement" },
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
const defaultTriggers = [
|
|
69
|
+
{
|
|
70
|
+
trigger: "@",
|
|
71
|
+
type: "user",
|
|
72
|
+
icon: <User className="tw-h-4 tw-w-4" />,
|
|
73
|
+
data: sampleUsers,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
trigger: "#",
|
|
77
|
+
type: "channel",
|
|
78
|
+
icon: <Hash className="tw-h-4 tw-w-4" />,
|
|
79
|
+
data: sampleChannels,
|
|
80
|
+
},
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
export const Default: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
placeholder: "Tapez @ pour mentionner quelqu'un, # pour un canal...",
|
|
86
|
+
triggers: defaultTriggers,
|
|
87
|
+
showCharacterCount: true,
|
|
88
|
+
showMentionCount: true,
|
|
89
|
+
maxLength: 500,
|
|
90
|
+
maxMentions: 10,
|
|
91
|
+
},
|
|
92
|
+
render: (args) => (
|
|
93
|
+
<div style={{ width: 400 }}>
|
|
94
|
+
<WakaMentionInput {...args} />
|
|
95
|
+
</div>
|
|
96
|
+
),
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const WithError: Story = {
|
|
100
|
+
args: {
|
|
101
|
+
placeholder: "Tapez votre message...",
|
|
102
|
+
triggers: defaultTriggers,
|
|
103
|
+
error: "Le message ne peut pas être vide",
|
|
104
|
+
},
|
|
105
|
+
render: (args) => (
|
|
106
|
+
<div style={{ width: 400 }}>
|
|
107
|
+
<WakaMentionInput {...args} />
|
|
108
|
+
</div>
|
|
109
|
+
),
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export const Disabled: Story = {
|
|
113
|
+
args: {
|
|
114
|
+
placeholder: "Input désactivé",
|
|
115
|
+
triggers: defaultTriggers,
|
|
116
|
+
disabled: true,
|
|
117
|
+
},
|
|
118
|
+
render: (args) => (
|
|
119
|
+
<div style={{ width: 400 }}>
|
|
120
|
+
<WakaMentionInput {...args} />
|
|
121
|
+
</div>
|
|
122
|
+
),
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const WithLimits: Story = {
|
|
126
|
+
args: {
|
|
127
|
+
placeholder: "Message limité...",
|
|
128
|
+
triggers: defaultTriggers,
|
|
129
|
+
maxLength: 100,
|
|
130
|
+
maxMentions: 3,
|
|
131
|
+
showCharacterCount: true,
|
|
132
|
+
showMentionCount: true,
|
|
133
|
+
},
|
|
134
|
+
render: (args) => (
|
|
135
|
+
<div style={{ width: 400 }}>
|
|
136
|
+
<WakaMentionInput {...args} />
|
|
137
|
+
</div>
|
|
138
|
+
),
|
|
139
|
+
}
|
|
140
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaMilestoneRoad, Milestone } from "./index"
|
|
3
|
+
|
|
4
|
+
const sampleMilestones: Milestone[] = [
|
|
5
|
+
{
|
|
6
|
+
id: "m1",
|
|
7
|
+
name: "Start",
|
|
8
|
+
description: "Begin your journey",
|
|
9
|
+
completed: true,
|
|
10
|
+
rewards: [{ type: "xp", value: 100 }],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "m2",
|
|
14
|
+
name: "First Steps",
|
|
15
|
+
description: "Complete 5 tasks",
|
|
16
|
+
completed: true,
|
|
17
|
+
rewards: [{ type: "xp", value: 200 }, { type: "badge", value: "Beginner" }],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "m3",
|
|
21
|
+
name: "Rising Star",
|
|
22
|
+
description: "Reach level 10",
|
|
23
|
+
completed: true,
|
|
24
|
+
isCurrent: false,
|
|
25
|
+
rewards: [{ type: "xp", value: 500 }],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "m4",
|
|
29
|
+
name: "Champion",
|
|
30
|
+
description: "Win 10 challenges",
|
|
31
|
+
completed: false,
|
|
32
|
+
isCurrent: true,
|
|
33
|
+
rewards: [{ type: "xp", value: 1000 }, { type: "item", value: "Gold Sword" }],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "m5",
|
|
37
|
+
name: "Master",
|
|
38
|
+
description: "Complete all achievements",
|
|
39
|
+
completed: false,
|
|
40
|
+
rewards: [{ type: "badge", value: "Master" }, { type: "currency", value: 5000 }],
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
const meta: Meta<typeof WakaMilestoneRoad> = {
|
|
45
|
+
title: "Components/Gamification/WakaMilestoneRoad",
|
|
46
|
+
component: WakaMilestoneRoad,
|
|
47
|
+
parameters: {
|
|
48
|
+
layout: "fullscreen",
|
|
49
|
+
},
|
|
50
|
+
tags: ["autodocs"],
|
|
51
|
+
argTypes: {
|
|
52
|
+
variant: {
|
|
53
|
+
control: "select",
|
|
54
|
+
options: ["horizontal", "vertical", "winding"],
|
|
55
|
+
description: "Display variant",
|
|
56
|
+
},
|
|
57
|
+
theme: {
|
|
58
|
+
control: "select",
|
|
59
|
+
options: ["default", "gold", "purple", "green", "blue"],
|
|
60
|
+
description: "Color theme",
|
|
61
|
+
},
|
|
62
|
+
animated: {
|
|
63
|
+
control: "boolean",
|
|
64
|
+
description: "Enable animations",
|
|
65
|
+
},
|
|
66
|
+
showCharacter: {
|
|
67
|
+
control: "boolean",
|
|
68
|
+
description: "Show character on road",
|
|
69
|
+
},
|
|
70
|
+
showProgressLabel: {
|
|
71
|
+
control: "boolean",
|
|
72
|
+
description: "Show progress percentage",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default meta
|
|
78
|
+
type Story = StoryObj<typeof WakaMilestoneRoad>
|
|
79
|
+
|
|
80
|
+
export const Winding: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
milestones: sampleMilestones,
|
|
83
|
+
progress: 65,
|
|
84
|
+
variant: "winding",
|
|
85
|
+
theme: "default",
|
|
86
|
+
animated: true,
|
|
87
|
+
showCharacter: true,
|
|
88
|
+
showProgressLabel: true,
|
|
89
|
+
},
|
|
90
|
+
render: (args) => (
|
|
91
|
+
<div className="h-[600px] p-4">
|
|
92
|
+
<WakaMilestoneRoad {...args} />
|
|
93
|
+
</div>
|
|
94
|
+
),
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export const Horizontal: Story = {
|
|
98
|
+
args: {
|
|
99
|
+
milestones: sampleMilestones,
|
|
100
|
+
progress: 65,
|
|
101
|
+
variant: "horizontal",
|
|
102
|
+
theme: "gold",
|
|
103
|
+
animated: true,
|
|
104
|
+
showCharacter: true,
|
|
105
|
+
},
|
|
106
|
+
render: (args) => (
|
|
107
|
+
<div className="h-[300px] p-4">
|
|
108
|
+
<WakaMilestoneRoad {...args} />
|
|
109
|
+
</div>
|
|
110
|
+
),
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export const Vertical: Story = {
|
|
114
|
+
args: {
|
|
115
|
+
milestones: sampleMilestones,
|
|
116
|
+
progress: 65,
|
|
117
|
+
variant: "vertical",
|
|
118
|
+
theme: "purple",
|
|
119
|
+
animated: true,
|
|
120
|
+
showCharacter: true,
|
|
121
|
+
},
|
|
122
|
+
render: (args) => (
|
|
123
|
+
<div className="h-[600px] w-[300px] p-4">
|
|
124
|
+
<WakaMilestoneRoad {...args} />
|
|
125
|
+
</div>
|
|
126
|
+
),
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export const GreenTheme: Story = {
|
|
130
|
+
args: {
|
|
131
|
+
milestones: sampleMilestones,
|
|
132
|
+
progress: 40,
|
|
133
|
+
variant: "winding",
|
|
134
|
+
theme: "green",
|
|
135
|
+
animated: true,
|
|
136
|
+
},
|
|
137
|
+
render: (args) => (
|
|
138
|
+
<div className="h-[600px] p-4">
|
|
139
|
+
<WakaMilestoneRoad {...args} />
|
|
140
|
+
</div>
|
|
141
|
+
),
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaOrbitalMenu } from "./index"
|
|
3
|
+
import { Home, Settings, User, Mail, Bell, Heart } from "lucide-react"
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof WakaOrbitalMenu> = {
|
|
6
|
+
title: "Navigation/WakaOrbitalMenu",
|
|
7
|
+
component: WakaOrbitalMenu,
|
|
8
|
+
parameters: { layout: "centered" },
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
argTypes: {
|
|
11
|
+
radius: { control: "number", description: "Rayon de l'orbite" },
|
|
12
|
+
startAngle: { control: "number", description: "Angle de départ" },
|
|
13
|
+
animated: { control: "boolean", description: "Animation" },
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof WakaOrbitalMenu>
|
|
19
|
+
|
|
20
|
+
const items = [
|
|
21
|
+
{ id: "home", icon: <Home className="tw-h-5 tw-w-5" />, label: "Accueil" },
|
|
22
|
+
{ id: "user", icon: <User className="tw-h-5 tw-w-5" />, label: "Profil" },
|
|
23
|
+
{ id: "mail", icon: <Mail className="tw-h-5 tw-w-5" />, label: "Messages" },
|
|
24
|
+
{ id: "bell", icon: <Bell className="tw-h-5 tw-w-5" />, label: "Notifications" },
|
|
25
|
+
{ id: "settings", icon: <Settings className="tw-h-5 tw-w-5" />, label: "Paramètres" },
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: { items, radius: 100, animated: true },
|
|
30
|
+
render: (args) => (
|
|
31
|
+
<div style={{ width: 300, height: 300 }}>
|
|
32
|
+
<WakaOrbitalMenu {...args} />
|
|
33
|
+
</div>
|
|
34
|
+
),
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const LargeRadius: Story = {
|
|
38
|
+
args: { items, radius: 150, animated: true },
|
|
39
|
+
render: (args) => (
|
|
40
|
+
<div style={{ width: 400, height: 400 }}>
|
|
41
|
+
<WakaOrbitalMenu {...args} />
|
|
42
|
+
</div>
|
|
43
|
+
),
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const FewItems: Story = {
|
|
47
|
+
args: { items: items.slice(0, 3), radius: 80, animated: true },
|
|
48
|
+
render: (args) => (
|
|
49
|
+
<div style={{ width: 250, height: 250 }}>
|
|
50
|
+
<WakaOrbitalMenu {...args} />
|
|
51
|
+
</div>
|
|
52
|
+
),
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaOrderTracker, type StatusUpdate, type OrderStatus } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaOrderTracker> = {
|
|
5
|
+
title: "E-commerce/WakaOrderTracker",
|
|
6
|
+
component: WakaOrderTracker,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
currentStatus: {
|
|
13
|
+
control: "select",
|
|
14
|
+
options: ["ordered", "processing", "shipped", "out_for_delivery", "delivered"],
|
|
15
|
+
description: "Statut actuel de la commande",
|
|
16
|
+
},
|
|
17
|
+
showMap: {
|
|
18
|
+
control: "boolean",
|
|
19
|
+
description: "Afficher la carte",
|
|
20
|
+
},
|
|
21
|
+
showTimeline: {
|
|
22
|
+
control: "boolean",
|
|
23
|
+
description: "Afficher la timeline",
|
|
24
|
+
},
|
|
25
|
+
orientation: {
|
|
26
|
+
control: "select",
|
|
27
|
+
options: ["horizontal", "vertical"],
|
|
28
|
+
description: "Orientation de la timeline",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default meta
|
|
34
|
+
type Story = StoryObj<typeof WakaOrderTracker>
|
|
35
|
+
|
|
36
|
+
const statusUpdates: StatusUpdate[] = [
|
|
37
|
+
{
|
|
38
|
+
id: "1",
|
|
39
|
+
status: "ordered",
|
|
40
|
+
timestamp: new Date("2024-01-10T10:00:00"),
|
|
41
|
+
description: "Commande confirmée",
|
|
42
|
+
location: "Paris, France",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "2",
|
|
46
|
+
status: "processing",
|
|
47
|
+
timestamp: new Date("2024-01-10T14:00:00"),
|
|
48
|
+
description: "Préparation en cours",
|
|
49
|
+
location: "Entrepôt central",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "3",
|
|
53
|
+
status: "shipped",
|
|
54
|
+
timestamp: new Date("2024-01-11T09:00:00"),
|
|
55
|
+
description: "Colis expédié",
|
|
56
|
+
location: "Centre de tri Lyon",
|
|
57
|
+
},
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
const deliveredUpdates: StatusUpdate[] = [
|
|
61
|
+
...statusUpdates,
|
|
62
|
+
{
|
|
63
|
+
id: "4",
|
|
64
|
+
status: "out_for_delivery",
|
|
65
|
+
timestamp: new Date("2024-01-12T08:00:00"),
|
|
66
|
+
description: "En cours de livraison",
|
|
67
|
+
location: "Lyon",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "5",
|
|
71
|
+
status: "delivered",
|
|
72
|
+
timestamp: new Date("2024-01-12T14:30:00"),
|
|
73
|
+
description: "Livré",
|
|
74
|
+
location: "Votre adresse",
|
|
75
|
+
},
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
export const Default: Story = {
|
|
79
|
+
args: {
|
|
80
|
+
orderNumber: "CMD-2024-001",
|
|
81
|
+
currentStatus: "shipped",
|
|
82
|
+
statusUpdates,
|
|
83
|
+
estimatedDelivery: new Date("2024-01-13"),
|
|
84
|
+
showTimeline: true,
|
|
85
|
+
orientation: "vertical",
|
|
86
|
+
},
|
|
87
|
+
render: (args) => (
|
|
88
|
+
<div style={{ width: 450 }}>
|
|
89
|
+
<WakaOrderTracker {...args} />
|
|
90
|
+
</div>
|
|
91
|
+
),
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const Processing: Story = {
|
|
95
|
+
args: {
|
|
96
|
+
orderNumber: "CMD-2024-002",
|
|
97
|
+
currentStatus: "processing",
|
|
98
|
+
statusUpdates: statusUpdates.slice(0, 2),
|
|
99
|
+
estimatedDelivery: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000),
|
|
100
|
+
showTimeline: true,
|
|
101
|
+
},
|
|
102
|
+
render: (args) => (
|
|
103
|
+
<div style={{ width: 450 }}>
|
|
104
|
+
<WakaOrderTracker {...args} />
|
|
105
|
+
</div>
|
|
106
|
+
),
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const OutForDelivery: Story = {
|
|
110
|
+
args: {
|
|
111
|
+
orderNumber: "CMD-2024-003",
|
|
112
|
+
currentStatus: "out_for_delivery",
|
|
113
|
+
statusUpdates: deliveredUpdates.slice(0, 4),
|
|
114
|
+
estimatedDelivery: new Date(),
|
|
115
|
+
showTimeline: true,
|
|
116
|
+
},
|
|
117
|
+
render: (args) => (
|
|
118
|
+
<div style={{ width: 450 }}>
|
|
119
|
+
<WakaOrderTracker {...args} />
|
|
120
|
+
</div>
|
|
121
|
+
),
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const Delivered: Story = {
|
|
125
|
+
args: {
|
|
126
|
+
orderNumber: "CMD-2024-004",
|
|
127
|
+
currentStatus: "delivered",
|
|
128
|
+
statusUpdates: deliveredUpdates,
|
|
129
|
+
deliveredAt: new Date("2024-01-12T14:30:00"),
|
|
130
|
+
showTimeline: true,
|
|
131
|
+
},
|
|
132
|
+
render: (args) => (
|
|
133
|
+
<div style={{ width: 450 }}>
|
|
134
|
+
<WakaOrderTracker {...args} />
|
|
135
|
+
</div>
|
|
136
|
+
),
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export const Horizontal: Story = {
|
|
140
|
+
args: {
|
|
141
|
+
orderNumber: "CMD-2024-005",
|
|
142
|
+
currentStatus: "shipped",
|
|
143
|
+
statusUpdates,
|
|
144
|
+
orientation: "horizontal",
|
|
145
|
+
showTimeline: true,
|
|
146
|
+
},
|
|
147
|
+
render: (args) => <WakaOrderTracker {...args} />,
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const Minimal: Story = {
|
|
151
|
+
args: {
|
|
152
|
+
orderNumber: "CMD-2024-006",
|
|
153
|
+
currentStatus: "shipped",
|
|
154
|
+
statusUpdates,
|
|
155
|
+
showTimeline: false,
|
|
156
|
+
},
|
|
157
|
+
render: (args) => (
|
|
158
|
+
<div style={{ width: 400 }}>
|
|
159
|
+
<WakaOrderTracker {...args} />
|
|
160
|
+
</div>
|
|
161
|
+
),
|
|
162
|
+
}
|
|
163
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaOutstreamVideo } from "./index"
|
|
3
|
+
import { WakaAdProvider } from "../waka-ad-provider"
|
|
4
|
+
|
|
5
|
+
const mockAdConfig = {
|
|
6
|
+
network: "custom" as const,
|
|
7
|
+
testMode: true,
|
|
8
|
+
debugMode: true,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const meta: Meta<typeof WakaOutstreamVideo> = {
|
|
12
|
+
title: "Components/Ads/WakaOutstreamVideo",
|
|
13
|
+
component: WakaOutstreamVideo,
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: "padded",
|
|
16
|
+
},
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
decorators: [
|
|
19
|
+
(Story) => (
|
|
20
|
+
<WakaAdProvider config={mockAdConfig}>
|
|
21
|
+
<div className="max-w-2xl mx-auto space-y-4">
|
|
22
|
+
<p className="text-muted-foreground">
|
|
23
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor.
|
|
24
|
+
</p>
|
|
25
|
+
<Story />
|
|
26
|
+
<p className="text-muted-foreground">
|
|
27
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
</WakaAdProvider>
|
|
31
|
+
),
|
|
32
|
+
],
|
|
33
|
+
argTypes: {
|
|
34
|
+
muted: {
|
|
35
|
+
control: "boolean",
|
|
36
|
+
description: "Start muted",
|
|
37
|
+
},
|
|
38
|
+
showClose: {
|
|
39
|
+
control: "boolean",
|
|
40
|
+
description: "Show close button",
|
|
41
|
+
},
|
|
42
|
+
closeAfter: {
|
|
43
|
+
control: "number",
|
|
44
|
+
description: "Close after seconds (0 = manual only)",
|
|
45
|
+
},
|
|
46
|
+
collapseOnEnd: {
|
|
47
|
+
control: "boolean",
|
|
48
|
+
description: "Collapse when video ends",
|
|
49
|
+
},
|
|
50
|
+
collapseDuration: {
|
|
51
|
+
control: "number",
|
|
52
|
+
description: "Collapse animation duration (ms)",
|
|
53
|
+
},
|
|
54
|
+
visibilityThreshold: {
|
|
55
|
+
control: { type: "range", min: 0, max: 1, step: 0.1 },
|
|
56
|
+
description: "Minimum visibility to start playing",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default meta
|
|
62
|
+
type Story = StoryObj<typeof WakaOutstreamVideo>
|
|
63
|
+
|
|
64
|
+
export const Default: Story = {
|
|
65
|
+
args: {
|
|
66
|
+
slotId: "outstream-video-1",
|
|
67
|
+
muted: true,
|
|
68
|
+
showClose: true,
|
|
69
|
+
collapseOnEnd: true,
|
|
70
|
+
},
|
|
71
|
+
render: (args) => <WakaOutstreamVideo {...args} />,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const AutoClose: Story = {
|
|
75
|
+
args: {
|
|
76
|
+
slotId: "outstream-video-2",
|
|
77
|
+
muted: true,
|
|
78
|
+
showClose: true,
|
|
79
|
+
closeAfter: 15,
|
|
80
|
+
collapseOnEnd: true,
|
|
81
|
+
},
|
|
82
|
+
render: (args) => <WakaOutstreamVideo {...args} />,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const NoClose: Story = {
|
|
86
|
+
args: {
|
|
87
|
+
slotId: "outstream-video-3",
|
|
88
|
+
muted: true,
|
|
89
|
+
showClose: false,
|
|
90
|
+
collapseOnEnd: false,
|
|
91
|
+
},
|
|
92
|
+
render: (args) => <WakaOutstreamVideo {...args} />,
|
|
93
|
+
}
|
|
94
|
+
|