@@ -12,29 +12,21 @@ interface SelectError {
1212 message ?: string
1313}
1414
15- /**
16- * Props for the Select component
17- * @interface SelectProps
18- * @extends {PropsWithChildren }
19- * @extends {SelectPrimitive.SelectProps }
20- */
2115interface SelectProps extends PropsWithChildren , SelectPrimitive . SelectProps {
22- /** Label text displayed above the select */
2316 label ?: string
24- /** Error state configuration */
2517 error ?: SelectError
26- /** Optional caption text displayed below the select */
2718 caption ?: ReactNode
28- /** Whether the select is disabled */
2919 disabled ?: boolean
30- /** Placeholder text shown when no option is selected */
3120 placeholder : string
3221}
3322
3423/**
3524 * A customizable select component that supports labels, error states, and captions
36- * @param {SelectProps } props - The component props
37- * @returns {JSX.Element } The Select component
25+ * @example
26+ * <Select name="select" label="Select an option" placeholder="Select an option">
27+ * <SelectItem value="option1">Option 1</SelectItem>
28+ * <SelectItem value="option2">Option 2</SelectItem>
29+ * </Select>
3830 */
3931const Select : FC < SelectProps > = ( {
4032 name,
@@ -72,8 +64,6 @@ const SelectValue = SelectPrimitive.Value
7264
7365/**
7466 * The trigger button for the select dropdown
75- * @param {ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & { iconClassName?: string } } props - The component props
76- * @returns {JSX.Element } The SelectTrigger component
7767 */
7868const SelectTrigger = forwardRef <
7969 ElementRef < typeof SelectPrimitive . Trigger > ,
@@ -97,8 +87,6 @@ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
9787
9888/**
9989 * The content container for the select dropdown
100- * @param {ComponentPropsWithoutRef<typeof SelectPrimitive.Content> } props - The component props
101- * @returns {JSX.Element } The SelectContent component
10290 */
10391const SelectContent = forwardRef <
10492 ElementRef < typeof SelectPrimitive . Content > ,
@@ -132,8 +120,6 @@ SelectContent.displayName = SelectPrimitive.Content.displayName
132120
133121/**
134122 * A label component for grouping select items
135- * @param {ComponentPropsWithoutRef<typeof SelectPrimitive.Label> } props - The component props
136- * @returns {JSX.Element } The SelectLabel component
137123 */
138124const SelectLabel = forwardRef <
139125 ElementRef < typeof SelectPrimitive . Label > ,
@@ -145,8 +131,6 @@ SelectLabel.displayName = SelectPrimitive.Label.displayName
145131
146132/**
147133 * An individual selectable item within the dropdown
148- * @param {ComponentPropsWithoutRef<typeof SelectPrimitive.Item> } props - The component props
149- * @returns {JSX.Element } The SelectItem component
150134 */
151135const SelectItem = forwardRef <
152136 ElementRef < typeof SelectPrimitive . Item > ,
@@ -172,8 +156,6 @@ SelectItem.displayName = SelectPrimitive.Item.displayName
172156
173157/**
174158 * A visual separator between select items
175- * @param {ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> } props - The component props
176- * @returns {JSX.Element } The SelectSeparator component
177159 */
178160const SelectSeparator = forwardRef <
179161 ElementRef < typeof SelectPrimitive . Separator > ,
0 commit comments