@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.31.1 → 0.5.0-beta.33.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.
- package/dist/components/ui/combobox.cjs +1 -1
- package/dist/components/ui/combobox.cjs.map +1 -1
- package/dist/components/ui/combobox.js +19 -16
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/select.cjs +1 -1
- package/dist/components/ui/select.cjs.map +1 -1
- package/dist/components/ui/select.js +2 -2
- package/dist/components/ui/select.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.tailwind.css +1 -1
- 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"),n=require("@base-ui/react"),b=require("lucide-react"),m=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=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 a in o)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(o,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>o[a]})}}return e.default=o,Object.freeze(e)}const h=x(m),g=n.Combobox.Root;function C({...o}){return t.jsx(n.Combobox.Value,{"data-slot":"combobox-value",...o})}function d({className:o,children:e,...a}){return t.jsxs(n.Combobox.Trigger,{"data-slot":"combobox-trigger",className:r.cn("[&_svg:not([class*='size-'])]:size-4",o),...a,children:[e,t.jsx(b.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})]})}function f({className:o,...e}){return t.jsx(n.Combobox.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:a=!1,showTrigger:s=!0,showClear:l=!1,...c}){return t.jsxs(i.InputGroup,{className:r.cn("w-auto",o),children:[t.jsx(n.Combobox.Input,{render:t.jsx(i.InputGroupInput,{disabled:a}),...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:a,children:t.jsx(d,{})}),l&&t.jsx(f,{disabled:a})]}),e]})}function j({className:o,side:e="bottom",sideOffset:a=6,align:s="start",alignOffset:l=0,anchor:c,...u}){return t.jsx(n.Combobox.Portal,{children:t.jsx(n.Combobox.Positioner,{side:e,sideOffset:a,align:s,alignOffset:l,anchor:c,className:"isolate z-50",children:t.jsx(n.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-md 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(n.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,...a}){return t.jsxs(n.Combobox.Item,{"data-slot":"combobox-item",className:r.cn("relative flex w-full cursor-default items-center gap-2 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),...a,children:[e,t.jsx(n.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(n.Combobox.Group,{"data-slot":"combobox-group",className:r.cn(o),...e})}function I({className:o,...e}){return t.jsx(n.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(n.Combobox.Collection,{"data-slot":"combobox-collection",...o})}function G({className:o,...e}){return t.jsx(n.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 q({className:o,...e}){return t.jsx(n.Combobox.Separator,{"data-slot":"combobox-separator",className:r.cn("-mx-1 my-1 h-px bg-border",o),...e})}function R({className:o,...e}){return t.jsx(n.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-transparent bg-clip-padding px-4 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",o),...e})}function S({className:o,children:e,showRemove:a=!0,...s}){return t.jsxs(n.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,a&&t.jsx(n.Combobox.ChipRemove,{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 _({className:o,...e}){return t.jsx(n.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 k(){return h.useRef(null)}exports.Combobox=g;exports.ComboboxChip=S;exports.ComboboxChips=R;exports.ComboboxChipsInput=_;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=q;exports.ComboboxTrigger=d;exports.ComboboxValue=C;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 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 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\", 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-md 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-2 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 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 \"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\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(5.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 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(\"min-w-16 flex-1 outline-none\", className)}\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":"kjBAgBMA,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,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,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,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ACV,UAAWO,EAAAA,GAAG,4BAA6BH,CAAS,EACnD,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASgC,EAAc,CACrB,UAAA9B,EACA,GAAGF,CACL,EACiC,CAC/B,OACEM,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,kcACAH,CAAA,EAED,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASiC,EAAa,CACpB,UAAA/B,EACA,SAAAC,EACA,WAAA+B,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,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,GAAG,+BAAgCH,CAAS,EACtD,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 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 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\", 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-md 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-2 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 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-transparent bg-clip-padding px-4 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\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 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":"kjBAgBMA,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,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,YAAU,iBACV,OAAQQ,EAAAA,IAACG,mBAAA,CAAiB,QAAQ,QAAQ,KAAK,UAAU,EACzD,UAAWJ,EAAAA,GAAGH,CAAS,EACtB,GAAGF,EAEJ,SAAAM,EAAAA,IAACI,EAA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CACzB,UAAA7B,EACA,GAAGF,CACL,EAAsC,CACpC,OACEM,EAAAA,IAACR,EAAAA,SAAkB,UAAlB,CACC,YAAU,qBACV,UAAWO,EAAAA,GAAG,4BAA6BH,CAAS,EACnD,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASgC,EAAc,CACrB,UAAA9B,EACA,GAAGF,CACL,EACiC,CAC/B,OACEM,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,6cACAH,CAAA,EAED,GAAGF,CAAA,CAAA,CAGV,CAEA,SAASiC,EAAa,CACpB,UAAA/B,EACA,SAAAC,EACA,WAAA+B,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,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,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Combobox as a } from "@base-ui/react";
|
|
3
|
-
import { XIcon as
|
|
3
|
+
import { XIcon as l, CheckIcon as u, ChevronDownIcon as b } from "lucide-react";
|
|
4
4
|
import * as h from "react";
|
|
5
5
|
import { Button as g } from "./button.js";
|
|
6
|
-
import { InputGroup as x, InputGroupInput as f, InputGroupAddon as v, InputGroupButton as
|
|
6
|
+
import { InputGroup as x, InputGroupInput as f, InputGroupAddon as v, InputGroupButton as p } from "./input-group.js";
|
|
7
7
|
import { cn as n } from "../../lib/utils.js";
|
|
8
8
|
const k = a.Root;
|
|
9
9
|
function L({ ...o }) {
|
|
@@ -32,10 +32,10 @@ function w({ className: o, ...e }) {
|
|
|
32
32
|
a.Clear,
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "combobox-clear",
|
|
35
|
-
render: /* @__PURE__ */ t(
|
|
35
|
+
render: /* @__PURE__ */ t(p, { variant: "ghost", size: "icon-xs" }),
|
|
36
36
|
className: n(o),
|
|
37
37
|
...e,
|
|
38
|
-
children: /* @__PURE__ */ t(
|
|
38
|
+
children: /* @__PURE__ */ t(l, { className: "pointer-events-none" })
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
@@ -44,7 +44,7 @@ function R({
|
|
|
44
44
|
children: e,
|
|
45
45
|
disabled: r = !1,
|
|
46
46
|
showTrigger: i = !0,
|
|
47
|
-
showClear:
|
|
47
|
+
showClear: c = !1,
|
|
48
48
|
...d
|
|
49
49
|
}) {
|
|
50
50
|
return /* @__PURE__ */ s(x, { className: n("w-auto", o), children: [
|
|
@@ -57,7 +57,7 @@ function R({
|
|
|
57
57
|
),
|
|
58
58
|
/* @__PURE__ */ s(v, { align: "inline-end", children: [
|
|
59
59
|
i && /* @__PURE__ */ t(
|
|
60
|
-
|
|
60
|
+
p,
|
|
61
61
|
{
|
|
62
62
|
size: "icon-xs",
|
|
63
63
|
variant: "ghost",
|
|
@@ -68,7 +68,7 @@ function R({
|
|
|
68
68
|
children: /* @__PURE__ */ t(C, {})
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
|
|
71
|
+
c && /* @__PURE__ */ t(w, { disabled: r })
|
|
72
72
|
] }),
|
|
73
73
|
e
|
|
74
74
|
] });
|
|
@@ -78,9 +78,9 @@ function _({
|
|
|
78
78
|
side: e = "bottom",
|
|
79
79
|
sideOffset: r = 6,
|
|
80
80
|
align: i = "start",
|
|
81
|
-
alignOffset:
|
|
81
|
+
alignOffset: c = 0,
|
|
82
82
|
anchor: d,
|
|
83
|
-
...
|
|
83
|
+
...m
|
|
84
84
|
}) {
|
|
85
85
|
return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
|
|
86
86
|
a.Positioner,
|
|
@@ -88,7 +88,7 @@ function _({
|
|
|
88
88
|
side: e,
|
|
89
89
|
sideOffset: r,
|
|
90
90
|
align: i,
|
|
91
|
-
alignOffset:
|
|
91
|
+
alignOffset: c,
|
|
92
92
|
anchor: d,
|
|
93
93
|
className: "isolate z-50",
|
|
94
94
|
children: /* @__PURE__ */ t(
|
|
@@ -97,7 +97,7 @@ function _({
|
|
|
97
97
|
"data-slot": "combobox-content",
|
|
98
98
|
"data-chips": !!d,
|
|
99
99
|
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-md 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),
|
|
100
|
-
...
|
|
100
|
+
...m
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
103
|
}
|
|
@@ -136,7 +136,7 @@ function A({
|
|
|
136
136
|
a.ItemIndicator,
|
|
137
137
|
{
|
|
138
138
|
render: /* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
139
|
-
children: /* @__PURE__ */ t(
|
|
139
|
+
children: /* @__PURE__ */ t(u, { className: "pointer-events-none" })
|
|
140
140
|
}
|
|
141
141
|
)
|
|
142
142
|
]
|
|
@@ -204,7 +204,7 @@ function D({
|
|
|
204
204
|
{
|
|
205
205
|
"data-slot": "combobox-chips",
|
|
206
206
|
className: n(
|
|
207
|
-
"flex min-h-
|
|
207
|
+
"group/chips flex min-h-12 flex-wrap items-center gap-1 rounded-md border border-input bg-transparent bg-clip-padding px-4 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
|
|
208
208
|
o
|
|
209
209
|
),
|
|
210
210
|
...e
|
|
@@ -222,7 +222,7 @@ function X({
|
|
|
222
222
|
{
|
|
223
223
|
"data-slot": "combobox-chip",
|
|
224
224
|
className: n(
|
|
225
|
-
"flex h-[calc(--spacing(
|
|
225
|
+
"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",
|
|
226
226
|
o
|
|
227
227
|
),
|
|
228
228
|
...i,
|
|
@@ -234,7 +234,7 @@ function X({
|
|
|
234
234
|
render: /* @__PURE__ */ t(g, { variant: "ghost", size: "icon-xs" }),
|
|
235
235
|
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
236
236
|
"data-slot": "combobox-chip-remove",
|
|
237
|
-
children: /* @__PURE__ */ t(
|
|
237
|
+
children: /* @__PURE__ */ t(l, { className: "pointer-events-none" })
|
|
238
238
|
}
|
|
239
239
|
)
|
|
240
240
|
]
|
|
@@ -249,7 +249,10 @@ function $({
|
|
|
249
249
|
a.Input,
|
|
250
250
|
{
|
|
251
251
|
"data-slot": "combobox-chip-input",
|
|
252
|
-
className: n(
|
|
252
|
+
className: n(
|
|
253
|
+
"min-w-16 flex-1 outline-none group-has-data-[slot=combobox-chip]/chips:placeholder:text-transparent",
|
|
254
|
+
o
|
|
255
|
+
),
|
|
253
256
|
...e
|
|
254
257
|
}
|
|
255
258
|
);
|
|
@@ -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 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 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\", 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-md 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-2 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 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 \"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\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(5.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 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(\"min-w-16 flex-1 outline-none\", className)}\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,EA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AWO,EAAG,gCAAgCH,CAAS;AAAA,MACtD,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 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 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\", 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-md 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-2 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 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-transparent bg-clip-padding px-4 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\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 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,aAA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Ac;AAAA,EACrB,WAAA9B;AAAA,EACA,GAAGF;AACL,GACiC;AAC/B,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,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,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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("lucide-react"),n=require("radix-ui"),s=require("../../lib/utils.cjs");function u({...t}){return e.jsx(n.Select.Root,{"data-slot":"select",...t})}function p({className:t,...a}){return e.jsx(n.Select.Group,{"data-slot":"select-group",className:s.cn("scroll-my-1 p-1",t),...a})}function g({...t}){return e.jsx(n.Select.Value,{"data-slot":"select-value",...t})}function m({className:t,size:a="default",children:r,...o}){return e.jsxs(n.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:s.cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("lucide-react"),n=require("radix-ui"),s=require("../../lib/utils.cjs");function u({...t}){return e.jsx(n.Select.Root,{"data-slot":"select",...t})}function p({className:t,...a}){return e.jsx(n.Select.Group,{"data-slot":"select-group",className:s.cn("scroll-my-1 p-1",t),...a})}function g({...t}){return e.jsx(n.Select.Value,{"data-slot":"select-value",...t})}function m({className:t,size:a="default",children:r,...o}){return e.jsxs(n.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:s.cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...o,children:[r,e.jsx(n.Select.Icon,{asChild:!0,children:e.jsx(l.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function f({className:t,children:a,position:r="item-aligned",align:o="center",...d}){return e.jsx(n.Select.Portal,{children:e.jsxs(n.Select.Content,{"data-slot":"select-content","data-align-trigger":r==="item-aligned",className:s.cn("relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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-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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:o,...d,children:[e.jsx(i,{}),e.jsx(n.Select.Viewport,{"data-position":r,className:s.cn("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",r==="popper"&&""),children:a}),e.jsx(c,{})]})})}function x({className:t,...a}){return e.jsx(n.Select.Label,{"data-slot":"select-label",className:s.cn("px-1.5 py-1 text-xs text-muted-foreground",t),...a})}function v({className:t,children:a,...r}){return e.jsxs(n.Select.Item,{"data-slot":"select-item",className:s.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 focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[e.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:e.jsx(n.Select.ItemIndicator,{children:e.jsx(l.CheckIcon,{className:"pointer-events-none"})})}),e.jsx(n.Select.ItemText,{children:a})]})}function S({className:t,...a}){return e.jsx(n.Select.Separator,{"data-slot":"select-separator",className:s.cn("pointer-events-none -mx-1 my-1 h-px bg-border",t),...a})}function i({className:t,...a}){return e.jsx(n.Select.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:s.cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e.jsx(l.ChevronUpIcon,{})})}function c({className:t,...a}){return e.jsx(n.Select.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:s.cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e.jsx(l.ChevronDownIcon,{})})}exports.Select=u;exports.SelectContent=f;exports.SelectGroup=p;exports.SelectItem=v;exports.SelectLabel=x;exports.SelectScrollDownButton=c;exports.SelectScrollUpButton=i;exports.SelectSeparator=S;exports.SelectTrigger=m;exports.SelectValue=g;
|
|
2
2
|
//# sourceMappingURL=select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.cjs","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent
|
|
1
|
+
{"version":3,"file":"select.cjs","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\"relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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-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\", position ===\"popper\"&&\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\", className )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-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 focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"],"names":["Select","props","SelectPrimitive","SelectGroup","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":"sMASA,SAASA,EAAO,CACd,GAAGC,CACL,EAAsD,CACpD,aAAQC,EAAAA,OAAgB,KAAhB,CAAqB,YAAU,SAAU,GAAGD,EAAO,CAC7D,CAEA,SAASE,EAAY,CACnB,UAAAC,EACA,GAAGH,CACL,EAAuD,CACrD,OACEI,EAAAA,IAACH,EAAAA,OAAgB,MAAhB,CACC,YAAU,eACV,UAAWI,EAAAA,GAAG,kBAAmBF,CAAS,EACzC,GAAGH,CAAA,CAAA,CAGV,CAEA,SAASM,EAAY,CACnB,GAAGN,CACL,EAAuD,CACrD,aAAQC,EAAAA,OAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASO,EAAc,CACrB,UAAAJ,EACA,KAAAK,EAAO,UACP,SAAAC,EACA,GAAGT,CACL,EAEG,CACD,OACEU,EAAAA,KAACT,EAAAA,OAAgB,QAAhB,CACC,YAAU,iBACV,YAAWO,EACX,UAAWH,EAAAA,GACT,k2BACAF,CAAA,EAED,GAAGH,EAEH,SAAA,CAAAS,EACDL,EAA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AAsB,CAAA,CAC7C,EACF,EACAf,EAAAA,IAACH,EAAAA,OAAgB,SAAhB,CAA0B,SAAAQ,CAAA,CAAS,CAAA,CAAA,CAAA,CAG1C,CAEA,SAASW,EAAgB,CACvB,UAAAjB,EACA,GAAGH,CACL,EAA2D,CACzD,OACEI,EAAAA,IAACH,EAAAA,OAAgB,UAAhB,CACC,YAAU,mBACV,UAAWI,EAAAA,GAAG,gDAAiDF,CAAS,EACvE,GAAGH,CAAA,CAAA,CAGV,CAEA,SAASe,EAAqB,CAC5B,UAAAZ,EACA,GAAGH,CACL,EAAgE,CAC9D,OACEI,EAAAA,IAACH,EAAAA,OAAgB,eAAhB,CACC,YAAU,0BACV,UAAWI,EAAAA,GACT,4GACAF,CAAA,EAED,GAAGH,EAEJ,SAAAI,EAAAA,IAACiB,EAAAA,cAAA,CAAA,CAAA,CACD,CAAA,CAGN,CAEA,SAASL,EAAuB,CAC9B,UAAAb,EACA,GAAGH,CACL,EAAkE,CAChE,OACEI,EAAAA,IAACH,EAAAA,OAAgB,iBAAhB,CACC,YAAU,4BACV,UAAWI,EAAAA,GACT,4GACAF,CAAA,EAED,GAAGH,EAEJ,SAAAI,EAAAA,IAACO,EAAAA,gBAAA,CAAA,CAAA,CACD,CAAA,CAGN"}
|
|
@@ -37,7 +37,7 @@ function w({
|
|
|
37
37
|
"data-slot": "select-trigger",
|
|
38
38
|
"data-size": a,
|
|
39
39
|
className: o(
|
|
40
|
-
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent
|
|
40
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
41
41
|
e
|
|
42
42
|
),
|
|
43
43
|
...s,
|
|
@@ -60,7 +60,7 @@ function S({
|
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "select-content",
|
|
62
62
|
"data-align-trigger": n === "item-aligned",
|
|
63
|
-
className: o("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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-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", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
63
|
+
className: o("relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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-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", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
64
64
|
position: n,
|
|
65
65
|
align: s,
|
|
66
66
|
...d,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\"relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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-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\", position ===\"popper\"&&\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\", className )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-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 focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"],"names":["Select","props","SelectPrimitive","SelectGroup","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AASA,SAASA,EAAO;AAAA,EACd,GAAGC;AACL,GAAsD;AACpD,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACnB,WAAAC;AAAA,EACA,GAAGH;AACL,GAAuD;AACrD,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI,EAAG,mBAAmBF,CAAS;AAAA,MACzC,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASM,EAAY;AAAA,EACnB,GAAGN;AACL,GAAuD;AACrD,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASO,EAAc;AAAA,EACrB,WAAAJ;AAAA,EACA,MAAAK,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,GAAGT;AACL,GAEG;AACD,SACE,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,aAAWO;AAAA,MACX,WAAWH;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEH,UAAA;AAAA,QAAAS;AAAA,QACD,gBAAAL,EAACH,EAAgB,MAAhB,EAAqB,SAAO,IAC3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ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\"relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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-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\", position ===\"popper\"&&\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\", className )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-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 focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"],"names":["Select","props","SelectPrimitive","SelectGroup","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AASA,SAASA,EAAO;AAAA,EACd,GAAGC;AACL,GAAsD;AACpD,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACnB,WAAAC;AAAA,EACA,GAAGH;AACL,GAAuD;AACrD,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI,EAAG,mBAAmBF,CAAS;AAAA,MACzC,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASM,EAAY;AAAA,EACnB,GAAGN;AACL,GAAuD;AACrD,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASO,EAAc;AAAA,EACrB,WAAAJ;AAAA,EACA,MAAAK,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,GAAGT;AACL,GAEG;AACD,SACE,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,aAAWO;AAAA,MACX,WAAWH;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEH,UAAA;AAAA,QAAAS;AAAA,QACD,gBAAAL,EAACH,EAAgB,MAAhB,EAAqB,SAAO,IAC3B,UAAA,gBAAAG,EAACO,GAAA,EAAgB,WAAU,mDAAA,CAAmD,EAAA,CAChF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASC,EAAc;AAAA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