@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
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/components/demos/InputDemo.tsx
@@ -26,7 +36,7 @@ module.exports = __toCommonJS(InputDemo_exports);
26
36
 
27
37
  // src/components/ui/Input.tsx
28
38
  var import_cva = require("cva");
29
- var import_lucide_react = require("lucide-react");
39
+ var import_lucide_react2 = require("lucide-react");
30
40
  var import_react = require("react");
31
41
 
32
42
  // src/lib/utils.ts
@@ -44,57 +54,86 @@ function ErrorMessage({ message, className, ...props }) {
44
54
  }
45
55
  var ErrorMessage_default = ErrorMessage;
46
56
 
47
- // src/components/ui/Label.tsx
57
+ // src/components/primitives/tooltip.tsx
58
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
59
+ var React = __toESM(require("react"), 1);
48
60
  var import_jsx_runtime2 = require("react/jsx-runtime");
49
- function Label({ text, required, className, ...props }) {
61
+ var TooltipProvider = TooltipPrimitive.Provider;
62
+ var Tooltip = TooltipPrimitive.Root;
63
+ var TooltipTrigger = TooltipPrimitive.Trigger;
64
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
65
+ TooltipPrimitive.Content,
66
+ {
67
+ ref,
68
+ sideOffset,
69
+ className: cn(
70
+ "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",
71
+ className
72
+ ),
73
+ ...props
74
+ }
75
+ ));
76
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
77
+
78
+ // src/components/ui/Label.tsx
79
+ var import_lucide_react = require("lucide-react");
80
+ var import_jsx_runtime3 = require("react/jsx-runtime");
81
+ function Label({ text, required, description, className, ...props }) {
50
82
  if (!text) return null;
51
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
52
- "label",
53
- {
54
- className: cn(
55
- "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
56
- className
57
- ),
58
- ...props,
59
- children: [
60
- text,
61
- required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-600", children: "\xA0*" })
62
- ]
63
- }
64
- );
83
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
84
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
85
+ "label",
86
+ {
87
+ className: cn(
88
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
89
+ className
90
+ ),
91
+ ...props,
92
+ children: [
93
+ text,
94
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-600", children: "\xA0*" })
95
+ ]
96
+ }
97
+ ),
98
+ !!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { children: [
99
+ /* @__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" }) }),
100
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContent, { className: "max-w-48", children: description })
101
+ ] }) })
102
+ ] });
65
103
  }
66
104
  var Label_default = Label;
67
105
 
68
106
  // src/components/ui/Input.tsx
69
- var import_jsx_runtime3 = require("react/jsx-runtime");
107
+ var import_jsx_runtime4 = require("react/jsx-runtime");
70
108
  var Input = (0, import_react.forwardRef)(
71
- ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
109
+ ({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
72
110
  const handleClear = () => {
73
111
  onChange?.({ target: { value: "" } });
74
112
  onClear?.();
75
113
  };
76
- const IconComponent = icon && import_lucide_react.icons[icon];
114
+ const IconComponent = icon && import_lucide_react2.icons[icon];
77
115
  const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
78
116
  const hasIcon = !!icon;
79
117
  const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
80
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
81
- label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
118
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
119
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
82
120
  Label_default,
83
121
  {
84
122
  text: label,
85
123
  htmlFor: props.name,
86
124
  required: props.required,
125
+ description,
87
126
  className: classNames?.label
88
127
  }
89
128
  ),
90
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative flex flex-row items-center", children: [
91
- IconComponent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
129
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "relative flex flex-row items-center", children: [
130
+ IconComponent && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
92
131
  IconComponent,
93
132
  {
94
133
  className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
95
134
  }
96
135
  ),
97
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
136
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
98
137
  "input",
99
138
  {
100
139
  className: cn(inputVariants({ theme, hasIcon })),
@@ -106,8 +145,8 @@ var Input = (0, import_react.forwardRef)(
106
145
  ...props
107
146
  }
108
147
  ),
109
- hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
110
- import_lucide_react.X,
148
+ hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
149
+ import_lucide_react2.X,
111
150
  {
112
151
  className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
113
152
  onClick: handleClear,
@@ -115,7 +154,7 @@ var Input = (0, import_react.forwardRef)(
115
154
  }
116
155
  )
117
156
  ] }),
118
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ErrorMessage_default, { message: error })
157
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorMessage_default, { message: error })
119
158
  ] });
120
159
  }
121
160
  );
@@ -171,14 +210,14 @@ var inputVariants = (0, import_cva.cva)(
171
210
  var Input_default = Input;
172
211
 
173
212
  // src/components/demos/InputDemo.tsx
174
- var import_jsx_runtime4 = require("react/jsx-runtime");
213
+ var import_jsx_runtime5 = require("react/jsx-runtime");
175
214
  function InputDemo() {
176
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "m-4", children: [
177
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { children: "Input" }),
178
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-2 md:flex-row", children: [
179
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "bg-green-80 p-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input_default, { theme: "dark", icon: "Search" }) }),
180
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input_default, { label: "Required input", required: true }) }),
181
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input_default, { icon: "MapPin" }) })
215
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "m-4", children: [
216
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { children: "Input" }),
217
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-2 md:flex-row", children: [
218
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "bg-green-80 p-2", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input_default, { theme: "dark", icon: "Search" }) }),
219
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input_default, { label: "Required input", required: true, description: "This is a tooltip" }) }),
220
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input_default, { icon: "MapPin" }) })
182
221
  ] })
183
222
  ] });
184
223
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/demos/InputDemo.tsx","../../../src/components/ui/Input.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["import Input from '@/components/ui/Input'\n\nfunction InputDemo() {\n return (\n <div className=\"m-4\">\n <h3>Input</h3>\n <div className=\"flex flex-col gap-2 md:flex-row\">\n <div className=\"bg-green-80 p-2\">\n <Input theme=\"dark\" icon=\"Search\" />\n </div>\n <div className=\"p-2\">\n <Input label=\"Required input\" required />\n </div>\n <div className=\"p-2\">\n <Input icon=\"MapPin\" />\n </div>\n </div>\n </div>\n )\n}\n\nexport default InputDemo\n","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 gap-1\" data-testid={`input-wrapper-${props.id}`}>\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n className={classNames?.label}\n />\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} />\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 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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAuC;AACvC,0BAAyB;AACzB,mBAAuE;;;ACFvE,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,4CAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;ACLX,IAAAA,sBAAA;AAJJ,SAAS,MAAM,EAAE,MAAM,UAAU,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,KAAM,QAAO;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,YAAY,6CAAC,UAAK,WAAU,gBAAe,mBAAO;AAAA;AAAA;AAAA,EACrD;AAEJ;AAEA,IAAO,gBAAQ;;;AHOL,IAAAC,sBAAA;AAjBV,IAAM,YAAQ;AAAA,EACZ,CAAC,EAAE,OAAO,OAAO,OAAO,MAAM,SAAS,OAAO,UAAU,YAAY,GAAG,MAAM,GAAG,QAAQ;AACtF,UAAM,cAAc,MAAM;AACxB,iBAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,CAAkC;AACrE,gBAAU;AAAA,IACZ;AAEA,UAAM,gBAAgB,QAAQ,0BAAM,IAAI;AAExC,UAAM,cAAc,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AA,MACR,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;;;ADnHT,IAAAC,sBAAA;AAHN,SAAS,YAAY;AACnB,SACE,8CAAC,SAAI,WAAU,OACb;AAAA,iDAAC,QAAG,mBAAK;AAAA,IACT,8CAAC,SAAI,WAAU,mCACb;AAAA,mDAAC,SAAI,WAAU,mBACb,uDAAC,iBAAM,OAAM,QAAO,MAAK,UAAS,GACpC;AAAA,MACA,6CAAC,SAAI,WAAU,OACb,uDAAC,iBAAM,OAAM,kBAAiB,UAAQ,MAAC,GACzC;AAAA,MACA,6CAAC,SAAI,WAAU,OACb,uDAAC,iBAAM,MAAK,UAAS,GACvB;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,oBAAQ;","names":["import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/demos/InputDemo.tsx","../../../src/components/ui/Input.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/primitives/tooltip.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["import Input from '@/components/ui/Input'\n\nfunction InputDemo() {\n return (\n <div className=\"m-4\">\n <h3>Input</h3>\n <div className=\"flex flex-col gap-2 md:flex-row\">\n <div className=\"bg-green-80 p-2\">\n <Input theme=\"dark\" icon=\"Search\" />\n </div>\n <div className=\"p-2\">\n <Input label=\"Required input\" required description=\"This is a tooltip\" />\n </div>\n <div className=\"p-2\">\n <Input icon=\"MapPin\" />\n </div>\n </div>\n </div>\n )\n}\n\nexport default InputDemo\n","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 description?: string\n classNames?: { label?: string }\n onClear?: () => void\n}\n\nconst Input = forwardRef<HTMLInputElement, Props>(\n (\n { label, error, description, theme, icon, onClear, value, onChange, classNames, ...props },\n ref\n ) => {\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 gap-1\" data-testid={`input-wrapper-${props.id}`}>\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n description={description}\n className={classNames?.label}\n />\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} />\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","'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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAuC;AACvC,IAAAA,uBAAyB;AACzB,mBAAuE;;;ACFvE,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MA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A;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;;;ADxHT,IAAAC,sBAAA;AAHN,SAAS,YAAY;AACnB,SACE,8CAAC,SAAI,WAAU,OACb;AAAA,iDAAC,QAAG,mBAAK;AAAA,IACT,8CAAC,SAAI,WAAU,mCACb;AAAA,mDAAC,SAAI,WAAU,mBACb,uDAAC,iBAAM,OAAM,QAAO,MAAK,UAAS,GACpC;AAAA,MACA,6CAAC,SAAI,WAAU,OACb,uDAAC,iBAAM,OAAM,kBAAiB,UAAQ,MAAC,aAAY,qBAAoB,GACzE;AAAA,MACA,6CAAC,SAAI,WAAU,OACb,uDAAC,iBAAM,MAAK,UAAS,GACvB;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,oBAAQ;","names":["import_lucide_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
@@ -1,7 +1,7 @@
1
1
  // src/components/ui/Input.tsx
2
2
  import { cva } from "cva";
3
3
  import { icons, X } from "lucide-react";
4
- import { forwardRef } from "react";
4
+ import { forwardRef as forwardRef2 } from "react";
5
5
 
6
6
  // src/lib/utils.ts
7
7
  import { clsx } from "clsx";
@@ -18,31 +18,59 @@ function ErrorMessage({ message, className, ...props }) {
18
18
  }
19
19
  var ErrorMessage_default = ErrorMessage;
20
20
 
21
+ // src/components/primitives/tooltip.tsx
22
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
23
+ import * as React from "react";
24
+ import { jsx as jsx2 } from "react/jsx-runtime";
25
+ var TooltipProvider = TooltipPrimitive.Provider;
26
+ var Tooltip = TooltipPrimitive.Root;
27
+ var TooltipTrigger = TooltipPrimitive.Trigger;
28
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx2(
29
+ TooltipPrimitive.Content,
30
+ {
31
+ ref,
32
+ sideOffset,
33
+ className: cn(
34
+ "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",
35
+ className
36
+ ),
37
+ ...props
38
+ }
39
+ ));
40
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
41
+
21
42
  // src/components/ui/Label.tsx
22
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
23
- function Label({ text, required, className, ...props }) {
43
+ import { InfoIcon } from "lucide-react";
44
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
45
+ function Label({ text, required, description, className, ...props }) {
24
46
  if (!text) return null;
25
- return /* @__PURE__ */ jsxs(
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: [
34
- text,
35
- required && /* @__PURE__ */ jsx2("span", { className: "text-red-600", children: "\xA0*" })
36
- ]
37
- }
38
- );
47
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row gap-1", children: [
48
+ /* @__PURE__ */ jsxs(
49
+ "label",
50
+ {
51
+ className: cn(
52
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
53
+ className
54
+ ),
55
+ ...props,
56
+ children: [
57
+ text,
58
+ required && /* @__PURE__ */ jsx3("span", { className: "text-red-600", children: "\xA0*" })
59
+ ]
60
+ }
61
+ ),
62
+ !!description && /* @__PURE__ */ jsx3(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
63
+ /* @__PURE__ */ jsx3(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx3(InfoIcon, { className: "h-4 w-4" }) }),
64
+ /* @__PURE__ */ jsx3(TooltipContent, { className: "max-w-48", children: description })
65
+ ] }) })
66
+ ] });
39
67
  }
40
68
  var Label_default = Label;
41
69
 
42
70
  // src/components/ui/Input.tsx
43
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
44
- var Input = forwardRef(
45
- ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
71
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
72
+ var Input = forwardRef2(
73
+ ({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
46
74
  const handleClear = () => {
47
75
  onChange?.({ target: { value: "" } });
48
76
  onClear?.();
@@ -52,23 +80,24 @@ var Input = forwardRef(
52
80
  const hasIcon = !!icon;
53
81
  const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
54
82
  return /* @__PURE__ */ jsxs2("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
55
- label && /* @__PURE__ */ jsx3(
83
+ label && /* @__PURE__ */ jsx4(
56
84
  Label_default,
57
85
  {
58
86
  text: label,
59
87
  htmlFor: props.name,
60
88
  required: props.required,
89
+ description,
61
90
  className: classNames?.label
62
91
  }
63
92
  ),
64
93
  /* @__PURE__ */ jsxs2("div", { className: "relative flex flex-row items-center", children: [
65
- IconComponent && /* @__PURE__ */ jsx3(
94
+ IconComponent && /* @__PURE__ */ jsx4(
66
95
  IconComponent,
67
96
  {
68
97
  className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
69
98
  }
70
99
  ),
71
- /* @__PURE__ */ jsx3(
100
+ /* @__PURE__ */ jsx4(
72
101
  "input",
73
102
  {
74
103
  className: cn(inputVariants({ theme, hasIcon })),
@@ -80,7 +109,7 @@ var Input = forwardRef(
80
109
  ...props
81
110
  }
82
111
  ),
83
- hasIcon && value && /* @__PURE__ */ jsx3(
112
+ hasIcon && value && /* @__PURE__ */ jsx4(
84
113
  X,
85
114
  {
86
115
  className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
@@ -89,7 +118,7 @@ var Input = forwardRef(
89
118
  }
90
119
  )
91
120
  ] }),
92
- /* @__PURE__ */ jsx3(ErrorMessage_default, { message: error })
121
+ /* @__PURE__ */ jsx4(ErrorMessage_default, { message: error })
93
122
  ] });
94
123
  }
95
124
  );
@@ -145,14 +174,14 @@ var inputVariants = cva(
145
174
  var Input_default = Input;
146
175
 
147
176
  // src/components/demos/InputDemo.tsx
148
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
177
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
149
178
  function InputDemo() {
150
179
  return /* @__PURE__ */ jsxs3("div", { className: "m-4", children: [
151
- /* @__PURE__ */ jsx4("h3", { children: "Input" }),
180
+ /* @__PURE__ */ jsx5("h3", { children: "Input" }),
152
181
  /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2 md:flex-row", children: [
153
- /* @__PURE__ */ jsx4("div", { className: "bg-green-80 p-2", children: /* @__PURE__ */ jsx4(Input_default, { theme: "dark", icon: "Search" }) }),
154
- /* @__PURE__ */ jsx4("div", { className: "p-2", children: /* @__PURE__ */ jsx4(Input_default, { label: "Required input", required: true }) }),
155
- /* @__PURE__ */ jsx4("div", { className: "p-2", children: /* @__PURE__ */ jsx4(Input_default, { icon: "MapPin" }) })
182
+ /* @__PURE__ */ jsx5("div", { className: "bg-green-80 p-2", children: /* @__PURE__ */ jsx5(Input_default, { theme: "dark", icon: "Search" }) }),
183
+ /* @__PURE__ */ jsx5("div", { className: "p-2", children: /* @__PURE__ */ jsx5(Input_default, { label: "Required input", required: true, description: "This is a tooltip" }) }),
184
+ /* @__PURE__ */ jsx5("div", { className: "p-2", children: /* @__PURE__ */ jsx5(Input_default, { icon: "MapPin" }) })
156
185
  ] })
157
186
  ] });
158
187
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Input.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/demos/InputDemo.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 gap-1\" data-testid={`input-wrapper-${props.id}`}>\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n className={classNames?.label}\n />\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} />\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 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","import Input from '@/components/ui/Input'\n\nfunction InputDemo() {\n return (\n <div className=\"m-4\">\n <h3>Input</h3>\n <div className=\"flex flex-col gap-2 md:flex-row\">\n <div className=\"bg-green-80 p-2\">\n <Input theme=\"dark\" icon=\"Search\" />\n </div>\n <div className=\"p-2\">\n <Input label=\"Required input\" required />\n </div>\n <div className=\"p-2\">\n <Input icon=\"MapPin\" />\n </div>\n </div>\n </div>\n )\n}\n\nexport default InputDemo\n"],"mappings":";AAAA,SAAS,WAA8B;AACvC,SAAS,OAAO,SAAS;AACzB,SAA2B,kBAA4C;;;ACFvE,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oBAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;ACLX,SAQe,OAAAA,MARf;AAJJ,SAAS,MAAM,EAAE,MAAM,UAAU,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,KAAM,QAAO;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,YAAY,gBAAAA,KAAC,UAAK,WAAU,gBAAe,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S,OAAO;AAAA,OAChC;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAEpB,IAAM,gBAAgB;AAAA,EACpB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;;;AInHT,gBAAAE,MACA,QAAAC,aADA;AAHN,SAAS,YAAY;AACnB,SACE,gBAAAA,MAAC,SAAI,WAAU,OACb;AAAA,oBAAAD,KAAC,QAAG,mBAAK;AAAA,IACT,gBAAAC,MAAC,SAAI,WAAU,mCACb;AAAA,sBAAAD,KAAC,SAAI,WAAU,mBACb,0BAAAA,KAAC,iBAAM,OAAM,QAAO,MAAK,UAAS,GACpC;AAAA,MACA,gBAAAA,KAAC,SAAI,WAAU,OACb,0BAAAA,KAAC,iBAAM,OAAM,kBAAiB,UAAQ,MAAC,GACzC;AAAA,MACA,gBAAAA,KAAC,SAAI,WAAU,OACb,0BAAAA,KAAC,iBAAM,MAAK,UAAS,GACvB;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,oBAAQ;","names":["jsx","jsx","jsxs","jsx","jsxs"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Input.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/primitives/tooltip.tsx","../../../src/components/ui/Label.tsx","../../../src/components/demos/InputDemo.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 description?: string\n classNames?: { label?: string }\n onClear?: () => void\n}\n\nconst Input = forwardRef<HTMLInputElement, Props>(\n (\n { label, error, description, theme, icon, onClear, value, onChange, classNames, ...props },\n ref\n ) => {\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 gap-1\" data-testid={`input-wrapper-${props.id}`}>\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n description={description}\n className={classNames?.label}\n />\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} />\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","'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","import Input from '@/components/ui/Input'\n\nfunction InputDemo() {\n return (\n <div className=\"m-4\">\n <h3>Input</h3>\n <div className=\"flex flex-col gap-2 md:flex-row\">\n <div className=\"bg-green-80 p-2\">\n <Input theme=\"dark\" icon=\"Search\" />\n </div>\n <div className=\"p-2\">\n <Input label=\"Required input\" required description=\"This is a tooltip\" />\n </div>\n <div className=\"p-2\">\n <Input icon=\"MapPin\" />\n </div>\n </div>\n </div>\n )\n}\n\nexport default InputDemo\n"],"mappings":";AAAA,SAAS,WAA8B;AACvC,SAAS,OAAO,SAAS;AACzB,SAA2B,cAAAA,mBAA4C;;;ACFvE,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oBAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;AChBf,YAAY,sBAAsB;AAClC,YAAY,WAAW;AAcrB,gBAAAC,YAAA;AAVF,IAAM,kBAAmC;AAEzC,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C,gBAAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;;;AClBtD,SAAS,gBAAgB;AAanB,SAQe,OAAAC,MARf;AALN,SAAS,MAAM,EAAE,MAAM,UAAU,aAAa,WAAW,GAAG,MAAM,GAAoB;AACpF,MAAI,CAAC,KAAM,QAAO;AAElB,SACE,qBAAC,SAAI,WAAU,8BACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAA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