|
| 1 | +import type { Meta, StoryObj } from "@storybook/react"; |
| 2 | +import { EnterpriseUpgradeOverlay } from "./enterprise-upgrade-overlay"; |
| 3 | + |
| 4 | +const meta: Meta<typeof EnterpriseUpgradeOverlay> = { |
| 5 | + component: EnterpriseUpgradeOverlay, |
| 6 | + title: "UI/EnterpriseUpgradeOverlay", |
| 7 | + argTypes: { |
| 8 | + title: { control: "text" }, |
| 9 | + description: { control: "text" }, |
| 10 | + feature: { control: "text" }, |
| 11 | + learnMoreUrl: { control: "text" }, |
| 12 | + primaryButtonLabel: { control: "text" }, |
| 13 | + secondaryButtonLabel: { control: "text" }, |
| 14 | + showLearnMore: { control: "boolean" }, |
| 15 | + className: { control: "text" }, |
| 16 | + "data-testid": { control: "text" }, |
| 17 | + onContactSales: { action: "contact sales clicked" }, |
| 18 | + onLearnMore: { action: "learn more clicked" }, |
| 19 | + }, |
| 20 | + decorators: [ |
| 21 | + (Story) => ( |
| 22 | + <div style={{ position: "relative", height: "600px", background: "var(--color-neutral-background)" }}> |
| 23 | + <Story /> |
| 24 | + </div> |
| 25 | + ), |
| 26 | + ], |
| 27 | +}; |
| 28 | + |
| 29 | +export default meta; |
| 30 | +type Story = StoryObj<typeof EnterpriseUpgradeOverlay>; |
| 31 | + |
| 32 | +/** |
| 33 | + * Default overlay with standard messaging |
| 34 | + */ |
| 35 | +export const Default: Story = { |
| 36 | + args: {}, |
| 37 | +}; |
| 38 | + |
| 39 | +/** |
| 40 | + * Overlay customized for Project Dashboards feature |
| 41 | + */ |
| 42 | +export const ProjectDashboards: Story = { |
| 43 | + args: { |
| 44 | + title: "Get access to Project Dashboards!", |
| 45 | + description: |
| 46 | + "Performance analytics are available within the Enterprise plan. Contact our sales team to get access to this and more!", |
| 47 | + feature: "Project Dashboards", |
| 48 | + learnMoreUrl: "https://docs.humansignal.com/guide/dashboards.html", |
| 49 | + }, |
| 50 | +}; |
| 51 | + |
| 52 | +/** |
| 53 | + * Overlay for SSO & Security features |
| 54 | + */ |
| 55 | +export const SSOAndSecurity: Story = { |
| 56 | + args: { |
| 57 | + title: "SSO & Advanced Security", |
| 58 | + description: "Enable Single Sign-On, advanced security features, and compliance tools with our Enterprise plan.", |
| 59 | + feature: "SSO & Security Features", |
| 60 | + learnMoreUrl: "https://docs.humansignal.com/guide/security.html", |
| 61 | + secondaryButtonLabel: "Learn more", |
| 62 | + }, |
| 63 | +}; |
| 64 | + |
| 65 | +/** |
| 66 | + * Overlay for Custom Workflows |
| 67 | + */ |
| 68 | +export const CustomWorkflows: Story = { |
| 69 | + args: { |
| 70 | + title: "Advanced Workflows", |
| 71 | + description: "Create custom automation workflows and advanced labeling pipelines with our Enterprise plan.", |
| 72 | + feature: "Advanced Workflows", |
| 73 | + learnMoreUrl: "https://docs.humansignal.com/guide/workflows.html", |
| 74 | + }, |
| 75 | +}; |
| 76 | + |
| 77 | +/** |
| 78 | + * Overlay without the "Learn More" button |
| 79 | + */ |
| 80 | +export const WithoutLearnMore: Story = { |
| 81 | + args: { |
| 82 | + title: "Premium Feature", |
| 83 | + description: "This feature is available exclusively in our Enterprise plan. Contact sales to learn more.", |
| 84 | + feature: "Premium Features", |
| 85 | + showLearnMore: false, |
| 86 | + }, |
| 87 | +}; |
| 88 | + |
| 89 | +/** |
| 90 | + * Overlay with custom button labels |
| 91 | + */ |
| 92 | +export const CustomButtonLabels: Story = { |
| 93 | + args: { |
| 94 | + title: "Upgrade to Enterprise", |
| 95 | + description: "Access all premium features and dedicated support.", |
| 96 | + feature: "Enterprise Plan", |
| 97 | + primaryButtonLabel: "Talk to Sales", |
| 98 | + secondaryButtonLabel: "View Pricing", |
| 99 | + learnMoreUrl: "https://humansignal.com/pricing", |
| 100 | + }, |
| 101 | +}; |
| 102 | + |
| 103 | +/** |
| 104 | + * Overlay shown in context over blurred content |
| 105 | + */ |
| 106 | +export const InContext: Story = { |
| 107 | + render: () => ( |
| 108 | + <div style={{ position: "relative", height: "600px", background: "var(--color-neutral-background)" }}> |
| 109 | + <div style={{ padding: "32px", opacity: 0.5, filter: "blur(2px)" }}> |
| 110 | + <div style={{ marginBottom: "24px" }}> |
| 111 | + <h2 style={{ fontSize: "24px", fontWeight: 600, marginBottom: "8px", color: "var(--color-neutral-content)" }}> |
| 112 | + Project Performance Dashboard |
| 113 | + </h2> |
| 114 | + <p style={{ color: "var(--color-neutral-content-subtler)", marginBottom: "24px" }}> |
| 115 | + Track your team's annotation progress and quality metrics |
| 116 | + </p> |
| 117 | + </div> |
| 118 | + |
| 119 | + <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: "16px", marginBottom: "32px" }}> |
| 120 | + <div style={{ padding: "20px", background: "var(--color-neutral-background-subtle)", borderRadius: "8px" }}> |
| 121 | + <div style={{ fontSize: "14px", color: "var(--color-neutral-content-subtler)", marginBottom: "8px" }}> |
| 122 | + Total Tasks |
| 123 | + </div> |
| 124 | + <div style={{ fontSize: "32px", fontWeight: 600, color: "var(--color-neutral-content)" }}>1,247</div> |
| 125 | + </div> |
| 126 | + <div style={{ padding: "20px", background: "var(--color-neutral-background-subtle)", borderRadius: "8px" }}> |
| 127 | + <div style={{ fontSize: "14px", color: "var(--color-neutral-content-subtler)", marginBottom: "8px" }}> |
| 128 | + Completed |
| 129 | + </div> |
| 130 | + <div style={{ fontSize: "32px", fontWeight: 600, color: "var(--color-positive-content)" }}>892</div> |
| 131 | + </div> |
| 132 | + <div style={{ padding: "20px", background: "var(--color-neutral-background-subtle)", borderRadius: "8px" }}> |
| 133 | + <div style={{ fontSize: "14px", color: "var(--color-neutral-content-subtler)", marginBottom: "8px" }}> |
| 134 | + Agreement Score |
| 135 | + </div> |
| 136 | + <div style={{ fontSize: "32px", fontWeight: 600, color: "var(--color-neutral-content)" }}>94%</div> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + |
| 140 | + <div style={{ padding: "24px", background: "var(--color-neutral-background-subtle)", borderRadius: "8px" }}> |
| 141 | + <h3 |
| 142 | + style={{ fontSize: "16px", fontWeight: 600, marginBottom: "16px", color: "var(--color-neutral-content)" }} |
| 143 | + > |
| 144 | + Annotation Velocity |
| 145 | + </h3> |
| 146 | + <div |
| 147 | + style={{ |
| 148 | + height: "120px", |
| 149 | + background: "var(--color-neutral-background)", |
| 150 | + borderRadius: "4px", |
| 151 | + display: "flex", |
| 152 | + alignItems: "center", |
| 153 | + justifyContent: "center", |
| 154 | + color: "var(--color-neutral-content-subtler)", |
| 155 | + }} |
| 156 | + > |
| 157 | + Chart visualization would appear here |
| 158 | + </div> |
| 159 | + </div> |
| 160 | + </div> |
| 161 | + <EnterpriseUpgradeOverlay |
| 162 | + title="Get access to Project Dashboards!" |
| 163 | + description="Performance analytics are available within the Enterprise plan. Contact our sales team to get access to this and more!" |
| 164 | + feature="Dashboards" |
| 165 | + /> |
| 166 | + </div> |
| 167 | + ), |
| 168 | +}; |
0 commit comments