(
+ ({ className, children, placeholder, ...props }, ref) => {
+ return (
+
+
+
+
+ )
+ },
+)
+Select.displayName = "Select"
+
+// ── Sub-components (thin wrappers for API compatibility) ──────────────────
+
+function SelectItem({
+ className,
+ ...props
+}: React.ComponentPropsWithoutRef<"option">) {
+ return
}
-function SelectTrigger({ className, children, ...props }: SelectPrimitive.Trigger.Props) {
- return (
- span]:line-clamp-1",
- className
- )}
- {...props}
- >
- {children}
-
-
-
-
- )
+function SelectGroup({
+ className,
+ ...props
+}: React.ComponentPropsWithoutRef<"optgroup">) {
+ return
}
-function SelectPortal({ ...props }: SelectPrimitive.Portal.Props) {
- return
+function SelectGroupLabel(_props: { children?: React.ReactNode }) {
+ // optgroup uses `label` attr, this is a no-op for compatibility
+ return null
}
-function SelectContent({ className, children, ...props }: SelectPrimitive.Positioner.Props) {
- return (
-
-
- {children}
-
-
- )
+// Stubs for barrel export compatibility — these are no-ops with native select
+function SelectContent({ children }: { children?: React.ReactNode; className?: string }) {
+ return <>{children}>
}
-
-function SelectGroup({ ...props }: SelectPrimitive.Group.Props) {
- return
+function SelectTrigger({ children }: { children?: React.ReactNode; className?: string }) {
+ return <>{children}>
}
-
-function SelectGroupLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {
- return
+function SelectValue(_props: { placeholder?: string }) {
+ return null
}
-
-function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) {
- return (
-
-
-
-
- {children}
-
- )
+function SelectPortal({ children }: { children?: React.ReactNode }) {
+ return <>{children}>
}
-
function SelectSeparator({ className, ...props }: React.ComponentProps<"div">) {
- return
+ return
}
-export { Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPortal, SelectSeparator, SelectTrigger, SelectValue }
+export {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectGroupLabel,
+ SelectItem,
+ SelectPortal,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
+}
diff --git a/frontend/functions/ui/simple_select.tsx b/frontend/functions/ui/simple_select.tsx
index a9f1695d..8eb1a2b9 100644
--- a/frontend/functions/ui/simple_select.tsx
+++ b/frontend/functions/ui/simple_select.tsx
@@ -2,15 +2,7 @@
import * as React from "react"
import { cn } from "../core/cn"
-import {
- Select,
- SelectTrigger,
- SelectValue,
- SelectContent,
- SelectItem,
- SelectGroup,
- SelectGroupLabel,
-} from "./select"
+import { ChevronDown } from "lucide-react"
export interface SimpleSelectOption {
value: string
@@ -31,12 +23,14 @@ interface SimpleSelectProps {
options: SimpleSelectOptions
placeholder?: string
disabled?: boolean
- size?: 'sm' | 'default'
+ size?: "sm" | "default"
className?: string
}
-function isGrouped(options: SimpleSelectOptions): options is SimpleSelectGroup[] {
- return options.length > 0 && 'group' in options[0]
+function isGrouped(
+ options: SimpleSelectOptions,
+): options is SimpleSelectGroup[] {
+ return options.length > 0 && "group" in options[0]
}
function SimpleSelect({
@@ -45,39 +39,53 @@ function SimpleSelect({
options,
placeholder = "Select...",
disabled = false,
- size = 'default',
+ size = "default",
className,
}: SimpleSelectProps) {
return (
-
+
+ ))}
+
+
+
)
}