@next-degree/pickle-shared-js 0.3.27 → 0.4.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/app/layout.css +59 -2
  2. package/dist/app/layout.css.map +1 -1
  3. package/dist/app/page.cjs +464 -114
  4. package/dist/app/page.cjs.map +1 -1
  5. package/dist/app/page.js +442 -92
  6. package/dist/app/page.js.map +1 -1
  7. package/dist/components/demos/ComboboxDemo.cjs +91 -52
  8. package/dist/components/demos/ComboboxDemo.cjs.map +1 -1
  9. package/dist/components/demos/ComboboxDemo.js +84 -45
  10. package/dist/components/demos/ComboboxDemo.js.map +1 -1
  11. package/dist/components/demos/CounterDemo.cjs +270 -0
  12. package/dist/components/demos/CounterDemo.cjs.map +1 -0
  13. package/dist/components/demos/CounterDemo.d.cts +5 -0
  14. package/dist/components/demos/CounterDemo.d.ts +5 -0
  15. package/dist/components/demos/CounterDemo.js +238 -0
  16. package/dist/components/demos/CounterDemo.js.map +1 -0
  17. package/dist/components/demos/InputDemo.cjs +74 -35
  18. package/dist/components/demos/InputDemo.cjs.map +1 -1
  19. package/dist/components/demos/InputDemo.js +59 -30
  20. package/dist/components/demos/InputDemo.js.map +1 -1
  21. package/dist/components/demos/PlacesQueryInputDemo.cjs +341 -0
  22. package/dist/components/demos/PlacesQueryInputDemo.cjs.map +1 -0
  23. package/dist/components/demos/PlacesQueryInputDemo.d.cts +5 -0
  24. package/dist/components/demos/PlacesQueryInputDemo.d.ts +5 -0
  25. package/dist/components/demos/PlacesQueryInputDemo.js +309 -0
  26. package/dist/components/demos/PlacesQueryInputDemo.js.map +1 -0
  27. package/dist/components/demos/SelectDemo.cjs +83 -53
  28. package/dist/components/demos/SelectDemo.cjs.map +1 -1
  29. package/dist/components/demos/SelectDemo.js +73 -43
  30. package/dist/components/demos/SelectDemo.js.map +1 -1
  31. package/dist/components/demos/index.cjs +462 -112
  32. package/dist/components/demos/index.cjs.map +1 -1
  33. package/dist/components/demos/index.js +440 -90
  34. package/dist/components/demos/index.js.map +1 -1
  35. package/dist/components/primitives/command.d.cts +1 -1
  36. package/dist/components/primitives/command.d.ts +1 -1
  37. package/dist/components/primitives/tooltip.cjs +75 -0
  38. package/dist/components/primitives/tooltip.cjs.map +1 -0
  39. package/dist/components/primitives/tooltip.d.cts +9 -0
  40. package/dist/components/primitives/tooltip.d.ts +9 -0
  41. package/dist/components/primitives/tooltip.js +38 -0
  42. package/dist/components/primitives/tooltip.js.map +1 -0
  43. package/dist/components/ui/Combobox.cjs +78 -40
  44. package/dist/components/ui/Combobox.cjs.map +1 -1
  45. package/dist/components/ui/Combobox.d.cts +5 -2
  46. package/dist/components/ui/Combobox.d.ts +5 -2
  47. package/dist/components/ui/Combobox.js +71 -33
  48. package/dist/components/ui/Combobox.js.map +1 -1
  49. package/dist/components/ui/Counter.cjs +248 -0
  50. package/dist/components/ui/Counter.cjs.map +1 -0
  51. package/dist/components/ui/Counter.d.cts +28 -0
  52. package/dist/components/ui/Counter.d.ts +28 -0
  53. package/dist/components/ui/Counter.js +214 -0
  54. package/dist/components/ui/Counter.js.map +1 -0
  55. package/dist/components/ui/Input.cjs +67 -28
  56. package/dist/components/ui/Input.cjs.map +1 -1
  57. package/dist/components/ui/Input.d.cts +2 -1
  58. package/dist/components/ui/Input.d.ts +2 -1
  59. package/dist/components/ui/Input.js +54 -25
  60. package/dist/components/ui/Input.js.map +1 -1
  61. package/dist/components/ui/Label.cjs +54 -16
  62. package/dist/components/ui/Label.cjs.map +1 -1
  63. package/dist/components/ui/Label.d.cts +2 -1
  64. package/dist/components/ui/Label.d.ts +2 -1
  65. package/dist/components/ui/Label.js +44 -16
  66. package/dist/components/ui/Label.js.map +1 -1
  67. package/dist/components/ui/PlacesQueryInput.cjs +321 -0
  68. package/dist/components/ui/PlacesQueryInput.cjs.map +1 -0
  69. package/dist/components/ui/PlacesQueryInput.d.cts +18 -0
  70. package/dist/components/ui/PlacesQueryInput.d.ts +18 -0
  71. package/dist/components/ui/PlacesQueryInput.js +289 -0
  72. package/dist/components/ui/PlacesQueryInput.js.map +1 -0
  73. package/dist/components/ui/Select.cjs +75 -46
  74. package/dist/components/ui/Select.cjs.map +1 -1
  75. package/dist/components/ui/Select.d.cts +3 -2
  76. package/dist/components/ui/Select.d.ts +3 -2
  77. package/dist/components/ui/Select.js +67 -38
  78. package/dist/components/ui/Select.js.map +1 -1
  79. package/dist/index.cjs +536 -230
  80. package/dist/index.cjs.map +1 -1
  81. package/dist/index.d.cts +3 -0
  82. package/dist/index.d.ts +3 -0
  83. package/dist/index.js +510 -206
  84. package/dist/index.js.map +1 -1
  85. package/dist/lib/google.cjs +43 -0
  86. package/dist/lib/google.cjs.map +1 -0
  87. package/dist/lib/google.d.cts +5 -0
  88. package/dist/lib/google.d.ts +5 -0
  89. package/dist/lib/google.js +19 -0
  90. package/dist/lib/google.js.map +1 -0
  91. package/dist/styles/globals.css +59 -2
  92. package/dist/styles/globals.css.map +1 -1
  93. package/package.json +22 -21
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // src/components/ui/Combobox.tsx
4
- import { forwardRef as forwardRef6, useEffect, useState } from "react";
4
+ import { forwardRef as forwardRef7, useEffect, useState } from "react";
5
5
  import { ChevronDownIcon, CircleX, icons as icons2 } from "lucide-react";
6
6
  import { cva as cva2 } from "cva";
7
7
 
@@ -341,30 +341,58 @@ function Badge({ className, variant, ...props }) {
341
341
  return /* @__PURE__ */ jsx7("div", { className: cn(badgeVariants({ variant }), className), ...props });
342
342
  }
343
343
 
344
+ // src/components/primitives/tooltip.tsx
345
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
346
+ import * as React5 from "react";
347
+ import { jsx as jsx8 } from "react/jsx-runtime";
348
+ var TooltipProvider = TooltipPrimitive.Provider;
349
+ var Tooltip = TooltipPrimitive.Root;
350
+ var TooltipTrigger = TooltipPrimitive.Trigger;
351
+ var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx8(
352
+ TooltipPrimitive.Content,
353
+ {
354
+ ref,
355
+ sideOffset,
356
+ className: cn(
357
+ "z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
358
+ className
359
+ ),
360
+ ...props
361
+ }
362
+ ));
363
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
364
+
344
365
  // src/components/ui/Label.tsx
345
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
346
- function Label({ text, required, className, ...props }) {
366
+ import { InfoIcon } from "lucide-react";
367
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
368
+ function Label({ text, required, description, className, ...props }) {
347
369
  if (!text) return null;
348
- return /* @__PURE__ */ jsxs5(
349
- "label",
350
- {
351
- className: cn(
352
- "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
353
- className
354
- ),
355
- ...props,
356
- children: [
357
- text,
358
- required && /* @__PURE__ */ jsx8("span", { className: "text-red-600", children: "\xA0*" })
359
- ]
360
- }
361
- );
370
+ return /* @__PURE__ */ jsxs5("div", { className: "flex w-full flex-row gap-1", children: [
371
+ /* @__PURE__ */ jsxs5(
372
+ "label",
373
+ {
374
+ className: cn(
375
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
376
+ className
377
+ ),
378
+ ...props,
379
+ children: [
380
+ text,
381
+ required && /* @__PURE__ */ jsx9("span", { className: "text-red-600", children: "\xA0*" })
382
+ ]
383
+ }
384
+ ),
385
+ !!description && /* @__PURE__ */ jsx9(TooltipProvider, { children: /* @__PURE__ */ jsxs5(Tooltip, { children: [
386
+ /* @__PURE__ */ jsx9(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx9(InfoIcon, { className: "h-4 w-4" }) }),
387
+ /* @__PURE__ */ jsx9(TooltipContent, { className: "max-w-48", children: description })
388
+ ] }) })
389
+ ] });
362
390
  }
363
391
  var Label_default = Label;
364
392
 
365
393
  // src/components/ui/Combobox.tsx
366
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
367
- var Combobox = forwardRef6((props, ref) => {
394
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
395
+ var Combobox = forwardRef7((props, ref) => {
368
396
  const {
369
397
  id,
370
398
  name,
@@ -372,6 +400,7 @@ var Combobox = forwardRef6((props, ref) => {
372
400
  label,
373
401
  options,
374
402
  required,
403
+ description,
375
404
  classNames,
376
405
  multiselect,
377
406
  placeholder,
@@ -420,10 +449,19 @@ var Combobox = forwardRef6((props, ref) => {
420
449
  return isDefault ? defaultLabel : label;
421
450
  };
422
451
  return /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col gap-1", className), children: [
423
- isDefault && /* @__PURE__ */ jsx9(Label_default, { text: label, htmlFor: name, required, className: classNames?.label }),
452
+ isDefault && /* @__PURE__ */ jsx10(
453
+ Label_default,
454
+ {
455
+ text: label,
456
+ htmlFor: name,
457
+ required,
458
+ description,
459
+ className: classNames?.label
460
+ }
461
+ ),
424
462
  /* @__PURE__ */ jsxs6("div", { className: "relative flex", children: [
425
463
  /* @__PURE__ */ jsxs6(Popover, { open, onOpenChange: setOpen, children: [
426
- /* @__PURE__ */ jsx9(
464
+ /* @__PURE__ */ jsx10(
427
465
  PopoverTrigger,
428
466
  {
429
467
  asChild: true,
@@ -440,9 +478,9 @@ var Combobox = forwardRef6((props, ref) => {
440
478
  ),
441
479
  "aria-expanded": open,
442
480
  children: [
443
- isDefault && IconComponent && /* @__PURE__ */ jsx9(IconComponent, { className: "h-4 w-4 shrink-0" }),
444
- isChip && !isEmpty && /* @__PURE__ */ jsx9(Badge, { variant: "purple", children: selected.length }),
445
- /* @__PURE__ */ jsx9(
481
+ isDefault && IconComponent && /* @__PURE__ */ jsx10(IconComponent, { className: "h-4 w-4 shrink-0" }),
482
+ isChip && !isEmpty && /* @__PURE__ */ jsx10(Badge, { variant: "purple", children: selected.length }),
483
+ /* @__PURE__ */ jsx10(
446
484
  "span",
447
485
  {
448
486
  className: cn(
@@ -452,7 +490,7 @@ var Combobox = forwardRef6((props, ref) => {
452
490
  children: handleDisplayValue()
453
491
  }
454
492
  ),
455
- showChevron && /* @__PURE__ */ jsx9(
493
+ showChevron && /* @__PURE__ */ jsx10(
456
494
  ChevronDownIcon,
457
495
  {
458
496
  className: "shrink-0 transform group-data-[state=open]:rotate-180",
@@ -464,7 +502,7 @@ var Combobox = forwardRef6((props, ref) => {
464
502
  )
465
503
  }
466
504
  ),
467
- /* @__PURE__ */ jsx9(
505
+ /* @__PURE__ */ jsx10(
468
506
  PopoverContent,
469
507
  {
470
508
  className: cn(
@@ -476,15 +514,15 @@ var Combobox = forwardRef6((props, ref) => {
476
514
  sideOffset: 4,
477
515
  align: "start",
478
516
  children: /* @__PURE__ */ jsxs6(Command, { children: [
479
- !hideSearchBox && /* @__PURE__ */ jsx9(CommandInput, { placeholder: "Search..." }),
517
+ !hideSearchBox && /* @__PURE__ */ jsx10(CommandInput, { placeholder: "Search..." }),
480
518
  /* @__PURE__ */ jsxs6(CommandList, { children: [
481
- /* @__PURE__ */ jsx9(CommandEmpty, { children: "No results" }),
482
- /* @__PURE__ */ jsx9(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ jsx9(
519
+ /* @__PURE__ */ jsx10(CommandEmpty, { children: "No results" }),
520
+ /* @__PURE__ */ jsx10(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ jsx10(
483
521
  CommandItem,
484
522
  {
485
523
  value: option.title,
486
524
  onSelect: () => handleSelect(option.value),
487
- children: /* @__PURE__ */ jsx9(
525
+ children: /* @__PURE__ */ jsx10(
488
526
  ListItem_default,
489
527
  {
490
528
  className: cn(classNames?.items, "truncate py-1"),
@@ -497,19 +535,19 @@ var Combobox = forwardRef6((props, ref) => {
497
535
  id2
498
536
  )) })
499
537
  ] }),
500
- !!footer && /* @__PURE__ */ jsx9(Separator, {}),
538
+ !!footer && /* @__PURE__ */ jsx10(Separator, {}),
501
539
  footer && footer({ close })
502
540
  ] })
503
541
  }
504
542
  )
505
543
  ] }),
506
- isDefault && !isEmpty && /* @__PURE__ */ jsx9(
544
+ isDefault && !isEmpty && /* @__PURE__ */ jsx10(
507
545
  "button",
508
546
  {
509
547
  type: "button",
510
548
  className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
511
549
  onClick: handleClear,
512
- children: /* @__PURE__ */ jsx9(CircleX, { className: "h-4 w-4 text-green-100" })
550
+ children: /* @__PURE__ */ jsx10(CircleX, { className: "h-4 w-4 text-green-100" })
513
551
  }
514
552
  )
515
553
  ] })
@@ -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 { ComponentProps, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon, CircleX, icons } 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 Icon = { icon?: keyof typeof icons }\ntype Children = { children?: (props: { close: () => void }) => JSX.Element }\ntype Option = { id: string; 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<ComponentProps<'select'>, 'value' | 'onChange' | 'size' | 'children'>\ntype Props = TriggerVariants & SelectProps & Children & Shared & Icon\ntype MultiSelectProps = Props & MultiSelect\ntype SingleSelectProps = Props & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n id,\n name,\n value,\n label,\n options,\n required,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n icon,\n className,\n onChange: handleChange,\n children: footer,\n } = props\n const [selected, setSelected] = useState<Option[]>([])\n const [open, setOpen] = useState(false)\n const IconComponent = icon && icons[icon]\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n const isEmpty = selected.length == 0\n const showChevron = isDefault ? isEmpty : true\n const close = () => setOpen(false)\n\n useEffect(() => {\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n setSelected(\n valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== undefined)\n )\n }, [value])\n\n const handleSelect = (value: string) => {\n const option = options.find((o) => o.value === value)\n if (!option) return\n if (multiselect) {\n return setSelected((prev) => {\n const newSelected = prev.some((o) => o.value === value)\n ? prev.filter((v) => v !== option)\n : [...prev, option]\n handleChange?.(newSelected.map((o) => o.value))\n return newSelected\n })\n }\n setSelected([option])\n handleChange?.(option.value)\n close()\n }\n\n const handleClear = () => {\n setSelected([])\n multiselect ? handleChange?.([]) : handleChange?.('')\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n {isDefault && (\n <Label text={label} htmlFor={name} required={required} className={classNames?.label} />\n )}\n\n <div className=\"relative flex\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n asChild\n disabled={options.length === 0}\n data-testid={`${id ?? name}-combobox-trigger`}\n >\n <div\n ref={ref}\n className={cn(\n triggerVariants({ variant, size }),\n isDefault && !isEmpty && 'pr-10',\n classNames?.trigger\n )}\n aria-expanded={open}\n >\n {isDefault && IconComponent && <IconComponent className=\"h-4 w-4 shrink-0\" />}\n {isChip && !isEmpty && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'w-full truncate leading-normal',\n isDefault && isEmpty && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n {showChevron && (\n <ChevronDownIcon\n className=\"shrink-0 transform group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n )}\n </div>\n </PopoverTrigger>\n\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 <Command>\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem\n key={id}\n value={option.title}\n onSelect={() => handleSelect(option.value)}\n >\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected.some((s) => s.value === option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!footer && <Separator />}\n {footer && footer({ close })}\n </Command>\n </PopoverContent>\n </Popover>\n\n {isDefault && !isEmpty && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer text-green-100 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', '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', 'py-1', 'px-2', 'text-xs'],\n normal: ['h-9', 'py-2', 'px-3', 'text-sm'],\n large: ['h-10', 'py-3', 'px-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 required?: boolean\n}\n\nfunction Label({ text, required, 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 {required && <span className=\"text-red-600\">&nbsp;*</span>}\n </label>\n )\n}\n\nexport default Label\n"],"mappings":";;;AAEA,SAAyB,cAAAA,aAAY,WAAW,gBAAgB;AAChE,SAAS,iBAAiB,SAAS,SAAAC,cAAa;AAChD,SAAS,OAAAC,YAA8B;;;ACJvC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACFA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,cAAc;AACvB,YAAYC,YAAW;;;ACFvB,YAAY,qBAAqB;AACjC,SAAS,SAAS;AAClB,YAAY,WAAW;AAcrB,cA0BI,YA1BJ;AARF,IAAM,eAA+B;AAIrC,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,cAAc,cAA8B,wBAAQ;AAEpD,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,qBAAC,gBACC;AAAA,sBAAC,iBAAc;AAAA,EACf;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,qBAAiB,uBAAhB,EAA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AO,KAAK;AAAA,wBACzD,aAAa;AAAA,wBACZ,GAAG;AAAA;AAAA,oBACN;AAAA;AAAA,kBATKK;AAAA,gBAUP,CACD,GACH;AAAA,iBACF;AAAA,cAEC,CAAC,CAAC,UAAU,gBAAAL,KAAC,aAAU;AAAA,cACvB,UAAU,OAAO,EAAE,MAAM,CAAC;AAAA,eAC7B;AAAA;AAAA,QACF;AAAA,SACF;AAAA,MAEC,aAAa,CAAC,WACb,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS;AAAA,UAET,0BAAAA,KAAC,WAAQ,WAAU,0BAAyB;AAAA;AAAA,MAC9C;AAAA,OAEJ;AAAA,KACF;AAEJ,CAAC;AACD,SAAS,cAAc;AAEvB,IAAM,kBAAkBM;AAAA,EACtB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS,CAAC,UAAU,YAAY;AAAA,QAChC,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ,OAAO,CAAC,OAAO,QAAQ,QAAQ,SAAS;AAAA,QACxC,QAAQ,CAAC,OAAO,QAAQ,QAAQ,SAAS;AAAA,QACzC,OAAO,CAAC,QAAQ,QAAQ,QAAQ,WAAW;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["forwardRef","icons","cva","React","jsx","jsxs","jsxs","jsx","React","jsx","React","jsx","forwardRef","jsx","jsxs","forwardRef","jsx","jsxs","icon","jsx","jsx","jsxs","jsx","jsxs","forwardRef","icons","value","id","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/primitives/tooltip.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentProps, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon, CircleX, icons } 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 Icon = { icon?: keyof typeof icons }\ntype LabelProps = { label?: string; description?: string }\ntype Children = { children?: (props: { close: () => void }) => JSX.Element }\ntype Option = { id: string; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { 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<ComponentProps<'select'>, 'value' | 'onChange' | 'size' | 'children'>\ntype Props = TriggerVariants & SelectProps & Children & Shared & Icon & LabelProps\ntype MultiSelectProps = Props & MultiSelect\ntype SingleSelectProps = Props & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n id,\n name,\n value,\n label,\n options,\n required,\n description,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n icon,\n className,\n onChange: handleChange,\n children: footer,\n } = props\n const [selected, setSelected] = useState<Option[]>([])\n const [open, setOpen] = useState(false)\n const IconComponent = icon && icons[icon]\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n const isEmpty = selected.length == 0\n const showChevron = isDefault ? isEmpty : true\n const close = () => setOpen(false)\n\n useEffect(() => {\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n setSelected(\n valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== undefined)\n )\n }, [value])\n\n const handleSelect = (value: string) => {\n const option = options.find((o) => o.value === value)\n if (!option) return\n if (multiselect) {\n return setSelected((prev) => {\n const newSelected = prev.some((o) => o.value === value)\n ? prev.filter((v) => v !== option)\n : [...prev, option]\n handleChange?.(newSelected.map((o) => o.value))\n return newSelected\n })\n }\n setSelected([option])\n handleChange?.(option.value)\n close()\n }\n\n const handleClear = () => {\n setSelected([])\n multiselect ? handleChange?.([]) : handleChange?.('')\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n {isDefault && (\n <Label\n text={label}\n htmlFor={name}\n required={required}\n description={description}\n className={classNames?.label}\n />\n )}\n\n <div className=\"relative flex\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n asChild\n disabled={options.length === 0}\n data-testid={`${id ?? name}-combobox-trigger`}\n >\n <div\n ref={ref}\n className={cn(\n triggerVariants({ variant, size }),\n isDefault && !isEmpty && 'pr-10',\n classNames?.trigger\n )}\n aria-expanded={open}\n >\n {isDefault && IconComponent && <IconComponent className=\"h-4 w-4 shrink-0\" />}\n {isChip && !isEmpty && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'w-full truncate leading-normal',\n isDefault && isEmpty && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n {showChevron && (\n <ChevronDownIcon\n className=\"shrink-0 transform group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n )}\n </div>\n </PopoverTrigger>\n\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 <Command>\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem\n key={id}\n value={option.title}\n onSelect={() => handleSelect(option.value)}\n >\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected.some((s) => s.value === option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!footer && <Separator />}\n {footer && footer({ close })}\n </Command>\n </PopoverContent>\n </Popover>\n\n {isDefault && !isEmpty && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer text-green-100 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', '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', 'py-1', 'px-2', 'text-xs'],\n normal: ['h-9', 'py-2', 'px-3', 'text-sm'],\n large: ['h-10', 'py-3', 'px-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","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { InfoIcon } from 'lucide-react'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\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 {required && <span className=\"text-red-600\">&nbsp;*</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n"],"mappings":";;;AAEA,SAAyB,cAAAA,aAAY,WAAW,gBAAgB;AAChE,SAAS,iBAAiB,SAAS,SAAAC,cAAa;AAChD,SAAS,OAAAC,YAA8B;;;ACJvC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACFA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,cAAc;AACvB,YAAYC,YAAW;;;ACFvB,YAAY,qBAAqB;AACjC,SAAS,SAAS;AAClB,YAAY,WAAW;AAcrB,cA0BI,YA1BJ;AARF,IAAM,eAA+B;AAIrC,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,I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AAA,cACvB,UAAU,OAAO,EAAE,MAAM,CAAC;AAAA,eAC7B;AAAA;AAAA,QACF;AAAA,SACF;AAAA,MAEC,aAAa,CAAC,WACb,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS;AAAA,UAET,0BAAAA,MAAC,WAAQ,WAAU,0BAAyB;AAAA;AAAA,MAC9C;AAAA,OAEJ;AAAA,KACF;AAEJ,CAAC;AACD,SAAS,cAAc;AAEvB,IAAM,kBAAkBM;AAAA,EACtB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS,CAAC,UAAU,YAAY;AAAA,QAChC,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ,OAAO,CAAC,OAAO,QAAQ,QAAQ,SAAS;AAAA,QACxC,QAAQ,CAAC,OAAO,QAAQ,QAAQ,SAAS;AAAA,QACzC,OAAO,CAAC,QAAQ,QAAQ,QAAQ,WAAW;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["forwardRef","icons","cva","React","jsx","jsxs","jsxs","jsx","React","jsx","React","jsx","forwardRef","jsx","jsxs","forwardRef","jsx","jsxs","icon","jsx","React","jsx","jsx","jsxs","jsx","jsxs","forwardRef","icons","value","id","cva"]}
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/components/ui/Counter.tsx
32
+ var Counter_exports = {};
33
+ __export(Counter_exports, {
34
+ Counter: () => Counter
35
+ });
36
+ module.exports = __toCommonJS(Counter_exports);
37
+ var import_cva = require("cva");
38
+ var import_lucide_react2 = require("lucide-react");
39
+ var import_react = require("react");
40
+
41
+ // src/lib/utils.ts
42
+ var import_clsx = require("clsx");
43
+ var import_tailwind_merge = require("tailwind-merge");
44
+ function cn(...inputs) {
45
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
46
+ }
47
+
48
+ // src/components/ui/ErrorMessage.tsx
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ function ErrorMessage({ message, className, ...props }) {
51
+ if (!message) return null;
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
53
+ }
54
+ var ErrorMessage_default = ErrorMessage;
55
+
56
+ // src/components/primitives/tooltip.tsx
57
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
58
+ var React = __toESM(require("react"), 1);
59
+ var import_jsx_runtime2 = require("react/jsx-runtime");
60
+ var TooltipProvider = TooltipPrimitive.Provider;
61
+ var Tooltip = TooltipPrimitive.Root;
62
+ var TooltipTrigger = TooltipPrimitive.Trigger;
63
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
64
+ TooltipPrimitive.Content,
65
+ {
66
+ ref,
67
+ sideOffset,
68
+ className: cn(
69
+ "z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
70
+ className
71
+ ),
72
+ ...props
73
+ }
74
+ ));
75
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
76
+
77
+ // src/components/ui/Label.tsx
78
+ var import_lucide_react = require("lucide-react");
79
+ var import_jsx_runtime3 = require("react/jsx-runtime");
80
+ function Label({ text, required, description, className, ...props }) {
81
+ if (!text) return null;
82
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
83
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
84
+ "label",
85
+ {
86
+ className: cn(
87
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
88
+ className
89
+ ),
90
+ ...props,
91
+ children: [
92
+ text,
93
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-600", children: "\xA0*" })
94
+ ]
95
+ }
96
+ ),
97
+ !!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { children: [
98
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContent, { className: "max-w-48", children: description })
100
+ ] }) })
101
+ ] });
102
+ }
103
+ var Label_default = Label;
104
+
105
+ // src/components/ui/Counter.tsx
106
+ var import_jsx_runtime4 = require("react/jsx-runtime");
107
+ var Counter = (0, import_react.forwardRef)(
108
+ ({ label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props }, ref) => {
109
+ const [count, setCount] = (0, import_react.useState)(0);
110
+ (0, import_react.useEffect)(() => {
111
+ setCount(value ?? 0);
112
+ }, [value]);
113
+ const handleChange = (e) => {
114
+ const newValue = parseInt(e.target.value.replace(/\D/g, ""), 10);
115
+ if (isNaN(newValue)) return;
116
+ if (min && newValue < min) {
117
+ onChange?.(min);
118
+ setCount(min);
119
+ return;
120
+ }
121
+ if (max && newValue > max) {
122
+ onChange?.(max);
123
+ setCount(max);
124
+ return;
125
+ }
126
+ onChange?.(newValue);
127
+ setCount(newValue);
128
+ };
129
+ const decrement = () => {
130
+ const proposedValue = count - step;
131
+ const newValue = Math.max(min ?? -Infinity, proposedValue);
132
+ onChange?.(newValue);
133
+ setCount(newValue);
134
+ };
135
+ const increment = () => {
136
+ const proposedValue = count + step;
137
+ const newValue = Math.min(max ?? Infinity, proposedValue);
138
+ onChange?.(newValue);
139
+ setCount(newValue);
140
+ };
141
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
142
+ "div",
143
+ {
144
+ className: cn("flex w-auto flex-col gap-1", classNames?.root),
145
+ "data-testid": `counter-wrapper-${props.id}`,
146
+ children: [
147
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
148
+ Label_default,
149
+ {
150
+ text: label,
151
+ htmlFor: props.name,
152
+ required: props.required,
153
+ description,
154
+ className: classNames?.label
155
+ }
156
+ ),
157
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "relative flex w-[122px] flex-row items-center", children: [
158
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
159
+ "button",
160
+ {
161
+ type: "button",
162
+ className: "absolute inset-y-0 left-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
163
+ onClick: decrement,
164
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.Minus, { className: "h-4 w-4 text-green-100" })
165
+ }
166
+ ),
167
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
168
+ "input",
169
+ {
170
+ className: cn(counterVariants({ theme }), classNames?.input),
171
+ ref,
172
+ value: count,
173
+ onChange: handleChange,
174
+ "data-testid": `counter-element-${props.id}`,
175
+ ...props
176
+ }
177
+ ),
178
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
179
+ "button",
180
+ {
181
+ type: "button",
182
+ className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
183
+ onClick: increment,
184
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.Plus, { className: "h-4 w-4 text-green-100" })
185
+ }
186
+ )
187
+ ] }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorMessage_default, { message: error })
189
+ ]
190
+ }
191
+ );
192
+ }
193
+ );
194
+ Counter.displayName = "Counter";
195
+ var counterVariants = (0, import_cva.cva)(
196
+ [
197
+ "border-input",
198
+ "placeholder:text-muted-foreground",
199
+ "focus-visible:ring-ring",
200
+ "inline-flex",
201
+ "w-[122px]",
202
+ "h-11",
203
+ "items-center",
204
+ "justify-start",
205
+ "gap-3",
206
+ "rounded-lg",
207
+ "bg-transparent",
208
+ "px-3",
209
+ "pt-0.5",
210
+ "text-sm",
211
+ "text-center",
212
+ "shadow-sm",
213
+ "ring-grey-50",
214
+ "transition-colors",
215
+ "focus-visible:outline-none",
216
+ "focus-visible:ring-1",
217
+ "disabled:cursor-not-allowed",
218
+ "disabled:opacity-50",
219
+ "appearance-none",
220
+ "[&::-webkit-search-cancel-button]:appearance-none",
221
+ "[&::-webkit-search-decoration]:appearance-none",
222
+ "[&::-webkit-search-results-button]:appearance-none",
223
+ "[&::-webkit-search-results-decoration]:appearance-none",
224
+ "[&::-ms-clear]:display-none",
225
+ "[&::-ms-reveal]:display-none"
226
+ ],
227
+ {
228
+ variants: {
229
+ theme: {
230
+ light: "text-grey-80 border",
231
+ dark: "text-white"
232
+ },
233
+ hasIcon: {
234
+ false: "pl-3",
235
+ true: "pl-8"
236
+ }
237
+ },
238
+ defaultVariants: {
239
+ theme: "light",
240
+ hasIcon: false
241
+ }
242
+ }
243
+ );
244
+ // Annotate the CommonJS export names for ESM import in node:
245
+ 0 && (module.exports = {
246
+ Counter
247
+ });
248
+ //# sourceMappingURL=Counter.cjs.map