@tetrascience-npm/tetrascience-react-ui 1.0.0-beta.151.1 → 1.0.0-beta.153.1

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 (40) hide show
  1. package/dist/components/ui/combobox.d.ts +10 -2
  2. package/dist/components/ui/input-group.d.ts +8 -3
  3. package/dist/components/ui/input.d.ts +9 -2
  4. package/dist/components/ui/select.d.ts +1 -1
  5. package/dist/components/ui/textarea.d.ts +6 -2
  6. package/dist/components/ui/toggle.d.ts +1 -1
  7. package/dist/index.cjs +1 -1
  8. package/dist/index.css +1 -1
  9. package/dist/index.js +391 -389
  10. package/dist/index.scoped.css +1 -1
  11. package/dist/index.tailwind.css +1 -1
  12. package/dist/ui/combobox.cjs +1 -1
  13. package/dist/ui/combobox.cjs.map +1 -1
  14. package/dist/ui/combobox.js +97 -78
  15. package/dist/ui/combobox.js.map +1 -1
  16. package/dist/ui/input-group.cjs +1 -1
  17. package/dist/ui/input-group.cjs.map +1 -1
  18. package/dist/ui/input-group.js +89 -63
  19. package/dist/ui/input-group.js.map +1 -1
  20. package/dist/ui/input.cjs +1 -1
  21. package/dist/ui/input.cjs.map +1 -1
  22. package/dist/ui/input.js +33 -9
  23. package/dist/ui/input.js.map +1 -1
  24. package/dist/ui/select.cjs +1 -1
  25. package/dist/ui/select.cjs.map +1 -1
  26. package/dist/ui/select.js +23 -21
  27. package/dist/ui/select.js.map +1 -1
  28. package/dist/ui/textarea.cjs +1 -1
  29. package/dist/ui/textarea.cjs.map +1 -1
  30. package/dist/ui/textarea.js +32 -10
  31. package/dist/ui/textarea.js.map +1 -1
  32. package/dist/ui/toggle-group.cjs +1 -1
  33. package/dist/ui/toggle-group.cjs.map +1 -1
  34. package/dist/ui/toggle-group.js +45 -45
  35. package/dist/ui/toggle-group.js.map +1 -1
  36. package/dist/ui/toggle.cjs +1 -1
  37. package/dist/ui/toggle.cjs.map +1 -1
  38. package/dist/ui/toggle.js +7 -6
  39. package/dist/ui/toggle.js.map +1 -1
  40. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@base-ui/react"),b=require("lucide-react"),m=require("react"),p=require("./button.cjs"),i=require("./input-group.cjs"),r=require("../lib/utils.cjs");function x(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>o[n]})}}return e.default=o,Object.freeze(e)}const h=x(m),g=a.Combobox.Root;function C({...o}){return t.jsx(a.Combobox.Value,{"data-slot":"combobox-value",...o})}function d({className:o,children:e,...n}){return t.jsxs(a.Combobox.Trigger,{"aria-label":"Toggle options","data-slot":"combobox-trigger",className:r.cn("[&_svg:not([class*='size-'])]:size-4",o),...n,children:[e,t.jsx(b.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})]})}function f({className:o,...e}){return t.jsx(a.Combobox.Clear,{"aria-label":"Clear","data-slot":"combobox-clear",render:t.jsx(i.InputGroupButton,{variant:"ghost",size:"icon-xs"}),className:r.cn(o),...e,children:t.jsx(b.XIcon,{className:"pointer-events-none"})})}function v({className:o,children:e,disabled:n=!1,showTrigger:s=!0,showClear:l=!1,...c}){return t.jsxs(i.InputGroup,{className:r.cn("w-auto bg-card",o),children:[t.jsx(a.Combobox.Input,{render:t.jsx(i.InputGroupInput,{disabled:n}),...c}),t.jsxs(i.InputGroupAddon,{align:"inline-end",children:[s&&t.jsx(i.InputGroupButton,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:n,children:t.jsx(d,{})}),l&&t.jsx(f,{disabled:n})]}),e]})}function j({className:o,side:e="bottom",sideOffset:n=6,align:s="start",alignOffset:l=0,anchor:c,...u}){return t.jsx(a.Combobox.Portal,{children:t.jsx(a.Combobox.Positioner,{side:e,sideOffset:n,align:s,alignOffset:l,anchor:c,className:"isolate z-50",children:t.jsx(a.Combobox.Popup,{"data-slot":"combobox-content","data-chips":!!c,className:r.cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),...u})})})}function w({className:o,...e}){return t.jsx(a.Combobox.List,{"data-slot":"combobox-list",className:r.cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",o),...e})}function y({className:o,children:e,...n}){return t.jsxs(a.Combobox.Item,{"data-slot":"combobox-item",className:r.cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...n,children:[e,t.jsx(a.Combobox.ItemIndicator,{render:t.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:t.jsx(b.CheckIcon,{className:"pointer-events-none"})})]})}function N({className:o,...e}){return t.jsx(a.Combobox.Group,{"data-slot":"combobox-group",className:r.cn(o),...e})}function I({className:o,...e}){return t.jsx(a.Combobox.GroupLabel,{"data-slot":"combobox-label",className:r.cn("px-2 py-1.5 text-xs text-muted-foreground",o),...e})}function z({...o}){return t.jsx(a.Combobox.Collection,{"data-slot":"combobox-collection",...o})}function G({className:o,...e}){return t.jsx(a.Combobox.Empty,{"data-slot":"combobox-empty",className:r.cn("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",o),...e})}function _({className:o,...e}){return t.jsx(a.Combobox.Separator,{"data-slot":"combobox-separator","aria-hidden":"true",className:r.cn("-mx-1 my-1 h-px bg-border",o),...e})}function R({className:o,...e}){return t.jsx(a.Combobox.Chips,{"data-slot":"combobox-chips",className:r.cn("group/chips flex min-h-12 flex-wrap items-center gap-1 rounded-md border border-input bg-card bg-clip-padding px-4 py-1 text-sm transition-colors has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50",o),...e})}function q({className:o,children:e,showRemove:n=!0,...s}){return t.jsxs(a.Combobox.Chip,{"data-slot":"combobox-chip",className:r.cn("flex h-[calc(--spacing(6.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",o),...s,children:[e,n&&t.jsx(a.Combobox.ChipRemove,{"aria-label":"Remove",render:t.jsx(p.Button,{variant:"ghost",size:"icon-xs"}),className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",children:t.jsx(b.XIcon,{className:"pointer-events-none"})})]})}function S({className:o,...e}){return t.jsx(a.Combobox.Input,{"data-slot":"combobox-chip-input",className:r.cn("min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent",o),...e})}function L(){return h.useRef(null)}exports.Combobox=g;exports.ComboboxChip=q;exports.ComboboxChips=R;exports.ComboboxChipsInput=S;exports.ComboboxCollection=z;exports.ComboboxContent=j;exports.ComboboxEmpty=G;exports.ComboboxGroup=N;exports.ComboboxInput=v;exports.ComboboxItem=y;exports.ComboboxLabel=I;exports.ComboboxList=w;exports.ComboboxSeparator=_;exports.ComboboxTrigger=d;exports.ComboboxValue=C;exports.useComboboxAnchor=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("@base-ui/react"),u=require("lucide-react"),b=require("react"),m=require("./button.cjs"),d=require("./input-group.cjs"),i=require("../lib/utils.cjs");function x(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>o[s]})}}return t.default=o,Object.freeze(t)}const h=x(b),g=a.Combobox.Root;function f({...o}){return e.jsx(a.Combobox.Value,{"data-slot":"combobox-value",...o})}function l({className:o,children:t,...s}){return e.jsxs(a.Combobox.Trigger,{"aria-label":"Toggle options","data-slot":"combobox-trigger",className:i.cn("[&_svg:not([class*='size-'])]:size-4",o),...s,children:[t,e.jsx(u.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})]})}function C({className:o,...t}){return e.jsx(a.Combobox.Clear,{"aria-label":"Clear","data-slot":"combobox-clear",render:e.jsx(d.InputGroupButton,{variant:"ghost",size:"icon-xs"}),className:i.cn(o),...t,children:e.jsx(u.XIcon,{className:"pointer-events-none"})})}function z({className:o,children:t,disabled:s=!1,showTrigger:n=!0,showClear:r=!1,size:c,...p}){return e.jsxs(d.InputGroup,{size:c,className:i.cn("w-auto bg-card",o),children:[e.jsx(a.Combobox.Input,{render:e.jsx(d.InputGroupInput,{disabled:s}),...p}),e.jsxs(d.InputGroupAddon,{align:"inline-end",children:[n&&e.jsx(d.InputGroupButton,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:s,children:e.jsx(l,{})}),r&&e.jsx(C,{disabled:s})]}),t]})}function v({className:o,side:t="bottom",sideOffset:s=6,align:n="start",alignOffset:r=0,anchor:c,...p}){return e.jsx(a.Combobox.Portal,{children:e.jsx(a.Combobox.Positioner,{side:t,sideOffset:s,align:n,alignOffset:r,anchor:c,className:"isolate z-50",children:e.jsx(a.Combobox.Popup,{"data-slot":"combobox-content","data-chips":!!c,className:i.cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),...p})})})}function j({className:o,...t}){return e.jsx(a.Combobox.List,{"data-slot":"combobox-list",className:i.cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",o),...t})}function y({className:o,children:t,...s}){return e.jsxs(a.Combobox.Item,{"data-slot":"combobox-item",className:i.cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...s,children:[t,e.jsx(a.Combobox.ItemIndicator,{render:e.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:e.jsx(u.CheckIcon,{className:"pointer-events-none"})})]})}function w({className:o,...t}){return e.jsx(a.Combobox.Group,{"data-slot":"combobox-group",className:i.cn(o),...t})}function N({className:o,...t}){return e.jsx(a.Combobox.GroupLabel,{"data-slot":"combobox-label",className:i.cn("px-2 py-1.5 text-xs text-muted-foreground",o),...t})}function I({...o}){return e.jsx(a.Combobox.Collection,{"data-slot":"combobox-collection",...o})}function G({className:o,...t}){return e.jsx(a.Combobox.Empty,{"data-slot":"combobox-empty",className:i.cn("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",o),...t})}function _({className:o,...t}){return e.jsx(a.Combobox.Separator,{"data-slot":"combobox-separator","aria-hidden":"true",className:i.cn("-mx-1 my-1 h-px bg-border",o),...t})}function R({className:o,children:t,size:s="default",showTrigger:n=!0,...r}){return e.jsxs(a.Combobox.Chips,{"data-slot":"combobox-chips","data-size":s,className:i.cn("group/chips relative flex flex-wrap items-center gap-1 border border-input bg-card bg-clip-padding py-1 pl-4 text-sm transition-colors data-[size=xs]:min-h-6 data-[size=xs]:rounded-md data-[size=sm]:min-h-7 data-[size=sm]:rounded-md data-[size=default]:min-h-8 data-[size=default]:rounded-lg data-[size=lg]:min-h-9 data-[size=lg]:rounded-lg has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:pl-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50",n?"pr-8":"pr-4",o),...r,children:[t,n&&e.jsx(l,{className:"absolute top-0 right-1 flex shrink-0 items-center text-muted-foreground group-data-[size=xs]/chips:h-6 group-data-[size=sm]/chips:h-7 group-data-[size=default]/chips:h-8 group-data-[size=lg]/chips:h-9"})]})}function q({className:o,children:t,showRemove:s=!0,...n}){return e.jsxs(a.Combobox.Chip,{"data-slot":"combobox-chip",className:i.cn("flex w-fit items-center justify-center gap-1 bg-muted font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0 group-data-[size=xs]/chips:h-4 group-data-[size=xs]/chips:rounded-[4px] group-data-[size=xs]/chips:px-1 group-data-[size=xs]/chips:text-[10px] group-data-[size=sm]/chips:h-5 group-data-[size=sm]/chips:rounded-[4px] group-data-[size=sm]/chips:px-1.5 group-data-[size=sm]/chips:text-[11px] group-data-[size=default]/chips:h-6 group-data-[size=default]/chips:rounded-[6px] group-data-[size=default]/chips:px-1.5 group-data-[size=default]/chips:text-xs group-data-[size=lg]/chips:h-7 group-data-[size=lg]/chips:rounded-[6px] group-data-[size=lg]/chips:px-2 group-data-[size=lg]/chips:text-sm",o),...n,children:[t,s&&e.jsx(a.Combobox.ChipRemove,{"aria-label":"Remove",render:e.jsx(m.Button,{variant:"ghost",size:"icon-xs"}),className:"-ml-1 opacity-50 hover:opacity-100 group-data-[size=xs]/chips:size-3.5 group-data-[size=xs]/chips:[&>svg]:size-2.5 group-data-[size=sm]/chips:size-4 group-data-[size=sm]/chips:[&>svg]:size-3 group-data-[size=default]/chips:size-5 group-data-[size=default]/chips:[&>svg]:size-3.5 group-data-[size=lg]/chips:size-6 group-data-[size=lg]/chips:[&>svg]:size-3.5","data-slot":"combobox-chip-remove",children:e.jsx(u.XIcon,{className:"pointer-events-none"})})]})}function S({className:o,...t}){return e.jsx(a.Combobox.Input,{"data-slot":"combobox-chip-input",className:i.cn("min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent",o),...t})}function k(){return h.useRef(null)}exports.Combobox=g;exports.ComboboxChip=q;exports.ComboboxChips=R;exports.ComboboxChipsInput=S;exports.ComboboxCollection=I;exports.ComboboxContent=v;exports.ComboboxEmpty=G;exports.ComboboxGroup=w;exports.ComboboxInput=z;exports.ComboboxItem=y;exports.ComboboxLabel=N;exports.ComboboxList=j;exports.ComboboxSeparator=_;exports.ComboboxTrigger=l;exports.ComboboxValue=f;exports.useComboboxAnchor=k;
2
2
  //# sourceMappingURL=combobox.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.cjs","sources":["../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { cn } from \"@/lib/utils\"\n\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n aria-label=\"Toggle options\"\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n aria-label=\"Clear\"\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n <InputGroup className={cn(\"w-auto bg-card\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n aria-hidden=\"true\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"group/chips flex min-h-12 flex-wrap items-center gap-1 rounded-md border border-input bg-card bg-clip-padding px-4 py-1 text-sm transition-colors has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(6.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n aria-label=\"Remove\"\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\n \"min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"names":["Combobox","ComboboxPrimitive","ComboboxValue","props","ComboboxTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","ComboboxClear","InputGroupButton","XIcon","ComboboxInput","disabled","showTrigger","showClear","InputGroup","InputGroupInput","InputGroupAddon","ComboboxContent","side","sideOffset","align","alignOffset","anchor","ComboboxList","ComboboxItem","CheckIcon","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxEmpty","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","Button","ComboboxChipsInput","useComboboxAnchor","React"],"mappings":"+iBAgBMA,EAAWC,EAAAA,SAAkB,KAEnC,SAASC,EAAc,CAAE,GAAGC,GAAwC,CAClE,aAAQF,EAAAA,SAAkB,MAAlB,CAAwB,YAAU,iBAAkB,GAAGE,EAAO,CACxE,CAEA,SAASC,EAAgB,CACvB,UAAAC,EACA,SAAAC,EACA,GAAGH,CACL,EAAoC,CAClC,OACEI,EAAAA,KAACN,EAAAA,SAAkB,QAAlB,CACC,aAAW,iBACX,YAAU,mBACV,UAAWO,EAAAA,GAAG,uCAAwCH,CAAS,EAC9D,GAAGF,EAEH,SAAA,CAAAG,EACDG,EAAAA,IAACC,EAAAA,gBAAA,CAAgB,UAAU,kDAAA,CAAmD,CAAA,CAAA,CAAA,CAGpF,CAEA,SAASC,EAAc,CAAE,UAAAN,EAAW,GAAGF,GAAwC,CAC7E,OACEM,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,aAAW,QACX,YAAU,iBACV,OAAQQ,EAAAA,IAACG,mBAAA,CAAiB,QAAQ,QAAQ,KAAK,UAAU,EACzD,UAAWJ,EAAAA,GAAGH,CAAS,EACtB,GAAGF,EAEJ,SAAAM,EAAAA,IAACI,EAAAA,MAAA,CAAM,UAAU,qBAAA,CAAsB,CAAA,CAAA,CAG7C,CAEA,SAASC,EAAc,CACrB,UAAAT,EACA,SAAAC,EACA,SAAAS,EAAW,GACX,YAAAC,EAAc,GACd,UAAAC,EAAY,GACZ,GAAGd,CACL,EAGG,CACD,cACGe,EAAAA,WAAA,CAAW,UAAWV,EAAAA,GAAG,iBAAkBH,CAAS,EACnD,SAAA,CAAAI,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,OAAQQ,EAAAA,IAACU,kBAAA,CAAgB,SAAAJ,CAAA,CAAoB,EAC5C,GAAGZ,CAAA,CAAA,EAENI,EAAAA,KAACa,EAAAA,gBAAA,CAAgB,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EAAa,GACb,GAAGlC,CACL,EAEG,CACD,OACEI,EAAAA,KAACN,EAAAA,SAAkB,KAAlB,CACC,YAAU,gBACV,UAAWO,EAAAA,GACT,6RACAH,CAAA,EAED,GAAGF,EAEH,SAAA,CAAAG,EACA+B,GACC5B,EAAAA,IAACR,EAAAA,SAAkB,WAAlB,CACC,aAAW,SACX,OAAQQ,EAAAA,IAAC6B,SAAA,CAAO,QAAQ,QAAQ,KAAK,UAAU,EAC/C,UAAU,qCACV,YAAU,uBAEV,SAAA7B,EAAAA,IAACI,EAAAA,MAAA,CAAM,UAAU,qBAAA,CAAsB,CAAA,CAAA,CACzC,CAAA,CAAA,CAIR,CAEA,SAAS0B,EAAmB,CAC1B,UAAAlC,EACA,GAAGF,CACL,EAAkC,CAChC,OACEM,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,YAAU,sBACV,UAAWO,EAAAA,GACT,sGACAH,CAAA,EAED,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASqC,GAAoB,CAC3B,OAAOC,EAAM,OAA8B,IAAI,CACjD"}
1
+ {"version":3,"file":"combobox.cjs","sources":["../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { cn } from \"@/lib/utils\"\n\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n aria-label=\"Toggle options\"\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n aria-label=\"Clear\"\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n size,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n /** Shared control scale (SW-2591): xs 24 / sm 28 / default 32 / lg 36. */\n size?: \"xs\" | \"sm\" | \"default\" | \"lg\"\n}) {\n return (\n <InputGroup size={size} className={cn(\"w-auto bg-card\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n aria-hidden=\"true\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n children,\n size = \"default\",\n showTrigger = true,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props & {\n /** Shared control scale (SW-2591): base height + chip/remove scale via group-data. */\n size?: \"xs\" | \"sm\" | \"default\" | \"lg\"\n /** Dropdown-toggle chevron at the inline end (default `true`) — mirrors\n * `ComboboxInput` so single- and multi-select share the affordance (SW-2583). */\n showTrigger?: boolean\n }) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n data-size={size}\n className={cn(\n // min-height matches Select/Combobox per size (24 / 28 / 32 / 36) and\n // grows as chips wrap; radius 8 at xs/sm, 10 at default/lg. `relative`\n // so the toggle chevron can pin to the top-right (see below); left\n // padding tightens once chips are present, right side reserves space\n // for the chevron.\n \"group/chips relative flex flex-wrap items-center gap-1 border border-input bg-card bg-clip-padding py-1 pl-4 text-sm transition-colors data-[size=xs]:min-h-6 data-[size=xs]:rounded-md data-[size=sm]:min-h-7 data-[size=sm]:rounded-md data-[size=default]:min-h-8 data-[size=default]:rounded-lg data-[size=lg]:min-h-9 data-[size=lg]:rounded-lg has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:pl-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50\",\n showTrigger ? \"pr-8\" : \"pr-4\",\n className\n )}\n {...props}\n >\n {children}\n {showTrigger && (\n // Pinned to the top-right and sized to the first row, so it stays put\n // (aligned with the input row) as chips wrap to multiple lines (SW-2583).\n <ComboboxTrigger className=\"absolute top-0 right-1 flex shrink-0 items-center text-muted-foreground group-data-[size=xs]/chips:h-6 group-data-[size=sm]/chips:h-7 group-data-[size=default]/chips:h-8 group-data-[size=lg]/chips:h-9\" />\n )}\n </ComboboxPrimitive.Chips>\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n // Pill scales with the chips container (SW-2591): height / radius / text\n // step per group size; radius is concentric with the container (4/4/6/6).\n \"flex w-fit items-center justify-center gap-1 bg-muted font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0 group-data-[size=xs]/chips:h-4 group-data-[size=xs]/chips:rounded-[4px] group-data-[size=xs]/chips:px-1 group-data-[size=xs]/chips:text-[10px] group-data-[size=sm]/chips:h-5 group-data-[size=sm]/chips:rounded-[4px] group-data-[size=sm]/chips:px-1.5 group-data-[size=sm]/chips:text-[11px] group-data-[size=default]/chips:h-6 group-data-[size=default]/chips:rounded-[6px] group-data-[size=default]/chips:px-1.5 group-data-[size=default]/chips:text-xs group-data-[size=lg]/chips:h-7 group-data-[size=lg]/chips:rounded-[6px] group-data-[size=lg]/chips:px-2 group-data-[size=lg]/chips:text-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n aria-label=\"Remove\"\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100 group-data-[size=xs]/chips:size-3.5 group-data-[size=xs]/chips:[&>svg]:size-2.5 group-data-[size=sm]/chips:size-4 group-data-[size=sm]/chips:[&>svg]:size-3 group-data-[size=default]/chips:size-5 group-data-[size=default]/chips:[&>svg]:size-3.5 group-data-[size=lg]/chips:size-6 group-data-[size=lg]/chips:[&>svg]:size-3.5\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\n \"min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"names":["Combobox","ComboboxPrimitive","ComboboxValue","props","ComboboxTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","ComboboxClear","InputGroupButton","XIcon","ComboboxInput","disabled","showTrigger","showClear","size","InputGroup","InputGroupInput","InputGroupAddon","ComboboxContent","side","sideOffset","align","alignOffset","anchor","ComboboxList","ComboboxItem","CheckIcon","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxEmpty","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","Button","ComboboxChipsInput","useComboboxAnchor","React"],"mappings":"+iBAgBMA,EAAWC,EAAAA,SAAkB,KAEnC,SAASC,EAAc,CAAE,GAAGC,GAAwC,CAClE,aAAQF,EAAAA,SAAkB,MAAlB,CAAwB,YAAU,iBAAkB,GAAGE,EAAO,CACxE,CAEA,SAASC,EAAgB,CACvB,UAAAC,EACA,SAAAC,EACA,GAAGH,CACL,EAAoC,CAClC,OACEI,EAAAA,KAACN,EAAAA,SAAkB,QAAlB,CACC,aAAW,iBACX,YAAU,mBACV,UAAWO,EAAAA,GAAG,uCAAwCH,CAAS,EAC9D,GAAGF,EAEH,SAAA,CAAAG,EACDG,EAAAA,IAACC,EAAAA,gBAAA,CAAgB,UAAU,kDAAA,CAAmD,CAAA,CAAA,CAAA,CAGpF,CAEA,SAASC,EAAc,CAAE,UAAAN,EAAW,GAAGF,GAAwC,CAC7E,OACEM,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,aAAW,QACX,YAAU,iBACV,OAAQQ,EAAAA,IAACG,mBAAA,CAAiB,QAAQ,QAAQ,KAAK,UAAU,EACzD,UAAWJ,EAAAA,GAAGH,CAAS,EACtB,GAAGF,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F,CAAA,CAAA,CAGV,CAEA,SAASsC,GAAoB,CAC3B,OAAOC,EAAM,OAA8B,IAAI,CACjD"}
@@ -1,26 +1,26 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import { Combobox as a } from "@base-ui/react";
3
- import { XIcon as d, CheckIcon as u, ChevronDownIcon as b } from "lucide-react";
4
- import * as h from "react";
3
+ import { XIcon as c, CheckIcon as h, ChevronDownIcon as b } from "lucide-react";
4
+ import * as g from "react";
5
5
  import { Button as x } from "./button.js";
6
- import { InputGroup as g, InputGroupInput as f, InputGroupAddon as v, InputGroupButton as p } from "./input-group.js";
7
- import { cn as n } from "../lib/utils.js";
8
- const R = a.Root;
9
- function k({ ...o }) {
6
+ import { InputGroup as f, InputGroupInput as z, InputGroupAddon as v, InputGroupButton as u } from "./input-group.js";
7
+ import { cn as s } from "../lib/utils.js";
8
+ const k = a.Root;
9
+ function R({ ...o }) {
10
10
  return /* @__PURE__ */ t(a.Value, { "data-slot": "combobox-value", ...o });
11
11
  }
12
- function C({
12
+ function m({
13
13
  className: o,
14
14
  children: e,
15
- ...r
15
+ ...i
16
16
  }) {
17
- return /* @__PURE__ */ s(
17
+ return /* @__PURE__ */ n(
18
18
  a.Trigger,
19
19
  {
20
20
  "aria-label": "Toggle options",
21
21
  "data-slot": "combobox-trigger",
22
- className: n("[&_svg:not([class*='size-'])]:size-4", o),
23
- ...r,
22
+ className: s("[&_svg:not([class*='size-'])]:size-4", o),
23
+ ...i,
24
24
  children: [
25
25
  e,
26
26
  /* @__PURE__ */ t(b, { className: "pointer-events-none size-4 text-muted-foreground" })
@@ -28,49 +28,50 @@ function C({
28
28
  }
29
29
  );
30
30
  }
31
- function w({ className: o, ...e }) {
31
+ function C({ className: o, ...e }) {
32
32
  return /* @__PURE__ */ t(
33
33
  a.Clear,
34
34
  {
35
35
  "aria-label": "Clear",
36
36
  "data-slot": "combobox-clear",
37
- render: /* @__PURE__ */ t(p, { variant: "ghost", size: "icon-xs" }),
38
- className: n(o),
37
+ render: /* @__PURE__ */ t(u, { variant: "ghost", size: "icon-xs" }),
38
+ className: s(o),
39
39
  ...e,
40
- children: /* @__PURE__ */ t(d, { className: "pointer-events-none" })
40
+ children: /* @__PURE__ */ t(c, { className: "pointer-events-none" })
41
41
  }
42
42
  );
43
43
  }
44
44
  function L({
45
45
  className: o,
46
46
  children: e,
47
- disabled: r = !1,
48
- showTrigger: i = !0,
49
- showClear: c = !1,
47
+ disabled: i = !1,
48
+ showTrigger: r = !0,
49
+ showClear: d = !1,
50
+ size: p,
50
51
  ...l
51
52
  }) {
52
- return /* @__PURE__ */ s(g, { className: n("w-auto bg-card", o), children: [
53
+ return /* @__PURE__ */ n(f, { size: p, className: s("w-auto bg-card", o), children: [
53
54
  /* @__PURE__ */ t(
54
55
  a.Input,
55
56
  {
56
- render: /* @__PURE__ */ t(f, { disabled: r }),
57
+ render: /* @__PURE__ */ t(z, { disabled: i }),
57
58
  ...l
58
59
  }
59
60
  ),
60
- /* @__PURE__ */ s(v, { align: "inline-end", children: [
61
- i && /* @__PURE__ */ t(
62
- p,
61
+ /* @__PURE__ */ n(v, { align: "inline-end", children: [
62
+ r && /* @__PURE__ */ t(
63
+ u,
63
64
  {
64
65
  size: "icon-xs",
65
66
  variant: "ghost",
66
67
  asChild: !0,
67
68
  "data-slot": "input-group-button",
68
69
  className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
69
- disabled: r,
70
- children: /* @__PURE__ */ t(C, {})
70
+ disabled: i,
71
+ children: /* @__PURE__ */ t(m, {})
71
72
  }
72
73
  ),
73
- c && /* @__PURE__ */ t(w, { disabled: r })
74
+ d && /* @__PURE__ */ t(C, { disabled: i })
74
75
  ] }),
75
76
  e
76
77
  ] });
@@ -78,28 +79,28 @@ function L({
78
79
  function _({
79
80
  className: o,
80
81
  side: e = "bottom",
81
- sideOffset: r = 6,
82
- align: i = "start",
83
- alignOffset: c = 0,
84
- anchor: l,
85
- ...m
82
+ sideOffset: i = 6,
83
+ align: r = "start",
84
+ alignOffset: d = 0,
85
+ anchor: p,
86
+ ...l
86
87
  }) {
87
88
  return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
88
89
  a.Positioner,
89
90
  {
90
91
  side: e,
91
- sideOffset: r,
92
- align: i,
93
- alignOffset: c,
94
- anchor: l,
92
+ sideOffset: i,
93
+ align: r,
94
+ alignOffset: d,
95
+ anchor: p,
95
96
  className: "isolate z-50",
96
97
  children: /* @__PURE__ */ t(
97
98
  a.Popup,
98
99
  {
99
100
  "data-slot": "combobox-content",
100
- "data-chips": !!l,
101
- className: n("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
102
- ...m
101
+ "data-chips": !!p,
102
+ className: s("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
103
+ ...l
103
104
  }
104
105
  )
105
106
  }
@@ -110,7 +111,7 @@ function P({ className: o, ...e }) {
110
111
  a.List,
111
112
  {
112
113
  "data-slot": "combobox-list",
113
- className: n(
114
+ className: s(
114
115
  "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",
115
116
  o
116
117
  ),
@@ -118,44 +119,44 @@ function P({ className: o, ...e }) {
118
119
  }
119
120
  );
120
121
  }
121
- function T({
122
+ function A({
122
123
  className: o,
123
124
  children: e,
124
- ...r
125
+ ...i
125
126
  }) {
126
- return /* @__PURE__ */ s(
127
+ return /* @__PURE__ */ n(
127
128
  a.Item,
128
129
  {
129
130
  "data-slot": "combobox-item",
130
- className: n(
131
+ className: s(
131
132
  "relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
132
133
  o
133
134
  ),
134
- ...r,
135
+ ...i,
135
136
  children: [
136
137
  e,
137
138
  /* @__PURE__ */ t(
138
139
  a.ItemIndicator,
139
140
  {
140
141
  render: /* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
141
- children: /* @__PURE__ */ t(u, { className: "pointer-events-none" })
142
+ children: /* @__PURE__ */ t(h, { className: "pointer-events-none" })
142
143
  }
143
144
  )
144
145
  ]
145
146
  }
146
147
  );
147
148
  }
148
- function A({ className: o, ...e }) {
149
+ function B({ className: o, ...e }) {
149
150
  return /* @__PURE__ */ t(
150
151
  a.Group,
151
152
  {
152
153
  "data-slot": "combobox-group",
153
- className: n(o),
154
+ className: s(o),
154
155
  ...e
155
156
  }
156
157
  );
157
158
  }
158
- function B({
159
+ function E({
159
160
  className: o,
160
161
  ...e
161
162
  }) {
@@ -163,20 +164,20 @@ function B({
163
164
  a.GroupLabel,
164
165
  {
165
166
  "data-slot": "combobox-label",
166
- className: n("px-2 py-1.5 text-xs text-muted-foreground", o),
167
+ className: s("px-2 py-1.5 text-xs text-muted-foreground", o),
167
168
  ...e
168
169
  }
169
170
  );
170
171
  }
171
- function E({ ...o }) {
172
+ function S({ ...o }) {
172
173
  return /* @__PURE__ */ t(a.Collection, { "data-slot": "combobox-collection", ...o });
173
174
  }
174
- function S({ className: o, ...e }) {
175
+ function T({ className: o, ...e }) {
175
176
  return /* @__PURE__ */ t(
176
177
  a.Empty,
177
178
  {
178
179
  "data-slot": "combobox-empty",
179
- className: n(
180
+ className: s(
180
181
  "hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
181
182
  o
182
183
  ),
@@ -193,52 +194,70 @@ function V({
193
194
  {
194
195
  "data-slot": "combobox-separator",
195
196
  "aria-hidden": "true",
196
- className: n("-mx-1 my-1 h-px bg-border", o),
197
+ className: s("-mx-1 my-1 h-px bg-border", o),
197
198
  ...e
198
199
  }
199
200
  );
200
201
  }
201
202
  function D({
202
203
  className: o,
203
- ...e
204
+ children: e,
205
+ size: i = "default",
206
+ showTrigger: r = !0,
207
+ ...d
204
208
  }) {
205
- return /* @__PURE__ */ t(
209
+ return /* @__PURE__ */ n(
206
210
  a.Chips,
207
211
  {
208
212
  "data-slot": "combobox-chips",
209
- className: n(
210
- "group/chips flex min-h-12 flex-wrap items-center gap-1 rounded-md border border-input bg-card bg-clip-padding px-4 py-1 text-sm transition-colors has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50",
213
+ "data-size": i,
214
+ className: s(
215
+ // min-height matches Select/Combobox per size (24 / 28 / 32 / 36) and
216
+ // grows as chips wrap; radius 8 at xs/sm, 10 at default/lg. `relative`
217
+ // so the toggle chevron can pin to the top-right (see below); left
218
+ // padding tightens once chips are present, right side reserves space
219
+ // for the chevron.
220
+ "group/chips relative flex flex-wrap items-center gap-1 border border-input bg-card bg-clip-padding py-1 pl-4 text-sm transition-colors data-[size=xs]:min-h-6 data-[size=xs]:rounded-md data-[size=sm]:min-h-7 data-[size=sm]:rounded-md data-[size=default]:min-h-8 data-[size=default]:rounded-lg data-[size=lg]:min-h-9 data-[size=lg]:rounded-lg has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:pl-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50",
221
+ r ? "pr-8" : "pr-4",
211
222
  o
212
223
  ),
213
- ...e
224
+ ...d,
225
+ children: [
226
+ e,
227
+ r && // Pinned to the top-right and sized to the first row, so it stays put
228
+ // (aligned with the input row) as chips wrap to multiple lines (SW-2583).
229
+ /* @__PURE__ */ t(m, { className: "absolute top-0 right-1 flex shrink-0 items-center text-muted-foreground group-data-[size=xs]/chips:h-6 group-data-[size=sm]/chips:h-7 group-data-[size=default]/chips:h-8 group-data-[size=lg]/chips:h-9" })
230
+ ]
214
231
  }
215
232
  );
216
233
  }
217
234
  function X({
218
235
  className: o,
219
236
  children: e,
220
- showRemove: r = !0,
221
- ...i
237
+ showRemove: i = !0,
238
+ ...r
222
239
  }) {
223
- return /* @__PURE__ */ s(
240
+ return /* @__PURE__ */ n(
224
241
  a.Chip,
225
242
  {
226
243
  "data-slot": "combobox-chip",
227
- className: n(
228
- "flex h-[calc(--spacing(6.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
244
+ className: s(
245
+ // Pill scales with the chips container (SW-2591): height / radius / text
246
+ // step per group size; radius is concentric with the container (4/4/6/6).
247
+ "flex w-fit items-center justify-center gap-1 bg-muted font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0 group-data-[size=xs]/chips:h-4 group-data-[size=xs]/chips:rounded-[4px] group-data-[size=xs]/chips:px-1 group-data-[size=xs]/chips:text-[10px] group-data-[size=sm]/chips:h-5 group-data-[size=sm]/chips:rounded-[4px] group-data-[size=sm]/chips:px-1.5 group-data-[size=sm]/chips:text-[11px] group-data-[size=default]/chips:h-6 group-data-[size=default]/chips:rounded-[6px] group-data-[size=default]/chips:px-1.5 group-data-[size=default]/chips:text-xs group-data-[size=lg]/chips:h-7 group-data-[size=lg]/chips:rounded-[6px] group-data-[size=lg]/chips:px-2 group-data-[size=lg]/chips:text-sm",
229
248
  o
230
249
  ),
231
- ...i,
250
+ ...r,
232
251
  children: [
233
252
  e,
234
- r && /* @__PURE__ */ t(
253
+ i && /* @__PURE__ */ t(
235
254
  a.ChipRemove,
236
255
  {
237
256
  "aria-label": "Remove",
238
257
  render: /* @__PURE__ */ t(x, { variant: "ghost", size: "icon-xs" }),
239
- className: "-ml-1 opacity-50 hover:opacity-100",
258
+ className: "-ml-1 opacity-50 hover:opacity-100 group-data-[size=xs]/chips:size-3.5 group-data-[size=xs]/chips:[&>svg]:size-2.5 group-data-[size=sm]/chips:size-4 group-data-[size=sm]/chips:[&>svg]:size-3 group-data-[size=default]/chips:size-5 group-data-[size=default]/chips:[&>svg]:size-3.5 group-data-[size=lg]/chips:size-6 group-data-[size=lg]/chips:[&>svg]:size-3.5",
240
259
  "data-slot": "combobox-chip-remove",
241
- children: /* @__PURE__ */ t(d, { className: "pointer-events-none" })
260
+ children: /* @__PURE__ */ t(c, { className: "pointer-events-none" })
242
261
  }
243
262
  )
244
263
  ]
@@ -253,7 +272,7 @@ function $({
253
272
  a.Input,
254
273
  {
255
274
  "data-slot": "combobox-chip-input",
256
- className: n(
275
+ className: s(
257
276
  "min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent",
258
277
  o
259
278
  ),
@@ -262,24 +281,24 @@ function $({
262
281
  );
263
282
  }
264
283
  function q() {
265
- return h.useRef(null);
284
+ return g.useRef(null);
266
285
  }
267
286
  export {
268
- R as Combobox,
287
+ k as Combobox,
269
288
  X as ComboboxChip,
270
289
  D as ComboboxChips,
271
290
  $ as ComboboxChipsInput,
272
- E as ComboboxCollection,
291
+ S as ComboboxCollection,
273
292
  _ as ComboboxContent,
274
- S as ComboboxEmpty,
275
- A as ComboboxGroup,
293
+ T as ComboboxEmpty,
294
+ B as ComboboxGroup,
276
295
  L as ComboboxInput,
277
- T as ComboboxItem,
278
- B as ComboboxLabel,
296
+ A as ComboboxItem,
297
+ E as ComboboxLabel,
279
298
  P as ComboboxList,
280
299
  V as ComboboxSeparator,
281
- C as ComboboxTrigger,
282
- k as ComboboxValue,
300
+ m as ComboboxTrigger,
301
+ R as ComboboxValue,
283
302
  q as useComboboxAnchor
284
303
  };
285
304
  //# sourceMappingURL=combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.js","sources":["../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { cn } from \"@/lib/utils\"\n\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n aria-label=\"Toggle options\"\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n aria-label=\"Clear\"\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n <InputGroup className={cn(\"w-auto bg-card\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n aria-hidden=\"true\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"group/chips flex min-h-12 flex-wrap items-center gap-1 rounded-md border border-input bg-card bg-clip-padding px-4 py-1 text-sm transition-colors has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(6.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n aria-label=\"Remove\"\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\n \"min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"names":["Combobox","ComboboxPrimitive","ComboboxValue","props","ComboboxTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","ComboboxClear","InputGroupButton","XIcon","ComboboxInput","disabled","showTrigger","showClear","InputGroup","InputGroupInput","InputGroupAddon","ComboboxContent","side","sideOffset","align","alignOffset","anchor","ComboboxList","ComboboxItem","CheckIcon","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxEmpty","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","Button","ComboboxChipsInput","useComboboxAnchor","React"],"mappings":";;;;;;;AAgBA,MAAMA,IAAWC,EAAkB;AAEnC,SAASC,EAAc,EAAE,GAAGC,KAAwC;AAClE,2BAAQF,EAAkB,OAAlB,EAAwB,aAAU,kBAAkB,GAAGE,GAAO;AACxE;AAEA,SAASC,EAAgB;AAAA,EACvB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGH;AACL,GAAoC;AAClC,SACE,gBAAAI;AAAA,IAACN,EAAkB;AAAA,IAAlB;AAAA,MACC,cAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAWO,EAAG,wCAAwCH,CAAS;AAAA,MAC9D,GAAGF;AAAA,MAEH,UAAA;AAAA,QAAAG;AAAA,QACD,gBAAAG,EAACC,GAAA,EAAgB,WAAU,mDAAA,CAAmD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGpF;AAEA,SAASC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,MAAA;AAAA,MAED,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASiC,EAAa;AAAA,EACpB,WAAA/B;AAAA,EACA,UAAAC;AAAA,EACA,YAAA+B,IAAa;AAAA,EACb,GAAGlC;AACL,GAEG;AACD,SACE,gBAAAI;AAAA,IAACN,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGF;AAAA,MAEH,UAAA;AAAA,QAAAG;AAAA,QACA+B,KACC,gBAAA5B;AAAA,UAACR,EAAkB;AAAA,UAAlB;AAAA,YACC,cAAW;AAAA,YACX,QAAQ,gBAAAQ,EAAC6B,GAAA,EAAO,SAAQ,SAAQ,MAAK,WAAU;AAAA,YAC/C,WAAU;AAAA,YACV,aAAU;AAAA,YAEV,UAAA,gBAAA7B,EAACI,GAAA,EAAM,WAAU,sBAAA,CAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,MACzC;AAAA,IAAA;AAAA,EAAA;AAIR;AAEA,SAAS0B,EAAmB;AAAA,EAC1B,WAAAlC;AAAA,EACA,GAAGF;AACL,GAAkC;AAChC,SACE,gBAAAM;AAAA,IAACR,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASqC,IAAoB;AAC3B,SAAOC,EAAM,OAA8B,IAAI;AACjD;"}
1
+ {"version":3,"file":"combobox.js","sources":["../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { cn } from \"@/lib/utils\"\n\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n aria-label=\"Toggle options\"\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n aria-label=\"Clear\"\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n size,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n /** Shared control scale (SW-2591): xs 24 / sm 28 / default 32 / lg 36. */\n size?: \"xs\" | \"sm\" | \"default\" | \"lg\"\n}) {\n return (\n <InputGroup size={size} className={cn(\"w-auto bg-card\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-elevation-4 ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n aria-hidden=\"true\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n children,\n size = \"default\",\n showTrigger = true,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props & {\n /** Shared control scale (SW-2591): base height + chip/remove scale via group-data. */\n size?: \"xs\" | \"sm\" | \"default\" | \"lg\"\n /** Dropdown-toggle chevron at the inline end (default `true`) — mirrors\n * `ComboboxInput` so single- and multi-select share the affordance (SW-2583). */\n showTrigger?: boolean\n }) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n data-size={size}\n className={cn(\n // min-height matches Select/Combobox per size (24 / 28 / 32 / 36) and\n // grows as chips wrap; radius 8 at xs/sm, 10 at default/lg. `relative`\n // so the toggle chevron can pin to the top-right (see below); left\n // padding tightens once chips are present, right side reserves space\n // for the chevron.\n \"group/chips relative flex flex-wrap items-center gap-1 border border-input bg-card bg-clip-padding py-1 pl-4 text-sm transition-colors data-[size=xs]:min-h-6 data-[size=xs]:rounded-md data-[size=sm]:min-h-7 data-[size=sm]:rounded-md data-[size=default]:min-h-8 data-[size=default]:rounded-lg data-[size=lg]:min-h-9 data-[size=lg]:rounded-lg has-[[data-slot=combobox-chip-input]:focus-visible]:border-ring has-[[data-slot=combobox-chip-input]:focus-visible]:shadow-focus has-aria-invalid:border-destructive has-aria-invalid:shadow-focus has-data-[slot=combobox-chip]:pl-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50\",\n showTrigger ? \"pr-8\" : \"pr-4\",\n className\n )}\n {...props}\n >\n {children}\n {showTrigger && (\n // Pinned to the top-right and sized to the first row, so it stays put\n // (aligned with the input row) as chips wrap to multiple lines (SW-2583).\n <ComboboxTrigger className=\"absolute top-0 right-1 flex shrink-0 items-center text-muted-foreground group-data-[size=xs]/chips:h-6 group-data-[size=sm]/chips:h-7 group-data-[size=default]/chips:h-8 group-data-[size=lg]/chips:h-9\" />\n )}\n </ComboboxPrimitive.Chips>\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n // Pill scales with the chips container (SW-2591): height / radius / text\n // step per group size; radius is concentric with the container (4/4/6/6).\n \"flex w-fit items-center justify-center gap-1 bg-muted font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0 group-data-[size=xs]/chips:h-4 group-data-[size=xs]/chips:rounded-[4px] group-data-[size=xs]/chips:px-1 group-data-[size=xs]/chips:text-[10px] group-data-[size=sm]/chips:h-5 group-data-[size=sm]/chips:rounded-[4px] group-data-[size=sm]/chips:px-1.5 group-data-[size=sm]/chips:text-[11px] group-data-[size=default]/chips:h-6 group-data-[size=default]/chips:rounded-[6px] group-data-[size=default]/chips:px-1.5 group-data-[size=default]/chips:text-xs group-data-[size=lg]/chips:h-7 group-data-[size=lg]/chips:rounded-[6px] group-data-[size=lg]/chips:px-2 group-data-[size=lg]/chips:text-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n aria-label=\"Remove\"\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100 group-data-[size=xs]/chips:size-3.5 group-data-[size=xs]/chips:[&>svg]:size-2.5 group-data-[size=sm]/chips:size-4 group-data-[size=sm]/chips:[&>svg]:size-3 group-data-[size=default]/chips:size-5 group-data-[size=default]/chips:[&>svg]:size-3.5 group-data-[size=lg]/chips:size-6 group-data-[size=lg]/chips:[&>svg]:size-3.5\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\n \"min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"names":["Combobox","ComboboxPrimitive","ComboboxValue","props","ComboboxTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","ComboboxClear","InputGroupButton","XIcon","ComboboxInput","disabled","showTrigger","showClear","size","InputGroup","InputGroupInput","InputGroupAddon","ComboboxContent","side","sideOffset","align","alignOffset","anchor","ComboboxList","ComboboxItem","CheckIcon","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxEmpty","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","Button","ComboboxChipsInput","useComboboxAnchor","React"],"mappings":";;;;;;;AAgBA,MAAMA,IAAWC,EAAkB;AAEnC,SAASC,EAAc,EAAE,GAAGC,KAAwC;AAClE,2BAAQF,EAAkB,OAAlB,EAAwB,aAAU,kBAAkB,GAAGE,GAAO;AACxE;AAEA,SAASC,EAAgB;AAAA,EACvB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGH;AACL,GAAoC;AAClC,SACE,gBAAAI;AAAA,IAACN,EAAkB;AAAA,IAAlB;AAAA,MACC,cAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAWO,EAAG,wCAAwCH,CAAS;AAAA,MAC9D,GAAGF;AAAA,MAEH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,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGF;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASsC,IAAoB;AAC3B,SAAOC,EAAM,OAA8B,IAAI;AACjD;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("class-variance-authority"),u=require("./button.cjs"),p=require("./input.cjs"),l=require("./textarea.cjs"),e=require("../lib/utils.cjs");function d({className:n,...t}){return r.jsx("div",{"data-slot":"input-group",role:"group",className:e.cn("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:disabled]:bg-input/50 has-[[data-slot=input-group-control]:disabled]:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:shadow-focus has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:shadow-focus has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot=input-group-control]:disabled]:bg-input/80 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),...t})}const c=s.cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function g({className:n,align:t="inline-start",...o}){return r.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:e.cn(c({align:t}),n),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),a.currentTarget.click())},onClick:a=>{a.target.closest("button")||a.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}const b=s.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function f({className:n,type:t="button",variant:o="ghost",size:a="xs",...i}){return r.jsx(u.Button,{type:t,"data-size":a,variant:o,className:e.cn(b({size:a}),n),...i})}function h({className:n,...t}){return r.jsx("span",{className:e.cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",n),...t})}function x({className:n,...t}){return r.jsx(p.Input,{"data-slot":"input-group-control",className:e.cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 focus-visible:shadow-none disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",n),...t})}function m({className:n,...t}){return r.jsx(l.Textarea,{"data-slot":"input-group-control",className:e.cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 focus-visible:shadow-none disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",n),...t})}exports.InputGroup=d;exports.InputGroupAddon=g;exports.InputGroupButton=f;exports.InputGroupInput=x;exports.InputGroupText=h;exports.InputGroupTextarea=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("class-variance-authority"),d=require("react"),p=require("./button.cjs"),c=require("./input.cjs"),g=require("./textarea.cjs"),o=require("../lib/utils.cjs");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(t,a,e.get?e:{enumerable:!0,get:()=>n[a]})}}return t.default=n,Object.freeze(t)}const i=b(d),u=i.createContext({}),f=s.cva("group/input-group relative flex w-full min-w-0 items-center border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:disabled]:bg-input/50 has-[[data-slot=input-group-control]:disabled]:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:shadow-focus has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:shadow-focus has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot=input-group-control]:disabled]:bg-input/80 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",{variants:{size:{xs:"h-6 rounded-md",sm:"h-7 rounded-md",default:"h-8 rounded-lg",lg:"h-9 rounded-lg"}},defaultVariants:{size:"default"}});function x({className:n,size:t,...a}){return r.jsx(u.Provider,{value:{size:t??"default"},children:r.jsx("div",{"data-slot":"input-group","data-size":t??"default",role:"group",className:o.cn(f({size:t}),n),...a})})}const h=s.cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function m({className:n,align:t="inline-start",...a}){return r.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:o.cn(h({align:t}),n),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.currentTarget.click())},onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const v=s.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function k({className:n,type:t="button",variant:a="ghost",size:e="xs",...l}){return r.jsx(p.Button,{type:t,"data-size":e,variant:a,className:o.cn(v({size:e}),n),...l})}function z({className:n,...t}){return r.jsx("span",{className:o.cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",n),...t})}function y({className:n,size:t,...a}){const e=i.useContext(u);return r.jsx(c.Input,{"data-slot":"input-group-control",size:t??e.size,className:o.cn("h-full flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 focus-visible:shadow-none disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",n),...a})}function j({className:n,size:t,...a}){const e=i.useContext(u);return r.jsx(g.Textarea,{"data-slot":"input-group-control",size:t??e.size,className:o.cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 focus-visible:shadow-none disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",n),...a})}exports.InputGroup=x;exports.InputGroupAddon=m;exports.InputGroupButton=k;exports.InputGroupInput=y;exports.InputGroupText=z;exports.InputGroupTextarea=j;
2
2
  //# sourceMappingURL=input-group.cjs.map