@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,70 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaResourcePool, type ResourcePool } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaResourcePool> = {
|
|
5
|
+
title: "DevOps/WakaResourcePool",
|
|
6
|
+
component: WakaResourcePool,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
variant: { control: "select", options: ["blocks", "bar", "liquid"], description: "Style visuel" },
|
|
11
|
+
showLabels: { control: "boolean", description: "Afficher les labels" },
|
|
12
|
+
showCapacity: { control: "boolean", description: "Afficher la capacité" },
|
|
13
|
+
animated: { control: "boolean", description: "Animations" },
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof WakaResourcePool>
|
|
19
|
+
|
|
20
|
+
const pools: ResourcePool[] = [
|
|
21
|
+
{ id: "cpu", name: "CPU", total: 100, used: 65, reserved: 10, type: "compute", unit: "%" },
|
|
22
|
+
{ id: "memory", name: "Memory", total: 128, used: 96, reserved: 16, type: "memory", unit: "GB" },
|
|
23
|
+
{ id: "storage", name: "Storage", total: 1000, used: 450, type: "storage", unit: "GB" },
|
|
24
|
+
{ id: "network", name: "Network", total: 1000, used: 200, type: "network", unit: "Mbps" },
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
args: { pools, variant: "bar", showLabels: true, showCapacity: true },
|
|
29
|
+
render: (args) => (
|
|
30
|
+
<div style={{ width: 400 }}>
|
|
31
|
+
<WakaResourcePool {...args} />
|
|
32
|
+
</div>
|
|
33
|
+
),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Blocks: Story = {
|
|
37
|
+
args: { pools, variant: "blocks", showLabels: true },
|
|
38
|
+
render: (args) => (
|
|
39
|
+
<div style={{ width: 500 }}>
|
|
40
|
+
<WakaResourcePool {...args} />
|
|
41
|
+
</div>
|
|
42
|
+
),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const Liquid: Story = {
|
|
46
|
+
args: { pools: pools.slice(0, 2), variant: "liquid", showLabels: true, animated: true },
|
|
47
|
+
render: (args) => (
|
|
48
|
+
<div style={{ width: 300 }}>
|
|
49
|
+
<WakaResourcePool {...args} />
|
|
50
|
+
</div>
|
|
51
|
+
),
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const Critical: Story = {
|
|
55
|
+
args: {
|
|
56
|
+
pools: [
|
|
57
|
+
{ id: "cpu", name: "CPU", total: 100, used: 95, type: "compute", unit: "%" },
|
|
58
|
+
{ id: "memory", name: "Memory", total: 128, used: 125, type: "memory", unit: "GB" },
|
|
59
|
+
],
|
|
60
|
+
variant: "bar",
|
|
61
|
+
showLabels: true,
|
|
62
|
+
showCapacity: true,
|
|
63
|
+
},
|
|
64
|
+
render: (args) => (
|
|
65
|
+
<div style={{ width: 400 }}>
|
|
66
|
+
<WakaResourcePool {...args} />
|
|
67
|
+
</div>
|
|
68
|
+
),
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -1,31 +1,46 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { WakaRichTextEditor } from
|
|
3
|
-
import
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaRichTextEditor } from "./index"
|
|
3
|
+
import { useState } from "react"
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof WakaRichTextEditor> = {
|
|
6
|
-
title:
|
|
6
|
+
title: "Forms/WakaRichTextEditor",
|
|
7
7
|
component: WakaRichTextEditor,
|
|
8
8
|
parameters: {
|
|
9
|
-
layout:
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: 'A rich text editor with toolbar, formatting options, and character count.',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
9
|
+
layout: "padded",
|
|
15
10
|
},
|
|
16
|
-
tags: [
|
|
11
|
+
tags: ["autodocs"],
|
|
17
12
|
argTypes: {
|
|
18
|
-
|
|
19
|
-
control:
|
|
20
|
-
description:
|
|
13
|
+
placeholder: {
|
|
14
|
+
control: "text",
|
|
15
|
+
description: "Texte placeholder",
|
|
21
16
|
},
|
|
22
17
|
disabled: {
|
|
23
|
-
control:
|
|
24
|
-
description:
|
|
18
|
+
control: "boolean",
|
|
19
|
+
description: "État désactivé",
|
|
20
|
+
},
|
|
21
|
+
readOnly: {
|
|
22
|
+
control: "boolean",
|
|
23
|
+
description: "Mode lecture seule",
|
|
24
|
+
},
|
|
25
|
+
showToolbar: {
|
|
26
|
+
control: "boolean",
|
|
27
|
+
description: "Afficher la barre d'outils",
|
|
28
|
+
},
|
|
29
|
+
minHeight: {
|
|
30
|
+
control: "number",
|
|
31
|
+
description: "Hauteur minimale en pixels",
|
|
32
|
+
},
|
|
33
|
+
maxHeight: {
|
|
34
|
+
control: "number",
|
|
35
|
+
description: "Hauteur maximale en pixels",
|
|
25
36
|
},
|
|
26
|
-
|
|
27
|
-
control:
|
|
28
|
-
description:
|
|
37
|
+
label: {
|
|
38
|
+
control: "text",
|
|
39
|
+
description: "Label du champ",
|
|
40
|
+
},
|
|
41
|
+
error: {
|
|
42
|
+
control: "text",
|
|
43
|
+
description: "Message d'erreur",
|
|
29
44
|
},
|
|
30
45
|
},
|
|
31
46
|
}
|
|
@@ -34,205 +49,101 @@ export default meta
|
|
|
34
49
|
type Story = StoryObj<typeof WakaRichTextEditor>
|
|
35
50
|
|
|
36
51
|
export const Default: Story = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<WakaRichTextEditor
|
|
43
|
-
value={content}
|
|
44
|
-
onChange={setContent}
|
|
45
|
-
label="Content"
|
|
46
|
-
placeholder="Write something..."
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
)
|
|
50
|
-
},
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const WithCharacterCount: Story = {
|
|
54
|
-
render: function CharCountDemo() {
|
|
55
|
-
const [content, setContent] = React.useState('')
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<div className="w-[600px]">
|
|
59
|
-
<WakaRichTextEditor
|
|
60
|
-
value={content}
|
|
61
|
-
onChange={setContent}
|
|
62
|
-
label="Description"
|
|
63
|
-
showCharacterCount
|
|
64
|
-
maxLength={500}
|
|
65
|
-
placeholder="Enter description (max 500 characters)"
|
|
66
|
-
/>
|
|
67
|
-
</div>
|
|
68
|
-
)
|
|
52
|
+
args: {
|
|
53
|
+
placeholder: "Commencez à écrire...",
|
|
54
|
+
showToolbar: true,
|
|
55
|
+
minHeight: 200,
|
|
56
|
+
label: "Contenu",
|
|
69
57
|
},
|
|
58
|
+
render: (args) => (
|
|
59
|
+
<div style={{ maxWidth: 700 }}>
|
|
60
|
+
<WakaRichTextEditor {...args} />
|
|
61
|
+
</div>
|
|
62
|
+
),
|
|
70
63
|
}
|
|
71
64
|
|
|
72
|
-
export const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<WakaRichTextEditor
|
|
79
|
-
value={content}
|
|
80
|
-
onChange={setContent}
|
|
81
|
-
label="Simple Editor"
|
|
82
|
-
toolbar={[
|
|
83
|
-
['bold', 'italic', 'underline'],
|
|
84
|
-
['bulletList', 'orderedList'],
|
|
85
|
-
['undo', 'redo'],
|
|
86
|
-
]}
|
|
87
|
-
placeholder="Simple toolbar..."
|
|
88
|
-
/>
|
|
89
|
-
</div>
|
|
90
|
-
)
|
|
65
|
+
export const WithContent: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
content: "<h2>Titre de l'article</h2><p>Voici un paragraphe avec du <strong>texte en gras</strong> et du <em>texte en italique</em>.</p><ul><li>Premier élément</li><li>Deuxième élément</li></ul>",
|
|
68
|
+
showToolbar: true,
|
|
69
|
+
minHeight: 200,
|
|
70
|
+
label: "Article",
|
|
91
71
|
},
|
|
72
|
+
render: (args) => (
|
|
73
|
+
<div style={{ maxWidth: 700 }}>
|
|
74
|
+
<WakaRichTextEditor {...args} />
|
|
75
|
+
</div>
|
|
76
|
+
),
|
|
92
77
|
}
|
|
93
78
|
|
|
94
|
-
export const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<WakaRichTextEditor
|
|
101
|
-
value={content}
|
|
102
|
-
onChange={setContent}
|
|
103
|
-
label="Full Editor"
|
|
104
|
-
toolbar={[
|
|
105
|
-
['bold', 'italic', 'underline', 'strike'],
|
|
106
|
-
['h1', 'h2', 'h3'],
|
|
107
|
-
['bulletList', 'orderedList', 'blockquote'],
|
|
108
|
-
['alignLeft', 'alignCenter', 'alignRight'],
|
|
109
|
-
['link', 'code'],
|
|
110
|
-
['undo', 'redo'],
|
|
111
|
-
]}
|
|
112
|
-
minHeight={300}
|
|
113
|
-
showCharacterCount
|
|
114
|
-
/>
|
|
115
|
-
</div>
|
|
116
|
-
)
|
|
79
|
+
export const ReadOnly: Story = {
|
|
80
|
+
args: {
|
|
81
|
+
content: "<h2>Contenu en lecture seule</h2><p>Ce contenu ne peut pas être modifié.</p><blockquote>Citation importante</blockquote>",
|
|
82
|
+
readOnly: true,
|
|
83
|
+
showToolbar: false,
|
|
84
|
+
minHeight: 150,
|
|
117
85
|
},
|
|
86
|
+
render: (args) => (
|
|
87
|
+
<div style={{ maxWidth: 700 }}>
|
|
88
|
+
<WakaRichTextEditor {...args} />
|
|
89
|
+
</div>
|
|
90
|
+
),
|
|
118
91
|
}
|
|
119
92
|
|
|
120
|
-
export const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
value={content}
|
|
128
|
-
onChange={setContent}
|
|
129
|
-
label="Article Content"
|
|
130
|
-
description="Write your article content. Use the toolbar to format text."
|
|
131
|
-
placeholder="Start writing your article..."
|
|
132
|
-
minHeight={250}
|
|
133
|
-
/>
|
|
134
|
-
</div>
|
|
135
|
-
)
|
|
93
|
+
export const Disabled: Story = {
|
|
94
|
+
args: {
|
|
95
|
+
placeholder: "Éditeur désactivé",
|
|
96
|
+
disabled: true,
|
|
97
|
+
showToolbar: true,
|
|
98
|
+
minHeight: 150,
|
|
99
|
+
label: "Contenu désactivé",
|
|
136
100
|
},
|
|
101
|
+
render: (args) => (
|
|
102
|
+
<div style={{ maxWidth: 700 }}>
|
|
103
|
+
<WakaRichTextEditor {...args} />
|
|
104
|
+
</div>
|
|
105
|
+
),
|
|
137
106
|
}
|
|
138
107
|
|
|
139
108
|
export const WithError: Story = {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
value={content}
|
|
147
|
-
onChange={setContent}
|
|
148
|
-
label="Required Content"
|
|
149
|
-
error="Content is required"
|
|
150
|
-
placeholder="Enter required content..."
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
)
|
|
109
|
+
args: {
|
|
110
|
+
placeholder: "Commencez à écrire...",
|
|
111
|
+
showToolbar: true,
|
|
112
|
+
minHeight: 150,
|
|
113
|
+
label: "Description",
|
|
114
|
+
error: "Le contenu est obligatoire et doit contenir au moins 100 caractères",
|
|
154
115
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
render: () => (
|
|
159
|
-
<div className="w-[600px]">
|
|
160
|
-
<WakaRichTextEditor
|
|
161
|
-
value="<p>This content cannot be edited.</p>"
|
|
162
|
-
label="Disabled Editor"
|
|
163
|
-
disabled
|
|
164
|
-
/>
|
|
116
|
+
render: (args) => (
|
|
117
|
+
<div style={{ maxWidth: 700 }}>
|
|
118
|
+
<WakaRichTextEditor {...args} />
|
|
165
119
|
</div>
|
|
166
120
|
),
|
|
167
121
|
}
|
|
168
122
|
|
|
169
|
-
export const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
123
|
+
export const MinimalToolbar: Story = {
|
|
124
|
+
args: {
|
|
125
|
+
placeholder: "Écrivez ici...",
|
|
126
|
+
showToolbar: true,
|
|
127
|
+
minHeight: 100,
|
|
128
|
+
maxHeight: 300,
|
|
129
|
+
},
|
|
130
|
+
render: (args) => (
|
|
131
|
+
<div style={{ maxWidth: 500 }}>
|
|
132
|
+
<WakaRichTextEditor {...args} />
|
|
177
133
|
</div>
|
|
178
134
|
),
|
|
179
135
|
}
|
|
180
136
|
|
|
181
|
-
export const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<WakaRichTextEditor
|
|
188
|
-
value={content}
|
|
189
|
-
onChange={setContent}
|
|
190
|
-
label="Short Note"
|
|
191
|
-
minHeight={100}
|
|
192
|
-
toolbar={[['bold', 'italic'], ['undo', 'redo']]}
|
|
193
|
-
placeholder="Quick note..."
|
|
194
|
-
/>
|
|
195
|
-
</div>
|
|
196
|
-
)
|
|
197
|
-
},
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export const BlogPostEditor: Story = {
|
|
201
|
-
render: function BlogPostDemo() {
|
|
202
|
-
const [content, setContent] = React.useState('')
|
|
203
|
-
|
|
204
|
-
return (
|
|
205
|
-
<div className="w-[700px] space-y-4 p-4 border rounded-lg">
|
|
206
|
-
<div>
|
|
207
|
-
<h3 className="font-semibold text-lg">Create Blog Post</h3>
|
|
208
|
-
<p className="text-sm text-muted-foreground">
|
|
209
|
-
Write and format your blog post content
|
|
210
|
-
</p>
|
|
211
|
-
</div>
|
|
212
|
-
<div className="space-y-2">
|
|
213
|
-
<label className="text-sm font-medium">Title</label>
|
|
214
|
-
<input
|
|
215
|
-
type="text"
|
|
216
|
-
className="w-full px-3 py-2 border rounded-md"
|
|
217
|
-
placeholder="Enter post title..."
|
|
218
|
-
/>
|
|
219
|
-
</div>
|
|
220
|
-
<WakaRichTextEditor
|
|
221
|
-
value={content}
|
|
222
|
-
onChange={setContent}
|
|
223
|
-
label="Content"
|
|
224
|
-
minHeight={350}
|
|
225
|
-
showCharacterCount
|
|
226
|
-
toolbar={[
|
|
227
|
-
['bold', 'italic', 'underline'],
|
|
228
|
-
['h2', 'h3'],
|
|
229
|
-
['bulletList', 'orderedList', 'blockquote'],
|
|
230
|
-
['link', 'code'],
|
|
231
|
-
['undo', 'redo'],
|
|
232
|
-
]}
|
|
233
|
-
placeholder="Write your blog post content..."
|
|
234
|
-
/>
|
|
235
|
-
</div>
|
|
236
|
-
)
|
|
137
|
+
export const LargeEditor: Story = {
|
|
138
|
+
args: {
|
|
139
|
+
placeholder: "Rédigez votre article complet...",
|
|
140
|
+
showToolbar: true,
|
|
141
|
+
minHeight: 400,
|
|
142
|
+
label: "Article de blog",
|
|
237
143
|
},
|
|
144
|
+
render: (args) => (
|
|
145
|
+
<div style={{ maxWidth: 900 }}>
|
|
146
|
+
<WakaRichTextEditor {...args} />
|
|
147
|
+
</div>
|
|
148
|
+
),
|
|
238
149
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaRollbackSlider, type DeploymentVersion } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaRollbackSlider> = {
|
|
5
|
+
title: "DevOps/WakaRollbackSlider",
|
|
6
|
+
component: WakaRollbackSlider,
|
|
7
|
+
parameters: { layout: "padded" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
showHealth: { control: "boolean", description: "Afficher l'état de santé" },
|
|
11
|
+
showCommitInfo: { control: "boolean", description: "Afficher les infos de commit" },
|
|
12
|
+
allowRollback: { control: "boolean", description: "Permettre le rollback" },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof WakaRollbackSlider>
|
|
18
|
+
|
|
19
|
+
const versions: DeploymentVersion[] = [
|
|
20
|
+
{ id: "v5", version: "v2.1.0", commit: "abc1234", commitMessage: "feat: add new dashboard", health: "healthy", deployedAt: new Date() },
|
|
21
|
+
{ id: "v4", version: "v2.0.1", commit: "def5678", commitMessage: "fix: performance issue", health: "healthy", deployedAt: new Date(Date.now() - 86400000) },
|
|
22
|
+
{ id: "v3", version: "v2.0.0", commit: "ghi9012", commitMessage: "feat: major update", health: "degraded", deployedAt: new Date(Date.now() - 172800000) },
|
|
23
|
+
{ id: "v2", version: "v1.5.2", commit: "jkl3456", commitMessage: "fix: security patch", health: "healthy", deployedAt: new Date(Date.now() - 259200000) },
|
|
24
|
+
{ id: "v1", version: "v1.5.1", commit: "mno7890", commitMessage: "chore: dependencies", health: "unhealthy", deployedAt: new Date(Date.now() - 345600000) },
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
args: { versions, currentVersion: "v5", showHealth: true, showCommitInfo: true, allowRollback: true },
|
|
29
|
+
render: (args) => <WakaRollbackSlider {...args} />,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const WithDegraded: Story = {
|
|
33
|
+
args: { versions, currentVersion: "v3", showHealth: true, showCommitInfo: true, allowRollback: true },
|
|
34
|
+
render: (args) => <WakaRollbackSlider {...args} />,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const ReadOnly: Story = {
|
|
38
|
+
args: { versions, currentVersion: "v5", showHealth: true, allowRollback: false },
|
|
39
|
+
render: (args) => <WakaRollbackSlider {...args} />,
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaSchedulePicker } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaSchedulePicker> = {
|
|
5
|
+
title: "Forms/WakaSchedulePicker",
|
|
6
|
+
component: WakaSchedulePicker,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
mode: { control: "select", options: ["single", "range", "recurring"], description: "Mode" },
|
|
11
|
+
showTime: { control: "boolean", description: "Afficher l'heure" },
|
|
12
|
+
showTimezone: { control: "boolean", description: "Afficher le fuseau" },
|
|
13
|
+
disabled: { control: "boolean", description: "Désactivé" },
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof WakaSchedulePicker>
|
|
19
|
+
|
|
20
|
+
export const Default: Story = {
|
|
21
|
+
args: { mode: "single", showTime: true, showTimezone: true },
|
|
22
|
+
render: (args) => (
|
|
23
|
+
<div style={{ width: 350 }}>
|
|
24
|
+
<WakaSchedulePicker {...args} />
|
|
25
|
+
</div>
|
|
26
|
+
),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const DateRange: Story = {
|
|
30
|
+
args: { mode: "range", showTime: false },
|
|
31
|
+
render: (args) => (
|
|
32
|
+
<div style={{ width: 350 }}>
|
|
33
|
+
<WakaSchedulePicker {...args} />
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const Recurring: Story = {
|
|
39
|
+
args: { mode: "recurring", showTime: true },
|
|
40
|
+
render: (args) => (
|
|
41
|
+
<div style={{ width: 400 }}>
|
|
42
|
+
<WakaSchedulePicker {...args} />
|
|
43
|
+
</div>
|
|
44
|
+
),
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const DateOnly: Story = {
|
|
48
|
+
args: { mode: "single", showTime: false, showTimezone: false },
|
|
49
|
+
render: (args) => (
|
|
50
|
+
<div style={{ width: 300 }}>
|
|
51
|
+
<WakaSchedulePicker {...args} />
|
|
52
|
+
</div>
|
|
53
|
+
),
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const Disabled: Story = {
|
|
57
|
+
args: { mode: "single", disabled: true },
|
|
58
|
+
render: (args) => (
|
|
59
|
+
<div style={{ width: 350 }}>
|
|
60
|
+
<WakaSchedulePicker {...args} />
|
|
61
|
+
</div>
|
|
62
|
+
),
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaSeasonPass, SeasonPassLevel } from "./index"
|
|
3
|
+
|
|
4
|
+
const generateLevels = (count: number): SeasonPassLevel[] => {
|
|
5
|
+
return Array.from({ length: count }, (_, i) => ({
|
|
6
|
+
level: i + 1,
|
|
7
|
+
xpRequired: (i + 1) * 1000,
|
|
8
|
+
freeReward: {
|
|
9
|
+
type: i % 3 === 0 ? "xp" : i % 3 === 1 ? "currency" : "item",
|
|
10
|
+
value: i % 3 === 0 ? 100 * (i + 1) : i % 3 === 1 ? 50 * (i + 1) : `Item ${i + 1}`,
|
|
11
|
+
claimed: i < 5,
|
|
12
|
+
},
|
|
13
|
+
premiumReward: {
|
|
14
|
+
type: i % 4 === 0 ? "badge" : i % 4 === 1 ? "skin" : i % 4 === 2 ? "xp" : "currency",
|
|
15
|
+
value: i % 4 === 0 ? `Badge ${i + 1}` : i % 4 === 1 ? `Skin ${i + 1}` : i % 4 === 2 ? 500 * (i + 1) : 200 * (i + 1),
|
|
16
|
+
claimed: i < 5,
|
|
17
|
+
},
|
|
18
|
+
}))
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const sampleLevels = generateLevels(30)
|
|
22
|
+
|
|
23
|
+
const meta: Meta<typeof WakaSeasonPass> = {
|
|
24
|
+
title: "Components/Gamification/WakaSeasonPass",
|
|
25
|
+
component: WakaSeasonPass,
|
|
26
|
+
parameters: {
|
|
27
|
+
layout: "fullscreen",
|
|
28
|
+
},
|
|
29
|
+
tags: ["autodocs"],
|
|
30
|
+
argTypes: {
|
|
31
|
+
currentLevel: {
|
|
32
|
+
control: { type: "number", min: 1, max: 30 },
|
|
33
|
+
description: "Current player level",
|
|
34
|
+
},
|
|
35
|
+
currentXP: {
|
|
36
|
+
control: "number",
|
|
37
|
+
description: "Current XP amount",
|
|
38
|
+
},
|
|
39
|
+
isPremium: {
|
|
40
|
+
control: "boolean",
|
|
41
|
+
description: "Has premium pass",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default meta
|
|
47
|
+
type Story = StoryObj<typeof WakaSeasonPass>
|
|
48
|
+
|
|
49
|
+
export const FreeTier: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
levels: sampleLevels,
|
|
52
|
+
currentLevel: 8,
|
|
53
|
+
currentXP: 8500,
|
|
54
|
+
isPremium: false,
|
|
55
|
+
seasonEndsAt: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
|
|
56
|
+
},
|
|
57
|
+
render: (args) => (
|
|
58
|
+
<div className="p-4">
|
|
59
|
+
<WakaSeasonPass {...args} />
|
|
60
|
+
</div>
|
|
61
|
+
),
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const Premium: Story = {
|
|
65
|
+
args: {
|
|
66
|
+
levels: sampleLevels,
|
|
67
|
+
currentLevel: 12,
|
|
68
|
+
currentXP: 12800,
|
|
69
|
+
isPremium: true,
|
|
70
|
+
seasonEndsAt: new Date(Date.now() + 45 * 24 * 60 * 60 * 1000),
|
|
71
|
+
},
|
|
72
|
+
render: (args) => (
|
|
73
|
+
<div className="p-4">
|
|
74
|
+
<WakaSeasonPass {...args} />
|
|
75
|
+
</div>
|
|
76
|
+
),
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const EndingSoon: Story = {
|
|
80
|
+
args: {
|
|
81
|
+
levels: sampleLevels,
|
|
82
|
+
currentLevel: 20,
|
|
83
|
+
currentXP: 20500,
|
|
84
|
+
isPremium: true,
|
|
85
|
+
seasonEndsAt: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000),
|
|
86
|
+
},
|
|
87
|
+
render: (args) => (
|
|
88
|
+
<div className="p-4">
|
|
89
|
+
<WakaSeasonPass {...args} />
|
|
90
|
+
</div>
|
|
91
|
+
),
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const Completed: Story = {
|
|
95
|
+
args: {
|
|
96
|
+
levels: sampleLevels,
|
|
97
|
+
currentLevel: 30,
|
|
98
|
+
currentXP: 35000,
|
|
99
|
+
isPremium: true,
|
|
100
|
+
},
|
|
101
|
+
render: (args) => (
|
|
102
|
+
<div className="p-4">
|
|
103
|
+
<WakaSeasonPass {...args} />
|
|
104
|
+
</div>
|
|
105
|
+
),
|
|
106
|
+
}
|
|
107
|
+
|