{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/select-36","type":"registry:component","title":"Select 36","description":"A React Aria Components listbox with multiple selection and grouped language options","dependencies":["react-aria-components"],"registryDependencies":["label"],"files":[{"path":"src/registry/new-york/components/select/select-36.tsx","content":"'use client'\n\nimport { Header, ListBox, ListBoxItem, ListBoxSection, Separator } from 'react-aria-components'\n\nimport { Label } from '@/registry/new-york/ui/label'\n\nconst ListBoxWithOptionGroupsDemo = () => {\n  return (\n    <div className='w-full max-w-xs space-y-2'>\n      <Label>Listbox with option groups</Label>\n      <div className='border-input overflow-hidden rounded-md border'>\n        <ListBox\n          className='bg-background max-h-65 min-h-20 space-y-2 overflow-auto p-1 text-sm shadow-xs transition-[color,box-shadow]'\n          aria-label='Select some foods'\n          selectionMode='multiple'\n          defaultSelectedKeys={['english', 'tuna']}\n        >\n          <ListBoxSection className='space-y-1'>\n            <Header className='text-muted-foreground px-2 py-1.5 text-xs font-medium'>European Languages</Header>\n            <ListBoxItem\n              id='english'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              English\n            </ListBoxItem>\n            <ListBoxItem\n              id='french'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              French\n            </ListBoxItem>\n            <ListBoxItem\n              id='spanish'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Spanish\n            </ListBoxItem>\n          </ListBoxSection>\n          <Separator className='bg-border -mx-1 my-2 h-px' />\n          <ListBoxSection className='space-y-1'>\n            <Header className='text-muted-foreground px-2 py-1.5 text-xs font-medium'>Asian Languages</Header>\n            <ListBoxItem\n              id='hindi'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Hindi\n            </ListBoxItem>\n            <ListBoxItem\n              id='japanese'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Japanese\n            </ListBoxItem>\n            <ListBoxItem\n              id='mandarin'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Mandarin\n            </ListBoxItem>\n          </ListBoxSection>\n          <Separator className='bg-border -mx-1 my-2 h-px' />\n          <ListBoxSection className='space-y-1'>\n            <Header className='text-muted-foreground px-2 py-1.5 text-xs font-medium'>Other Languages</Header>\n            <ListBoxItem\n              id='swahili'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Swahili\n            </ListBoxItem>\n            <ListBoxItem\n              id='arabic'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Arabic\n            </ListBoxItem>\n            <ListBoxItem\n              id='russian'\n              className='data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative rounded px-2 py-1.5 outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-focus-visible:ring-[3px]'\n            >\n              Russian\n            </ListBoxItem>\n          </ListBoxSection>\n        </ListBox>\n      </div>\n      <p className='text-muted-foreground text-xs' role='region' aria-live='polite'>\n        Built using{' '}\n        <a\n          href='https://react-spectrum.adobe.com/react-aria/ListBox.html'\n          className='hover:text-primary underline'\n          target='_blank'\n        >\n          React Aria\n        </a>\n      </p>\n    </div>\n  )\n}\n\nexport default ListBoxWithOptionGroupsDemo\n","type":"registry:component","target":"components/shadcn-studio/select/select-36.tsx"}]}