@alkimi.org/ui-kit 0.8.8 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a}from"./chunk-S5TKCF6T.mjs";import*as c from"react";import*as e from"@radix-ui/react-radio-group";import{Circle as d}from"lucide-react";import{jsx as i}from"react/jsx-runtime";var m=c.forwardRef(({className:o,...t},r)=>i(e.Root,{className:a("grid gap-2",o),...t,ref:r}));m.displayName=e.Root.displayName;var s=c.forwardRef(({className:o,...t},r)=>i(e.Item,{ref:r,className:a("aspect-square h-4 w-4 rounded-full border border-accent-muted bg-background ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent data-[state=checked]:text-accent",o),...t,children:i(e.Indicator,{className:"flex items-center justify-center",children:i(d,{className:"h-2.5 w-2.5 fill-current text-current"})})}));s.displayName=e.Item.displayName;export{m as a,s as b};
3
+ //# sourceMappingURL=chunk-E7OHIWSF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/radio-group.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-accent-muted bg-background ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent data-[state=checked]:text-accent\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";oCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,UAAAC,MAAc,eASnB,cAAAC,MAAA,oBALJ,IAAMC,EAAmB,aAGvB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExBJ,EAAqB,OAApB,CACC,UAAWK,EAAG,aAAcH,CAAS,EACpC,GAAGC,EACJ,IAAKC,EACP,CAEH,EACDH,EAAW,YAAkC,OAAK,YAElD,IAAMK,EAAuB,aAG3B,CAAC,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAGC,IAExBJ,EAAqB,OAApB,CACC,IAAKI,EACL,UAAWC,EACT,qTACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAqB,YAApB,CAA8B,UAAU,mCACvC,SAAAA,EAACO,EAAA,CAAO,UAAU,wCAAwC,EAC5D,EACF,CAEH,EACDD,EAAe,YAAkC,OAAK","names":["React","RadioGroupPrimitive","Circle","jsx","RadioGroup","className","props","ref","cn","RadioGroupItem","Circle"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
- var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var _chunkHKLR7AH3js = require('./chunk-HKLR7AH3.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var k = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');function F({options:l,value:s,onValueChange:O,placeholder:m="Select option...",searchPlaceholder:S="Search...",emptyMessage:R="No option found.",disabled:D=!1,className:E,error:I=!1,multiple:i=!1,values:n=[],onValuesChange:p}){let[g,b]=k.useState(!1),u=l.find(e=>e.value===s),a=l.filter(e=>n.includes(e.value)),T=e=>{if(i){let t=n.includes(e)?n.filter(c=>c!==e):[...n,e];_optionalChain([p, 'optionalCall', _ => _(t)])}else _optionalChain([O, 'optionalCall', _2 => _2(e===s?"":e)]),b(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let c=n.filter(M=>M!==e);_optionalChain([p, 'optionalCall', _3 => _3(c)])},L=()=>i?a.length===0?m:a.length===1?a[0].label:`${a.length} selected`:u?u.label:m;return _jsxruntime.jsxs.call(void 0, _chunkULIOO55Ijs.a,{open:g,onOpenChange:b,children:[_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, "button",{type:"button",role:"combobox","aria-expanded":g,disabled:D,className:_chunkFUYXCJOQjs.a.call(void 0, "cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!s&&!n.length&&"text-secondary-text",I&&"border-destructive-foreground focus-visible:ring-destructive-foreground",E),children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:L()}),_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.c,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:_jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.a,{children:[_jsxruntime.jsx.call(void 0, _chunkHKLR7AH3js.c,{placeholder:S}),_jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.d,{children:[_jsxruntime.jsx.call(void 0, _chunkHKLR7AH3js.e,{children:R}),_jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.f,{children:[i&&a.length>0&&_jsxruntime.jsx.call(void 0, "div",{className:"px-2 py-1.5",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-wrap gap-1",children:a.map(e=>_jsxruntime.jsxs.call(void 0, "div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label}),_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=i?n.includes(e.value):s===e.value;return _jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.h,{value:e.value,onSelect:T,children:[_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:_chunkFUYXCJOQjs.a.call(void 0, "mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}exports.a = F;
3
- //# sourceMappingURL=chunk-YXXGA3BD.js.map
2
+ var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var _chunkHKLR7AH3js = require('./chunk-HKLR7AH3.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var k = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');function F({options:l,value:s,onValueChange:O,placeholder:m="Select option...",searchPlaceholder:S="Search...",emptyMessage:R="No option found.",disabled:D=!1,className:E,error:I=!1,multiple:i=!1,values:n=[],onValuesChange:p}){let[g,b]=k.useState(!1),f=l.find(e=>e.value===s),r=l.filter(e=>n.includes(e.value)),T=e=>{if(i){let t=n.includes(e)?n.filter(c=>c!==e):[...n,e];_optionalChain([p, 'optionalCall', _ => _(t)])}else _optionalChain([O, 'optionalCall', _2 => _2(e===s?"":e)]),b(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let c=n.filter(M=>M!==e);_optionalChain([p, 'optionalCall', _3 => _3(c)])},L=()=>i?r.length===0?m:r.length===1?r[0].label:`${r.length} selected`:f?f.label:m;return _jsxruntime.jsxs.call(void 0, _chunkULIOO55Ijs.a,{open:g,onOpenChange:b,children:[_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, "button",{type:"button",role:"combobox","aria-expanded":g,disabled:D,className:_chunkFUYXCJOQjs.a.call(void 0, "cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!s&&!n.length&&"text-secondary-text",I&&"border-destructive-foreground focus-visible:ring-destructive-foreground",E),children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:L()}),_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.c,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:_jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.a,{children:[_jsxruntime.jsx.call(void 0, _chunkHKLR7AH3js.c,{placeholder:S}),_jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.d,{children:[_jsxruntime.jsx.call(void 0, _chunkHKLR7AH3js.e,{children:R}),_jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.f,{children:[i&&r.length>0&&_jsxruntime.jsx.call(void 0, "div",{className:"px-2 py-1.5",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-wrap gap-1",children:r.map(e=>_jsxruntime.jsxs.call(void 0, "div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label}),_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-3 w-3 cursor-pointer",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=i?n.includes(e.value):s===e.value;return _jsxruntime.jsxs.call(void 0, _chunkHKLR7AH3js.h,{value:e.value,onSelect:T,children:[_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:_chunkFUYXCJOQjs.a.call(void 0, "mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}exports.a = F;
3
+ //# sourceMappingURL=chunk-ERWX5WSB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-YXXGA3BD.js","../src/components/combobox.tsx"],"names":["Combobox","options","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","multiple","values","onValuesChange","open","setOpen","selectedOption","option","selectedOptions","handleSelect","currentValue","new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CAAAA,GAAiBjB,CAAAA,CAAQ,EAAA,CAAKiB,CAAY,GAAA,CAC1DL,CAAAA,CAAQ,CAAA,CAAK,CAEjB,CAAA,CAEMQ,CAAAA,CAAoB,CAACC,CAAAA,CAAuBC,CAAAA,CAAAA,EAAwB,CACxEA,CAAAA,CAAE,cAAA,CAAe,CAAA,CACjBA,CAAAA,CAAE,eAAA,CAAgB,CAAA,CAClB,IAAMJ,CAAAA,CAAYT,CAAAA,CAAO,MAAA,CAAQU,CAAAA,EAAMA,CAAAA,GAAME,CAAa,CAAA,iBAC1DX,CAAAA,0BAAAA,CAAiBQ,CAAS,GAC5B,CAAA,CAEMK,CAAAA,CAAiB,CAAA,CAAA,EACjBf,CAAAA,CACEO,CAAAA,CAAgB,MAAA,GAAW,CAAA,CAAUb,CAAAA,CACrCa,CAAAA,CAAgB,MAAA,GAAW,CAAA,CAAUA,CAAAA,CAAgB,CAAC,CAAA,CAAE,KAAA,CACrD,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-YXXGA3BD.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n}\n\nexport function Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n\n const selectedOption = options.find((option) => option.value === value)\n const selectedOptions = options.filter((option) =>\n values.includes(option.value)\n )\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (multiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n <CommandGroup>\n {multiple && selectedOptions.length > 0 && (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer hover:text-destructive\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )}\n {options.map((option) => {\n const isSelected = multiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n <span className=\"truncate\">{option.label}</span>\n </CommandItem>\n )\n })}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ERWX5WSB.js","../src/components/combobox.tsx"],"names":["Combobox","options","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","multiple","values","onValuesChange","open","setOpen","selectedOption","option","selectedOptions","handleSelect","currentValue","newValues","v","handleRemoveValue","valueToRemove","e","getDisplayText"],"mappings":"AAAA,22BAAY;AACZ,sDAAqD,sDAA2E,sDAAwC,uECDjJ,2CACe,+CAqF9B,SApDQA,CAAAA,CAAS,CACvB,OAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,kBAAA,CACd,iBAAA,CAAAC,CAAAA,CAAoB,WAAA,CACpB,YAAA,CAAAC,CAAAA,CAAe,kBAAA,CACf,QAAA,CAAAC,CAAAA,CAAW,CAAA,CAAA,CACX,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,CAAA,CAAA,CACR,QAAA,CAAAC,CAAAA,CAAW,CAAA,CAAA,CACX,M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b,CAAAA,CACrCa,CAAAA,CAAgB,MAAA,GAAW,CAAA,CAAUA,CAAAA,CAAgB,CAAC,CAAA,CAAE,KAAA,CACrD,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ERWX5WSB.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n}\n\nexport function Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n\n const selectedOption = options.find((option) => option.value === value)\n const selectedOptions = options.filter((option) =>\n values.includes(option.value)\n )\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (multiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n <CommandGroup>\n {multiple && selectedOptions.length > 0 && (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )}\n {options.map((option) => {\n const isSelected = multiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n <span className=\"truncate\">{option.label}</span>\n </CommandItem>\n )\n })}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as f,b as v,c as x}from"./chunk-FZ3NXOFK.mjs";import{a as h,c as C,d as y,e as N,f as w,h as P}from"./chunk-TLWWS45Z.mjs";import{a as d}from"./chunk-S5TKCF6T.mjs";import*as k from"react";import{Check as X,ChevronDown as $,X as j}from"lucide-react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function F({options:l,value:s,onValueChange:O,placeholder:m="Select option...",searchPlaceholder:S="Search...",emptyMessage:R="No option found.",disabled:D=!1,className:E,error:I=!1,multiple:i=!1,values:n=[],onValuesChange:p}){let[g,b]=k.useState(!1),u=l.find(e=>e.value===s),a=l.filter(e=>n.includes(e.value)),T=e=>{if(i){let t=n.includes(e)?n.filter(c=>c!==e):[...n,e];p?.(t)}else O?.(e===s?"":e),b(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let c=n.filter(M=>M!==e);p?.(c)},L=()=>i?a.length===0?m:a.length===1?a[0].label:`${a.length} selected`:u?u.label:m;return r(f,{open:g,onOpenChange:b,children:[o(v,{asChild:!0,children:r("button",{type:"button",role:"combobox","aria-expanded":g,disabled:D,className:d("cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!s&&!n.length&&"text-secondary-text",I&&"border-destructive-foreground focus-visible:ring-destructive-foreground",E),children:[o("span",{className:"truncate",children:L()}),o($,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o(x,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:r(h,{children:[o(C,{placeholder:S}),r(y,{children:[o(N,{children:R}),r(w,{children:[i&&a.length>0&&o("div",{className:"px-2 py-1.5",children:o("div",{className:"flex flex-wrap gap-1",children:a.map(e=>r("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate",children:e.label}),o(j,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=i?n.includes(e.value):s===e.value;return r(P,{value:e.value,onSelect:T,children:[o(X,{className:d("mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),o("span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}export{F as a};
3
- //# sourceMappingURL=chunk-DG3BFKU6.mjs.map
2
+ import{a as u,b as v,c as x}from"./chunk-FZ3NXOFK.mjs";import{a as h,c as C,d as y,e as N,f as w,h as P}from"./chunk-TLWWS45Z.mjs";import{a as d}from"./chunk-S5TKCF6T.mjs";import*as k from"react";import{Check as X,ChevronDown as $,X as j}from"lucide-react";import{jsx as o,jsxs as a}from"react/jsx-runtime";function F({options:l,value:s,onValueChange:O,placeholder:m="Select option...",searchPlaceholder:S="Search...",emptyMessage:R="No option found.",disabled:D=!1,className:E,error:I=!1,multiple:i=!1,values:n=[],onValuesChange:p}){let[g,b]=k.useState(!1),f=l.find(e=>e.value===s),r=l.filter(e=>n.includes(e.value)),T=e=>{if(i){let t=n.includes(e)?n.filter(c=>c!==e):[...n,e];p?.(t)}else O?.(e===s?"":e),b(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let c=n.filter(M=>M!==e);p?.(c)},L=()=>i?r.length===0?m:r.length===1?r[0].label:`${r.length} selected`:f?f.label:m;return a(u,{open:g,onOpenChange:b,children:[o(v,{asChild:!0,children:a("button",{type:"button",role:"combobox","aria-expanded":g,disabled:D,className:d("cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!s&&!n.length&&"text-secondary-text",I&&"border-destructive-foreground focus-visible:ring-destructive-foreground",E),children:[o("span",{className:"truncate",children:L()}),o($,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o(x,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:a(h,{children:[o(C,{placeholder:S}),a(y,{children:[o(N,{children:R}),a(w,{children:[i&&r.length>0&&o("div",{className:"px-2 py-1.5",children:o("div",{className:"flex flex-wrap gap-1",children:r.map(e=>a("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate",children:e.label}),o(j,{className:"h-3 w-3 cursor-pointer",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=i?n.includes(e.value):s===e.value;return a(P,{value:e.value,onSelect:T,children:[o(X,{className:d("mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),o("span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}export{F as a};
3
+ //# sourceMappingURL=chunk-TF36SKHU.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n}\n\nexport function Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n\n const selectedOption = options.find((option) => option.value === value)\n const selectedOptions = options.filter((option) =>\n values.includes(option.value)\n )\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (multiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n <CommandGroup>\n {multiple && selectedOptions.length > 0 && (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer hover:text-destructive\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )}\n {options.map((option) => {\n const isSelected = multiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n <span className=\"truncate\">{option.label}</span>\n </CommandItem>\n )\n })}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"],"mappings":";4KAAA,UAAYA,MAAW,QACvB,OAAS,SAAAC,EAAO,eAAAC,EAAa,KAAAC,MAAS,eAqF9B,OAaE,OAAAC,EAbF,QAAAC,MAAA,oBApDD,SAASC,EAAS,CACvB,QAAAC,EACA,MAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,mBACd,kBAAAC,EAAoB,YACpB,aAAAC,EAAe,mBACf,SAAAC,EAAW,GACX,UAAAC,EACA,MAAAC,EAAQ,GACR,SAAAC,EAAW,GACX,OAAAC,EAAS,CAAC,EACV,eAAAC,CACF,EAAkB,CAChB,GAAM,CAACC,EAAMC,CAAO,EAAU,WAAS,EAAK,EAEtCC,EAAiBd,EAAQ,KAAMe,GAAWA,EAAO,QAAUd,CAAK,EAChEe,EAAkBhB,EAAQ,OAAQe,GACtCL,EAAO,SAASK,EAAO,KAAK,CAC9B,EAEME,EAAgBC,GAAyB,CAC7C,GAAIT,EAAU,CACZ,IAAMU,EAAYT,EAAO,SAASQ,CAAY,EAC1CR,EAAO,OAAQU,GAAMA,IAAMF,CAAY,EACvC,CAAC,GAAGR,EAAQQ,CAAY,EAC5BP,IAAiBQ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,CACC,UAAU,gDACV,QAAUZ,GAAMF,EAAkBN,EAAO,MAAOQ,CAAC,EACnD,IAPKR,EAAO,KAQd,CACD,EACH,EACF,EAEDf,EAAQ,IAAKe,GAAW,CACvB,IAAMqB,EAAa3B,EACfC,EAAO,SAASK,EAAO,KAAK,EAC5Bd,IAAUc,EAAO,MAErB,OACEjB,EAACuC,EAAA,CAEC,MAAOtB,EAAO,MACd,SAAUE,EAEV,UAAApB,EAACyC,EAAA,CACC,UAAWX,EACT,eACAS,EAAa,cAAgB,WAC/B,EACF,EACAvC,EAAC,QAAK,UAAU,WAAY,SAAAkB,EAAO,MAAM,IAVpCA,EAAO,KAWd,CAEJ,CAAC,GACH,GACF,GACF,EACF,GACF,CAEJ","names":["React","Check","ChevronDown","X","jsx","jsxs","Combobox","options","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","multiple","values","onValuesChange","open","setOpen","selectedOption","option","selectedOptions","handleSelect","currentValue","newValues","v","handleRemoveValue","valueToRemove","e","getDisplayText","Popover","PopoverTrigger","cn","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","X","isSelected","CommandItem","Check"]}
1
+ {"version":3,"sources":["../src/components/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n}\n\nexport function Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n\n const selectedOption = options.find((option) => option.value === value)\n const selectedOptions = options.filter((option) =>\n values.includes(option.value)\n )\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (multiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n <CommandGroup>\n {multiple && selectedOptions.length > 0 && (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )}\n {options.map((option) => {\n const isSelected = multiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n <span className=\"truncate\">{option.label}</span>\n </CommandItem>\n )\n })}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"],"mappings":";4KAAA,UAAYA,MAAW,QACvB,OAAS,SAAAC,EAAO,eAAAC,EAAa,KAAAC,MAAS,eAqF9B,OAaE,OAAAC,EAbF,QAAAC,MAAA,oBApDD,SAASC,EAAS,CACvB,QAAAC,EACA,MAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,mBACd,kBAAAC,EAAoB,YACpB,aAAAC,EAAe,mBACf,SAAAC,EAAW,GACX,UAAAC,EACA,MAAAC,EAAQ,GACR,SAAAC,EAAW,GACX,OAAAC,EAAS,CAAC,EACV,eAAAC,CACF,EAAkB,CAChB,GAAM,CAACC,EAAMC,CAAO,EAAU,WAAS,EAAK,EAEtCC,EAAiBd,EAAQ,KAAMe,GAAWA,EAAO,QAAUd,CAAK,EAChEe,EAAkBhB,EAAQ,OAAQe,GACtCL,EAAO,SAASK,EAAO,KAAK,CAC9B,EAEME,EAAgBC,GAAyB,CAC7C,GAAIT,EAAU,CACZ,IAAMU,EAAYT,EAAO,SAASQ,CAAY,EAC1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C,UAAU,6EAEV,UAAAD,EAAC,QAAK,UAAU,WAAY,SAAAkB,EAAO,MAAM,EACzClB,EAACsC,EAAA,CACC,UAAU,yBACV,QAAUZ,GAAMF,EAAkBN,EAAO,MAAOQ,CAAC,EACnD,IAPKR,EAAO,KAQd,CACD,EACH,EACF,EAEDf,EAAQ,IAAKe,GAAW,CACvB,IAAMqB,EAAa3B,EACfC,EAAO,SAASK,EAAO,KAAK,EAC5Bd,IAAUc,EAAO,MAErB,OACEjB,EAACuC,EAAA,CAEC,MAAOtB,EAAO,MACd,SAAUE,EAEV,UAAApB,EAACyC,EAAA,CACC,UAAWX,EACT,eACAS,EAAa,cAAgB,WAC/B,EACF,EACAvC,EAAC,QAAK,UAAU,WAAY,SAAAkB,EAAO,MAAM,IAVpCA,EAAO,KAWd,CAEJ,CAAC,GACH,GACF,GACF,EACF,GACF,CAEJ","names":["React","Check","ChevronDown","X","jsx","jsxs","Combobox","options","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","multiple","values","onValuesChange","open","setOpen","selectedOption","option","selectedOptions","handleSelect","currentValue","newValues","v","handleRemoveValue","valueToRemove","e","getDisplayText","Popover","PopoverTrigger","cn","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","X","isSelected","CommandItem","Check"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var c = _interopRequireWildcard(_react);var _reactradiogroup = require('@radix-ui/react-radio-group'); var e = _interopRequireWildcard(_reactradiogroup);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var m=c.forwardRef(({className:o,...t},r)=>_jsxruntime.jsx.call(void 0, e.Root,{className:_chunkFUYXCJOQjs.a.call(void 0, "grid gap-2",o),...t,ref:r}));m.displayName=e.Root.displayName;var s=c.forwardRef(({className:o,...t},r)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "aspect-square h-4 w-4 rounded-full border border-accent-muted bg-background ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent data-[state=checked]:text-accent",o),...t,children:_jsxruntime.jsx.call(void 0, e.Indicator,{className:"flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, _lucidereact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));s.displayName=e.Item.displayName;exports.a = m; exports.b = s;
3
+ //# sourceMappingURL=chunk-TUNSVCR4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-TUNSVCR4.js","../src/components/radio-group.tsx"],"names":["RadioGroup","className","props","ref","jsx","cn","RadioGroupItem","Circle"],"mappings":"AAAA,uWAAY;AACZ,sDAAkC,uECCX,iHACc,2CACd,+CASnB,IALEA,CAAAA,CAAmB,CAAA,CAAA,UAAA,CAGvB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAExBC,6BAAAA,CAAqB,CAAA,IAAA,CAApB,CACC,SAAA,CAAWC,gCAAAA,YAAG,CAAcJ,CAAS,CAAA,CACpC,GAAGC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACP,CAEH,CAAA,CACDH,CAAAA,CAAW,WAAA,CAAkC,CAAA,CAAA,IAAA,CAAK,WAAA,CAElD,IAAMM,CAAAA,CAAuB,CAAA,CAAA,UAAA,CAG3B,CAAC,CAAE,SAAA,CAAAL,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAExBC,6BAAAA,CAAqB,CAAA,IAAA,CAApB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,oTACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEJ,QAAA,CAAAE,6BAAAA,CAAqB,CAAA,SAAA,CAApB,CAA8B,SAAA,CAAU,kCAAA,CACvC,QAAA,CAAAA,6BAAAA,mBAACG,CAAA,CAAO,SAAA,CAAU,uCAAA,CAAwC,CAAA,CAC5D,CAAA,CACF,CAEH,CAAA,CACDD,CAAAA,CAAe,WAAA,CAAkC,CAAA,CAAA,IAAA,CAAK,WAAA,CAAA,6BAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-TUNSVCR4.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-accent-muted bg-background ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent data-[state=checked]:text-accent\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
- var _chunkYXXGA3BDjs = require('../chunk-YXXGA3BD.js');require('../chunk-ULIOO55I.js');require('../chunk-HKLR7AH3.js');require('../chunk-WPUW2XFI.js');require('../chunk-3BVMHDYA.js');require('../chunk-7T4BNCXL.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.Combobox = _chunkYXXGA3BDjs.a;
2
+ var _chunkERWX5WSBjs = require('../chunk-ERWX5WSB.js');require('../chunk-ULIOO55I.js');require('../chunk-HKLR7AH3.js');require('../chunk-WPUW2XFI.js');require('../chunk-3BVMHDYA.js');require('../chunk-7T4BNCXL.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.Combobox = _chunkERWX5WSBjs.a;
3
3
  //# sourceMappingURL=combobox.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a}from"../chunk-DG3BFKU6.mjs";import"../chunk-FZ3NXOFK.mjs";import"../chunk-TLWWS45Z.mjs";import"../chunk-FR56YJGL.mjs";import"../chunk-4LR7SOCY.mjs";import"../chunk-W65OWFZY.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as Combobox};
2
+ import{a}from"../chunk-TF36SKHU.mjs";import"../chunk-FZ3NXOFK.mjs";import"../chunk-TLWWS45Z.mjs";import"../chunk-FR56YJGL.mjs";import"../chunk-4LR7SOCY.mjs";import"../chunk-W65OWFZY.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as Combobox};
3
3
  //# sourceMappingURL=combobox.mjs.map
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+
7
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+
7
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+ "use client";var _chunkTUNSVCR4js = require('../chunk-TUNSVCR4.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.RadioGroup = _chunkTUNSVCR4js.a; exports.RadioGroupItem = _chunkTUNSVCR4js.b;
3
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/components/radio-group.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY,CAAC,uDAAqC,gCAA6B,gCAA6B,qFAA4C","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/components/radio-group.js"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ "use client";import{a,b}from"../chunk-E7OHIWSF.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as RadioGroup,b as RadioGroupItem};
3
+ //# sourceMappingURL=radio-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}