@next-degree/pickle-shared-js 0.3.3 → 0.3.4
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/app/layout.cjs +1 -1
- package/dist/app/layout.cjs.map +1 -1
- package/dist/app/layout.css.map +1 -1
- package/dist/app/layout.d.cts +2 -2
- package/dist/app/layout.d.ts +2 -2
- package/dist/app/layout.js +1 -1
- package/dist/app/layout.js.map +1 -1
- package/dist/app/page.cjs +1 -1
- package/dist/app/page.cjs.map +1 -1
- package/dist/app/page.d.cts +2 -2
- package/dist/app/page.d.ts +2 -2
- package/dist/app/page.js +1 -1
- package/dist/app/page.js.map +1 -1
- package/dist/components/demos/ComboboxDemo.cjs +1 -1
- package/dist/components/demos/ComboboxDemo.cjs.map +1 -1
- package/dist/components/demos/ComboboxDemo.d.cts +2 -2
- package/dist/components/demos/ComboboxDemo.d.ts +2 -2
- package/dist/components/demos/ComboboxDemo.js +1 -1
- package/dist/components/demos/ComboboxDemo.js.map +1 -1
- package/dist/components/demos/index.cjs +1 -1
- package/dist/components/demos/index.cjs.map +1 -1
- package/dist/components/demos/index.d.cts +2 -2
- package/dist/components/demos/index.d.ts +2 -2
- package/dist/components/demos/index.js +1 -1
- package/dist/components/demos/index.js.map +1 -1
- package/dist/components/primitives/command.cjs +1 -1
- package/dist/components/primitives/command.cjs.map +1 -1
- package/dist/components/primitives/command.d.cts +3 -2
- package/dist/components/primitives/command.d.ts +3 -2
- package/dist/components/primitives/command.js +1 -1
- package/dist/components/primitives/command.js.map +1 -1
- package/dist/components/primitives/dialog.cjs +1 -1
- package/dist/components/primitives/dialog.cjs.map +1 -1
- package/dist/components/primitives/dialog.d.cts +3 -2
- package/dist/components/primitives/dialog.d.ts +3 -2
- package/dist/components/primitives/dialog.js +1 -1
- package/dist/components/primitives/dialog.js.map +1 -1
- package/dist/components/primitives/popover.cjs +1 -1
- package/dist/components/primitives/popover.cjs.map +1 -1
- package/dist/components/primitives/popover.js +1 -1
- package/dist/components/primitives/popover.js.map +1 -1
- package/dist/components/primitives/separator.cjs +1 -1
- package/dist/components/primitives/separator.cjs.map +1 -1
- package/dist/components/primitives/separator.js +1 -1
- package/dist/components/primitives/separator.js.map +1 -1
- package/dist/components/ui/Badge.cjs +1 -1
- package/dist/components/ui/Badge.cjs.map +1 -1
- package/dist/components/ui/Badge.d.cts +2 -1
- package/dist/components/ui/Badge.d.ts +2 -1
- package/dist/components/ui/Badge.js +1 -1
- package/dist/components/ui/Badge.js.map +1 -1
- package/dist/components/ui/Button.cjs +1 -1
- package/dist/components/ui/Button.cjs.map +1 -1
- package/dist/components/ui/Button.js +1 -1
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/Checkbox.cjs +1 -1
- package/dist/components/ui/Checkbox.cjs.map +1 -1
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/Chip.cjs +1 -1
- package/dist/components/ui/Chip.cjs.map +1 -1
- package/dist/components/ui/Chip.d.cts +2 -1
- package/dist/components/ui/Chip.d.ts +2 -1
- package/dist/components/ui/Chip.js +1 -1
- package/dist/components/ui/Chip.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 +1 -1
- package/dist/components/ui/Combobox.js.map +1 -1
- package/dist/components/ui/Label.cjs +1 -1
- package/dist/components/ui/Label.cjs.map +1 -1
- package/dist/components/ui/Label.d.cts +2 -2
- package/dist/components/ui/Label.d.ts +2 -2
- package/dist/components/ui/Label.js +1 -1
- package/dist/components/ui/Label.js.map +1 -1
- package/dist/components/ui/ListItem.cjs +1 -1
- package/dist/components/ui/ListItem.cjs.map +1 -1
- package/dist/components/ui/ListItem.d.cts +2 -2
- package/dist/components/ui/ListItem.d.ts +2 -2
- package/dist/components/ui/ListItem.js +1 -1
- package/dist/components/ui/ListItem.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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/globals.css.map +1 -1
- package/package.json +8 -4
- package/.eslintrc.cjs +0 -58
- package/next-env.d.ts +0 -5
- package/next.config.ts +0 -7
- package/postcss.config.mjs +0 -9
- package/prettier.config.js +0 -11
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as cva_types from 'cva/types';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import { VariantProps } from 'cva';
|
|
3
4
|
import React__default from 'react';
|
|
4
5
|
|
|
5
6
|
interface ChipProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof chipVariants> {
|
|
6
7
|
}
|
|
7
|
-
declare const Chip: ({ className, variant, size, ...props }: ChipProps) =>
|
|
8
|
+
declare const Chip: ({ className, variant, size, ...props }: ChipProps) => react_jsx_runtime.JSX.Element;
|
|
8
9
|
declare const chipVariants: (props?: ({
|
|
9
10
|
variant?: "neutral" | "primary" | "danger" | "onboarding" | "onboardingSelected" | null | undefined;
|
|
10
11
|
size?: "small" | "medium" | null | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as cva_types from 'cva/types';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import { VariantProps } from 'cva';
|
|
3
4
|
import React__default from 'react';
|
|
4
5
|
|
|
5
6
|
interface ChipProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof chipVariants> {
|
|
6
7
|
}
|
|
7
|
-
declare const Chip: ({ className, variant, size, ...props }: ChipProps) =>
|
|
8
|
+
declare const Chip: ({ className, variant, size, ...props }: ChipProps) => react_jsx_runtime.JSX.Element;
|
|
8
9
|
declare const chipVariants: (props?: ({
|
|
9
10
|
variant?: "neutral" | "primary" | "danger" | "onboarding" | "onboardingSelected" | null | undefined;
|
|
10
11
|
size?: "small" | "medium" | null | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cva as
|
|
1
|
+
import{cva as i}from"cva";import{twMerge as p}from"tailwind-merge";import{jsx as s}from"react/jsx-runtime";var n=({className:e,variant:r,size:t,...a})=>s("div",{className:p(o({variant:r,size:t,className:e})),...a}),o=i(["flex","items-center","rounded-3xl","border","w-fit"],{variants:{variant:{neutral:["text-grey-80","border-grey-10"],primary:["text-purple-100","border-purple-20"],danger:["text-pumpkin-100","border-pumpkin-20"],onboarding:["text-green-100","bg-green-10","cursor-pointer"],onboardingSelected:["text-white","bg-green-90","cursor-pointer"]},size:{small:["text-sm","leading-5","px-2","py-1","gap-1.5"],medium:["text-base","leading-6","px-3","py-2","gap-2"]}},defaultVariants:{variant:"neutral",size:"medium"}}),u=n;export{u as default};
|
|
2
2
|
//# sourceMappingURL=Chip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Chip.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'cva'\nimport React from 'react'\nimport { twMerge } from 'tailwind-merge'\n\ninterface ChipProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof chipVariants> {}\n\nconst Chip = ({ className, variant, size, ...props }: ChipProps) => (\n <div className={twMerge(chipVariants({ variant, size, className }))} {...props} />\n)\n\nconst chipVariants = cva(['flex', 'items-center', 'rounded-3xl', 'border', 'w-fit'], {\n variants: {\n variant: {\n neutral: ['text-grey-80', 'border-grey-10'],\n primary: ['text-purple-100', 'border-purple-20'],\n danger: ['text-pumpkin-100', 'border-pumpkin-20'],\n onboarding: ['text-green-100', 'bg-green-10', 'cursor-pointer'],\n onboardingSelected: ['text-white', 'bg-green-90', 'cursor-pointer'],\n },\n size: {\n small: ['text-sm', 'leading-5', 'px-2', 'py-1', 'gap-1.5'],\n medium: ['text-base', 'leading-6', 'px-3', 'py-2', 'gap-2'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n})\n\nexport default Chip\n"],"mappings":"AAAA,OAAS,OAAAA,MAA8B,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Chip.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'cva'\nimport React from 'react'\nimport { twMerge } from 'tailwind-merge'\n\ninterface ChipProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof chipVariants> {}\n\nconst Chip = ({ className, variant, size, ...props }: ChipProps) => (\n <div className={twMerge(chipVariants({ variant, size, className }))} {...props} />\n)\n\nconst chipVariants = cva(['flex', 'items-center', 'rounded-3xl', 'border', 'w-fit'], {\n variants: {\n variant: {\n neutral: ['text-grey-80', 'border-grey-10'],\n primary: ['text-purple-100', 'border-purple-20'],\n danger: ['text-pumpkin-100', 'border-pumpkin-20'],\n onboarding: ['text-green-100', 'bg-green-10', 'cursor-pointer'],\n onboardingSelected: ['text-white', 'bg-green-90', 'cursor-pointer'],\n },\n size: {\n small: ['text-sm', 'leading-5', 'px-2', 'py-1', 'gap-1.5'],\n medium: ['text-base', 'leading-6', 'px-3', 'py-2', 'gap-2'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n})\n\nexport default Chip\n"],"mappings":"AAAA,OAAS,OAAAA,MAA8B,MAEvC,OAAS,WAAAC,MAAe,iBAOtB,cAAAC,MAAA,oBADF,IAAMC,EAAO,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,GAAGC,CAAM,IACjDL,EAAC,OAAI,UAAWD,EAAQO,EAAa,CAAE,QAAAH,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAAI,GAAGG,EAAO,EAG5EC,EAAeR,EAAI,CAAC,OAAQ,eAAgB,cAAe,SAAU,OAAO,EAAG,CACnF,SAAU,CACR,QAAS,CACP,QAAS,CAAC,eAAgB,gBAAgB,EAC1C,QAAS,CAAC,kBAAmB,kBAAkB,EAC/C,OAAQ,CAAC,mBAAoB,mBAAmB,EAChD,WAAY,CAAC,iBAAkB,cAAe,gBAAgB,EAC9D,mBAAoB,CAAC,aAAc,cAAe,gBAAgB,CACpE,EACA,KAAM,CACJ,MAAO,CAAC,UAAW,YAAa,OAAQ,OAAQ,SAAS,EACzD,OAAQ,CAAC,YAAa,YAAa,OAAQ,OAAQ,OAAO,CAC5D,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,QACR,CACF,CAAC,EAEMS,EAAQN","names":["cva","twMerge","jsx","Chip","className","variant","size","props","chipVariants","Chip_default"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var ye=Object.create;var k=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var be=(e,t)=>{for(var o in t)k(e,o,{get:t[o],enumerable:!0})},K=(e,t,o,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Pe(t))!Re.call(e,r)&&r!==o&&k(e,r,{get:()=>t[r],enumerable:!(l=xe(t,r))||l.enumerable});return e};var c=(e,t,o)=>(o=e!=null?ye(Ce(e)):{},K(t||!e||!e.__esModule?k(o,"default",{value:e,enumerable:!0}):o,e)),Ne=e=>K(k({},"__esModule",{value:!0}),e);var ze={};be(ze,{Combobox:()=>de});module.exports=Ne(ze);var y=require("react"),me=require("lucide-react"),pe=require("cva");var X=require("clsx"),$=require("tailwind-merge");function a(...e){return(0,$.twMerge)((0,X.clsx)(e))}var m=require("cmdk"),U=require("lucide-react"),i=c(require("react"),1);var n=c(require("@radix-ui/react-dialog"),1),q=require("lucide-react"),s=c(require("react"),1);var ke=n.Portal;var J=s.forwardRef(({className:e,...t},o)=>s.createElement(n.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));J.displayName=n.Overlay.displayName;var Q=s.forwardRef(({className:e,children:t,...o},l)=>s.createElement(ke,null,s.createElement(J,null),s.createElement(n.Content,{ref:l,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o},t,s.createElement(n.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400"},s.createElement(q.X,{className:"h-4 w-4"}),s.createElement("span",{className:"sr-only"},"Close")))));Q.displayName=n.Content.displayName;var we=({className:e,...t})=>s.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});we.displayName="DialogHeader";var De=({className:e,...t})=>s.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});De.displayName="DialogFooter";var Se=s.forwardRef(({className:e,...t},o)=>s.createElement(n.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));Se.displayName=n.Title.displayName;var Ee=s.forwardRef(({className:e,...t},o)=>s.createElement(n.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Ee.displayName=n.Description.displayName;var I=i.forwardRef(({className:e,...t},o)=>i.createElement(m.Command,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));I.displayName=m.Command.displayName;var T=i.forwardRef(({className:e,...t},o)=>i.createElement("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":""},i.createElement(U.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.createElement(m.Command.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})));T.displayName=m.Command.Input.displayName;var L=i.forwardRef(({className:e,...t},o)=>i.createElement(m.Command.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));L.displayName=m.Command.List.displayName;var W=i.forwardRef((e,t)=>i.createElement(m.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));W.displayName=m.Command.Empty.displayName;var _=i.forwardRef(({className:e,...t},o)=>i.createElement(m.Command.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));_.displayName=m.Command.Group.displayName;var Ie=i.forwardRef(({className:e,...t},o)=>i.createElement(m.Command.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));Ie.displayName=m.Command.Separator.displayName;var V=i.forwardRef(({className:e,...t},o)=>i.createElement(m.Command.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));V.displayName=m.Command.Item.displayName;var Te=({className:e,...t})=>i.createElement("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});Te.displayName="CommandShortcut";var P=c(require("react"),1),u=c(require("@radix-ui/react-popover"),1);var Y=u.Root,Z=u.Trigger,z=P.forwardRef(({className:e,align:t="center",sideOffset:o=4,...l},r)=>P.createElement(u.Portal,null,P.createElement(u.Content,{ref:r,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",e),...l})));z.displayName=u.Content.displayName;var M=c(require("@radix-ui/react-separator"),1),w=c(require("react"),1);var O=w.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...l},r)=>w.createElement(M.Root,{ref:r,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...l}));O.displayName=M.Root.displayName;var ae=require("lucide-react");var C=c(require("@radix-ui/react-checkbox"),1),D=require("lucide-react"),H=require("react");var ee=(0,H.forwardRef)(({className:e,...t},o)=>React.createElement(C.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t},React.createElement(C.Indicator,{className:"flex items-center justify-center text-current"},React.createElement(D.Check,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),React.createElement(D.Minus,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"}))));ee.displayName=C.Root.displayName;var te=(0,H.forwardRef)(({classNames:e,children:t,...o},l)=>{let{disabled:r}=o,p=o.id??`${o.name??o.value?.toString()}-checkbox`,g=r?"text-grey-40 pointer-events-none":"";return React.createElement("div",{className:a("flex space-x-2",e?.wrapper)},React.createElement(ee,{id:p,disabled:r,ref:l,...o}),React.createElement("label",{htmlFor:p,className:a(g,e?.label)},t))});te.displayName="Checkbox";var oe=te;var G=require("lucide-react");function Le({icon:e,hasCheckbox:t,isSelected:o,className:l,title:r,value:p,description:g,...S}){let b=e?(x=>{if(x in G.icons){let N=G.icons[x];return React.createElement(N,{size:14})}return null})(e):void 0;return React.createElement("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",l),...S,"data-state":o?"checked":"unchecked"},b&&React.createElement("span",{className:"mr-2"},b),t&&React.createElement(oe,{id:p,checked:o,onClick:x=>x.preventDefault()}),React.createElement("div",null,React.createElement("p",null,r),React.createElement("p",{className:"text-xs text-grey-80"},g)),React.createElement(ae.CheckIcon,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16}))}var ie=Le;var re=require("cva"),ne=c(require("react"),1);var We=(0,re.cva)("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function se({className:e,variant:t,...o}){return ne.createElement("div",{className:a(We({variant:t}),e),...o})}function _e({text:e,className:t,...o}){return e?React.createElement("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o},e):null}var le=_e;var de=(0,y.forwardRef)((e,t)=>{let{value:o,label:l,options:r,classNames:p,multiselect:g,placeholder:S,variant:R="default",size:b,className:x,onChange:N,children:B}=e,ce=g?o??[]:o?[o]:[],[d,A]=(0,y.useState)(ce),[j,F]=(0,y.useState)(!1),fe=r?.length<=5,E=R==="default",ue=R==="chip";(0,y.useEffect)(()=>{N?.(g?d:d[0])},[d]);let ge=v=>{if(g)return A(h=>h.includes(v)?h.filter(he=>he!==v):[...h,v]);A([v]),F(!1)},ve=()=>{let v=d.length>0?d.join(", "):S;return E?v:l};return React.createElement("div",{className:a("flex flex-col gap-2",x)},E&&l&&React.createElement(le,{text:l,className:p?.label}),React.createElement(Y,{open:j,onOpenChange:F},React.createElement(Z,{asChild:!0,disabled:r.length===0},React.createElement("div",{ref:t,className:a(Ve({variant:R,size:b}),p?.trigger),"aria-expanded":j},ue&&d.length>0&&React.createElement(se,{variant:"purple"},d.length),React.createElement("span",{className:a("truncate leading-normal",E&&d.length==0&&"text-grey-40")},ve()),React.createElement(me.ChevronDownIcon,{className:"transform group-data-[state=open]:rotate-180",size:"16"}))),React.createElement(I,null,React.createElement(z,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",p?.content),collisionPadding:8,sideOffset:4,align:"start"},!fe&&React.createElement(T,{placeholder:"Search..."}),React.createElement(L,null,React.createElement(W,null,"No results"),React.createElement(_,null,r.map(({id:v,...h})=>React.createElement(V,{key:v,value:h.value,onSelect:ge},React.createElement(ie,{className:a(p?.items,"truncate py-1"),isSelected:d?.includes(h.value),hasCheckbox:g,...h}))))),!!B&&React.createElement(O,null),B))))});de.displayName="Combobox";var Ve=(0,pe.cva)("group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","p-1","pl-2","text-xs"],normal:["h-9","p-2","pl-3","text-sm"],large:["h-10","p-3","pl-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});0&&(module.exports={Combobox});
|
|
1
|
+
"use strict";"use client";var we=Object.create;var E=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Se=Object.getOwnPropertyNames;var Ee=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Te=(e,t)=>{for(var o in t)E(e,o,{get:t[o],enumerable:!0})},Q=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Se(t))!Ie.call(e,r)&&r!==o&&E(e,r,{get:()=>t[r],enumerable:!(s=De(t,r))||s.enumerable});return e};var P=(e,t,o)=>(o=e!=null?we(Ee(e)):{},Q(t||!e||!e.__esModule?E(o,"default",{value:e,enumerable:!0}):o,e)),Le=e=>Q(E({},"__esModule",{value:!0}),e);var Ke={};Te(Ke,{Combobox:()=>Pe});module.exports=Le(Ke);var R=require("react"),he=require("lucide-react"),ye=require("cva");var U=require("clsx"),Y=require("tailwind-merge");function a(...e){return(0,Y.twMerge)((0,U.clsx)(e))}var l=require("cmdk"),te=require("lucide-react"),x=P(require("react"),1);var n=P(require("@radix-ui/react-dialog"),1),Z=require("lucide-react"),N=P(require("react"),1),m=require("react/jsx-runtime");var We=n.Portal;var j=N.forwardRef(({className:e,...t},o)=>(0,m.jsx)(n.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));j.displayName=n.Overlay.displayName;var ee=N.forwardRef(({className:e,children:t,...o},s)=>(0,m.jsxs)(We,{children:[(0,m.jsx)(j,{}),(0,m.jsxs)(n.Content,{ref:s,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o,children:[t,(0,m.jsxs)(n.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[(0,m.jsx)(Z.X,{className:"h-4 w-4"}),(0,m.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ee.displayName=n.Content.displayName;var _e=({className:e,...t})=>(0,m.jsx)("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_e.displayName="DialogHeader";var Ve=({className:e,...t})=>(0,m.jsx)("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ve.displayName="DialogFooter";var ze=N.forwardRef(({className:e,...t},o)=>(0,m.jsx)(n.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));ze.displayName=n.Title.displayName;var Me=N.forwardRef(({className:e,...t},o)=>(0,m.jsx)(n.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Me.displayName=n.Description.displayName;var p=require("react/jsx-runtime"),W=x.forwardRef(({className:e,...t},o)=>(0,p.jsx)(l.Command,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));W.displayName=l.Command.displayName;var _=x.forwardRef(({className:e,...t},o)=>(0,p.jsxs)("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":"",children:[(0,p.jsx)(te.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,p.jsx)(l.Command.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));_.displayName=l.Command.Input.displayName;var V=x.forwardRef(({className:e,...t},o)=>(0,p.jsx)(l.Command.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));V.displayName=l.Command.List.displayName;var z=x.forwardRef((e,t)=>(0,p.jsx)(l.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));z.displayName=l.Command.Empty.displayName;var M=x.forwardRef(({className:e,...t},o)=>(0,p.jsx)(l.Command.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));M.displayName=l.Command.Group.displayName;var Oe=x.forwardRef(({className:e,...t},o)=>(0,p.jsx)(l.Command.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));Oe.displayName=l.Command.Separator.displayName;var O=x.forwardRef(({className:e,...t},o)=>(0,p.jsx)(l.Command.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));O.displayName=l.Command.Item.displayName;var He=({className:e,...t})=>(0,p.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});He.displayName="CommandShortcut";var oe=P(require("react"),1),u=P(require("@radix-ui/react-popover"),1);var H=require("react/jsx-runtime"),ae=u.Root,ie=u.Trigger,G=oe.forwardRef(({className:e,align:t="center",sideOffset:o=4,...s},r)=>(0,H.jsx)(u.Portal,{children:(0,H.jsx)(u.Content,{ref:r,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",e),...s})}));G.displayName=u.Content.displayName;var B=P(require("@radix-ui/react-separator"),1),re=P(require("react"),1);var ne=require("react/jsx-runtime"),A=re.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...s},r)=>(0,ne.jsx)(B.Root,{ref:r,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));A.displayName=B.Root.displayName;var pe=require("lucide-react");var k=P(require("@radix-ui/react-checkbox"),1),I=require("lucide-react"),F=require("react");var v=require("react/jsx-runtime"),se=(0,F.forwardRef)(({className:e,...t},o)=>(0,v.jsx)(k.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t,children:(0,v.jsxs)(k.Indicator,{className:"flex items-center justify-center text-current",children:[(0,v.jsx)(I.Check,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),(0,v.jsx)(I.Minus,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"})]})}));se.displayName=k.Root.displayName;var le=(0,F.forwardRef)(({classNames:e,children:t,...o},s)=>{let{disabled:r}=o,c=o.id??`${o.name??o.value?.toString()}-checkbox`,h=r?"text-grey-40 pointer-events-none":"";return(0,v.jsxs)("div",{className:a("flex space-x-2",e?.wrapper),children:[(0,v.jsx)(se,{id:c,disabled:r,ref:s,...o}),(0,v.jsx)("label",{htmlFor:c,className:a(h,e?.label),children:t})]})});le.displayName="Checkbox";var me=le;var K=require("lucide-react"),d=require("react/jsx-runtime");function Ge({icon:e,hasCheckbox:t,isSelected:o,className:s,title:r,value:c,description:h,...T}){let D=e?(b=>{if(b in K.icons){let S=K.icons[b];return(0,d.jsx)(S,{size:14})}return null})(e):void 0;return(0,d.jsxs)("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",s),...T,"data-state":o?"checked":"unchecked",children:[D&&(0,d.jsx)("span",{className:"mr-2",children:D}),t&&(0,d.jsx)(me,{id:c,checked:o,onClick:b=>b.preventDefault()}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{children:r}),(0,d.jsx)("p",{className:"text-xs text-grey-80",children:h})]}),(0,d.jsx)(pe.CheckIcon,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16})]})}var de=Ge;var ce=require("cva");var ge=require("react/jsx-runtime"),Be=(0,ce.cva)("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function fe({className:e,variant:t,...o}){return(0,ge.jsx)("div",{className:a(Be({variant:t}),e),...o})}var ve=require("react/jsx-runtime");function Ae({text:e,className:t,...o}){return e?(0,ve.jsx)("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var ue=Ae;var i=require("react/jsx-runtime"),Pe=(0,R.forwardRef)((e,t)=>{let{value:o,label:s,options:r,classNames:c,multiselect:h,placeholder:T,variant:w="default",size:D,className:b,onChange:S,children:X}=e,xe=h?o??[]:o?[o]:[],[f,$]=(0,R.useState)(xe),[q,J]=(0,R.useState)(!1),Ce=r?.length<=5,L=w==="default",Re=w==="chip";(0,R.useEffect)(()=>{S?.(h?f:f[0])},[f]);let be=y=>{if(h)return $(C=>C.includes(y)?C.filter(ke=>ke!==y):[...C,y]);$([y]),J(!1)},Ne=()=>{let y=f.length>0?f.join(", "):T;return L?y:s};return(0,i.jsxs)("div",{className:a("flex flex-col gap-2",b),children:[L&&s&&(0,i.jsx)(ue,{text:s,className:c?.label}),(0,i.jsxs)(ae,{open:q,onOpenChange:J,children:[(0,i.jsx)(ie,{asChild:!0,disabled:r.length===0,children:(0,i.jsxs)("div",{ref:t,className:a(Fe({variant:w,size:D}),c?.trigger),"aria-expanded":q,children:[Re&&f.length>0&&(0,i.jsx)(fe,{variant:"purple",children:f.length}),(0,i.jsx)("span",{className:a("truncate leading-normal",L&&f.length==0&&"text-grey-40"),children:Ne()}),(0,i.jsx)(he.ChevronDownIcon,{className:"transform group-data-[state=open]:rotate-180",size:"16"})]})}),(0,i.jsx)(W,{children:(0,i.jsxs)(G,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",c?.content),collisionPadding:8,sideOffset:4,align:"start",children:[!Ce&&(0,i.jsx)(_,{placeholder:"Search..."}),(0,i.jsxs)(V,{children:[(0,i.jsx)(z,{children:"No results"}),(0,i.jsx)(M,{children:r.map(({id:y,...C})=>(0,i.jsx)(O,{value:C.value,onSelect:be,children:(0,i.jsx)(de,{className:a(c?.items,"truncate py-1"),isSelected:f?.includes(C.value),hasCheckbox:h,...C})},y))})]}),!!X&&(0,i.jsx)(A,{}),X]})})]})]})});Pe.displayName="Combobox";var Fe=(0,ye.cva)("group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","p-1","pl-2","text-xs"],normal:["h-9","p-2","pl-3","text-sm"],large:["h-10","p-3","pl-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});0&&(module.exports={Combobox});
|
|
2
2
|
//# sourceMappingURL=Combobox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentPropsWithoutRef, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Option = { id: number; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange' | 'size'>\ntype MultiSelectProps = TriggerVariants & SelectProps & Shared & MultiSelect\ntype SingleSelectProps = TriggerVariants & SelectProps & Shared & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n className,\n onChange: handleChange,\n children,\n } = props\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n const [selected, setSelected] = useState<string[]>(valueArray)\n const [open, setOpen] = useState(false)\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n\n useEffect(() => {\n multiselect ? handleChange?.(selected) : handleChange?.(selected[0])\n }, [selected])\n\n const handleSelect = (option: string) => {\n if (multiselect) {\n return setSelected((prev) =>\n prev.includes(option) ? prev.filter((v) => v !== option) : [...prev, option]\n )\n }\n setSelected([option])\n setOpen(false)\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(triggerVariants({ variant, size }), classNames?.trigger)}\n aria-expanded={open}\n >\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n <ChevronDownIcon className=\"transform group-data-[state=open]:rotate-180\" size=\"16\" />\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected?.includes(option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!children && <Separator />}\n {children}\n </PopoverContent>\n </Command>\n </Popover>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'p-1', 'pl-2', 'text-xs'],\n normal: ['h-9', 'p-2', 'pl-3', 'text-sm'],\n large: ['h-10', 'p-3', 'pl-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n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AO,OAAQ,WAAW,CAC5C,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,QACR,CACF,CACF","names":["Combobox_exports","__export","Combobox","__toCommonJS","import_react","import_lucide_react","import_cva","import_clsx","import_tailwind_merge","cn","inputs","import_cmdk","import_lucide_react","React","DialogPrimitive","import_lucide_react","React","DialogPortal","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogPortal","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","Separator","className","orientation","decorative","props","ref","cn","import_lucide_react","CheckboxPrimitive","import_lucide_react","import_react","CheckboxToggle","className","props","ref","cn","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","import_lucide_react","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","ListItem_default","import_cva","React","badgeVariants","Badge","className","variant","props","cn","Label","text","className","props","cn","Label_default","Combobox","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","className","handleChange","children","valueArray","selected","setSelected","open","setOpen","hideSearchBox","isDefault","isChip","handleSelect","option","prev","v","handleDisplayValue","defaultLabel","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentPropsWithoutRef, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Option = { id: number; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange' | 'size'>\ntype MultiSelectProps = TriggerVariants & SelectProps & Shared & MultiSelect\ntype SingleSelectProps = TriggerVariants & SelectProps & Shared & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n className,\n onChange: handleChange,\n children,\n } = props\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n const [selected, setSelected] = useState<string[]>(valueArray)\n const [open, setOpen] = useState(false)\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n\n useEffect(() => {\n multiselect ? handleChange?.(selected) : handleChange?.(selected[0])\n }, [selected])\n\n const handleSelect = (option: string) => {\n if (multiselect) {\n return setSelected((prev) =>\n prev.includes(option) ? prev.filter((v) => v !== option) : [...prev, option]\n )\n }\n setSelected([option])\n setOpen(false)\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(triggerVariants({ variant, size }), classNames?.trigger)}\n aria-expanded={open}\n >\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n <ChevronDownIcon className=\"transform group-data-[state=open]:rotate-180\" size=\"16\" />\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected?.includes(option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!children && <Separator />}\n {children}\n </PopoverContent>\n </Command>\n </Popover>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'p-1', 'pl-2', 'text-xs'],\n normal: ['h-9', 'p-2', 'pl-3', 'text-sm'],\n large: ['h-10', 'p-3', 'pl-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n"],"mappings":"mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,cAAAE,KAAA,eAAAC,GAAAH,IAEA,IAAAI,EAA0E,iBAC1EC,GAAgC,wBAChCC,GAAuC,eCJvC,IAAAC,EAAsC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W,CAC5C,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,QACR,CACF,CACF","names":["Combobox_exports","__export","Combobox","__toCommonJS","import_react","import_lucide_react","import_cva","import_clsx","import_tailwind_merge","cn","inputs","import_cmdk","import_lucide_react","React","DialogPrimitive","import_lucide_react","React","import_jsx_runtime","DialogPortal","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogPortal","DialogHeader","DialogFooter","DialogTitle","DialogDescription","import_jsx_runtime","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","import_jsx_runtime","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","import_jsx_runtime","Separator","className","orientation","decorative","props","ref","cn","import_lucide_react","CheckboxPrimitive","import_lucide_react","import_react","import_jsx_runtime","CheckboxToggle","className","props","ref","cn","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","import_lucide_react","import_jsx_runtime","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","ListItem_default","import_cva","import_jsx_runtime","badgeVariants","Badge","className","variant","props","cn","import_jsx_runtime","Label","text","className","props","cn","Label_default","import_jsx_runtime","Combobox","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","className","handleChange","children","valueArray","selected","setSelected","open","setOpen","hideSearchBox","isDefault","isChip","handleSelect","option","prev","v","handleDisplayValue","defaultLabel","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{forwardRef as Ne,useEffect as ke,useState as Z}from"react";import{ChevronDownIcon as we}from"lucide-react";import{cva as De}from"cva";import{clsx as ne}from"clsx";import{twMerge as se}from"tailwind-merge";function a(...e){return se(ne(e))}import{Command as s}from"cmdk";import{Search as ue}from"lucide-react";import*as i from"react";import*as r from"@radix-ui/react-dialog";import{X as le}from"lucide-react";import*as n from"react";var me=r.Portal;var G=n.forwardRef(({className:e,...t},o)=>n.createElement(r.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));G.displayName=r.Overlay.displayName;var B=n.forwardRef(({className:e,children:t,...o},l)=>n.createElement(me,null,n.createElement(G,null),n.createElement(r.Content,{ref:l,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o},t,n.createElement(r.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400"},n.createElement(le,{className:"h-4 w-4"}),n.createElement("span",{className:"sr-only"},"Close")))));B.displayName=r.Content.displayName;var pe=({className:e,...t})=>n.createElement("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pe.displayName="DialogHeader";var de=({className:e,...t})=>n.createElement("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});de.displayName="DialogFooter";var ce=n.forwardRef(({className:e,...t},o)=>n.createElement(r.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));ce.displayName=r.Title.displayName;var fe=n.forwardRef(({className:e,...t},o)=>n.createElement(r.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));fe.displayName=r.Description.displayName;var D=i.forwardRef(({className:e,...t},o)=>i.createElement(s,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));D.displayName=s.displayName;var S=i.forwardRef(({className:e,...t},o)=>i.createElement("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":""},i.createElement(ue,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.createElement(s.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})));S.displayName=s.Input.displayName;var E=i.forwardRef(({className:e,...t},o)=>i.createElement(s.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));E.displayName=s.List.displayName;var I=i.forwardRef((e,t)=>i.createElement(s.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));I.displayName=s.Empty.displayName;var T=i.forwardRef(({className:e,...t},o)=>i.createElement(s.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));T.displayName=s.Group.displayName;var ge=i.forwardRef(({className:e,...t},o)=>i.createElement(s.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));ge.displayName=s.Separator.displayName;var L=i.forwardRef(({className:e,...t},o)=>i.createElement(s.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));L.displayName=s.Item.displayName;var ve=({className:e,...t})=>i.createElement("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});ve.displayName="CommandShortcut";import*as x from"react";import*as u from"@radix-ui/react-popover";var A=u.Root,j=u.Trigger,W=x.forwardRef(({className:e,align:t="center",sideOffset:o=4,...l},m)=>x.createElement(u.Portal,null,x.createElement(u.Content,{ref:m,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",e),...l})));W.displayName=u.Content.displayName;import*as _ from"@radix-ui/react-separator";import*as N from"react";var V=N.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...l},m)=>N.createElement(_.Root,{ref:m,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...l}));V.displayName=_.Root.displayName;import{CheckIcon as xe}from"lucide-react";import*as P from"@radix-ui/react-checkbox";import{Check as he,Minus as ye}from"lucide-react";import{forwardRef as F}from"react";var K=F(({className:e,...t},o)=>React.createElement(P.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t},React.createElement(P.Indicator,{className:"flex items-center justify-center text-current"},React.createElement(he,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),React.createElement(ye,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"}))));K.displayName=P.Root.displayName;var X=F(({classNames:e,children:t,...o},l)=>{let{disabled:m}=o,p=o.id??`${o.name??o.value?.toString()}-checkbox`,g=m?"text-grey-40 pointer-events-none":"";return React.createElement("div",{className:a("flex space-x-2",e?.wrapper)},React.createElement(K,{id:p,disabled:m,ref:l,...o}),React.createElement("label",{htmlFor:p,className:a(g,e?.label)},t))});X.displayName="Checkbox";var $=X;import{icons as q}from"lucide-react";function Pe({icon:e,hasCheckbox:t,isSelected:o,className:l,title:m,value:p,description:g,...k}){let R=e?(y=>{if(y in q){let b=q[y];return React.createElement(b,{size:14})}return null})(e):void 0;return React.createElement("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",l),...k,"data-state":o?"checked":"unchecked"},R&&React.createElement("span",{className:"mr-2"},R),t&&React.createElement($,{id:p,checked:o,onClick:y=>y.preventDefault()}),React.createElement("div",null,React.createElement("p",null,m),React.createElement("p",{className:"text-xs text-grey-80"},g)),React.createElement(xe,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16}))}var J=Pe;import{cva as Ce}from"cva";import*as Q from"react";var Re=Ce("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function U({className:e,variant:t,...o}){return Q.createElement("div",{className:a(Re({variant:t}),e),...o})}function be({text:e,className:t,...o}){return e?React.createElement("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o},e):null}var Y=be;var Se=Ne((e,t)=>{let{value:o,label:l,options:m,classNames:p,multiselect:g,placeholder:k,variant:C="default",size:R,className:y,onChange:b,children:z}=e,ee=g?o??[]:o?[o]:[],[d,M]=Z(ee),[O,H]=Z(!1),te=m?.length<=5,w=C==="default",oe=C==="chip";ke(()=>{b?.(g?d:d[0])},[d]);let ae=v=>{if(g)return M(h=>h.includes(v)?h.filter(re=>re!==v):[...h,v]);M([v]),H(!1)},ie=()=>{let v=d.length>0?d.join(", "):k;return w?v:l};return React.createElement("div",{className:a("flex flex-col gap-2",y)},w&&l&&React.createElement(Y,{text:l,className:p?.label}),React.createElement(A,{open:O,onOpenChange:H},React.createElement(j,{asChild:!0,disabled:m.length===0},React.createElement("div",{ref:t,className:a(Ee({variant:C,size:R}),p?.trigger),"aria-expanded":O},oe&&d.length>0&&React.createElement(U,{variant:"purple"},d.length),React.createElement("span",{className:a("truncate leading-normal",w&&d.length==0&&"text-grey-40")},ie()),React.createElement(we,{className:"transform group-data-[state=open]:rotate-180",size:"16"}))),React.createElement(D,null,React.createElement(W,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",p?.content),collisionPadding:8,sideOffset:4,align:"start"},!te&&React.createElement(S,{placeholder:"Search..."}),React.createElement(E,null,React.createElement(I,null,"No results"),React.createElement(T,null,m.map(({id:v,...h})=>React.createElement(L,{key:v,value:h.value,onSelect:ae},React.createElement(J,{className:a(p?.items,"truncate py-1"),isSelected:d?.includes(h.value),hasCheckbox:g,...h}))))),!!z&&React.createElement(V,null),z))))});Se.displayName="Combobox";var Ee=De("group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","p-1","pl-2","text-xs"],normal:["h-9","p-2","pl-3","text-sm"],large:["h-10","p-3","pl-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});export{Se as Combobox};
|
|
1
|
+
"use client";import{forwardRef as Me,useEffect as Oe,useState as le}from"react";import{ChevronDownIcon as He}from"lucide-react";import{cva as Ge}from"cva";import{clsx as ue}from"clsx";import{twMerge as ve}from"tailwind-merge";function a(...e){return ve(ue(e))}import{Command as r}from"cmdk";import{Search as be}from"lucide-react";import*as y from"react";import*as i from"@radix-ui/react-dialog";import{X as he}from"lucide-react";import*as R from"react";import{jsx as h,jsxs as T}from"react/jsx-runtime";var ye=i.Portal;var X=R.forwardRef(({className:e,...t},o)=>h(i.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));X.displayName=i.Overlay.displayName;var $=R.forwardRef(({className:e,children:t,...o},n)=>T(ye,{children:[h(X,{}),T(i.Content,{ref:n,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o,children:[t,T(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[h(he,{className:"h-4 w-4"}),h("span",{className:"sr-only",children:"Close"})]})]})]}));$.displayName=i.Content.displayName;var Pe=({className:e,...t})=>h("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pe.displayName="DialogHeader";var xe=({className:e,...t})=>h("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xe.displayName="DialogFooter";var Ce=R.forwardRef(({className:e,...t},o)=>h(i.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));Ce.displayName=i.Title.displayName;var Re=R.forwardRef(({className:e,...t},o)=>h(i.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Re.displayName=i.Description.displayName;import{jsx as f,jsxs as we}from"react/jsx-runtime";var L=y.forwardRef(({className:e,...t},o)=>f(r,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));L.displayName=r.displayName;var W=y.forwardRef(({className:e,...t},o)=>we("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":"",children:[f(be,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),f(r.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));W.displayName=r.Input.displayName;var _=y.forwardRef(({className:e,...t},o)=>f(r.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));_.displayName=r.List.displayName;var V=y.forwardRef((e,t)=>f(r.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));V.displayName=r.Empty.displayName;var z=y.forwardRef(({className:e,...t},o)=>f(r.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));z.displayName=r.Group.displayName;var Ne=y.forwardRef(({className:e,...t},o)=>f(r.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));Ne.displayName=r.Separator.displayName;var M=y.forwardRef(({className:e,...t},o)=>f(r.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));M.displayName=r.Item.displayName;var ke=({className:e,...t})=>f("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});ke.displayName="CommandShortcut";import*as J from"react";import*as g from"@radix-ui/react-popover";import{jsx as q}from"react/jsx-runtime";var Q=g.Root,U=g.Trigger,O=J.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},s)=>q(g.Portal,{children:q(g.Content,{ref:s,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",e),...n})}));O.displayName=g.Content.displayName;import*as H from"@radix-ui/react-separator";import*as Y from"react";import{jsx as De}from"react/jsx-runtime";var G=Y.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},s)=>De(H.Root,{ref:s,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));G.displayName=H.Root.displayName;import{CheckIcon as Ie}from"lucide-react";import*as N from"@radix-ui/react-checkbox";import{Check as Se,Minus as Ee}from"lucide-react";import{forwardRef as Z}from"react";import{jsx as b,jsxs as oe}from"react/jsx-runtime";var j=Z(({className:e,...t},o)=>b(N.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t,children:oe(N.Indicator,{className:"flex items-center justify-center text-current",children:[b(Se,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),b(Ee,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"})]})}));j.displayName=N.Root.displayName;var ee=Z(({classNames:e,children:t,...o},n)=>{let{disabled:s}=o,m=o.id??`${o.name??o.value?.toString()}-checkbox`,u=s?"text-grey-40 pointer-events-none":"";return oe("div",{className:a("flex space-x-2",e?.wrapper),children:[b(j,{id:m,disabled:s,ref:n,...o}),b("label",{htmlFor:m,className:a(u,e?.label),children:t})]})});ee.displayName="Checkbox";var te=ee;import{icons as ae}from"lucide-react";import{jsx as C,jsxs as ie}from"react/jsx-runtime";function Te({icon:e,hasCheckbox:t,isSelected:o,className:n,title:s,value:m,description:u,...E}){let D=e?(x=>{if(x in ae){let S=ae[x];return C(S,{size:14})}return null})(e):void 0;return ie("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",n),...E,"data-state":o?"checked":"unchecked",children:[D&&C("span",{className:"mr-2",children:D}),t&&C(te,{id:m,checked:o,onClick:x=>x.preventDefault()}),ie("div",{children:[C("p",{children:s}),C("p",{className:"text-xs text-grey-80",children:u})]}),C(Ie,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16})]})}var re=Te;import{cva as Le}from"cva";import{jsx as _e}from"react/jsx-runtime";var We=Le("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function ne({className:e,variant:t,...o}){return _e("div",{className:a(We({variant:t}),e),...o})}import{jsx as ze}from"react/jsx-runtime";function Ve({text:e,className:t,...o}){return e?ze("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var se=Ve;import{jsx as l,jsxs as k}from"react/jsx-runtime";var Be=Me((e,t)=>{let{value:o,label:n,options:s,classNames:m,multiselect:u,placeholder:E,variant:w="default",size:D,className:x,onChange:S,children:B}=e,me=u?o??[]:o?[o]:[],[p,A]=le(me),[F,K]=le(!1),pe=s?.length<=5,I=w==="default",de=w==="chip";Oe(()=>{S?.(u?p:p[0])},[p]);let ce=v=>{if(u)return A(P=>P.includes(v)?P.filter(ge=>ge!==v):[...P,v]);A([v]),K(!1)},fe=()=>{let v=p.length>0?p.join(", "):E;return I?v:n};return k("div",{className:a("flex flex-col gap-2",x),children:[I&&n&&l(se,{text:n,className:m?.label}),k(Q,{open:F,onOpenChange:K,children:[l(U,{asChild:!0,disabled:s.length===0,children:k("div",{ref:t,className:a(Ae({variant:w,size:D}),m?.trigger),"aria-expanded":F,children:[de&&p.length>0&&l(ne,{variant:"purple",children:p.length}),l("span",{className:a("truncate leading-normal",I&&p.length==0&&"text-grey-40"),children:fe()}),l(He,{className:"transform group-data-[state=open]:rotate-180",size:"16"})]})}),l(L,{children:k(O,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",m?.content),collisionPadding:8,sideOffset:4,align:"start",children:[!pe&&l(W,{placeholder:"Search..."}),k(_,{children:[l(V,{children:"No results"}),l(z,{children:s.map(({id:v,...P})=>l(M,{value:P.value,onSelect:ce,children:l(re,{className:a(m?.items,"truncate py-1"),isSelected:p?.includes(P.value),hasCheckbox:u,...P})},v))})]}),!!B&&l(G,{}),B]})})]})]})});Be.displayName="Combobox";var Ae=Ge("group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","p-1","pl-2","text-xs"],normal:["h-9","p-2","pl-3","text-sm"],large:["h-10","p-3","pl-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});export{Be as Combobox};
|
|
2
2
|
//# sourceMappingURL=Combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentPropsWithoutRef, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Option = { id: number; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange' | 'size'>\ntype MultiSelectProps = TriggerVariants & SelectProps & Shared & MultiSelect\ntype SingleSelectProps = TriggerVariants & SelectProps & Shared & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n className,\n onChange: handleChange,\n children,\n } = props\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n const [selected, setSelected] = useState<string[]>(valueArray)\n const [open, setOpen] = useState(false)\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n\n useEffect(() => {\n multiselect ? handleChange?.(selected) : handleChange?.(selected[0])\n }, [selected])\n\n const handleSelect = (option: string) => {\n if (multiselect) {\n return setSelected((prev) =>\n prev.includes(option) ? prev.filter((v) => v !== option) : [...prev, option]\n )\n }\n setSelected([option])\n setOpen(false)\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(triggerVariants({ variant, size }), classNames?.trigger)}\n aria-expanded={open}\n >\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n <ChevronDownIcon className=\"transform group-data-[state=open]:rotate-180\" size=\"16\" />\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected?.includes(option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!children && <Separator />}\n {children}\n </PopoverContent>\n </Command>\n </Popover>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'p-1', 'pl-2', 'text-xs'],\n normal: ['h-9', 'p-2', 'pl-3', 'text-sm'],\n large: ['h-10', 'p-3', 'pl-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n"],"mappings":"aAEA,OAAmC,cAAAA,GAAY,aAAAC,GAAW,YAAAC,MAAgB,QAC1E,OAAS,mBAAAC,OAAuB,eAChC,OAAS,OAAAC,OAA8B,MCJvC,OAA0B,QAAAC,OAAY,OACtC,OAAS,WAAAC,OAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,GAAQD,GAAKG,CAAM,CAAC,CAC7B,CCFA,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAAC,OAAc,eACvB,UAAYC,MAAW,QCFvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,OAAS,eAClB,UAAYC,MAAW,QAMvB,IAAMC,GAA+B,SAIrC,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1B,gBAAiB,UAAhB,CACC,IAAKA,EACL,UAAWC,EACT,yJACAH,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAA8B,UAAQ,YAEpD,IAAMK,EAAsB,aAG1B,CAAC,CAAE,UAAAJ,EAAW,SAAAK,EAAU,GAAGJ,CAAM,EAAGC,IACpC,gBAACI,GAAA,KACC,gBAACP,EAAA,IAAc,EACf,gBAAiB,UAAhB,CACC,IAAKG,EACL,UAAWC,EACT,wjBACAH,CACF,EACC,GAAGC,GAEHI,EACD,gBAAiB,QAAhB,CAAsB,UAAU,0ZAC/B,gBAACE,GAAA,CAAE,UAAU,UAAU,EACvB,gBAAC,QAAK,UAAU,WAAU,OAAK,CACjC,CACF,CACF,CACD,EACDH,EAAc,YAA8B,UAAQ,YAEpD,IAAMI,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S,YAAc,WAEvB,IAAMmC,GAAkBa,GACtB,iJACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,CAAC,SAAU,WAAY,YAAY,EAC5C,KAAM,CACJ,YACA,cACA,6BACA,8BACF,CACF,EACA,KAAM,CACJ,MAAO,CAAC,MAAO,MAAO,OAAQ,SAAS,EACvC,OAAQ,CAAC,MAAO,MAAO,OAAQ,SAAS,EACxC,MAAO,CAAC,OAAQ,MAAO,OAAQ,WAAW,CAC5C,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,QACR,CACF,CACF","names":["forwardRef","useEffect","useState","ChevronDownIcon","cva","clsx","twMerge","cn","inputs","CommandPrimitive","Search","React","DialogPrimitive","X","React","DialogPortal","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogPortal","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","Search","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","Separator","className","orientation","decorative","props","ref","cn","CheckIcon","CheckboxPrimitive","Check","Minus","forwardRef","CheckboxToggle","forwardRef","className","props","ref","cn","Check","Minus","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","icons","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","CheckIcon","ListItem_default","cva","React","badgeVariants","cva","Badge","className","variant","props","cn","Label","text","className","props","cn","Label_default","Combobox","forwardRef","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","className","handleChange","children","valueArray","selected","setSelected","useState","open","setOpen","hideSearchBox","isDefault","isChip","useEffect","handleSelect","option","prev","v","handleDisplayValue","defaultLabel","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","ChevronDownIcon","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator","cva"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentPropsWithoutRef, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Option = { id: number; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange' | 'size'>\ntype MultiSelectProps = TriggerVariants & SelectProps & Shared & MultiSelect\ntype SingleSelectProps = TriggerVariants & SelectProps & Shared & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n className,\n onChange: handleChange,\n children,\n } = props\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n const [selected, setSelected] = useState<string[]>(valueArray)\n const [open, setOpen] = useState(false)\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n\n useEffect(() => {\n multiselect ? handleChange?.(selected) : handleChange?.(selected[0])\n }, [selected])\n\n const handleSelect = (option: string) => {\n if (multiselect) {\n return setSelected((prev) =>\n prev.includes(option) ? prev.filter((v) => v !== option) : [...prev, option]\n )\n }\n setSelected([option])\n setOpen(false)\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(triggerVariants({ variant, size }), classNames?.trigger)}\n aria-expanded={open}\n >\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n <ChevronDownIcon className=\"transform group-data-[state=open]:rotate-180\" size=\"16\" />\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected?.includes(option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!children && <Separator />}\n {children}\n </PopoverContent>\n </Command>\n </Popover>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'p-1', 'pl-2', 'text-xs'],\n normal: ['h-9', 'p-2', 'pl-3', 'text-sm'],\n large: ['h-10', 'p-3', 'pl-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n"],"mappings":"aAEA,OAAmC,cAAAA,GAAY,aAAAC,GAAW,YAAAC,OAAgB,QAC1E,OAAS,mBAAAC,OAAuB,eAChC,OAAS,OAAAC,OAA8B,MCJvC,OAA0B,QAAAC,OAAY,OACtC,OAAS,WAAAC,OAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,GAAQD,GAAKG,CAAM,CAAC,CAC7B,CCFA,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAAC,OAAc,eACvB,UAAYC,MAAW,QCFvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,OAAS,eAClB,UAAYC,MAAW,QAcrB,cAAAC,EA0BI,QAAAC,MA1BJ,oBARF,IAAMC,GAA+B,SAIrC,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BC,EAAiB,UAAhB,CACC,IAAKD,EACL,UAAWE,EACT,yJACAJ,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAA8B,UAAQ,YAEpD,IAAMM,EAAsB,aAG1B,CAAC,CAAE,UAAAL,EAAW,SAAAM,EAAU,GAAGL,CAAM,EAAGC,IACpCK,EAACC,GAAA,CACC,UAAAL,EAACJ,EAAA,EAAc,EACfQ,EAAiB,UAAhB,CACC,IAAKL,EACL,UAAWE,EACT,wjBACAJ,CACF,EACC,GAAGC,EAEH,UAAAK,EACDC,EAAiB,QAAhB,CAAsB,UAAU,yZAC/B,UAAAJ,EAACM,GAAA,CAAE,UAAU,UAAU,EACvBN,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDE,EAAc,YAA8B,UAAQ,YAEpD,IAAMK,GAAe,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,IA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AAsC,EAAI,GAAGlB,CAAO,IAC5B5B,EAAC+C,EAAA,CAAqB,MAAOnB,EAAO,MAAO,SAAUD,GACnD,SAAA3B,EAACgD,GAAA,CACC,UAAWf,EAAGxB,GAAY,MAAO,eAAe,EAChD,WAAYS,GAAU,SAASU,EAAO,KAAK,EAC3C,YAAalB,EACZ,GAAGkB,EACN,GANgBkB,CAOlB,CACD,EACH,GACF,EAEC,CAAC,CAAC9B,GAAYhB,EAACiD,EAAA,EAAU,EACzBjC,GACH,EACF,GACF,GACF,CAEJ,CAAC,EACDd,GAAS,YAAc,WAEvB,IAAMmC,GAAkBa,GACtB,iJACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,CAAC,SAAU,WAAY,YAAY,EAC5C,KAAM,CACJ,YACA,cACA,6BACA,8BACF,CACF,EACA,KAAM,CACJ,MAAO,CAAC,MAAO,MAAO,OAAQ,SAAS,EACvC,OAAQ,CAAC,MAAO,MAAO,OAAQ,SAAS,EACxC,MAAO,CAAC,OAAQ,MAAO,OAAQ,WAAW,CAC5C,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,QACR,CACF,CACF","names":["forwardRef","useEffect","useState","ChevronDownIcon","cva","clsx","twMerge","cn","inputs","CommandPrimitive","Search","React","DialogPrimitive","X","React","jsx","jsxs","DialogPortal","DialogOverlay","className","props","ref","jsx","cn","DialogContent","children","jsxs","DialogPortal","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","jsxs","jsx","Search","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","jsx","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","jsx","Separator","className","orientation","decorative","props","ref","cn","CheckIcon","CheckboxPrimitive","Check","Minus","forwardRef","jsx","jsxs","CheckboxToggle","forwardRef","className","props","ref","cn","Check","Minus","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","icons","jsx","jsxs","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","CheckIcon","ListItem_default","cva","jsx","badgeVariants","cva","Badge","className","variant","props","cn","jsx","Label","text","className","props","cn","Label_default","jsx","jsxs","Combobox","forwardRef","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","className","handleChange","children","valueArray","selected","setSelected","useState","open","setOpen","hideSearchBox","isDefault","isChip","useEffect","handleSelect","option","prev","v","handleDisplayValue","defaultLabel","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","ChevronDownIcon","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator","cva"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!m.call(e,r)&&r!==o&&l(e,r,{get:()=>t[r],enumerable:!(n=f(t,r))||n.enumerable});return e};var b=e=>d(l({},"__esModule",{value:!0}),e);var P={};c(P,{default:()=>C});module.exports=b(P);var p=require("clsx"),a=require("tailwind-merge");function s(...e){return(0,a.twMerge)((0,p.clsx)(e))}var i=require("react/jsx-runtime");function y({text:e,className:t,...o}){return e?(0,i.jsx)("label",{className:s("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var C=y;
|
|
2
2
|
//# sourceMappingURL=Label.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Label.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Label.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDOI,IAAAC,EAAA,6BAJJ,SAASC,EAAM,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAGC,CAAM,EAAoB,CAC7D,OAAKF,KAGH,OAAC,SACC,UAAWG,EACT,iFACAF,CACF,EACC,GAAGC,EAEH,SAAAF,EACH,EAXgB,IAapB,CAEA,IAAOI,EAAQL","names":["Label_exports","__export","Label_default","__toCommonJS","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","Label","text","className","props","cn","Label_default"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props extends ComponentPropsWithoutRef<'label'> {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function Label({ text, className, ...props }: Readonly<Props>):
|
|
7
|
+
declare function Label({ text, className, ...props }: Readonly<Props>): react_jsx_runtime.JSX.Element | null;
|
|
8
8
|
|
|
9
9
|
export { Label as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props extends ComponentPropsWithoutRef<'label'> {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function Label({ text, className, ...props }: Readonly<Props>):
|
|
7
|
+
declare function Label({ text, className, ...props }: Readonly<Props>): react_jsx_runtime.JSX.Element | null;
|
|
8
8
|
|
|
9
9
|
export { Label as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{clsx as
|
|
1
|
+
import{clsx as p}from"clsx";import{twMerge as a}from"tailwind-merge";function t(...e){return a(p(e))}import{jsx as i}from"react/jsx-runtime";function s({text:e,className:o,...r}){return e?i("label",{className:t("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o),...r,children:e}):null}var b=s;export{b as default};
|
|
2
2
|
//# sourceMappingURL=Label.js.map
|