{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "rating",
  "type": "registry:ui",
  "title": "Rating Dialog",
  "description": "A responsive rating form dialog with radio group and textarea - drawer on mobile, modal on desktop.",
  "registryDependencies": [
    "button",
    "label",
    "radio-group",
    "textarea",
    "https://revola.sameerjs.com/r/revola.json"
  ],
  "files": [
    {
      "path": "registry/revola/examples/origin-ui/forms/feedback/rating.tsx",
      "content": "import { Button } from \"@/components/ui/button\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport {\n  ResponsiveDialog,\n  ResponsiveDialogContent,\n  ResponsiveDialogHeader,\n  ResponsiveDialogTitle,\n  ResponsiveDialogTrigger,\n} from \"@/components/ui/revola\";\nimport { Textarea } from \"@/components/ui/textarea\";\n\nexport default function RatingDialog() {\n  return (\n    <ResponsiveDialog>\n      <ResponsiveDialogTrigger asChild>\n        <Button variant=\"outline\" className=\"h-12 rounded-full px-6 capitalize\">\n          Rate Experience\n        </Button>\n      </ResponsiveDialogTrigger>\n      <ResponsiveDialogContent className=\"mx-auto flex max-h-[85%] flex-col sm:max-w-[400px]\">\n        <div>\n          <ResponsiveDialogHeader className=\"contents text-left\">\n            <ResponsiveDialogTitle className=\"border-b px-6 pb-4 text-base sm:pt-4\">\n              Help us improve\n            </ResponsiveDialogTitle>\n          </ResponsiveDialogHeader>\n          <div className=\"px-6 py-4\">\n            <form className=\"space-y-5\">\n              <div className=\"space-y-4\">\n                <div>\n                  <fieldset className=\"space-y-4\">\n                    <legend className=\"text-lg font-semibold leading-none text-foreground\">\n                      How hard was it to set up your account?\n                    </legend>\n                    <RadioGroup className=\"shadow-xs flex gap-0 -space-x-px rounded-md max-sm:flex-wrap\">\n                      {[0, 1, 2, 3, 4, 5, 6, 7, 8].map((number) => (\n                        <label\n                          key={number}\n                          className=\"relative flex size-9 flex-1 cursor-pointer flex-col items-center justify-center gap-3 border border-input text-center text-sm outline-offset-2 transition-colors first:rounded-s-lg last:rounded-e-lg has-[[data-state=checked]]:z-10 has-[[data-disabled]]:cursor-not-allowed has-[[data-state=checked]]:border-ring has-[[data-state=checked]]:bg-accent-foreground/5 has-[[data-disabled]]:opacity-50 has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-ring/70\"\n                        >\n                          <RadioGroupItem\n                            id={`radio-17-r${number}`}\n                            value={number.toString()}\n                            className=\"sr-only after:absolute after:inset-0\"\n                          />\n                          {number}\n                        </label>\n                      ))}\n                    </RadioGroup>\n                  </fieldset>\n                  <div className=\"mt-2 flex justify-between text-xs text-muted-foreground\">\n                    <p>Very easy</p>\n                    <p>Very difficult</p>\n                  </div>\n                </div>\n                <div className=\"space-y-2\">\n                  <Label>Why did you give this rating?</Label>\n                  <Textarea\n                    id=\"feedback\"\n                    rows={3}\n                    className=\"resize-none\"\n                    placeholder=\"How can we improve Revola?\"\n                    aria-label=\"Send feedback\"\n                  />\n                </div>\n              </div>\n              <Button type=\"button\" className=\"w-full\">\n                Send feedback\n              </Button>\n            </form>\n          </div>\n        </div>\n      </ResponsiveDialogContent>\n    </ResponsiveDialog>\n  );\n}\n",
      "type": "registry:ui"
    }
  ]
}