import type { Meta, StoryObj } from "@storybook/react"; import { Rocket, Shield, Target, Zap } from "lucide-react"; import type { SVGProps } from "react"; import { IconSelectField } from "./IconSelectField"; // Cloud provider logos for demonstrating plain icon style const AWSLogo = (props: SVGProps) => ( ); const AzureLogo = (props: SVGProps) => ( ); const GCPLogo = (props: SVGProps) => ( ); const meta: Meta = { title: "Widgets/Onboarding/Fields/IconSelectField", component: IconSelectField, parameters: { layout: "centered", }, tags: ["autodocs"], argTypes: { selectedIds: { control: "object" }, onChange: { action: "changed" }, disabled: { control: "boolean" }, selectionMode: { control: "radio", options: ["single", "multiple"], }, iconStyle: { control: "radio", options: ["boxed", "plain"], }, iconSize: { control: "radio", options: ["sm", "md", "lg"], }, }, }; export default meta; type Story = StoryObj; // Icon options with Lucide icons const iconOptions = [ { id: "speed", name: "Speed", description: "Optimize for fast performance", icon: , }, { id: "security", name: "Security", description: "Maximize protection", icon: , }, { id: "growth", name: "Growth", description: "Scale your business", icon: , }, { id: "precision", name: "Precision", description: "Focus on accuracy", icon: , }, ]; // Logo options with brand SVGs (matches original cloud-provider demo) const logoOptions = [ { id: "aws", name: "Amazon Web Services", description: "EC2, Lambda, S3, and more", icon: , }, { id: "azure", name: "Microsoft Azure", description: "Virtual Machines, Functions, Blob Storage", icon: , }, { id: "gcp", name: "Google Cloud Platform", description: "Compute Engine, Cloud Functions, Cloud Storage", icon: , }, ]; export const Default: Story = { args: { options: iconOptions, selectedIds: [], selectionMode: "single", iconStyle: "boxed", ariaLabel: "Select your primary goal", }, }; export const WithSelection: Story = { args: { options: iconOptions, selectedIds: ["security"], selectionMode: "single", iconStyle: "boxed", ariaLabel: "Select your primary goal", }, }; export const MultipleSelection: Story = { args: { options: iconOptions, selectedIds: ["speed", "security"], selectionMode: "multiple", iconStyle: "boxed", ariaLabel: "Select your goals", }, }; export const WithLogos: Story = { args: { options: logoOptions, selectedIds: [], selectionMode: "multiple", iconStyle: "boxed", ariaLabel: "Select cloud providers", }, }; export const LogoWithSelection: Story = { args: { options: logoOptions, selectedIds: ["aws", "gcp"], selectionMode: "multiple", iconStyle: "boxed", ariaLabel: "Select cloud providers", }, }; export const PlainIconStyle: Story = { args: { options: logoOptions, selectedIds: [], selectionMode: "single", iconStyle: "plain", iconSize: "lg", ariaLabel: "Select cloud provider (plain style)", }, }; export const SmallIcons: Story = { args: { options: iconOptions, selectedIds: [], selectionMode: "single", iconStyle: "boxed", iconSize: "sm", ariaLabel: "Select your primary goal", }, }; export const LargeIcons: Story = { args: { options: iconOptions, selectedIds: [], selectionMode: "single", iconStyle: "boxed", iconSize: "lg", ariaLabel: "Select your primary goal", }, }; export const Disabled: Story = { args: { options: iconOptions, selectedIds: ["growth"], selectionMode: "single", iconStyle: "boxed", ariaLabel: "Select your primary goal", disabled: true, }, };