@constructive-io/ui 0.1.1 → 0.2.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.
Files changed (57) hide show
  1. package/dist/components/alert-dialog.js.map +1 -1
  2. package/dist/components/autocomplete.js +11 -3
  3. package/dist/components/autocomplete.js.map +1 -1
  4. package/dist/components/avatar.js.map +1 -1
  5. package/dist/components/breadcrumb.js.map +1 -1
  6. package/dist/components/combobox.d.ts +1 -1
  7. package/dist/components/combobox.js +49 -13
  8. package/dist/components/combobox.js.map +1 -1
  9. package/dist/components/command.d.ts +16 -35
  10. package/dist/components/command.js +72 -508
  11. package/dist/components/command.js.map +1 -1
  12. package/dist/components/dialog.js.map +1 -1
  13. package/dist/components/drawer.js +1 -1
  14. package/dist/components/drawer.js.map +1 -1
  15. package/dist/components/dropdown-menu.js.map +1 -1
  16. package/dist/components/form-control.js.map +1 -1
  17. package/dist/components/form.js.map +1 -1
  18. package/dist/components/input-group.js +2 -2
  19. package/dist/components/input-group.js.map +1 -1
  20. package/dist/components/input.js +1 -1
  21. package/dist/components/input.js.map +1 -1
  22. package/dist/components/json-input.js.map +1 -1
  23. package/dist/components/multi-select.js.map +1 -1
  24. package/dist/components/pagination.js.map +1 -1
  25. package/dist/components/popover.js.map +1 -1
  26. package/dist/components/portal.js.map +1 -1
  27. package/dist/components/record-picker.js +1 -1
  28. package/dist/components/record-picker.js.map +1 -1
  29. package/dist/components/resizable.js.map +1 -1
  30. package/dist/components/responsive-diagram.js +6 -4
  31. package/dist/components/responsive-diagram.js.map +1 -1
  32. package/dist/components/select.d.ts +2 -2
  33. package/dist/components/select.js +3 -3
  34. package/dist/components/select.js.map +1 -1
  35. package/dist/components/sheet.js.map +1 -1
  36. package/dist/components/sidebar.js +1 -1
  37. package/dist/components/sidebar.js.map +1 -1
  38. package/dist/components/stack/index.d.ts +11 -0
  39. package/dist/components/stack/index.js +33 -6
  40. package/dist/components/stack/index.js.map +1 -1
  41. package/dist/components/stepper.js.map +1 -1
  42. package/dist/components/table.js.map +1 -1
  43. package/dist/components/tabs.js.map +1 -1
  44. package/dist/components/tags.d.ts +1 -3
  45. package/dist/components/tags.js +107 -388
  46. package/dist/components/tags.js.map +1 -1
  47. package/dist/components/textarea.js +1 -1
  48. package/dist/components/textarea.js.map +1 -1
  49. package/dist/components/tooltip.js.map +1 -1
  50. package/dist/index.cjs +348 -363
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +22 -24
  53. package/dist/index.d.ts +22 -24
  54. package/dist/index.js +235 -250
  55. package/dist/index.js.map +1 -1
  56. package/package.json +2 -6
  57. package/src/styles/globals.css +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/portal.tsx","../../src/lib/slot.tsx","../../src/lib/utils.ts","../../src/components/button.tsx","../../src/components/alert-dialog.tsx"],"names":["React","jsx","React3","AlertDialogPrimitive","React4"],"mappings":";;;;;;;AA4CO,IAAM,cAAA,GAAiB,aAAA;AAM9B,IAAM,gBAAsBA,MAAA,CAAA,aAAA,CAAkC;AAAA,EAC7D,KAAA,EAAO,MAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,sBAAA,EAAwB,MAAA;AAAA,EACxB,cAAA,EAAgB;AACjB,CAAC,CAAA;AAuBM,SAAS,gBAAA,CAAiB;AAAA,EAChC,QAAA;AAAA,EACA,sBAAA,GAAyB,QAAA;AAAA,EACzB,cAAA,GAAiB;AAClB,CAAA,EAIG;AACF,EAAA,MAAM,aAAA,GAAsBA,kBAAW,aAAa,CAAA;AAGpD,EAAA,MAAM,QAAQ,aAAA,CAAc,KAAA,KAAU,OAAA,GAAU,aAAA,CAAc,QAAQ,CAAA,GAAI,CAAA;AAE1E,EAAA,MAAM,KAAA,GAAcA,MAAA,CAAA,OAAA;AAAA,IACnB,OAAO;AAAA,MACN,KAAA,EAAO,OAAA;AAAA,MACP,KAAA;AAAA,MACA,sBAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,IACA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A,EAAyB,SAAS,CAAA;AAAA,MAC/C,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,sBAAA,CAAuB;AAAA,EAC/B,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAkE;AACjE,EAAA,uBACCF,GAAAA;AAAA,IAACE,aAAA,CAAqB,WAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,0BAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACL;AAEF;AAMA,SAAS,iBAAA,CAAkB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA4D;AAC5G,EAAA,uBACCF,GAAAA;AAAA,IAACE,aAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,cAAA,EAAe,EAAG,SAAS,CAAA;AAAA,MACxC,GAAG;AAAA;AAAA,GACL;AAEF;AAMA,SAAS,iBAAA,CAAkB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA4D;AAC5G,EAAA,uBACCF,GAAAA;AAAA,IAACE,aAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,MAC9D,GAAG;AAAA;AAAA,GACL;AAEF","file":"alert-dialog.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Overlay layer type:\n * - 'base': Root level (page content, base floating elements)\n * - 'modal': Inside a modal overlay (dialog, sheet, drawer)\n */\nexport type OverlayLayer = 'base' | 'modal';\n\n/**\n * Where floating overlays should portal:\n * - 'root': always portal into #portal-root\n * - 'nested': let Base UI nest portals into the nearest Base UI portal node\n */\nexport type FloatingPortalStrategy = 'root' | 'nested';\n\n/**\n * Z-index mode for floating overlays.\n * - 'default': --z-layer-floating\n * - 'elevated': --z-layer-floating-elevated\n */\nexport type FloatingZIndex = 'default' | 'elevated';\n\ninterface PortalContextValue {\n\t/** Current overlay layer */\n\tlayer: OverlayLayer;\n\t/** Modal nesting depth (0 for first modal, 1 for nested, etc.) */\n\tdepth: number;\n\t/** Strategy for where floating overlays should portal */\n\tfloatingPortalStrategy: FloatingPortalStrategy;\n\t/** Z-index mode for floating overlays */\n\tfloatingZIndex: FloatingZIndex;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nexport const PORTAL_ROOT_ID = 'portal-root';\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst PortalContext = React.createContext<PortalContextValue>({\n\tlayer: 'base',\n\tdepth: 0,\n\tfloatingPortalStrategy: 'root',\n\tfloatingZIndex: 'default',\n});\n\n// ============================================================================\n// Providers\n// ============================================================================\n\n/**\n * Provider for modal overlays (Dialog, Sheet, Drawer, etc.)\n *\n * Wraps modal content to:\n * 1. Create a scoped portal container for nested floating elements\n * 2. Track the overlay layer (so floating elements know to use elevated z-index)\n * 3. Track nesting depth for stacked modals\n *\n * Usage:\n * ```tsx\n * <DialogPopup>\n * <ModalPortalScope>\n * {children} // Popovers inside here will render in the scoped container\n * </ModalPortalScope>\n * </DialogPopup>\n * ```\n */\nexport function ModalPortalScope({\n\tchildren,\n\tfloatingPortalStrategy = 'nested',\n\tfloatingZIndex = 'default',\n}: {\n\tchildren: React.ReactNode;\n\tfloatingPortalStrategy?: FloatingPortalStrategy;\n\tfloatingZIndex?: FloatingZIndex;\n}) {\n\tconst parentContext = React.useContext(PortalContext);\n\n\t// Increment depth from parent if already in modal layer\n\tconst depth = parentContext.layer === 'modal' ? parentContext.depth + 1 : 0;\n\n\tconst value = React.useMemo<PortalContextValue>(\n\t\t() => ({\n\t\t\tlayer: 'modal',\n\t\t\tdepth,\n\t\t\tfloatingPortalStrategy,\n\t\t\tfloatingZIndex,\n\t\t}),\n\t\t[depth, floatingPortalStrategy, floatingZIndex],\n\t);\n\n\treturn <PortalContext.Provider value={value}>{children}</PortalContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Get the current portal context value.\n * Used internally by other hooks.\n */\nexport function usePortalContext(): PortalContextValue {\n\treturn React.useContext(PortalContext);\n}\n\nexport function useInModalOverlay(): boolean {\n\treturn React.useContext(PortalContext).layer === 'modal';\n}\n\n/**\n * Get the root portal container element.\n * Used by modal components (Dialog, Sheet, etc.) to render their portals.\n *\n * @returns The root portal container, or null during SSR/before mount\n */\nexport function useRootPortalContainer(): HTMLElement | null {\n\tconst [container, setContainer] = React.useState<HTMLElement | null>(null);\n\n\tReact.useLayoutEffect(() => {\n\t\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\t\tsetContainer(el);\n\t}, []);\n\n\treturn container;\n}\n\n/**\n * Centralized portal + z-index policy for floating overlays.\n *\n * - When `floatingPortalStrategy` is 'nested', Base UI will automatically portal\n * into the nearest Base UI portal node (so dialog \"inert\" behavior includes it).\n * - When it's 'root', we portal into #portal-root.\n */\nexport function useFloatingOverlayPortalProps(): {\n\tcontainer?: HTMLElement | null;\n\tzIndexClass: string;\n} {\n\tconst rootContainer = useRootPortalContainer();\n\tconst { floatingPortalStrategy, floatingZIndex } = React.useContext(PortalContext);\n\n\tconst container = floatingPortalStrategy === 'nested' ? undefined : (rootContainer ?? null);\n\tconst zIndexClass =\n\t\tfloatingZIndex === 'elevated'\n\t\t\t? 'z-[var(--z-layer-floating-elevated)]'\n\t\t\t: 'z-[var(--z-layer-floating)]';\n\n\treturn { container, zIndexClass };\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Portal root component to render in app layout.\n * All overlay components will render their portals inside this container.\n *\n * Usage in layout.tsx:\n * ```tsx\n * import { PortalRoot } from '@constructive-io/ui/portal';\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * {children}\n * <PortalRoot />\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport function PortalRoot() {\n\treturn (\n\t\t<div\n\t\t\tid={PORTAL_ROOT_ID}\n\t\t\tdata-slot='portal-root'\n\t\t\tstyle={{\n\t\t\t\tposition: 'fixed',\n\t\t\t\tinset: 0,\n\t\t\t\tzIndex: 'var(--z-layer-portal-root)',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\t// Children (portal contents) will have pointer-events: auto\n\t\t\t}}\n\t\t/>\n\t);\n}\n\n/**\n * Hook to get the portal container element for rendering floating UI elements.\n * Returns the element with id=\"portal-root\" if it exists in the DOM.\n *\n * @deprecated Use useRootPortalContainer or useFloatingOverlayPortalProps instead\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n\tif (typeof document === 'undefined') return undefined;\n\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\treturn el instanceof HTMLElement ? el : undefined;\n}\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\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","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-9 px-[calc(--spacing(3)-1px)] sm:h-8',\n\t\t\t\ticon: 'size-9 sm:size-8',\n\t\t\t\t'icon-lg': 'size-10 sm:size-9',\n\t\t\t\t'icon-sm': 'size-8 sm:size-7',\n\t\t\t\t'icon-xl': 'size-11 sm:size-10 [&_svg:not([class*=\"size-\"])]:size-5 sm:[&_svg:not([class*=\"size-\"])]:size-4.5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t\tlg: 'h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9',\n\t\t\t\tsm: 'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7',\n\t\t\t\txl: 'h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*=\"size-\"])]:size-5 sm:[&_svg:not([class*=\"size-\"])]:size-4.5',\n\t\t\t\txs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*=\"size-\"])]:size-4 sm:[&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, variant }));\n\n\t\t// If asChild, render children with merged props (for wrapping Links, etc.)\n\t\tif (asChild && React.isValidElement(children)) {\n\t\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t\treturn React.cloneElement(children as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t...props,\n\t\t\t\tclassName: cn(buttonClasses, childProps.className as string | undefined),\n\t\t\t\t'data-slot': 'button',\n\t\t\t});\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n","'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { ModalPortalScope, useRootPortalContainer } from './portal';\nimport { mergePropsWithRef } from '../lib/slot';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot='alert-dialog' {...props} />;\n}\n\ntype AlertDialogTriggerProps = Omit<React.ComponentProps<typeof AlertDialogPrimitive.Trigger>, 'render' | 'nativeButton'> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/** Whether the child renders a native button. Defaults to true when asChild is used. */\n\tnativeButton?: boolean;\n};\n\nfunction AlertDialogTrigger({ asChild, nativeButton, children, ...props }: AlertDialogTriggerProps) {\n\tif (asChild && React.isValidElement(children)) {\n\t\treturn (\n\t\t\t<AlertDialogPrimitive.Trigger\n\t\t\t\tdata-slot='alert-dialog-trigger'\n\t\t\t\tnativeButton={nativeButton ?? true}\n\t\t\t\t{...props}\n\t\t\t\trender={(triggerProps) => {\n\t\t\t\t\tconst { nativeButton: _, ...rest } = triggerProps as Record<string, unknown>;\n\t\t\t\t\treturn React.cloneElement(\n\t\t\t\t\t\tchildren as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\t\tmergePropsWithRef(rest, children as React.ReactElement),\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<AlertDialogPrimitive.Trigger data-slot='alert-dialog-trigger' nativeButton={nativeButton} {...props}>\n\t\t\t{children}\n\t\t</AlertDialogPrimitive.Trigger>\n\t);\n}\n\nfunction AlertDialogPortal({ keepMounted = true, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\tconst container = useRootPortalContainer();\n\n\tconst style = {\n\t\t...(props.style ?? {}),\n\t\t['--z-layer-floating' as any]: 'var(--z-layer-floating-elevated)',\n\t} satisfies React.CSSProperties;\n\n\treturn (\n\t\t<AlertDialogPrimitive.Portal\n\t\t\tdata-slot='alert-dialog-portal'\n\t\t\tkeepMounted={keepMounted}\n\t\t\tcontainer={container}\n\t\t\t{...props}\n\t\t\tstyle={style}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Backdrop>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Backdrop\n\t\t\tdata-slot='alert-dialog-overlay'\n\t\t\tclassName={cn(\n\t\t\t\t'fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/80 transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Popup>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Popup\n\t\t\t\tdata-slot='alert-dialog-content'\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`bg-background fixed top-1/2 left-1/2 z-[var(--z-layer-modal-content)] grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)]\n\t\t\t\t\t-translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border p-6 shadow-lg\n\t\t\t\t\ttransition-[opacity,scale] duration-200 data-[ending-style]:scale-95 data-[starting-style]:scale-95\n\t\t\t\t\tdata-[ending-style]:opacity-0 data-[starting-style]:opacity-0 sm:max-w-100`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{/* ModalPortalScope creates a scoped portal container for floating elements inside */}\n\t\t\t\t<ModalPortalScope>\n\t\t\t\t\t{children}\n\t\t\t\t</ModalPortalScope>\n\t\t\t</AlertDialogPrimitive.Popup>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='alert-dialog-header'\n\t\t\tclassName={cn('flex flex-col gap-1 text-center sm:text-left', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='alert-dialog-footer'\n\t\t\tclassName={cn('flex flex-col-reverse gap-3 sm:flex-row sm:justify-end', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot='alert-dialog-title'\n\t\t\tclassName={cn('text-lg font-semibold', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot='alert-dialog-description'\n\t\t\tclassName={cn('text-muted-foreground text-sm', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * AlertDialogAction - A button that performs the primary action and closes the dialog.\n * Wraps AlertDialogPrimitive.Close with primary button styling.\n */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Close>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot='alert-dialog-action'\n\t\t\tclassName={cn(buttonVariants(), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * AlertDialogCancel - A button that cancels the action and closes the dialog.\n * Wraps AlertDialogPrimitive.Close with outline button styling.\n */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Close>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot='alert-dialog-cancel'\n\t\t\tclassName={cn(buttonVariants({ variant: 'outline' }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n"]}
1
+ {"version":3,"sources":["../../src/components/portal.tsx","../../src/lib/slot.tsx","../../src/lib/utils.ts","../../src/components/button.tsx","../../src/components/alert-dialog.tsx"],"names":["React","jsx","React3","AlertDialogPrimitive","React4"],"mappings":";;;;;;;AA4CO,IAAM,cAAA,GAAiB,aAAA;AAM9B,IAAM,gBAAsBA,MAAA,CAAA,aAAA,CAAkC;AAAA,EAC7D,KAAA,EAAO,MAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,sBAAA,EAAwB,MAAA;AAAA,EACxB,cAAA,EAAgB;AACjB,CAAC,CAAA;AAuBM,SAAS,gBAAA,CAAiB;AAAA,EAChC,QAAA;AAAA,EACA,sBAAA,GAAyB,QAAA;AAAA,EACzB,cAAA,GAAiB;AAClB,CAAA,EAIG;AACF,EAAA,MAAM,aAAA,GAAsBA,kBAAW,aAAa,CAAA;AAGpD,EAAA,MAAM,QAAQ,aAAA,CAAc,KAAA,KAAU,OAAA,GAAU,aAAA,CAAc,QAAQ,CAAA,GAAI,CAAA;AAE1E,EAAA,MAAM,KAAA,GAAcA,MAAA,CAAA,OAAA;AAAA,IACnB,OAAO;AAAA,MACN,KAAA,EAAO,OAAA;AAAA,MACP,KAAA;AAAA,MACA,sBAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,IACA,CAAC,KAAA,EAAO,sBAAA,EAAwB,cAAc;AAAA,GAC/C;AAEA,EAAA,uBAAO,GAAA,CAAC,aAAA,CAAc,QAAA,EAAd,EAAuB,OAAe,QAAA,EAAS,CAAA;AACx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E;AACjE,EAAA,uBACCF,GAAAA;AAAA,IAACE,aAAA,CAAqB,WAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,0BAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACL;AAEF;AAMA,SAAS,iBAAA,CAAkB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA4D;AAC5G,EAAA,uBACCF,GAAAA;AAAA,IAACE,aAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,cAAA,EAAe,EAAG,SAAS,CAAA;AAAA,MACxC,GAAG;AAAA;AAAA,GACL;AAEF;AAMA,SAAS,iBAAA,CAAkB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA4D;AAC5G,EAAA,uBACCF,GAAAA;AAAA,IAACE,aAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,MAC9D,GAAG;AAAA;AAAA,GACL;AAEF","file":"alert-dialog.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Overlay layer type:\n * - 'base': Root level (page content, base floating elements)\n * - 'modal': Inside a modal overlay (dialog, sheet, drawer)\n */\nexport type OverlayLayer = 'base' | 'modal';\n\n/**\n * Where floating overlays should portal:\n * - 'root': always portal into #portal-root\n * - 'nested': let Base UI nest portals into the nearest Base UI portal node\n */\nexport type FloatingPortalStrategy = 'root' | 'nested';\n\n/**\n * Z-index mode for floating overlays.\n * - 'default': --z-layer-floating\n * - 'elevated': --z-layer-floating-elevated\n */\nexport type FloatingZIndex = 'default' | 'elevated';\n\ninterface PortalContextValue {\n\t/** Current overlay layer */\n\tlayer: OverlayLayer;\n\t/** Modal nesting depth (0 for first modal, 1 for nested, etc.) */\n\tdepth: number;\n\t/** Strategy for where floating overlays should portal */\n\tfloatingPortalStrategy: FloatingPortalStrategy;\n\t/** Z-index mode for floating overlays */\n\tfloatingZIndex: FloatingZIndex;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nexport const PORTAL_ROOT_ID = 'portal-root';\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst PortalContext = React.createContext<PortalContextValue>({\n\tlayer: 'base',\n\tdepth: 0,\n\tfloatingPortalStrategy: 'root',\n\tfloatingZIndex: 'default',\n});\n\n// ============================================================================\n// Providers\n// ============================================================================\n\n/**\n * Provider for modal overlays (Dialog, Sheet, Drawer, etc.)\n *\n * Wraps modal content to:\n * 1. Create a scoped portal container for nested floating elements\n * 2. Track the overlay layer (so floating elements know to use elevated z-index)\n * 3. Track nesting depth for stacked modals\n *\n * Usage:\n * ```tsx\n * <DialogPopup>\n * <ModalPortalScope>\n * {children} // Popovers inside here will render in the scoped container\n * </ModalPortalScope>\n * </DialogPopup>\n * ```\n */\nexport function ModalPortalScope({\n\tchildren,\n\tfloatingPortalStrategy = 'nested',\n\tfloatingZIndex = 'default',\n}: {\n\tchildren: React.ReactNode;\n\tfloatingPortalStrategy?: FloatingPortalStrategy;\n\tfloatingZIndex?: FloatingZIndex;\n}) {\n\tconst parentContext = React.useContext(PortalContext);\n\n\t// Increment depth from parent if already in modal layer\n\tconst depth = parentContext.layer === 'modal' ? parentContext.depth + 1 : 0;\n\n\tconst value = React.useMemo<PortalContextValue>(\n\t\t() => ({\n\t\t\tlayer: 'modal',\n\t\t\tdepth,\n\t\t\tfloatingPortalStrategy,\n\t\t\tfloatingZIndex,\n\t\t}),\n\t\t[depth, floatingPortalStrategy, floatingZIndex],\n\t);\n\n\treturn <PortalContext.Provider value={value}>{children}</PortalContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Get the current portal context value.\n * Used internally by other hooks.\n */\nexport function usePortalContext(): PortalContextValue {\n\treturn React.useContext(PortalContext);\n}\n\nexport function useInModalOverlay(): boolean {\n\treturn React.useContext(PortalContext).layer === 'modal';\n}\n\n/**\n * Get the root portal container element.\n * Used by modal components (Dialog, Sheet, etc.) to render their portals.\n *\n * @returns The root portal container, or null during SSR/before mount\n */\nexport function useRootPortalContainer(): HTMLElement | null {\n\tconst [container, setContainer] = React.useState<HTMLElement | null>(null);\n\n\tReact.useLayoutEffect(() => {\n\t\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\t\tsetContainer(el);\n\t}, []);\n\n\treturn container;\n}\n\n/**\n * Centralized portal + z-index policy for floating overlays.\n *\n * - When `floatingPortalStrategy` is 'nested', Base UI will automatically portal\n * into the nearest Base UI portal node (so dialog \"inert\" behavior includes it).\n * - When it's 'root', we portal into #portal-root.\n */\nexport function useFloatingOverlayPortalProps(): {\n\tcontainer?: HTMLElement | null;\n\tzIndexClass: string;\n} {\n\tconst rootContainer = useRootPortalContainer();\n\tconst { floatingPortalStrategy, floatingZIndex } = React.useContext(PortalContext);\n\n\tconst container = floatingPortalStrategy === 'nested' ? undefined : (rootContainer ?? null);\n\tconst zIndexClass =\n\t\tfloatingZIndex === 'elevated'\n\t\t\t? 'z-[var(--z-layer-floating-elevated)]'\n\t\t\t: 'z-[var(--z-layer-floating)]';\n\n\treturn { container, zIndexClass };\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Portal root component to render in app layout.\n * All overlay components will render their portals inside this container.\n *\n * Usage in layout.tsx:\n * ```tsx\n * import { PortalRoot } from '@constructive-io/ui/portal';\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * {children}\n * <PortalRoot />\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport function PortalRoot() {\n\treturn (\n\t\t<div\n\t\t\tid={PORTAL_ROOT_ID}\n\t\t\tdata-slot=\"portal-root\"\n\t\t\tstyle={{\n\t\t\t\tposition: 'fixed',\n\t\t\t\tinset: 0,\n\t\t\t\tzIndex: 'var(--z-layer-portal-root)',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\t// Children (portal contents) will have pointer-events: auto\n\t\t\t}}\n\t\t/>\n\t);\n}\n\n/**\n * Hook to get the portal container element for rendering floating UI elements.\n * Returns the element with id=\"portal-root\" if it exists in the DOM.\n *\n * @deprecated Use useRootPortalContainer or useFloatingOverlayPortalProps instead\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n\tif (typeof document === 'undefined') return undefined;\n\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\treturn el instanceof HTMLElement ? el : undefined;\n}\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\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","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-9 px-[calc(--spacing(3)-1px)] sm:h-8',\n\t\t\t\ticon: 'size-9 sm:size-8',\n\t\t\t\t'icon-lg': 'size-10 sm:size-9',\n\t\t\t\t'icon-sm': 'size-8 sm:size-7',\n\t\t\t\t'icon-xl': 'size-11 sm:size-10 [&_svg:not([class*=\"size-\"])]:size-5 sm:[&_svg:not([class*=\"size-\"])]:size-4.5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t\tlg: 'h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9',\n\t\t\t\tsm: 'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7',\n\t\t\t\txl: 'h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*=\"size-\"])]:size-5 sm:[&_svg:not([class*=\"size-\"])]:size-4.5',\n\t\t\t\txs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*=\"size-\"])]:size-4 sm:[&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, variant }));\n\n\t\t// If asChild, render children with merged props (for wrapping Links, etc.)\n\t\tif (asChild && React.isValidElement(children)) {\n\t\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t\treturn React.cloneElement(children as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t...props,\n\t\t\t\tclassName: cn(buttonClasses, childProps.className as string | undefined),\n\t\t\t\t'data-slot': 'button',\n\t\t\t});\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n","'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { ModalPortalScope, useRootPortalContainer } from './portal';\nimport { mergePropsWithRef } from '../lib/slot';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\ntype AlertDialogTriggerProps = Omit<React.ComponentProps<typeof AlertDialogPrimitive.Trigger>, 'render' | 'nativeButton'> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/** Whether the child renders a native button. Defaults to true when asChild is used. */\n\tnativeButton?: boolean;\n};\n\nfunction AlertDialogTrigger({ asChild, nativeButton, children, ...props }: AlertDialogTriggerProps) {\n\tif (asChild && React.isValidElement(children)) {\n\t\treturn (\n\t\t\t<AlertDialogPrimitive.Trigger\n\t\t\t\tdata-slot=\"alert-dialog-trigger\"\n\t\t\t\tnativeButton={nativeButton ?? true}\n\t\t\t\t{...props}\n\t\t\t\trender={(triggerProps) => {\n\t\t\t\t\tconst { nativeButton: _, ...rest } = triggerProps as Record<string, unknown>;\n\t\t\t\t\treturn React.cloneElement(\n\t\t\t\t\t\tchildren as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\t\tmergePropsWithRef(rest, children as React.ReactElement),\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" nativeButton={nativeButton} {...props}>\n\t\t\t{children}\n\t\t</AlertDialogPrimitive.Trigger>\n\t);\n}\n\nfunction AlertDialogPortal({ keepMounted = true, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\tconst container = useRootPortalContainer();\n\n\tconst style = {\n\t\t...(props.style ?? {}),\n\t\t['--z-layer-floating' as any]: 'var(--z-layer-floating-elevated)',\n\t} satisfies React.CSSProperties;\n\n\treturn (\n\t\t<AlertDialogPrimitive.Portal\n\t\t\tdata-slot=\"alert-dialog-portal\"\n\t\t\tkeepMounted={keepMounted}\n\t\t\tcontainer={container}\n\t\t\t{...props}\n\t\t\tstyle={style}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Backdrop>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Backdrop\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t'fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/80 transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Popup>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Popup\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`bg-background fixed top-1/2 left-1/2 z-[var(--z-layer-modal-content)] grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)]\n\t\t\t\t\t-translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border p-6 shadow-lg\n\t\t\t\t\ttransition-[opacity,scale] duration-200 data-[ending-style]:scale-95 data-[starting-style]:scale-95\n\t\t\t\t\tdata-[ending-style]:opacity-0 data-[starting-style]:opacity-0 sm:max-w-100`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{/* ModalPortalScope creates a scoped portal container for floating elements inside */}\n\t\t\t\t<ModalPortalScope>\n\t\t\t\t\t{children}\n\t\t\t\t</ModalPortalScope>\n\t\t\t</AlertDialogPrimitive.Popup>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn('flex flex-col gap-1 text-center sm:text-left', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn('flex flex-col-reverse gap-3 sm:flex-row sm:justify-end', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn('text-lg font-semibold', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn('text-muted-foreground text-sm', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * AlertDialogAction - A button that performs the primary action and closes the dialog.\n * Wraps AlertDialogPrimitive.Close with primary button styling.\n */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Close>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot=\"alert-dialog-action\"\n\t\t\tclassName={cn(buttonVariants(), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * AlertDialogCancel - A button that cancels the action and closes the dialog.\n * Wraps AlertDialogPrimitive.Close with outline button styling.\n */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Close>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot=\"alert-dialog-cancel\"\n\t\t\tclassName={cn(buttonVariants({ variant: 'outline' }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n"]}
@@ -41,7 +41,7 @@ function Input({ className, size = "default", unstyled = false, ...props }) {
41
41
  className: cn(
42
42
  !unstyled && [
43
43
  // Base layout
44
- "relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs transition-shadow",
44
+ "relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base transition-shadow",
45
45
  // Inner shadow highlight
46
46
  "before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]",
47
47
  "not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
@@ -313,8 +313,16 @@ function AutocompleteRow({
313
313
  }
314
314
  );
315
315
  }
316
- function AutocompleteValue({ ...props }) {
317
- return /* @__PURE__ */ jsx(Autocomplete$1.Value, { "data-slot": "autocomplete-value", ...props });
316
+ function AutocompleteValue({
317
+ ...props
318
+ }) {
319
+ return /* @__PURE__ */ jsx(
320
+ Autocomplete$1.Value,
321
+ {
322
+ "data-slot": "autocomplete-value",
323
+ ...props
324
+ }
325
+ );
318
326
  }
319
327
  function AutocompleteList({
320
328
  className,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/portal.tsx","../../src/lib/utils.ts","../../src/components/input.tsx","../../src/components/scroll-area.tsx","../../src/components/autocomplete.tsx"],"names":["jsx","InputPrimitive","React2","ScrollAreaPrimitive","AutocompletePrimitive","jsxs"],"mappings":";;;;;;;;;AA4CO,IAAM,cAAA,GAAiB,aAAA;AAM9B,IAAM,gBAAsB,KAAA,CAAA,aAAA,CAAkC;AAAA,EAC7D,KAAA,EAAO,MAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,sBAAA,EAAw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GACN;AAEJ;AAEA,SAAS,mBAAA,CAAoB;AAAA,EAC3B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAwC;AACtC,EAAA,uBACEJ,GAAAA;AAAA,IAACI,cAAA,CAAsB,OAAA;AAAA,IAAtB;AAAA,MACC,SAAA;AAAA,MACA,WAAA,EAAU,sBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ","file":"autocomplete.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Overlay layer type:\n * - 'base': Root level (page content, base floating elements)\n * - 'modal': Inside a modal overlay (dialog, sheet, drawer)\n */\nexport type OverlayLayer = 'base' | 'modal';\n\n/**\n * Where floating overlays should portal:\n * - 'root': always portal into #portal-root\n * - 'nested': let Base UI nest portals into the nearest Base UI portal node\n */\nexport type FloatingPortalStrategy = 'root' | 'nested';\n\n/**\n * Z-index mode for floating overlays.\n * - 'default': --z-layer-floating\n * - 'elevated': --z-layer-floating-elevated\n */\nexport type FloatingZIndex = 'default' | 'elevated';\n\ninterface PortalContextValue {\n\t/** Current overlay layer */\n\tlayer: OverlayLayer;\n\t/** Modal nesting depth (0 for first modal, 1 for nested, etc.) */\n\tdepth: number;\n\t/** Strategy for where floating overlays should portal */\n\tfloatingPortalStrategy: FloatingPortalStrategy;\n\t/** Z-index mode for floating overlays */\n\tfloatingZIndex: FloatingZIndex;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nexport const PORTAL_ROOT_ID = 'portal-root';\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst PortalContext = React.createContext<PortalContextValue>({\n\tlayer: 'base',\n\tdepth: 0,\n\tfloatingPortalStrategy: 'root',\n\tfloatingZIndex: 'default',\n});\n\n// ============================================================================\n// Providers\n// ============================================================================\n\n/**\n * Provider for modal overlays (Dialog, Sheet, Drawer, etc.)\n *\n * Wraps modal content to:\n * 1. Create a scoped portal container for nested floating elements\n * 2. Track the overlay layer (so floating elements know to use elevated z-index)\n * 3. Track nesting depth for stacked modals\n *\n * Usage:\n * ```tsx\n * <DialogPopup>\n * <ModalPortalScope>\n * {children} // Popovers inside here will render in the scoped container\n * </ModalPortalScope>\n * </DialogPopup>\n * ```\n */\nexport function ModalPortalScope({\n\tchildren,\n\tfloatingPortalStrategy = 'nested',\n\tfloatingZIndex = 'default',\n}: {\n\tchildren: React.ReactNode;\n\tfloatingPortalStrategy?: FloatingPortalStrategy;\n\tfloatingZIndex?: FloatingZIndex;\n}) {\n\tconst parentContext = React.useContext(PortalContext);\n\n\t// Increment depth from parent if already in modal layer\n\tconst depth = parentContext.layer === 'modal' ? parentContext.depth + 1 : 0;\n\n\tconst value = React.useMemo<PortalContextValue>(\n\t\t() => ({\n\t\t\tlayer: 'modal',\n\t\t\tdepth,\n\t\t\tfloatingPortalStrategy,\n\t\t\tfloatingZIndex,\n\t\t}),\n\t\t[depth, floatingPortalStrategy, floatingZIndex],\n\t);\n\n\treturn <PortalContext.Provider value={value}>{children}</PortalContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Get the current portal context value.\n * Used internally by other hooks.\n */\nexport function usePortalContext(): PortalContextValue {\n\treturn React.useContext(PortalContext);\n}\n\nexport function useInModalOverlay(): boolean {\n\treturn React.useContext(PortalContext).layer === 'modal';\n}\n\n/**\n * Get the root portal container element.\n * Used by modal components (Dialog, Sheet, etc.) to render their portals.\n *\n * @returns The root portal container, or null during SSR/before mount\n */\nexport function useRootPortalContainer(): HTMLElement | null {\n\tconst [container, setContainer] = React.useState<HTMLElement | null>(null);\n\n\tReact.useLayoutEffect(() => {\n\t\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\t\tsetContainer(el);\n\t}, []);\n\n\treturn container;\n}\n\n/**\n * Centralized portal + z-index policy for floating overlays.\n *\n * - When `floatingPortalStrategy` is 'nested', Base UI will automatically portal\n * into the nearest Base UI portal node (so dialog \"inert\" behavior includes it).\n * - When it's 'root', we portal into #portal-root.\n */\nexport function useFloatingOverlayPortalProps(): {\n\tcontainer?: HTMLElement | null;\n\tzIndexClass: string;\n} {\n\tconst rootContainer = useRootPortalContainer();\n\tconst { floatingPortalStrategy, floatingZIndex } = React.useContext(PortalContext);\n\n\tconst container = floatingPortalStrategy === 'nested' ? undefined : (rootContainer ?? null);\n\tconst zIndexClass =\n\t\tfloatingZIndex === 'elevated'\n\t\t\t? 'z-[var(--z-layer-floating-elevated)]'\n\t\t\t: 'z-[var(--z-layer-floating)]';\n\n\treturn { container, zIndexClass };\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Portal root component to render in app layout.\n * All overlay components will render their portals inside this container.\n *\n * Usage in layout.tsx:\n * ```tsx\n * import { PortalRoot } from '@constructive-io/ui/portal';\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * {children}\n * <PortalRoot />\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport function PortalRoot() {\n\treturn (\n\t\t<div\n\t\t\tid={PORTAL_ROOT_ID}\n\t\t\tdata-slot='portal-root'\n\t\t\tstyle={{\n\t\t\t\tposition: 'fixed',\n\t\t\t\tinset: 0,\n\t\t\t\tzIndex: 'var(--z-layer-portal-root)',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\t// Children (portal contents) will have pointer-events: auto\n\t\t\t}}\n\t\t/>\n\t);\n}\n\n/**\n * Hook to get the portal container element for rendering floating UI elements.\n * Returns the element with id=\"portal-root\" if it exists in the DOM.\n *\n * @deprecated Use useRootPortalContainer or useFloatingOverlayPortalProps instead\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n\tif (typeof document === 'undefined') return undefined;\n\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\treturn el instanceof HTMLElement ? el : undefined;\n}\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","'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs transition-shadow',\n\t\t\t\t\t\t// Inner shadow highlight\n\t\t\t\t\t\t'before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]',\n\t\t\t\t\t\t'not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]',\n\t\t\t\t\t\t// Focus state - use primary brand color\n\t\t\t\t\t\t'has-focus-visible:border-primary/60 has-focus-visible:ring-[3px] has-focus-visible:ring-primary/35',\n\t\t\t\t\t\t// Invalid state\n\t\t\t\t\t\t'has-aria-invalid:border-destructive/36',\n\t\t\t\t\t\t'has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16',\n\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t'has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none',\n\t\t\t\t\t\t// Dark mode\n\t\t\t\t\t\t'sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border',\n\t\t\t\t\t\t'dark:has-aria-invalid:ring-destructive/24',\n\t\t\t\t\t\t'dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]',\n\t\t\t\t\t],\n\t\t\t\t\tclassName,\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"input-control\"\n\t\t>\n\t\t\t<InputPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none',\n\t\t\t\t\tisFloating\n\t\t\t\t\t\t? 'h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10'\n\t\t\t\t\t\t: 'h-8.5 leading-8.5 placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5',\n\t\t\t\t\tsize === 'sm' &&\n\t\t\t\t\t\t(isFloating\n\t\t\t\t\t\t\t? 'h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9'\n\t\t\t\t\t\t\t: 'h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5'),\n\t\t\t\t\tsize === 'lg' &&\n\t\t\t\t\t\t(isFloating ? 'h-12 pt-5 pb-1.5 sm:h-11' : 'h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5'),\n\t\t\t\t\tprops.type === 'search' &&\n\t\t\t\t\t\t'[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none',\n\t\t\t\t\tprops.type === 'file' &&\n\t\t\t\t\t\t'text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm',\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"input\"\n\t\t\t\tsize={typeof size === 'number' ? size : undefined}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport { Input };\nexport type { InputProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\n\nimport { cn } from \"../lib/utils\";\n\ntype ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {\n scrollFade?: boolean;\n scrollbarGutter?: boolean;\n};\n\nconst ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(\n (\n { className, children, scrollFade = false, scrollbarGutter = false, ...props },\n ref\n ) => {\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"size-full min-h-0\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n className={cn(\n \"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n scrollFade &&\n \"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]\",\n scrollbarGutter &&\n \"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5\",\n )}\n data-slot=\"scroll-area-viewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation=\"vertical\" />\n <ScrollBar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner data-slot=\"scroll-area-corner\" />\n </ScrollAreaPrimitive.Root>\n );\n }\n);\nScrollArea.displayName = \"ScrollArea\";\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n className={cn(\n \"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100\",\n className,\n )}\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n className=\"relative flex-1 rounded-full bg-foreground/20\"\n data-slot=\"scroll-area-thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","\"use client\";\n\nimport { Autocomplete as AutocompletePrimitive } from \"@base-ui/react/autocomplete\";\nimport { ChevronsUpDownIcon, XIcon } from \"lucide-react\";\n\nimport { useFloatingOverlayPortalProps } from \"./portal\";\nimport { cn } from \"../lib/utils\";\nimport { Input } from \"./input\";\nimport { ScrollArea } from \"./scroll-area\";\n\nconst Autocomplete = AutocompletePrimitive.Root;\n\nfunction AutocompleteInput({\n className,\n showTrigger = false,\n showClear = false,\n startAddon,\n size = \"default\",\n ...props\n}: Omit<AutocompletePrimitive.Input.Props, \"size\"> & {\n showTrigger?: boolean;\n showClear?: boolean;\n startAddon?: React.ReactNode;\n size?: \"sm\" | \"default\" | \"lg\";\n ref?: React.Ref<HTMLInputElement>;\n}) {\n const sizeValue = size;\n\n return (\n <div className=\"relative not-has-[>*.w-full]:w-fit w-full\">\n {startAddon && (\n <div\n aria-hidden=\"true\"\n className=\"[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4\"\n data-slot=\"autocomplete-start-addon\"\n >\n {startAddon}\n </div>\n )}\n <AutocompletePrimitive.Input\n className={cn(\n startAddon &&\n \"data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=autocomplete-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8)-1px)]\",\n sizeValue === \"sm\"\n ? \"has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-6.5\"\n : \"has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-7\",\n className,\n )}\n data-slot=\"autocomplete-input\"\n render={<Input size={sizeValue} />}\n {...props}\n />\n {showTrigger && (\n <AutocompleteTrigger\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n sizeValue === \"sm\" ? \"end-0\" : \"end-0.5\",\n )}\n >\n <ChevronsUpDownIcon />\n </AutocompleteTrigger>\n )}\n {showClear && (\n <AutocompleteClear\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n sizeValue === \"sm\" ? \"end-0\" : \"end-0.5\",\n )}\n >\n <XIcon />\n </AutocompleteClear>\n )}\n </div>\n );\n}\n\nfunction AutocompletePopup({\n className,\n children,\n sideOffset = 4,\n ...props\n}: AutocompletePrimitive.Popup.Props & {\n sideOffset?: number;\n}) {\n const { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n return (\n <AutocompletePrimitive.Portal container={container}>\n <AutocompletePrimitive.Positioner\n className={cn(\"select-none\", zIndexClass)}\n data-slot=\"autocomplete-positioner\"\n sideOffset={sideOffset}\n >\n <span\n className={cn(\n \"relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover bg-clip-padding transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg has-data-starting-style:scale-98 has-data-starting-style:opacity-0 dark:not-in-data-[slot=group]:bg-clip-border\",\n className,\n )}\n >\n <AutocompletePrimitive.Popup\n className=\"flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col\"\n data-slot=\"autocomplete-popup\"\n {...props}\n >\n {children}\n </AutocompletePrimitive.Popup>\n </span>\n </AutocompletePrimitive.Positioner>\n </AutocompletePrimitive.Portal>\n );\n}\n\nfunction AutocompleteItem({\n className,\n children,\n ...props\n}: AutocompletePrimitive.Item.Props) {\n return (\n <AutocompletePrimitive.Item\n className={cn(\n \"flex min-h-8 cursor-default select-none items-center rounded-sm px-2 py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm\",\n className,\n )}\n data-slot=\"autocomplete-item\"\n {...props}\n >\n {children}\n </AutocompletePrimitive.Item>\n );\n}\n\nfunction AutocompleteSeparator({\n className,\n ...props\n}: AutocompletePrimitive.Separator.Props) {\n return (\n <AutocompletePrimitive.Separator\n className={cn(\"mx-2 my-1 h-px bg-border last:hidden\", className)}\n data-slot=\"autocomplete-separator\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteGroup({\n className,\n ...props\n}: AutocompletePrimitive.Group.Props) {\n return (\n <AutocompletePrimitive.Group\n className={cn(\"[[role=group]+&]:mt-1.5\", className)}\n data-slot=\"autocomplete-group\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteGroupLabel({\n className,\n ...props\n}: AutocompletePrimitive.GroupLabel.Props) {\n return (\n <AutocompletePrimitive.GroupLabel\n className={cn(\n \"px-2 py-1.5 font-medium text-muted-foreground text-xs\",\n className,\n )}\n data-slot=\"autocomplete-group-label\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteEmpty({\n className,\n ...props\n}: AutocompletePrimitive.Empty.Props) {\n return (\n <AutocompletePrimitive.Empty\n className={cn(\n \"not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm\",\n className,\n )}\n data-slot=\"autocomplete-empty\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteRow({\n className,\n ...props\n}: AutocompletePrimitive.Row.Props) {\n return (\n <AutocompletePrimitive.Row\n className={className}\n data-slot=\"autocomplete-row\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteValue({ ...props }: AutocompletePrimitive.Value.Props) {\n return (\n <AutocompletePrimitive.Value data-slot=\"autocomplete-value\" {...props} />\n );\n}\n\nfunction AutocompleteList({\n className,\n ...props\n}: AutocompletePrimitive.List.Props) {\n return (\n <ScrollArea scrollbarGutter scrollFade>\n <AutocompletePrimitive.List\n className={cn(\n \"not-empty:scroll-py-1 not-empty:p-1 in-data-has-overflow-y:pe-3\",\n className,\n )}\n data-slot=\"autocomplete-list\"\n {...props}\n />\n </ScrollArea>\n );\n}\n\nfunction AutocompleteClear({\n className,\n ...props\n}: AutocompletePrimitive.Clear.Props) {\n return (\n <AutocompletePrimitive.Clear\n className={cn(\n \"-translate-y-1/2 absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"autocomplete-clear\"\n {...props}\n >\n <XIcon />\n </AutocompletePrimitive.Clear>\n );\n}\n\nfunction AutocompleteStatus({\n className,\n ...props\n}: AutocompletePrimitive.Status.Props) {\n return (\n <AutocompletePrimitive.Status\n className={cn(\n \"px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0\",\n className,\n )}\n data-slot=\"autocomplete-status\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteCollection({\n ...props\n}: AutocompletePrimitive.Collection.Props) {\n return (\n <AutocompletePrimitive.Collection\n data-slot=\"autocomplete-collection\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteTrigger({\n className,\n ...props\n}: AutocompletePrimitive.Trigger.Props) {\n return (\n <AutocompletePrimitive.Trigger\n className={className}\n data-slot=\"autocomplete-trigger\"\n {...props}\n />\n );\n}\n\nexport {\n Autocomplete,\n AutocompleteInput,\n AutocompleteTrigger,\n AutocompletePopup,\n AutocompleteItem,\n AutocompleteSeparator,\n AutocompleteGroup,\n AutocompleteGroupLabel,\n AutocompleteEmpty,\n AutocompleteValue,\n AutocompleteList,\n AutocompleteClear,\n AutocompleteStatus,\n AutocompleteRow,\n AutocompleteCollection,\n};\n"]}
1
+ {"version":3,"sources":["../../src/components/portal.tsx","../../src/lib/utils.ts","../../src/components/input.tsx","../../src/components/scroll-area.tsx","../../src/components/autocomplete.tsx"],"names":["jsx","InputPrimitive","React2","ScrollAreaPrimitive","AutocompletePrimitive","jsxs"],"mappings":";;;;;;;;;AA4CO,IAAM,cAAA,GAAiB,aAAA;AAM9B,IAAM,gBAAsB,KAAA,CAAA,aAAA,CAAkC;AAAA,EAC7D,KAAA,EAAO,MAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,sBAAA,EAAwB,MAAA;AAAA,EACxB,cAAA,EAAgB;AACjB,CAAC,CAAA;AAwEM,SAAS,sBAAA,GAA6C;AAC5D,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAU,eAA6B,IAAI,CAAA;AAEzE,EAAM,sBAAgB,MAAM;AAC3B,IAAA,MAAM,EAAA,GAAK,QAAA,CAAS,cAAA,CAAe,cAAc,CAAA;AACjD,IAAA,YAAA,CAAa,EAAE,CAAA;AAAA,EAChB,CAAA,EAAG,EAAE,CAAA;AAEL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\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Overlay layer type:\n * - 'base': Root level (page content, base floating elements)\n * - 'modal': Inside a modal overlay (dialog, sheet, drawer)\n */\nexport type OverlayLayer = 'base' | 'modal';\n\n/**\n * Where floating overlays should portal:\n * - 'root': always portal into #portal-root\n * - 'nested': let Base UI nest portals into the nearest Base UI portal node\n */\nexport type FloatingPortalStrategy = 'root' | 'nested';\n\n/**\n * Z-index mode for floating overlays.\n * - 'default': --z-layer-floating\n * - 'elevated': --z-layer-floating-elevated\n */\nexport type FloatingZIndex = 'default' | 'elevated';\n\ninterface PortalContextValue {\n\t/** Current overlay layer */\n\tlayer: OverlayLayer;\n\t/** Modal nesting depth (0 for first modal, 1 for nested, etc.) */\n\tdepth: number;\n\t/** Strategy for where floating overlays should portal */\n\tfloatingPortalStrategy: FloatingPortalStrategy;\n\t/** Z-index mode for floating overlays */\n\tfloatingZIndex: FloatingZIndex;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nexport const PORTAL_ROOT_ID = 'portal-root';\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst PortalContext = React.createContext<PortalContextValue>({\n\tlayer: 'base',\n\tdepth: 0,\n\tfloatingPortalStrategy: 'root',\n\tfloatingZIndex: 'default',\n});\n\n// ============================================================================\n// Providers\n// ============================================================================\n\n/**\n * Provider for modal overlays (Dialog, Sheet, Drawer, etc.)\n *\n * Wraps modal content to:\n * 1. Create a scoped portal container for nested floating elements\n * 2. Track the overlay layer (so floating elements know to use elevated z-index)\n * 3. Track nesting depth for stacked modals\n *\n * Usage:\n * ```tsx\n * <DialogPopup>\n * <ModalPortalScope>\n * {children} // Popovers inside here will render in the scoped container\n * </ModalPortalScope>\n * </DialogPopup>\n * ```\n */\nexport function ModalPortalScope({\n\tchildren,\n\tfloatingPortalStrategy = 'nested',\n\tfloatingZIndex = 'default',\n}: {\n\tchildren: React.ReactNode;\n\tfloatingPortalStrategy?: FloatingPortalStrategy;\n\tfloatingZIndex?: FloatingZIndex;\n}) {\n\tconst parentContext = React.useContext(PortalContext);\n\n\t// Increment depth from parent if already in modal layer\n\tconst depth = parentContext.layer === 'modal' ? parentContext.depth + 1 : 0;\n\n\tconst value = React.useMemo<PortalContextValue>(\n\t\t() => ({\n\t\t\tlayer: 'modal',\n\t\t\tdepth,\n\t\t\tfloatingPortalStrategy,\n\t\t\tfloatingZIndex,\n\t\t}),\n\t\t[depth, floatingPortalStrategy, floatingZIndex],\n\t);\n\n\treturn <PortalContext.Provider value={value}>{children}</PortalContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Get the current portal context value.\n * Used internally by other hooks.\n */\nexport function usePortalContext(): PortalContextValue {\n\treturn React.useContext(PortalContext);\n}\n\nexport function useInModalOverlay(): boolean {\n\treturn React.useContext(PortalContext).layer === 'modal';\n}\n\n/**\n * Get the root portal container element.\n * Used by modal components (Dialog, Sheet, etc.) to render their portals.\n *\n * @returns The root portal container, or null during SSR/before mount\n */\nexport function useRootPortalContainer(): HTMLElement | null {\n\tconst [container, setContainer] = React.useState<HTMLElement | null>(null);\n\n\tReact.useLayoutEffect(() => {\n\t\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\t\tsetContainer(el);\n\t}, []);\n\n\treturn container;\n}\n\n/**\n * Centralized portal + z-index policy for floating overlays.\n *\n * - When `floatingPortalStrategy` is 'nested', Base UI will automatically portal\n * into the nearest Base UI portal node (so dialog \"inert\" behavior includes it).\n * - When it's 'root', we portal into #portal-root.\n */\nexport function useFloatingOverlayPortalProps(): {\n\tcontainer?: HTMLElement | null;\n\tzIndexClass: string;\n} {\n\tconst rootContainer = useRootPortalContainer();\n\tconst { floatingPortalStrategy, floatingZIndex } = React.useContext(PortalContext);\n\n\tconst container = floatingPortalStrategy === 'nested' ? undefined : (rootContainer ?? null);\n\tconst zIndexClass =\n\t\tfloatingZIndex === 'elevated'\n\t\t\t? 'z-[var(--z-layer-floating-elevated)]'\n\t\t\t: 'z-[var(--z-layer-floating)]';\n\n\treturn { container, zIndexClass };\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Portal root component to render in app layout.\n * All overlay components will render their portals inside this container.\n *\n * Usage in layout.tsx:\n * ```tsx\n * import { PortalRoot } from '@constructive-io/ui/portal';\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * {children}\n * <PortalRoot />\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport function PortalRoot() {\n\treturn (\n\t\t<div\n\t\t\tid={PORTAL_ROOT_ID}\n\t\t\tdata-slot=\"portal-root\"\n\t\t\tstyle={{\n\t\t\t\tposition: 'fixed',\n\t\t\t\tinset: 0,\n\t\t\t\tzIndex: 'var(--z-layer-portal-root)',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\t// Children (portal contents) will have pointer-events: auto\n\t\t\t}}\n\t\t/>\n\t);\n}\n\n/**\n * Hook to get the portal container element for rendering floating UI elements.\n * Returns the element with id=\"portal-root\" if it exists in the DOM.\n *\n * @deprecated Use useRootPortalContainer or useFloatingOverlayPortalProps instead\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n\tif (typeof document === 'undefined') return undefined;\n\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\treturn el instanceof HTMLElement ? el : undefined;\n}\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","'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base transition-shadow',\n\t\t\t\t\t\t// Inner shadow highlight\n\t\t\t\t\t\t'before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]',\n\t\t\t\t\t\t'not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]',\n\t\t\t\t\t\t// Focus state - use primary brand color\n\t\t\t\t\t\t'has-focus-visible:border-primary/60 has-focus-visible:ring-[3px] has-focus-visible:ring-primary/35',\n\t\t\t\t\t\t// Invalid state\n\t\t\t\t\t\t'has-aria-invalid:border-destructive/36',\n\t\t\t\t\t\t'has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16',\n\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t'has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none',\n\t\t\t\t\t\t// Dark mode\n\t\t\t\t\t\t'sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border',\n\t\t\t\t\t\t'dark:has-aria-invalid:ring-destructive/24',\n\t\t\t\t\t\t'dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]',\n\t\t\t\t\t],\n\t\t\t\t\tclassName,\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"input-control\"\n\t\t>\n\t\t\t<InputPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none',\n\t\t\t\t\tisFloating\n\t\t\t\t\t\t? 'h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10'\n\t\t\t\t\t\t: 'h-8.5 leading-8.5 placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5',\n\t\t\t\t\tsize === 'sm' &&\n\t\t\t\t\t\t(isFloating\n\t\t\t\t\t\t\t? 'h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9'\n\t\t\t\t\t\t\t: 'h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5'),\n\t\t\t\t\tsize === 'lg' &&\n\t\t\t\t\t\t(isFloating ? 'h-12 pt-5 pb-1.5 sm:h-11' : 'h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5'),\n\t\t\t\t\tprops.type === 'search' &&\n\t\t\t\t\t\t'[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none',\n\t\t\t\t\tprops.type === 'file' &&\n\t\t\t\t\t\t'text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm',\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"input\"\n\t\t\t\tsize={typeof size === 'number' ? size : undefined}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport { Input };\nexport type { InputProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\n\nimport { cn } from \"../lib/utils\";\n\ntype ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {\n scrollFade?: boolean;\n scrollbarGutter?: boolean;\n};\n\nconst ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(\n (\n { className, children, scrollFade = false, scrollbarGutter = false, ...props },\n ref\n ) => {\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"size-full min-h-0\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n className={cn(\n \"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n scrollFade &&\n \"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]\",\n scrollbarGutter &&\n \"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5\",\n )}\n data-slot=\"scroll-area-viewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation=\"vertical\" />\n <ScrollBar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner data-slot=\"scroll-area-corner\" />\n </ScrollAreaPrimitive.Root>\n );\n }\n);\nScrollArea.displayName = \"ScrollArea\";\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n className={cn(\n \"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100\",\n className,\n )}\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n className=\"relative flex-1 rounded-full bg-foreground/20\"\n data-slot=\"scroll-area-thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","\"use client\";\n\nimport { Autocomplete as AutocompletePrimitive } from \"@base-ui/react/autocomplete\";\nimport { ChevronsUpDownIcon, XIcon } from \"lucide-react\";\n\nimport { useFloatingOverlayPortalProps } from \"./portal\";\nimport { cn } from \"../lib/utils\";\nimport { Input } from \"./input\";\nimport { ScrollArea } from \"./scroll-area\";\n\nconst Autocomplete = AutocompletePrimitive.Root;\n\nfunction AutocompleteInput({\n className,\n showTrigger = false,\n showClear = false,\n startAddon,\n size = \"default\",\n ...props\n}: Omit<AutocompletePrimitive.Input.Props, \"size\"> & {\n showTrigger?: boolean;\n showClear?: boolean;\n startAddon?: React.ReactNode;\n size?: \"sm\" | \"default\" | \"lg\";\n ref?: React.Ref<HTMLInputElement>;\n }) {\n const sizeValue = size;\n\n return (\n <div className=\"relative not-has-[>*.w-full]:w-fit w-full\">\n {startAddon && (\n <div\n aria-hidden=\"true\"\n className=\"[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4\"\n data-slot=\"autocomplete-start-addon\"\n >\n {startAddon}\n </div>\n )}\n <AutocompletePrimitive.Input\n className={cn(\n startAddon &&\n \"data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=autocomplete-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8)-1px)]\",\n sizeValue === \"sm\"\n ? \"has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-6.5\"\n : \"has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-7\",\n className,\n )}\n data-slot=\"autocomplete-input\"\n render={<Input size={sizeValue} />}\n {...props}\n />\n {showTrigger && (\n <AutocompleteTrigger\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n sizeValue === \"sm\" ? \"end-0\" : \"end-0.5\",\n )}\n >\n <ChevronsUpDownIcon />\n </AutocompleteTrigger>\n )}\n {showClear && (\n <AutocompleteClear\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n sizeValue === \"sm\" ? \"end-0\" : \"end-0.5\",\n )}\n >\n <XIcon />\n </AutocompleteClear>\n )}\n </div>\n );\n}\n\nfunction AutocompletePopup({\n className,\n children,\n sideOffset = 4,\n ...props\n}: AutocompletePrimitive.Popup.Props & {\n sideOffset?: number;\n }) {\n const { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n return (\n <AutocompletePrimitive.Portal container={container}>\n <AutocompletePrimitive.Positioner\n className={cn(\"select-none\", zIndexClass)}\n data-slot=\"autocomplete-positioner\"\n sideOffset={sideOffset}\n >\n <span\n className={cn(\n \"relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover bg-clip-padding transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg has-data-starting-style:scale-98 has-data-starting-style:opacity-0 dark:not-in-data-[slot=group]:bg-clip-border\",\n className,\n )}\n >\n <AutocompletePrimitive.Popup\n className=\"flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col\"\n data-slot=\"autocomplete-popup\"\n {...props}\n >\n {children}\n </AutocompletePrimitive.Popup>\n </span>\n </AutocompletePrimitive.Positioner>\n </AutocompletePrimitive.Portal>\n );\n}\n\nfunction AutocompleteItem({\n className,\n children,\n ...props\n}: AutocompletePrimitive.Item.Props) {\n return (\n <AutocompletePrimitive.Item\n className={cn(\n \"flex min-h-8 cursor-default select-none items-center rounded-sm px-2 py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm\",\n className,\n )}\n data-slot=\"autocomplete-item\"\n {...props}\n >\n {children}\n </AutocompletePrimitive.Item>\n );\n}\n\nfunction AutocompleteSeparator({\n className,\n ...props\n}: AutocompletePrimitive.Separator.Props) {\n return (\n <AutocompletePrimitive.Separator\n className={cn(\"mx-2 my-1 h-px bg-border last:hidden\", className)}\n data-slot=\"autocomplete-separator\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteGroup({\n className,\n ...props\n}: AutocompletePrimitive.Group.Props) {\n return (\n <AutocompletePrimitive.Group\n className={cn(\"[[role=group]+&]:mt-1.5\", className)}\n data-slot=\"autocomplete-group\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteGroupLabel({\n className,\n ...props\n}: AutocompletePrimitive.GroupLabel.Props) {\n return (\n <AutocompletePrimitive.GroupLabel\n className={cn(\n \"px-2 py-1.5 font-medium text-muted-foreground text-xs\",\n className,\n )}\n data-slot=\"autocomplete-group-label\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteEmpty({\n className,\n ...props\n}: AutocompletePrimitive.Empty.Props) {\n return (\n <AutocompletePrimitive.Empty\n className={cn(\n \"not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm\",\n className,\n )}\n data-slot=\"autocomplete-empty\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteRow({\n className,\n ...props\n}: AutocompletePrimitive.Row.Props) {\n return (\n <AutocompletePrimitive.Row\n className={className}\n data-slot=\"autocomplete-row\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteValue({\n ...props\n}: AutocompletePrimitive.Value.Props) {\n return (\n <AutocompletePrimitive.Value\n data-slot=\"autocomplete-value\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteList({\n className,\n ...props\n}: AutocompletePrimitive.List.Props) {\n return (\n <ScrollArea scrollbarGutter scrollFade>\n <AutocompletePrimitive.List\n className={cn(\n \"not-empty:scroll-py-1 not-empty:p-1 in-data-has-overflow-y:pe-3\",\n className,\n )}\n data-slot=\"autocomplete-list\"\n {...props}\n />\n </ScrollArea>\n );\n}\n\nfunction AutocompleteClear({\n className,\n ...props\n}: AutocompletePrimitive.Clear.Props) {\n return (\n <AutocompletePrimitive.Clear\n className={cn(\n \"-translate-y-1/2 absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"autocomplete-clear\"\n {...props}\n >\n <XIcon />\n </AutocompletePrimitive.Clear>\n );\n}\n\nfunction AutocompleteStatus({\n className,\n ...props\n}: AutocompletePrimitive.Status.Props) {\n return (\n <AutocompletePrimitive.Status\n className={cn(\n \"px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0\",\n className,\n )}\n data-slot=\"autocomplete-status\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteCollection({\n ...props\n}: AutocompletePrimitive.Collection.Props) {\n return (\n <AutocompletePrimitive.Collection\n data-slot=\"autocomplete-collection\"\n {...props}\n />\n );\n}\n\nfunction AutocompleteTrigger({\n className,\n ...props\n}: AutocompletePrimitive.Trigger.Props) {\n return (\n <AutocompletePrimitive.Trigger\n className={className}\n data-slot=\"autocomplete-trigger\"\n {...props}\n />\n );\n}\n\nexport {\n Autocomplete,\n AutocompleteInput,\n AutocompleteTrigger,\n AutocompletePopup,\n AutocompleteItem,\n AutocompleteSeparator,\n AutocompleteGroup,\n AutocompleteGroupLabel,\n AutocompleteEmpty,\n AutocompleteValue,\n AutocompleteList,\n AutocompleteClear,\n AutocompleteStatus,\n AutocompleteRow,\n AutocompleteCollection,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/avatar.tsx"],"names":["AvatarPrimitive"],"mappings":";;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACEA,SAAS,MAAA,CAAO,EAAE,SAAA,EAAW,GAAG,OAAM,EAAsD;AAC3F,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,MACpF,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuD;AACjG,EAAA,uBACC,GAAA,CAACA,QAAA,CAAgB,KAAA,EAAhB,EAAsB,WAAA,EAAU,cAAA,EAAe,SAAA,EAAW,EAAA,CAAG,yBAAA,EAA2B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAElH;AAOA,SAAS,eAAe,EAAE,SAAA,EAAW,SAAS,KAAA,EAAO,GAAG,OAAM,EAAwB;AACrF,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,QAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,iBAAA;AAAA,MACV,OAAO,KAAA,IAAS,OAAA;AAAA,MAChB,SAAA,EAAW,EAAA,CAAG,mFAAA,EAAqF,SAAS,CAAA;AAAA,MAC3G,GAAG;AAAA;AAAA,GACL;AAEF","file":"avatar.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';\n\nimport { cn } from '../lib/utils';\n\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n\treturn (\n\t\t<AvatarPrimitive.Root\n\t\t\tdata-slot='avatar'\n\t\t\tclassName={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n\treturn (\n\t\t<AvatarPrimitive.Image data-slot='avatar-image' className={cn('aspect-square size-full', className)} {...props} />\n\t);\n}\n\ntype AvatarFallbackProps = React.ComponentProps<typeof AvatarPrimitive.Fallback> & {\n\t/** @deprecated Use delay prop instead */\n\tdelayMs?: number;\n};\n\nfunction AvatarFallback({ className, delayMs, delay, ...props }: AvatarFallbackProps) {\n\treturn (\n\t\t<AvatarPrimitive.Fallback\n\t\t\tdata-slot='avatar-fallback'\n\t\t\tdelay={delay ?? delayMs}\n\t\t\tclassName={cn('bg-secondary flex size-full items-center justify-center rounded-[inherit] text-xs', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Avatar, AvatarFallback, AvatarImage };\n"]}
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/avatar.tsx"],"names":["AvatarPrimitive"],"mappings":";;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACEA,SAAS,MAAA,CAAO,EAAE,SAAA,EAAW,GAAG,OAAM,EAAsD;AAC3F,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,MACpF,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuD;AACjG,EAAA,uBACC,GAAA,CAACA,QAAA,CAAgB,KAAA,EAAhB,EAAsB,WAAA,EAAU,cAAA,EAAe,SAAA,EAAW,EAAA,CAAG,yBAAA,EAA2B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAElH;AAOA,SAAS,eAAe,EAAE,SAAA,EAAW,SAAS,KAAA,EAAO,GAAG,OAAM,EAAwB;AACrF,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA,CAAgB,QAAA;AAAA,IAAhB;AAAA,MACA,WAAA,EAAU,iBAAA;AAAA,MACV,OAAO,KAAA,IAAS,OAAA;AAAA,MAChB,SAAA,EAAW,EAAA,CAAG,mFAAA,EAAqF,SAAS,CAAA;AAAA,MAC3G,GAAG;AAAA;AAAA,GACL;AAEF","file":"avatar.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';\n\nimport { cn } from '../lib/utils';\n\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n\treturn (\n\t\t<AvatarPrimitive.Root\n\t\t\tdata-slot=\"avatar\"\n\t\t\tclassName={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n\treturn (\n\t\t<AvatarPrimitive.Image data-slot=\"avatar-image\" className={cn('aspect-square size-full', className)} {...props} />\n\t);\n}\n\ntype AvatarFallbackProps = React.ComponentProps<typeof AvatarPrimitive.Fallback> & {\n\t/** @deprecated Use delay prop instead */\n\tdelayMs?: number;\n};\n\nfunction AvatarFallback({ className, delayMs, delay, ...props }: AvatarFallbackProps) {\n\treturn (\n\t\t<AvatarPrimitive.Fallback\n\t\t\tdata-slot=\"avatar-fallback\"\n\t\t\tdelay={delay ?? delayMs}\n\t\t\tclassName={cn('bg-secondary flex size-full items-center justify-center rounded-[inherit] text-xs', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Avatar, AvatarFallback, AvatarImage };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/slot.tsx","../../src/lib/utils.ts","../../src/components/breadcrumb.tsx"],"names":["jsx"],"mappings":";;;;;;;AAQA,SAAS,eAAkB,IAAA,EAA0D;AACpF,EAAA,OAAO,CAAC,IAAA,KAAS;AAChB,IAAA,IAAA,CAAK,OAAA,CAAQ,CAAC,GAAA,KAAQ;AACrB,MAAA,IAAI,OAAO,QAAQ,UAAA,EAAY;AAC9B,QAAA,GAAA,CAAI,IAAI,CAAA;AAAA,MACT,CAAA,MAAA,IAAW,OAAO,IAAA,EAAM;AACvB,QAAC,IAAyC,OAAA,GAAU,IAAA;AAAA,MACrD;AAAA,IACD,CAAC,CAAA;AAAA,EACF,CAAA;AACD;AAMA,SAAS,UAAA,CACR,WACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,aAAA,GAAyC,EAAE,GAAG,UAAA,EAAW;AAE/D,EAAA,KAAA,MAAW,YAAY,UAAA,EAAY;AAElC,IAAA,IAAI,aAAa,KAAA,EAAO;AAExB,IAAA,MAAM,aAAA,GAAgB,UAAU,QAAQ,CAAA;AACxC,IAAA,MAAM,cAAA,GAAiB,WAAW,QAAQ,CAAA;AAG1C,IAAA,IAAI,UAAA,CAAW,KAAK,QAAQ,CAAA,IAAK,OAAO,aAAA,KAAk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AAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAC9E,EAAA,uBACCA,GAAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,iBAAA;AAAA,MACV,IAAA,EAAK,MAAA;AAAA,MACL,eAAA,EAAc,MAAA;AAAA,MACd,cAAA,EAAa,MAAA;AAAA,MACb,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA,GACL;AAEF;AAEA,SAAS,oBAAoB,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,OAAM,EAA+B;AAC3F,EAAA,uBACCA,GAAAA,CAAC,IAAA,EAAA,EAAG,aAAU,sBAAA,EAAuB,IAAA,EAAK,gBAAe,aAAA,EAAY,MAAA,EAAO,SAAA,EAAuB,GAAG,OACpG,QAAA,EAAA,QAAA,oBAAYA,IAAC,gBAAA,EAAA,EAAiB,IAAA,EAAM,IAAI,CAAA,EAC1C,CAAA;AAEF;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAClF,EAAA,uBACC,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,IAAA,EAAK,cAAA;AAAA,MACL,aAAA,EAAY,MAAA;AAAA,MACZ,SAAA,EAAW,EAAA,CAAG,yCAAA,EAA2C,SAAS,CAAA;AAAA,MACjE,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAAA,GAAAA,CAAC,kBAAA,EAAA,EAAmB,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,wBAC9BA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAU,QAAA,EAAA,MAAA,EAAI;AAAA;AAAA;AAAA,GAC/B;AAEF","file":"breadcrumb.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\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","import * as React from 'react';\nimport { Slot } from '../lib/slot';\nimport { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '../lib/utils';\n\nfunction Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {\n\treturn <nav aria-label='breadcrumb' data-slot='breadcrumb' {...props} />;\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {\n\treturn (\n\t\t<ol\n\t\t\tdata-slot='breadcrumb-list'\n\t\t\tclassName={cn(\n\t\t\t\t'text-muted-foreground/50 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {\n\treturn <li data-slot='breadcrumb-item' className={cn('inline-flex items-center gap-1.5', className)} {...props} />;\n}\n\nfunction BreadcrumbLink({\n\tasChild,\n\tclassName,\n\t...props\n}: React.ComponentProps<'a'> & {\n\tasChild?: boolean;\n}) {\n\tconst Comp = asChild ? Slot : 'a';\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-slot='breadcrumb-link'\n\t\t\tclassName={cn('text-muted-foreground/60 hover:text-foreground transition-colors', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot='breadcrumb-page'\n\t\t\trole='link'\n\t\t\taria-disabled='true'\n\t\t\taria-current='page'\n\t\t\tclassName={cn('text-foreground font-normal', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>) {\n\treturn (\n\t\t<li data-slot='breadcrumb-separator' role='presentation' aria-hidden='true' className={className} {...props}>\n\t\t\t{children ?? <ChevronRightIcon size={16} />}\n\t\t</li>\n\t);\n}\n\nfunction BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot='breadcrumb-ellipsis'\n\t\t\trole='presentation'\n\t\t\taria-hidden='true'\n\t\t\tclassName={cn('flex size-5 items-center justify-center', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon size={16} />\n\t\t\t<span className='sr-only'>More</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tBreadcrumb,\n\tBreadcrumbEllipsis,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n};\n"]}
1
+ {"version":3,"sources":["../../src/lib/slot.tsx","../../src/lib/utils.ts","../../src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,EAAO,SAAA,EAAuB,GAAG,OACpG,QAAA,EAAA,QAAA,oBAAYA,IAAC,gBAAA,EAAA,EAAiB,IAAA,EAAM,IAAI,CAAA,EAC1C,CAAA;AAEF;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAClF,EAAA,uBACC,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,IAAA,EAAK,cAAA;AAAA,MACL,aAAA,EAAY,MAAA;AAAA,MACZ,SAAA,EAAW,EAAA,CAAG,yCAAA,EAA2C,SAAS,CAAA;AAAA,MACjE,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAAA,GAAAA,CAAC,kBAAA,EAAA,EAAmB,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,wBAC9BA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAU,QAAA,EAAA,MAAA,EAAI;AAAA;AAAA;AAAA,GAC/B;AAEF","file":"breadcrumb.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\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","import * as React from 'react';\nimport { Slot } from '../lib/slot';\nimport { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '../lib/utils';\n\nfunction Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {\n\treturn <nav aria-label='breadcrumb' data-slot=\"breadcrumb\" {...props} />;\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {\n\treturn (\n\t\t<ol\n\t\t\tdata-slot=\"breadcrumb-list\"\n\t\t\tclassName={cn(\n\t\t\t\t'text-muted-foreground/50 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {\n\treturn <li data-slot=\"breadcrumb-item\" className={cn('inline-flex items-center gap-1.5', className)} {...props} />;\n}\n\nfunction BreadcrumbLink({\n\tasChild,\n\tclassName,\n\t...props\n}: React.ComponentProps<'a'> & {\n\tasChild?: boolean;\n}) {\n\tconst Comp = asChild ? Slot : 'a';\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-slot=\"breadcrumb-link\"\n\t\t\tclassName={cn('text-muted-foreground/60 hover:text-foreground transition-colors', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"breadcrumb-page\"\n\t\t\trole='link'\n\t\t\taria-disabled='true'\n\t\t\taria-current='page'\n\t\t\tclassName={cn('text-foreground font-normal', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>) {\n\treturn (\n\t\t<li data-slot=\"breadcrumb-separator\" role='presentation' aria-hidden='true' className={className} {...props}>\n\t\t\t{children ?? <ChevronRightIcon size={16} />}\n\t\t</li>\n\t);\n}\n\nfunction BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"breadcrumb-ellipsis\"\n\t\t\trole='presentation'\n\t\t\taria-hidden='true'\n\t\t\tclassName={cn('flex size-5 items-center justify-center', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon size={16} />\n\t\t\t<span className='sr-only'>More</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tBreadcrumb,\n\tBreadcrumbEllipsis,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n};\n"]}
@@ -24,7 +24,7 @@ declare function ComboboxValue({ ...props }: Combobox$1.Value.Props): react_jsx_
24
24
  declare function ComboboxList({ className, ...props }: Combobox$1.List.Props): react_jsx_runtime.JSX.Element;
25
25
  declare function ComboboxClear({ className, ...props }: Combobox$1.Clear.Props): react_jsx_runtime.JSX.Element;
26
26
  declare function ComboboxStatus({ className, ...props }: Combobox$1.Status.Props): react_jsx_runtime.JSX.Element;
27
- declare function ComboboxCollection(props: Combobox$1.Collection.Props): react_jsx_runtime.JSX.Element;
27
+ declare function ComboboxCollection({ ...props }: Combobox$1.Collection.Props): react_jsx_runtime.JSX.Element;
28
28
  declare function ComboboxChips({ className, children, startAddon, ...props }: Combobox$1.Chips.Props & {
29
29
  startAddon?: React.ReactNode;
30
30
  }): react_jsx_runtime.JSX.Element;
@@ -41,7 +41,7 @@ function Input({ className, size = "default", unstyled = false, ...props }) {
41
41
  className: cn(
42
42
  !unstyled && [
43
43
  // Base layout
44
- "relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs transition-shadow",
44
+ "relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base transition-shadow",
45
45
  // Inner shadow highlight
46
46
  "before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]",
47
47
  "not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
@@ -316,7 +316,10 @@ function ComboboxSeparator({
316
316
  }
317
317
  );
318
318
  }
319
- function ComboboxGroup({ className, ...props }) {
319
+ function ComboboxGroup({
320
+ className,
321
+ ...props
322
+ }) {
320
323
  return /* @__PURE__ */ jsx(
321
324
  Combobox$1.Group,
322
325
  {
@@ -342,7 +345,10 @@ function ComboboxGroupLabel({
342
345
  }
343
346
  );
344
347
  }
345
- function ComboboxEmpty({ className, ...props }) {
348
+ function ComboboxEmpty({
349
+ className,
350
+ ...props
351
+ }) {
346
352
  return /* @__PURE__ */ jsx(
347
353
  Combobox$1.Empty,
348
354
  {
@@ -355,7 +361,10 @@ function ComboboxEmpty({ className, ...props }) {
355
361
  }
356
362
  );
357
363
  }
358
- function ComboboxRow({ className, ...props }) {
364
+ function ComboboxRow({
365
+ className,
366
+ ...props
367
+ }) {
359
368
  return /* @__PURE__ */ jsx(
360
369
  Combobox$1.Row,
361
370
  {
@@ -365,10 +374,21 @@ function ComboboxRow({ className, ...props }) {
365
374
  }
366
375
  );
367
376
  }
368
- function ComboboxValue({ ...props }) {
369
- return /* @__PURE__ */ jsx(Combobox$1.Value, { "data-slot": "combobox-value", ...props });
377
+ function ComboboxValue({
378
+ ...props
379
+ }) {
380
+ return /* @__PURE__ */ jsx(
381
+ Combobox$1.Value,
382
+ {
383
+ "data-slot": "combobox-value",
384
+ ...props
385
+ }
386
+ );
370
387
  }
371
- function ComboboxList({ className, ...props }) {
388
+ function ComboboxList({
389
+ className,
390
+ ...props
391
+ }) {
372
392
  return /* @__PURE__ */ jsx(ScrollArea, { scrollbarGutter: true, scrollFade: true, children: /* @__PURE__ */ jsx(
373
393
  Combobox$1.List,
374
394
  {
@@ -381,7 +401,10 @@ function ComboboxList({ className, ...props }) {
381
401
  }
382
402
  ) });
383
403
  }
384
- function ComboboxClear({ className, ...props }) {
404
+ function ComboboxClear({
405
+ className,
406
+ ...props
407
+ }) {
385
408
  return /* @__PURE__ */ jsx(
386
409
  Combobox$1.Clear,
387
410
  {
@@ -407,8 +430,16 @@ function ComboboxStatus({
407
430
  }
408
431
  );
409
432
  }
410
- function ComboboxCollection(props) {
411
- return /* @__PURE__ */ jsx(Combobox$1.Collection, { "data-slot": "combobox-collection", ...props });
433
+ function ComboboxCollection({
434
+ ...props
435
+ }) {
436
+ return /* @__PURE__ */ jsx(
437
+ Combobox$1.Collection,
438
+ {
439
+ "data-slot": "combobox-collection",
440
+ ...props
441
+ }
442
+ );
412
443
  }
413
444
  function ComboboxChips({
414
445
  className,
@@ -421,7 +452,7 @@ function ComboboxChips({
421
452
  Combobox$1.Chips,
422
453
  {
423
454
  className: cn(
424
- "relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base shadow-xs/5 outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]",
455
+ "relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]",
425
456
  className
426
457
  ),
427
458
  "data-slot": "combobox-chips",
@@ -452,7 +483,10 @@ function ComboboxChips({
452
483
  }
453
484
  );
454
485
  }
455
- function ComboboxChip({ children, ...props }) {
486
+ function ComboboxChip({
487
+ children,
488
+ ...props
489
+ }) {
456
490
  return /* @__PURE__ */ jsxs(
457
491
  Combobox$1.Chip,
458
492
  {
@@ -466,7 +500,9 @@ function ComboboxChip({ children, ...props }) {
466
500
  }
467
501
  );
468
502
  }
469
- function ComboboxChipRemove(props) {
503
+ function ComboboxChipRemove({
504
+ ...props
505
+ }) {
470
506
  return /* @__PURE__ */ jsx(
471
507
  Combobox$1.ChipRemove,
472
508
  {