@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,143 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaThreadView, type ThreadData, type ThreadParticipant } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaThreadView> = {
|
|
5
|
+
title: "Communication/WakaThreadView",
|
|
6
|
+
component: WakaThreadView,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "padded",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
showReplyInput: {
|
|
13
|
+
control: "boolean",
|
|
14
|
+
description: "Afficher le champ de réponse",
|
|
15
|
+
},
|
|
16
|
+
maxNestingLevel: {
|
|
17
|
+
control: "number",
|
|
18
|
+
description: "Niveau maximum d'imbrication",
|
|
19
|
+
},
|
|
20
|
+
collapsible: {
|
|
21
|
+
control: "boolean",
|
|
22
|
+
description: "Permettre de réduire le thread",
|
|
23
|
+
},
|
|
24
|
+
defaultExpanded: {
|
|
25
|
+
control: "boolean",
|
|
26
|
+
description: "Développé par défaut",
|
|
27
|
+
},
|
|
28
|
+
isLoading: {
|
|
29
|
+
control: "boolean",
|
|
30
|
+
description: "État de chargement",
|
|
31
|
+
},
|
|
32
|
+
hasMoreReplies: {
|
|
33
|
+
control: "boolean",
|
|
34
|
+
description: "Indique s'il y a plus de réponses",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default meta
|
|
40
|
+
type Story = StoryObj<typeof WakaThreadView>
|
|
41
|
+
|
|
42
|
+
const participants: ThreadParticipant[] = [
|
|
43
|
+
{ id: "1", name: "Alice Martin", avatar: "https://i.pravatar.cc/150?u=alice" },
|
|
44
|
+
{ id: "2", name: "Bob Dupont", avatar: "https://i.pravatar.cc/150?u=bob" },
|
|
45
|
+
{ id: "3", name: "Charlie Bernard", avatar: "https://i.pravatar.cc/150?u=charlie" },
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
const sampleThread: ThreadData = {
|
|
49
|
+
id: "thread-1",
|
|
50
|
+
title: "Discussion sur le nouveau design",
|
|
51
|
+
parentMessage: {
|
|
52
|
+
id: "msg-1",
|
|
53
|
+
author: participants[0],
|
|
54
|
+
content: "Que pensez-vous du nouveau design de la page d'accueil ?",
|
|
55
|
+
timestamp: new Date(Date.now() - 3600000),
|
|
56
|
+
replies: [
|
|
57
|
+
{
|
|
58
|
+
id: "msg-2",
|
|
59
|
+
author: participants[1],
|
|
60
|
+
content: "J'aime beaucoup ! Les couleurs sont très harmonieuses.",
|
|
61
|
+
timestamp: new Date(Date.now() - 1800000),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "msg-3",
|
|
65
|
+
author: participants[2],
|
|
66
|
+
content: "Pareil, c'est vraiment bien. Par contre, je pense qu'on pourrait améliorer le contraste du texte.",
|
|
67
|
+
timestamp: new Date(Date.now() - 900000),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
replyCount: 2,
|
|
72
|
+
participants,
|
|
73
|
+
isFollowing: true,
|
|
74
|
+
lastActivity: new Date(),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const currentUser: ThreadParticipant = {
|
|
78
|
+
id: "current",
|
|
79
|
+
name: "Moi",
|
|
80
|
+
avatar: "https://i.pravatar.cc/150?u=current",
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const Default: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
thread: sampleThread,
|
|
86
|
+
currentUser,
|
|
87
|
+
showReplyInput: true,
|
|
88
|
+
collapsible: true,
|
|
89
|
+
defaultExpanded: true,
|
|
90
|
+
hasMoreReplies: false,
|
|
91
|
+
},
|
|
92
|
+
render: (args) => (
|
|
93
|
+
<div style={{ maxWidth: 600 }}>
|
|
94
|
+
<WakaThreadView {...args} />
|
|
95
|
+
</div>
|
|
96
|
+
),
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const Loading: Story = {
|
|
100
|
+
args: {
|
|
101
|
+
thread: sampleThread,
|
|
102
|
+
currentUser,
|
|
103
|
+
isLoading: true,
|
|
104
|
+
},
|
|
105
|
+
render: (args) => (
|
|
106
|
+
<div style={{ maxWidth: 600 }}>
|
|
107
|
+
<WakaThreadView {...args} />
|
|
108
|
+
</div>
|
|
109
|
+
),
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export const WithMoreReplies: Story = {
|
|
113
|
+
args: {
|
|
114
|
+
thread: {
|
|
115
|
+
...sampleThread,
|
|
116
|
+
replyCount: 15,
|
|
117
|
+
},
|
|
118
|
+
currentUser,
|
|
119
|
+
hasMoreReplies: true,
|
|
120
|
+
},
|
|
121
|
+
render: (args) => (
|
|
122
|
+
<div style={{ maxWidth: 600 }}>
|
|
123
|
+
<WakaThreadView {...args} />
|
|
124
|
+
</div>
|
|
125
|
+
),
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export const Closed: Story = {
|
|
129
|
+
args: {
|
|
130
|
+
thread: {
|
|
131
|
+
...sampleThread,
|
|
132
|
+
isClosed: true,
|
|
133
|
+
},
|
|
134
|
+
currentUser,
|
|
135
|
+
showReplyInput: false,
|
|
136
|
+
},
|
|
137
|
+
render: (args) => (
|
|
138
|
+
<div style={{ maxWidth: 600 }}>
|
|
139
|
+
<WakaThreadView {...args} />
|
|
140
|
+
</div>
|
|
141
|
+
),
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -1,44 +1,37 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { WakaTimeline } from
|
|
3
|
-
import
|
|
4
|
-
import * as React from 'react'
|
|
5
|
-
import { Package, Truck, CheckCircle, Clock, AlertTriangle, MessageSquare, User, GitCommit } from 'lucide-react'
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaTimeline, type TimelineItem } from "./index"
|
|
3
|
+
import { Check, Clock, AlertCircle, Package, Truck, Home, CreditCard, Star } from "lucide-react"
|
|
6
4
|
|
|
7
5
|
const meta: Meta<typeof WakaTimeline> = {
|
|
8
|
-
title:
|
|
6
|
+
title: "Navigation/WakaTimeline",
|
|
9
7
|
component: WakaTimeline,
|
|
10
8
|
parameters: {
|
|
11
|
-
layout:
|
|
12
|
-
docs: {
|
|
13
|
-
description: {
|
|
14
|
-
component: 'A timeline component for displaying events, activities, or steps in chronological order.',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
9
|
+
layout: "padded",
|
|
17
10
|
},
|
|
18
|
-
tags: [
|
|
11
|
+
tags: ["autodocs"],
|
|
19
12
|
argTypes: {
|
|
20
13
|
orientation: {
|
|
21
|
-
control:
|
|
22
|
-
options: [
|
|
23
|
-
description:
|
|
14
|
+
control: "select",
|
|
15
|
+
options: ["vertical", "horizontal"],
|
|
16
|
+
description: "Orientation de la timeline",
|
|
24
17
|
},
|
|
25
18
|
linePosition: {
|
|
26
|
-
control:
|
|
27
|
-
options: [
|
|
28
|
-
description:
|
|
19
|
+
control: "select",
|
|
20
|
+
options: ["left", "center", "right"],
|
|
21
|
+
description: "Position de la ligne (vertical)",
|
|
29
22
|
},
|
|
30
23
|
size: {
|
|
31
|
-
control:
|
|
32
|
-
options: [
|
|
33
|
-
description:
|
|
24
|
+
control: "select",
|
|
25
|
+
options: ["sm", "md", "lg"],
|
|
26
|
+
description: "Taille des éléments",
|
|
34
27
|
},
|
|
35
|
-
|
|
36
|
-
control:
|
|
37
|
-
description:
|
|
28
|
+
animated: {
|
|
29
|
+
control: "boolean",
|
|
30
|
+
description: "Animations activées",
|
|
38
31
|
},
|
|
39
32
|
collapsible: {
|
|
40
|
-
control:
|
|
41
|
-
description:
|
|
33
|
+
control: "boolean",
|
|
34
|
+
description: "Éléments réductibles",
|
|
42
35
|
},
|
|
43
36
|
},
|
|
44
37
|
}
|
|
@@ -46,338 +39,192 @@ const meta: Meta<typeof WakaTimeline> = {
|
|
|
46
39
|
export default meta
|
|
47
40
|
type Story = StoryObj<typeof WakaTimeline>
|
|
48
41
|
|
|
49
|
-
const
|
|
42
|
+
const orderItems: TimelineItem[] = [
|
|
43
|
+
{
|
|
44
|
+
id: "1",
|
|
45
|
+
title: "Commande passée",
|
|
46
|
+
description: "Votre commande a été confirmée",
|
|
47
|
+
date: new Date("2024-01-10T10:30:00"),
|
|
48
|
+
status: "completed",
|
|
49
|
+
icon: <CreditCard className="tw-h-4 tw-w-4" />,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "2",
|
|
53
|
+
title: "En préparation",
|
|
54
|
+
description: "Votre colis est en cours de préparation",
|
|
55
|
+
date: new Date("2024-01-11T14:00:00"),
|
|
56
|
+
status: "completed",
|
|
57
|
+
icon: <Package className="tw-h-4 tw-w-4" />,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "3",
|
|
61
|
+
title: "Expédié",
|
|
62
|
+
description: "Votre colis a été remis au transporteur",
|
|
63
|
+
date: new Date("2024-01-12T09:00:00"),
|
|
64
|
+
status: "current",
|
|
65
|
+
icon: <Truck className="tw-h-4 tw-w-4" />,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "4",
|
|
69
|
+
title: "Livraison",
|
|
70
|
+
description: "Estimation: 13 janvier",
|
|
71
|
+
status: "pending",
|
|
72
|
+
icon: <Home className="tw-h-4 tw-w-4" />,
|
|
73
|
+
},
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
const projectItems: TimelineItem[] = [
|
|
77
|
+
{
|
|
78
|
+
id: "1",
|
|
79
|
+
title: "Lancement du projet",
|
|
80
|
+
description: "Réunion de kick-off avec l'équipe",
|
|
81
|
+
date: "Janvier 2024",
|
|
82
|
+
status: "completed",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "2",
|
|
86
|
+
title: "Phase de conception",
|
|
87
|
+
description: "Maquettes et spécifications techniques",
|
|
88
|
+
date: "Février 2024",
|
|
89
|
+
status: "completed",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "3",
|
|
93
|
+
title: "Développement",
|
|
94
|
+
description: "Implémentation des fonctionnalités principales",
|
|
95
|
+
date: "Mars - Avril 2024",
|
|
96
|
+
status: "current",
|
|
97
|
+
content: (
|
|
98
|
+
<div className="tw-mt-2 tw-p-3 tw-bg-muted tw-rounded-lg tw-text-sm">
|
|
99
|
+
<p className="tw-font-medium">Tâches en cours:</p>
|
|
100
|
+
<ul className="tw-list-disc tw-list-inside tw-mt-1">
|
|
101
|
+
<li>API Backend - 80%</li>
|
|
102
|
+
<li>Interface utilisateur - 60%</li>
|
|
103
|
+
<li>Tests unitaires - 40%</li>
|
|
104
|
+
</ul>
|
|
105
|
+
</div>
|
|
106
|
+
),
|
|
107
|
+
},
|
|
50
108
|
{
|
|
51
|
-
id:
|
|
52
|
-
title:
|
|
53
|
-
description:
|
|
54
|
-
date:
|
|
55
|
-
status:
|
|
109
|
+
id: "4",
|
|
110
|
+
title: "Tests & QA",
|
|
111
|
+
description: "Validation et corrections de bugs",
|
|
112
|
+
date: "Mai 2024",
|
|
113
|
+
status: "pending",
|
|
56
114
|
},
|
|
57
115
|
{
|
|
58
|
-
id:
|
|
59
|
-
title:
|
|
60
|
-
description:
|
|
61
|
-
date:
|
|
62
|
-
status:
|
|
116
|
+
id: "5",
|
|
117
|
+
title: "Mise en production",
|
|
118
|
+
description: "Déploiement et lancement officiel",
|
|
119
|
+
date: "Juin 2024",
|
|
120
|
+
status: "pending",
|
|
121
|
+
},
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
const errorItems: TimelineItem[] = [
|
|
125
|
+
{
|
|
126
|
+
id: "1",
|
|
127
|
+
title: "Paiement initié",
|
|
128
|
+
date: new Date(),
|
|
129
|
+
status: "completed",
|
|
63
130
|
},
|
|
64
131
|
{
|
|
65
|
-
id:
|
|
66
|
-
title:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
status: 'current',
|
|
132
|
+
id: "2",
|
|
133
|
+
title: "Vérification",
|
|
134
|
+
date: new Date(),
|
|
135
|
+
status: "completed",
|
|
70
136
|
},
|
|
71
137
|
{
|
|
72
|
-
id:
|
|
73
|
-
title:
|
|
74
|
-
description:
|
|
75
|
-
date: new Date(
|
|
76
|
-
status:
|
|
138
|
+
id: "3",
|
|
139
|
+
title: "Erreur de transaction",
|
|
140
|
+
description: "Le paiement a été refusé par votre banque",
|
|
141
|
+
date: new Date(),
|
|
142
|
+
status: "error",
|
|
143
|
+
icon: <AlertCircle className="tw-h-4 tw-w-4" />,
|
|
77
144
|
},
|
|
78
145
|
]
|
|
79
146
|
|
|
80
147
|
export const Default: Story = {
|
|
81
148
|
args: {
|
|
82
|
-
items:
|
|
83
|
-
|
|
149
|
+
items: orderItems,
|
|
150
|
+
orientation: "vertical",
|
|
151
|
+
animated: true,
|
|
84
152
|
},
|
|
153
|
+
render: (args) => (
|
|
154
|
+
<div style={{ maxWidth: 500 }}>
|
|
155
|
+
<WakaTimeline {...args} />
|
|
156
|
+
</div>
|
|
157
|
+
),
|
|
85
158
|
}
|
|
86
159
|
|
|
87
160
|
export const Horizontal: Story = {
|
|
88
161
|
args: {
|
|
89
|
-
items:
|
|
90
|
-
orientation:
|
|
91
|
-
className: 'w-[800px]',
|
|
162
|
+
items: orderItems,
|
|
163
|
+
orientation: "horizontal",
|
|
92
164
|
},
|
|
165
|
+
render: (args) => <WakaTimeline {...args} />,
|
|
93
166
|
}
|
|
94
167
|
|
|
95
|
-
export const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
title: 'Order Confirmed',
|
|
101
|
-
description: 'Order #12345 has been placed',
|
|
102
|
-
date: new Date('2024-01-15'),
|
|
103
|
-
status: 'completed',
|
|
104
|
-
icon: <Package className="h-4 w-4" />,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: '2',
|
|
108
|
-
title: 'Shipped',
|
|
109
|
-
description: 'Package handed to carrier',
|
|
110
|
-
date: new Date('2024-01-16'),
|
|
111
|
-
status: 'completed',
|
|
112
|
-
icon: <Truck className="h-4 w-4" />,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: '3',
|
|
116
|
-
title: 'Out for Delivery',
|
|
117
|
-
description: 'Driver en route',
|
|
118
|
-
date: new Date('2024-01-17'),
|
|
119
|
-
status: 'current',
|
|
120
|
-
icon: <Clock className="h-4 w-4" />,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: '4',
|
|
124
|
-
title: 'Delivered',
|
|
125
|
-
description: 'Package delivered',
|
|
126
|
-
date: new Date('2024-01-17'),
|
|
127
|
-
status: 'pending',
|
|
128
|
-
icon: <CheckCircle className="h-4 w-4" />,
|
|
129
|
-
},
|
|
130
|
-
]
|
|
131
|
-
|
|
132
|
-
return <WakaTimeline items={items} className="w-[400px]" />
|
|
168
|
+
export const ProjectTimeline: Story = {
|
|
169
|
+
args: {
|
|
170
|
+
items: projectItems,
|
|
171
|
+
orientation: "vertical",
|
|
172
|
+
collapsible: true,
|
|
133
173
|
},
|
|
174
|
+
render: (args) => (
|
|
175
|
+
<div style={{ maxWidth: 600 }}>
|
|
176
|
+
<WakaTimeline {...args} />
|
|
177
|
+
</div>
|
|
178
|
+
),
|
|
134
179
|
}
|
|
135
180
|
|
|
136
|
-
export const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
id: '1',
|
|
141
|
-
title: 'Task Completed',
|
|
142
|
-
description: 'Initial setup done',
|
|
143
|
-
status: 'completed',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: '2',
|
|
147
|
-
title: 'In Progress',
|
|
148
|
-
description: 'Currently working on this',
|
|
149
|
-
status: 'current',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
id: '3',
|
|
153
|
-
title: 'Error Occurred',
|
|
154
|
-
description: 'Something went wrong',
|
|
155
|
-
status: 'error',
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: '4',
|
|
159
|
-
title: 'Pending',
|
|
160
|
-
description: 'Waiting to start',
|
|
161
|
-
status: 'pending',
|
|
162
|
-
},
|
|
163
|
-
]
|
|
164
|
-
|
|
165
|
-
return <WakaTimeline items={items} showDates={false} className="w-[400px]" />
|
|
181
|
+
export const WithError: Story = {
|
|
182
|
+
args: {
|
|
183
|
+
items: errorItems,
|
|
184
|
+
orientation: "vertical",
|
|
166
185
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
render: () => (
|
|
171
|
-
<div className="flex gap-12">
|
|
172
|
-
<div>
|
|
173
|
-
<p className="text-sm text-muted-foreground mb-4">Small</p>
|
|
174
|
-
<WakaTimeline items={basicItems.slice(0, 3)} size="sm" className="w-[250px]" />
|
|
175
|
-
</div>
|
|
176
|
-
<div>
|
|
177
|
-
<p className="text-sm text-muted-foreground mb-4">Medium</p>
|
|
178
|
-
<WakaTimeline items={basicItems.slice(0, 3)} size="md" className="w-[300px]" />
|
|
179
|
-
</div>
|
|
180
|
-
<div>
|
|
181
|
-
<p className="text-sm text-muted-foreground mb-4">Large</p>
|
|
182
|
-
<WakaTimeline items={basicItems.slice(0, 3)} size="lg" className="w-[350px]" />
|
|
183
|
-
</div>
|
|
186
|
+
render: (args) => (
|
|
187
|
+
<div style={{ maxWidth: 400 }}>
|
|
188
|
+
<WakaTimeline {...args} />
|
|
184
189
|
</div>
|
|
185
190
|
),
|
|
186
191
|
}
|
|
187
192
|
|
|
188
|
-
export const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
content: (
|
|
198
|
-
<div className="space-y-2">
|
|
199
|
-
<p className="text-sm">Created repository and initial project structure.</p>
|
|
200
|
-
<ul className="text-xs text-muted-foreground list-disc pl-4">
|
|
201
|
-
<li>Setup package.json</li>
|
|
202
|
-
<li>Added TypeScript config</li>
|
|
203
|
-
<li>Created src directory</li>
|
|
204
|
-
</ul>
|
|
205
|
-
</div>
|
|
206
|
-
),
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
id: '2',
|
|
210
|
-
title: 'Feature Development',
|
|
211
|
-
description: 'Added core features',
|
|
212
|
-
date: new Date('2024-01-12'),
|
|
213
|
-
status: 'completed',
|
|
214
|
-
content: (
|
|
215
|
-
<div className="space-y-2">
|
|
216
|
-
<p className="text-sm">Implemented main functionality.</p>
|
|
217
|
-
<div className="flex gap-2">
|
|
218
|
-
<span className="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded">+500 lines</span>
|
|
219
|
-
<span className="text-xs bg-green-100 text-green-700 px-2 py-0.5 rounded">3 commits</span>
|
|
220
|
-
</div>
|
|
221
|
-
</div>
|
|
222
|
-
),
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
id: '3',
|
|
226
|
-
title: 'Testing',
|
|
227
|
-
description: 'In progress',
|
|
228
|
-
date: new Date('2024-01-15'),
|
|
229
|
-
status: 'current',
|
|
230
|
-
content: (
|
|
231
|
-
<div className="space-y-2">
|
|
232
|
-
<p className="text-sm">Writing unit and integration tests.</p>
|
|
233
|
-
<div className="w-full bg-muted rounded-full h-2">
|
|
234
|
-
<div className="bg-primary h-2 rounded-full w-[60%]" />
|
|
235
|
-
</div>
|
|
236
|
-
<p className="text-xs text-muted-foreground">60% complete</p>
|
|
193
|
+
export const CenteredLine: Story = {
|
|
194
|
+
args: {
|
|
195
|
+
items: orderItems,
|
|
196
|
+
orientation: "vertical",
|
|
197
|
+
linePosition: "center",
|
|
198
|
+
},
|
|
199
|
+
render: (args) => (
|
|
200
|
+
<div style={{ maxWidth: 600 }}>
|
|
201
|
+
<WakaTimeline {...args} />
|
|
237
202
|
</div>
|
|
238
203
|
),
|
|
239
|
-
},
|
|
240
|
-
]
|
|
241
|
-
|
|
242
|
-
return <WakaTimeline items={items} collapsible className="w-[450px]" />
|
|
243
|
-
},
|
|
244
204
|
}
|
|
245
205
|
|
|
246
|
-
export const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
title: 'Design Phase',
|
|
252
|
-
description: 'UI/UX design completed',
|
|
253
|
-
status: 'completed',
|
|
254
|
-
color: '#8B5CF6', // Purple
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
id: '2',
|
|
258
|
-
title: 'Development',
|
|
259
|
-
description: 'Frontend development',
|
|
260
|
-
status: 'completed',
|
|
261
|
-
color: '#3B82F6', // Blue
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
id: '3',
|
|
265
|
-
title: 'Review',
|
|
266
|
-
description: 'Code review in progress',
|
|
267
|
-
status: 'current',
|
|
268
|
-
color: '#F59E0B', // Amber
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
id: '4',
|
|
272
|
-
title: 'Deployment',
|
|
273
|
-
description: 'Ready for production',
|
|
274
|
-
status: 'pending',
|
|
275
|
-
color: '#10B981', // Green
|
|
276
|
-
},
|
|
277
|
-
]
|
|
278
|
-
|
|
279
|
-
return <WakaTimeline items={items} showDates={false} className="w-[400px]" />
|
|
206
|
+
export const SmallSize: Story = {
|
|
207
|
+
args: {
|
|
208
|
+
items: orderItems,
|
|
209
|
+
orientation: "vertical",
|
|
210
|
+
size: "sm",
|
|
280
211
|
},
|
|
212
|
+
render: (args) => (
|
|
213
|
+
<div style={{ maxWidth: 400 }}>
|
|
214
|
+
<WakaTimeline {...args} />
|
|
215
|
+
</div>
|
|
216
|
+
),
|
|
281
217
|
}
|
|
282
218
|
|
|
283
|
-
export const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
title: 'John commented on your post',
|
|
289
|
-
description: '"Great work on this feature!"',
|
|
290
|
-
date: new Date(Date.now() - 3600000),
|
|
291
|
-
status: 'completed',
|
|
292
|
-
icon: <MessageSquare className="h-4 w-4 text-blue-500" />,
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
id: '2',
|
|
296
|
-
title: 'New follower',
|
|
297
|
-
description: 'Jane started following you',
|
|
298
|
-
date: new Date(Date.now() - 7200000),
|
|
299
|
-
status: 'completed',
|
|
300
|
-
icon: <User className="h-4 w-4 text-green-500" />,
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
id: '3',
|
|
304
|
-
title: 'Deployment successful',
|
|
305
|
-
description: 'v2.1.0 deployed to production',
|
|
306
|
-
date: new Date(Date.now() - 14400000),
|
|
307
|
-
status: 'completed',
|
|
308
|
-
icon: <GitCommit className="h-4 w-4 text-purple-500" />,
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
id: '4',
|
|
312
|
-
title: 'Warning',
|
|
313
|
-
description: 'High CPU usage detected',
|
|
314
|
-
date: new Date(Date.now() - 21600000),
|
|
315
|
-
status: 'error',
|
|
316
|
-
icon: <AlertTriangle className="h-4 w-4" />,
|
|
317
|
-
},
|
|
318
|
-
]
|
|
319
|
-
|
|
320
|
-
return (
|
|
321
|
-
<div className="border rounded-lg p-4 w-[450px]">
|
|
322
|
-
<h3 className="font-semibold mb-4">Recent Activity</h3>
|
|
323
|
-
<WakaTimeline items={activities} size="sm" />
|
|
324
|
-
</div>
|
|
325
|
-
)
|
|
219
|
+
export const LargeSize: Story = {
|
|
220
|
+
args: {
|
|
221
|
+
items: projectItems,
|
|
222
|
+
orientation: "vertical",
|
|
223
|
+
size: "lg",
|
|
326
224
|
},
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
render: () => {
|
|
331
|
-
const trackingItems: TimelineItem[] = [
|
|
332
|
-
{
|
|
333
|
-
id: '1',
|
|
334
|
-
title: 'Order Confirmed',
|
|
335
|
-
description: 'Your order #ORD-2024-001 has been confirmed',
|
|
336
|
-
date: new Date('2024-01-15T09:30:00'),
|
|
337
|
-
status: 'completed',
|
|
338
|
-
icon: <CheckCircle className="h-4 w-4" />,
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
id: '2',
|
|
342
|
-
title: 'Payment Received',
|
|
343
|
-
description: 'Payment of $129.99 processed successfully',
|
|
344
|
-
date: new Date('2024-01-15T09:32:00'),
|
|
345
|
-
status: 'completed',
|
|
346
|
-
icon: <CheckCircle className="h-4 w-4" />,
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
id: '3',
|
|
350
|
-
title: 'Preparing Shipment',
|
|
351
|
-
description: 'Your items are being packed',
|
|
352
|
-
date: new Date('2024-01-16T14:00:00'),
|
|
353
|
-
status: 'completed',
|
|
354
|
-
icon: <Package className="h-4 w-4" />,
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
id: '4',
|
|
358
|
-
title: 'Shipped',
|
|
359
|
-
description: 'Package handed to FedEx - Tracking: FX123456789',
|
|
360
|
-
date: new Date('2024-01-17T08:00:00'),
|
|
361
|
-
status: 'current',
|
|
362
|
-
icon: <Truck className="h-4 w-4" />,
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
id: '5',
|
|
366
|
-
title: 'Delivery',
|
|
367
|
-
description: 'Estimated: Jan 20, 2024',
|
|
368
|
-
status: 'pending',
|
|
369
|
-
icon: <Clock className="h-4 w-4" />,
|
|
370
|
-
},
|
|
371
|
-
]
|
|
372
|
-
|
|
373
|
-
return (
|
|
374
|
-
<div className="border rounded-lg p-6 w-[500px]">
|
|
375
|
-
<div className="mb-6">
|
|
376
|
-
<h3 className="font-semibold text-lg">Order Status</h3>
|
|
377
|
-
<p className="text-sm text-muted-foreground">Track your order progress</p>
|
|
225
|
+
render: (args) => (
|
|
226
|
+
<div style={{ maxWidth: 700 }}>
|
|
227
|
+
<WakaTimeline {...args} />
|
|
378
228
|
</div>
|
|
379
|
-
|
|
380
|
-
</div>
|
|
381
|
-
)
|
|
382
|
-
},
|
|
229
|
+
),
|
|
383
230
|
}
|