// Adapted from Base UI compositions (MIT). See THIRD_PARTY_NOTICES.md. "use client"; import type { ComponentProps } from "react"; import { Select as Primitive } from "./_ynrlib/base-ui.js"; export const Select = Primitive.Root; export function SelectLabel({ className, ...props }: ComponentProps) { return ( `ynr-select-label ${className(state) ?? ""}` : `ynr-select-label ${className ?? ""}` } /> ); } export function SelectTrigger({ className, ...props }: ComponentProps) { return ( `ynr-select-trigger ${className(state) ?? ""}` : `ynr-select-trigger ${className ?? ""}` } /> ); } export const SelectValue = Primitive.Value; export function SelectIcon({ className, ...props }: ComponentProps) { return ( `ynr-select-icon ${className(state) ?? ""}` : `ynr-select-icon ${className ?? ""}` } /> ); } export function SelectList({ className, ...props }: ComponentProps) { return ( `ynr-select-list ${className(state) ?? ""}` : `ynr-select-list ${className ?? ""}` } /> ); } export function SelectItem({ className, ...props }: ComponentProps) { return ( `ynr-select-item ${className(state) ?? ""}` : `ynr-select-item ${className ?? ""}` } /> ); } export function SelectItemText({ className, ...props }: ComponentProps) { return ( `ynr-select-item-text ${className(state) ?? ""}` : `ynr-select-item-text ${className ?? ""}` } /> ); } export function SelectItemIndicator({ className, ...props }: ComponentProps) { return ( `ynr-select-item-indicator ${className(state) ?? ""}` : `ynr-select-item-indicator ${className ?? ""}` } /> ); } export function SelectGroup({ className, ...props }: ComponentProps) { return ( `ynr-select-group ${className(state) ?? ""}` : `ynr-select-group ${className ?? ""}` } /> ); } export function SelectGroupLabel({ className, ...props }: ComponentProps) { return ( `ynr-select-group-label ${className(state) ?? ""}` : `ynr-select-group-label ${className ?? ""}` } /> ); } export function SelectScrollUpArrow({ className, ...props }: ComponentProps) { return ( `ynr-select-scroll-up-arrow ${className(state) ?? ""}` : `ynr-select-scroll-up-arrow ${className ?? ""}` } /> ); } export function SelectScrollDownArrow({ className, ...props }: ComponentProps) { return ( `ynr-select-scroll-down-arrow ${className(state) ?? ""}` : `ynr-select-scroll-down-arrow ${className ?? ""}` } /> ); } export const SelectPortal = Primitive.Portal; export function SelectPositioner({ className, ...props }: ComponentProps) { return ( `ynr-select-positioner ${className(state) ?? ""}` : `ynr-select-positioner ${className ?? ""}` } /> ); } export function SelectPopup({ className, ...props }: ComponentProps) { return ( `ynr-select-popup ${className(state) ?? ""}` : `ynr-select-popup ${className ?? ""}` } /> ); }