@longd/layout-ui 0.1.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.
- package/README.md +450 -0
- package/dist/chunk-CZ3IMHZ6.js +1083 -0
- package/dist/chunk-CZ3IMHZ6.js.map +1 -0
- package/dist/index.cjs +1098 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/select.cjs +1095 -0
- package/dist/layout/select.cjs.map +1 -0
- package/dist/layout/select.d.cts +102 -0
- package/dist/layout/select.d.ts +102 -0
- package/dist/layout/select.js +9 -0
- package/dist/layout/select.js.map +1 -0
- package/package.json +122 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/layout/select.tsx","../src/lib/utils.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// layout-ui — public API\n// ---------------------------------------------------------------------------\n// Add new component exports here as the library grows.\n// Each component module also has a dedicated deep-import entry point\n// (e.g. \"layout-ui/layout/select\") configured in package.json \"exports\".\n// ---------------------------------------------------------------------------\n\n// Layout\nexport { LayoutSelect, default as LayoutSelectDefault } from './layout/select'\nexport type { LayoutSelectProps, IOption, IconProp } from './layout/select'\n","import * as React from 'react'\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Popover } from '@base-ui/react/popover'\nimport { Tooltip } from '@base-ui/react/tooltip'\nimport { Command } from 'cmdk'\nimport {\n DndContext,\n KeyboardSensor,\n PointerSensor,\n closestCenter,\n useSensor,\n useSensors,\n} from '@dnd-kit/core'\nimport {\n SortableContext,\n arrayMove,\n useSortable,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable'\nimport {\n restrictToFirstScrollableAncestor,\n restrictToVerticalAxis,\n} from '@dnd-kit/modifiers'\nimport { defaultRangeExtractor, useVirtualizer } from '@tanstack/react-virtual'\nimport { Check, ChevronDown, GripVertical, X } from 'lucide-react'\n\nimport type { Range } from '@tanstack/react-virtual'\nimport type {\n CollisionDetection,\n DragEndEvent,\n DragOverEvent,\n} from '@dnd-kit/core'\n\nimport { cn } from '@/lib/utils'\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/**\n * For `icon` we accept either a ReactNode (already rendered) or a **render\n * function** `() => ReactNode`. The render‑function form lets consumers pass\n * lazy/memoised icons so the component only mounts them when visible (better\n * perf for large lists with heavy SVG icons).\n */\nexport type IconProp = React.ReactNode | (() => React.ReactNode)\n\nexport interface IOption {\n label: string\n value: string | number\n icon?: IconProp\n disabled?: boolean\n disabledTooltip?: string\n /** Nested children – rendered as a visual group. */\n children?: Array<IOption>\n}\n\n// ---- Conditional selection types ----\n\ninterface SingleSelectProps {\n type: 'single'\n selectValue?: IOption | null\n onChange?: (value: IOption | null, selectedOption: IOption) => void\n collapsed?: never\n showItemsLength?: never\n}\n\ninterface MultipleSelectProps {\n type: 'multiple'\n selectValue?: Array<IOption>\n onChange?: (value: Array<IOption>, selectedOption: IOption) => void\n /** When `true` the trigger will expand to show all chips instead of\n * collapsing them into a \"+N\" overflow badge. */\n collapsed?: boolean\n /** Force a maximum number of visible chip items. Lower priority than the\n * automatic overflow detection when `collapsed` is not set. */\n showItemsLength?: number\n}\n\n// ---- Shared props ----\n\ninterface SharedSelectProps {\n /** All available options (may contain nested `children`). */\n options: Array<IOption>\n /** Placeholder shown when nothing is selected. */\n placeholder?: string\n /** Whether the entire select is disabled. */\n disabled?: boolean\n /** Whether the select is in read‑only mode (looks interactive but cannot\n * be changed). */\n readOnly?: boolean\n /** Marks the select as having a validation error. */\n error?: boolean\n /** Allow the user to clear the selection. */\n clearable?: boolean\n /** Custom class for the root wrapper. */\n className?: string\n /** Custom class for the trigger. */\n triggerClassName?: string\n /** Custom class for the popup. */\n popupClassName?: string\n\n // ---- Render overrides ----\n\n /** Replace the entire trigger UI. Receives the current value(s) and a\n * boolean indicating whether the popup is open. */\n renderTrigger?: (props: {\n value: IOption | Array<IOption> | null\n open: boolean\n disabled: boolean\n readOnly: boolean\n error: boolean\n placeholder: string\n }) => React.ReactNode\n\n /** Replace the default option row renderer inside the list. */\n renderItem?: (\n option: IOption,\n state: { selected: boolean; highlighted: boolean; disabled: boolean },\n ) => React.ReactNode\n\n // ---- List chrome ----\n\n /** Component(s) rendered *before* the option list inside the popup. */\n listPrefix?: React.ReactNode\n /** Component(s) rendered *after* the option list inside the popup. */\n listSuffix?: React.ReactNode\n\n // ---- Async / lazy ----\n\n /** Called when the popup opens. Return a list of options to *replace* the\n * current `options` prop (useful for lazy fetching). */\n queryFn?: () => Promise<Array<IOption>>\n\n /** Label rendered above the select (optional). */\n label?: string\n}\n\n// ---- Sortable types ----\n\ninterface SortableEnabledProps {\n /** Enable drag‑and‑drop reordering of options in the list. */\n sortable: true\n /** Called after the user finishes reordering. Receives the new sorted\n * array of options. Required when `sortable` is `true`. */\n onSortEnd: (sortedOptions: Array<IOption>) => void\n /** When `true` and options are grouped (have `children`), items can be\n * dragged across groups. By default sorting is scoped within each group. */\n sortableAcrossGroups?: boolean\n}\n\ninterface SortableDisabledProps {\n sortable?: false\n onSortEnd?: never\n sortableAcrossGroups?: never\n}\n\nexport type LayoutSelectProps = SharedSelectProps &\n (SingleSelectProps | MultipleSelectProps) &\n (SortableEnabledProps | SortableDisabledProps)\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\n/** Resolve an `IconProp` to a ReactNode – cheap for already‑rendered nodes,\n * and defers the call for function icons. */\nfunction resolveIcon(icon: IconProp | undefined): React.ReactNode {\n if (icon === undefined || icon === null) return null\n if (typeof icon === 'function') return (icon as () => React.ReactNode)()\n return icon\n}\n\n/** Flatten a potentially nested option tree into a flat list (depth‑first).\n * Group parents (options with `children`) are **excluded** – only leaves. */\nfunction flattenOptions(options: Array<IOption>): Array<IOption> {\n const result: Array<IOption> = []\n for (const opt of options) {\n if (opt.children && opt.children.length > 0) {\n result.push(...flattenOptions(opt.children))\n } else {\n result.push(opt)\n }\n }\n return result\n}\n\n// ---------------------------------------------------------------------------\n// Display row types for virtualised list (group headers + leaf options)\n// ---------------------------------------------------------------------------\n\ntype DisplayRow =\n | { kind: 'group-header'; label: string; groupValue: string | number }\n | { kind: 'option'; option: IOption; groupValue?: string | number }\n\n/** Build a display-row list from potentially grouped options.\n * If an option has `children`, emit a group-header row followed by child\n * option rows. Options without `children` are emitted as top-level\n * option rows (groupValue = undefined). */\nfunction buildDisplayRows(options: Array<IOption>): Array<DisplayRow> {\n const rows: Array<DisplayRow> = []\n for (const opt of options) {\n if (opt.children && opt.children.length > 0) {\n rows.push({\n kind: 'group-header',\n label: opt.label,\n groupValue: opt.value,\n })\n for (const child of opt.children) {\n rows.push({ kind: 'option', option: child, groupValue: opt.value })\n }\n } else {\n rows.push({ kind: 'option', option: opt })\n }\n }\n return rows\n}\n\n/** Check whether the options list contains any grouped entries. */\nfunction hasGroups(options: Array<IOption>): boolean {\n return options.some((o) => o.children && o.children.length > 0)\n}\n\n/** Simple value equality check for options. */\nfunction optionEq(a: IOption, b: IOption) {\n return a.value === b.value\n}\n\nfunction isSelected(option: IOption, value: IOption | Array<IOption> | null) {\n if (!value) return false\n if (Array.isArray(value)) return value.some((v) => optionEq(v, option))\n return optionEq(value, option)\n}\n\n// ---------------------------------------------------------------------------\n// Sortable item wrapper (for dnd‑kit inside virtual list)\n// ---------------------------------------------------------------------------\n\ninterface SortableItemProps {\n id: string\n children: React.ReactNode\n disabled?: boolean\n}\n\nfunction SortableItem({ id, children, disabled }: SortableItemProps) {\n const {\n setNodeRef,\n attributes,\n listeners,\n transform,\n transition,\n isDragging,\n } = useSortable({ id, disabled })\n\n const style: React.CSSProperties = {\n transform: transform\n ? `translate3d(${transform.x}px, ${transform.y}px, 0)`\n : undefined,\n transition,\n opacity: isDragging ? 0.5 : 1,\n position: 'relative',\n zIndex: isDragging ? 50 : undefined,\n }\n\n return (\n <div ref={setNodeRef} style={style} className=\"flex items-center\">\n {!disabled && (\n <button\n type=\"button\"\n className=\"flex shrink-0 cursor-grab items-center px-1 text-muted-foreground hover:text-foreground active:cursor-grabbing\"\n {...attributes}\n {...listeners}\n >\n <GripVertical className=\"size-3.5\" />\n </button>\n )}\n <div className=\"min-w-0 flex-1\">{children}</div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// DisabledTooltip wrapper\n// ---------------------------------------------------------------------------\n\nfunction MaybeTooltip({\n tooltip,\n children,\n}: {\n tooltip?: string\n children: React.ReactElement\n}) {\n if (!tooltip) return children\n return (\n <Tooltip.Root>\n <Tooltip.Trigger render={children} />\n <Tooltip.Portal>\n <Tooltip.Positioner sideOffset={6}>\n <Tooltip.Popup className=\"rounded-md bg-foreground px-2.5 py-1 text-xs text-background shadow-md\">\n {tooltip}\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Chip (for multiple‑select trigger)\n// ---------------------------------------------------------------------------\n\ninterface ChipProps {\n option: IOption\n onRemove?: () => void\n readOnly?: boolean\n disabled?: boolean\n className?: string\n /** Mark as the \"partial\" chip that may be squeezed to truncate. */\n partial?: boolean\n}\n\nfunction Chip({\n option,\n onRemove,\n readOnly,\n disabled,\n className,\n partial,\n}: ChipProps) {\n return (\n <span\n data-partial-chip={partial || undefined}\n className={cn(\n 'inline-flex max-w-35 items-center gap-1 rounded-md border border-border bg-secondary px-2 py-0.5 text-xs leading-5 text-secondary-foreground',\n disabled && 'opacity-50',\n className,\n )}\n >\n {option.icon && (\n <span className=\"flex shrink-0 items-center [&_svg]:size-3\">\n {resolveIcon(option.icon)}\n </span>\n )}\n <span className=\"truncate\">{option.label}</span>\n {!readOnly && !disabled && onRemove && (\n <button\n type=\"button\"\n className=\"ml-0.5 flex shrink-0 items-center rounded-sm text-muted-foreground hover:text-foreground\"\n onClick={(e) => {\n e.stopPropagation()\n onRemove()\n }}\n tabIndex={-1}\n aria-label={`Remove ${option.label}`}\n >\n <X className=\"size-3\" />\n </button>\n )}\n </span>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Overflow chip badge\n// ---------------------------------------------------------------------------\n\nfunction OverflowBadge({\n items,\n onRemove,\n}: {\n items: Array<IOption>\n onRemove?: (option: IOption) => void\n}) {\n if (items.length === 0) return null\n return (\n <Tooltip.Root>\n <Tooltip.Trigger\n render={\n <span className=\"inline-flex shrink-0 items-center rounded-md border border-border bg-muted px-1.5 py-0.5 text-xs font-medium text-muted-foreground\">\n +{items.length}\n </span>\n }\n />\n <Tooltip.Portal>\n <Tooltip.Positioner sideOffset={6}>\n <Tooltip.Popup className=\"max-w-xs rounded-md bg-foreground px-3 py-2 text-xs text-background shadow-md\">\n <div className=\"flex flex-wrap gap-1\">\n {items.map((item) => (\n <span\n key={item.value}\n className=\"inline-flex items-center gap-1 rounded-md border border-background/20 bg-background/10 px-1.5 py-0.5 text-xs leading-4 text-background\"\n >\n {item.icon && (\n <span className=\"flex shrink-0 items-center [&_svg]:size-3\">\n {resolveIcon(item.icon)}\n </span>\n )}\n <span className=\"truncate\">{item.label}</span>\n {onRemove && (\n <button\n type=\"button\"\n className=\"ml-0.5 flex shrink-0 items-center rounded-sm text-background/60 hover:text-background\"\n onClick={(e) => {\n e.stopPropagation()\n onRemove(item)\n }}\n tabIndex={-1}\n aria-label={`Remove ${item.label}`}\n >\n <X className=\"size-3\" />\n </button>\n )}\n </span>\n ))}\n </div>\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Default trigger renderers\n// ---------------------------------------------------------------------------\n\nfunction SingleTriggerContent({\n value,\n placeholder,\n}: {\n value: IOption | null\n placeholder: string\n}) {\n if (!value) {\n return <span className=\"truncate text-muted-foreground\">{placeholder}</span>\n }\n return (\n <span className=\"flex items-center gap-2 truncate\">\n {value.icon && (\n <span className=\"flex shrink-0 items-center [&_svg]:size-4\">\n {resolveIcon(value.icon)}\n </span>\n )}\n <span className=\"truncate\">{value.label}</span>\n </span>\n )\n}\n\nfunction MultipleTriggerContent({\n value,\n placeholder,\n collapsed,\n showItemsLength,\n onRemove,\n readOnly,\n disabled,\n}: {\n value: Array<IOption>\n placeholder: string\n collapsed?: boolean\n showItemsLength?: number\n onRemove?: (option: IOption) => void\n readOnly?: boolean\n disabled?: boolean\n}) {\n // Shared layout classes so measure layer, display div, and wrappers\n // always use the same gap / alignment. Change once, applied everywhere.\n const chipRowClass = 'flex items-center gap-1'\n\n const wrapperRef = useRef<HTMLDivElement>(null)\n const measureRef = useRef<HTMLDivElement>(null)\n const [visibleCount, setVisibleCount] = useState(value.length)\n const [lastIsPartial, setLastIsPartial] = useState(false)\n const [measured, setMeasured] = useState(false)\n\n // Cap invisible measurement chips – no single-row trigger needs more than\n // ~20 chips, so we avoid creating thousands of DOM nodes for large lists.\n const measureCount = Math.min(value.length, 20)\n\n const calculate = React.useEffectEvent(() => {\n const measureContainer = measureRef.current\n if (!measureContainer) return\n\n const children = Array.from(measureContainer.children) as Array<HTMLElement>\n const containerRight = measureContainer.getBoundingClientRect().right\n const gap = parseFloat(getComputedStyle(measureContainer).columnGap) || 0\n // The invisible layer has no badge sibling, so always reserve space\n // for the badge that will appear in the visible layer.\n // Estimate badge width based on overflow digit count:\n // \"+N\" at text-xs with px-1.5 + border ≈ 14px + 8px per character.\n const estimateBadgeWidth = (overflowCount: number) =>\n overflowCount > 0 ? 14 + 8 * String(overflowCount).length : 0\n let count = 0\n let partial = false\n\n for (const child of children) {\n const childRight = child.getBoundingClientRect().right\n const overflow = value.length - (count + 1)\n const reserve =\n overflow > 0 ? Math.max(40, estimateBadgeWidth(overflow)) : 0\n if (childRight + reserve <= containerRight) {\n count++\n } else {\n break\n }\n }\n // Show at least 1 chip when there are items\n count = Math.max(1, count)\n\n // If there are overflow items, check whether an extra \"partial\"\n // (squeezed) chip can fit. Chips with icons need more space.\n if (count < value.length && children.length >= count) {\n const lastRight = children[count - 1].getBoundingClientRect().right\n // If the partial chip would be the LAST item, no badge is needed.\n const needsBadge = count + 1 < value.length\n const badgeReserve = needsBadge\n ? Math.max(40, estimateBadgeWidth(value.length - count - 1))\n : 0\n const spaceForPartial = containerRight - badgeReserve - lastRight - gap\n const nextChip = value[count]\n // Base minimum: 50px (covers label truncation + remove button).\n // If the chip has an icon, add the icon's actual rendered width + gap.\n let minPartialWidth = 50\n if (nextChip.icon && children.length > count) {\n const iconWrapper = children[count].firstElementChild\n if (iconWrapper) {\n minPartialWidth += iconWrapper.getBoundingClientRect().width + gap\n }\n }\n if (spaceForPartial >= minPartialWidth) {\n count++ // include partial chip in the count\n partial = true\n }\n }\n\n setVisibleCount(count)\n setLastIsPartial(partial)\n setMeasured(true)\n })\n\n useLayoutEffect(() => {\n if (collapsed || value.length === 0) {\n setVisibleCount(value.length)\n setLastIsPartial(false)\n setMeasured(true)\n return\n }\n\n const wrapper = wrapperRef.current\n const container = measureRef.current\n if (!wrapper || !container) return\n\n // Measure immediately (synchronous, before browser paint)\n calculate()\n\n // Re-measure whenever the wrapper resizes (window resize, container\n // layout change). Because we always measure the invisible layer\n // (which has ALL chips as shrink-0), this correctly handles both\n // resize-smaller AND resize-larger.\n const observer = new ResizeObserver(calculate)\n observer.observe(wrapper)\n return () => observer.disconnect()\n }, [collapsed, value])\n\n if (value.length === 0) {\n return <span className=\"truncate text-muted-foreground\">{placeholder}</span>\n }\n\n // Invisible measurement layer – always present, always has ALL chips\n // rendered at natural (shrink-0) size for stable measurement.\n const measureLayer = !collapsed && (\n <div\n ref={measureRef}\n className={cn(\n 'pointer-events-none absolute inset-0 overflow-hidden opacity-0',\n chipRowClass,\n )}\n aria-hidden\n >\n {value.slice(0, measureCount).map((opt) => (\n <Chip\n key={opt.value}\n option={opt}\n onRemove={onRemove ? () => {} : undefined}\n readOnly={readOnly}\n disabled={disabled}\n className=\"shrink-0\"\n />\n ))}\n </div>\n )\n\n // Wait for first measurement before showing real chips (SSR safety).\n const showContent = collapsed || measured\n if (!showContent) {\n return (\n <div\n ref={wrapperRef}\n className={cn('relative min-w-0 flex-1 overflow-hidden', chipRowClass)}\n >\n {measureLayer}\n <span className=\"truncate text-muted-foreground\">\n {value.length} selected\n </span>\n </div>\n )\n }\n\n // Determine maximum fully-visible chips.\n let maxVisible = collapsed ? value.length : visibleCount\n const hasExplicitLimit = !collapsed && showItemsLength !== undefined\n if (hasExplicitLimit) {\n maxVisible = showItemsLength\n }\n\n const hasOverflow = maxVisible < value.length\n const displayed = value.slice(0, maxVisible)\n const overflowItems = value.slice(maxVisible)\n\n return (\n <div\n ref={wrapperRef}\n className={cn('relative min-w-0 flex-1', chipRowClass)}\n >\n {measureLayer}\n <div\n className={cn(\n 'min-w-0 flex-1',\n chipRowClass,\n collapsed ? 'flex-wrap' : 'overflow-hidden',\n )}\n >\n {displayed.map((opt, i) => {\n const isPartial =\n (hasOverflow || lastIsPartial) &&\n !hasExplicitLimit &&\n i === displayed.length - 1\n const shouldShrink = isPartial || hasExplicitLimit\n return (\n <Chip\n key={opt.value}\n option={opt}\n onRemove={onRemove ? () => onRemove(opt) : undefined}\n readOnly={readOnly}\n disabled={disabled}\n partial={isPartial}\n className={shouldShrink ? 'min-w-0 shrink' : 'shrink-0'}\n />\n )\n })}\n </div>\n {overflowItems.length > 0 && (\n <span className=\"shrink-0\">\n <OverflowBadge items={overflowItems} onRemove={onRemove} />\n </span>\n )}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Option item (rendered inside Command.Item + virtual list)\n// ---------------------------------------------------------------------------\n\ninterface OptionRowProps {\n option: IOption\n selected: boolean\n renderItem?: LayoutSelectProps['renderItem']\n onSelect: (option: IOption) => void\n highlighted?: boolean\n}\n\nfunction OptionRow({\n option,\n selected,\n renderItem,\n onSelect,\n highlighted = false,\n}: OptionRowProps) {\n const content = renderItem ? (\n renderItem(option, {\n selected,\n highlighted,\n disabled: !!option.disabled,\n })\n ) : (\n <div className=\"flex w-full items-center gap-2\">\n {option.icon && (\n <span className=\"flex shrink-0 items-center [&_svg]:size-4\">\n {resolveIcon(option.icon)}\n </span>\n )}\n <span className=\"flex-1 truncate\">{option.label}</span>\n {selected && (\n <span className=\"ml-auto flex shrink-0 items-center text-primary\">\n <Check className=\"size-4\" />\n </span>\n )}\n </div>\n )\n\n const row = (\n <Command.Item\n value={`${option.value}`}\n disabled={option.disabled}\n onSelect={() => {\n if (!option.disabled) onSelect(option)\n }}\n className={cn(\n 'relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground',\n option.disabled && 'pointer-events-none opacity-50',\n )}\n data-highlighted={highlighted || undefined}\n >\n {content}\n </Command.Item>\n )\n\n if (option.disabled && option.disabledTooltip) {\n return (\n <MaybeTooltip tooltip={option.disabledTooltip}>\n <div>{row}</div>\n </MaybeTooltip>\n )\n }\n\n return row\n}\n\n// ---------------------------------------------------------------------------\n// Virtual + Sortable list\n// ---------------------------------------------------------------------------\n\ninterface VirtualListProps {\n /** Raw (potentially grouped) options – used to build display rows. */\n options: Array<IOption>\n /** Flat leaf items for backward-compat (used when there are no groups). */\n items: Array<IOption>\n selectedValue: IOption | Array<IOption> | null\n renderItem?: LayoutSelectProps['renderItem']\n onSelect: (option: IOption) => void\n sortable?: boolean\n sortableAcrossGroups?: boolean\n onSortEnd?: (items: Array<IOption>) => void\n /** Called when items within a group are reordered (grouped mode). Receives\n * the group parent value and the new ordered children. */\n onGroupSortEnd?: (\n groupValue: string | number,\n children: Array<IOption>,\n ) => void\n /** Called when a cross-group drag produces a new grouped tree. */\n onTreeSort?: (tree: Array<IOption>) => void\n}\n\nfunction VirtualList({\n options,\n items,\n selectedValue,\n renderItem,\n onSelect,\n sortable,\n sortableAcrossGroups,\n onSortEnd,\n onGroupSortEnd,\n onTreeSort,\n}: VirtualListProps) {\n const parentRef = useRef<HTMLDivElement>(null)\n const [activeId, setActiveId] = useState<string | null>(null)\n\n // During a cross-group drag, holds the intermediate tree with the dragged\n // item moved to the destination group. When null, `options` prop is used.\n const [dragTree, setDragTree] = useState<Array<IOption> | null>(null)\n\n const effectiveOptions = dragTree ?? options\n\n const grouped = useMemo(() => hasGroups(effectiveOptions), [effectiveOptions])\n const displayRows = useMemo(\n () => (grouped ? buildDisplayRows(effectiveOptions) : undefined),\n [grouped, effectiveOptions],\n )\n\n // The flat list used by the virtualizer – either from display rows or the\n // legacy flat items.\n const flatDisplayRows = useMemo(\n () => items.map<DisplayRow>((o) => ({ kind: 'option', option: o })),\n [items],\n )\n const virtualItems = displayRows ?? flatDisplayRows\n\n // Derive activeIndex from activeId so it stays correct after cross-group\n // moves update the tree mid-drag.\n const activeIndex = useMemo(() => {\n if (!activeId) return null\n const idx = virtualItems.findIndex(\n (r) => r.kind === 'option' && `${r.option.value}` === activeId,\n )\n return idx !== -1 ? idx : null\n }, [activeId, virtualItems])\n\n // Custom range extractor: always include the actively-dragged item so the\n // virtualizer never unmounts it (dnd-kit needs the DOM node to stay alive).\n const rangeExtractor = useCallback(\n (range: Range) => {\n const result = defaultRangeExtractor(range)\n if (activeIndex !== null && !result.includes(activeIndex)) {\n result.push(activeIndex)\n result.sort((a, b) => a - b)\n }\n return result\n },\n [activeIndex],\n )\n\n const virtualizer = useVirtualizer({\n count: virtualItems.length,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) =>\n virtualItems[index].kind === 'group-header' ? 28 : 36,\n overscan: 8,\n rangeExtractor,\n })\n\n // After a cross-group drop the tree rebuilds and displayRows changes.\n // Force the virtualizer to discard stale position caches BEFORE paint\n // so every row gets the correct translateY immediately.\n useLayoutEffect(() => {\n virtualizer.measure()\n }, [virtualizer, displayRows])\n\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),\n useSensor(KeyboardSensor),\n )\n\n // Flat sortable IDs for the single SortableContext wrapping all items.\n const flatSortableIds = useMemo(\n () =>\n virtualItems\n .filter(\n (r): r is DisplayRow & { kind: 'option' } => r.kind === 'option',\n )\n .map((r) => `${r.option.value}`),\n [virtualItems],\n )\n\n // Custom collision detection: restrict collisions to same-group items\n // when sortableAcrossGroups is disabled.\n const sameGroupCollision: CollisionDetection = useCallback(\n (args) => {\n if (!displayRows) return closestCenter(args)\n const draggedId = args.active.id\n const activeRow = displayRows.find(\n (r) => r.kind === 'option' && `${r.option.value}` === `${draggedId}`,\n )\n if (!activeRow || activeRow.kind !== 'option') return closestCenter(args)\n const activeGroup = activeRow.groupValue\n const filtered = args.droppableContainers.filter((container) => {\n const row = displayRows.find(\n (r) =>\n r.kind === 'option' && `${r.option.value}` === `${container.id}`,\n )\n return row && row.kind === 'option' && row.groupValue === activeGroup\n })\n return closestCenter({ ...args, droppableContainers: filtered })\n },\n [displayRows],\n )\n\n // Custom sorting strategy for grouped options.\n // Only displace items that are in the same group as the active (dragged)\n // item. Cross-group items are never displaced — group headers are at\n // fixed virtualizer positions and can't participate in dnd-kit transforms,\n // so shifting items across groups would cause overlaps.\n const sortingStrategy = useMemo(() => {\n if (!grouped || !displayRows) return verticalListSortingStrategy\n const idToGroup = new Map<string, string | number | undefined>()\n for (const row of displayRows) {\n if (row.kind === 'option') {\n idToGroup.set(`${row.option.value}`, row.groupValue)\n }\n }\n const noMove = { x: 0, y: 0, scaleX: 1, scaleY: 1 }\n return (\n args: Parameters<typeof verticalListSortingStrategy>[0],\n ): ReturnType<typeof verticalListSortingStrategy> => {\n const draggedId = flatSortableIds[args.activeIndex]\n const currentId = flatSortableIds[args.index]\n if (\n draggedId &&\n currentId &&\n idToGroup.get(draggedId) !== idToGroup.get(currentId)\n ) {\n return noMove\n }\n return verticalListSortingStrategy(args)\n }\n }, [grouped, displayRows, flatSortableIds])\n\n // ---- onDragOver: move item between groups during drag ----\n const handleDragOver = useCallback(\n (event: DragOverEvent) => {\n if (!sortableAcrossGroups || !grouped) return\n const { active, over } = event\n if (!over || active.id === over.id) return\n\n const currentTree = dragTree ?? options\n const currentRows = buildDisplayRows(currentTree)\n\n const activeRow = currentRows.find(\n (r) => r.kind === 'option' && `${r.option.value}` === `${active.id}`,\n )\n const overRow = currentRows.find(\n (r) => r.kind === 'option' && `${r.option.value}` === `${over.id}`,\n )\n\n if (\n !activeRow ||\n activeRow.kind !== 'option' ||\n !overRow ||\n overRow.kind !== 'option'\n )\n return\n\n // Same group — let dnd-kit's sorting strategy handle displacement\n if (activeRow.groupValue === overRow.groupValue) return\n\n // Cross-group: move item from source group to destination group\n const newTree = currentTree.map((opt) => {\n if (!opt.children) return opt\n if (opt.value === activeRow.groupValue) {\n return {\n ...opt,\n children: opt.children.filter(\n (c) => `${c.value}` !== `${active.id}`,\n ),\n }\n }\n if (opt.value === overRow.groupValue) {\n // Remove first in case of duplicate, then insert at over position\n const destChildren = opt.children.filter(\n (c) => `${c.value}` !== `${active.id}`,\n )\n const overIdx = destChildren.findIndex(\n (c) => `${c.value}` === `${over.id}`,\n )\n destChildren.splice(\n overIdx !== -1 ? overIdx : destChildren.length,\n 0,\n activeRow.option,\n )\n return { ...opt, children: destChildren }\n }\n return opt\n })\n\n setDragTree(newTree)\n },\n [sortableAcrossGroups, grouped, dragTree, options],\n )\n\n // ---- Drag end handlers ----\n const handleDragEndFlat = useCallback(\n (event: DragEndEvent) => {\n setActiveId(null)\n setDragTree(null)\n const { active, over } = event\n if (!over || active.id === over.id || !onSortEnd) return\n const oldIndex = items.findIndex((i) => `${i.value}` === `${active.id}`)\n const newIndex = items.findIndex((i) => `${i.value}` === `${over.id}`)\n if (oldIndex !== -1 && newIndex !== -1) {\n onSortEnd(arrayMove(items, oldIndex, newIndex))\n }\n },\n [items, onSortEnd],\n )\n\n const handleDragEndGrouped = useCallback(\n (event: DragEndEvent) => {\n setActiveId(null)\n const { active, over } = event\n\n if (!over || active.id === over.id) {\n // No move — revert intermediate drag tree\n if (dragTree) onTreeSort?.(dragTree)\n setDragTree(null)\n return\n }\n\n if (!displayRows) {\n setDragTree(null)\n return\n }\n\n const activeRow = displayRows.find(\n (r) => r.kind === 'option' && `${r.option.value}` === `${active.id}`,\n )\n const overRow = displayRows.find(\n (r) => r.kind === 'option' && `${r.option.value}` === `${over.id}`,\n )\n\n if (\n !activeRow ||\n activeRow.kind !== 'option' ||\n !overRow ||\n overRow.kind !== 'option'\n ) {\n setDragTree(null)\n return\n }\n\n const activeGroup = activeRow.groupValue\n const overGroup = overRow.groupValue\n const baseTree = dragTree ?? options\n\n if (activeGroup === overGroup) {\n // Same-group reorder (applies on top of any earlier cross-group move)\n const groupChildren = displayRows\n .filter(\n (r): r is DisplayRow & { kind: 'option' } =>\n r.kind === 'option' && r.groupValue === activeGroup,\n )\n .map((r) => r.option)\n\n const oldIdx = groupChildren.findIndex(\n (i) => `${i.value}` === `${active.id}`,\n )\n const newIdx = groupChildren.findIndex(\n (i) => `${i.value}` === `${over.id}`,\n )\n\n if (oldIdx !== -1 && newIdx !== -1 && oldIdx !== newIdx) {\n const reordered = arrayMove(groupChildren, oldIdx, newIdx)\n if (dragTree) {\n // Cross-group move happened earlier — commit full tree\n const finalTree = baseTree.map((opt) => {\n if (opt.value === activeGroup && opt.children) {\n return { ...opt, children: reordered }\n }\n return opt\n })\n onTreeSort?.(finalTree)\n } else {\n // Pure within-group reorder\n onGroupSortEnd?.(activeGroup!, reordered)\n }\n } else if (dragTree) {\n // Cross-group happened but no final reorder within group\n onTreeSort?.(baseTree)\n }\n } else {\n // Fallback: active and over still in different groups at drop time\n const finalTree = baseTree.map((opt) => {\n if (!opt.children) return opt\n if (opt.value === activeGroup) {\n return {\n ...opt,\n children: opt.children.filter(\n (c) => `${c.value}` !== `${active.id}`,\n ),\n }\n }\n if (opt.value === overGroup) {\n const destChildren = [...opt.children]\n const overIdx = destChildren.findIndex(\n (c) => `${c.value}` === `${over.id}`,\n )\n destChildren.splice(\n overIdx !== -1 ? overIdx + 1 : destChildren.length,\n 0,\n activeRow.option,\n )\n return { ...opt, children: destChildren }\n }\n return opt\n })\n onTreeSort?.(finalTree)\n }\n\n setDragTree(null)\n },\n [dragTree, options, displayRows, onTreeSort, onGroupSortEnd],\n )\n\n // ---- Render the scrollable virtualised content ----\n const listContent = (\n <div\n ref={parentRef}\n className={cn(\n 'max-h-75 overflow-x-hidden',\n activeIndex !== null ? 'overflow-y-visible' : 'overflow-y-auto',\n )}\n >\n <div\n style={{\n height: `${virtualizer.getTotalSize()}px`,\n position: 'relative',\n width: '100%',\n }}\n >\n {virtualizer.getVirtualItems().map((vItem) => {\n const displayRow = virtualItems[vItem.index]\n\n // ----- Group header row -----\n if (displayRow.kind === 'group-header') {\n return (\n <div\n key={`gh-${displayRow.groupValue}`}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${vItem.start}px)`,\n }}\n data-index={vItem.index}\n ref={virtualizer.measureElement}\n >\n <div className=\"px-2 py-1 text-xs font-semibold text-muted-foreground\">\n {displayRow.label}\n </div>\n </div>\n )\n }\n\n // ----- Leaf option row -----\n const option = displayRow.option\n\n const row = (\n <OptionRow\n key={option.value}\n option={option}\n selected={isSelected(option, selectedValue)}\n renderItem={renderItem}\n onSelect={onSelect}\n />\n )\n\n const wrappedRow = sortable ? (\n <SortableItem\n key={option.value}\n id={`${option.value}`}\n disabled={option.disabled}\n >\n {row}\n </SortableItem>\n ) : (\n row\n )\n\n return (\n <div\n key={option.value}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${vItem.start}px)`,\n }}\n data-index={vItem.index}\n ref={virtualizer.measureElement}\n >\n {wrappedRow}\n </div>\n )\n })}\n </div>\n </div>\n )\n\n if (sortable) {\n const handleDragStart = (event: { active: { id: string | number } }) => {\n setActiveId(`${event.active.id}`)\n }\n const handleCancel = () => {\n setActiveId(null)\n setDragTree(null)\n }\n\n // Single SortableContext wrapping everything.\n // Custom sortingStrategy handles per-group displacement.\n return (\n <DndContext\n modifiers={[restrictToVerticalAxis, restrictToFirstScrollableAncestor]}\n sensors={sensors}\n collisionDetection={\n grouped && !sortableAcrossGroups ? sameGroupCollision : closestCenter\n }\n onDragStart={handleDragStart}\n onDragOver={handleDragOver}\n onDragEnd={grouped ? handleDragEndGrouped : handleDragEndFlat}\n onDragCancel={handleCancel}\n >\n <SortableContext items={flatSortableIds} strategy={sortingStrategy}>\n {listContent}\n </SortableContext>\n </DndContext>\n )\n }\n\n return listContent\n}\n\n// ---------------------------------------------------------------------------\n// Main component\n// ---------------------------------------------------------------------------\n\nexport function LayoutSelect(props: LayoutSelectProps) {\n const {\n type,\n options,\n placeholder = 'Select item',\n disabled = false,\n readOnly = false,\n error = false,\n clearable = false,\n className,\n triggerClassName,\n popupClassName,\n renderTrigger,\n renderItem,\n listPrefix,\n listSuffix,\n queryFn,\n label,\n } = props\n\n const [open, setOpen] = useState(false)\n const [search, setSearch] = useState('')\n const [asyncOptions, setAsyncOptions] = useState<Array<IOption> | null>(null)\n const [loading, setLoading] = useState(false)\n const [internalSortedOptions, setInternalSortedOptions] =\n useState<Array<IOption> | null>(null)\n\n // ---- Resolve current value ----\n const currentValue = useMemo(() => {\n if (type === 'single') {\n return (props as SingleSelectProps).selectValue ?? null\n }\n return (props as MultipleSelectProps).selectValue ?? []\n }, [type, props])\n\n // ---- Resolve display options ----\n const resolvedOptions = useMemo(() => {\n const base = asyncOptions ?? options\n return internalSortedOptions ?? base\n }, [asyncOptions, options, internalSortedOptions])\n\n const flatOptions = useMemo(\n () => flattenOptions(resolvedOptions),\n [resolvedOptions],\n )\n\n // ---- Filtered options (search) ----\n // For virtualisation we need a flat list of leaf options, and when options\n // are grouped we also keep a filtered version of the grouped tree so that\n // VirtualList can render group headers correctly.\n const filteredOptions = useMemo(() => {\n if (!search) return flatOptions\n const q = search.toLowerCase()\n return flatOptions.filter((o) => o.label.toLowerCase().includes(q))\n }, [flatOptions, search])\n\n /** Resolved options filtered by search, preserving group structure. */\n const filteredGroupedOptions = useMemo(() => {\n if (!search) return resolvedOptions\n const q = search.toLowerCase()\n return resolvedOptions\n .map((opt) => {\n if (opt.children && opt.children.length > 0) {\n const matched = opt.children.filter((c) =>\n c.label.toLowerCase().includes(q),\n )\n if (matched.length === 0) return null\n return { ...opt, children: matched }\n }\n return opt.label.toLowerCase().includes(q) ? opt : null\n })\n .filter(Boolean) as Array<IOption>\n }, [resolvedOptions, search])\n\n // ---- Async loading ----\n useEffect(() => {\n if (open && queryFn) {\n let cancelled = false\n setLoading(true)\n queryFn()\n .then((data) => {\n if (!cancelled) {\n setAsyncOptions(data)\n }\n })\n .finally(() => {\n if (!cancelled) setLoading(false)\n })\n return () => {\n cancelled = true\n }\n }\n }, [open, queryFn])\n\n // Reset search when closed\n useEffect(() => {\n if (!open) {\n setSearch('')\n }\n }, [open])\n\n // ---- Selection handler ----\n const handleSelect = useCallback(\n (option: IOption) => {\n if (readOnly) return\n\n if (type === 'single') {\n const onChange = (props as SingleSelectProps).onChange\n const current = currentValue as IOption | null\n if (clearable && current && optionEq(current, option)) {\n onChange?.(null, option)\n } else {\n onChange?.(option, option)\n }\n setOpen(false)\n } else {\n const onChange = (props as MultipleSelectProps).onChange\n const current = currentValue as Array<IOption>\n const exists = current.some((v) => optionEq(v, option))\n if (exists) {\n onChange?.(\n current.filter((v) => !optionEq(v, option)),\n option,\n )\n } else {\n onChange?.([...current, option], option)\n }\n }\n },\n [type, currentValue, clearable, readOnly, props],\n )\n\n // ---- Remove chip (multiple) ----\n const handleRemoveChip = useCallback(\n (option: IOption) => {\n if (type !== 'multiple' || readOnly || disabled) return\n const onChange = (props as MultipleSelectProps).onChange\n const current = currentValue as Array<IOption>\n onChange?.(\n current.filter((v) => !optionEq(v, option)),\n option,\n )\n },\n [type, currentValue, readOnly, disabled, props],\n )\n\n // ---- Select all / unselect all (multiple only) ----\n const handleToggleAll = useCallback(() => {\n if (type !== 'multiple' || readOnly || disabled) return\n const onChange = (props as MultipleSelectProps).onChange\n const current = currentValue as Array<IOption>\n const selectableOptions = flatOptions.filter((o) => !o.disabled)\n const allSelected =\n selectableOptions.length > 0 &&\n selectableOptions.every((o) => current.some((v) => optionEq(v, o)))\n\n if (allSelected) {\n // Keep only disabled options that were somehow selected\n const kept = current.filter((v) =>\n selectableOptions.every((o) => !optionEq(o, v)),\n )\n onChange?.(kept, selectableOptions[0])\n } else {\n // Merge: keep existing + add missing selectable options\n const missing = selectableOptions.filter(\n (o) => !current.some((v) => optionEq(v, o)),\n )\n onChange?.([...current, ...missing], selectableOptions[0])\n }\n }, [type, currentValue, flatOptions, readOnly, disabled, props])\n\n const allSelected = useMemo(() => {\n if (type !== 'multiple') return false\n const current = currentValue as Array<IOption>\n const selectableOptions = flatOptions.filter((o) => !o.disabled)\n return (\n selectableOptions.length > 0 &&\n selectableOptions.every((o) => current.some((v) => optionEq(v, o)))\n )\n }, [type, currentValue, flatOptions])\n\n const sortable = props.sortable ?? false\n const sortableAcrossGroups = props.sortable\n ? ((props as SortableEnabledProps).sortableAcrossGroups ?? false)\n : false\n const consumerOnSortEnd = props.sortable\n ? (props as SortableEnabledProps).onSortEnd\n : undefined\n\n // ---- Sort handler (flat) ----\n const handleSortEnd = useCallback(\n (sorted: Array<IOption>) => {\n setInternalSortedOptions(sorted)\n consumerOnSortEnd?.(sorted)\n },\n [consumerOnSortEnd],\n )\n\n // ---- Sort handler (within a group) ----\n const handleGroupSortEnd = useCallback(\n (groupValue: string | number, reorderedChildren: Array<IOption>) => {\n // Rebuild the full options tree with the updated group\n const updated = resolvedOptions.map((opt) => {\n if (opt.value === groupValue && opt.children) {\n return { ...opt, children: reorderedChildren }\n }\n return opt\n })\n setInternalSortedOptions(updated)\n consumerOnSortEnd?.(flattenOptions(updated))\n },\n [resolvedOptions, consumerOnSortEnd],\n )\n\n // ---- Sort handler (cross-group tree rebuild) ----\n const handleTreeSort = useCallback(\n (newTree: Array<IOption>) => {\n setInternalSortedOptions(newTree)\n consumerOnSortEnd?.(flattenOptions(newTree))\n },\n [consumerOnSortEnd],\n )\n\n // ---- Open handler ----\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (disabled || readOnly) return\n setOpen(nextOpen)\n },\n [disabled, readOnly],\n )\n\n // ---- Trigger content ----\n const triggerContent = useMemo(() => {\n if (renderTrigger) {\n return renderTrigger({\n value: currentValue,\n open,\n disabled,\n readOnly,\n error,\n placeholder,\n })\n }\n\n if (type === 'single') {\n return (\n <SingleTriggerContent\n value={currentValue as IOption | null}\n placeholder={placeholder}\n />\n )\n }\n\n return (\n <MultipleTriggerContent\n value={currentValue as Array<IOption>}\n placeholder={placeholder}\n collapsed={(props as MultipleSelectProps).collapsed}\n showItemsLength={(props as MultipleSelectProps).showItemsLength}\n onRemove={handleRemoveChip}\n readOnly={readOnly}\n disabled={disabled}\n />\n )\n }, [\n renderTrigger,\n type,\n currentValue,\n open,\n disabled,\n readOnly,\n error,\n placeholder,\n props,\n handleRemoveChip,\n ])\n\n return (\n <Tooltip.Provider>\n <div className={cn('relative inline-flex flex-col', className)}>\n {label && (\n <label className=\"mb-1 text-sm font-medium text-foreground\">\n {label}\n </label>\n )}\n <Popover.Root open={open} onOpenChange={handleOpenChange}>\n <Popover.Trigger\n disabled={disabled}\n render={\n <button\n type=\"button\"\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n aria-invalid={error || undefined}\n data-readonly={readOnly || undefined}\n className={cn(\n 'border-input flex min-h-9 w-full min-w-45 items-center gap-2 rounded-md border bg-transparent px-3 py-1.5 text-sm shadow-xs transition-[color,box-shadow,border-color] outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20',\n 'data-readonly:pointer-events-none data-readonly:opacity-70',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n \"[&_svg:not([class*='text-'])]:text-muted-foreground\",\n triggerClassName,\n )}\n />\n }\n >\n <div className=\"flex min-w-0 flex-1 items-center\">\n {triggerContent}\n </div>\n <ChevronDown className=\"size-4 shrink-0 opacity-50\" />\n </Popover.Trigger>\n\n <Popover.Portal>\n <Popover.Positioner sideOffset={4}>\n <Popover.Popup\n className={cn(\n 'z-50 min-w-(--anchor-width) rounded-md border bg-popover text-popover-foreground shadow-md outline-none',\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:scale-95 data-ending-style:opacity-0',\n 'origin-(--transform-origin) transition-[transform,scale,opacity] duration-150',\n popupClassName,\n )}\n >\n <Command shouldFilter={false} loop>\n {/* Search input */}\n <div className=\"border-b p-1\">\n <Command.Input\n value={search}\n onValueChange={setSearch}\n placeholder=\"Search...\"\n className=\"h-8 w-full rounded-sm bg-transparent px-2 text-sm outline-none placeholder:text-muted-foreground\"\n />\n </div>\n\n {/* List prefix */}\n {listPrefix && (\n <div className=\"border-b px-2 py-1.5\">{listPrefix}</div>\n )}\n\n {/* Select all / Unselect all */}\n {type === 'multiple' && !readOnly && (\n <div className=\"border-b px-1 py-1\">\n <button\n type=\"button\"\n onClick={handleToggleAll}\n className=\"w-full rounded-sm px-2 py-1 text-left text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground\"\n >\n {allSelected ? 'Unselect all' : 'Select all'}\n </button>\n </div>\n )}\n\n <Command.List className=\"p-1\">\n {loading && (\n <Command.Loading>\n <div className=\"flex items-center justify-center py-4 text-sm text-muted-foreground\">\n Loading…\n </div>\n </Command.Loading>\n )}\n\n {!loading && filteredOptions.length === 0 && (\n <Command.Empty className=\"py-4 text-center text-sm text-muted-foreground\">\n No results found.\n </Command.Empty>\n )}\n\n {!loading && filteredOptions.length > 0 && (\n <VirtualList\n options={filteredGroupedOptions}\n items={filteredOptions}\n selectedValue={currentValue}\n renderItem={renderItem}\n onSelect={handleSelect}\n sortable={sortable}\n sortableAcrossGroups={sortableAcrossGroups}\n onSortEnd={handleSortEnd}\n onGroupSortEnd={handleGroupSortEnd}\n onTreeSort={handleTreeSort}\n />\n )}\n </Command.List>\n\n {/* List suffix */}\n {listSuffix && (\n <div className=\"border-t px-2 py-1.5\">{listSuffix}</div>\n )}\n </Command>\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n </div>\n </Tooltip.Provider>\n )\n}\n\nexport default LayoutSelect\n","import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,mBAOO;AACP,qBAAwB;AACxB,qBAAwB;AACxB,kBAAwB;AACxB,kBAOO;AACP,sBAKO;AACP,uBAGO;AACP,2BAAsD;AACtD,0BAAoD;;;AC/BpD,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD2QI;AAlGJ,SAAS,YAAY,MAA6C;AAChE,MAAI,SAAS,UAAa,SAAS,KAAM,QAAO;AAChD,MAAI,OAAO,SAAS,WAAY,QAAQ,KAA+B;AACvE,SAAO;AACT;AAIA,SAAS,eAAe,SAAyC;AAC/D,QAAM,SAAyB,CAAC;AAChC,aAAW,OAAO,SAAS;AACzB,QAAI,IAAI,YAAY,IAAI,SAAS,SAAS,GAAG;AAC3C,aAAO,KAAK,GAAG,eAAe,IAAI,QAAQ,CAAC;AAAA,IAC7C,OAAO;AACL,aAAO,KAAK,GAAG;AAAA,IACjB;AAAA,EACF;AACA,SAAO;AACT;AAcA,SAAS,iBAAiB,SAA4C;AACpE,QAAM,OAA0B,CAAC;AACjC,aAAW,OAAO,SAAS;AACzB,QAAI,IAAI,YAAY,IAAI,SAAS,SAAS,GAAG;AAC3C,WAAK,KAAK;AAAA,QACR,MAAM;AAAA,QACN,OAAO,IAAI;AAAA,QACX,YAAY,IAAI;AAAA,MAClB,CAAC;AACD,iBAAW,SAAS,IAAI,UAAU;AAChC,aAAK,KAAK,EAAE,MAAM,UAAU,QAAQ,OAAO,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AEJ;AAEA,IAAO,iBAAQ;","names":["allSelected"]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|