@tetrascience-npm/tetrascience-react-ui 0.6.0-beta.87.1 → 0.6.0-beta.88.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/accordion.cjs +1 -1
- package/dist/components/ui/accordion.cjs.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/combobox.cjs +1 -1
- package/dist/components/ui/combobox.cjs.map +1 -1
- package/dist/components/ui/combobox.js +12 -12
- 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 +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/slider.cjs +1 -1
- package/dist/components/ui/slider.cjs.map +1 -1
- package/dist/components/ui/slider.js +9 -9
- package/dist/components/ui/slider.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 o=require("react/jsx-runtime"),c=require("lucide-react"),r=require("radix-ui"),t=require("../../lib/utils.cjs");function a({className:e,...n}){return o.jsx(r.Accordion.Root,{"data-slot":"accordion",className:t.cn("flex w-full flex-col",e),...n})}function d({className:e,...n}){return o.jsx(r.Accordion.Item,{"data-slot":"accordion-item",className:t.cn("not-last:border-b",e),...n})}function s({className:e,children:n,...i}){return o.jsx(r.Accordion.Header,{className:"flex",children:o.jsxs(r.Accordion.Trigger,{"data-slot":"accordion-trigger",className:t.cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("lucide-react"),r=require("radix-ui"),t=require("../../lib/utils.cjs");function a({className:e,...n}){return o.jsx(r.Accordion.Root,{"data-slot":"accordion",className:t.cn("flex w-full flex-col",e),...n})}function d({className:e,...n}){return o.jsx(r.Accordion.Item,{"data-slot":"accordion-item",className:t.cn("not-last:border-b",e),...n})}function s({className:e,children:n,...i}){return o.jsx(r.Accordion.Header,{className:"flex",children:o.jsxs(r.Accordion.Trigger,{"data-slot":"accordion-trigger",className:t.cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",e),...i,children:[n,o.jsx(c.ChevronDownIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),o.jsx(c.ChevronUpIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function l({className:e,children:n,...i}){return o.jsx(r.Accordion.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",...i,children:o.jsx("div",{className:t.cn("h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),children:n})})}exports.Accordion=a;exports.AccordionContent=l;exports.AccordionItem=d;exports.AccordionTrigger=s;
|
|
2
2
|
//# sourceMappingURL=accordion.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.cjs","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Accordion({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"flex w-full flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"not-last:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus
|
|
1
|
+
{"version":3,"file":"accordion.cjs","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Accordion({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"flex w-full flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"not-last:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon data-slot=\"accordion-trigger-icon\" className=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\" />\n <ChevronUpIcon data-slot=\"accordion-trigger-icon\" className=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up\"\n {...props}\n >\n <div\n className={cn(\n \"h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className\n )}\n >\n {children}\n </div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"names":["Accordion","className","props","jsx","AccordionPrimitive","cn","AccordionItem","AccordionTrigger","children","jsxs","ChevronDownIcon","ChevronUpIcon","AccordionContent"],"mappings":"sMAOA,SAASA,EAAU,CACjB,UAAAC,EACA,GAAGC,CACL,EAAyD,CACvD,OACEC,EAAAA,IAACC,EAAAA,UAAmB,KAAnB,CACC,YAAU,YACV,UAAWC,EAAAA,GAAG,uBAAwBJ,CAAS,EAC9C,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASI,EAAc,CACrB,UAAAL,EACA,GAAGC,CACL,EAAyD,CACvD,OACEC,EAAAA,IAACC,EAAAA,UAAmB,KAAnB,CACC,YAAU,iBACV,UAAWC,EAAAA,GAAG,oBAAqBJ,CAAS,EAC3C,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASK,EAAiB,CACxB,UAAAN,EACA,SAAAO,EACA,GAAGN,CACL,EAA4D,CAC1D,OACEC,EAAAA,IAACC,EAAAA,UAAmB,OAAnB,CAA0B,UAAU,OACnC,SAAAK,EAAAA,KAACL,EAAAA,UAAmB,QAAnB,CACC,YAAU,oBACV,UAAWC,EAAAA,GACT,8bACAJ,CAAA,EAED,GAAGC,EAEH,SAAA,CAAAM,EACDL,EAAAA,IAACO,EAAAA,gBAAA,CAAgB,YAAU,yBAAyB,UAAU,4EAA4E,EAC1IP,EAAAA,IAACQ,EAAAA,cAAA,CAAc,YAAU,yBAAyB,UAAU,kFAAA,CAAmF,CAAA,CAAA,CAAA,EAEnJ,CAEJ,CAEA,SAASC,EAAiB,CACxB,UAAAX,EACA,SAAAO,EACA,GAAGN,CACL,EAA4D,CAC1D,OACEC,EAAAA,IAACC,EAAAA,UAAmB,QAAnB,CACC,YAAU,oBACV,UAAU,4FACT,GAAGF,EAEJ,SAAAC,EAAAA,IAAC,MAAA,CACC,UAAWE,EAAAA,GACT,oJACAJ,CAAA,EAGD,SAAAO,CAAA,CAAA,CACH,CAAA,CAGN"}
|
|
@@ -38,7 +38,7 @@ function p({
|
|
|
38
38
|
{
|
|
39
39
|
"data-slot": "accordion-trigger",
|
|
40
40
|
className: t(
|
|
41
|
-
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus
|
|
41
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
42
42
|
o
|
|
43
43
|
),
|
|
44
44
|
...i,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Accordion({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"flex w-full flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"not-last:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus
|
|
1
|
+
{"version":3,"file":"accordion.js","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Accordion({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"flex w-full flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"not-last:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon data-slot=\"accordion-trigger-icon\" className=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\" />\n <ChevronUpIcon data-slot=\"accordion-trigger-icon\" className=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up\"\n {...props}\n >\n <div\n className={cn(\n \"h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className\n )}\n >\n {children}\n </div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"names":["Accordion","className","props","jsx","AccordionPrimitive","cn","AccordionItem","AccordionTrig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AAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWE;AAAA,YACT;AAAA,YACAJ;AAAA,UAAA;AAAA,UAGD,UAAAO;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;"}
|
|
@@ -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"),p=require("./button.cjs"),i=require("./input-group.cjs"),
|
|
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"),s=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 r=Object.getOwnPropertyDescriptor(o,a);Object.defineProperty(e,a,r.get?r:{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:s.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:s.cn(o),...e,children:t.jsx(b.XIcon,{className:"pointer-events-none"})})}function v({className:o,children:e,disabled:a=!1,showTrigger:r=!0,showClear:l=!1,...c}){return t.jsxs(i.InputGroup,{className:s.cn("w-auto bg-card",o),children:[t.jsx(n.Combobox.Input,{render:t.jsx(i.InputGroupInput,{disabled:a}),...c}),t.jsxs(i.InputGroupAddon,{align:"inline-end",children:[r&&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:r="start",alignOffset:l=0,anchor:c,...u}){return t.jsx(n.Combobox.Portal,{children:t.jsx(n.Combobox.Positioner,{side:e,sideOffset:a,align:r,alignOffset:l,anchor:c,className:"isolate z-50",children:t.jsx(n.Combobox.Popup,{"data-slot":"combobox-content","data-chips":!!c,className:s.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:s.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: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 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:s.cn(o),...e})}function I({className:o,...e}){return t.jsx(n.Combobox.GroupLabel,{"data-slot":"combobox-label",className:s.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:s.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:s.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:s.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 S({className:o,children:e,showRemove:a=!0,...r}){return t.jsxs(n.Combobox.Chip,{"data-slot":"combobox-chip",className:s.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),...r,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:s.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=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=L;
|
|
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 \"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: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 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,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,SAAUH,CAAS,EAC3C,SAAA,CAAAI,EAAAA,IAACR,EAAAA,SAAkB,MAAlB,CACC,OAAQQ,EAAAA,IAACU,kBAAA,CAAgB,SAAAJ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AA,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
|
+
{"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 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-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-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 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 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,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,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AAAA,SAAkB,MAAlB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,ubACAH,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"}
|
|
@@ -44,15 +44,15 @@ function R({
|
|
|
44
44
|
children: e,
|
|
45
45
|
disabled: r = !1,
|
|
46
46
|
showTrigger: i = !0,
|
|
47
|
-
showClear:
|
|
48
|
-
...
|
|
47
|
+
showClear: d = !1,
|
|
48
|
+
...c
|
|
49
49
|
}) {
|
|
50
|
-
return /* @__PURE__ */ s(g, { className: n("w-auto", o), children: [
|
|
50
|
+
return /* @__PURE__ */ s(g, { className: n("w-auto bg-card", o), children: [
|
|
51
51
|
/* @__PURE__ */ t(
|
|
52
52
|
a.Input,
|
|
53
53
|
{
|
|
54
54
|
render: /* @__PURE__ */ t(f, { disabled: r }),
|
|
55
|
-
...
|
|
55
|
+
...c
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
/* @__PURE__ */ s(v, { align: "inline-end", children: [
|
|
@@ -68,7 +68,7 @@ function R({
|
|
|
68
68
|
children: /* @__PURE__ */ t(C, {})
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
|
|
71
|
+
d && /* @__PURE__ */ t(w, { disabled: r })
|
|
72
72
|
] }),
|
|
73
73
|
e
|
|
74
74
|
] });
|
|
@@ -78,8 +78,8 @@ function _({
|
|
|
78
78
|
side: e = "bottom",
|
|
79
79
|
sideOffset: r = 6,
|
|
80
80
|
align: i = "start",
|
|
81
|
-
alignOffset:
|
|
82
|
-
anchor:
|
|
81
|
+
alignOffset: d = 0,
|
|
82
|
+
anchor: c,
|
|
83
83
|
...m
|
|
84
84
|
}) {
|
|
85
85
|
return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
|
|
@@ -88,14 +88,14 @@ function _({
|
|
|
88
88
|
side: e,
|
|
89
89
|
sideOffset: r,
|
|
90
90
|
align: i,
|
|
91
|
-
alignOffset:
|
|
92
|
-
anchor:
|
|
91
|
+
alignOffset: d,
|
|
92
|
+
anchor: c,
|
|
93
93
|
className: "isolate z-50",
|
|
94
94
|
children: /* @__PURE__ */ t(
|
|
95
95
|
a.Popup,
|
|
96
96
|
{
|
|
97
97
|
"data-slot": "combobox-content",
|
|
98
|
-
"data-chips": !!
|
|
98
|
+
"data-chips": !!c,
|
|
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
|
}
|
|
@@ -126,7 +126,7 @@ function A({
|
|
|
126
126
|
{
|
|
127
127
|
"data-slot": "combobox-item",
|
|
128
128
|
className: n(
|
|
129
|
-
"relative flex w-full cursor-default items-center gap-
|
|
129
|
+
"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",
|
|
130
130
|
o
|
|
131
131
|
),
|
|
132
132
|
...r,
|
|
@@ -204,7 +204,7 @@ function D({
|
|
|
204
204
|
{
|
|
205
205
|
"data-slot": "combobox-chips",
|
|
206
206
|
className: n(
|
|
207
|
-
"group/chips flex min-h-12 flex-wrap items-center gap-1 rounded-md border border-input bg-
|
|
207
|
+
"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",
|
|
208
208
|
o
|
|
209
209
|
),
|
|
210
210
|
...e
|
|
@@ -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 \"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: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 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,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,EAAc,EAAE,WAAAN,GAAW,GAAGF,KAAwC;AAC7E,SACE,gBAAAM;AAAA,IAACR,EA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AAA,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
|
+
{"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 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-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-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 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 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,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,EAAc,EAAE,WAAAN,GAAW,GAAGF,KAAwC;AAC7E,SACE,gBAAAM;AAAA,IAACR,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,QAAQ,gBAAAQ,EAACG,GAAA,EAAiB,SAAQ,SAAQ,MAAK,WAAU;AAAA,MACzD,WAAWJ,EAAGH,CAAS;AAAA,MACtB,GAAGF;AAAA,MAEJ,UAAA,gBAAAM,EAACI,GAAA,EAAM,WAAU,sBAAA,CAAsB;AAAA,IAAA;AAAA,EAAA;AAG7C;A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AACR,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"),r=require("lucide-react"),n=require("radix-ui"),o=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:o.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:s,...l}){return e.jsxs(n.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:o.cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("lucide-react"),n=require("radix-ui"),o=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:o.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:s,...l}){return e.jsxs(n.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:o.cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l,children:[s,e.jsx(n.Select.Icon,{asChild:!0,children:e.jsx(r.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function f({className:t,children:a,position:s="item-aligned",align:l="center",...d}){return e.jsx(n.Select.Portal,{children:e.jsxs(n.Select.Content,{"data-slot":"select-content","data-align-trigger":s==="item-aligned",className:o.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",s==="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:s,align:l,...d,children:[e.jsx(c,{}),e.jsx(n.Select.Viewport,{"data-position":s,className:o.cn("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",s==="popper"&&""),children:a}),e.jsx(i,{})]})})}function x({className:t,...a}){return e.jsx(n.Select.Label,{"data-slot":"select-label",className:o.cn("px-1.5 py-1 text-xs text-muted-foreground",t),...a})}function S({className:t,children:a,...s}){return e.jsxs(n.Select.Item,{"data-slot":"select-item",className:o.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),...s,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(r.CheckIcon,{className:"pointer-events-none"})})}),e.jsx(n.Select.ItemText,{children:a})]})}function v({className:t,...a}){return e.jsx(n.Select.Separator,{"data-slot":"select-separator",className:o.cn("pointer-events-none -mx-1 my-1 h-px bg-border",t),...a})}function c({className:t,...a}){return e.jsx(n.Select.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:o.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(r.ChevronUpIcon,{})})}function i({className:t,...a}){return e.jsx(n.Select.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:o.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(r.ChevronDownIcon,{})})}exports.Select=u;exports.SelectContent=f;exports.SelectGroup=p;exports.SelectItem=S;exports.SelectLabel=x;exports.SelectScrollDownButton=i;exports.SelectScrollUpButton=c;exports.SelectSeparator=v;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-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-
|
|
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-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus 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 [&_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,owBACAF,CAAA,EAED,GAAGH,EAEH,SAAA,CAAAS,EACDL,EAAAA,IAACH,EAAAA,OAAgB,KAAhB,CAAqB,QAAO,GAC3B,SAAAG,EAAAA,IAACO,EAAAA,gBAAA,CAAgB,UAAU,kDAAA,CAAmD,CAAA,CAChF,CAAA,CAAA,CAAA,CAGN,CAEA,SAASC,EAAc,CACrB,UAAAT,EACA,SAAAM,EACA,SAAAI,EAAW,eACX,MAAAC,EAAQ,SACR,GAAGd,CACL,EAAyD,CACvD,OACEI,EAAAA,IAACH,EAAAA,OAAgB,OAAhB,CACC,SAAAS,EAAAA,KAACT,EAAAA,OAAgB,QAAhB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AAGH,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 z({
|
|
|
37
37
|
"data-slot": "select-trigger",
|
|
38
38
|
"data-size": a,
|
|
39
39
|
className: n(
|
|
40
|
-
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-
|
|
40
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
41
41
|
e
|
|
42
42
|
),
|
|
43
43
|
...s,
|
|
@@ -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-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus 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 [&_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,EA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EAAK,WAAU,gFACd,UAAA,gBAAAA,EAACH,EAAgB,eAAhB,EACC,UAAA,gBAAAG,EAACe,GAAA,EAAU,WAAU,sBAAA,CAAsB,EAAA,CAC7C,GACF;AAAA,QACA,gBAAAf,EAACH,EAAgB,UAAhB,EAA0B,UAAAQ,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;AAEA,SAASW,EAAgB;AAAA,EACvB,WAAAjB;AAAA,EACA,GAAGH;AACL,GAA2D;AACzD,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI,EAAG,iDAAiDF,CAAS;AAAA,MACvE,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASe,EAAqB;AAAA,EAC5B,WAAAZ;AAAA,EACA,GAAGH;AACL,GAAgE;AAC9D,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACiB;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;AAEA,SAASL,EAAuB;AAAA,EAC9B,WAAAb;AAAA,EACA,GAAGH;AACL,GAAkE;AAChE,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACO;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;"}
|
|
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-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus 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 [&_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,EACrB,WAAAT;AAAA,EACA,UAAAM;AAAA,EACA,UAAAI,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,GAAGd;AACL,GAAyD;AACvD,SACE,gBAAAI,EAACH,EAAgB,QAAhB,EACC,U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CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;AAEA,SAASW,EAAgB;AAAA,EACvB,WAAAjB;AAAA,EACA,GAAGH;AACL,GAA2D;AACzD,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI,EAAG,iDAAiDF,CAAS;AAAA,MACvE,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASe,EAAqB;AAAA,EAC5B,WAAAZ;AAAA,EACA,GAAGH;AACL,GAAgE;AAC9D,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACiB;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;AAEA,SAASL,EAAuB;AAAA,EAC9B,WAAAb;AAAA,EACA,GAAGH;AACL,GAAkE;AAChE,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACO;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("radix-ui"),d=require("react"),u=require("../../lib/utils.cjs");function f(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const b=f(d);function h({className:r,defaultValue:t,value:e,min:a=0,max:o=100,...s}){const n=b.useMemo(()=>Array.isArray(e)?e:Array.isArray(t)?t:[a,o],[e,t,a,o]);return l.jsxs(i.Slider.Root,{"data-slot":"slider",defaultValue:t,value:e,min:a,max:o,className:u.cn("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",r),...s,children:[l.jsx(i.Slider.Track,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",children:l.jsx(i.Slider.Range,{"data-slot":"slider-range",className:"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"})}),Array.from({length:n.length},(g,c)=>l.jsx(i.Slider.Thumb,{"data-slot":"slider-thumb",className:"relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 focus-visible:shadow-focus focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},c))]})}exports.Slider=h;
|
|
2
2
|
//# sourceMappingURL=slider.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.cjs","sources":["../../../src/components/ui/slider.tsx"],"sourcesContent":["import { Slider as SliderPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className=\"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2
|
|
1
|
+
{"version":3,"file":"slider.cjs","sources":["../../../src/components/ui/slider.tsx"],"sourcesContent":["import { Slider as SliderPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className=\"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 focus-visible:shadow-focus focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50\"\n />\n ))}\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"],"names":["Slider","className","defaultValue","value","min","max","props","_values","React","jsxs","SliderPrimitive","cn","jsx","_","index"],"mappings":"ydAKA,SAASA,EAAO,CACd,UAAAC,EACA,aAAAC,EACA,MAAAC,EACA,IAAAC,EAAM,EACN,IAAAC,EAAM,IACN,GAAGC,CACL,EAAsD,CACpD,MAAMC,EAAUC,EAAM,QACpB,IACE,MAAM,QAAQL,CAAK,EACfA,EACA,MAAM,QAAQD,CAAY,EACxBA,EACA,CAACE,EAAKC,CAAG,EACjB,CAACF,EAAOD,EAAcE,EAAKC,CAAG,CAAA,EAGhC,OACEI,EAAAA,KAACC,EAAAA,OAAgB,KAAhB,CACC,YAAU,SACV,aAAAR,EACA,MAAAC,EACA,IAAAC,EACA,IAAAC,EACA,UAAWM,EAAAA,GACT,4KACAV,CAAA,EAED,GAAGK,EAEJ,SAAA,CAAAM,EAAAA,IAACF,EAAAA,OAAgB,MAAhB,CACC,YAAU,eACV,UAAU,wIAEV,SAAAE,EAAAA,IAACF,EAAAA,OAAgB,MAAhB,CACC,YAAU,eACV,UAAU,6EAAA,CAAA,CACZ,CAAA,EAED,MAAM,KAAK,CAAE,OAAQH,EAAQ,QAAU,CAACM,EAAGC,IAC1CF,EAAAA,IAACF,EAAAA,OAAgB,MAAhB,CACC,YAAU,eAEV,UAAU,0PAAA,EADLI,CAAA,CAGR,CAAA,CAAA,CAAA,CAGP"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Slider as r } from "radix-ui";
|
|
3
3
|
import * as h from "react";
|
|
4
4
|
import { cn as f } from "../../lib/utils.js";
|
|
@@ -7,12 +7,12 @@ function w({
|
|
|
7
7
|
defaultValue: a,
|
|
8
8
|
value: e,
|
|
9
9
|
min: t = 0,
|
|
10
|
-
max:
|
|
10
|
+
max: l = 100,
|
|
11
11
|
...s
|
|
12
12
|
}) {
|
|
13
13
|
const d = h.useMemo(
|
|
14
|
-
() => Array.isArray(e) ? e : Array.isArray(a) ? a : [t,
|
|
15
|
-
[e, a, t,
|
|
14
|
+
() => Array.isArray(e) ? e : Array.isArray(a) ? a : [t, l],
|
|
15
|
+
[e, a, t, l]
|
|
16
16
|
);
|
|
17
17
|
return /* @__PURE__ */ c(
|
|
18
18
|
r.Root,
|
|
@@ -21,19 +21,19 @@ function w({
|
|
|
21
21
|
defaultValue: a,
|
|
22
22
|
value: e,
|
|
23
23
|
min: t,
|
|
24
|
-
max:
|
|
24
|
+
max: l,
|
|
25
25
|
className: f(
|
|
26
26
|
"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
27
27
|
i
|
|
28
28
|
),
|
|
29
29
|
...s,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
32
|
r.Track,
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "slider-track",
|
|
35
35
|
className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ o(
|
|
37
37
|
r.Range,
|
|
38
38
|
{
|
|
39
39
|
"data-slot": "slider-range",
|
|
@@ -42,11 +42,11 @@ function w({
|
|
|
42
42
|
)
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
Array.from({ length: d.length }, (
|
|
45
|
+
Array.from({ length: d.length }, (b, n) => /* @__PURE__ */ o(
|
|
46
46
|
r.Thumb,
|
|
47
47
|
{
|
|
48
48
|
"data-slot": "slider-thumb",
|
|
49
|
-
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2
|
|
49
|
+
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 focus-visible:shadow-focus focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
50
50
|
},
|
|
51
51
|
n
|
|
52
52
|
))
|