"use client"; /** * Dropdown Field * * COPIED VERBATIM FROM: components/onboarding/steps/dropdown-select-step.tsx:122-182 * Renders a select dropdown with optional grouped options */ import { ANIMATION_CLASSES, getStaggerStyle, STAGGER_PRESETS, } from "../animations"; import { OnboardingLabel } from "../primitives/onboarding-label"; import { OnboardingSelect, OnboardingSelectContent, OnboardingSelectGroup, OnboardingSelectItem, OnboardingSelectTrigger, OnboardingSelectValue, } from "../primitives/onboarding-select"; import type { DropdownFieldProps, DropdownOption, DropdownOptionGroup, } from "../types/fields"; /** * Type guard for grouped options * COPIED VERBATIM FROM: components/onboarding/steps/dropdown-select-step.tsx:66-68 */ function isGroupedOptions( options: DropdownOption[] | DropdownOptionGroup[], ): options is DropdownOptionGroup[] { return options.length > 0 && "options" in options[0]; } export function DropdownField({ id, label, placeholder = "Select...", description, required = false, options, value, onChange, animationIndex = 0, disabled = false, }: DropdownFieldProps) { return (
{description}
)}