@betterinternship/components 3.0.2 → 3.0.4

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 (55) hide show
  1. package/README.md +45 -45
  2. package/dist/components/accordion.js.map +1 -1
  3. package/dist/components/animated-count.js.map +1 -1
  4. package/dist/components/app-header.js.map +1 -1
  5. package/dist/components/avatar.js.map +1 -1
  6. package/dist/components/badge.js.map +1 -1
  7. package/dist/components/banner.js.map +1 -1
  8. package/dist/components/button.js.map +1 -1
  9. package/dist/components/calendar.js.map +1 -1
  10. package/dist/components/card.js.map +1 -1
  11. package/dist/components/checkbox.js.map +1 -1
  12. package/dist/components/dialog.js.map +1 -1
  13. package/dist/components/divider.js.map +1 -1
  14. package/dist/components/dropdown-menu.js.map +1 -1
  15. package/dist/components/file-upload.js.map +1 -1
  16. package/dist/components/filter-chip.js.map +1 -1
  17. package/dist/components/form-checkbox-group.js.map +1 -1
  18. package/dist/components/form-checkbox.js.map +1 -1
  19. package/dist/components/form-date-picker.js.map +1 -1
  20. package/dist/components/form-field.js.map +1 -1
  21. package/dist/components/form-input.js.map +1 -1
  22. package/dist/components/form-month-picker.js.map +1 -1
  23. package/dist/components/form-radio.js.map +1 -1
  24. package/dist/components/form-textarea.js.map +1 -1
  25. package/dist/components/input.js.map +1 -1
  26. package/dist/components/label.js.map +1 -1
  27. package/dist/components/loader.js.map +1 -1
  28. package/dist/components/page-header.js.map +1 -1
  29. package/dist/components/popover.js.map +1 -1
  30. package/dist/components/radio-group.js.map +1 -1
  31. package/dist/components/select.js.map +1 -1
  32. package/dist/components/sheet.d.ts +1 -1
  33. package/dist/components/skeleton.js.map +1 -1
  34. package/dist/components/stepper.js.map +1 -1
  35. package/dist/components/switch.js.map +1 -1
  36. package/dist/components/table.js.map +1 -1
  37. package/dist/components/tabs.js +1 -1
  38. package/dist/components/tabs.js.map +1 -1
  39. package/dist/components/textarea.js.map +1 -1
  40. package/dist/components/time-input-native.js.map +1 -1
  41. package/dist/components/tooltip.js.map +1 -1
  42. package/dist/hooks/use-field-focus.js.map +1 -1
  43. package/dist/hooks/use-mobile-sheet-viewport.js.map +1 -1
  44. package/dist/hooks/use-mobile.js.map +1 -1
  45. package/dist/hooks/use-resource-table.js +284 -0
  46. package/dist/hooks/use-resource-table.js.map +1 -0
  47. package/dist/hooks/useMQJob.js.map +1 -1
  48. package/dist/index.d.ts +4 -2
  49. package/dist/index.js +1 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/lib/interaction-styles.js.map +1 -1
  52. package/dist/utils.js.map +1 -1
  53. package/package.json +291 -291
  54. package/theme.css +355 -355
  55. package/theme.legacy.css +84 -84
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.js","sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@/utils';\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n // z-[1100] (not the default z-50) — the shared modal system's\n // backdrop is z-[1000] (app/providers/modal-provider.tsx), and\n // this portals to document.body as a sibling of it, so it needs\n // to clear that to render above a modal. Matches the same fix\n // already applied to SelectContent (components/select.tsx).\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[1100] max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-control-lg border border-border shadow-card',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n );\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-muted focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer select-none items-center gap-2 px-4 py-2 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-muted focus:text-foreground relative flex w-full cursor-pointer items-center gap-2 py-2 pr-4 pl-10 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-4 flex size-4 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-muted focus:text-foreground relative flex w-full cursor-pointer items-center gap-2 py-2 pr-4 pl-10 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-4 flex size-4 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n 'px-4 py-2 text-sm font-semibold text-foreground data-[inset]:pl-10',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-muted focus:text-foreground data-[state=open]:bg-muted data-[state=open]:text-foreground flex cursor-pointer items-center gap-2 px-4 py-2 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden select-none data-[inset]:pl-10',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4 text-muted-foreground\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n // z-[1100] — see the matching note on DropdownMenuContent above.\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[1100] min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-control-lg border border-border shadow-card',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;AAMA,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACgD,EAAA;IACxD,OAAOA,GAAA,CAAC,qBAAqB,CAAC,IAAI,iBAAW,eAAe,EAAA,GAAK,KAAK,EAAA,CAAI;AAC5E;AAEA,SAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACkD,EAAA;IAC1D,QACEA,GAAA,CAAC,qBAAqB,CAAC,MAAM,EAAA,EAAA,WAAA,EAAW,sBAAsB,EAAA,GAAK,KAAK,EA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x"],"sourcesContent":["import * as React from 'react';\r\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\r\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\n\r\nfunction DropdownMenu({\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\r\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\r\n}\r\n\r\nfunction DropdownMenuPortal({\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\r\n return (\r\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\r\n );\r\n}\r\n\r\nfunction DropdownMenuTrigger({\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\r\n return (\r\n <DropdownMenuPrimitive.Trigger\r\n data-slot=\"dropdown-menu-trigger\"\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuContent({\r\n className,\r\n sideOffset = 4,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\r\n return (\r\n <DropdownMenuPrimitive.Portal>\r\n <DropdownMenuPrimitive.Content\r\n data-slot=\"dropdown-menu-content\"\r\n sideOffset={sideOffset}\r\n className={cn(\r\n // z-[1100] (not the default z-50) — the shared modal system's\r\n // backdrop is z-[1000] (app/providers/modal-provider.tsx), and\r\n // this portals to document.body as a sibling of it, so it needs\r\n // to clear that to render above a modal. Matches the same fix\r\n // already applied to SelectContent (components/select.tsx).\r\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[1100] max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-control-lg border border-border shadow-card',\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </DropdownMenuPrimitive.Portal>\r\n );\r\n}\r\n\r\nfunction DropdownMenuGroup({\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\r\n return (\r\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\r\n );\r\n}\r\n\r\nfunction DropdownMenuItem({\r\n className,\r\n inset,\r\n variant = 'default',\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n variant?: 'default' | 'destructive';\r\n}) {\r\n return (\r\n <DropdownMenuPrimitive.Item\r\n data-slot=\"dropdown-menu-item\"\r\n data-inset={inset}\r\n data-variant={variant}\r\n className={cn(\r\n \"focus:bg-muted focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer select-none items-center gap-2 px-4 py-2 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuCheckboxItem({\r\n className,\r\n children,\r\n checked,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\r\n return (\r\n <DropdownMenuPrimitive.CheckboxItem\r\n data-slot=\"dropdown-menu-checkbox-item\"\r\n className={cn(\r\n \"focus:bg-muted focus:text-foreground relative flex w-full cursor-pointer items-center gap-2 py-2 pr-4 pl-10 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}\r\n >\r\n <span className=\"pointer-events-none absolute left-4 flex size-4 items-center justify-center\">\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <CheckIcon className=\"size-4\" />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.CheckboxItem>\r\n );\r\n}\r\n\r\nfunction DropdownMenuRadioGroup({\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\r\n return (\r\n <DropdownMenuPrimitive.RadioGroup\r\n data-slot=\"dropdown-menu-radio-group\"\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuRadioItem({\r\n className,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\r\n return (\r\n <DropdownMenuPrimitive.RadioItem\r\n data-slot=\"dropdown-menu-radio-item\"\r\n className={cn(\r\n \"focus:bg-muted focus:text-foreground relative flex w-full cursor-pointer items-center gap-2 py-2 pr-4 pl-10 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <span className=\"pointer-events-none absolute left-4 flex size-4 items-center justify-center\">\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <CircleIcon className=\"size-2 fill-current\" />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.RadioItem>\r\n );\r\n}\r\n\r\nfunction DropdownMenuLabel({\r\n className,\r\n inset,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n}) {\r\n return (\r\n <DropdownMenuPrimitive.Label\r\n data-slot=\"dropdown-menu-label\"\r\n data-inset={inset}\r\n className={cn(\r\n 'px-4 py-2 text-sm font-semibold text-foreground data-[inset]:pl-10',\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuSeparator({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\r\n return (\r\n <DropdownMenuPrimitive.Separator\r\n data-slot=\"dropdown-menu-separator\"\r\n className={cn('bg-border h-px', className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuShortcut({\r\n className,\r\n ...props\r\n}: React.ComponentProps<'span'>) {\r\n return (\r\n <span\r\n data-slot=\"dropdown-menu-shortcut\"\r\n className={cn(\r\n 'text-muted-foreground ml-auto text-xs tracking-widest',\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuSub({\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\r\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\r\n}\r\n\r\nfunction DropdownMenuSubTrigger({\r\n className,\r\n inset,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n}) {\r\n return (\r\n <DropdownMenuPrimitive.SubTrigger\r\n data-slot=\"dropdown-menu-sub-trigger\"\r\n data-inset={inset}\r\n className={cn(\r\n 'focus:bg-muted focus:text-foreground data-[state=open]:bg-muted data-[state=open]:text-foreground flex cursor-pointer items-center gap-2 px-4 py-2 pointer-coarse:min-h-11 text-sm text-muted-foreground transition-colors duration-state hover:bg-muted motion-reduce:transition-none outline-hidden select-none data-[inset]:pl-10',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronRightIcon className=\"ml-auto size-4 text-muted-foreground\" />\r\n </DropdownMenuPrimitive.SubTrigger>\r\n );\r\n}\r\n\r\nfunction DropdownMenuSubContent({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\r\n return (\r\n <DropdownMenuPrimitive.SubContent\r\n data-slot=\"dropdown-menu-sub-content\"\r\n className={cn(\r\n // z-[1100] — see the matching note on DropdownMenuContent above.\r\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[1100] min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-control-lg border border-border shadow-card',\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuPortal,\r\n DropdownMenuTrigger,\r\n DropdownMenuContent,\r\n DropdownMenuGroup,\r\n DropdownMenuLabel,\r\n DropdownMenuItem,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuRadioGroup,\r\n DropdownMenuRadioItem,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuSub,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuSubContent,\r\n};\r\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;AAMA,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACgD,EAAA;IACxD,OAAOA,GAAA,CAAC,qBAAqB,CAAC,IAAI,iBAAW,eAAe,EAAA,GAAK,KAAK,EAAA,CAAI;AAC5E;AAEA,SAAS,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AS,EAAE,EAAE;;AAEX,QAAA,kiBAAkiB,EACliB,SAAS,CACV,KACG,KAAK,EAAA,CACT;AAEN;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-upload.js","sources":["../../src/components/file-upload.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Upload } from \"lucide-react\";\nimport { cn } from \"@/utils\";\nimport { FieldLabel } from \"./label\";\n\nexport type FileUploadVariant = \"compact\" | \"dropzone\";\nexport type FileUploadProps = {\n label: string;\n name: string;\n variant?: FileUploadVariant;\n accept?: string;\n multiple?: boolean;\n required?: boolean;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n onFileSelect?: (file: File | null) => void;\n onFilesSelect?: (files: File[]) => void;\n};\n\nexport const FileUpload = React.forwardRef<HTMLInputElement, FileUploadProps>(\n ({ label, name, variant = \"compact\", accept, multiple, required, placeholder, disabled, className, onFileSelect, onFilesSelect }, ref) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [fileName, setFileName] = React.useState<string | null>(null);\n const [dragging, setDragging] = React.useState(false);\n const selectFiles = (files: File[]) => {\n const file = files[0] ?? null;\n setFileName(files.length > 1 ? `${files.length} files selected` : file?.name ?? null);\n onFileSelect?.(file);\n onFilesSelect?.(files);\n };\n const openPicker = () => { if (!disabled) inputRef.current?.click(); };\n return <div className={cn(\"grid gap-field-label-gap\", className)}>\n <FieldLabel htmlFor={name}>{label}{required && <span className=\"text-destructive\"> *</span>}</FieldLabel>\n <button type=\"button\" disabled={disabled} onClick={openPicker}\n onDragEnter={(event) => { event.preventDefault(); setDragging(true); }}\n onDragOver={(event) => { event.preventDefault(); if (!disabled) setDragging(true); }}\n onDragLeave={() => setDragging(false)}\n onDrop={(event) => { event.preventDefault(); setDragging(false); selectFiles(Array.from(event.dataTransfer.files).slice(0, multiple ? undefined : 1)); }}\n className={cn(\n \"flex w-full cursor-pointer items-center gap-2 border border-input text-left text-sm text-muted-foreground transition-colors hover:border-input-hover hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-60\",\n variant === \"dropzone\" ? \"min-h-36 flex-col justify-center rounded-card border-solid border-border px-6 py-6 text-center\" : \"min-h-11 rounded-control-lg px-4 py-2\",\n dragging && \"border-primary bg-primary-tint\",\n )}>\n <Upload className=\"size-5 shrink-0 text-primary\" />\n <span className={cn(\"min-w-0 truncate\", fileName && \"text-foreground\")}>{fileName ?? placeholder ?? \"Drop a file here or click to upload\"}</span>\n </button>\n <input ref={(node) => { inputRef.current = node; if (typeof ref === \"function\") ref(node); else if (ref) ref.current = node; }} id={name} type=\"file\" name={name} accept={accept} multiple={multiple} required={required} disabled={disabled} onChange={(event) => selectFiles(Array.from(event.target.files ?? []))} className=\"sr-only\" />\n </div>;\n },\n);\nFileUpload.displayName = \"FileUpload\";\n"],"names":[],"mappings":";;;;;;;AAsBO;;AAGH;AACA;AACA;;;AAGE;AACA;AACF;AACA;;AACA;AAIoE;;AAW8B;AAAS;AAE7G;AAEF;;"}
1
+ {"version":3,"file":"file-upload.js","sources":["../../src/components/file-upload.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Upload } from \"lucide-react\";\r\nimport { cn } from \"@/utils\";\r\nimport { FieldLabel } from \"./label\";\r\n\r\nexport type FileUploadVariant = \"compact\" | \"dropzone\";\r\nexport type FileUploadProps = {\r\n label: string;\r\n name: string;\r\n variant?: FileUploadVariant;\r\n accept?: string;\r\n multiple?: boolean;\r\n required?: boolean;\r\n placeholder?: string;\r\n disabled?: boolean;\r\n className?: string;\r\n onFileSelect?: (file: File | null) => void;\r\n onFilesSelect?: (files: File[]) => void;\r\n};\r\n\r\nexport const FileUpload = React.forwardRef<HTMLInputElement, FileUploadProps>(\r\n ({ label, name, variant = \"compact\", accept, multiple, required, placeholder, disabled, className, onFileSelect, onFilesSelect }, ref) => {\r\n const inputRef = React.useRef<HTMLInputElement>(null);\r\n const [fileName, setFileName] = React.useState<string | null>(null);\r\n const [dragging, setDragging] = React.useState(false);\r\n const selectFiles = (files: File[]) => {\r\n const file = files[0] ?? null;\r\n setFileName(files.length > 1 ? `${files.length} files selected` : file?.name ?? null);\r\n onFileSelect?.(file);\r\n onFilesSelect?.(files);\r\n };\r\n const openPicker = () => { if (!disabled) inputRef.current?.click(); };\r\n return <div className={cn(\"grid gap-field-label-gap\", className)}>\r\n <FieldLabel htmlFor={name}>{label}{required && <span className=\"text-destructive\"> *</span>}</FieldLabel>\r\n <button type=\"button\" disabled={disabled} onClick={openPicker}\r\n onDragEnter={(event) => { event.preventDefault(); setDragging(true); }}\r\n onDragOver={(event) => { event.preventDefault(); if (!disabled) setDragging(true); }}\r\n onDragLeave={() => setDragging(false)}\r\n onDrop={(event) => { event.preventDefault(); setDragging(false); selectFiles(Array.from(event.dataTransfer.files).slice(0, multiple ? undefined : 1)); }}\r\n className={cn(\r\n \"flex w-full cursor-pointer items-center gap-2 border border-input text-left text-sm text-muted-foreground transition-colors hover:border-input-hover hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-60\",\r\n variant === \"dropzone\" ? \"min-h-36 flex-col justify-center rounded-card border-solid border-border px-6 py-6 text-center\" : \"min-h-11 rounded-control-lg px-4 py-2\",\r\n dragging && \"border-primary bg-primary-tint\",\r\n )}>\r\n <Upload className=\"size-5 shrink-0 text-primary\" />\r\n <span className={cn(\"min-w-0 truncate\", fileName && \"text-foreground\")}>{fileName ?? placeholder ?? \"Drop a file here or click to upload\"}</span>\r\n </button>\r\n <input ref={(node) => { inputRef.current = node; if (typeof ref === \"function\") ref(node); else if (ref) ref.current = node; }} id={name} type=\"file\" name={name} accept={accept} multiple={multiple} required={required} disabled={disabled} onChange={(event) => selectFiles(Array.from(event.target.files ?? []))} className=\"sr-only\" />\r\n </div>;\r\n },\r\n);\r\nFileUpload.displayName = \"FileUpload\";\r\n"],"names":[],"mappings":";;;;;;;AAsBO;;AAGH;AACA;AACA;;;AAGE;AACA;AACF;AACA;;AACA;AAIoE;;AAW8B;AAAS;AAE7G;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"filter-chip.js","sources":["../../src/components/filter-chip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { Button, type ButtonProps } from './button';\nimport type { ButtonScheme, ButtonSize } from './button';\n\nexport type FilterChipProps = Omit<\n ButtonProps,\n 'variant' | 'size' | 'scheme' | 'shape' | 'aria-pressed'\n> & {\n selected?: boolean;\n icon?: React.ReactNode;\n value?: string;\n size?: ButtonSize;\n scheme?: ButtonScheme;\n count?: number;\n};\n\nconst FilterChipGroupContext = React.createContext<{\n value: string | string[];\n multiple: boolean;\n onChange: (value: string) => void;\n} | null>(null);\n\n/** A toggleable pill for filtering; announces its state via aria-pressed. */\nconst FilterChip = React.forwardRef<HTMLButtonElement, FilterChipProps>(\n ({ selected, icon, children, className, value: chipValue, size = 'md', scheme, count, ...props }, ref) => {\n const group = React.useContext(FilterChipGroupContext);\n const isSelected = selected ?? (group && chipValue ? (group.multiple ? group.value.includes(chipValue) : group.value === chipValue) : false);\n return (\n <Button\n ref={ref}\n type=\"button\"\n variant=\"outline\"\n scheme={isSelected ? (scheme ?? 'secondary') : 'neutral'}\n size={size}\n shape=\"pill\"\n aria-pressed={isSelected}\n onClick={(event) => {\n props.onClick?.(event);\n if (!event.defaultPrevented && group && chipValue) group.onChange(chipValue);\n }}\n className={cn(\n 'group w-max max-w-full gap-2.5 font-[550] aria-pressed:font-semibold max-md:gap-2',\n !isSelected && '!border-border enabled:hover:!border-input',\n isSelected && scheme === 'neutral' && 'border-input-hover bg-accent text-accent-foreground hover:bg-accent',\n isSelected && scheme === 'primary' && 'border-primary bg-primary-selected text-primary hover:bg-primary-selected',\n className,\n )}\n {...props}\n >\n {icon}\n {children}\n {count !== undefined && <span className=\"inline-flex translate-y-px items-center text-[0.875em] leading-none tabular-nums opacity-75\">({count})</span>}\n </Button>\n );\n },\n);\nFilterChip.displayName = 'FilterChip';\n\nexport { FilterChip };\n\nexport function FilterChipGroup({ value, onChange, multiple = false, children, className }: {\n value: string | string[];\n onChange: (value: string | string[]) => void;\n multiple?: boolean;\n children: React.ReactNode;\n className?: string;\n}) {\n return <div className={cn('flex flex-wrap gap-2', className)}>\n <FilterChipGroupContext.Provider value={{ value, multiple, onChange: (next) => {\n if (!multiple) return onChange(next);\n const values = Array.isArray(value) ? value : [];\n onChange(values.includes(next) ? values.filter((item) => item !== next) : [...values, next]);\n } }}>{children}</FilterChipGroupContext.Provider>\n </div>;\n}\n"],"names":[],"mappings":";;;;;;AAoBA;AAMA;AACA;;AAGI;;AAWI;AACA;AAAmD;;AAgBzD;AAEF;AAIM;;AASA;AAAe;AACf;AACA;AACF;AAEJ;;"}
1
+ {"version":3,"file":"filter-chip.js","sources":["../../src/components/filter-chip.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { Button, type ButtonProps } from './button';\r\nimport type { ButtonScheme, ButtonSize } from './button';\r\n\r\nexport type FilterChipProps = Omit<\r\n ButtonProps,\r\n 'variant' | 'size' | 'scheme' | 'shape' | 'aria-pressed'\r\n> & {\r\n selected?: boolean;\r\n icon?: React.ReactNode;\r\n value?: string;\r\n size?: ButtonSize;\r\n scheme?: ButtonScheme;\r\n count?: number;\r\n};\r\n\r\nconst FilterChipGroupContext = React.createContext<{\r\n value: string | string[];\r\n multiple: boolean;\r\n onChange: (value: string) => void;\r\n} | null>(null);\r\n\r\n/** A toggleable pill for filtering; announces its state via aria-pressed. */\r\nconst FilterChip = React.forwardRef<HTMLButtonElement, FilterChipProps>(\r\n ({ selected, icon, children, className, value: chipValue, size = 'md', scheme, count, ...props }, ref) => {\r\n const group = React.useContext(FilterChipGroupContext);\r\n const isSelected = selected ?? (group && chipValue ? (group.multiple ? group.value.includes(chipValue) : group.value === chipValue) : false);\r\n return (\r\n <Button\r\n ref={ref}\r\n type=\"button\"\r\n variant=\"outline\"\r\n scheme={isSelected ? (scheme ?? 'secondary') : 'neutral'}\r\n size={size}\r\n shape=\"pill\"\r\n aria-pressed={isSelected}\r\n onClick={(event) => {\r\n props.onClick?.(event);\r\n if (!event.defaultPrevented && group && chipValue) group.onChange(chipValue);\r\n }}\r\n className={cn(\r\n 'group w-max max-w-full gap-2.5 font-[550] aria-pressed:font-semibold max-md:gap-2',\r\n !isSelected && '!border-border enabled:hover:!border-input',\r\n isSelected && scheme === 'neutral' && 'border-input-hover bg-accent text-accent-foreground hover:bg-accent',\r\n isSelected && scheme === 'primary' && 'border-primary bg-primary-selected text-primary hover:bg-primary-selected',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {icon}\r\n {children}\r\n {count !== undefined && <span className=\"inline-flex translate-y-px items-center text-[0.875em] leading-none tabular-nums opacity-75\">({count})</span>}\r\n </Button>\r\n );\r\n },\r\n);\r\nFilterChip.displayName = 'FilterChip';\r\n\r\nexport { FilterChip };\r\n\r\nexport function FilterChipGroup({ value, onChange, multiple = false, children, className }: {\r\n value: string | string[];\r\n onChange: (value: string | string[]) => void;\r\n multiple?: boolean;\r\n children: React.ReactNode;\r\n className?: string;\r\n}) {\r\n return <div className={cn('flex flex-wrap gap-2', className)}>\r\n <FilterChipGroupContext.Provider value={{ value, multiple, onChange: (next) => {\r\n if (!multiple) return onChange(next);\r\n const values = Array.isArray(value) ? value : [];\r\n onChange(values.includes(next) ? values.filter((item) => item !== next) : [...values, next]);\r\n } }}>{children}</FilterChipGroupContext.Provider>\r\n </div>;\r\n}\r\n"],"names":[],"mappings":";;;;;;AAoBA;AAMA;AACA;;AAGI;;AAWI;AACA;AAAmD;;AAgBzD;AAEF;AAIM;;AASA;AAAe;AACf;AACA;AACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-checkbox-group.js","sources":["../../src/components/form-checkbox-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { AnimatedCount } from '@/components/animated-count';\nimport { FormCheckbox } from './form-checkbox';\nimport { FormField } from './form-field';\n\nexport interface FormCheckBoxGroupProps extends Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'onToggle'\n> {\n options: { value: string | number; label: string; description?: string }[];\n values: (string | number)[];\n setter: (values: (string | number)[]) => void;\n label?: string;\n required?: boolean;\n className?: string;\n tooltip?: string;\n tooltipId?: string;\n /** Multi-select hint shown above the options. Pass `null` to hide it. */\n hint?: React.ReactNode;\n /**\n * Whether the \"N selected\" count renders in its own row above the\n * options. Defaults to true. Set to false when the count is shown\n * elsewhere instead (e.g. via `labelAddon`) — otherwise selecting the\n * first option inserts this row and shifts the options below it.\n */\n showSelectedCount?: boolean;\n /** Rendered to the right of the label, on the label's own row. */\n labelAddon?: React.ReactNode;\n /** Columns on md+ screens. Defaults to 3. */\n columns?: 1 | 2 | 3;\n /** Fired when a single option is toggled, before the setter runs. */\n onToggle?: (value: string | number, checked: boolean) => void;\n}\n\nconst GRID_COLS: Record<1 | 2 | 3, string> = {\n 1: '',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n};\n\nexport const FormCheckBoxGroup = ({\n options,\n values,\n setter,\n label,\n required = false,\n className,\n tooltip,\n tooltipId,\n hint = null,\n showSelectedCount = true,\n labelAddon,\n columns = 3,\n onToggle,\n}: FormCheckBoxGroupProps) => {\n const handleValueChange = (optionValue: string | number) => {\n const willBeChecked = !values.includes(optionValue);\n onToggle?.(optionValue, willBeChecked);\n setter(\n willBeChecked\n ? [...values, optionValue]\n : values.filter((v) => v !== optionValue),\n );\n };\n\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n className={className}\n >\n {(hint || (showSelectedCount && values.length > 0)) && (\n <div className=\"flex items-center gap-2 text-xs\">\n {hint && (\n <span className=\"text-muted-foreground text-xs\">{hint}</span>\n )}\n {showSelectedCount && values.length > 0 && (\n <span className=\"text-primary font-medium\">\n <AnimatedCount value={values.length} /> selected\n </span>\n )}\n </div>\n )}\n\n <div className={cn('grid grid-cols-1 gap-4', GRID_COLS[columns])}>\n {options.map((option) => {\n const isChecked = values.includes(option.value);\n\n return (\n <div\n key={option.value}\n role=\"checkbox\"\n aria-checked={isChecked}\n onClick={() => handleValueChange(option.value)}\n className={cn(\n 'group flex h-fit cursor-pointer items-start gap-3 rounded-control-lg border p-3 transition-colors duration-state ease-out-strong focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring motion-reduce:transition-none [&>div]:pointer-events-none',\n isChecked\n ? 'border-primary bg-primary-selected'\n : 'border-border hover:border-input hover:bg-muted',\n )}\n >\n <FormCheckbox\n className=\"pointer-events-none pt-0.5\"\n checked={isChecked ?? false}\n />\n <div className=\"min-w-0 flex-1 space-y-1 pt-0.5\">\n <span className=\"block text-field-label font-field-label text-[color:var(--color-field-label)]\">\n {option.label}\n </span>\n {option.description && (\n <p className=\"text-sm text-muted-foreground\">{option.description}</p>\n )}\n </div>\n </div>\n );\n })}\n </div>\n </FormField>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsCA;AACE;AACA;AACA;;AAGK;AAeL;;AAEE;AACA;AAEI;AACA;AAEN;;;;AAqCgB;;AAkBV;AAIR;;"}
1
+ {"version":3,"file":"form-checkbox-group.js","sources":["../../src/components/form-checkbox-group.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { AnimatedCount } from '@/components/animated-count';\r\nimport { FormCheckbox } from './form-checkbox';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormCheckBoxGroupProps extends Omit<\r\n React.InputHTMLAttributes<HTMLInputElement>,\r\n 'onToggle'\r\n> {\r\n options: { value: string | number; label: string; description?: string }[];\r\n values: (string | number)[];\r\n setter: (values: (string | number)[]) => void;\r\n label?: string;\r\n required?: boolean;\r\n className?: string;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n /** Multi-select hint shown above the options. Pass `null` to hide it. */\r\n hint?: React.ReactNode;\r\n /**\r\n * Whether the \"N selected\" count renders in its own row above the\r\n * options. Defaults to true. Set to false when the count is shown\r\n * elsewhere instead (e.g. via `labelAddon`) — otherwise selecting the\r\n * first option inserts this row and shifts the options below it.\r\n */\r\n showSelectedCount?: boolean;\r\n /** Rendered to the right of the label, on the label's own row. */\r\n labelAddon?: React.ReactNode;\r\n /** Columns on md+ screens. Defaults to 3. */\r\n columns?: 1 | 2 | 3;\r\n /** Fired when a single option is toggled, before the setter runs. */\r\n onToggle?: (value: string | number, checked: boolean) => void;\r\n}\r\n\r\nconst GRID_COLS: Record<1 | 2 | 3, string> = {\r\n 1: '',\r\n 2: 'md:grid-cols-2',\r\n 3: 'md:grid-cols-3',\r\n};\r\n\r\nexport const FormCheckBoxGroup = ({\r\n options,\r\n values,\r\n setter,\r\n label,\r\n required = false,\r\n className,\r\n tooltip,\r\n tooltipId,\r\n hint = null,\r\n showSelectedCount = true,\r\n labelAddon,\r\n columns = 3,\r\n onToggle,\r\n}: FormCheckBoxGroupProps) => {\r\n const handleValueChange = (optionValue: string | number) => {\r\n const willBeChecked = !values.includes(optionValue);\r\n onToggle?.(optionValue, willBeChecked);\r\n setter(\r\n willBeChecked\r\n ? [...values, optionValue]\r\n : values.filter((v) => v !== optionValue),\r\n );\r\n };\r\n\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n className={className}\r\n >\r\n {(hint || (showSelectedCount && values.length > 0)) && (\r\n <div className=\"flex items-center gap-2 text-xs\">\r\n {hint && (\r\n <span className=\"text-muted-foreground text-xs\">{hint}</span>\r\n )}\r\n {showSelectedCount && values.length > 0 && (\r\n <span className=\"text-primary font-medium\">\r\n <AnimatedCount value={values.length} /> selected\r\n </span>\r\n )}\r\n </div>\r\n )}\r\n\r\n <div className={cn('grid grid-cols-1 gap-4', GRID_COLS[columns])}>\r\n {options.map((option) => {\r\n const isChecked = values.includes(option.value);\r\n\r\n return (\r\n <div\r\n key={option.value}\r\n role=\"checkbox\"\r\n aria-checked={isChecked}\r\n onClick={() => handleValueChange(option.value)}\r\n className={cn(\r\n 'group flex h-fit cursor-pointer items-start gap-3 rounded-control-lg border p-3 transition-colors duration-state ease-out-strong focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring motion-reduce:transition-none [&>div]:pointer-events-none',\r\n isChecked\r\n ? 'border-primary bg-primary-selected'\r\n : 'border-border hover:border-input hover:bg-muted',\r\n )}\r\n >\r\n <FormCheckbox\r\n className=\"pointer-events-none pt-0.5\"\r\n checked={isChecked ?? false}\r\n />\r\n <div className=\"min-w-0 flex-1 space-y-1 pt-0.5\">\r\n <span className=\"block text-field-label font-field-label text-[color:var(--color-field-label)]\">\r\n {option.label}\r\n </span>\r\n {option.description && (\r\n <p className=\"text-sm text-muted-foreground\">{option.description}</p>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </FormField>\r\n );\r\n};\r\n"],"names":[],"mappings":";;;;;;;AAsCA;AACE;AACA;AACA;;AAGK;AAeL;;AAEE;AACA;AAEI;AACA;AAEN;;;;AAqCgB;;AAkBV;AAIR;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-checkbox.js","sources":["../../src/components/form-checkbox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { Checkbox } from '@/components/checkbox';\nimport { FormField } from './form-field';\n\nexport interface FormCheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {\n checked?: boolean;\n indeterminate?: boolean;\n label?: string;\n setter?: (value: boolean) => void;\n className?: string;\n sentence?: React.ReactNode;\n required?: boolean;\n tooltip?: string;\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n}\n\n/** A labelled Checkbox; the box itself is styled by the Checkbox primitive. */\nexport const FormCheckbox = ({\n label,\n checked,\n indeterminate,\n setter,\n className,\n sentence,\n required,\n tooltip,\n tooltipId,\n labelAddon,\n id,\n disabled,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n}: FormCheckboxProps) => {\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n className={className}\n >\n <div className=\"flex gap-2 sm:items-center\">\n <Checkbox\n id={id}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n name={label ?? ''}\n checked={indeterminate ? 'indeterminate' : checked}\n // Larger tap target on mobile.\n className={cn('size-6 sm:size-5')}\n onCheckedChange={(next) => setter && setter(!!next)}\n />\n {sentence && (\n <div\n className=\"text-muted-foreground cursor-pointer text-sm select-none\"\n onClick={() => setter?.(!checked)}\n role=\"button\"\n >\n {sentence}\n </div>\n )}\n </div>\n </FormField>\n );\n};\n"],"names":[],"mappings":";;;;;;AAqBA;AACO;AAgBL;;;AAiCF;;"}
1
+ {"version":3,"file":"form-checkbox.js","sources":["../../src/components/form-checkbox.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { Checkbox } from '@/components/checkbox';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormCheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n checked?: boolean;\r\n indeterminate?: boolean;\r\n label?: string;\r\n setter?: (value: boolean) => void;\r\n className?: string;\r\n sentence?: React.ReactNode;\r\n required?: boolean;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n}\r\n\r\n/** A labelled Checkbox; the box itself is styled by the Checkbox primitive. */\r\nexport const FormCheckbox = ({\r\n label,\r\n checked,\r\n indeterminate,\r\n setter,\r\n className,\r\n sentence,\r\n required,\r\n tooltip,\r\n tooltipId,\r\n labelAddon,\r\n id,\r\n disabled,\r\n 'aria-label': ariaLabel,\r\n 'aria-describedby': ariaDescribedBy,\r\n}: FormCheckboxProps) => {\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n className={className}\r\n >\r\n <div className=\"flex gap-2 sm:items-center\">\r\n <Checkbox\r\n id={id}\r\n disabled={disabled}\r\n aria-label={ariaLabel}\r\n aria-describedby={ariaDescribedBy}\r\n name={label ?? ''}\r\n checked={indeterminate ? 'indeterminate' : checked}\r\n // Larger tap target on mobile.\r\n className={cn('size-6 sm:size-5')}\r\n onCheckedChange={(next) => setter && setter(!!next)}\r\n />\r\n {sentence && (\r\n <div\r\n className=\"text-muted-foreground cursor-pointer text-sm select-none\"\r\n onClick={() => setter?.(!checked)}\r\n role=\"button\"\r\n >\r\n {sentence}\r\n </div>\r\n )}\r\n </div>\r\n </FormField>\r\n );\r\n};\r\n"],"names":[],"mappings":";;;;;;AAqBA;AACO;AAgBL;;;AAiCF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-date-picker.js","sources":["../../src/components/form-date-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { Matcher } from '@daypicker/react';\nimport { CalendarDays, X } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport { fieldTriggerClassName } from '@/hooks/use-field-focus';\nimport { Button } from '@/components/button';\nimport { Calendar } from '@/components/calendar';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@/components/popover';\nimport { FormField } from './form-field';\n\n/**\n * Accepts/returns a number timestamp (ms) via `date` / `setter`.\n */\nexport interface FormDatePickerProps extends React.InputHTMLAttributes<HTMLInputElement> {\n mode?: 'single' | 'multiple' | 'range';\n dates?: number[];\n onDatesChange?: (dates: number[]) => void;\n range?: { from?: number; to?: number };\n onRangeChange?: (range: { from?: number; to?: number } | undefined) => void;\n label?: string;\n date?: number;\n setter?: (value?: number) => void;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n contentClassName?: string;\n /** 'buttons' is the old name for DayPicker's 'label' layout. */\n captionLayout?: 'buttons' | 'label' | 'dropdown';\n required?: boolean;\n tooltip?: string;\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n\n /** Optional: disable dates (react-day-picker style) */\n disabledDays?:\n | Date\n | { before?: Date; after?: Date; from?: Date; to?: Date }\n | Date[];\n /** Only these local calendar dates can be selected. */\n allowedDates?: Date[];\n\n /** Close popover automatically on select (default true) */\n autoClose?: boolean;\n\n /** Placeholder text when no date selected */\n placeholder?: string;\n\n /** Format the button text */\n format?: (d: Date) => string;\n}\n\nexport const FormDatePicker = ({\n mode = 'single',\n dates,\n onDatesChange,\n range,\n onRangeChange,\n label,\n date,\n setter,\n className,\n side = 'bottom',\n align = 'start',\n sideOffset = 6,\n contentClassName,\n captionLayout = 'dropdown',\n disabledDays,\n allowedDates,\n autoClose = true,\n placeholder = 'Select date',\n format = (d) => d.toLocaleDateString(),\n required = false,\n tooltip,\n tooltipId,\n labelAddon,\n ...props\n}: FormDatePickerProps) => {\n const [open, setOpen] = React.useState(false);\n const selected = date != null && date > 86400000 ? new Date(date) : undefined;\n const selectedRange = range ? { from: range.from != null ? new Date(range.from) : undefined, to: range.to != null ? new Date(range.to) : undefined } : undefined;\n\n if (mode === 'multiple') return <FormDateMultiPicker label={label} dates={dates} setter={onDatesChange} className={className} contentClassName={contentClassName} required={required} tooltip={tooltip} labelAddon={labelAddon} allowedDates={allowedDates} disabledDays={disabledDays as Matcher | Matcher[]} />;\n\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n className={cn('flex flex-col', className)}\n >\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n id={props.id ?? 'date'}\n className={cn(\"w-full justify-between px-field-padding-x py-0\", fieldTriggerClassName)}\n >\n {mode === 'range' && selectedRange?.from ? `${format(selectedRange.from)}${selectedRange.to ? ` – ${format(selectedRange.to)}` : ' – …'}` : selected ? format(selected) : <span className=\"text-muted-foreground/40\">{placeholder}</span>}\n <CalendarDays className=\"h-4 w-4 text-muted-foreground\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent\n align={align}\n side={side}\n sideOffset={sideOffset}\n className={cn(\n 'w-auto overflow-hidden p-0',\n contentClassName,\n )}\n >\n {mode === 'range' ? <Calendar\n mode=\"range\"\n selected={selectedRange}\n captionLayout={captionLayout === 'buttons' ? 'label' : captionLayout}\n disabled={disabledDays as Matcher[]}\n allowedDates={allowedDates}\n excludeDisabled\n onSelect={(next) => {\n onRangeChange?.(next ? { from: next.from?.getTime(), to: next.to?.getTime() } : undefined);\n // Range selection stays open so the user can adjust both ends,\n // matching multiple-date selection behavior.\n }}\n /> : <Calendar\n mode=\"single\"\n selected={selected}\n captionLayout={\n captionLayout === 'buttons' ? 'label' : captionLayout\n }\n disabled={disabledDays as Matcher[]}\n allowedDates={allowedDates}\n onSelect={(d) => {\n setter?.(d ? d.getTime() : undefined);\n if (autoClose) setOpen(false);\n }}\n />}\n </PopoverContent>\n </Popover>\n </FormField>\n );\n};\n\ninterface FormDateMultiPickerProps {\n label?: string;\n dates?: number[];\n setter?: (value: number[]) => void;\n className?: string;\n contentClassName?: string;\n required?: boolean;\n tooltip?: string;\n labelAddon?: React.ReactNode;\n /** Only these local calendar dates can be selected. */\n allowedDates?: Date[];\n disabledDays?: Matcher | Matcher[];\n}\n\nconst FormDateMultiPicker = ({\n label,\n dates = [],\n setter,\n className,\n contentClassName,\n required = false,\n tooltip,\n labelAddon,\n allowedDates,\n disabledDays,\n}: FormDateMultiPickerProps) => {\n const [open, setOpen] = React.useState(false);\n const selected = dates\n .filter((value) => Number.isFinite(value))\n .map((value) => {\n const parts = new Intl.DateTimeFormat('en-US', {\n timeZone: 'Asia/Manila',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n }).formatToParts(new Date(value));\n const get = (type: string) =>\n Number(parts.find((part) => part.type === type)?.value);\n return new Date(get('year'), get('month') - 1, get('day'));\n });\n const toManilaTimestamp = (date: Date) =>\n Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) -\n 8 * 60 * 60 * 1000;\n\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n labelAddon={labelAddon}\n className={cn('flex flex-col', className)}\n >\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n className={cn(\"w-full justify-between px-field-padding-x py-0\", fieldTriggerClassName)}\n >\n {selected.length\n ? `${selected.length} date${selected.length === 1 ? '' : 's'} selected`\n : 'Select dates'}\n <CalendarDays className=\"h-4 w-4 text-muted-foreground\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n sideOffset={6}\n className={cn(\n 'w-auto overflow-hidden p-0',\n contentClassName,\n )}\n >\n <Calendar\n mode=\"multiple\"\n captionLayout=\"label\"\n allowedDates={allowedDates}\n disabled={disabledDays}\n selected={selected}\n onSelect={(next) =>\n setter?.(\n (next ?? []).map(toManilaTimestamp).sort((a, b) => a - b),\n )\n }\n />\n </PopoverContent>\n </Popover>\n {!!selected.length && (\n <div className=\"flex flex-wrap gap-1.5\">\n {selected.map((date) => (\n <Button\n key={date.getTime()}\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-7 gap-1 px-2 text-xs\"\n onClick={() =>\n setter?.(\n selected\n .filter(\n (selectedDate) =>\n selectedDate.getTime() !== date.getTime(),\n )\n .map(toManilaTimestamp),\n )\n }\n >\n {date.toLocaleDateString(undefined, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })}\n <X className=\"h-3 w-3\" />\n <span className=\"sr-only\">\n Remove {date.toLocaleDateString()}\n </span>\n </Button>\n ))}\n </div>\n )}\n </FormField>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA2DO;AA0BL;;;;AAIyB;;AAwCb;;;AAGF;AAUE;AACA;;AACF;AAMZ;AAgBA;AAYE;;AAEG;AACA;;AAEG;AACA;AACA;AACA;;;;AAKJ;;AAGA;AAEF;AAeY;AACC;AAsCM;;AASL;AACA;AACA;AACD;AAWf;;"}
1
+ {"version":3,"file":"form-date-picker.js","sources":["../../src/components/form-date-picker.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport type { Matcher } from '@daypicker/react';\r\nimport { CalendarDays, X } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { fieldTriggerClassName } from '@/hooks/use-field-focus';\r\nimport { Button } from '@/components/button';\r\nimport { Calendar } from '@/components/calendar';\r\nimport {\r\n Popover,\r\n PopoverContent,\r\n PopoverTrigger,\r\n} from '@/components/popover';\r\nimport { FormField } from './form-field';\r\n\r\n/**\r\n * Accepts/returns a number timestamp (ms) via `date` / `setter`.\r\n */\r\nexport interface FormDatePickerProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n mode?: 'single' | 'multiple' | 'range';\r\n dates?: number[];\r\n onDatesChange?: (dates: number[]) => void;\r\n range?: { from?: number; to?: number };\r\n onRangeChange?: (range: { from?: number; to?: number } | undefined) => void;\r\n label?: string;\r\n date?: number;\r\n setter?: (value?: number) => void;\r\n className?: string;\r\n side?: 'top' | 'right' | 'bottom' | 'left';\r\n align?: 'start' | 'center' | 'end';\r\n sideOffset?: number;\r\n contentClassName?: string;\r\n /** 'buttons' is the old name for DayPicker's 'label' layout. */\r\n captionLayout?: 'buttons' | 'label' | 'dropdown';\r\n required?: boolean;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n\r\n /** Optional: disable dates (react-day-picker style) */\r\n disabledDays?:\r\n | Date\r\n | { before?: Date; after?: Date; from?: Date; to?: Date }\r\n | Date[];\r\n /** Only these local calendar dates can be selected. */\r\n allowedDates?: Date[];\r\n\r\n /** Close popover automatically on select (default true) */\r\n autoClose?: boolean;\r\n\r\n /** Placeholder text when no date selected */\r\n placeholder?: string;\r\n\r\n /** Format the button text */\r\n format?: (d: Date) => string;\r\n}\r\n\r\nexport const FormDatePicker = ({\r\n mode = 'single',\r\n dates,\r\n onDatesChange,\r\n range,\r\n onRangeChange,\r\n label,\r\n date,\r\n setter,\r\n className,\r\n side = 'bottom',\r\n align = 'start',\r\n sideOffset = 6,\r\n contentClassName,\r\n captionLayout = 'dropdown',\r\n disabledDays,\r\n allowedDates,\r\n autoClose = true,\r\n placeholder = 'Select date',\r\n format = (d) => d.toLocaleDateString(),\r\n required = false,\r\n tooltip,\r\n tooltipId,\r\n labelAddon,\r\n ...props\r\n}: FormDatePickerProps) => {\r\n const [open, setOpen] = React.useState(false);\r\n const selected = date != null && date > 86400000 ? new Date(date) : undefined;\r\n const selectedRange = range ? { from: range.from != null ? new Date(range.from) : undefined, to: range.to != null ? new Date(range.to) : undefined } : undefined;\r\n\r\n if (mode === 'multiple') return <FormDateMultiPicker label={label} dates={dates} setter={onDatesChange} className={className} contentClassName={contentClassName} required={required} tooltip={tooltip} labelAddon={labelAddon} allowedDates={allowedDates} disabledDays={disabledDays as Matcher | Matcher[]} />;\r\n\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n className={cn('flex flex-col', className)}\r\n >\r\n <Popover open={open} onOpenChange={setOpen}>\r\n <PopoverTrigger asChild>\r\n <Button\r\n variant=\"outline\"\r\n id={props.id ?? 'date'}\r\n className={cn(\"w-full justify-between px-field-padding-x py-0\", fieldTriggerClassName)}\r\n >\r\n {mode === 'range' && selectedRange?.from ? `${format(selectedRange.from)}${selectedRange.to ? ` – ${format(selectedRange.to)}` : ' – …'}` : selected ? format(selected) : <span className=\"text-muted-foreground/40\">{placeholder}</span>}\r\n <CalendarDays className=\"h-4 w-4 text-muted-foreground\" />\r\n </Button>\r\n </PopoverTrigger>\r\n\r\n <PopoverContent\r\n align={align}\r\n side={side}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n 'w-auto overflow-hidden p-0',\r\n contentClassName,\r\n )}\r\n >\r\n {mode === 'range' ? <Calendar\r\n mode=\"range\"\r\n selected={selectedRange}\r\n captionLayout={captionLayout === 'buttons' ? 'label' : captionLayout}\r\n disabled={disabledDays as Matcher[]}\r\n allowedDates={allowedDates}\r\n excludeDisabled\r\n onSelect={(next) => {\r\n onRangeChange?.(next ? { from: next.from?.getTime(), to: next.to?.getTime() } : undefined);\r\n // Range selection stays open so the user can adjust both ends,\r\n // matching multiple-date selection behavior.\r\n }}\r\n /> : <Calendar\r\n mode=\"single\"\r\n selected={selected}\r\n captionLayout={\r\n captionLayout === 'buttons' ? 'label' : captionLayout\r\n }\r\n disabled={disabledDays as Matcher[]}\r\n allowedDates={allowedDates}\r\n onSelect={(d) => {\r\n setter?.(d ? d.getTime() : undefined);\r\n if (autoClose) setOpen(false);\r\n }}\r\n />}\r\n </PopoverContent>\r\n </Popover>\r\n </FormField>\r\n );\r\n};\r\n\r\ninterface FormDateMultiPickerProps {\r\n label?: string;\r\n dates?: number[];\r\n setter?: (value: number[]) => void;\r\n className?: string;\r\n contentClassName?: string;\r\n required?: boolean;\r\n tooltip?: string;\r\n labelAddon?: React.ReactNode;\r\n /** Only these local calendar dates can be selected. */\r\n allowedDates?: Date[];\r\n disabledDays?: Matcher | Matcher[];\r\n}\r\n\r\nconst FormDateMultiPicker = ({\r\n label,\r\n dates = [],\r\n setter,\r\n className,\r\n contentClassName,\r\n required = false,\r\n tooltip,\r\n labelAddon,\r\n allowedDates,\r\n disabledDays,\r\n}: FormDateMultiPickerProps) => {\r\n const [open, setOpen] = React.useState(false);\r\n const selected = dates\r\n .filter((value) => Number.isFinite(value))\r\n .map((value) => {\r\n const parts = new Intl.DateTimeFormat('en-US', {\r\n timeZone: 'Asia/Manila',\r\n year: 'numeric',\r\n month: 'numeric',\r\n day: 'numeric',\r\n }).formatToParts(new Date(value));\r\n const get = (type: string) =>\r\n Number(parts.find((part) => part.type === type)?.value);\r\n return new Date(get('year'), get('month') - 1, get('day'));\r\n });\r\n const toManilaTimestamp = (date: Date) =>\r\n Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) -\r\n 8 * 60 * 60 * 1000;\r\n\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n labelAddon={labelAddon}\r\n className={cn('flex flex-col', className)}\r\n >\r\n <Popover open={open} onOpenChange={setOpen}>\r\n <PopoverTrigger asChild>\r\n <Button\r\n variant=\"outline\"\r\n className={cn(\"w-full justify-between px-field-padding-x py-0\", fieldTriggerClassName)}\r\n >\r\n {selected.length\r\n ? `${selected.length} date${selected.length === 1 ? '' : 's'} selected`\r\n : 'Select dates'}\r\n <CalendarDays className=\"h-4 w-4 text-muted-foreground\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent\r\n align=\"start\"\r\n sideOffset={6}\r\n className={cn(\r\n 'w-auto overflow-hidden p-0',\r\n contentClassName,\r\n )}\r\n >\r\n <Calendar\r\n mode=\"multiple\"\r\n captionLayout=\"label\"\r\n allowedDates={allowedDates}\r\n disabled={disabledDays}\r\n selected={selected}\r\n onSelect={(next) =>\r\n setter?.(\r\n (next ?? []).map(toManilaTimestamp).sort((a, b) => a - b),\r\n )\r\n }\r\n />\r\n </PopoverContent>\r\n </Popover>\r\n {!!selected.length && (\r\n <div className=\"flex flex-wrap gap-1.5\">\r\n {selected.map((date) => (\r\n <Button\r\n key={date.getTime()}\r\n type=\"button\"\r\n variant=\"outline\"\r\n size=\"sm\"\r\n className=\"h-7 gap-1 px-2 text-xs\"\r\n onClick={() =>\r\n setter?.(\r\n selected\r\n .filter(\r\n (selectedDate) =>\r\n selectedDate.getTime() !== date.getTime(),\r\n )\r\n .map(toManilaTimestamp),\r\n )\r\n }\r\n >\r\n {date.toLocaleDateString(undefined, {\r\n month: 'short',\r\n day: 'numeric',\r\n year: 'numeric',\r\n })}\r\n <X className=\"h-3 w-3\" />\r\n <span className=\"sr-only\">\r\n Remove {date.toLocaleDateString()}\r\n </span>\r\n </Button>\r\n ))}\r\n </div>\r\n )}\r\n </FormField>\r\n );\r\n};\r\n"],"names":[],"mappings":";;;;;;;;;;;AA2DO;AA0BL;;;;AAIyB;;AAwCb;;;AAGF;AAUE;AACA;;AACF;AAMZ;AAgBA;AAYE;;AAEG;AACA;;AAEG;AACA;AACA;AACA;;;;AAKJ;;AAGA;AAEF;AAeY;AACC;AAsCM;;AASL;AACA;AACA;AACD;AAWf;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.js","sources":["../../src/components/form-field.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Label } from './label';\n\nexport interface FormFieldProps {\n label?: string;\n required?: boolean;\n tooltip?: string;\n /** Accepted for compatibility; not used by the Radix tooltip. */\n tooltipId?: string;\n /** Rendered to the right of the label, on the label's own row. */\n labelAddon?: React.ReactNode;\n className?: string;\n children: React.ReactNode;\n}\n\n/** The shared frame of every form field: optional label row, then the control. */\nexport function FormField({\n label,\n required,\n tooltip,\n tooltipId,\n labelAddon,\n className,\n children,\n}: FormFieldProps) {\n return (\n <div className={className}>\n {label && (\n <Label\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n />\n )}\n {children}\n </div>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAgBA;SACgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GACO,EAAA;AACf,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,SAAS,aACtB,KAAK,KACJC,GAAA,CAAC,KAAK,EAAA,EACJ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EAAA,CACtB,CACH,EACA,QAAQ,CAAA,EAAA,CACL;AAEV;;;;"}
1
+ {"version":3,"file":"form-field.js","sources":["../../src/components/form-field.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport { Label } from './label';\r\n\r\nexport interface FormFieldProps {\r\n label?: string;\r\n required?: boolean;\r\n tooltip?: string;\r\n /** Accepted for compatibility; not used by the Radix tooltip. */\r\n tooltipId?: string;\r\n /** Rendered to the right of the label, on the label's own row. */\r\n labelAddon?: React.ReactNode;\r\n className?: string;\r\n children: React.ReactNode;\r\n}\r\n\r\n/** The shared frame of every form field: optional label row, then the control. */\r\nexport function FormField({\r\n label,\r\n required,\r\n tooltip,\r\n tooltipId,\r\n labelAddon,\r\n className,\r\n children,\r\n}: FormFieldProps) {\r\n return (\r\n <div className={className}>\r\n {label && (\r\n <Label\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n />\r\n )}\r\n {children}\r\n </div>\r\n );\r\n}\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAgBA;SACgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GACO,EAAA;AACf,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,SAAS,aACtB,KAAK,KACJC,GAAA,CAAC,KAAK,EAAA,EACJ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EAAA,CACtB,CACH,EACA,QAAQ,CAAA,EAAA,CACL;AAEV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-input.js","sources":["../../src/components/form-input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { Input } from '@/components/input';\nimport { FormField } from './form-field';\n\nexport interface FormInputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n setter?: (value: string) => void;\n required?: boolean;\n className?: string;\n tooltip?: string;\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n}\n\nexport const FormInput = React.forwardRef<HTMLInputElement, FormInputProps>(\n function FormInput(\n {\n label,\n value,\n setter,\n required = true,\n className,\n tooltip,\n tooltipId,\n labelAddon,\n ...props\n },\n ref,\n ) {\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n >\n <Input\n ref={ref}\n value={value ?? ''}\n onChange={(e) => setter && setter(e.target.value)}\n className={cn(className)}\n {...props}\n />\n </FormField>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;AAkBO;AAeH;AAiBF;;"}
1
+ {"version":3,"file":"form-input.js","sources":["../../src/components/form-input.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { Input } from '@/components/input';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormInputProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n label?: string;\r\n setter?: (value: string) => void;\r\n required?: boolean;\r\n className?: string;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n}\r\n\r\nexport const FormInput = React.forwardRef<HTMLInputElement, FormInputProps>(\r\n function FormInput(\r\n {\r\n label,\r\n value,\r\n setter,\r\n required = true,\r\n className,\r\n tooltip,\r\n tooltipId,\r\n labelAddon,\r\n ...props\r\n },\r\n ref,\r\n ) {\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n >\r\n <Input\r\n ref={ref}\r\n value={value ?? ''}\r\n onChange={(e) => setter && setter(e.target.value)}\r\n className={cn(className)}\r\n {...props}\r\n />\r\n </FormField>\r\n );\r\n },\r\n);\r\n"],"names":[],"mappings":";;;;;;;AAkBO;AAeH;AAiBF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-month-picker.js","sources":["../../src/components/form-month-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport { fieldTriggerClassName } from '@/hooks/use-field-focus';\nimport { Button } from '@/components/button';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@/components/popover';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/select';\nimport { FormField } from './form-field';\n\nexport interface FormMonthPickerProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n /** ms since epoch; will be normalized to the first day of the month */\n date?: number;\n /** setter receives ms since epoch (first day of month at local midnight) or undefined when cleared */\n setter?: (value?: number) => void;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n contentClassName?: string;\n tooltip?: string;\n tooltipId?: string;\n required?: boolean;\n\n /** Placeholder text when no month selected */\n placeholder?: string;\n\n /** Format the button text */\n format?: (d: Date) => string;\n\n /** Year bounds for navigation (inclusive) */\n fromYear?: number;\n toYear?: number;\n\n /** Close popover automatically on select (default true) */\n autoClose?: boolean;\n}\n\nexport const FormMonthPicker = ({\n label,\n date,\n setter,\n className,\n side = 'bottom',\n align = 'start',\n sideOffset = 6,\n contentClassName,\n placeholder = 'Select month',\n format = (d) =>\n d.toLocaleDateString(undefined, { month: 'short', year: 'numeric' }),\n fromYear = new Date().getFullYear() - 5,\n toYear = new Date().getFullYear() + 5,\n autoClose = true,\n tooltip,\n tooltipId,\n required = false,\n ...props\n}: FormMonthPickerProps) => {\n const [open, setOpen] = React.useState(false);\n\n // normalize incoming ms -> first day of month\n const selected = React.useMemo(() => {\n if (date == null) return undefined;\n const d = new Date(date);\n return new Date(d.getFullYear(), d.getMonth(), 1, 0, 0, 0, 0);\n }, [date]);\n\n const [viewYear, setViewYear] = React.useState<number>(\n selected?.getFullYear() ?? new Date().getFullYear(),\n );\n\n React.useEffect(() => {\n if (selected) setViewYear(selected.getFullYear());\n }, [selected]);\n\n const months = React.useMemo(\n () =>\n Array.from({ length: 12 }, (_, m) => ({\n m,\n label: new Date(2000, m, 1).toLocaleString(undefined, {\n month: 'short',\n }),\n })),\n [],\n );\n\n const clampYear = (y: number) => Math.min(Math.max(y, fromYear), toYear);\n\n const selectMonth = (monthIndex: number) => {\n const y = clampYear(viewYear);\n const firstOfMonth = new Date(y, monthIndex, 1, 0, 0, 0, 0).getTime();\n setter?.(firstOfMonth);\n if (autoClose) setOpen(false);\n };\n\n const prevYear = () => setViewYear((y) => clampYear(y - 1));\n const nextYear = () => setViewYear((y) => clampYear(y + 1));\n\n const isYearMin = viewYear <= fromYear;\n const isYearMax = viewYear >= toYear;\n\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n className={cn('flex flex-col', className)}\n >\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n id={props.id ?? 'month'}\n className={cn(\"w-full justify-between px-field-padding-x py-0\", fieldTriggerClassName)}\n >\n {selected ? format(selected) : <span className=\"text-muted-foreground/40\">{placeholder}</span>}\n <ChevronDown className=\"h-4 w-4 text-muted-foreground\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent\n align={align}\n side={side}\n sideOffset={sideOffset}\n className={cn('w-72 p-3', contentClassName)}\n >\n {/* Header: year controls */}\n <div className=\"mb-3 flex items-center justify-between\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-8 w-8 p-0\"\n aria-label=\"Previous year\"\n onClick={prevYear}\n disabled={isYearMin}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n\n <Select\n value={String(viewYear)}\n onValueChange={(val) => setViewYear(clampYear(Number(val)))}\n >\n <SelectTrigger className=\"w-fit text-sm\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent className=\"h-fit\">\n {Array.from(\n { length: toYear - fromYear + 1 },\n (_, i) => fromYear + i,\n ).map((y) => (\n <SelectItem key={y} value={String(y)}>\n {y}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-8 w-8 p-0\"\n aria-label=\"Next year\"\n onClick={nextYear}\n disabled={isYearMax}\n >\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n </div>\n\n {/* Month grid */}\n <div className=\"grid grid-cols-3 gap-2\">\n {months.map(({ m, label: monthLabel }) => {\n const isActive =\n selected &&\n selected.getFullYear() === viewYear &&\n selected.getMonth() === m;\n\n return (\n <Button\n key={m}\n type=\"button\"\n variant={isActive ? 'solid' : 'outline'}\n className={cn(\n 'h-9 justify-center rounded-control-lg',\n isActive ? '' : 'bg-background',\n )}\n onClick={() => selectMonth(m)}\n >\n <span className=\"text-sm\">{monthLabel}</span>\n </Button>\n );\n })}\n </div>\n\n {/* Clear (optional) */}\n <div className=\"mt-3 flex justify-end\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n className=\"h-8 px-2 text-xs\"\n onClick={() => {\n setter?.(undefined);\n setOpen(false);\n }}\n >\n Clear\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n </FormField>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAuEE;;AAGA;;AACoB;AAClB;;AAEF;;AAMA;AACE;AAAc;AAChB;;;AAMM;AACE;;AAEH;;AAML;AACE;;AAEA;AACA;;AACF;AAEA;AACA;AAEA;AACA;AAEA;;AA6Ec;AACA;;;AA0BA;;AAEF;AASd;;"}
1
+ {"version":3,"file":"form-month-picker.js","sources":["../../src/components/form-month-picker.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { fieldTriggerClassName } from '@/hooks/use-field-focus';\r\nimport { Button } from '@/components/button';\r\nimport {\r\n Popover,\r\n PopoverContent,\r\n PopoverTrigger,\r\n} from '@/components/popover';\r\nimport {\r\n Select,\r\n SelectContent,\r\n SelectItem,\r\n SelectTrigger,\r\n SelectValue,\r\n} from '@/components/select';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormMonthPickerProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n label?: string;\r\n /** ms since epoch; will be normalized to the first day of the month */\r\n date?: number;\r\n /** setter receives ms since epoch (first day of month at local midnight) or undefined when cleared */\r\n setter?: (value?: number) => void;\r\n className?: string;\r\n side?: 'top' | 'right' | 'bottom' | 'left';\r\n align?: 'start' | 'center' | 'end';\r\n sideOffset?: number;\r\n contentClassName?: string;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n required?: boolean;\r\n\r\n /** Placeholder text when no month selected */\r\n placeholder?: string;\r\n\r\n /** Format the button text */\r\n format?: (d: Date) => string;\r\n\r\n /** Year bounds for navigation (inclusive) */\r\n fromYear?: number;\r\n toYear?: number;\r\n\r\n /** Close popover automatically on select (default true) */\r\n autoClose?: boolean;\r\n}\r\n\r\nexport const FormMonthPicker = ({\r\n label,\r\n date,\r\n setter,\r\n className,\r\n side = 'bottom',\r\n align = 'start',\r\n sideOffset = 6,\r\n contentClassName,\r\n placeholder = 'Select month',\r\n format = (d) =>\r\n d.toLocaleDateString(undefined, { month: 'short', year: 'numeric' }),\r\n fromYear = new Date().getFullYear() - 5,\r\n toYear = new Date().getFullYear() + 5,\r\n autoClose = true,\r\n tooltip,\r\n tooltipId,\r\n required = false,\r\n ...props\r\n}: FormMonthPickerProps) => {\r\n const [open, setOpen] = React.useState(false);\r\n\r\n // normalize incoming ms -> first day of month\r\n const selected = React.useMemo(() => {\r\n if (date == null) return undefined;\r\n const d = new Date(date);\r\n return new Date(d.getFullYear(), d.getMonth(), 1, 0, 0, 0, 0);\r\n }, [date]);\r\n\r\n const [viewYear, setViewYear] = React.useState<number>(\r\n selected?.getFullYear() ?? new Date().getFullYear(),\r\n );\r\n\r\n React.useEffect(() => {\r\n if (selected) setViewYear(selected.getFullYear());\r\n }, [selected]);\r\n\r\n const months = React.useMemo(\r\n () =>\r\n Array.from({ length: 12 }, (_, m) => ({\r\n m,\r\n label: new Date(2000, m, 1).toLocaleString(undefined, {\r\n month: 'short',\r\n }),\r\n })),\r\n [],\r\n );\r\n\r\n const clampYear = (y: number) => Math.min(Math.max(y, fromYear), toYear);\r\n\r\n const selectMonth = (monthIndex: number) => {\r\n const y = clampYear(viewYear);\r\n const firstOfMonth = new Date(y, monthIndex, 1, 0, 0, 0, 0).getTime();\r\n setter?.(firstOfMonth);\r\n if (autoClose) setOpen(false);\r\n };\r\n\r\n const prevYear = () => setViewYear((y) => clampYear(y - 1));\r\n const nextYear = () => setViewYear((y) => clampYear(y + 1));\r\n\r\n const isYearMin = viewYear <= fromYear;\r\n const isYearMax = viewYear >= toYear;\r\n\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n className={cn('flex flex-col', className)}\r\n >\r\n <Popover open={open} onOpenChange={setOpen}>\r\n <PopoverTrigger asChild>\r\n <Button\r\n variant=\"outline\"\r\n id={props.id ?? 'month'}\r\n className={cn(\"w-full justify-between px-field-padding-x py-0\", fieldTriggerClassName)}\r\n >\r\n {selected ? format(selected) : <span className=\"text-muted-foreground/40\">{placeholder}</span>}\r\n <ChevronDown className=\"h-4 w-4 text-muted-foreground\" />\r\n </Button>\r\n </PopoverTrigger>\r\n\r\n <PopoverContent\r\n align={align}\r\n side={side}\r\n sideOffset={sideOffset}\r\n className={cn('w-72 p-3', contentClassName)}\r\n >\r\n {/* Header: year controls */}\r\n <div className=\"mb-3 flex items-center justify-between\">\r\n <Button\r\n type=\"button\"\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n className=\"h-8 w-8 p-0\"\r\n aria-label=\"Previous year\"\r\n onClick={prevYear}\r\n disabled={isYearMin}\r\n >\r\n <ChevronLeft className=\"h-4 w-4\" />\r\n </Button>\r\n\r\n <Select\r\n value={String(viewYear)}\r\n onValueChange={(val) => setViewYear(clampYear(Number(val)))}\r\n >\r\n <SelectTrigger className=\"w-fit text-sm\">\r\n <SelectValue />\r\n </SelectTrigger>\r\n <SelectContent className=\"h-fit\">\r\n {Array.from(\r\n { length: toYear - fromYear + 1 },\r\n (_, i) => fromYear + i,\r\n ).map((y) => (\r\n <SelectItem key={y} value={String(y)}>\r\n {y}\r\n </SelectItem>\r\n ))}\r\n </SelectContent>\r\n </Select>\r\n\r\n <Button\r\n type=\"button\"\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n className=\"h-8 w-8 p-0\"\r\n aria-label=\"Next year\"\r\n onClick={nextYear}\r\n disabled={isYearMax}\r\n >\r\n <ChevronRight className=\"h-4 w-4\" />\r\n </Button>\r\n </div>\r\n\r\n {/* Month grid */}\r\n <div className=\"grid grid-cols-3 gap-2\">\r\n {months.map(({ m, label: monthLabel }) => {\r\n const isActive =\r\n selected &&\r\n selected.getFullYear() === viewYear &&\r\n selected.getMonth() === m;\r\n\r\n return (\r\n <Button\r\n key={m}\r\n type=\"button\"\r\n variant={isActive ? 'solid' : 'outline'}\r\n className={cn(\r\n 'h-9 justify-center rounded-control-lg',\r\n isActive ? '' : 'bg-background',\r\n )}\r\n onClick={() => selectMonth(m)}\r\n >\r\n <span className=\"text-sm\">{monthLabel}</span>\r\n </Button>\r\n );\r\n })}\r\n </div>\r\n\r\n {/* Clear (optional) */}\r\n <div className=\"mt-3 flex justify-end\">\r\n <Button\r\n type=\"button\"\r\n variant=\"ghost\"\r\n className=\"h-8 px-2 text-xs\"\r\n onClick={() => {\r\n setter?.(undefined);\r\n setOpen(false);\r\n }}\r\n >\r\n Clear\r\n </Button>\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n </FormField>\r\n );\r\n};\r\n"],"names":[],"mappings":";;;;;;;;;;;;AAuEE;;AAGA;;AACoB;AAClB;;AAEF;;AAMA;AACE;AAAc;AAChB;;;AAMM;AACE;;AAEH;;AAML;AACE;;AAEA;AACA;;AACF;AAEA;AACA;AAEA;AACA;AAEA;;AA6Ec;AACA;;;AA0BA;;AAEF;AASd;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-radio.js","sources":["../../src/components/form-radio.tsx"],"sourcesContent":["import { RadioGroup, RadioGroupItem } from './radio-group';\nimport { FormField } from './form-field';\n\nexport interface FormRadioProps<T extends string | boolean = string> {\n options: { value: T; label: string }[];\n value?: T;\n setter?: (value: T) => void;\n label?: string;\n required?: boolean;\n className?: string;\n name?: string;\n tooltip?: string;\n tooltipId?: string;\n}\n\nexport const FormRadio = <T extends string | boolean = string>({\n label,\n value,\n options,\n setter,\n required = false,\n className,\n tooltip,\n tooltipId,\n name,\n}: FormRadioProps<T>) => {\n const stringValue = value?.toString() || '';\n\n const handleValueChange = (next: string) => {\n if (!setter) return;\n\n // Find the original option to get the correct type\n const selectedOption = options.find(\n (option) => option.value.toString() === next,\n );\n if (selectedOption) {\n setter(selectedOption.value);\n }\n };\n\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n className={className}\n >\n <RadioGroup\n value={stringValue}\n onValueChange={handleValueChange}\n className=\"gap-field-label-gap\"\n name={name}\n >\n {options.map((option) => (\n <div\n key={option.value.toString()}\n className=\"flex items-center space-x-3\"\n >\n <RadioGroupItem\n value={option.value.toString()}\n id={`${name}-${option.value.toString()}`}\n />\n\n <label\n htmlFor={`${name}-${option.value.toString()}`}\n className=\"flex-1 cursor-pointer text-sm font-medium\"\n >\n {option.label}\n </label>\n </div>\n ))}\n </RadioGroup>\n </FormField>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAeO,MAAM,SAAS,GAAG,CAAsC,EAC7D,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,OAAO,EACP,SAAS,EACT,IAAI,GACc,KAAI;IACtB,MAAM,WAAW,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE;AAE3C,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,CACH;AAEhB;;;;"}
1
+ {"version":3,"file":"form-radio.js","sources":["../../src/components/form-radio.tsx"],"sourcesContent":["import { RadioGroup, RadioGroupItem } from './radio-group';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormRadioProps<T extends string | boolean = string> {\r\n options: { value: T; label: string }[];\r\n value?: T;\r\n setter?: (value: T) => void;\r\n label?: string;\r\n required?: boolean;\r\n className?: string;\r\n name?: string;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n}\r\n\r\nexport const FormRadio = <T extends string | boolean = string>({\r\n label,\r\n value,\r\n options,\r\n setter,\r\n required = false,\r\n className,\r\n tooltip,\r\n tooltipId,\r\n name,\r\n}: FormRadioProps<T>) => {\r\n const stringValue = value?.toString() || '';\r\n\r\n const handleValueChange = (next: string) => {\r\n if (!setter) return;\r\n\r\n // Find the original option to get the correct type\r\n const selectedOption = options.find(\r\n (option) => option.value.toString() === next,\r\n );\r\n if (selectedOption) {\r\n setter(selectedOption.value);\r\n }\r\n };\r\n\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n className={className}\r\n >\r\n <RadioGroup\r\n value={stringValue}\r\n onValueChange={handleValueChange}\r\n className=\"gap-field-label-gap\"\r\n name={name}\r\n >\r\n {options.map((option) => (\r\n <div\r\n key={option.value.toString()}\r\n className=\"flex items-center space-x-3\"\r\n >\r\n <RadioGroupItem\r\n value={option.value.toString()}\r\n id={`${name}-${option.value.toString()}`}\r\n />\r\n\r\n <label\r\n htmlFor={`${name}-${option.value.toString()}`}\r\n className=\"flex-1 cursor-pointer text-sm font-medium\"\r\n >\r\n {option.label}\r\n </label>\r\n </div>\r\n ))}\r\n </RadioGroup>\r\n </FormField>\r\n );\r\n};\r\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAeO,MAAM,SAAS,GAAG,CAAsC,EAC7D,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GAAG,KAAK,EACh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D,MAAM,CAAC,KAAK,EAAA,CACP,CAAA,EAAA,EAbH,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAcxB,CACP,CAAC,EAAA,CACS,EAAA,CACH;AAEhB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-textarea.js","sources":["../../src/components/form-textarea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { Textarea } from '@/components/textarea';\nimport { FormField } from './form-field';\n\nexport interface FormTextareaProps extends React.InputHTMLAttributes<HTMLTextAreaElement> {\n label?: string;\n setter?: (value: string) => void;\n required?: boolean;\n className?: string;\n tooltip?: string;\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n}\n\nexport const FormTextarea = ({\n label,\n value,\n setter,\n required = true,\n className,\n tooltip,\n tooltipId,\n labelAddon,\n ...props\n}: FormTextareaProps) => {\n return (\n <FormField\n label={label}\n required={required}\n tooltip={tooltip}\n tooltipId={tooltipId}\n labelAddon={labelAddon}\n >\n <Textarea\n value={value ?? ''}\n onChange={(e) => setter && setter(e.target.value)}\n className={cn(className)}\n {...props}\n />\n </FormField>\n );\n};\n"],"names":[],"mappings":";;;;;;AAkBO;AAWL;AAgBF;;"}
1
+ {"version":3,"file":"form-textarea.js","sources":["../../src/components/form-textarea.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { Textarea } from '@/components/textarea';\r\nimport { FormField } from './form-field';\r\n\r\nexport interface FormTextareaProps extends React.InputHTMLAttributes<HTMLTextAreaElement> {\r\n label?: string;\r\n setter?: (value: string) => void;\r\n required?: boolean;\r\n className?: string;\r\n tooltip?: string;\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n}\r\n\r\nexport const FormTextarea = ({\r\n label,\r\n value,\r\n setter,\r\n required = true,\r\n className,\r\n tooltip,\r\n tooltipId,\r\n labelAddon,\r\n ...props\r\n}: FormTextareaProps) => {\r\n return (\r\n <FormField\r\n label={label}\r\n required={required}\r\n tooltip={tooltip}\r\n tooltipId={tooltipId}\r\n labelAddon={labelAddon}\r\n >\r\n <Textarea\r\n value={value ?? ''}\r\n onChange={(e) => setter && setter(e.target.value)}\r\n className={cn(className)}\r\n {...props}\r\n />\r\n </FormField>\r\n );\r\n};\r\n"],"names":[],"mappings":";;;;;;AAkBO;AAWL;AAgBF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport {\n chain,\n fieldFocusOutlineClassName,\n fieldInteractionClassName,\n useFieldChromeOwned,\n useFieldFocus,\n} from '@/hooks/use-field-focus';\n\nconst fieldClassName =\n 'bg-background pointer-events-auto relative z-10 box-border flex h-form-control min-h-form-control max-h-form-control w-full rounded-control-lg border border-input hover:border-input-hover px-[0.75em] py-0 text-base text-foreground ring-0';\nconst fieldDetailsClassName =\n 'file:text-foreground placeholder:text-muted-foreground/40 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50';\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n ({ className, type, disabled, onPointerDown, onFocus, onBlur, ...props }, ref) => {\n const [passwordVisible, setPasswordVisible] = React.useState(false);\n const chromeOwned = useFieldChromeOwned();\n const { keyboardFocus, focusProps } = useFieldFocus();\n const handlers = {\n onPointerDown: chain(onPointerDown, focusProps.onPointerDown),\n onFocus: chain(onFocus, focusProps.onFocus),\n onBlur: chain(onBlur, focusProps.onBlur),\n };\n const chrome = !chromeOwned && !disabled && cn(\n fieldInteractionClassName,\n keyboardFocus && fieldFocusOutlineClassName,\n );\n\n if (type === 'password') {\n const Icon = passwordVisible ? EyeOff : Eye;\n\n return (\n // The wrapper carries the lift and outline so the toggle moves with the field.\n <div className={cn('relative', chrome)}>\n <input\n type={passwordVisible ? 'text' : 'password'}\n className={cn(fieldClassName, 'pr-10', fieldDetailsClassName, className)}\n ref={ref}\n disabled={disabled}\n {...handlers}\n {...props}\n />\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground absolute inset-y-0 right-0 z-20 flex w-10 items-center justify-center disabled:cursor-not-allowed disabled:opacity-50\"\n onClick={() => setPasswordVisible((current) => !current)}\n disabled={disabled}\n aria-label={passwordVisible ? 'Hide password' : 'Show password'}\n aria-pressed={passwordVisible}\n >\n <Icon className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n </div>\n );\n }\n\n return (\n <input\n type={type}\n className={cn(fieldClassName, fieldDetailsClassName, chrome, className)}\n ref={ref}\n disabled={disabled}\n {...handlers}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":[],"mappings":";;;;;;;AAcA;AAEA;AAGA;AAEI;AACA;;AAEA;;;;;AAKA;AAKA;;;;;;AA4BA;AAUF;AAEF;;"}
1
+ {"version":3,"file":"input.js","sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport { Eye, EyeOff } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport {\r\n chain,\r\n fieldFocusOutlineClassName,\r\n fieldInteractionClassName,\r\n useFieldChromeOwned,\r\n useFieldFocus,\r\n} from '@/hooks/use-field-focus';\r\n\r\nconst fieldClassName =\r\n 'bg-background pointer-events-auto relative z-10 box-border flex h-form-control min-h-form-control max-h-form-control w-full rounded-control-lg border border-input hover:border-input-hover px-[0.75em] py-0 text-base text-foreground ring-0';\r\nconst fieldDetailsClassName =\r\n 'file:text-foreground placeholder:text-muted-foreground/40 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50';\r\n\r\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\r\n ({ className, type, disabled, onPointerDown, onFocus, onBlur, ...props }, ref) => {\r\n const [passwordVisible, setPasswordVisible] = React.useState(false);\r\n const chromeOwned = useFieldChromeOwned();\r\n const { keyboardFocus, focusProps } = useFieldFocus();\r\n const handlers = {\r\n onPointerDown: chain(onPointerDown, focusProps.onPointerDown),\r\n onFocus: chain(onFocus, focusProps.onFocus),\r\n onBlur: chain(onBlur, focusProps.onBlur),\r\n };\r\n const chrome = !chromeOwned && !disabled && cn(\r\n fieldInteractionClassName,\r\n keyboardFocus && fieldFocusOutlineClassName,\r\n );\r\n\r\n if (type === 'password') {\r\n const Icon = passwordVisible ? EyeOff : Eye;\r\n\r\n return (\r\n // The wrapper carries the lift and outline so the toggle moves with the field.\r\n <div className={cn('relative', chrome)}>\r\n <input\r\n type={passwordVisible ? 'text' : 'password'}\r\n className={cn(fieldClassName, 'pr-10', fieldDetailsClassName, className)}\r\n ref={ref}\r\n disabled={disabled}\r\n {...handlers}\r\n {...props}\r\n />\r\n <button\r\n type=\"button\"\r\n className=\"text-muted-foreground hover:text-foreground absolute inset-y-0 right-0 z-20 flex w-10 items-center justify-center disabled:cursor-not-allowed disabled:opacity-50\"\r\n onClick={() => setPasswordVisible((current) => !current)}\r\n disabled={disabled}\r\n aria-label={passwordVisible ? 'Hide password' : 'Show password'}\r\n aria-pressed={passwordVisible}\r\n >\r\n <Icon className=\"h-4 w-4\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <input\r\n type={type}\r\n className={cn(fieldClassName, fieldDetailsClassName, chrome, className)}\r\n ref={ref}\r\n disabled={disabled}\r\n {...handlers}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nInput.displayName = 'Input';\r\n\r\nexport { Input };\r\n"],"names":[],"mappings":";;;;;;;AAcA;AAEA;AAGA;AAEI;AACA;;AAEA;;;;;AAKA;AAKA;;;;;;AA4BA;AAUF;AAEF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sources":["../../src/components/label.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MessageCircleQuestion } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@/components/tooltip';\n\nexport interface LabelProps {\n label: React.ReactNode;\n required?: boolean;\n tooltip?: string;\n /** Kept so existing callers still type-check; the Radix tooltip needs no id. */\n tooltipId?: string;\n labelAddon?: React.ReactNode;\n labelProps?: React.ComponentPropsWithRef<'label'>;\n className?: string;\n}\n\n/** Shared label typography with native label association and ref support. */\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, React.ComponentPropsWithoutRef<'label'>>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn('text-field-label font-field-label text-[color:var(--color-field-label)]', className)}\n {...props}\n />\n ),\n);\nFieldLabel.displayName = 'FieldLabel';\n\n/** The label row shared by every form field: label, help tooltip, addon. */\nexport function Label({\n label,\n required,\n tooltip,\n labelAddon,\n labelProps,\n className,\n}: LabelProps) {\n const hasTooltip = !!tooltip?.trim();\n\n return (\n <div className={cn('mb-field-label-gap flex w-full justify-between gap-2 md:items-center', className)}>\n <div className=\"flex gap-2 md:items-center\">\n <FieldLabel {...labelProps}>\n {label} {required && <span className=\"text-destructive\">*</span>}\n </FieldLabel>\n {hasTooltip ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label=\"More information\"\n className=\"hover:cursor-help\"\n >\n <MessageCircleQuestion className=\"text-primary h-3.5 w-3.5\" />\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\" className=\"z-[1400] max-w-[80vw]\">\n {tooltip}\n </TooltipContent>\n </Tooltip>\n ) : (\n // Reserves the icon's space so labels line up with or without help.\n <div aria-hidden=\"true\">\n <MessageCircleQuestion className={cn('invisible h-3.5 w-3.5')} />\n </div>\n )}\n </div>\n {labelAddon && <div>{labelAddon}</div>}\n </div>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAqBA;AACO,MAAM,UAA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;oBAGVA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,MAAM,YACrBA,GAAA,CAAC,qBAAqB,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,GAAI,EAAA,CAC7D,CACP,CAAA,EAAA,CACG,EACL,UAAU,IAAIA,uBAAM,UAAU,EAAA,CAAO,CAAA,EAAA,CAClC;AAEV;;;;"}
1
+ {"version":3,"file":"label.js","sources":["../../src/components/label.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { MessageCircleQuestion } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport {\r\n Tooltip,\r\n TooltipContent,\r\n TooltipTrigger,\r\n} from '@/components/tooltip';\r\n\r\nexport interface LabelProps {\r\n label: React.ReactNode;\r\n required?: boolean;\r\n tooltip?: string;\r\n /** Kept so existing callers still type-check; the Radix tooltip needs no id. */\r\n tooltipId?: string;\r\n labelAddon?: React.ReactNode;\r\n labelProps?: React.ComponentPropsWithRef<'label'>;\r\n className?: string;\r\n}\r\n\r\n/** Shared label typography with native label association and ref support. */\r\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, React.ComponentPropsWithoutRef<'label'>>(\r\n ({ className, ...props }, ref) => (\r\n <label\r\n ref={ref}\r\n className={cn('text-field-label font-field-label text-[color:var(--color-field-label)]', className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nFieldLabel.displayName = 'FieldLabel';\r\n\r\n/** The label row shared by every form field: label, help tooltip, addon. */\r\nexport function Label({\r\n label,\r\n required,\r\n tooltip,\r\n labelAddon,\r\n labelProps,\r\n className,\r\n}: LabelProps) {\r\n const hasTooltip = !!tooltip?.trim();\r\n\r\n return (\r\n <div className={cn('mb-field-label-gap flex w-full justify-between gap-2 md:items-center', className)}>\r\n <div className=\"flex gap-2 md:items-center\">\r\n <FieldLabel {...labelProps}>\r\n {label} {required && <span className=\"text-destructive\">*</span>}\r\n </FieldLabel>\r\n {hasTooltip ? (\r\n <Tooltip>\r\n <TooltipTrigger asChild>\r\n <button\r\n type=\"button\"\r\n aria-label=\"More information\"\r\n className=\"hover:cursor-help\"\r\n >\r\n <MessageCircleQuestion className=\"text-primary h-3.5 w-3.5\" />\r\n </button>\r\n </TooltipTrigger>\r\n <TooltipContent side=\"bottom\" className=\"z-[1400] max-w-[80vw]\">\r\n {tooltip}\r\n </TooltipContent>\r\n </Tooltip>\r\n ) : (\r\n // Reserves the icon's space so labels line up with or without help.\r\n <div aria-hidden=\"true\">\r\n <MessageCircleQuestion className={cn('invisible h-3.5 w-3.5')} />\r\n </div>\r\n )}\r\n </div>\r\n {labelAddon && <div>{labelAddon}</div>}\r\n </div>\r\n );\r\n}\r\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAqBA;AACO,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC3BA,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yEAAyE,EAAE,SAAS,CAAC,EAAA,GAC/F,KAAK,EAAA,CACT,CACH;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC;AACM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,GACE,EAAA;IACX,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE;AAEpC,IAAA,QACEC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,aACnGA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EAAA,CACzCA,KAAC,UAAU,EAAA,EAAA,GAAK,UAAU,EAAA,QAAA,EAAA,CACvB,KAAK,EAAA,GAAA,EAAG,QAAQ,IAAID,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,kBAAkB,EAAA,QAAA,EAAA,GAAA,EAAA,CAAS,CAAA,EAAA,CACrD,EACZ,UAAU,IACTC,IAAA,CAAC,OAAO,EAAA,EAAA,QAAA,EAAA,CACND,GAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACrBA,GAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,gBACF,kBAAkB,EAC7B,SAAS,EAAC,mBAAmB,EAAA,QAAA,EAE7BA,GAAA,CAAC,qBAAqB,EAAA,EAAC,SAAS,EAAC,0BAA0B,EAAA,CAAG,EAAA,CACvD,EAAA,CACM,EACjBA,GAAA,CAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,uBAAuB,YAC5D,OAAO,EAAA,CACO,IACT;;oBAGVA,GAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,MAAM,YACrBA,GAAA,CAAC,qBAAqB,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,GAAI,EAAA,CAC7D,CACP,CAAA,EAAA,CACG,EACL,UAAU,IAAIA,uBAAM,UAAU,EAAA,CAAO,CAAA,EAAA,CAClC;AAEV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sources":["../../src/components/loader.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport { cn } from '@/utils';\n\nconst sizes = { sm: 'size-4', md: 'size-6', lg: 'size-10' } as const;\n\nexport type SpinnerProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {\n size?: keyof typeof sizes;\n label?: string;\n decorative?: boolean;\n};\n\nexport function Spinner({ size = 'sm', label = 'Loading', decorative = false, className, ...props }: SpinnerProps) {\n return <span {...props} role={decorative ? undefined : 'status'} aria-hidden={decorative || undefined} className={cn('inline-flex shrink-0 items-center justify-center text-current', className)}>\n <span aria-hidden=\"true\" className={cn('block shrink-0 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin', sizes[size])} />\n {!decorative && <span className=\"sr-only\">{label}</span>}\n </span>;\n}\n\nexport type LoaderProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {\n children?: ReactNode;\n label?: string;\n size?: SpinnerProps['size'];\n};\n\n/** Centered loading content; the parent owns height and padding. */\nexport function Loader({ children, label = 'Loading', size = 'lg', className, ...props }: LoaderProps) {\n return <div {...props} role=\"status\" className={cn('flex w-full flex-col items-center justify-center gap-4 text-center text-primary', className)}>\n <Spinner size={size} decorative />\n {children ? <div className=\"text-sm text-muted-foreground\">{children}</div> : <span className=\"sr-only\">{label}</span>}\n </div>;\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAGA,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAW;AAQ9D,SAAU,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,GAAG,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgB,EAAA;IAC/G,OAAOA,IAAA,CAAA,MAAA,EAAA,EAAA,GAAU,KAAK,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,EAAA,aAAA,EAAe,UAAU,IAAI,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,aAC9LC,GAAA,CAAA,MAAA,EAAA,EAAA,aAAA,EAAkB,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,mGAAmG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,GAAI,EAC3J,CAAC,UAAU,IAAIA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CACnD;AACT;AAQA;SACgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe,EAAA;IACnG,OAAOD,IAAA,CAAA,KAAA,EAAA,EAAA,GAAS,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,EAAE,CAAC,iFAAiF,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC9IC,GAAA,CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,SAAG,EACjC,QAAQ,GAAGA,aAAK,SAAS,EAAC,+BAA+B,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAO,GAAGA,cAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CAClH;AACR;;;;"}
1
+ {"version":3,"file":"loader.js","sources":["../../src/components/loader.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\r\nimport { cn } from '@/utils';\r\n\r\nconst sizes = { sm: 'size-4', md: 'size-6', lg: 'size-10' } as const;\r\n\r\nexport type SpinnerProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {\r\n size?: keyof typeof sizes;\r\n label?: string;\r\n decorative?: boolean;\r\n};\r\n\r\nexport function Spinner({ size = 'sm', label = 'Loading', decorative = false, className, ...props }: SpinnerProps) {\r\n return <span {...props} role={decorative ? undefined : 'status'} aria-hidden={decorative || undefined} className={cn('inline-flex shrink-0 items-center justify-center text-current', className)}>\r\n <span aria-hidden=\"true\" className={cn('block shrink-0 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin', sizes[size])} />\r\n {!decorative && <span className=\"sr-only\">{label}</span>}\r\n </span>;\r\n}\r\n\r\nexport type LoaderProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {\r\n children?: ReactNode;\r\n label?: string;\r\n size?: SpinnerProps['size'];\r\n};\r\n\r\n/** Centered loading content; the parent owns height and padding. */\r\nexport function Loader({ children, label = 'Loading', size = 'lg', className, ...props }: LoaderProps) {\r\n return <div {...props} role=\"status\" className={cn('flex w-full flex-col items-center justify-center gap-4 text-center text-primary', className)}>\r\n <Spinner size={size} decorative />\r\n {children ? <div className=\"text-sm text-muted-foreground\">{children}</div> : <span className=\"sr-only\">{label}</span>}\r\n </div>;\r\n}\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAGA,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAW;AAQ9D,SAAU,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,GAAG,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgB,EAAA;IAC/G,OAAOA,IAAA,CAAA,MAAA,EAAA,EAAA,GAAU,KAAK,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,EAAA,aAAA,EAAe,UAAU,IAAI,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,aAC9LC,GAAA,CAAA,MAAA,EAAA,EAAA,aAAA,EAAkB,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,mGAAmG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,GAAI,EAC3J,CAAC,UAAU,IAAIA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CACnD;AACT;AAQA;SACgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe,EAAA;IACnG,OAAOD,IAAA,CAAA,KAAA,EAAA,EAAA,GAAS,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,EAAE,CAAC,iFAAiF,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC9IC,GAAA,CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,SAAG,EACjC,QAAQ,GAAGA,aAAK,SAAS,EAAC,+BAA+B,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAO,GAAGA,cAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,CAAA,EAAA,CAClH;AACR;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.js","sources":["../../src/components/page-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/utils';\n\n\nexport function PageHeader({\n title,\n description,\n className,\n}: {\n title: string;\n description?: React.ReactNode;\n className?: string;\n}) {\n return (\n <header className={cn('text-foreground', className)}>\n <h1 className=\"text-page-heading font-page-heading\">\n {title}\n </h1>\n {description && (\n <p className=\"mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description\">{description}</p>\n )}\n </header>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAIM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,SAAS,GAKV,EAAA;AACC,IAAA,QACEA,IAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC/CC,GAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAC,qCAAqC,EAAA,QAAA,EAChD,KAAK,EAAA,CACH,EACJ,WAAW,KACVA,WAAG,SAAS,EAAC,yGAAyG,EAAA,QAAA,EAAE,WAAW,EAAA,CAAK,CACzI,CAAA,EAAA,CACI;AAEb;;;;"}
1
+ {"version":3,"file":"page-header.js","sources":["../../src/components/page-header.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { cn } from '@/utils';\r\n\r\n\r\nexport function PageHeader({\r\n title,\r\n description,\r\n className,\r\n}: {\r\n title: string;\r\n description?: React.ReactNode;\r\n className?: string;\r\n}) {\r\n return (\r\n <header className={cn('text-foreground', className)}>\r\n <h1 className=\"text-page-heading font-page-heading\">\r\n {title}\r\n </h1>\r\n {description && (\r\n <p className=\"mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description\">{description}</p>\r\n )}\r\n </header>\r\n );\r\n}\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAIM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,SAAS,GAKV,EAAA;AACC,IAAA,QACEA,IAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAC/CC,GAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAC,qCAAqC,EAAA,QAAA,EAChD,KAAK,EAAA,CACH,EACJ,WAAW,KACVA,WAAG,SAAS,EAAC,yGAAyG,EAAA,QAAA,EAAE,WAAW,EAAA,CAAK,CACzI,CAAA,EAAA,CACI;AAEb;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sources":["../../src/components/popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils';\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nconst PopoverTrigger = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Trigger\n ref={ref}\n className={className}\n data-slot=\"popover-trigger\"\n {...props}\n />\n));\nPopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border border-border p-4 shadow-card outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nconst PopoverAnchor = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Anchor>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Anchor\n ref={ref}\n data-slot=\"popover-anchor\"\n className={className}\n {...props}\n />\n));\nPopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["_jsx"],"mappings":";;;;;AAKA,SAAS,OAAO,CAAC,EACf,GAAG,KAAK,EAC2C,EAAA;IACnD,OAAOA,GAAA,CAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,EAAA,GAAK,KAAK,EAAA,CAAI;AACjE;AAEA,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,eACV,iBAAiB,EAAA,GACvB,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC/DA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EAAA,QAAA,EACtBA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,6gBAA6gB,EAC7gB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,EAAA,CACsB,CAC3B;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EACtB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EAAA,GAChB,KAAK,EAAA,CACT,CACH;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"popover.js","sources":["../../src/components/popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\n\r\nimport { cn } from '@/utils';\r\n\r\nfunction Popover({\r\n ...props\r\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\r\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\r\n}\r\n\r\nconst PopoverTrigger = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>\r\n>(({ className, ...props }, ref) => (\r\n <PopoverPrimitive.Trigger\r\n ref={ref}\r\n className={className}\r\n data-slot=\"popover-trigger\"\r\n {...props}\r\n />\r\n));\r\nPopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;\r\n\r\nconst PopoverContent = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\r\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\r\n <PopoverPrimitive.Portal>\r\n <PopoverPrimitive.Content\r\n ref={ref}\r\n data-slot=\"popover-content\"\r\n align={align}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border border-border p-4 shadow-card outline-hidden',\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </PopoverPrimitive.Portal>\r\n));\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\r\n\r\nconst PopoverAnchor = React.forwardRef<\r\n React.ElementRef<typeof PopoverPrimitive.Anchor>,\r\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>\r\n>(({ className, ...props }, ref) => (\r\n <PopoverPrimitive.Anchor\r\n ref={ref}\r\n data-slot=\"popover-anchor\"\r\n className={className}\r\n {...props}\r\n />\r\n));\r\nPopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\r\n"],"names":["_jsx"],"mappings":";;;;;AAKA,SAAS,OAAO,CAAC,EACf,GAAG,KAAK,EAC2C,EAAA;IACnD,OAAOA,GAAA,CAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,EAAA,GAAK,KAAK,EAAA,CAAI;AACjE;AAEA,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,eACV,iBAAiB,EAAA,GACvB,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC/DA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EAAA,QAAA,EACtBA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,6gBAA6gB,EAC7gB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,EAAA,CACsB,CAC3B;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EACtB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EAAA,GAChB,KAAK,EAAA,CACT,CACH;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sources":["../../src/components/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"relative aspect-square h-4 w-4 shrink-0 rounded-full border border-input bg-muted text-primary transition-colors duration-state data-[state=checked]:border-primary data-[state=checked]:bg-primary hover:border-primary focus:outline-none focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none after:absolute after:-inset-3 after:content-['']\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className=\"h-2 w-2 rounded-full bg-background\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":[],"mappings":";;;;;;AAOA;;AAWA;AACA;AAEA;AAIE;AAcF;AACA;;"}
1
+ {"version":3,"file":"radio-group.js","sources":["../../src/components/radio-group.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\r\n\r\nimport { cn } from \"@/utils\";\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Root\r\n className={cn(\"grid gap-2\", className)}\r\n {...props}\r\n ref={ref}\r\n />\r\n );\r\n});\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative aspect-square h-4 w-4 shrink-0 rounded-full border border-input bg-muted text-primary transition-colors duration-state data-[state=checked]:border-primary data-[state=checked]:bg-primary hover:border-primary focus:outline-none focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none after:absolute after:-inset-3 after:content-['']\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\r\n <span className=\"h-2 w-2 rounded-full bg-background\" />\r\n </RadioGroupPrimitive.Indicator>\r\n </RadioGroupPrimitive.Item>\r\n );\r\n});\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\r\n\r\nexport { RadioGroup, RadioGroupItem };\r\n"],"names":[],"mappings":";;;;;;AAOA;;AAWA;AACA;AAEA;AAIE;AAcF;AACA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sources":["../../src/components/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp, X } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport { fieldInteractionClassName } from '@/hooks/use-field-focus';\nimport { useMobile } from '@/hooks/use-mobile';\nimport { useMobileSheetViewport } from '@/hooks/use-mobile-sheet-viewport';\n\nconst SelectContext = React.createContext({ open: false, setOpen: (_open: boolean) => {} });\n\nfunction Select({ open: controlledOpen, defaultOpen = false, onOpenChange, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const open = controlledOpen ?? internalOpen;\n const setOpen = (next: boolean) => {\n if (controlledOpen === undefined) setInternalOpen(next);\n onOpenChange?.(next);\n };\n\n return (\n <SelectContext.Provider value={{ open, setOpen }}>\n <SelectPrimitive.Root {...props} open={open} onOpenChange={setOpen}>\n {children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n}\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group bg-background text-foreground placeholder:text-muted-foreground/40 data-[placeholder]:text-muted-foreground/40 border-input enabled:hover:border-input-hover flex h-form-control min-h-form-control max-h-form-control w-full cursor-pointer items-center justify-between gap-2 rounded-control-lg border px-field-padding-x py-0 text-base font-normal outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n 'focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue',\n fieldInteractionClassName,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-interactive ease-out-strong group-data-[state=open]:rotate-180 motion-reduce:transition-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & { title?: string }\n>(({ className, children, position = 'popper', title = 'Choose an option', style, ...props }, ref) => {\n const mobile = useMobile();\n const { open, setOpen } = React.useContext(SelectContext);\n const viewport = useMobileSheetViewport(open && mobile);\n\n return (\n <SelectPrimitive.Portal>\n <div\n className={mobile ? '[&>[data-radix-popper-content-wrapper]]:!fixed [&>[data-radix-popper-content-wrapper]]:!inset-x-0 [&>[data-radix-popper-content-wrapper]]:!top-auto [&>[data-radix-popper-content-wrapper]]:!bottom-[var(--select-sheet-bottom)] [&>[data-radix-popper-content-wrapper]]:!transform-none [&>[data-radix-popper-content-wrapper]]:!z-[1100] [&>[data-radix-popper-content-wrapper]]:!min-w-0' : undefined}\n style={{ '--select-sheet-bottom': `${viewport?.bottom ?? 0}px` } as React.CSSProperties}\n >\n {mobile && open && (\n <div aria-hidden=\"true\" className=\"fixed inset-0 z-[1090] bg-black/25 backdrop-blur-[1px]\" />\n )}\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative flex flex-col overflow-hidden border border-border bg-background text-sm text-foreground shadow-card duration-interactive ease-out-strong motion-reduce:animate-none',\n mobile\n ? 'w-full rounded-t-control-lg border-b-0 pb-[env(safe-area-inset-bottom)]'\n : 'z-50 max-h-[400px] min-w-[8rem] rounded-control-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n position={mobile ? 'popper' : position}\n sideOffset={4}\n style={{\n ...(mobile ? { maxHeight: viewport ? Math.min(viewport.height, 640) : '80dvh' } : {}),\n ...style,\n }}\n {...props}\n >\n {mobile && (\n <div role=\"presentation\" className=\"flex shrink-0 items-center justify-between gap-4 px-4 pb-3 pt-4\">\n <h2 className=\"text-base font-semibold text-foreground\">{title}</h2>\n <button\n type=\"button\"\n aria-label=\"Close options\"\n className=\"-mr-3 flex h-11 w-11 shrink-0 items-center justify-center rounded-control-lg text-muted-foreground hover:bg-muted\"\n onPointerDown={(event) => event.stopPropagation()}\n onClick={() => setOpen(false)}\n >\n <X className=\"h-5 w-5\" aria-hidden=\"true\" />\n </button>\n </div>\n )}\n {!mobile && <SelectScrollUpButton />}\n <SelectPrimitive.Viewport\n className={cn(\n 'min-h-0 overflow-y-auto overscroll-contain',\n mobile ? 'w-full flex-1' : position === 'popper' && 'w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n {!mobile && <SelectScrollDownButton />}\n </SelectPrimitive.Content>\n </div>\n </SelectPrimitive.Portal>\n );\n});\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('py-2 pr-4 pl-8 text-sm font-semibold text-foreground', className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-pointer items-center gap-2 px-4 py-2 pr-10 text-sm text-muted-foreground outline-none select-none transition-colors duration-interactive ease-out-strong focus:bg-muted data-[state=checked]:bg-primary-tint data-[disabled]:pointer-events-none data-[disabled]:opacity-50 motion-reduce:transition-none max-md:min-h-12',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-4 flex h-4 w-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('bg-border h-px', className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"names":[],"mappings":";;;;;;;;;;AAWA;AAEA;AACE;AACA;AACA;;;AAEE;AACF;AAEA;AAOF;AAEA;AAEA;AAEA;AAoBA;AAEA;AAeA;AAEA;AAeA;AACE;AAEF;AAIE;AACA;;AAGA;AAcQ;;AAOF;AACA;;AAgCR;AACA;AAEA;AAUA;AAEA;AAqBA;AAEA;AAUA;;"}
1
+ {"version":3,"file":"select.js","sources":["../../src/components/select.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport * as SelectPrimitive from '@radix-ui/react-select';\r\nimport { Check, ChevronDown, ChevronUp, X } from 'lucide-react';\r\n\r\nimport { cn } from '@/utils';\r\nimport { fieldInteractionClassName } from '@/hooks/use-field-focus';\r\nimport { useMobile } from '@/hooks/use-mobile';\r\nimport { useMobileSheetViewport } from '@/hooks/use-mobile-sheet-viewport';\r\n\r\nconst SelectContext = React.createContext({ open: false, setOpen: (_open: boolean) => {} });\r\n\r\nfunction Select({ open: controlledOpen, defaultOpen = false, onOpenChange, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\r\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\r\n const open = controlledOpen ?? internalOpen;\r\n const setOpen = (next: boolean) => {\r\n if (controlledOpen === undefined) setInternalOpen(next);\r\n onOpenChange?.(next);\r\n };\r\n\r\n return (\r\n <SelectContext.Provider value={{ open, setOpen }}>\r\n <SelectPrimitive.Root {...props} open={open} onOpenChange={setOpen}>\r\n {children}\r\n </SelectPrimitive.Root>\r\n </SelectContext.Provider>\r\n );\r\n}\r\n\r\nconst SelectGroup = SelectPrimitive.Group;\r\n\r\nconst SelectValue = SelectPrimitive.Value;\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n 'group bg-background text-foreground placeholder:text-muted-foreground/40 data-[placeholder]:text-muted-foreground/40 border-input enabled:hover:border-input-hover flex h-form-control min-h-form-control max-h-form-control w-full cursor-pointer items-center justify-between gap-2 rounded-control-lg border px-field-padding-x py-0 text-base font-normal outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\r\n 'focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue',\r\n fieldInteractionClassName,\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <SelectPrimitive.Icon asChild>\r\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-interactive ease-out-strong group-data-[state=open]:rotate-180 motion-reduce:transition-none\" />\r\n </SelectPrimitive.Icon>\r\n </SelectPrimitive.Trigger>\r\n));\r\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\r\n\r\nconst SelectScrollUpButton = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.ScrollUpButton\r\n ref={ref}\r\n className={cn(\r\n 'flex cursor-default items-center justify-center py-1',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <ChevronUp className=\"h-4 w-4\" />\r\n </SelectPrimitive.ScrollUpButton>\r\n));\r\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\r\n\r\nconst SelectScrollDownButton = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.ScrollDownButton\r\n ref={ref}\r\n className={cn(\r\n 'flex cursor-default items-center justify-center py-1',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <ChevronDown className=\"h-4 w-4\" />\r\n </SelectPrimitive.ScrollDownButton>\r\n));\r\nSelectScrollDownButton.displayName =\r\n SelectPrimitive.ScrollDownButton.displayName;\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & { title?: string }\r\n>(({ className, children, position = 'popper', title = 'Choose an option', style, ...props }, ref) => {\r\n const mobile = useMobile();\r\n const { open, setOpen } = React.useContext(SelectContext);\r\n const viewport = useMobileSheetViewport(open && mobile);\r\n\r\n return (\r\n <SelectPrimitive.Portal>\r\n <div\r\n className={mobile ? '[&>[data-radix-popper-content-wrapper]]:!fixed [&>[data-radix-popper-content-wrapper]]:!inset-x-0 [&>[data-radix-popper-content-wrapper]]:!top-auto [&>[data-radix-popper-content-wrapper]]:!bottom-[var(--select-sheet-bottom)] [&>[data-radix-popper-content-wrapper]]:!transform-none [&>[data-radix-popper-content-wrapper]]:!z-[1100] [&>[data-radix-popper-content-wrapper]]:!min-w-0' : undefined}\r\n style={{ '--select-sheet-bottom': `${viewport?.bottom ?? 0}px` } as React.CSSProperties}\r\n >\r\n {mobile && open && (\r\n <div aria-hidden=\"true\" className=\"fixed inset-0 z-[1090] bg-black/25 backdrop-blur-[1px]\" />\r\n )}\r\n <SelectPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n 'relative flex flex-col overflow-hidden border border-border bg-background text-sm text-foreground shadow-card duration-interactive ease-out-strong motion-reduce:animate-none',\r\n mobile\r\n ? 'w-full rounded-t-control-lg border-b-0 pb-[env(safe-area-inset-bottom)]'\r\n : 'z-50 max-h-[400px] min-w-[8rem] rounded-control-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\r\n className,\r\n )}\r\n position={mobile ? 'popper' : position}\r\n sideOffset={4}\r\n style={{\r\n ...(mobile ? { maxHeight: viewport ? Math.min(viewport.height, 640) : '80dvh' } : {}),\r\n ...style,\r\n }}\r\n {...props}\r\n >\r\n {mobile && (\r\n <div role=\"presentation\" className=\"flex shrink-0 items-center justify-between gap-4 px-4 pb-3 pt-4\">\r\n <h2 className=\"text-base font-semibold text-foreground\">{title}</h2>\r\n <button\r\n type=\"button\"\r\n aria-label=\"Close options\"\r\n className=\"-mr-3 flex h-11 w-11 shrink-0 items-center justify-center rounded-control-lg text-muted-foreground hover:bg-muted\"\r\n onPointerDown={(event) => event.stopPropagation()}\r\n onClick={() => setOpen(false)}\r\n >\r\n <X className=\"h-5 w-5\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n )}\r\n {!mobile && <SelectScrollUpButton />}\r\n <SelectPrimitive.Viewport\r\n className={cn(\r\n 'min-h-0 overflow-y-auto overscroll-contain',\r\n mobile ? 'w-full flex-1' : position === 'popper' && 'w-full min-w-[var(--radix-select-trigger-width)]',\r\n )}\r\n >\r\n {children}\r\n </SelectPrimitive.Viewport>\r\n {!mobile && <SelectScrollDownButton />}\r\n </SelectPrimitive.Content>\r\n </div>\r\n </SelectPrimitive.Portal>\r\n );\r\n});\r\nSelectContent.displayName = SelectPrimitive.Content.displayName;\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Label\r\n ref={ref}\r\n className={cn('py-2 pr-4 pl-8 text-sm font-semibold text-foreground', className)}\r\n {...props}\r\n />\r\n));\r\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n 'relative flex w-full cursor-pointer items-center gap-2 px-4 py-2 pr-10 text-sm text-muted-foreground outline-none select-none transition-colors duration-interactive ease-out-strong focus:bg-muted data-[state=checked]:bg-primary-tint data-[disabled]:pointer-events-none data-[disabled]:opacity-50 motion-reduce:transition-none max-md:min-h-12',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <span className=\"absolute right-4 flex h-4 w-4 items-center justify-center\">\r\n <SelectPrimitive.ItemIndicator>\r\n <Check className=\"h-4 w-4\" />\r\n </SelectPrimitive.ItemIndicator>\r\n </span>\r\n\r\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\r\n </SelectPrimitive.Item>\r\n));\r\nSelectItem.displayName = SelectPrimitive.Item.displayName;\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Separator\r\n ref={ref}\r\n className={cn('bg-border h-px', className)}\r\n {...props}\r\n />\r\n));\r\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n SelectScrollUpButton,\r\n SelectScrollDownButton,\r\n};\r\n"],"names":[],"mappings":";;;;;;;;;;AAWA;AAEA;AACE;AACA;AACA;;;AAEE;AACF;AAEA;AAOF;AAEA;AAEA;AAEA;AAoBA;AAEA;AAeA;AAEA;AAeA;AACE;AAEF;AAIE;AACA;;AAGA;AAcQ;;AAOF;AACA;;AAgCR;AACA;AAEA;AAUA;AAEA;AAqBA;AAEA;AAUA;;"}
@@ -7,7 +7,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
7
7
  declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
8
8
  declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  declare const sheetVariants: (props?: ({
10
- side?: "bottom" | "left" | "right" | "top" | null | undefined;
10
+ side?: "left" | "right" | "bottom" | "top" | null | undefined;
11
11
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
12
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
13
  showCloseButton?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import { cn } from '@/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn('bg-muted animate-pulse rounded-control-lg motion-reduce:animate-none', className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n"],"names":["_jsx"],"mappings":";;;AAEA,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B,EAAA;AACpE,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACY,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,EAAA,GAC5F,KAAK,EAAA,CACT;AAEN;;;;"}
1
+ {"version":3,"file":"skeleton.js","sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import { cn } from '@/utils';\r\n\r\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\r\n return (\r\n <div\r\n data-slot=\"skeleton\"\r\n className={cn('bg-muted animate-pulse rounded-control-lg motion-reduce:animate-none', className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport { Skeleton };\r\n"],"names":["_jsx"],"mappings":";;;AAEA,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B,EAAA;AACpE,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACY,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,EAAA,GAC5F,KAAK,EAAA,CACT;AAEN;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.js","sources":["../../src/components/stepper.tsx"],"sourcesContent":["import { Check } from \"lucide-react\";\nimport { cn } from \"@/utils\";\n\nexport interface StepperStep {\n title: string;\n}\n\nexport const Stepper = ({\n steps,\n currentStep,\n stepNumberOffset = 0,\n className,\n}: {\n steps: StepperStep[];\n currentStep: number;\n stepNumberOffset?: number;\n className?: string;\n}) => {\n return (\n <nav\n aria-label=\"Form progress\"\n className={cn(\"flex w-full flex-col gap-4 sm:flex-row sm:items-center sm:gap-3\", className)}\n >\n {steps.map((step, index) => {\n const active = index === currentStep;\n const complete = index < currentStep;\n\n return (\n <div key={step.title} className={cn(\"flex min-w-0 items-center gap-3\", index < steps.length - 1 && \"sm:flex-1\")}>\n <div\n className={cn(\n \"relative z-10 flex min-w-0 items-center gap-2 text-sm font-medium\",\n active ? \"text-primary\" : complete ? \"text-supportive\" : \"text-muted-foreground\"\n )}\n aria-current={active ? \"step\" : undefined}\n >\n {complete ? (\n <span className=\"flex size-6 shrink-0 items-center justify-center rounded-full bg-supportive text-supportive-foreground\">\n <Check className=\"size-3.5\" aria-hidden=\"true\" />\n </span>\n ) : (\n <span\n className={cn(\n \"flex size-6 shrink-0 items-center justify-center rounded-full border text-xs font-semibold\",\n active ? \"border-primary bg-primary text-primary-foreground\" : \"border-border bg-background text-muted-foreground\"\n )}\n >\n <span>{index + stepNumberOffset + 1}</span>\n </span>\n )}\n <span className=\"truncate\">{step.title}</span>\n </div>\n {index < steps.length - 1 && <span aria-hidden=\"true\" className={cn(\"hidden h-px min-w-4 flex-1 sm:block\", complete ? \"bg-supportive\" : \"bg-border\")} />}\n </div>\n );\n })}\n </nav>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAOO,MAAM,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,WAAW,EACX,gBAAgB,GAAG,CAAC,EACpB,SAAS,GAMV,KAAI;IACH,QACEA,2BACa,eAAe,EAC1B,SAAS,EAAE,EAAE,CAAC,iEAAiE,EAAE,SAAS,CAAC,EAAA,QAAA,EAE1F,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;AACzB,YAAA,MAAM,MAAM,GAAG,KAAK,KAAK,WAAW;AACpC,YAAA,MAAM,QAAQ,GAAG,KAAK,GAAG,WAAW;AAElC,YAAA,QACAC,IAAA,CAAA,KAAA,EAAA,EAAsB,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,EAAA,QAAA,EAAA,CAC7GA,cACE,SAAS,EAAE,EAAE,CACX,mEAAmE,EACnE,MAAM,GAAG,cAAc,GAAG,QAAQ,GAAG,iBAAiB,GAAG,uBAAuB,CACjF,EAAA,cAAA,EACa,MAAM,GAAG,MAAM,GAAG,SAAS,EAAA,QAAA,EAAA,CAExC,QAAQ,IACPD,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,wGAAwG,EAAA,QAAA,EACtHA,GAAA,CAAC,KAAK,EAAA,EAAC,SAAS,EAAC,UAAU,EAAA,aAAA,EAAa,MAAM,GAAG,EAAA,CAC5C,KAEPA,GAAA,CAAA,MAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,MAAM,GAAG,mDAAmD,GAAG,mDAAmD,CACnH,YAEDA,GAAA,CAAA,MAAA,EAAA,EAAA,QAAA,EAAO,KAAK,GAAG,gBAAgB,GAAG,CAAC,EAAA,CAAQ,EAAA,CACtC,CACR,EACDA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,UAAU,YAAE,IAAI,CAAC,KAAK,EAAA,CAAQ,IAC1C,EACL,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAIA,6BAAkB,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,qCAAqC,EAAE,QAAQ,GAAG,eAAe,GAAG,WAAW,CAAC,EAAA,CAAI,KAxBhJ,IAAI,CAAC,KAAK,CAyBd;QAEV,CAAC,CAAC,EAAA,CACE;AAEV;;;;"}
1
+ {"version":3,"file":"stepper.js","sources":["../../src/components/stepper.tsx"],"sourcesContent":["import { Check } from \"lucide-react\";\r\nimport { cn } from \"@/utils\";\r\n\r\nexport interface StepperStep {\r\n title: string;\r\n}\r\n\r\nexport const Stepper = ({\r\n steps,\r\n currentStep,\r\n stepNumberOffset = 0,\r\n className,\r\n}: {\r\n steps: StepperStep[];\r\n currentStep: number;\r\n stepNumberOffset?: number;\r\n className?: string;\r\n}) => {\r\n return (\r\n <nav\r\n aria-label=\"Form progress\"\r\n className={cn(\"flex w-full flex-col gap-4 sm:flex-row sm:items-center sm:gap-3\", className)}\r\n >\r\n {steps.map((step, index) => {\r\n const active = index === currentStep;\r\n const complete = index < currentStep;\r\n\r\n return (\r\n <div key={step.title} className={cn(\"flex min-w-0 items-center gap-3\", index < steps.length - 1 && \"sm:flex-1\")}>\r\n <div\r\n className={cn(\r\n \"relative z-10 flex min-w-0 items-center gap-2 text-sm font-medium\",\r\n active ? \"text-primary\" : complete ? \"text-supportive\" : \"text-muted-foreground\"\r\n )}\r\n aria-current={active ? \"step\" : undefined}\r\n >\r\n {complete ? (\r\n <span className=\"flex size-6 shrink-0 items-center justify-center rounded-full bg-supportive text-supportive-foreground\">\r\n <Check className=\"size-3.5\" aria-hidden=\"true\" />\r\n </span>\r\n ) : (\r\n <span\r\n className={cn(\r\n \"flex size-6 shrink-0 items-center justify-center rounded-full border text-xs font-semibold\",\r\n active ? \"border-primary bg-primary text-primary-foreground\" : \"border-border bg-background text-muted-foreground\"\r\n )}\r\n >\r\n <span>{index + stepNumberOffset + 1}</span>\r\n </span>\r\n )}\r\n <span className=\"truncate\">{step.title}</span>\r\n </div>\r\n {index < steps.length - 1 && <span aria-hidden=\"true\" className={cn(\"hidden h-px min-w-4 flex-1 sm:block\", complete ? \"bg-supportive\" : \"bg-border\")} />}\r\n </div>\r\n );\r\n })}\r\n </nav>\r\n );\r\n};\r\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAOO,MAAM,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,WAAW,EACX,gBAAgB,GAAG,CAAC,EACpB,SAAS,GAMV,KAAI;IACH,QACEA,2BACa,eAAe,EAC1B,SAAS,EAAE,EAAE,CAAC,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AC,KAAK,CAyBd;QAEV,CAAC,CAAC,EAAA,CACE;AAEV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sources":["../../src/components/switch.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SwitchPrimitive from '@radix-ui/react-switch';\n\nimport { cn } from '@/utils';\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'relative after:absolute after:-inset-y-3 after:-inset-x-2 after:content-[\"\"] peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-[background-color,border-color,box-shadow] duration-state ease-out-strong outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform duration-state ease-out-strong data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 motion-reduce:transition-none',\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n"],"names":["_jsx"],"mappings":";;;;AAKA,SAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EAC0C,EAAA;AAClD,IAAA,QACEA,GAAA,CAAC,eAAe,CAAC,IAAI,EAAA,EAAA,WAAA,EACT,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,4hBAA4hB,EAC5hB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,QAAA,EAETA,IAAC,eAAe,CAAC,KAAK,EAAA,EAAA,WAAA,EACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,uUAAuU,CACxU,EAAA,CACD,EAAA,CACmB;AAE3B;;;;"}
1
+ {"version":3,"file":"switch.js","sources":["../../src/components/switch.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as SwitchPrimitive from '@radix-ui/react-switch';\r\n\r\nimport { cn } from '@/utils';\r\n\r\nfunction Switch({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\r\n return (\r\n <SwitchPrimitive.Root\r\n data-slot=\"switch\"\r\n className={cn(\r\n 'relative after:absolute after:-inset-y-3 after:-inset-x-2 after:content-[\"\"] peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-[background-color,border-color,box-shadow] duration-state ease-out-strong outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none',\r\n className,\r\n )}\r\n {...props}\r\n >\r\n <SwitchPrimitive.Thumb\r\n data-slot=\"switch-thumb\"\r\n className={cn(\r\n 'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform duration-state ease-out-strong data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 motion-reduce:transition-none',\r\n )}\r\n />\r\n </SwitchPrimitive.Root>\r\n );\r\n}\r\n\r\nexport { Switch };\r\n"],"names":["_jsx"],"mappings":";;;;AAKA,SAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EAC0C,EAAA;AAClD,IAAA,QACEA,GAAA,CAAC,eAAe,CAAC,IAAI,EAAA,EAAA,WAAA,EACT,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,4hBAA4hB,EAC5hB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,QAAA,EAETA,IAAC,eAAe,CAAC,KAAK,EAAA,EAAA,WAAA,EACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,uUAAuU,CACxU,EAAA,CACD,EAAA,CACmB;AAE3B;;;;"}