@loworbitstudio/visor 1.44.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-11-09T20:08:43.080Z",
3
+ "generated_at": "2026-11-12T23:01:11.719Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "changeType": "current",
@@ -1457,12 +1457,12 @@
1457
1457
  {
1458
1458
  "path": "components/ui/combobox/combobox.tsx",
1459
1459
  "type": "registry:ui",
1460
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { CaretDownIcon, CheckIcon } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./combobox.module.css\"\n\n/* ─── Context ───────────────────────────────────────────────────────── */\n\ninterface ComboboxContextValue {\n open: boolean\n setOpen: (open: boolean) => void\n inputValue: string\n setInputValue: (value: string) => void\n selectedValue: string\n setSelectedValue: (value: string) => void\n onSelect?: (value: string, label: string) => void\n listboxId: string\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | undefined>(undefined)\n\nfunction useComboboxContext() {\n const ctx = React.useContext(ComboboxContext)\n if (!ctx) {\n throw new Error(\"Combobox subcomponents must be rendered inside <Combobox>\")\n }\n return ctx\n}\n\n/* ─── Combobox (root) ───────────────────────────────────────────────── */\n\nexport interface ComboboxProps {\n /** Current input/search text (controlled) */\n inputValue?: string\n /** Default input text (uncontrolled) */\n defaultInputValue?: string\n /** Called when the input text changes */\n onInputChange?: (value: string) => void\n /** Currently selected value (controlled) */\n value?: string\n /** Default selected value (uncontrolled) */\n defaultValue?: string\n /** Called when a value is selected */\n onSelect?: (value: string, label: string) => void\n /** Whether the popover is open (controlled) */\n open?: boolean\n /** Default open state (uncontrolled) */\n defaultOpen?: boolean\n /** Called when open state changes */\n onOpenChange?: (open: boolean) => void\n /** Whether the combobox is disabled */\n disabled?: boolean\n children: React.ReactNode\n className?: string\n}\n\nconst Combobox = React.forwardRef<HTMLDivElement, ComboboxProps>(\n (\n {\n inputValue: controlledInput,\n defaultInputValue = \"\",\n onInputChange,\n value: controlledValue,\n defaultValue = \"\",\n onSelect,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n disabled,\n children,\n className,\n },\n ref\n ) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const [uncontrolledInput, setUncontrolledInput] = React.useState(defaultInputValue)\n const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue)\n\n const listboxId = React.useId()\n\n const isOpenControlled = controlledOpen !== undefined\n const isInputControlled = controlledInput !== undefined\n const isValueControlled = controlledValue !== undefined\n\n const open = isOpenControlled ? controlledOpen! : uncontrolledOpen\n const inputValue = isInputControlled ? controlledInput! : uncontrolledInput\n const selectedValue = isValueControlled ? controlledValue! : uncontrolledValue\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isOpenControlled) setUncontrolledOpen(next)\n onOpenChange?.(next)\n },\n [isOpenControlled, onOpenChange]\n )\n\n const setInputValue = React.useCallback(\n (next: string) => {\n if (!isInputControlled) setUncontrolledInput(next)\n onInputChange?.(next)\n },\n [isInputControlled, onInputChange]\n )\n\n const setSelectedValue = React.useCallback(\n (next: string) => {\n if (!isValueControlled) setUncontrolledValue(next)\n },\n [isValueControlled]\n )\n\n const handleSelect = React.useCallback(\n (value: string, label: string) => {\n setSelectedValue(value)\n setInputValue(label)\n setOpen(false)\n onSelect?.(value, label)\n },\n [setSelectedValue, setInputValue, setOpen, onSelect]\n )\n\n return (\n <ComboboxContext.Provider\n value={{\n open,\n setOpen,\n inputValue,\n setInputValue,\n selectedValue,\n setSelectedValue,\n onSelect: handleSelect,\n listboxId,\n }}\n >\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <div\n ref={ref}\n data-slot=\"combobox\"\n data-disabled={disabled ? \"\" : undefined}\n className={cn(styles.root, className)}\n >\n {children}\n </div>\n </PopoverPrimitive.Root>\n </ComboboxContext.Provider>\n )\n }\n)\nCombobox.displayName = \"Combobox\"\n\n/* ─── ComboboxInput ─────────────────────────────────────────────────── */\n\nexport interface ComboboxInputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n placeholder?: string\n}\n\nconst ComboboxInput = React.forwardRef<HTMLInputElement, ComboboxInputProps>(\n ({ className, onChange, onFocus, onClick, placeholder = \"Search...\", ...props }, ref) => {\n const { inputValue, setInputValue, setOpen, open, listboxId } = useComboboxContext()\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.target.value)\n if (!open) setOpen(true)\n onChange?.(e)\n }\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n setOpen(true)\n onFocus?.(e)\n }\n\n const handleClick = (e: React.MouseEvent<HTMLInputElement>) => {\n setOpen(true)\n onClick?.(e)\n }\n\n return (\n <PopoverPrimitive.Anchor asChild>\n <div data-slot=\"combobox-input-wrapper\" className={styles.inputWrapper}>\n <input\n ref={ref}\n data-slot=\"combobox-input\"\n role=\"combobox\"\n aria-expanded={open}\n aria-autocomplete=\"list\"\n aria-controls={open ? listboxId : undefined}\n aria-haspopup=\"listbox\"\n autoComplete=\"off\"\n value={inputValue}\n placeholder={placeholder}\n className={cn(styles.input, className)}\n onChange={handleChange}\n onFocus={handleFocus}\n onClick={handleClick}\n {...props}\n />\n <CaretDownIcon\n data-slot=\"combobox-icon\"\n className={cn(styles.icon, open && styles.iconOpen)}\n aria-hidden=\"true\"\n />\n </div>\n </PopoverPrimitive.Anchor>\n )\n }\n)\nComboboxInput.displayName = \"ComboboxInput\"\n\n/* ─── ComboboxContent ───────────────────────────────────────────────── */\n\nexport interface ComboboxContentProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {\n /** Accessible label for the listbox (required for a11y when there is no visible heading) */\n \"aria-label\"?: string\n}\n\nconst ComboboxContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n ComboboxContentProps\n>(({ className, children, sideOffset = 4, align = \"start\", \"aria-label\": ariaLabel, ...props }, ref) => {\n const { listboxId } = useComboboxContext()\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n data-slot=\"combobox-content\"\n sideOffset={sideOffset}\n align={align}\n className={cn(styles.content, className)}\n onOpenAutoFocus={(e) => e.preventDefault()}\n {...props}\n >\n <ul\n id={listboxId}\n role=\"listbox\"\n aria-label={ariaLabel ?? \"Options\"}\n className={styles.listbox}\n >\n {children}\n </ul>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n )\n})\nComboboxContent.displayName = \"ComboboxContent\"\n\n/* ─── ComboboxItem ──────────────────────────────────────────────────── */\n\nexport interface ComboboxItemProps extends React.HTMLAttributes<HTMLLIElement> {\n value: string\n label?: string\n disabled?: boolean\n}\n\nconst ComboboxItem = React.forwardRef<HTMLLIElement, ComboboxItemProps>(\n ({ className, value, label, children, disabled, onClick, ...props }, ref) => {\n const { selectedValue, onSelect } = useComboboxContext()\n const isSelected = selectedValue === value\n const displayLabel = label ?? (typeof children === \"string\" ? children : \"\")\n\n const handleClick = (e: React.MouseEvent<HTMLLIElement>) => {\n if (!disabled) {\n onSelect?.(value, displayLabel)\n onClick?.(e)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLLIElement>) => {\n if ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\n e.preventDefault()\n onSelect?.(value, displayLabel)\n }\n }\n\n return (\n <li\n ref={ref}\n role=\"option\"\n aria-selected={isSelected}\n data-slot=\"combobox-item\"\n data-selected={isSelected ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n className={cn(styles.item, className)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n tabIndex={disabled ? -1 : 0}\n {...props}\n >\n <span className={styles.itemCheck} aria-hidden=\"true\">\n {isSelected && <CheckIcon className={styles.itemCheckIcon} />}\n </span>\n {children ?? label ?? value}\n </li>\n )\n }\n)\nComboboxItem.displayName = \"ComboboxItem\"\n\n/* ─── ComboboxEmpty ─────────────────────────────────────────────────── */\n\nexport type ComboboxEmptyProps = React.HTMLAttributes<HTMLLIElement>\n\nconst ComboboxEmpty = React.forwardRef<HTMLLIElement, ComboboxEmptyProps>(\n ({ className, children = \"No results found.\", ...props }, ref) => {\n return (\n <li\n ref={ref}\n data-slot=\"combobox-empty\"\n className={cn(styles.empty, className)}\n {...props}\n >\n {children}\n </li>\n )\n }\n)\nComboboxEmpty.displayName = \"ComboboxEmpty\"\n\n/* ─── ComboboxGroup ─────────────────────────────────────────────────── */\n\nexport interface ComboboxGroupProps extends React.HTMLAttributes<HTMLLIElement> {\n heading?: string\n}\n\nconst ComboboxGroup = React.forwardRef<HTMLLIElement, ComboboxGroupProps>(\n ({ className, heading, children, ...props }, ref) => {\n return (\n <li ref={ref} data-slot=\"combobox-group\" role=\"presentation\" className={cn(styles.group, className)} {...props}>\n {heading && (\n <div data-slot=\"combobox-group-heading\" className={styles.groupHeading} aria-hidden=\"true\">\n {heading}\n </div>\n )}\n <ul role=\"group\" aria-label={heading}>\n {children}\n </ul>\n </li>\n )\n }\n)\nComboboxGroup.displayName = \"ComboboxGroup\"\n\n/* ─── ComboboxSeparator ─────────────────────────────────────────────── */\n\nexport type ComboboxSeparatorProps = React.HTMLAttributes<HTMLLIElement>\n\nconst ComboboxSeparator = React.forwardRef<HTMLLIElement, ComboboxSeparatorProps>(\n ({ className, ...props }, ref) => {\n return (\n <li\n ref={ref}\n role=\"separator\"\n data-slot=\"combobox-separator\"\n className={cn(styles.separator, className)}\n {...props}\n />\n )\n }\n)\nComboboxSeparator.displayName = \"ComboboxSeparator\"\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxItem,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxSeparator,\n}\n"
1460
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { CaretDownIcon, CheckIcon } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./combobox.module.css\"\n\n/* ─── Context ───────────────────────────────────────────────────────── */\n\ninterface ComboboxContextValue {\n open: boolean\n setOpen: (open: boolean) => void\n inputValue: string\n setInputValue: (value: string) => void\n selectedValue: string\n setSelectedValue: (value: string) => void\n onSelect?: (value: string, label: string) => void\n listboxId: string\n /** Element id of the highlighted option, announced via aria-activedescendant */\n activeId: string | null\n setActiveId: (id: string | null) => void\n /** Highlight the first enabled option once the list has rendered */\n highlightFirst: () => void\n /** Items call this on mount so a pending highlightFirst can resolve */\n registerItem: () => void\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | undefined>(undefined)\n\n/** Enabled options in DOM order — the order the user sees. */\nfunction getEnabledOptions(listboxId: string): HTMLElement[] {\n const listbox = document.getElementById(listboxId)\n return listbox\n ? Array.from(listbox.querySelectorAll<HTMLElement>('[role=\"option\"]:not([data-disabled])'))\n : []\n}\n\nfunction useComboboxContext() {\n const ctx = React.useContext(ComboboxContext)\n if (!ctx) {\n throw new Error(\"Combobox subcomponents must be rendered inside <Combobox>\")\n }\n return ctx\n}\n\n/* ─── Combobox (root) ───────────────────────────────────────────────── */\n\nexport interface ComboboxProps {\n /** Current input/search text (controlled) */\n inputValue?: string\n /** Default input text (uncontrolled) */\n defaultInputValue?: string\n /** Called when the input text changes */\n onInputChange?: (value: string) => void\n /** Currently selected value (controlled) */\n value?: string\n /** Default selected value (uncontrolled) */\n defaultValue?: string\n /** Called when a value is selected */\n onSelect?: (value: string, label: string) => void\n /** Whether the popover is open (controlled) */\n open?: boolean\n /** Default open state (uncontrolled) */\n defaultOpen?: boolean\n /** Called when open state changes */\n onOpenChange?: (open: boolean) => void\n /** Whether the combobox is disabled */\n disabled?: boolean\n children: React.ReactNode\n className?: string\n}\n\nconst Combobox = React.forwardRef<HTMLDivElement, ComboboxProps>(\n (\n {\n inputValue: controlledInput,\n defaultInputValue = \"\",\n onInputChange,\n value: controlledValue,\n defaultValue = \"\",\n onSelect,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n disabled,\n children,\n className,\n },\n ref\n ) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const [uncontrolledInput, setUncontrolledInput] = React.useState(defaultInputValue)\n const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue)\n\n const listboxId = React.useId()\n const [activeId, setActiveId] = React.useState<string | null>(null)\n const highlightFirstRef = React.useRef(false)\n // Bumped by each item on mount: the portal renders after open flips, so the\n // first-option lookup has to retry once the options exist.\n const [itemsVersion, registerItem] = React.useReducer((n: number) => n + 1, 0)\n const highlightFirst = React.useCallback(() => {\n highlightFirstRef.current = true\n setActiveId(null)\n }, [])\n\n const isOpenControlled = controlledOpen !== undefined\n const isInputControlled = controlledInput !== undefined\n const isValueControlled = controlledValue !== undefined\n\n const open = isOpenControlled ? controlledOpen! : uncontrolledOpen\n const inputValue = isInputControlled ? controlledInput! : uncontrolledInput\n const selectedValue = isValueControlled ? controlledValue! : uncontrolledValue\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isOpenControlled) setUncontrolledOpen(next)\n onOpenChange?.(next)\n },\n [isOpenControlled, onOpenChange]\n )\n\n const setInputValue = React.useCallback(\n (next: string) => {\n if (!isInputControlled) setUncontrolledInput(next)\n onInputChange?.(next)\n },\n [isInputControlled, onInputChange]\n )\n\n const setSelectedValue = React.useCallback(\n (next: string) => {\n if (!isValueControlled) setUncontrolledValue(next)\n },\n [isValueControlled]\n )\n\n React.useEffect(() => {\n if (!open) {\n setActiveId(null)\n return\n }\n if (!highlightFirstRef.current) return\n const first = getEnabledOptions(listboxId)[0]\n if (first) {\n highlightFirstRef.current = false\n setActiveId(first.id)\n }\n }, [open, inputValue, itemsVersion, listboxId])\n\n const handleSelect = React.useCallback(\n (value: string, label: string) => {\n setSelectedValue(value)\n setInputValue(label)\n setOpen(false)\n onSelect?.(value, label)\n },\n [setSelectedValue, setInputValue, setOpen, onSelect]\n )\n\n return (\n <ComboboxContext.Provider\n value={{\n open,\n setOpen,\n inputValue,\n setInputValue,\n selectedValue,\n setSelectedValue,\n onSelect: handleSelect,\n listboxId,\n activeId,\n setActiveId,\n highlightFirst,\n registerItem,\n }}\n >\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <div\n ref={ref}\n data-slot=\"combobox\"\n data-disabled={disabled ? \"\" : undefined}\n className={cn(styles.root, className)}\n >\n {children}\n </div>\n </PopoverPrimitive.Root>\n </ComboboxContext.Provider>\n )\n }\n)\nCombobox.displayName = \"Combobox\"\n\n/* ─── ComboboxInput ─────────────────────────────────────────────────── */\n\nexport interface ComboboxInputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n placeholder?: string\n}\n\nconst ComboboxInput = React.forwardRef<HTMLInputElement, ComboboxInputProps>(\n ({ className, onChange, onFocus, onClick, onKeyDown, placeholder = \"Search...\", ...props }, ref) => {\n const { inputValue, setInputValue, setOpen, open, listboxId, activeId, setActiveId, highlightFirst } =\n useComboboxContext()\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.target.value)\n highlightFirst()\n if (!open) setOpen(true)\n onChange?.(e)\n }\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n setOpen(true)\n onFocus?.(e)\n }\n\n const handleClick = (e: React.MouseEvent<HTMLInputElement>) => {\n setOpen(true)\n onClick?.(e)\n }\n\n const moveHighlight = (to: \"next\" | \"prev\" | \"first\" | \"last\") => {\n const options = getEnabledOptions(listboxId)\n if (options.length === 0) return\n const current = options.findIndex((o) => o.id === activeId)\n const last = options.length - 1\n // No wrap at either end, like a native select.\n const index =\n to === \"first\" ? 0\n : to === \"last\" ? last\n : to === \"next\" ? (current < 0 ? 0 : Math.min(current + 1, last))\n : current < 0 ? last : Math.max(current - 1, 0)\n setActiveId(options[index].id)\n options[index].scrollIntoView?.({ block: \"nearest\" })\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(e)\n if (e.defaultPrevented) return\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault()\n if (open) moveHighlight(\"next\")\n else {\n setOpen(true)\n highlightFirst()\n }\n break\n case \"ArrowUp\":\n if (!open) break\n e.preventDefault()\n moveHighlight(\"prev\")\n break\n case \"Home\":\n case \"End\":\n if (!open) break\n e.preventDefault()\n moveHighlight(e.key === \"Home\" ? \"first\" : \"last\")\n break\n case \"Enter\": {\n const active = open && activeId ? document.getElementById(activeId) : null\n if (!active) break\n e.preventDefault()\n active.click() // same path as a mouse pick\n break\n }\n case \"Escape\":\n // First Escape closes the list; a second clears what was typed.\n if (open) setOpen(false)\n else if (inputValue) setInputValue(\"\")\n else break\n e.preventDefault()\n break\n case \"Tab\":\n if (open) setOpen(false)\n break\n }\n }\n\n return (\n <PopoverPrimitive.Anchor asChild>\n <div data-slot=\"combobox-input-wrapper\" className={styles.inputWrapper}>\n <input\n ref={ref}\n data-slot=\"combobox-input\"\n role=\"combobox\"\n aria-expanded={open}\n aria-autocomplete=\"list\"\n aria-controls={open ? listboxId : undefined}\n aria-activedescendant={open && activeId ? activeId : undefined}\n aria-haspopup=\"listbox\"\n autoComplete=\"off\"\n value={inputValue}\n placeholder={placeholder}\n className={cn(styles.input, className)}\n onChange={handleChange}\n onFocus={handleFocus}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...props}\n />\n <CaretDownIcon\n data-slot=\"combobox-icon\"\n className={cn(styles.icon, open && styles.iconOpen)}\n aria-hidden=\"true\"\n />\n </div>\n </PopoverPrimitive.Anchor>\n )\n }\n)\nComboboxInput.displayName = \"ComboboxInput\"\n\n/* ─── ComboboxContent ───────────────────────────────────────────────── */\n\nexport interface ComboboxContentProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {\n /** Accessible label for the listbox (required for a11y when there is no visible heading) */\n \"aria-label\"?: string\n}\n\nconst ComboboxContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n ComboboxContentProps\n>(({ className, children, sideOffset = 4, align = \"start\", \"aria-label\": ariaLabel, ...props }, ref) => {\n const { listboxId } = useComboboxContext()\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n data-slot=\"combobox-content\"\n sideOffset={sideOffset}\n align={align}\n className={cn(styles.content, className)}\n onOpenAutoFocus={(e) => e.preventDefault()}\n {...props}\n >\n <ul\n id={listboxId}\n role=\"listbox\"\n aria-label={ariaLabel ?? \"Options\"}\n className={styles.listbox}\n >\n {children}\n </ul>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n )\n})\nComboboxContent.displayName = \"ComboboxContent\"\n\n/* ─── ComboboxItem ──────────────────────────────────────────────────── */\n\nexport interface ComboboxItemProps extends React.HTMLAttributes<HTMLLIElement> {\n value: string\n label?: string\n disabled?: boolean\n}\n\nconst ComboboxItem = React.forwardRef<HTMLLIElement, ComboboxItemProps>(\n ({ className, value, label, children, disabled, onClick, onMouseMove, id: idProp, ...props }, ref) => {\n const { selectedValue, onSelect, listboxId, activeId, setActiveId, registerItem } = useComboboxContext()\n const isSelected = selectedValue === value\n // Stable per value; encoded so a value with spaces stays a valid IDREF.\n const id = idProp ?? `${listboxId}-option-${encodeURIComponent(value)}`\n const isHighlighted = activeId === id\n\n React.useEffect(() => registerItem(), [registerItem])\n\n const handleMouseMove = (e: React.MouseEvent<HTMLLIElement>) => {\n if (!disabled && !isHighlighted) setActiveId(id)\n onMouseMove?.(e)\n }\n const displayLabel = label ?? (typeof children === \"string\" ? children : \"\")\n\n const handleClick = (e: React.MouseEvent<HTMLLIElement>) => {\n if (!disabled) {\n onSelect?.(value, displayLabel)\n onClick?.(e)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLLIElement>) => {\n if ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\n e.preventDefault()\n onSelect?.(value, displayLabel)\n }\n }\n\n return (\n <li\n ref={ref}\n id={id}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={disabled || undefined}\n data-slot=\"combobox-item\"\n data-selected={isSelected ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n data-highlighted={isHighlighted ? \"\" : undefined}\n className={cn(styles.item, className)}\n onClick={handleClick}\n onMouseMove={handleMouseMove}\n onKeyDown={handleKeyDown}\n tabIndex={disabled ? -1 : 0}\n {...props}\n >\n <span className={styles.itemCheck} aria-hidden=\"true\">\n {isSelected && <CheckIcon className={styles.itemCheckIcon} />}\n </span>\n {children ?? label ?? value}\n </li>\n )\n }\n)\nComboboxItem.displayName = \"ComboboxItem\"\n\n/* ─── ComboboxEmpty ─────────────────────────────────────────────────── */\n\nexport type ComboboxEmptyProps = React.HTMLAttributes<HTMLLIElement>\n\nconst ComboboxEmpty = React.forwardRef<HTMLLIElement, ComboboxEmptyProps>(\n ({ className, children = \"No results found.\", ...props }, ref) => {\n return (\n <li\n ref={ref}\n data-slot=\"combobox-empty\"\n className={cn(styles.empty, className)}\n {...props}\n >\n {children}\n </li>\n )\n }\n)\nComboboxEmpty.displayName = \"ComboboxEmpty\"\n\n/* ─── ComboboxGroup ─────────────────────────────────────────────────── */\n\nexport interface ComboboxGroupProps extends React.HTMLAttributes<HTMLLIElement> {\n heading?: string\n}\n\nconst ComboboxGroup = React.forwardRef<HTMLLIElement, ComboboxGroupProps>(\n ({ className, heading, children, ...props }, ref) => {\n return (\n <li ref={ref} data-slot=\"combobox-group\" role=\"presentation\" className={cn(styles.group, className)} {...props}>\n {heading && (\n <div data-slot=\"combobox-group-heading\" className={styles.groupHeading} aria-hidden=\"true\">\n {heading}\n </div>\n )}\n <ul role=\"group\" aria-label={heading}>\n {children}\n </ul>\n </li>\n )\n }\n)\nComboboxGroup.displayName = \"ComboboxGroup\"\n\n/* ─── ComboboxSeparator ─────────────────────────────────────────────── */\n\nexport type ComboboxSeparatorProps = React.HTMLAttributes<HTMLLIElement>\n\nconst ComboboxSeparator = React.forwardRef<HTMLLIElement, ComboboxSeparatorProps>(\n ({ className, ...props }, ref) => {\n return (\n <li\n ref={ref}\n role=\"separator\"\n data-slot=\"combobox-separator\"\n className={cn(styles.separator, className)}\n {...props}\n />\n )\n }\n)\nComboboxSeparator.displayName = \"ComboboxSeparator\"\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxItem,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxSeparator,\n}\n"
1461
1461
  },
1462
1462
  {
1463
1463
  "path": "components/ui/combobox/combobox.module.css",
1464
1464
  "type": "registry:ui",
1465
- "content": "/* Combobox root */\n.root {\n position: relative;\n display: inline-flex;\n flex-direction: column;\n width: fit-content;\n}\n\n/* Input wrapper */\n.inputWrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.input {\n width: 100%;\n height: 2.25rem;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem)) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n border-radius: var(--radius-md, 0.375rem);\n border: 1px solid var(--combobox-border, var(--border-default, #e5e7eb));\n background-color: var(--combobox-bg, var(--surface-interactive-default, #f9fafb));\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-primary, #111827);\n transition: border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: none;\n}\n\n.input::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n@media (hover: hover) {\n .input:hover:not(:focus-visible):not(:disabled) {\n border-color: var(--border-strong, #d1d5db);\n }\n}\n\n.input:focus-visible {\n border-color: var(--border-focus, #111827);\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Caret icon */\n.icon {\n position: absolute;\n right: var(--spacing-3, 0.75rem);\n top: 50%;\n transform: translateY(-50%);\n width: 1rem;\n height: 1rem;\n pointer-events: none;\n color: var(--text-secondary, #9ca3af);\n transition: transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.iconOpen {\n transform: translateY(-50%) rotate(180deg);\n}\n\n/* Content popover */\n.content {\n z-index: 50;\n min-width: var(--radix-popover-trigger-width, 12rem);\n max-height: 18rem;\n overflow: hidden auto;\n border-radius: var(--radius-lg, 0.5rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n color: var(--text-primary, #111827);\n box-shadow: var(--shadow-lg);\n padding: var(--spacing-1, 0.25rem);\n}\n\n/* Listbox */\n.listbox {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/* Item */\n.item {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n border-radius: var(--radius-sm, 0.25rem);\n font-size: var(--font-size-sm, 0.875rem);\n cursor: default;\n outline: none;\n user-select: none;\n}\n\n.item:focus:not([data-disabled]) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .item:hover:not([data-disabled]) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n cursor: pointer;\n }\n}\n\n.item[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.item[data-selected] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n font-weight: var(--font-weight-medium, 500);\n}\n\n.itemCheck {\n display: inline-flex;\n width: 1rem;\n height: 1rem;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.itemCheckIcon {\n width: 0.875rem;\n height: 0.875rem;\n color: var(--interactive-primary-bg, var(--primary, #111827));\n}\n\n/* Empty */\n.empty {\n list-style: none;\n padding: var(--spacing-4, 1rem) var(--spacing-3, 0.75rem);\n text-align: center;\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Group */\n.group {\n list-style: none;\n}\n\n.group ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.groupHeading {\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem) var(--spacing-1, 0.25rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #9ca3af);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n/* Separator */\n.separator {\n list-style: none;\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n"
1465
+ "content": "/* Combobox root */\n.root {\n position: relative;\n display: inline-flex;\n flex-direction: column;\n width: fit-content;\n}\n\n/* Input wrapper */\n.inputWrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.input {\n width: 100%;\n height: 2.25rem;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem)) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n border-radius: var(--radius-md, 0.375rem);\n border: 1px solid var(--combobox-border, var(--border-default, #e5e7eb));\n background-color: var(--combobox-bg, var(--surface-interactive-default, #f9fafb));\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-primary, #111827);\n transition: border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: none;\n}\n\n.input::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n@media (hover: hover) {\n .input:hover:not(:focus-visible):not(:disabled) {\n border-color: var(--border-strong, #d1d5db);\n }\n}\n\n.input:focus-visible {\n border-color: var(--border-focus, #111827);\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Caret icon */\n.icon {\n position: absolute;\n right: var(--spacing-3, 0.75rem);\n top: 50%;\n transform: translateY(-50%);\n width: 1rem;\n height: 1rem;\n pointer-events: none;\n color: var(--text-secondary, #9ca3af);\n transition: transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.iconOpen {\n transform: translateY(-50%) rotate(180deg);\n}\n\n/* Content popover */\n.content {\n z-index: 50;\n min-width: var(--radix-popover-trigger-width, 12rem);\n max-height: 18rem;\n overflow: hidden auto;\n border-radius: var(--radius-lg, 0.5rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n color: var(--text-primary, #111827);\n box-shadow: var(--shadow-lg);\n padding: var(--spacing-1, 0.25rem);\n}\n\n/* Listbox */\n.listbox {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/* Item */\n.item {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n border-radius: var(--radius-sm, 0.25rem);\n font-size: var(--font-size-sm, 0.875rem);\n cursor: default;\n outline: none;\n user-select: none;\n}\n\n.item:focus:not([data-disabled]),\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .item:hover:not([data-disabled]) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n cursor: pointer;\n }\n}\n\n.item[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.item[data-selected] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n font-weight: var(--font-weight-medium, 500);\n}\n\n.itemCheck {\n display: inline-flex;\n width: 1rem;\n height: 1rem;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.itemCheckIcon {\n width: 0.875rem;\n height: 0.875rem;\n color: var(--interactive-primary-bg, var(--primary, #111827));\n}\n\n/* Empty */\n.empty {\n list-style: none;\n padding: var(--spacing-4, 1rem) var(--spacing-3, 0.75rem);\n text-align: center;\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Group */\n.group {\n list-style: none;\n}\n\n.group ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.groupHeading {\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem) var(--spacing-1, 0.25rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #9ca3af);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n/* Separator */\n.separator {\n list-style: none;\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n"
1466
1466
  }
1467
1467
  ]
1468
1468
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generated_at": "2026-11-09T20:08:43.072Z",
3
+ "generated_at": "2026-11-12T23:01:11.711Z",
4
4
  "components": {
5
5
  "accessibility-specimen": {
6
6
  "category": "specimen",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loworbitstudio/visor",
3
- "version": "1.44.0",
3
+ "version": "1.45.0",
4
4
  "description": "CLI for the Visor design system — add components, hooks, and utilities to your project.",
5
5
  "type": "module",
6
6
  "bin": {