{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-modal-access",
  "type": "registry:block",
  "title": "Access modal",
  "description": "Sharing in a modal: inviting by e-mail with a role, who has access and their roles, a private switch and the link.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/avatar.json",
    "https://wideset.co/r/block-styles.json",
    "https://wideset.co/r/button.json",
    "https://wideset.co/r/divider.json",
    "https://wideset.co/r/dropdown-menu.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/modal.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/tile.json"
  ],
  "files": [
    {
      "path": "src/blocks/modal-access/access-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/access-list.tsx",
      "content": "'use client';\n\n// TODO(custom): a person row (avatar, name, e-mail, role); Figma uses List Item flush and without hover, Wideset's ListItem always insets and reads as clickable.\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\nimport { useId } from 'react';\n\nimport { PHOTOS } from './people.assets';\nimport { RoleMenu, type RoleOption } from './role-menu';\n\nexport type AccessPerson<Role extends string = string> = {\n  id: string;\n  email: string;\n  /** Name and initials are left out for someone invited who has not joined yet. */\n  name?: string;\n  initials?: string;\n  role: Role;\n  online?: boolean;\n};\n\n/** Someone who has joined: their photo when they have one, their initials otherwise. */\nfunction PersonAvatar({\n  name,\n  initials,\n  status,\n}: {\n  name?: string;\n  initials: string;\n  status?: 'online';\n}) {\n  const photo = name ? PHOTOS[name] : undefined;\n  return photo ? (\n    <Avatar aria-hidden=\"true\" src={photo} alt=\"\" initials={initials} status={status} />\n  ) : (\n    <Avatar aria-hidden=\"true\" initials={initials} status={status} />\n  );\n}\n\n/**\n * \"Who has access\": the people and their roles, each role changed in its own row; someone invited\n * shows by their address until they join. The rows are not clickable, so they are plain list\n * items on ListItem's measures (32px avatar, 8px gap, 4px above and below), not ListItem. Past\n * five rows the list scrolls on its own, so the invite field above it stays in reach; the part\n * of the sixth row left in view shows there is more.\n */\nexport function AccessList<Role extends string>({\n  people,\n  roles,\n  onRoleChange,\n}: {\n  people: AccessPerson<Role>[];\n  /** Every role; a `fixed` one (the owner's) is only shown on whoever holds it. */\n  roles: RoleOption<Role>[];\n  onRoleChange: (person: AccessPerson<Role>, role: Role) => void;\n}) {\n  const id = useId();\n  const assignable = roles.filter((role) => !role.fixed);\n\n  return (\n    <section className=\"gap-ws-7 flex flex-col\">\n      <h3 id={id} className=\"typography-body-md text-ws-static-subtle\">\n        Who has access\n      </h3>\n      <ul\n        aria-labelledby={id}\n        className=\"gap-ws-5 ws-scrollbar flex max-h-[18rem] flex-col overflow-y-auto\"\n      >\n        {people.map((person) => (\n          <li key={person.id} className=\"gap-ws-5 py-ws-3 flex items-center\">\n            {person.initials ? (\n              <PersonAvatar\n                name={person.name}\n                initials={person.initials}\n                status={person.online ? 'online' : undefined}\n              />\n            ) : (\n              <Avatar aria-hidden=\"true\" />\n            )}\n            <div className=\"min-w-0 flex-1\">\n              <p className=\"typography-label-sm text-ws-dynamic-secondary-default truncate\">\n                {person.name ?? person.email}\n              </p>\n              <p className=\"typography-body-sm text-ws-static-subtle truncate\">\n                {person.name ? person.email : 'Invitation sent'}\n              </p>\n            </div>\n            <RoleMenu\n              aria-label={`Role of ${person.name ?? person.email}`}\n              value={person.role}\n              options={\n                assignable.some((role) => role.value === person.role)\n                  ? assignable\n                  : roles.filter((role) => role.value === person.role)\n              }\n              onValueChange={(role) => onRoleChange(person, role)}\n            />\n          </li>\n        ))}\n      </ul>\n    </section>\n  );\n}\n"
    },
    {
      "path": "src/blocks/modal-access/access-modal.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/access-modal.tsx",
      "content": "'use client';\n\nimport { RiCheckLine, RiFileCopyLine } from '@remixicon/react';\nimport { Divider } from '@/components/ui/wideset/divider/Divider';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { Modal } from '@/components/ui/wideset/modal/Modal';\nimport { Tile } from '@/components/ui/wideset/tile/Tile';\nimport { useEffect, useState } from 'react';\n\nimport { AccessList, type AccessPerson } from './access-list';\nimport { InviteForm } from './invite-form';\nimport type { RoleOption } from './role-menu';\n\ntype AccessModalProps<Role extends string> = {\n  open: boolean;\n  onOpenChange: (open: boolean) => void;\n  people: AccessPerson<Role>[];\n  /** Every role; a `fixed` one (the owner's) cannot be given. */\n  roles: RoleOption<Role>[];\n  /** The role the invite field starts on. */\n  defaultRole: Role;\n  isPrivate: boolean;\n  onPrivateChange: (isPrivate: boolean) => void;\n  /** The address people join by, without the scheme. */\n  link: string;\n  onInvite: (emails: string[], role: Role) => void;\n  onRoleChange: (person: AccessPerson<Role>, role: Role) => void;\n};\n\n/**\n * Figma's Modal `Type=Share`: who can open a project. Inviting comes first, then who has access\n * and their roles, then the one setting; the link to pass on sits in the footer. Every change\n * applies at once, so there is nothing to confirm and the X (or Esc) is the way out.\n */\nexport function AccessModal<Role extends string>({\n  open,\n  onOpenChange,\n  people,\n  roles,\n  defaultRole,\n  isPrivate,\n  onPrivateChange,\n  link,\n  onInvite,\n  onRoleChange,\n}: AccessModalProps<Role>) {\n  return (\n    <Modal open={open} onOpenChange={onOpenChange}>\n      {/* The e-mail field takes the focus on open (Modal's default): inviting comes first. */}\n      <Modal.Content className=\"ws-block-utility\" aria-describedby={undefined}>\n        <Modal.Header>\n          <Modal.Title>Access</Modal.Title>\n        </Modal.Header>\n        <Modal.Body className=\"gap-ws-11 flex flex-col\">\n          <InviteForm\n            roles={roles.filter((role) => !role.fixed)}\n            defaultRole={defaultRole}\n            taken={people.map((person) => person.email)}\n            onInvite={onInvite}\n          />\n          <Divider weight=\"thin\" />\n          <AccessList people={people} roles={roles} onRoleChange={onRoleChange} />\n          {/* Figma's Select Tile with a switch: the whole tile is the control. */}\n          <Tile.Checkbox\n            title=\"Private project\"\n            description=\"This option will disable view access to everyone external\"\n            checked={isPrivate}\n            onCheckedChange={onPrivateChange}\n          >\n            <Tile.Indicator />\n          </Tile.Checkbox>\n        </Modal.Body>\n        {/* Figma lines this footer off; Modal.Footer's `extension` has no line of its own. */}\n        <Divider weight=\"thin\" />\n        <Modal.Footer variant=\"extension\" className=\"items-center justify-start\">\n          <ShareLink link={link} />\n        </Modal.Footer>\n      </Modal.Content>\n    </Modal>\n  );\n}\n\n/** The link to pass on: the button copies it and says so for two seconds. */\nfunction ShareLink({ link }: { link: string }) {\n  const [copied, setCopied] = useState(false);\n\n  useEffect(() => {\n    if (!copied) return;\n    const timer = setTimeout(() => setCopied(false), 2000);\n    return () => clearTimeout(timer);\n  }, [copied]);\n\n  return (\n    <>\n      <IconButton\n        size=\"xs\"\n        variant=\"secondary\"\n        preset=\"border\"\n        icon={copied ? RiCheckLine : RiFileCopyLine}\n        aria-label=\"Copy link\"\n        onClick={() => {\n          // Said copied only once the clipboard took it; without access nothing claims it did.\n          Promise.resolve()\n            .then(() => navigator.clipboard.writeText(`https://${link}`))\n            .then(() => setCopied(true))\n            .catch(() => {});\n        }}\n      />\n      <span role=\"status\" className=\"typography-body-md text-ws-static-subtle\">\n        {copied ? 'Link copied' : link}\n      </span>\n    </>\n  );\n}\n"
    },
    {
      "path": "src/blocks/modal-access/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/data.ts",
      "content": "import type { AccessPerson } from './access-list';\nimport type { RoleOption } from './role-menu';\n\nexport type Role = 'owner' | 'edit' | 'view';\n\n/** Every role. Ownership is transferred, never given: it shows only on the owner. */\nexport const roles: RoleOption<Role>[] = [\n  { value: 'owner', label: 'Owner', fixed: true },\n  { value: 'view', label: 'Can view', hint: 'Reads and comments.' },\n  { value: 'edit', label: 'Can edit', hint: 'Changes content and invites people.' },\n];\n\n/** Who can open the project when the modal opens, the owner first. */\nexport const people: AccessPerson<Role>[] = [\n  {\n    id: 'hana',\n    name: 'Hana Kobayashi',\n    initials: 'HK',\n    email: 'hana@lumenstudio.co',\n    role: 'owner',\n    online: true,\n  },\n  {\n    id: 'marcus',\n    name: 'Marcus Bell',\n    initials: 'MB',\n    email: 'marcus@lumenstudio.co',\n    role: 'view',\n    online: true,\n  },\n  {\n    id: 'priya',\n    name: 'Priya Raman',\n    initials: 'PR',\n    email: 'priya@lumenstudio.co',\n    role: 'view',\n    online: true,\n  },\n];\n\n/** The address people join the project by. */\nexport const link = 'join.orbit.so/r7c93kwp';\n"
    },
    {
      "path": "src/blocks/modal-access/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/index.tsx",
      "content": "'use client';\n\nimport '@/styles/wideset-blocks.css';\n\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { useState } from 'react';\n\nimport { AccessModal } from './access-modal';\nimport { link, people as initialPeople, roles } from './data';\n\n/** Access modal: sharing a project, here over an empty page that reopens it. */\nexport default function ModalAccessBlock() {\n  const [open, setOpen] = useState(true);\n  const [people, setPeople] = useState(initialPeople);\n  const [isPrivate, setPrivate] = useState(false);\n\n  return (\n    <div className=\"ws-block-utility bg-ws-static-foreground flex h-dvh items-center justify-center\">\n      <Button variant=\"secondary\" preset=\"border\" onClick={() => setOpen(true)}>\n        Manage access\n      </Button>\n      <AccessModal\n        open={open}\n        onOpenChange={setOpen}\n        people={people}\n        roles={roles}\n        defaultRole=\"view\"\n        isPrivate={isPrivate}\n        onPrivateChange={setPrivate}\n        link={link}\n        onInvite={(emails, role) =>\n          setPeople([...people, ...emails.map((email) => ({ id: email, email, role }))])\n        }\n        onRoleChange={(person, role) =>\n          setPeople(people.map((p) => (p.id === person.id ? { ...p, role } : p)))\n        }\n      />\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/modal-access/invite-form.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/invite-form.tsx",
      "content": "'use client';\n\n// TODO(custom): the invite row: several e-mails typed comma-separated (no token input in Wideset) and an error line under a field with no label (FormField needs a visible label, HelperText is not exported).\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { type FormEvent, useId, useState } from 'react';\n\nimport { RoleMenu, type RoleOption } from './role-menu';\n\nconst EMAIL = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\n/**\n * Inviting by e-mail: the address (or several, comma-separated), the role picked inside the\n * field, and the one primary action. Nothing is sent until every address is an e-mail address\n * and none of them has access already; the line under the field says which one is wrong.\n */\nexport function InviteForm<Role extends string>({\n  roles,\n  defaultRole,\n  taken,\n  onInvite,\n}: {\n  /** The roles a person can be invited with. */\n  roles: RoleOption<Role>[];\n  defaultRole: Role;\n  /** Addresses that already have access or an invitation. */\n  taken: string[];\n  onInvite: (emails: string[], role: Role) => void;\n}) {\n  const errorId = useId();\n  const [emails, setEmails] = useState('');\n  const [role, setRole] = useState(defaultRole);\n  const [error, setError] = useState('');\n\n  const send = (event: FormEvent) => {\n    event.preventDefault();\n    const list = [\n      ...new Set(\n        emails\n          .split(/[\\s,;]+/)\n          .map((email) => email.toLowerCase())\n          .filter(Boolean),\n      ),\n    ];\n    const invalid = list.find((email) => !EMAIL.test(email));\n    const existing = list.find((email) => taken.includes(email));\n    if (!list.length) setError('Enter an e-mail address.');\n    else if (invalid) setError(`“${invalid}” is not an e-mail address.`);\n    else if (existing) setError(`${existing} already has access or an invitation.`);\n    else {\n      onInvite(list, role);\n      setEmails('');\n    }\n  };\n\n  return (\n    <form noValidate onSubmit={send} className=\"gap-ws-3 flex flex-col\">\n      <div className=\"gap-ws-5 flex\">\n        <TextInput\n          className=\"min-w-0 flex-1\"\n          variant={error ? 'danger' : 'primary'}\n          value={emails}\n          onChange={(event) => {\n            setEmails(event.target.value);\n            setError('');\n          }}\n        >\n          <TextInput.Input\n            type=\"email\"\n            multiple\n            placeholder=\"Enter e-mail address\"\n            aria-label=\"E-mail address\"\n            aria-describedby={error ? errorId : undefined}\n          />\n          {/* Figma's suffix holds a Button: the affix insets it like an icon button (4px). */}\n          <TextInput.Suffix inner content=\"iconButton\">\n            <RoleMenu\n              size=\"md\"\n              aria-label=\"Role\"\n              value={role}\n              options={roles}\n              onValueChange={setRole}\n            />\n          </TextInput.Suffix>\n        </TextInput>\n        <Button type=\"submit\">Send invite</Button>\n      </div>\n      {error && (\n        <p id={errorId} role=\"alert\" className=\"typography-body-sm text-ws-semantic-negative\">\n          {error}\n        </p>\n      )}\n    </form>\n  );\n}\n"
    },
    {
      "path": "src/blocks/modal-access/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/people.assets.ts",
      "content": "// Portraits of the sample people as small JPEG data URLs (a block ships only .ts and .tsx).\n// Exported from the Wideset Core Figma file by people.cjs: do not edit by hand.\n\n/** A person’s photo by name. People who are not here show their initials. */\nexport const PHOTOS: Record<string, string | undefined> = {\n  'Priya Raman':\n    'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAQDAwQDAwQ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sE/xeZrOxBSBygbjrTDYVIhX9lkKPc3KOSEnp3iQFZHqkn8qk7S8X1EcdFR1KI9FD/uhIuYxpGF2OO7G252q9tlJbAwNqzrTzkJG2FGsqG/lNLgMmMREyGlNuALQeopawlLMcRw38o6HfNJ2cjmHiKUoOSM02VUJbaHxtnFYTM8UrZQUBZwfE7GlAGANxmk7aQVH7Uqb+YkkbAU6FcYaihs7JT3Jl6QCBnekikfOCfvSpJyjrvWB/5GX3P8iDThpa0nmSFeBNPlqlOtrS2tWWemD1HpTGghtqG3nBUlJPoBk06NHKfv1oSGyWT//Z',\n};\n"
    },
    {
      "path": "src/blocks/modal-access/role-menu.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/modal-access/role-menu.tsx",
      "content": "'use client';\n\n// TODO(custom): a role picker drawn as Figma draws it, a ghost Button with a chevron over a menu; Wideset's ghost Select hides its arrow until hover and sets the value in regular weight.\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\n\nexport type RoleOption<Role extends string = string> = {\n  value: Role;\n  label: string;\n  /** What the role may do, under its name in the menu. */\n  hint?: string;\n  /** Held, never given: shown on the person who has it and left out of everyone else's menu. */\n  fixed?: boolean;\n};\n\n/**\n * A role, changed in place. Figma draws it as a ghost Button with a chevron, in the invite field\n * (`md`) and at the end of a person's row (`sm`); the menu marks the current role. The click\n * stops at the button, so inside a field it does not also move the focus to the input.\n */\nexport function RoleMenu<Role extends string>({\n  value,\n  options,\n  onValueChange,\n  size = 'sm',\n  'aria-label': label,\n}: {\n  value: Role;\n  options: RoleOption<Role>[];\n  onValueChange: (value: Role) => void;\n  size?: 'sm' | 'md';\n  /** What the role belongs to (\"Role of Marcus Bell\"); the current role is read after it. */\n  'aria-label': string;\n}) {\n  const current = options.find((option) => option.value === value)?.label;\n\n  return (\n    <DropdownMenu>\n      <DropdownMenu.Trigger asChild>\n        <Button\n          variant=\"secondary\"\n          preset=\"ghost\"\n          size={size}\n          aria-label={`${label}: ${current}`}\n          onClick={(event) => event.stopPropagation()}\n        >\n          {current}\n          <Button.Icon icon={RiArrowDownSLine} />\n        </Button>\n      </DropdownMenu.Trigger>\n      <DropdownMenu.Content className=\"ws-block-utility\" align=\"end\">\n        {options.map((option) => (\n          <DropdownMenu.Item\n            key={option.value}\n            data-state={option.value === value ? 'checked' : 'unchecked'}\n            onSelect={() => onValueChange(option.value)}\n          >\n            <ListItem.Content>\n              <ListItem.Label>{option.label}</ListItem.Label>\n              {option.hint && <ListItem.Description>{option.hint}</ListItem.Description>}\n            </ListItem.Content>\n          </DropdownMenu.Item>\n        ))}\n      </DropdownMenu.Content>\n    </DropdownMenu>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
