@next-degree/pickle-shared-js 0.3.23 → 0.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,138 @@
1
+ // src/components/ui/Input.tsx
2
+ import { cva } from "cva";
3
+ import { icons, X } from "lucide-react";
4
+ import { forwardRef } from "react";
5
+
6
+ // src/lib/utils.ts
7
+ import { clsx } from "clsx";
8
+ import { twMerge } from "tailwind-merge";
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+
13
+ // src/components/ui/ErrorMessage.tsx
14
+ import { jsx } from "react/jsx-runtime";
15
+ function ErrorMessage({ message, className, ...props }) {
16
+ if (!message) return null;
17
+ return /* @__PURE__ */ jsx("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
18
+ }
19
+ var ErrorMessage_default = ErrorMessage;
20
+
21
+ // src/components/ui/Label.tsx
22
+ import { jsx as jsx2 } from "react/jsx-runtime";
23
+ function Label({ text, className, ...props }) {
24
+ if (!text) return null;
25
+ return /* @__PURE__ */ jsx2(
26
+ "label",
27
+ {
28
+ className: cn(
29
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
30
+ className
31
+ ),
32
+ ...props,
33
+ children: text
34
+ }
35
+ );
36
+ }
37
+ var Label_default = Label;
38
+
39
+ // src/components/ui/Input.tsx
40
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
41
+ var Input = forwardRef(
42
+ ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
43
+ const handleClear = () => {
44
+ onChange?.({ target: { value: "" } });
45
+ onClear?.();
46
+ };
47
+ const IconComponent = icon && icons[icon];
48
+ const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
49
+ const hasIcon = !!icon;
50
+ const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
51
+ return /* @__PURE__ */ jsxs("div", { className: "group flex w-full flex-col", "data-testid": `input-wrapper-${props.id}`, children: [
52
+ label && /* @__PURE__ */ jsx3(Label_default, { text: label, htmlFor: props.name, className: cn("body mb-1", classNames?.label) }),
53
+ /* @__PURE__ */ jsxs("div", { className: "relative flex flex-row items-center", children: [
54
+ IconComponent && /* @__PURE__ */ jsx3(
55
+ IconComponent,
56
+ {
57
+ className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
58
+ }
59
+ ),
60
+ /* @__PURE__ */ jsx3(
61
+ "input",
62
+ {
63
+ className: cn(inputVariants({ theme, hasIcon })),
64
+ ref,
65
+ placeholder,
66
+ value,
67
+ onChange,
68
+ "data-testid": `input-element-${props.id}`,
69
+ ...props
70
+ }
71
+ ),
72
+ hasIcon && value && /* @__PURE__ */ jsx3(
73
+ X,
74
+ {
75
+ className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
76
+ onClick: handleClear,
77
+ "data-testid": "clear-button"
78
+ }
79
+ )
80
+ ] }),
81
+ /* @__PURE__ */ jsx3(ErrorMessage_default, { message: error, className: "mt-1" })
82
+ ] });
83
+ }
84
+ );
85
+ Input.displayName = "Input";
86
+ var inputVariants = cva(
87
+ [
88
+ "border-input",
89
+ "placeholder:text-muted-foreground",
90
+ "focus-visible:ring-ring",
91
+ "inline-flex",
92
+ "w-full",
93
+ "h-11",
94
+ "items-center",
95
+ "justify-start",
96
+ "gap-3",
97
+ "rounded-lg",
98
+ "bg-transparent",
99
+ "px-3",
100
+ "pt-0.5",
101
+ "text-sm",
102
+ "shadow-sm",
103
+ "ring-grey-50",
104
+ "transition-colors",
105
+ "focus-visible:outline-none",
106
+ "focus-visible:ring-1",
107
+ "disabled:cursor-not-allowed",
108
+ "disabled:opacity-50",
109
+ "appearance-none",
110
+ "[&::-webkit-search-cancel-button]:appearance-none",
111
+ "[&::-webkit-search-decoration]:appearance-none",
112
+ "[&::-webkit-search-results-button]:appearance-none",
113
+ "[&::-webkit-search-results-decoration]:appearance-none",
114
+ "[&::-ms-clear]:display-none",
115
+ "[&::-ms-reveal]:display-none"
116
+ ],
117
+ {
118
+ variants: {
119
+ theme: {
120
+ light: "text-grey-80 border",
121
+ dark: "text-white"
122
+ },
123
+ hasIcon: {
124
+ false: "pl-3",
125
+ true: "pl-8"
126
+ }
127
+ },
128
+ defaultVariants: {
129
+ theme: "light",
130
+ hasIcon: false
131
+ }
132
+ }
133
+ );
134
+ var Input_default = Input;
135
+ export {
136
+ Input_default as default
137
+ };
138
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ui/Input.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'cva'\nimport { icons, X } from 'lucide-react'\nimport { type ChangeEvent, forwardRef, type InputHTMLAttributes } from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {\n label?: string\n error?: string\n icon?: keyof typeof icons\n onClear?: () => void\n classNames?: { label?: string }\n}\n\nconst Input = forwardRef<HTMLInputElement, Props>(\n ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {\n const handleClear = () => {\n onChange?.({ target: { value: '' } } as ChangeEvent<HTMLInputElement>)\n onClear?.()\n }\n\n const IconComponent = icon && icons[icon]\n\n const placeholder = props.placeholder ?? (icon === 'Search' ? 'Search...' : '')\n const hasIcon = !!icon\n\n const iconColor = theme === 'dark' ? 'text-white' : 'text-grey-80'\n\n return (\n <div className=\"group flex w-full flex-col\" data-testid={`input-wrapper-${props.id}`}>\n {label && (\n <Label text={label} htmlFor={props.name} className={cn('body mb-1', classNames?.label)} />\n )}\n <div className=\"relative flex flex-row items-center\">\n {IconComponent && (\n <IconComponent\n className={`absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`}\n />\n )}\n <input\n className={cn(inputVariants({ theme, hasIcon }))}\n ref={ref}\n placeholder={placeholder}\n value={value}\n onChange={onChange}\n data-testid={`input-element-${props.id}`}\n {...props}\n />\n {hasIcon && value && (\n <X\n className={`absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`}\n onClick={handleClear}\n data-testid=\"clear-button\"\n />\n )}\n </div>\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </div>\n )\n }\n)\nInput.displayName = 'Input'\n\nconst inputVariants = cva(\n [\n 'border-input',\n 'placeholder:text-muted-foreground',\n 'focus-visible:ring-ring',\n 'inline-flex',\n 'w-full',\n 'h-11',\n 'items-center',\n 'justify-start',\n 'gap-3',\n 'rounded-lg',\n 'bg-transparent',\n 'px-3',\n 'pt-0.5',\n 'text-sm',\n 'shadow-sm',\n 'ring-grey-50',\n 'transition-colors',\n 'focus-visible:outline-none',\n 'focus-visible:ring-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none',\n '[&::-webkit-search-results-decoration]:appearance-none',\n '[&::-ms-clear]:display-none',\n '[&::-ms-reveal]:display-none',\n ],\n {\n variants: {\n theme: {\n light: 'text-grey-80 border',\n dark: 'text-white',\n },\n hasIcon: {\n false: 'pl-3',\n true: 'pl-8',\n },\n },\n defaultVariants: {\n theme: 'light',\n hasIcon: false,\n },\n }\n)\n\nexport default Input\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","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\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":"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","names":["jsx","jsx"]}
package/dist/index.cjs CHANGED
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  Checkbox: () => Checkbox_default,
36
36
  Chip: () => Chip_default,
37
37
  Combobox: () => Combobox,
38
+ Input: () => Input_default,
38
39
  Label: () => Label_default,
39
40
  ListItem: () => ListItem_default,
40
41
  Select: () => Select_default,
@@ -380,15 +381,115 @@ function ListItem({
380
381
  }
381
382
  var ListItem_default = ListItem;
382
383
 
383
- // src/components/ui/Button.tsx
384
- var import_react_slot = require("@radix-ui/react-slot");
384
+ // src/components/ui/Input.tsx
385
385
  var import_cva2 = require("cva");
386
+ var import_lucide_react5 = require("lucide-react");
386
387
  var import_react3 = require("react");
387
388
  var import_jsx_runtime8 = require("react/jsx-runtime");
388
- var Button = (0, import_react3.forwardRef)(
389
+ var Input = (0, import_react3.forwardRef)(
390
+ ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
391
+ const handleClear = () => {
392
+ onChange?.({ target: { value: "" } });
393
+ onClear?.();
394
+ };
395
+ const IconComponent = icon && import_lucide_react5.icons[icon];
396
+ const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
397
+ const hasIcon = !!icon;
398
+ const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
399
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "group flex w-full flex-col", "data-testid": `input-wrapper-${props.id}`, children: [
400
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Label_default, { text: label, htmlFor: props.name, className: cn("body mb-1", classNames?.label) }),
401
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "relative flex flex-row items-center", children: [
402
+ IconComponent && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
403
+ IconComponent,
404
+ {
405
+ className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
406
+ }
407
+ ),
408
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
409
+ "input",
410
+ {
411
+ className: cn(inputVariants({ theme, hasIcon })),
412
+ ref,
413
+ placeholder,
414
+ value,
415
+ onChange,
416
+ "data-testid": `input-element-${props.id}`,
417
+ ...props
418
+ }
419
+ ),
420
+ hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
421
+ import_lucide_react5.X,
422
+ {
423
+ className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
424
+ onClick: handleClear,
425
+ "data-testid": "clear-button"
426
+ }
427
+ )
428
+ ] }),
429
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ErrorMessage_default, { message: error, className: "mt-1" })
430
+ ] });
431
+ }
432
+ );
433
+ Input.displayName = "Input";
434
+ var inputVariants = (0, import_cva2.cva)(
435
+ [
436
+ "border-input",
437
+ "placeholder:text-muted-foreground",
438
+ "focus-visible:ring-ring",
439
+ "inline-flex",
440
+ "w-full",
441
+ "h-11",
442
+ "items-center",
443
+ "justify-start",
444
+ "gap-3",
445
+ "rounded-lg",
446
+ "bg-transparent",
447
+ "px-3",
448
+ "pt-0.5",
449
+ "text-sm",
450
+ "shadow-sm",
451
+ "ring-grey-50",
452
+ "transition-colors",
453
+ "focus-visible:outline-none",
454
+ "focus-visible:ring-1",
455
+ "disabled:cursor-not-allowed",
456
+ "disabled:opacity-50",
457
+ "appearance-none",
458
+ "[&::-webkit-search-cancel-button]:appearance-none",
459
+ "[&::-webkit-search-decoration]:appearance-none",
460
+ "[&::-webkit-search-results-button]:appearance-none",
461
+ "[&::-webkit-search-results-decoration]:appearance-none",
462
+ "[&::-ms-clear]:display-none",
463
+ "[&::-ms-reveal]:display-none"
464
+ ],
465
+ {
466
+ variants: {
467
+ theme: {
468
+ light: "text-grey-80 border",
469
+ dark: "text-white"
470
+ },
471
+ hasIcon: {
472
+ false: "pl-3",
473
+ true: "pl-8"
474
+ }
475
+ },
476
+ defaultVariants: {
477
+ theme: "light",
478
+ hasIcon: false
479
+ }
480
+ }
481
+ );
482
+ var Input_default = Input;
483
+
484
+ // src/components/ui/Button.tsx
485
+ var import_react_slot = require("@radix-ui/react-slot");
486
+ var import_cva3 = require("cva");
487
+ var import_react4 = require("react");
488
+ var import_jsx_runtime9 = require("react/jsx-runtime");
489
+ var Button = (0, import_react4.forwardRef)(
389
490
  ({ className, variant, size, asChild = false, ...props }, ref) => {
390
491
  const Component = asChild ? import_react_slot.Slot : "button";
391
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
492
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
392
493
  Component,
393
494
  {
394
495
  className: cn(buttonVariants({ variant, size, className })),
@@ -399,7 +500,7 @@ var Button = (0, import_react3.forwardRef)(
399
500
  }
400
501
  );
401
502
  Button.displayName = "Button";
402
- var buttonVariants = (0, import_cva2.cva)(
503
+ var buttonVariants = (0, import_cva3.cva)(
403
504
  [
404
505
  "flex",
405
506
  "items-center",
@@ -490,22 +591,22 @@ var buttonVariants = (0, import_cva2.cva)(
490
591
  );
491
592
 
492
593
  // src/components/ui/Combobox.tsx
493
- var import_react4 = require("react");
494
- var import_lucide_react7 = require("lucide-react");
495
- var import_cva4 = require("cva");
594
+ var import_react5 = require("react");
595
+ var import_lucide_react8 = require("lucide-react");
596
+ var import_cva5 = require("cva");
496
597
 
497
598
  // src/components/primitives/command.tsx
498
599
  var import_cmdk = require("cmdk");
499
- var import_lucide_react6 = require("lucide-react");
600
+ var import_lucide_react7 = require("lucide-react");
500
601
  var React4 = __toESM(require("react"), 1);
501
602
 
502
603
  // src/components/primitives/dialog.tsx
503
604
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
504
- var import_lucide_react5 = require("lucide-react");
605
+ var import_lucide_react6 = require("lucide-react");
505
606
  var React3 = __toESM(require("react"), 1);
506
- var import_jsx_runtime9 = require("react/jsx-runtime");
607
+ var import_jsx_runtime10 = require("react/jsx-runtime");
507
608
  var DialogPortal = DialogPrimitive.Portal;
508
- var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
609
+ var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
509
610
  DialogPrimitive.Overlay,
510
611
  {
511
612
  ref,
@@ -517,9 +618,9 @@ var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PU
517
618
  }
518
619
  ));
519
620
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
520
- var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DialogPortal, { children: [
521
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogOverlay, {}),
522
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
621
+ var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogPortal, { children: [
622
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogOverlay, {}),
623
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
523
624
  DialogPrimitive.Content,
524
625
  {
525
626
  ref,
@@ -530,18 +631,18 @@ var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) =
530
631
  ...props,
531
632
  children: [
532
633
  children,
533
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(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", children: [
534
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react5.X, { className: "h-4 w-4" }),
535
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: "Close" })
634
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(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", children: [
635
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.X, { className: "h-4 w-4" }),
636
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
536
637
  ] })
537
638
  ]
538
639
  }
539
640
  )
540
641
  ] }));
541
642
  DialogContent.displayName = DialogPrimitive.Content.displayName;
542
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
643
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
543
644
  DialogHeader.displayName = "DialogHeader";
544
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
645
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
545
646
  "div",
546
647
  {
547
648
  className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
@@ -549,7 +650,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
549
650
  }
550
651
  );
551
652
  DialogFooter.displayName = "DialogFooter";
552
- var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
653
+ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
553
654
  DialogPrimitive.Title,
554
655
  {
555
656
  ref,
@@ -558,7 +659,7 @@ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
558
659
  }
559
660
  ));
560
661
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
561
- var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
662
+ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
562
663
  DialogPrimitive.Description,
563
664
  {
564
665
  ref,
@@ -569,8 +670,8 @@ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @
569
670
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
570
671
 
571
672
  // src/components/primitives/command.tsx
572
- var import_jsx_runtime10 = require("react/jsx-runtime");
573
- var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
673
+ var import_jsx_runtime11 = require("react/jsx-runtime");
674
+ var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
574
675
  import_cmdk.Command,
575
676
  {
576
677
  ref,
@@ -582,9 +683,9 @@ var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
582
683
  }
583
684
  ));
584
685
  Command.displayName = import_cmdk.Command.displayName;
585
- var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "", children: [
586
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
587
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
686
+ var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "", children: [
687
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react7.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
688
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
588
689
  import_cmdk.Command.Input,
589
690
  {
590
691
  ref,
@@ -597,7 +698,7 @@ var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
597
698
  )
598
699
  ] }));
599
700
  CommandInput.displayName = import_cmdk.Command.Input.displayName;
600
- var CommandList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
701
+ var CommandList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
601
702
  import_cmdk.Command.List,
602
703
  {
603
704
  ref,
@@ -606,9 +707,9 @@ var CommandList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
606
707
  }
607
708
  ));
608
709
  CommandList.displayName = import_cmdk.Command.List.displayName;
609
- var CommandEmpty = React4.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
710
+ var CommandEmpty = React4.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
610
711
  CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
611
- var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
712
+ var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
612
713
  import_cmdk.Command.Group,
613
714
  {
614
715
  ref,
@@ -620,7 +721,7 @@ var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
620
721
  }
621
722
  ));
622
723
  CommandGroup.displayName = import_cmdk.Command.Group.displayName;
623
- var CommandSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
724
+ var CommandSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
624
725
  import_cmdk.Command.Separator,
625
726
  {
626
727
  ref,
@@ -629,7 +730,7 @@ var CommandSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @_
629
730
  }
630
731
  ));
631
732
  CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
632
- var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
733
+ var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
633
734
  import_cmdk.Command.Item,
634
735
  {
635
736
  ref,
@@ -642,7 +743,7 @@ var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
642
743
  ));
643
744
  CommandItem.displayName = import_cmdk.Command.Item.displayName;
644
745
  var CommandShortcut = ({ className, ...props }) => {
645
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
746
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
646
747
  "span",
647
748
  {
648
749
  className: cn("ml-auto text-xs tracking-widest text-neutral-500", className),
@@ -655,10 +756,10 @@ CommandShortcut.displayName = "CommandShortcut";
655
756
  // src/components/primitives/popover.tsx
656
757
  var React5 = __toESM(require("react"), 1);
657
758
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
658
- var import_jsx_runtime11 = require("react/jsx-runtime");
759
+ var import_jsx_runtime12 = require("react/jsx-runtime");
659
760
  var Popover = PopoverPrimitive.Root;
660
761
  var PopoverTrigger = PopoverPrimitive.Trigger;
661
- var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
762
+ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
662
763
  PopoverPrimitive.Content,
663
764
  {
664
765
  ref,
@@ -674,9 +775,9 @@ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffse
674
775
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
675
776
 
676
777
  // src/components/ui/Badge.tsx
677
- var import_cva3 = require("cva");
678
- var import_jsx_runtime12 = require("react/jsx-runtime");
679
- var badgeVariants = (0, import_cva3.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
778
+ var import_cva4 = require("cva");
779
+ var import_jsx_runtime13 = require("react/jsx-runtime");
780
+ var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
680
781
  variants: {
681
782
  variant: {
682
783
  green: "bg-green-90 text-white",
@@ -689,12 +790,12 @@ var badgeVariants = (0, import_cva3.cva)("rounded-full px-2 py-0.5 text-xs font-
689
790
  }
690
791
  });
691
792
  function Badge({ className, variant, ...props }) {
692
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
793
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
693
794
  }
694
795
 
695
796
  // src/components/ui/Combobox.tsx
696
- var import_jsx_runtime13 = require("react/jsx-runtime");
697
- var Combobox = (0, import_react4.forwardRef)((props, ref) => {
797
+ var import_jsx_runtime14 = require("react/jsx-runtime");
798
+ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
698
799
  const {
699
800
  value,
700
801
  label,
@@ -709,16 +810,16 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
709
810
  onChange: handleChange,
710
811
  children: footer
711
812
  } = props;
712
- const [selected, setSelected] = (0, import_react4.useState)([]);
713
- const [open, setOpen] = (0, import_react4.useState)(false);
714
- const IconComponent = icon && import_lucide_react7.icons[icon];
813
+ const [selected, setSelected] = (0, import_react5.useState)([]);
814
+ const [open, setOpen] = (0, import_react5.useState)(false);
815
+ const IconComponent = icon && import_lucide_react8.icons[icon];
715
816
  const hideSearchBox = options?.length <= 5;
716
817
  const isDefault = variant === "default";
717
818
  const isChip = variant === "chip";
718
819
  const isEmpty = selected.length == 0;
719
820
  const showChevron = isDefault ? isEmpty : true;
720
821
  const close = () => setOpen(false);
721
- (0, import_react4.useEffect)(() => {
822
+ (0, import_react5.useEffect)(() => {
722
823
  const valueArray = multiselect ? value ?? [] : value ? [value] : [];
723
824
  setSelected(
724
825
  valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== void 0)
@@ -746,17 +847,17 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
746
847
  const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
747
848
  return isDefault ? defaultLabel : label;
748
849
  };
749
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("flex flex-col gap-2", className), children: [
750
- isDefault && label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Label_default, { text: label, className: classNames?.label }),
751
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative flex", children: [
752
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
753
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
850
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex flex-col gap-2", className), children: [
851
+ isDefault && label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label_default, { text: label, className: classNames?.label }),
852
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative flex", children: [
853
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
854
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
754
855
  PopoverTrigger,
755
856
  {
756
857
  asChild: true,
757
858
  disabled: options.length === 0,
758
859
  "data-testid": `${props.id ?? props.name}-combobox-trigger`,
759
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
860
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
760
861
  "div",
761
862
  {
762
863
  ref,
@@ -767,9 +868,9 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
767
868
  ),
768
869
  "aria-expanded": open,
769
870
  children: [
770
- isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
771
- isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { variant: "purple", children: selected.length }),
772
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
871
+ isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
872
+ isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Badge, { variant: "purple", children: selected.length }),
873
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
773
874
  "span",
774
875
  {
775
876
  className: cn(
@@ -779,8 +880,8 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
779
880
  children: handleDisplayValue()
780
881
  }
781
882
  ),
782
- showChevron && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
783
- import_lucide_react7.ChevronDownIcon,
883
+ showChevron && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
884
+ import_lucide_react8.ChevronDownIcon,
784
885
  {
785
886
  className: "shrink-0 transform group-data-[state=open]:rotate-180",
786
887
  size: "16"
@@ -791,7 +892,7 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
791
892
  )
792
893
  }
793
894
  ),
794
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
895
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
795
896
  PopoverContent,
796
897
  {
797
898
  className: cn(
@@ -802,16 +903,16 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
802
903
  collisionPadding: 8,
803
904
  sideOffset: 4,
804
905
  align: "start",
805
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Command, { children: [
806
- !hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CommandInput, { placeholder: "Search..." }),
807
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(CommandList, { children: [
808
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CommandEmpty, { children: "No results" }),
809
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CommandGroup, { children: options.map(({ id, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
906
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Command, { children: [
907
+ !hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandInput, { placeholder: "Search..." }),
908
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(CommandList, { children: [
909
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandEmpty, { children: "No results" }),
910
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandGroup, { children: options.map(({ id, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
810
911
  CommandItem,
811
912
  {
812
913
  value: option.title,
813
914
  onSelect: () => handleSelect(option.value),
814
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
915
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
815
916
  ListItem_default,
816
917
  {
817
918
  className: cn(classNames?.items, "truncate py-1"),
@@ -824,26 +925,26 @@ var Combobox = (0, import_react4.forwardRef)((props, ref) => {
824
925
  id
825
926
  )) })
826
927
  ] }),
827
- !!footer && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
928
+ !!footer && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, {}),
828
929
  footer && footer({ close })
829
930
  ] })
830
931
  }
831
932
  )
832
933
  ] }),
833
- isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
934
+ isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
834
935
  "button",
835
936
  {
836
937
  type: "button",
837
938
  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",
838
939
  onClick: handleClear,
839
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.CircleX, { className: "h-4 w-4 text-green-100" })
940
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react8.CircleX, { className: "h-4 w-4 text-green-100" })
840
941
  }
841
942
  )
842
943
  ] })
843
944
  ] });
844
945
  });
845
946
  Combobox.displayName = "Combobox";
846
- var triggerVariants = (0, import_cva4.cva)(
947
+ var triggerVariants = (0, import_cva5.cva)(
847
948
  "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",
848
949
  {
849
950
  variants: {
@@ -875,6 +976,7 @@ var triggerVariants = (0, import_cva4.cva)(
875
976
  Checkbox,
876
977
  Chip,
877
978
  Combobox,
979
+ Input,
878
980
  Label,
879
981
  ListItem,
880
982
  Select,