@next-degree/pickle-shared-js 0.9.2 → 0.9.3

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 (34) hide show
  1. package/README.md +4 -2
  2. package/dist/components/primitives/radio-group.cjs +2 -2
  3. package/dist/components/primitives/radio-group.cjs.map +1 -1
  4. package/dist/components/primitives/radio-group.js +4 -2
  5. package/dist/components/primitives/radio-group.js.map +1 -1
  6. package/dist/components/ui/Checkbox.cjs +1 -1
  7. package/dist/components/ui/Checkbox.cjs.map +1 -1
  8. package/dist/components/ui/Checkbox.js +1 -1
  9. package/dist/components/ui/Checkbox.js.map +1 -1
  10. package/dist/components/ui/Combobox.cjs +1 -1
  11. package/dist/components/ui/Combobox.cjs.map +1 -1
  12. package/dist/components/ui/Combobox.js +1 -1
  13. package/dist/components/ui/Combobox.js.map +1 -1
  14. package/dist/components/ui/DatePicker.cjs +7 -5
  15. package/dist/components/ui/DatePicker.cjs.map +1 -1
  16. package/dist/components/ui/DatePicker.d.cts +4 -0
  17. package/dist/components/ui/DatePicker.d.ts +4 -0
  18. package/dist/components/ui/DatePicker.js +7 -5
  19. package/dist/components/ui/DatePicker.js.map +1 -1
  20. package/dist/components/ui/ListItem.cjs +1 -1
  21. package/dist/components/ui/ListItem.cjs.map +1 -1
  22. package/dist/components/ui/ListItem.js +1 -1
  23. package/dist/components/ui/ListItem.js.map +1 -1
  24. package/dist/components/ui/Radio.cjs +2 -2
  25. package/dist/components/ui/Radio.cjs.map +1 -1
  26. package/dist/components/ui/Radio.js +4 -2
  27. package/dist/components/ui/Radio.js.map +1 -1
  28. package/dist/components/ui/Switch.cjs.map +1 -1
  29. package/dist/components/ui/Switch.js.map +1 -1
  30. package/dist/index.cjs +9 -7
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +12 -8
  33. package/dist/index.js.map +1 -1
  34. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["import { CheckIcon } from 'lucide-react'\nimport { icons } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, type ReactNode } from 'react'\n\nimport { Checkbox } from '@/components/ui/Checkbox'\nimport { cn } from '@/lib/utils'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport { cn } from '@/lib/utils'\n\nexport const CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nexport const Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ error, classNames, children, ...props }, ref) => {\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} ref={ref} {...props} />\n <label\n htmlFor={id}\n className={cn(\n 'text-sm',\n props.disabled && 'pointer-events-none text-grey-40',\n classNames?.label\n )}\n >\n {children}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\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"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,aAAa;;;ACCtB,YAAY,uBAAuB;AACnC,SAAS,OAAO,aAAa;AAC7B;AAAA,EAGE;AAAA,OAEK;;;ACTP,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;;;AF8BX,SACE,OAAAA,MADF;AAlCG,IAAM,iBAAiB,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,YACJ;AAAA,MACF;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,+BAAmB,6BAAlB,EAA4B,WAAU,iDACrC;AAAA,sBAAAA,KAAC,SAAM,WAAU,mDAAkD;AAAA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QACjD,eACC,gBAAAA,KAAC,YAAS,IAAI,OAAO,SAAS,YAAY,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG;AAAA,QAEhF,gBAAAC,MAAC,SACC;AAAA,0BAAAD,KAAC,OAAG,iBAAM;AAAA,UACV,gBAAAA,KAAC,OAAE,WAAU,wBAAwB,uBAAY;AAAA,WACnD;AAAA,QAEA,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAM;AAAA;AAAA,QACR;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ;","names":["jsx","jsx","jsxs","icon"]}
1
+ {"version":3,"sources":["../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["import { CheckIcon } from 'lucide-react'\nimport { icons } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, type ReactNode } from 'react'\n\nimport { Checkbox } from '@/components/ui/Checkbox'\nimport { cn } from '@/lib/utils'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport { cn } from '@/lib/utils'\n\nexport const CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'bg-grey-20 data-[state=checked]:bg-grey-20 data-[state=checked]:text-foreground',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nexport const Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ error, classNames, children, ...props }, ref) => {\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} ref={ref} {...props} />\n <label\n htmlFor={id}\n className={cn(\n 'text-sm',\n props.disabled && 'pointer-events-none text-grey-40',\n classNames?.label\n )}\n >\n {children}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\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"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,aAAa;;;ACCtB,YAAY,uBAAuB;AACnC,SAAS,OAAO,aAAa;AAC7B;AAAA,EAGE;AAAA,OAEK;;;ACTP,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;;;AF8BX,SACE,OAAAA,MADF;AAlCG,IAAM,iBAAiB,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA;AAAA,EAA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AkB;AAChB,QAAM,iBAAiB,CAACC,UAA4B;AAClD,QAAIA,SAAQ,OAAO;AACjB,YAAM,gBAAgB,MAAMA,KAAe;AAC3C,aAAO,gBAAAF,KAAC,iBAAc,MAAM,IAAI;AAAA,IAClC;AACA,WAAO;AAAA,EACT;AAEA,QAAM,aAAa,OAAO,eAAe,IAAI,IAAI;AAEjD,SACE,gBAAAC;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MACJ,cAAY,aAAa,YAAY;AAAA,MAEpC;AAAA,sBAAc,gBAAAD,KAAC,UAAK,WAAU,QAAQ,sBAAW;AAAA,QACjD,eACC,gBAAAA,KAAC,YAAS,IAAI,OAAO,SAAS,YAAY,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG;AAAA,QAEhF,gBAAAC,MAAC,SACC;AAAA,0BAAAD,KAAC,OAAG,iBAAM;AAAA,UACV,gBAAAA,KAAC,OAAE,WAAU,wBAAwB,uBAAY;AAAA,WACnD;AAAA,QAEA,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAM;AAAA;AAAA,QACR;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ;","names":["jsx","jsx","jsxs","icon"]}
@@ -37,6 +37,7 @@ var import_react2 = require("react");
37
37
 
38
38
  // src/components/primitives/radio-group.tsx
39
39
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
40
+ var import_react = require("react");
40
41
 
41
42
  // src/lib/utils.ts
42
43
  var import_clsx = require("clsx");
@@ -46,7 +47,6 @@ function cn(...inputs) {
46
47
  }
47
48
 
48
49
  // src/components/primitives/radio-group.tsx
49
- var import_react = require("react");
50
50
  var import_jsx_runtime = require("react/jsx-runtime");
51
51
  var RadioGroup = (0, import_react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupPrimitive.Root, { className, ...props, ref }));
52
52
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
@@ -57,7 +57,7 @@ var RadioGroupItem = (0, import_react.forwardRef)(({ className, children, ...pro
57
57
  {
58
58
  ref,
59
59
  className: cn(
60
- "focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
60
+ "peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
61
61
  className
62
62
  ),
63
63
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Radio.tsx","../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { ComponentProps, forwardRef } from 'react'\nimport { RadioGroup, RadioGroupItem } from '@/components/primitives/radio-group'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype RadioItem = { id: string | number; title: string; value: string }\ntype RadioClassNames = { root?: string; group?: string; item?: string }\ntype RadioGroupProps = Omit<ComponentProps<typeof RadioGroup>, 'onValueChange'>\nexport type RadioProps = RadioGroupProps & {\n label?: string\n error?: string\n description?: string\n classNames?: RadioClassNames\n options?: RadioItem[]\n onChange?: (value: string) => void\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n error,\n description,\n options,\n classNames,\n onChange: handleValueChange,\n orientation,\n ...props\n },\n ref\n ) => {\n return (\n <div className={cn('flex flex-col gap-1', classNames?.root)}>\n <Label text={label} description={description} required={props.required} />\n\n <RadioGroup\n ref={ref}\n className={cn(\n 'flex text-sm',\n orientation === 'vertical' ? 'flex-col gap-2' : 'flex-row gap-4',\n classNames?.group\n )}\n onValueChange={handleValueChange}\n {...props}\n >\n {options?.map(({ id, title, value }) => (\n <RadioGroupItem\n key={id}\n value={value}\n id={`radio-group-item-${title}`}\n className={classNames?.item}\n >\n {title}\n </RadioGroupItem>\n ))}\n </RadioGroup>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nRadio.displayName = 'Radio'\n","'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport { cn } from '@/lib/utils'\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef, PropsWithChildren } from 'react'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\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 { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\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","'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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAA2C;;;ACE3C,0BAAqC;;;ACFrC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADAA,mBAAoF;AAMlF;AAJK,IAAM,iBAAa,yBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,4CAAqB,0BAApB,EAAyB,WAAuB,GAAG,OAAO,KAAU,CACtE;AACD,WAAW,cAAkC,yBAAK;AAE3C,IAAM,qBAAiB,yBAG5B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5C,SACE,6CAAC,SAAI,WAAU,0CACb;AAAA;AAAA,MAAqB;AAAA,MAApB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,WAAU,WAAU,GAChC;AAAA,MACA,6CAAC,kBAAe,WAAU,YAAY,uBAAY;AAAA,OACpD,GACF;AAAA,KAEJ;AAEJ;AAEA,IAAO,gBAAQ;;;AJdT,IAAAC,sBAAA;AAfC,IAAM,YAAQ;AAAA,EACnB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,WACE,8CAAC,SAAI,WAAW,GAAG,uBAAuB,YAAY,IAAI,GACxD;AAAA,mDAAC,iBAAM,MAAM,OAAO,aAA0B,UAAU,MAAM,UAAU;AAAA,MAExE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,gBAAgB,aAAa,mBAAmB;AAAA,YAChD,YAAY;AAAA,UACd;AAAA,UACA,eAAe;AAAA,UACd,GAAG;AAAA,UAEH,mBAAS,IAAI,CAAC,EAAE,IAAI,OAAO,MAAM,MAChC;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,IAAI,oBAAoB,KAAK;AAAA,cAC7B,WAAW,YAAY;AAAA,cAEtB;AAAA;AAAA,YALI;AAAA,UAMP,CACD;AAAA;AAAA,MACH;AAAA,MAEA,6CAAC,wBAAa,SAAS,OAAO;AAAA,OAChC;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Radio.tsx","../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { type ComponentProps, forwardRef } from 'react'\n\nimport { RadioGroup, RadioGroupItem } from '@/components/primitives/radio-group'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype RadioItem = { id: string | number; title: string; value: string }\ntype RadioClassNames = { root?: string; group?: string; item?: string }\ntype RadioGroupProps = Omit<ComponentProps<typeof RadioGroup>, 'onValueChange'>\nexport type RadioProps = RadioGroupProps & {\n label?: string\n error?: string\n description?: string\n classNames?: RadioClassNames\n options?: RadioItem[]\n onChange?: (value: string) => void\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n error,\n description,\n options,\n classNames,\n onChange: handleValueChange,\n orientation,\n ...props\n },\n ref\n ) => {\n return (\n <div className={cn('flex flex-col gap-1', classNames?.root)}>\n <Label text={label} description={description} required={props.required} />\n\n <RadioGroup\n ref={ref}\n className={cn(\n 'flex text-sm',\n orientation === 'vertical' ? 'flex-col gap-2' : 'flex-row gap-4',\n classNames?.group\n )}\n onValueChange={handleValueChange}\n {...props}\n >\n {options?.map(({ id, title, value }) => (\n <RadioGroupItem\n key={id}\n value={value}\n id={`radio-group-item-${title}`}\n className={classNames?.item}\n >\n {title}\n </RadioGroupItem>\n ))}\n </RadioGroup>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nRadio.displayName = 'Radio'\n","'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\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 { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\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","'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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAAgD;;;ACEhD,0BAAqC;AACrC,mBAKO;;;ACRP,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADWE;AAJK,IAAM,iBAAa,yBAGxB,CAAC,EAAE,WAAW,GAAG,MA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;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,YAAY,6CAAC,UAAK,WAAU,gBAAe,mBAAO;AAAA;AAAA;AAAA,IACrD;AAAA,IAEC,CAAC,CAAC,eACD,6CAAC,mBACC,wDAAC,WACC;AAAA,mDAAC,kBAAe,SAAO,MACrB,uDAAC,gCAAS,WAAU,WAAU,GAChC;AAAA,MACA,6CAAC,kBAAe,WAAU,YAAY,uBAAY;AAAA,OACpD,GACF;AAAA,KAEJ;AAEJ;AAEA,IAAO,gBAAQ;;;AJbT,IAAAC,sBAAA;AAfC,IAAM,YAAQ;AAAA,EACnB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,WACE,8CAAC,SAAI,WAAW,GAAG,uBAAuB,YAAY,IAAI,GACxD;AAAA,mDAAC,iBAAM,MAAM,OAAO,aAA0B,UAAU,MAAM,UAAU;AAAA,MAExE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,gBAAgB,aAAa,mBAAmB;AAAA,YAChD,YAAY;AAAA,UACd;AAAA,UACA,eAAe;AAAA,UACd,GAAG;AAAA,UAEH,mBAAS,IAAI,CAAC,EAAE,IAAI,OAAO,MAAM,MAChC;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,IAAI,oBAAoB,KAAK;AAAA,cAC7B,WAAW,YAAY;AAAA,cAEtB;AAAA;AAAA,YALI;AAAA,UAMP,CACD;AAAA;AAAA,MACH;AAAA,MAEA,6CAAC,wBAAa,SAAS,OAAO;AAAA,OAChC;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
@@ -3,6 +3,9 @@ import { forwardRef as forwardRef3 } from "react";
3
3
 
4
4
  // src/components/primitives/radio-group.tsx
5
5
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
6
+ import {
7
+ forwardRef
8
+ } from "react";
6
9
 
7
10
  // src/lib/utils.ts
8
11
  import { clsx } from "clsx";
@@ -12,7 +15,6 @@ function cn(...inputs) {
12
15
  }
13
16
 
14
17
  // src/components/primitives/radio-group.tsx
15
- import { forwardRef } from "react";
16
18
  import { jsx, jsxs } from "react/jsx-runtime";
17
19
  var RadioGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { className, ...props, ref }));
18
20
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
@@ -23,7 +25,7 @@ var RadioGroupItem = forwardRef(({ className, children, ...props }, ref) => {
23
25
  {
24
26
  ref,
25
27
  className: cn(
26
- "focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
28
+ "peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
27
29
  className
28
30
  ),
29
31
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Radio.tsx","../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { ComponentProps, forwardRef } from 'react'\nimport { RadioGroup, RadioGroupItem } from '@/components/primitives/radio-group'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype RadioItem = { id: string | number; title: string; value: string }\ntype RadioClassNames = { root?: string; group?: string; item?: string }\ntype RadioGroupProps = Omit<ComponentProps<typeof RadioGroup>, 'onValueChange'>\nexport type RadioProps = RadioGroupProps & {\n label?: string\n error?: string\n description?: string\n classNames?: RadioClassNames\n options?: RadioItem[]\n onChange?: (value: string) => void\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n error,\n description,\n options,\n classNames,\n onChange: handleValueChange,\n orientation,\n ...props\n },\n ref\n ) => {\n return (\n <div className={cn('flex flex-col gap-1', classNames?.root)}>\n <Label text={label} description={description} required={props.required} />\n\n <RadioGroup\n ref={ref}\n className={cn(\n 'flex text-sm',\n orientation === 'vertical' ? 'flex-col gap-2' : 'flex-row gap-4',\n classNames?.group\n )}\n onValueChange={handleValueChange}\n {...props}\n >\n {options?.map(({ id, title, value }) => (\n <RadioGroupItem\n key={id}\n value={value}\n id={`radio-group-item-${title}`}\n className={classNames?.item}\n >\n {title}\n </RadioGroupItem>\n ))}\n </RadioGroup>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nRadio.displayName = 'Radio'\n","'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport { cn } from '@/lib/utils'\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef, PropsWithChildren } from 'react'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\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 { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\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","'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"],"mappings":";AAAA,SAAyB,cAAAA,mBAAkB;;;ACE3C,YAAY,yBAAyB;;;ACFrC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADAA,SA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A,YALI;AAAA,UAMP,CACD;AAAA;AAAA,MACH;AAAA,MAEA,gBAAAA,KAAC,wBAAa,SAAS,OAAO;AAAA,OAChC;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["forwardRef","jsx","jsx","jsx","jsxs","jsx","jsxs","forwardRef"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Radio.tsx","../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { type ComponentProps, forwardRef } from 'react'\n\nimport { RadioGroup, RadioGroupItem } from '@/components/primitives/radio-group'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype RadioItem = { id: string | number; title: string; value: string }\ntype RadioClassNames = { root?: string; group?: string; item?: string }\ntype RadioGroupProps = Omit<ComponentProps<typeof RadioGroup>, 'onValueChange'>\nexport type RadioProps = RadioGroupProps & {\n label?: string\n error?: string\n description?: string\n classNames?: RadioClassNames\n options?: RadioItem[]\n onChange?: (value: string) => void\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n error,\n description,\n options,\n classNames,\n onChange: handleValueChange,\n orientation,\n ...props\n },\n ref\n ) => {\n return (\n <div className={cn('flex flex-col gap-1', classNames?.root)}>\n <Label text={label} description={description} required={props.required} />\n\n <RadioGroup\n ref={ref}\n className={cn(\n 'flex text-sm',\n orientation === 'vertical' ? 'flex-col gap-2' : 'flex-row gap-4',\n classNames?.group\n )}\n onValueChange={handleValueChange}\n {...props}\n >\n {options?.map(({ id, title, value }) => (\n <RadioGroupItem\n key={id}\n value={value}\n id={`radio-group-item-${title}`}\n className={classNames?.item}\n >\n {title}\n </RadioGroupItem>\n ))}\n </RadioGroup>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nRadio.displayName = 'Radio'\n","'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\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 { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\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","'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"],"mappings":";AAAA,SAA8B,cAAAA,mBAAkB;;;ACEhD,YAAY,yBAAyB;AACrC;AAAA,EAGE;AAAA,OAEK;;;ACRP,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADWE,cASE,YATF;AAJK,IAAM,aAAa,WAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAqB,0BAApB,EAAyB,WAAuB,GAAG,OAAO,KAAU,CACtE;AACD,WAAW,cAAkC,yBAAK;AAE3C,IAAM,iBAAiB,WAG5B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5C,SACE,qBAAC,SAAI,WAAU,0CACb;AAAA;AAAA,MAAqB;AAAA,MAApB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,IACA,oBAAC,WAAM,SAAS,MAAM,IAAI,WAAU,6CACjC,UACH;AAAA,KACF;AAEJ,CAAC;AACD,eAAe,cAAkC,yBAAK;;;AE5BlD,gBAAAC,YAAA;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,gBAAAA,KAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;AClBf,SAAS,gBAAgB;;;ACEzB,YAAY,sBAAsB;AAClC,YAAY,WAAW;AAcrB,gBAAAC,YAAA;AAVF,IAAM,kBAAmC;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0B,UAAU,MAAM,UAAU;AAAA,MAExE,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,gBAAgB,aAAa,mBAAmB;AAAA,YAChD,YAAY;AAAA,UACd;AAAA,UACA,eAAe;AAAA,UACd,GAAG;AAAA,UAEH,mBAAS,IAAI,CAAC,EAAE,IAAI,OAAO,MAAM,MAChC,gBAAAA;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,IAAI,oBAAoB,KAAK;AAAA,cAC7B,WAAW,YAAY;AAAA,cAEtB;AAAA;AAAA,YALI;AAAA,UAMP,CACD;AAAA;AAAA,MACH;AAAA,MAEA,gBAAAA,KAAC,wBAAa,SAAS,OAAO;AAAA,OAChC;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["forwardRef","jsx","jsx","jsx","jsxs","jsx","jsxs","forwardRef"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Switch.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["import * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { forwardRef } from 'react'\n\nimport { cn } from '@/lib/utils'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\n\ninterface Props extends SwitchPrimitive.SwitchProps {\n label?: string\n error?: string\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, Props>(\n ({ label, error, className, ...props }, ref) => {\n return (\n <div className={cn('flex items-center', props.disabled && 'opacity-50')}>\n <SwitchPrimitive.Root\n className={cn(\n 'relative h-[25px] w-[42px] cursor-default rounded-full bg-grey-20 shadow-md outline-none focus:outline-purple-100 data-[state=checked]:bg-green-90',\n className\n )}\n ref={ref}\n {...props}\n >\n <SwitchPrimitive.Thumb className=\"block h-[21px] w-[21px] translate-x-0.5 rounded-full bg-white shadow-[0_2px_2px] transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[19px]\" />\n </SwitchPrimitive.Root>\n {label && (\n <label className=\"pl-4 text-sm leading-none text-inherit\" htmlFor={props.name}>\n {label}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n )}\n </div>\n )\n }\n)\nSwitch.displayName = 'Switch'\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAiC;AACjC,mBAA2B;;;ACD3B,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;;;AFKL,IAAAA,sBAAA;AAZH,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC9C,WACE,8CAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,YAAY,YAAY,GACpE;AAAA;AAAA,QAAiB;AAAA,QAAhB;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACA;AAAA,UACC,GAAG;AAAA,UAEJ,uDAAiB,uBAAhB,EAAsB,WAAU,oLAAmL;AAAA;AAAA,MACtN;AAAA,MACC,SACC,8CAAC,WAAM,WAAU,0CAAyC,SAAS,MAAM,MACtE;AAAA;AAAA,QAED,6CAAC,wBAAa,SAAS,OAAO,WAAU,QAAO;AAAA,SACjD;AAAA,OAEJ;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;","names":["import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Switch.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["import * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { forwardRef } from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends SwitchPrimitive.SwitchProps {\n label?: string\n error?: string\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, Props>(\n ({ label, error, className, ...props }, ref) => {\n return (\n <div className={cn('flex items-center', props.disabled && 'opacity-50')}>\n <SwitchPrimitive.Root\n className={cn(\n 'relative h-[25px] w-[42px] cursor-default rounded-full bg-grey-20 shadow-md outline-none focus:outline-purple-100 data-[state=checked]:bg-green-90',\n className\n )}\n ref={ref}\n {...props}\n >\n <SwitchPrimitive.Thumb className=\"block h-[21px] w-[21px] translate-x-0.5 rounded-full bg-white shadow-[0_2px_2px] transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[19px]\" />\n </SwitchPrimitive.Root>\n {label && (\n <label className=\"pl-4 text-sm leading-none text-inherit\" htmlFor={props.name}>\n {label}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n )}\n </div>\n )\n }\n)\nSwitch.displayName = 'Switch'\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAiC;AACjC,mBAA2B;;;ACD3B,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;;;AFKL,IAAAA,sBAAA;AAZH,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC9C,WACE,8CAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,YAAY,YAAY,GACpE;AAAA;AAAA,QAAiB;AAAA,QAAhB;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACA;AAAA,UACC,GAAG;AAAA,UAEJ,uDAAiB,uBAAhB,EAAsB,WAAU,oLAAmL;AAAA;AAAA,MACtN;AAAA,MACC,SACC,8CAAC,WAAM,WAAU,0CAAyC,SAAS,MAAM,MACtE;AAAA;AAAA,QAED,6CAAC,wBAAa,SAAS,OAAO,WAAU,QAAO;AAAA,SACjD;AAAA,OAEJ;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;","names":["import_jsx_runtime"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Switch.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["import * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { forwardRef } from 'react'\n\nimport { cn } from '@/lib/utils'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\n\ninterface Props extends SwitchPrimitive.SwitchProps {\n label?: string\n error?: string\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, Props>(\n ({ label, error, className, ...props }, ref) => {\n return (\n <div className={cn('flex items-center', props.disabled && 'opacity-50')}>\n <SwitchPrimitive.Root\n className={cn(\n 'relative h-[25px] w-[42px] cursor-default rounded-full bg-grey-20 shadow-md outline-none focus:outline-purple-100 data-[state=checked]:bg-green-90',\n className\n )}\n ref={ref}\n {...props}\n >\n <SwitchPrimitive.Thumb className=\"block h-[21px] w-[21px] translate-x-0.5 rounded-full bg-white shadow-[0_2px_2px] transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[19px]\" />\n </SwitchPrimitive.Root>\n {label && (\n <label className=\"pl-4 text-sm leading-none text-inherit\" htmlFor={props.name}>\n {label}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n )}\n </div>\n )\n }\n)\nSwitch.displayName = 'Switch'\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"],"mappings":";AAAA,YAAY,qBAAqB;AACjC,SAAS,kBAAkB;;;ACD3B,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;;;AFKL,gBAAAA,MAGA,YAHA;AAZH,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC9C,WACE,qBAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,YAAY,YAAY,GACpE;AAAA,sBAAAA;AAAA,QAAiB;AAAA,QAAhB;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACA;AAAA,UACC,GAAG;AAAA,UAEJ,0BAAAA,KAAiB,uBAAhB,EAAsB,WAAU,oLAAmL;AAAA;AAAA,MACtN;AAAA,MACC,SACC,qBAAC,WAAM,WAAU,0CAAyC,SAAS,MAAM,MACtE;AAAA;AAAA,QAED,gBAAAA,KAAC,wBAAa,SAAS,OAAO,WAAU,QAAO;AAAA,SACjD;AAAA,OAEJ;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;","names":["jsx"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Switch.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["import * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { forwardRef } from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends SwitchPrimitive.SwitchProps {\n label?: string\n error?: string\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, Props>(\n ({ label, error, className, ...props }, ref) => {\n return (\n <div className={cn('flex items-center', props.disabled && 'opacity-50')}>\n <SwitchPrimitive.Root\n className={cn(\n 'relative h-[25px] w-[42px] cursor-default rounded-full bg-grey-20 shadow-md outline-none focus:outline-purple-100 data-[state=checked]:bg-green-90',\n className\n )}\n ref={ref}\n {...props}\n >\n <SwitchPrimitive.Thumb className=\"block h-[21px] w-[21px] translate-x-0.5 rounded-full bg-white shadow-[0_2px_2px] transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[19px]\" />\n </SwitchPrimitive.Root>\n {label && (\n <label className=\"pl-4 text-sm leading-none text-inherit\" htmlFor={props.name}>\n {label}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n )}\n </div>\n )\n }\n)\nSwitch.displayName = 'Switch'\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"],"mappings":";AAAA,YAAY,qBAAqB;AACjC,SAAS,kBAAkB;;;ACD3B,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;;;AFKL,gBAAAA,MAGA,YAHA;AAZH,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC9C,WACE,qBAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,YAAY,YAAY,GACpE;AAAA,sBAAAA;AAAA,QAAiB;AAAA,QAAhB;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACA;AAAA,UACC,GAAG;AAAA,UAEJ,0BAAAA,KAAiB,uBAAhB,EAAsB,WAAU,oLAAmL;AAAA;AAAA,MACtN;AAAA,MACC,SACC,qBAAC,WAAM,WAAU,0CAAyC,SAAS,MAAM,MACtE;AAAA;AAAA,QAED,gBAAAA,KAAC,wBAAa,SAAS,OAAO,WAAU,QAAO;AAAA,SACjD;AAAA,OAEJ;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;","names":["jsx"]}
package/dist/index.cjs CHANGED
@@ -306,7 +306,7 @@ var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref
306
306
  "data-[state=indeterminate]:bg-green-80",
307
307
  "data-[state=checked]:text-white",
308
308
  "data-[state=indeterminate]:text-primary-foreground",
309
- props.disabled && "data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",
309
+ props.disabled && "bg-grey-20 data-[state=checked]:bg-grey-20 data-[state=checked]:text-foreground",
310
310
  className
311
311
  ),
312
312
  ...props,
@@ -1399,7 +1399,7 @@ var RadioGroupItem = (0, import_react8.forwardRef)(({ className, children, ...pr
1399
1399
  {
1400
1400
  ref,
1401
1401
  className: cn(
1402
- "focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
1402
+ "peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
1403
1403
  className
1404
1404
  ),
1405
1405
  ...props
@@ -1931,7 +1931,7 @@ Calendar.displayName = "Calendar";
1931
1931
  // src/components/ui/DatePicker.tsx
1932
1932
  var import_jsx_runtime31 = require("react/jsx-runtime");
1933
1933
  var DatePicker = (0, import_react14.forwardRef)(
1934
- ({ label, description, required, classNames, value, onChange, error }, ref) => {
1934
+ ({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {
1935
1935
  const [date, setDate] = (0, import_react14.useState)(null);
1936
1936
  (0, import_react14.useEffect)(() => {
1937
1937
  setDate(value ?? null);
@@ -1941,7 +1941,7 @@ var DatePicker = (0, import_react14.forwardRef)(
1941
1941
  onChange?.(dateSelected);
1942
1942
  setDate(dateSelected);
1943
1943
  };
1944
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex w-auto flex-col gap-1"), children: [
1944
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { id, className: cn("flex w-auto flex-col gap-1"), children: [
1945
1945
  label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1946
1946
  Label_default,
1947
1947
  {
@@ -1952,7 +1952,7 @@ var DatePicker = (0, import_react14.forwardRef)(
1952
1952
  }
1953
1953
  ),
1954
1954
  /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Popover, { children: [
1955
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn(datePickerStyle()), children: [
1955
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverTrigger, { "data-testid": testId, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn(datePickerStyle(), classNames?.input), children: [
1956
1956
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react14.Calendar, { size: 16 }),
1957
1957
  date ? (0, import_date_fns.format)(date, "MM/dd/yyyy") : "Select a date"
1958
1958
  ] }) }),
@@ -1963,7 +1963,8 @@ var DatePicker = (0, import_react14.forwardRef)(
1963
1963
  selected: date || void 0,
1964
1964
  onSelect: handleDateSelect,
1965
1965
  captionLayout: "dropdown",
1966
- showOutsideDays: true
1966
+ showOutsideDays: true,
1967
+ className: classNames?.calendar
1967
1968
  }
1968
1969
  ) })
1969
1970
  ] }),
@@ -1999,7 +2000,8 @@ var datePickerStyle = (0, import_cva9.cva)([
1999
2000
  "[&::-webkit-search-results-decoration]:appearance-none",
2000
2001
  "[&::-ms-clear]:display-none",
2001
2002
  "[&::-ms-reveal]:display-none",
2002
- "text-grey-80 border"
2003
+ "text-grey-80 border",
2004
+ "font-normal"
2003
2005
  ]);
2004
2006
 
2005
2007
  // src/components/company/CompanyBenefits.tsx