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

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 (73) hide show
  1. package/dist/app/layout.css +30 -2
  2. package/dist/app/layout.css.map +1 -1
  3. package/dist/app/page.cjs +324 -114
  4. package/dist/app/page.cjs.map +1 -1
  5. package/dist/app/page.js +302 -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/SelectDemo.cjs +83 -53
  22. package/dist/components/demos/SelectDemo.cjs.map +1 -1
  23. package/dist/components/demos/SelectDemo.js +73 -43
  24. package/dist/components/demos/SelectDemo.js.map +1 -1
  25. package/dist/components/demos/index.cjs +322 -112
  26. package/dist/components/demos/index.cjs.map +1 -1
  27. package/dist/components/demos/index.js +300 -90
  28. package/dist/components/demos/index.js.map +1 -1
  29. package/dist/components/primitives/tooltip.cjs +75 -0
  30. package/dist/components/primitives/tooltip.cjs.map +1 -0
  31. package/dist/components/primitives/tooltip.d.cts +9 -0
  32. package/dist/components/primitives/tooltip.d.ts +9 -0
  33. package/dist/components/primitives/tooltip.js +38 -0
  34. package/dist/components/primitives/tooltip.js.map +1 -0
  35. package/dist/components/ui/Combobox.cjs +78 -40
  36. package/dist/components/ui/Combobox.cjs.map +1 -1
  37. package/dist/components/ui/Combobox.d.cts +5 -2
  38. package/dist/components/ui/Combobox.d.ts +5 -2
  39. package/dist/components/ui/Combobox.js +71 -33
  40. package/dist/components/ui/Combobox.js.map +1 -1
  41. package/dist/components/ui/Counter.cjs +248 -0
  42. package/dist/components/ui/Counter.cjs.map +1 -0
  43. package/dist/components/ui/Counter.d.cts +28 -0
  44. package/dist/components/ui/Counter.d.ts +28 -0
  45. package/dist/components/ui/Counter.js +214 -0
  46. package/dist/components/ui/Counter.js.map +1 -0
  47. package/dist/components/ui/Input.cjs +67 -28
  48. package/dist/components/ui/Input.cjs.map +1 -1
  49. package/dist/components/ui/Input.d.cts +2 -1
  50. package/dist/components/ui/Input.d.ts +2 -1
  51. package/dist/components/ui/Input.js +54 -25
  52. package/dist/components/ui/Input.js.map +1 -1
  53. package/dist/components/ui/Label.cjs +54 -16
  54. package/dist/components/ui/Label.cjs.map +1 -1
  55. package/dist/components/ui/Label.d.cts +2 -1
  56. package/dist/components/ui/Label.d.ts +2 -1
  57. package/dist/components/ui/Label.js +44 -16
  58. package/dist/components/ui/Label.js.map +1 -1
  59. package/dist/components/ui/Select.cjs +75 -46
  60. package/dist/components/ui/Select.cjs.map +1 -1
  61. package/dist/components/ui/Select.d.cts +3 -2
  62. package/dist/components/ui/Select.d.ts +3 -2
  63. package/dist/components/ui/Select.js +67 -38
  64. package/dist/components/ui/Select.js.map +1 -1
  65. package/dist/index.cjs +323 -138
  66. package/dist/index.cjs.map +1 -1
  67. package/dist/index.d.cts +1 -0
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.js +295 -111
  70. package/dist/index.js.map +1 -1
  71. package/dist/styles/globals.css +30 -2
  72. package/dist/styles/globals.css.map +1 -1
  73. package/package.json +1 -1
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
+ Counter: () => Counter,
38
39
  Input: () => Input_default,
39
40
  Label: () => Label_default,
40
41
  ListItem: () => ListItem_default,
@@ -45,7 +46,7 @@ module.exports = __toCommonJS(index_exports);
45
46
 
46
47
  // src/components/ui/Select.tsx
47
48
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
48
- var import_lucide_react = require("lucide-react");
49
+ var import_lucide_react2 = require("lucide-react");
49
50
  var import_react = require("react");
50
51
 
51
52
  // src/lib/utils.ts
@@ -63,32 +64,60 @@ function ErrorMessage({ message, className, ...props }) {
63
64
  }
64
65
  var ErrorMessage_default = ErrorMessage;
65
66
 
66
- // src/components/ui/Label.tsx
67
+ // src/components/primitives/tooltip.tsx
68
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
69
+ var React = __toESM(require("react"), 1);
67
70
  var import_jsx_runtime2 = require("react/jsx-runtime");
68
- function Label({ text, required, className, ...props }) {
71
+ var TooltipProvider = TooltipPrimitive.Provider;
72
+ var Tooltip = TooltipPrimitive.Root;
73
+ var TooltipTrigger = TooltipPrimitive.Trigger;
74
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
75
+ TooltipPrimitive.Content,
76
+ {
77
+ ref,
78
+ sideOffset,
79
+ className: cn(
80
+ "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",
81
+ className
82
+ ),
83
+ ...props
84
+ }
85
+ ));
86
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
87
+
88
+ // src/components/ui/Label.tsx
89
+ var import_lucide_react = require("lucide-react");
90
+ var import_jsx_runtime3 = require("react/jsx-runtime");
91
+ function Label({ text, required, description, className, ...props }) {
69
92
  if (!text) return null;
70
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
71
- "label",
72
- {
73
- className: cn(
74
- "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
75
- className
76
- ),
77
- ...props,
78
- children: [
79
- text,
80
- required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-600", children: "\xA0*" })
81
- ]
82
- }
83
- );
93
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
95
+ "label",
96
+ {
97
+ className: cn(
98
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
99
+ className
100
+ ),
101
+ ...props,
102
+ children: [
103
+ text,
104
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-600", children: "\xA0*" })
105
+ ]
106
+ }
107
+ ),
108
+ !!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { children: [
109
+ /* @__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" }) }),
110
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContent, { className: "max-w-48", children: description })
111
+ ] }) })
112
+ ] });
84
113
  }
85
114
  var Label_default = Label;
86
115
 
87
116
  // src/components/ui/Chip.tsx
88
117
  var import_cva = require("cva");
89
118
  var import_tailwind_merge2 = require("tailwind-merge");
90
- var import_jsx_runtime3 = require("react/jsx-runtime");
91
- var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_tailwind_merge2.twMerge)(chipVariants({ variant, size, className })), ...props });
119
+ var import_jsx_runtime4 = require("react/jsx-runtime");
120
+ var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_tailwind_merge2.twMerge)(chipVariants({ variant, size, className })), ...props });
92
121
  var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
93
122
  variants: {
94
123
  variant: {
@@ -112,9 +141,9 @@ var Chip_default = Chip;
112
141
 
113
142
  // src/components/primitives/separator.tsx
114
143
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
115
- var React = __toESM(require("react"), 1);
116
- var import_jsx_runtime4 = require("react/jsx-runtime");
117
- var Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
144
+ var React2 = __toESM(require("react"), 1);
145
+ var import_jsx_runtime5 = require("react/jsx-runtime");
146
+ var Separator = React2.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
118
147
  SeparatorPrimitive.Root,
119
148
  {
120
149
  ref,
@@ -131,9 +160,9 @@ var Separator = React.forwardRef(({ className, orientation = "horizontal", decor
131
160
  Separator.displayName = SeparatorPrimitive.Root.displayName;
132
161
 
133
162
  // src/components/ui/Select.tsx
134
- var import_jsx_runtime5 = require("react/jsx-runtime");
163
+ var import_jsx_runtime6 = require("react/jsx-runtime");
135
164
  var Select = (0, import_react.forwardRef)(
136
- ({ label, options, placeholder, multiselect, classNames, error, id, ...props }, ref) => {
165
+ ({ label, options, placeholder, multiselect, description, classNames, error, id, ...props }, ref) => {
137
166
  const { value, defaultValue, dir, className, onChange, ...rest } = props;
138
167
  const [selected, setSelected] = (0, import_react.useState)([]);
139
168
  const [open, setOpen] = (0, import_react.useState)(false);
@@ -163,23 +192,24 @@ var Select = (0, import_react.forwardRef)(
163
192
  });
164
193
  onChange?.(multiselect ? newSelected : newValue);
165
194
  }
166
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
195
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
167
196
  "div",
168
197
  {
169
- className: cn("flex flex-col gap-1", className),
198
+ className: cn("flex w-full flex-col gap-1", className),
170
199
  ref: containerRef,
171
200
  "data-testid": `${(label ?? id)?.toLowerCase()}-select-element`,
172
201
  children: [
173
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
202
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
174
203
  Label_default,
175
204
  {
176
205
  text: label,
177
206
  htmlFor: props.name,
178
207
  required: props.required,
208
+ description,
179
209
  className: classNames?.label
180
210
  }
181
211
  ),
182
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
212
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
183
213
  SelectPrimitive.Root,
184
214
  {
185
215
  open,
@@ -190,16 +220,16 @@ var Select = (0, import_react.forwardRef)(
190
220
  dir: dir === "rtl" ? "rtl" : "ltr",
191
221
  ...rest,
192
222
  children: [
193
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
223
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
194
224
  SelectPrimitive.Trigger,
195
225
  {
196
226
  ref,
197
227
  className: cn(
198
- "group flex h-11 min-w-80 flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40",
228
+ "group flex h-11 w-full flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40",
199
229
  classNames?.trigger
200
230
  ),
201
231
  children: [
202
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
232
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
203
233
  SelectPrimitive.Value,
204
234
  {
205
235
  placeholder: placeholder ?? "Select an option",
@@ -207,8 +237,8 @@ var Select = (0, import_react.forwardRef)(
207
237
  children: handleLabels()
208
238
  }
209
239
  ) }),
210
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
211
- import_lucide_react.ChevronDownIcon,
240
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
241
+ import_lucide_react2.ChevronDownIcon,
212
242
  {
213
243
  className: "transform text-black group-data-[state=open]:rotate-180",
214
244
  size: "16"
@@ -217,7 +247,7 @@ var Select = (0, import_react.forwardRef)(
217
247
  ]
218
248
  }
219
249
  ),
220
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
250
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
221
251
  SelectPrimitive.Content,
222
252
  {
223
253
  hideWhenDetached: true,
@@ -226,17 +256,17 @@ var Select = (0, import_react.forwardRef)(
226
256
  sideOffset: 4,
227
257
  onPointerDownOutside: toggleOpen,
228
258
  onKeyDown: closeOnEscape,
229
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(SelectPrimitive.Viewport, { children: [
230
- multiselect && !!chipLabels?.length && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
259
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SelectPrimitive.Viewport, { children: [
260
+ multiselect && !!chipLabels?.length && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
231
261
  SelectPrimitive.Group,
232
262
  {
233
263
  className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
234
264
  "data-testid": "selected-labels",
235
265
  children: chipLabels?.map(
236
- (chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
237
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: chip.title }),
238
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
239
- import_lucide_react.X,
266
+ (chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
267
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: chip.title }),
268
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
269
+ import_lucide_react2.X,
240
270
  {
241
271
  size: 18,
242
272
  "data-testid": `chip-remove-${chip.value}`,
@@ -248,8 +278,8 @@ var Select = (0, import_react.forwardRef)(
248
278
  )
249
279
  }
250
280
  ),
251
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Separator, {}),
252
- options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
281
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
282
+ options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
253
283
  SelectPrimitive.Item,
254
284
  {
255
285
  value: value2,
@@ -258,9 +288,9 @@ var Select = (0, import_react.forwardRef)(
258
288
  onKeyDown: (e) => setValueOnEnter(e, value2),
259
289
  onClick: () => handleChange(value2),
260
290
  children: [
261
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.ItemText, { children: title }),
262
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
263
- import_lucide_react.CheckIcon,
291
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemText, { children: title }),
292
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
293
+ import_lucide_react2.CheckIcon,
264
294
  {
265
295
  className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
266
296
  size: 16
@@ -276,7 +306,7 @@ var Select = (0, import_react.forwardRef)(
276
306
  ]
277
307
  }
278
308
  ),
279
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ErrorMessage_default, { message: error })
309
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorMessage_default, { message: error })
280
310
  ]
281
311
  }
282
312
  );
@@ -287,10 +317,10 @@ var Select_default = Select;
287
317
 
288
318
  // src/components/ui/Checkbox.tsx
289
319
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
290
- var import_lucide_react2 = require("lucide-react");
320
+ var import_lucide_react3 = require("lucide-react");
291
321
  var import_react2 = require("react");
292
- var import_jsx_runtime6 = require("react/jsx-runtime");
293
- var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
322
+ var import_jsx_runtime7 = require("react/jsx-runtime");
323
+ var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
294
324
  CheckboxPrimitive.Root,
295
325
  {
296
326
  ref,
@@ -320,9 +350,9 @@ var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref
320
350
  className
321
351
  ),
322
352
  ...props,
323
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
324
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
325
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
353
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
355
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
326
356
  ] })
327
357
  }
328
358
  ));
@@ -332,9 +362,9 @@ var Checkbox = (0, import_react2.forwardRef)(
332
362
  const { disabled } = props;
333
363
  const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
334
364
  const labelClassName = disabled ? "text-grey-40 pointer-events-none" : "";
335
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
336
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxToggle, { id, disabled, ref, ...props }),
337
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: id, className: cn(labelClassName, classNames?.label), children })
365
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
366
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckboxToggle, { id, disabled, ref, ...props }),
367
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: id, className: cn(labelClassName, classNames?.label), children })
338
368
  ] });
339
369
  }
340
370
  );
@@ -342,9 +372,9 @@ Checkbox.displayName = "Checkbox";
342
372
  var Checkbox_default = Checkbox;
343
373
 
344
374
  // src/components/ui/ListItem.tsx
345
- var import_lucide_react3 = require("lucide-react");
346
375
  var import_lucide_react4 = require("lucide-react");
347
- var import_jsx_runtime7 = require("react/jsx-runtime");
376
+ var import_lucide_react5 = require("lucide-react");
377
+ var import_jsx_runtime8 = require("react/jsx-runtime");
348
378
  function ListItem({
349
379
  icon,
350
380
  hasCheckbox,
@@ -356,14 +386,14 @@ function ListItem({
356
386
  ...props
357
387
  }) {
358
388
  const getIconIfValid = (icon2) => {
359
- if (icon2 in import_lucide_react4.icons) {
360
- const IconComponent = import_lucide_react4.icons[icon2];
361
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconComponent, { size: 14 });
389
+ if (icon2 in import_lucide_react5.icons) {
390
+ const IconComponent = import_lucide_react5.icons[icon2];
391
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconComponent, { size: 14 });
362
392
  }
363
393
  return null;
364
394
  };
365
395
  const optionIcon = icon ? getIconIfValid(icon) : void 0;
366
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
396
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
367
397
  "li",
368
398
  {
369
399
  className: cn(
@@ -373,14 +403,14 @@ function ListItem({
373
403
  ...props,
374
404
  "data-state": isSelected ? "checked" : "unchecked",
375
405
  children: [
376
- optionIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "mr-2", children: optionIcon }),
377
- hasCheckbox && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Checkbox_default, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
378
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
379
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: title }),
380
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-xs text-grey-80", children: description })
406
+ optionIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "mr-2", children: optionIcon }),
407
+ hasCheckbox && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Checkbox_default, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
408
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
409
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: title }),
410
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-grey-80", children: description })
381
411
  ] }),
382
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
383
- import_lucide_react3.CheckIcon,
412
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
413
+ import_lucide_react4.CheckIcon,
384
414
  {
385
415
  className: "absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",
386
416
  size: 16
@@ -394,37 +424,38 @@ var ListItem_default = ListItem;
394
424
 
395
425
  // src/components/ui/Input.tsx
396
426
  var import_cva2 = require("cva");
397
- var import_lucide_react5 = require("lucide-react");
427
+ var import_lucide_react6 = require("lucide-react");
398
428
  var import_react3 = require("react");
399
- var import_jsx_runtime8 = require("react/jsx-runtime");
429
+ var import_jsx_runtime9 = require("react/jsx-runtime");
400
430
  var Input = (0, import_react3.forwardRef)(
401
- ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
431
+ ({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
402
432
  const handleClear = () => {
403
433
  onChange?.({ target: { value: "" } });
404
434
  onClear?.();
405
435
  };
406
- const IconComponent = icon && import_lucide_react5.icons[icon];
436
+ const IconComponent = icon && import_lucide_react6.icons[icon];
407
437
  const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
408
438
  const hasIcon = !!icon;
409
439
  const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
410
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
411
- label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
440
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
441
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
412
442
  Label_default,
413
443
  {
414
444
  text: label,
415
445
  htmlFor: props.name,
416
446
  required: props.required,
447
+ description,
417
448
  className: classNames?.label
418
449
  }
419
450
  ),
420
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "relative flex flex-row items-center", children: [
421
- IconComponent && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
451
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative flex flex-row items-center", children: [
452
+ IconComponent && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
422
453
  IconComponent,
423
454
  {
424
455
  className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
425
456
  }
426
457
  ),
427
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
458
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
428
459
  "input",
429
460
  {
430
461
  className: cn(inputVariants({ theme, hasIcon })),
@@ -436,8 +467,8 @@ var Input = (0, import_react3.forwardRef)(
436
467
  ...props
437
468
  }
438
469
  ),
439
- hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
440
- import_lucide_react5.X,
470
+ hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
471
+ import_lucide_react6.X,
441
472
  {
442
473
  className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
443
474
  onClick: handleClear,
@@ -445,7 +476,7 @@ var Input = (0, import_react3.forwardRef)(
445
476
  }
446
477
  )
447
478
  ] }),
448
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ErrorMessage_default, { message: error })
479
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ErrorMessage_default, { message: error })
449
480
  ] });
450
481
  }
451
482
  );
@@ -504,11 +535,11 @@ var Input_default = Input;
504
535
  var import_react_slot = require("@radix-ui/react-slot");
505
536
  var import_cva3 = require("cva");
506
537
  var import_react4 = require("react");
507
- var import_jsx_runtime9 = require("react/jsx-runtime");
538
+ var import_jsx_runtime10 = require("react/jsx-runtime");
508
539
  var Button = (0, import_react4.forwardRef)(
509
540
  ({ className, variant, size, asChild = false, ...props }, ref) => {
510
541
  const Component = asChild ? import_react_slot.Slot : "button";
511
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
542
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
512
543
  Component,
513
544
  {
514
545
  className: cn(buttonVariants({ variant, size, className })),
@@ -611,21 +642,21 @@ var buttonVariants = (0, import_cva3.cva)(
611
642
 
612
643
  // src/components/ui/Combobox.tsx
613
644
  var import_react5 = require("react");
614
- var import_lucide_react8 = require("lucide-react");
645
+ var import_lucide_react9 = require("lucide-react");
615
646
  var import_cva5 = require("cva");
616
647
 
617
648
  // src/components/primitives/command.tsx
618
649
  var import_cmdk = require("cmdk");
619
- var import_lucide_react7 = require("lucide-react");
620
- var React4 = __toESM(require("react"), 1);
650
+ var import_lucide_react8 = require("lucide-react");
651
+ var React5 = __toESM(require("react"), 1);
621
652
 
622
653
  // src/components/primitives/dialog.tsx
623
654
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
624
- var import_lucide_react6 = require("lucide-react");
625
- var React3 = __toESM(require("react"), 1);
626
- var import_jsx_runtime10 = require("react/jsx-runtime");
655
+ var import_lucide_react7 = require("lucide-react");
656
+ var React4 = __toESM(require("react"), 1);
657
+ var import_jsx_runtime11 = require("react/jsx-runtime");
627
658
  var DialogPortal = DialogPrimitive.Portal;
628
- var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
659
+ var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
629
660
  DialogPrimitive.Overlay,
630
661
  {
631
662
  ref,
@@ -637,9 +668,9 @@ var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PU
637
668
  }
638
669
  ));
639
670
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
640
- var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogPortal, { children: [
641
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogOverlay, {}),
642
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
671
+ var DialogContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DialogPortal, { children: [
672
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogOverlay, {}),
673
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
643
674
  DialogPrimitive.Content,
644
675
  {
645
676
  ref,
@@ -650,18 +681,18 @@ var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) =
650
681
  ...props,
651
682
  children: [
652
683
  children,
653
- /* @__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: [
654
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.X, { className: "h-4 w-4" }),
655
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
684
+ /* @__PURE__ */ (0, import_jsx_runtime11.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: [
685
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react7.X, { className: "h-4 w-4" }),
686
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Close" })
656
687
  ] })
657
688
  ]
658
689
  }
659
690
  )
660
691
  ] }));
661
692
  DialogContent.displayName = DialogPrimitive.Content.displayName;
662
- 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 });
693
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
663
694
  DialogHeader.displayName = "DialogHeader";
664
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
695
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
665
696
  "div",
666
697
  {
667
698
  className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
@@ -669,7 +700,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
669
700
  }
670
701
  );
671
702
  DialogFooter.displayName = "DialogFooter";
672
- var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
703
+ var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
673
704
  DialogPrimitive.Title,
674
705
  {
675
706
  ref,
@@ -678,7 +709,7 @@ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
678
709
  }
679
710
  ));
680
711
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
681
- var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
712
+ var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
682
713
  DialogPrimitive.Description,
683
714
  {
684
715
  ref,
@@ -689,8 +720,8 @@ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @
689
720
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
690
721
 
691
722
  // src/components/primitives/command.tsx
692
- var import_jsx_runtime11 = require("react/jsx-runtime");
693
- var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
723
+ var import_jsx_runtime12 = require("react/jsx-runtime");
724
+ var Command = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
694
725
  import_cmdk.Command,
695
726
  {
696
727
  ref,
@@ -702,9 +733,9 @@ var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
702
733
  }
703
734
  ));
704
735
  Command.displayName = import_cmdk.Command.displayName;
705
- 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: [
706
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react7.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
707
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
736
+ var CommandInput = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "", children: [
737
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react8.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
738
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
708
739
  import_cmdk.Command.Input,
709
740
  {
710
741
  ref,
@@ -717,7 +748,7 @@ var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
717
748
  )
718
749
  ] }));
719
750
  CommandInput.displayName = import_cmdk.Command.Input.displayName;
720
- var CommandList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
751
+ var CommandList = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
721
752
  import_cmdk.Command.List,
722
753
  {
723
754
  ref,
@@ -726,9 +757,9 @@ var CommandList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
726
757
  }
727
758
  ));
728
759
  CommandList.displayName = import_cmdk.Command.List.displayName;
729
- 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 }));
760
+ var CommandEmpty = React5.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
730
761
  CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
731
- var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
762
+ var CommandGroup = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
732
763
  import_cmdk.Command.Group,
733
764
  {
734
765
  ref,
@@ -740,7 +771,7 @@ var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
740
771
  }
741
772
  ));
742
773
  CommandGroup.displayName = import_cmdk.Command.Group.displayName;
743
- var CommandSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
774
+ var CommandSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
744
775
  import_cmdk.Command.Separator,
745
776
  {
746
777
  ref,
@@ -749,7 +780,7 @@ var CommandSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @_
749
780
  }
750
781
  ));
751
782
  CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
752
- var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
783
+ var CommandItem = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
753
784
  import_cmdk.Command.Item,
754
785
  {
755
786
  ref,
@@ -762,7 +793,7 @@ var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
762
793
  ));
763
794
  CommandItem.displayName = import_cmdk.Command.Item.displayName;
764
795
  var CommandShortcut = ({ className, ...props }) => {
765
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
796
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
766
797
  "span",
767
798
  {
768
799
  className: cn("ml-auto text-xs tracking-widest text-neutral-500", className),
@@ -773,12 +804,12 @@ var CommandShortcut = ({ className, ...props }) => {
773
804
  CommandShortcut.displayName = "CommandShortcut";
774
805
 
775
806
  // src/components/primitives/popover.tsx
776
- var React5 = __toESM(require("react"), 1);
807
+ var React6 = __toESM(require("react"), 1);
777
808
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
778
- var import_jsx_runtime12 = require("react/jsx-runtime");
809
+ var import_jsx_runtime13 = require("react/jsx-runtime");
779
810
  var Popover = PopoverPrimitive.Root;
780
811
  var PopoverTrigger = PopoverPrimitive.Trigger;
781
- 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)(
812
+ var PopoverContent = React6.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
782
813
  PopoverPrimitive.Content,
783
814
  {
784
815
  ref,
@@ -795,7 +826,7 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
795
826
 
796
827
  // src/components/ui/Badge.tsx
797
828
  var import_cva4 = require("cva");
798
- var import_jsx_runtime13 = require("react/jsx-runtime");
829
+ var import_jsx_runtime14 = require("react/jsx-runtime");
799
830
  var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
800
831
  variants: {
801
832
  variant: {
@@ -809,11 +840,11 @@ var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-
809
840
  }
810
841
  });
811
842
  function Badge({ className, variant, ...props }) {
812
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
843
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
813
844
  }
814
845
 
815
846
  // src/components/ui/Combobox.tsx
816
- var import_jsx_runtime14 = require("react/jsx-runtime");
847
+ var import_jsx_runtime15 = require("react/jsx-runtime");
817
848
  var Combobox = (0, import_react5.forwardRef)((props, ref) => {
818
849
  const {
819
850
  id,
@@ -822,6 +853,7 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
822
853
  label,
823
854
  options,
824
855
  required,
856
+ description,
825
857
  classNames,
826
858
  multiselect,
827
859
  placeholder,
@@ -834,7 +866,7 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
834
866
  } = props;
835
867
  const [selected, setSelected] = (0, import_react5.useState)([]);
836
868
  const [open, setOpen] = (0, import_react5.useState)(false);
837
- const IconComponent = icon && import_lucide_react8.icons[icon];
869
+ const IconComponent = icon && import_lucide_react9.icons[icon];
838
870
  const hideSearchBox = options?.length <= 5;
839
871
  const isDefault = variant === "default";
840
872
  const isChip = variant === "chip";
@@ -869,17 +901,26 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
869
901
  const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
870
902
  return isDefault ? defaultLabel : label;
871
903
  };
872
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex flex-col gap-1", className), children: [
873
- isDefault && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label_default, { text: label, htmlFor: name, required, className: classNames?.label }),
874
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative flex", children: [
875
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
876
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
904
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex flex-col gap-1", className), children: [
905
+ isDefault && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
906
+ Label_default,
907
+ {
908
+ text: label,
909
+ htmlFor: name,
910
+ required,
911
+ description,
912
+ className: classNames?.label
913
+ }
914
+ ),
915
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative flex", children: [
916
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
917
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
877
918
  PopoverTrigger,
878
919
  {
879
920
  asChild: true,
880
921
  disabled: options.length === 0,
881
922
  "data-testid": `${id ?? name}-combobox-trigger`,
882
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
923
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
883
924
  "div",
884
925
  {
885
926
  ref,
@@ -890,9 +931,9 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
890
931
  ),
891
932
  "aria-expanded": open,
892
933
  children: [
893
- isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
894
- isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Badge, { variant: "purple", children: selected.length }),
895
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
934
+ isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
935
+ isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant: "purple", children: selected.length }),
936
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
896
937
  "span",
897
938
  {
898
939
  className: cn(
@@ -902,8 +943,8 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
902
943
  children: handleDisplayValue()
903
944
  }
904
945
  ),
905
- showChevron && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
906
- import_lucide_react8.ChevronDownIcon,
946
+ showChevron && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
947
+ import_lucide_react9.ChevronDownIcon,
907
948
  {
908
949
  className: "shrink-0 transform group-data-[state=open]:rotate-180",
909
950
  size: "16"
@@ -914,7 +955,7 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
914
955
  )
915
956
  }
916
957
  ),
917
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
958
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
918
959
  PopoverContent,
919
960
  {
920
961
  className: cn(
@@ -925,16 +966,16 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
925
966
  collisionPadding: 8,
926
967
  sideOffset: 4,
927
968
  align: "start",
928
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Command, { children: [
929
- !hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandInput, { placeholder: "Search..." }),
930
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(CommandList, { children: [
931
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandEmpty, { children: "No results" }),
932
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
969
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Command, { children: [
970
+ !hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CommandInput, { placeholder: "Search..." }),
971
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CommandList, { children: [
972
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CommandEmpty, { children: "No results" }),
973
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
933
974
  CommandItem,
934
975
  {
935
976
  value: option.title,
936
977
  onSelect: () => handleSelect(option.value),
937
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
978
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
938
979
  ListItem_default,
939
980
  {
940
981
  className: cn(classNames?.items, "truncate py-1"),
@@ -947,19 +988,19 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
947
988
  id2
948
989
  )) })
949
990
  ] }),
950
- !!footer && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, {}),
991
+ !!footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, {}),
951
992
  footer && footer({ close })
952
993
  ] })
953
994
  }
954
995
  )
955
996
  ] }),
956
- isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
997
+ isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
957
998
  "button",
958
999
  {
959
1000
  type: "button",
960
1001
  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",
961
1002
  onClick: handleClear,
962
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react8.CircleX, { className: "h-4 w-4 text-green-100" })
1003
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react9.CircleX, { className: "h-4 w-4 text-green-100" })
963
1004
  }
964
1005
  )
965
1006
  ] })
@@ -991,6 +1032,149 @@ var triggerVariants = (0, import_cva5.cva)(
991
1032
  }
992
1033
  }
993
1034
  );
1035
+
1036
+ // src/components/ui/Counter.tsx
1037
+ var import_cva6 = require("cva");
1038
+ var import_lucide_react10 = require("lucide-react");
1039
+ var import_react6 = require("react");
1040
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1041
+ var Counter = (0, import_react6.forwardRef)(
1042
+ ({ label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props }, ref) => {
1043
+ const [count, setCount] = (0, import_react6.useState)(0);
1044
+ (0, import_react6.useEffect)(() => {
1045
+ setCount(value ?? 0);
1046
+ }, [value]);
1047
+ const handleChange = (e) => {
1048
+ const newValue = parseInt(e.target.value.replace(/\D/g, ""), 10);
1049
+ if (isNaN(newValue)) return;
1050
+ if (min && newValue < min) {
1051
+ onChange?.(min);
1052
+ setCount(min);
1053
+ return;
1054
+ }
1055
+ if (max && newValue > max) {
1056
+ onChange?.(max);
1057
+ setCount(max);
1058
+ return;
1059
+ }
1060
+ onChange?.(newValue);
1061
+ setCount(newValue);
1062
+ };
1063
+ const decrement = () => {
1064
+ const proposedValue = count - step;
1065
+ const newValue = Math.max(min ?? -Infinity, proposedValue);
1066
+ onChange?.(newValue);
1067
+ setCount(newValue);
1068
+ };
1069
+ const increment = () => {
1070
+ const proposedValue = count + step;
1071
+ const newValue = Math.min(max ?? Infinity, proposedValue);
1072
+ onChange?.(newValue);
1073
+ setCount(newValue);
1074
+ };
1075
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1076
+ "div",
1077
+ {
1078
+ className: cn("flex w-auto flex-col gap-1", classNames?.root),
1079
+ "data-testid": `counter-wrapper-${props.id}`,
1080
+ children: [
1081
+ label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1082
+ Label_default,
1083
+ {
1084
+ text: label,
1085
+ htmlFor: props.name,
1086
+ required: props.required,
1087
+ description,
1088
+ className: classNames?.label
1089
+ }
1090
+ ),
1091
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative flex w-[122px] flex-row items-center", children: [
1092
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1093
+ "button",
1094
+ {
1095
+ type: "button",
1096
+ 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",
1097
+ onClick: decrement,
1098
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react10.Minus, { className: "h-4 w-4 text-green-100" })
1099
+ }
1100
+ ),
1101
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1102
+ "input",
1103
+ {
1104
+ className: cn(counterVariants({ theme }), classNames?.input),
1105
+ ref,
1106
+ value: count,
1107
+ onChange: handleChange,
1108
+ "data-testid": `counter-element-${props.id}`,
1109
+ ...props
1110
+ }
1111
+ ),
1112
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1113
+ "button",
1114
+ {
1115
+ type: "button",
1116
+ 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",
1117
+ onClick: increment,
1118
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react10.Plus, { className: "h-4 w-4 text-green-100" })
1119
+ }
1120
+ )
1121
+ ] }),
1122
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorMessage_default, { message: error })
1123
+ ]
1124
+ }
1125
+ );
1126
+ }
1127
+ );
1128
+ Counter.displayName = "Counter";
1129
+ var counterVariants = (0, import_cva6.cva)(
1130
+ [
1131
+ "border-input",
1132
+ "placeholder:text-muted-foreground",
1133
+ "focus-visible:ring-ring",
1134
+ "inline-flex",
1135
+ "w-[122px]",
1136
+ "h-11",
1137
+ "items-center",
1138
+ "justify-start",
1139
+ "gap-3",
1140
+ "rounded-lg",
1141
+ "bg-transparent",
1142
+ "px-3",
1143
+ "pt-0.5",
1144
+ "text-sm",
1145
+ "text-center",
1146
+ "shadow-sm",
1147
+ "ring-grey-50",
1148
+ "transition-colors",
1149
+ "focus-visible:outline-none",
1150
+ "focus-visible:ring-1",
1151
+ "disabled:cursor-not-allowed",
1152
+ "disabled:opacity-50",
1153
+ "appearance-none",
1154
+ "[&::-webkit-search-cancel-button]:appearance-none",
1155
+ "[&::-webkit-search-decoration]:appearance-none",
1156
+ "[&::-webkit-search-results-button]:appearance-none",
1157
+ "[&::-webkit-search-results-decoration]:appearance-none",
1158
+ "[&::-ms-clear]:display-none",
1159
+ "[&::-ms-reveal]:display-none"
1160
+ ],
1161
+ {
1162
+ variants: {
1163
+ theme: {
1164
+ light: "text-grey-80 border",
1165
+ dark: "text-white"
1166
+ },
1167
+ hasIcon: {
1168
+ false: "pl-3",
1169
+ true: "pl-8"
1170
+ }
1171
+ },
1172
+ defaultVariants: {
1173
+ theme: "light",
1174
+ hasIcon: false
1175
+ }
1176
+ }
1177
+ );
994
1178
  // Annotate the CommonJS export names for ESM import in node:
995
1179
  0 && (module.exports = {
996
1180
  Badge,
@@ -998,6 +1182,7 @@ var triggerVariants = (0, import_cva5.cva)(
998
1182
  Checkbox,
999
1183
  Chip,
1000
1184
  Combobox,
1185
+ Counter,
1001
1186
  Input,
1002
1187
  Label,
1003
1188
  ListItem,