{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "openlmis-roles-page",
  "title": "Roles Page",
  "description": "Search and filter roles by type, create or edit them, and view their rights using local mock data.",
  "dependencies": [
    "@tanstack/react-form@^1",
    "@tanstack/react-table@^9",
    "lucide-react@^1",
    "zod@^4",
    "@base-ui/react@^1"
  ],
  "registryDependencies": [
    "alert-dialog",
    "button",
    "dialog",
    "dropdown-menu",
    "field",
    "skeleton",
    "tabs",
    "https://registry.soldevelo.com/r/openlmis-callout.json",
    "https://registry.soldevelo.com/r/openlmis-column-view-options.json",
    "https://registry.soldevelo.com/r/openlmis-data-table.json",
    "https://registry.soldevelo.com/r/openlmis-form-dialog.json",
    "https://registry.soldevelo.com/r/openlmis-form-fields.json",
    "https://registry.soldevelo.com/r/openlmis-list-toolbar.json",
    "https://registry.soldevelo.com/r/openlmis-page-breadcrumbs.json",
    "https://registry.soldevelo.com/r/openlmis-role-assignments.json",
    "https://registry.soldevelo.com/r/openlmis-search-input.json",
    "https://registry.soldevelo.com/r/openlmis-select-filter.json",
    "https://registry.soldevelo.com/r/openlmis-workspace.json"
  ],
  "files": [
    {
      "path": "registry/templates/openlmis/roles-page/components/mock-roles.ts",
      "content": "// Mock roles and rights, so the page runs with no backend. Pass your own instead.\n\nimport type {\n  Right,\n  Role,\n} from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\n\n/** A role as the list shows it, with how many users hold it. */\nexport type ListedRole = Role & { count: number }\n\nexport const MOCK_RIGHTS: Right[] = [\n  { name: \"REQUISITION_APPROVE\", type: \"SUPERVISION\" },\n  { name: \"REQUISITION_AUTHORIZE\", type: \"SUPERVISION\" },\n  { name: \"REQUISITION_CREATE\", type: \"SUPERVISION\" },\n  { name: \"REQUISITION_DELETE\", type: \"SUPERVISION\" },\n  { name: \"REQUISITION_VIEW\", type: \"SUPERVISION\" },\n  { name: \"STOCK_CARDS_VIEW\", type: \"SUPERVISION\" },\n  { name: \"STOCK_ADJUST\", type: \"SUPERVISION\" },\n  { name: \"CCE_INVENTORY_VIEW\", type: \"SUPERVISION\" },\n  { name: \"ORDERS_EDIT\", type: \"ORDER_FULFILLMENT\" },\n  { name: \"ORDERS_VIEW\", type: \"ORDER_FULFILLMENT\" },\n  { name: \"PODS_MANAGE\", type: \"ORDER_FULFILLMENT\" },\n  { name: \"SHIPMENTS_EDIT\", type: \"ORDER_FULFILLMENT\" },\n  { name: \"REPORTS_VIEW\", type: \"REPORTS\" },\n  { name: \"REPORT_TEMPLATES_EDIT\", type: \"REPORTS\" },\n  { name: \"USERS_MANAGE\", type: \"GENERAL_ADMIN\" },\n  { name: \"USER_ROLES_MANAGE\", type: \"GENERAL_ADMIN\" },\n  { name: \"FACILITIES_MANAGE\", type: \"GENERAL_ADMIN\" },\n  { name: \"PRODUCTS_MANAGE\", type: \"GENERAL_ADMIN\" },\n]\n\nconst rights = (...names: string[]) =>\n  MOCK_RIGHTS.filter((right) => names.includes(right.name))\n\nexport const MOCK_ROLES: ListedRole[] = [\n  {\n    id: \"role-storeroom\",\n    name: \"Storeroom Manager\",\n    description: \"Creates and submits requisitions for a facility.\",\n    rights: rights(\n      \"REQUISITION_CREATE\",\n      \"REQUISITION_VIEW\",\n      \"REQUISITION_DELETE\"\n    ),\n    count: 48,\n  },\n  {\n    id: \"role-approver\",\n    name: \"Program Supervisor\",\n    description: \"Authorizes and approves requisitions under a node.\",\n    rights: rights(\n      \"REQUISITION_AUTHORIZE\",\n      \"REQUISITION_APPROVE\",\n      \"REQUISITION_VIEW\"\n    ),\n    count: 12,\n  },\n  {\n    id: \"role-stock\",\n    name: \"Stock Manager\",\n    description: \"Keeps stock cards up to date and records adjustments.\",\n    rights: rights(\"STOCK_CARDS_VIEW\", \"STOCK_ADJUST\"),\n    count: 31,\n  },\n  {\n    id: \"role-cce\",\n    name: \"Cold Chain Technician\",\n    description: \"Checks the cold chain equipment inventory.\",\n    rights: rights(\"CCE_INVENTORY_VIEW\"),\n    count: 6,\n  },\n  {\n    id: \"role-warehouse\",\n    name: \"Warehouse Manager\",\n    description: \"Fulfills orders and records proofs of delivery.\",\n    rights: rights(\n      \"ORDERS_VIEW\",\n      \"ORDERS_EDIT\",\n      \"PODS_MANAGE\",\n      \"SHIPMENTS_EDIT\"\n    ),\n    count: 4,\n  },\n  {\n    id: \"role-dispatcher\",\n    name: \"Dispatcher\",\n    description: \"Views orders waiting to ship.\",\n    rights: rights(\"ORDERS_VIEW\"),\n    count: 0,\n  },\n  {\n    id: \"role-reports\",\n    name: \"Report Viewer\",\n    description: \"Views reporting rate and stock reports.\",\n    rights: rights(\"REPORTS_VIEW\"),\n    count: 22,\n  },\n  {\n    id: \"role-report-author\",\n    name: \"Report Author\",\n    description: \"Edits the templates reports are built from.\",\n    rights: rights(\"REPORTS_VIEW\", \"REPORT_TEMPLATES_EDIT\"),\n    count: 2,\n  },\n  {\n    id: \"role-admin\",\n    name: \"System Administrator\",\n    description: \"Manages users, roles, facilities and products.\",\n    rights: rights(\n      \"USERS_MANAGE\",\n      \"USER_ROLES_MANAGE\",\n      \"FACILITIES_MANAGE\",\n      \"PRODUCTS_MANAGE\"\n    ),\n    count: 3,\n  },\n  {\n    id: \"role-user-admin\",\n    name: \"User Administrator\",\n    description: \"Adds users and gives them roles.\",\n    rights: rights(\"USERS_MANAGE\", \"USER_ROLES_MANAGE\"),\n    count: 5,\n  },\n  // Saved before roles held one type, so editing it warns that the report right is dropped.\n  {\n    id: \"role-district-pharmacist\",\n    name: \"District Pharmacist\",\n    description: \"Approves requisitions and views reports.\",\n    rights: rights(\"REQUISITION_APPROVE\", \"REPORTS_VIEW\"),\n    count: 9,\n  },\n  // Saved without rights, so it has no type yet.\n  {\n    id: \"role-draft\",\n    name: \"Data Clerk\",\n    description: null,\n    rights: [],\n    count: 0,\n  },\n]",
      "type": "registry:lib",
      "target": "components/openlmis/roles-page/mock-roles.ts"
    },
    {
      "path": "registry/templates/openlmis/roles-page/components/role-columns.tsx",
      "content": "\"use client\"\n\nimport { createColumnHelper } from \"@tanstack/react-table\"\nimport { EllipsisIcon, ListChecksIcon, PencilIcon } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n  DataTableColumnHeader,\n  type DataTableFeatures,\n} from \"@/components/blocks/openlmis/data-table/data-table\"\nimport { useMenuOpensDialog } from \"@/components/blocks/openlmis/data-table/row-actions\"\nimport type { ResponsiveColumn } from \"@/components/blocks/openlmis/data-table/responsive-columns\"\nimport { roleTypeOf } from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\nimport { roleTypeInfo } from \"@/components/openlmis/roles-page/role-form\"\n\nimport type { ListedRole } from \"@/components/openlmis/roles-page/mock-roles\"\n\n/** The columns the View menu lists, in order; the role's name is left out, so it always shows. */\nexport const HIDEABLE_COLUMNS: (ResponsiveColumn & { label: string })[] = [\n  { id: \"type\", label: \"Role Type\", hideBelow: \"md\" },\n  { id: \"description\", label: \"Description\", hideBelow: \"4xl\" },\n  { id: \"count\", label: \"Number Of Users\", hideBelow: \"xl\" },\n]\n\nconst columnHelper = createColumnHelper<DataTableFeatures, ListedRole>()\n\n/** Each is left out when the user may not do it, and the menu goes when both are. */\nexport type RoleRowActions = {\n  onEdit?: ((roleId: string) => void) | undefined\n  onViewRights?: ((roleId: string) => void) | undefined\n}\n\nexport function createRoleColumns(actions: RoleRowActions) {\n  const hasActions = Boolean(actions.onEdit || actions.onViewRights)\n  return columnHelper.columns([\n    columnHelper.accessor(\"name\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Role\" />\n      ),\n      cell: ({ getValue }) => <span className=\"font-medium\">{getValue()}</span>,\n      meta: { className: \"@xl/table:w-1/3 @4xl/table:w-1/4\" },\n    }),\n    columnHelper.accessor((role) => roleTypeOf(role), {\n      id: \"type\",\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Role Type\" />\n      ),\n      cell: ({ getValue }) => {\n        const type = getValue()\n        return type ? (\n          roleTypeInfo(type).label\n        ) : (\n          <span className=\"text-muted-foreground\">No Type</span>\n        )\n      },\n      meta: { className: \"@xl/table:w-40\" },\n    }),\n    columnHelper.accessor(\"description\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Description\" />\n      ),\n      cell: ({ getValue }) =>\n        getValue() || <span className=\"text-muted-foreground\">-</span>,\n      enableSorting: false,\n    }),\n    columnHelper.accessor(\"count\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Number Of Users\" />\n      ),\n      cell: ({ getValue }) => (\n        <span className=\"tabular-nums\">{getValue()}</span>\n      ),\n      meta: { className: \"w-36\" },\n    }),\n    ...(hasActions\n      ? [\n          columnHelper.display({\n            id: \"actions\",\n            header: () => <span className=\"sr-only\">Actions</span>,\n            cell: ({ row }) => (\n              <RoleActions actions={actions} role={row.original} />\n            ),\n            meta: { className: \"w-16\" },\n          }),\n        ]\n      : []),\n  ])\n}\n\nfunction RoleActions({\n  role,\n  actions: { onEdit, onViewRights },\n}: {\n  role: ListedRole\n  actions: RoleRowActions\n}) {\n  const menu = useMenuOpensDialog()\n\n  return (\n    <div className=\"flex justify-end\">\n      <DropdownMenu onOpenChange={menu.onOpenChange}>\n        <DropdownMenuTrigger\n          render={\n            <Button\n              aria-label={`Actions for ${role.name}`}\n              size=\"icon-sm\"\n              variant=\"ghost\"\n            />\n          }\n        >\n          <EllipsisIcon />\n        </DropdownMenuTrigger>\n        <DropdownMenuContent\n          align=\"end\"\n          className=\"w-auto\"\n          finalFocus={menu.finalFocus}\n        >\n          {onEdit && (\n            <DropdownMenuItem onClick={menu.opensDialog(() => onEdit(role.id))}>\n              <PencilIcon />\n              Edit\n            </DropdownMenuItem>\n          )}\n          {onViewRights && (\n            <DropdownMenuItem\n              onClick={menu.opensDialog(() => onViewRights(role.id))}\n            >\n              <ListChecksIcon />\n              View Rights\n            </DropdownMenuItem>\n          )}\n        </DropdownMenuContent>\n      </DropdownMenu>\n    </div>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/roles-page/role-columns.tsx"
    },
    {
      "path": "registry/templates/openlmis/roles-page/components/role-form-dialog/role-form-dialog.tsx",
      "content": "\"use client\"\n\nimport { revalidateLogic } from \"@tanstack/react-form\"\nimport { type ReactNode, useId, useMemo, useState } from \"react\"\n\nimport {\n  AlertDialog,\n  AlertDialogCancel,\n  AlertDialogContent,\n  AlertDialogDescription,\n  AlertDialogFooter,\n  AlertDialogHeader,\n  AlertDialogTitle,\n} from \"@/components/ui/alert-dialog\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Field,\n  FieldDescription,\n  FieldGroup,\n  FieldTitle,\n} from \"@/components/ui/field\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\nimport {\n  type Right,\n  type RightType,\n  type Role,\n  rightLabel,\n  roleTypeOf,\n} from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\nimport { Callout } from \"@/components/openlmis/callout\"\nimport {\n  FormDialog,\n  FormDialogBody,\n  FormDialogCancel,\n  FormDialogDescription,\n  FormDialogError,\n  FormDialogFooter,\n  FormDialogForm,\n  FormDialogHeader,\n  FormDialogSubmit,\n  FormDialogTitle,\n} from \"@/components/openlmis/form-dialog/form-dialog\"\nimport { useDialogTarget } from \"@/components/openlmis/form-dialog/use-dialog-target\"\nimport { useAppForm } from \"@/components/openlmis/form-fields/form\"\nimport {\n  FieldLabelText,\n  FieldSkeleton,\n  SkeletonLine,\n} from \"@/components/openlmis/form-fields/form-fields\"\n\nimport {\n  asksBeforeSaving,\n  EMPTY_ROLE_FORM,\n  otherTypeRights,\n  ROLE_TYPES,\n  type RoleFormResult,\n  type RoleFormValues,\n  roleFormSchema,\n  roleTypeInfo,\n  toRoleFormValues,\n  toRoleResult,\n} from \"@/components/openlmis/roles-page/role-form\"\n\n/** `new` to create a role, or the id of the role to edit. */\nexport type RoleFormDialogTarget = \"new\" | (string & {})\n\ntype RoleFormDialogProps = {\n  /** Opens the dialog while set. */\n  target: RoleFormDialogTarget | undefined\n  /** The role being edited; a skeleton shows until it is set. */\n  role?: Role | undefined\n  /** Every role, so a name already taken is refused. */\n  roles: readonly Pick<Role, \"id\" | \"name\">[]\n  /** Every right of every type; the rights field shows a skeleton until it is set. */\n  rights: readonly Right[] | undefined\n  /** How many users hold the role; saving a role in use asks first. */\n  holders?: number\n  /** Without it, the dialog says creating and editing roles needs rights the user lacks. */\n  canEdit?: boolean\n  /** The role to edit no longer exists. */\n  notFound?: boolean\n  /** Called with the trimmed values; save them, then clear `target` to close. */\n  onSubmit: (result: RoleFormResult, role: Role | undefined) => void\n  /** Keeps the dialog open and shows a spinner while the role is saved. */\n  pending?: boolean\n  /** Shown above the fields, e.g. why the save failed. */\n  error?: ReactNode\n  /** Names a right from its code; defaults to the code in words, e.g. \"Requisition Approve\". */\n  formatRight?: (name: string) => string\n  onClose: () => void\n}\n\nexport function RoleFormDialog({\n  target,\n  role,\n  roles,\n  rights,\n  holders = 0,\n  canEdit = true,\n  notFound = false,\n  onSubmit,\n  pending = false,\n  error,\n  formatRight = rightLabel,\n  onClose,\n}: RoleFormDialogProps) {\n  const { shown, dialogProps } = useDialogTarget(target, onClose)\n  const isNew = shown === \"new\"\n  const title = isNew ? \"Create Role\" : \"Edit Role\"\n\n  return (\n    <FormDialog {...dialogProps(pending)}>\n      {shown &&\n        (!canEdit ? (\n          <MessageContent\n            message=\"Creating and editing roles needs Manage User Roles and View Rights. Ask an administrator if you need them.\"\n            title={title}\n          />\n        ) : notFound && !isNew ? (\n          <MessageContent message=\"This role no longer exists.\" title={title} />\n        ) : !isNew && role === undefined ? (\n          <RoleFormSkeleton submitLabel=\"Save Changes\" title={title} />\n        ) : (\n          <RoleForm\n            error={error}\n            formatRight={formatRight}\n            holders={holders}\n            // Keyed, so opening another role starts a fresh form.\n            key={role?.id ?? \"new\"}\n            onSubmit={onSubmit}\n            pending={pending}\n            rights={rights}\n            role={isNew ? undefined : role}\n            roles={roles}\n          />\n        ))}\n    </FormDialog>\n  )\n}\n\ntype RoleFormProps = Pick<\n  RoleFormDialogProps,\n  \"roles\" | \"rights\" | \"onSubmit\" | \"error\"\n> & {\n  role: Role | undefined\n  holders: number\n  pending: boolean\n  formatRight: (name: string) => string\n}\n\nfunction RoleForm({\n  role,\n  roles,\n  rights,\n  holders,\n  onSubmit,\n  pending,\n  error,\n  formatRight,\n}: RoleFormProps) {\n  const schema = useMemo(\n    () => roleFormSchema(roles, role?.id),\n    [roles, role?.id]\n  )\n  const [confirming, setConfirming] = useState<RoleFormValues>()\n  // The type of a saved role is fixed, since its holders' assignments are shaped for it.\n  const typeLocked = roleTypeOf(role) !== undefined\n  const dropped = otherTypeRights(role)\n  const submit = (values: RoleFormValues) =>\n    onSubmit(toRoleResult(values, rights ?? []), role)\n\n  const form = useAppForm({\n    defaultValues: role ? toRoleFormValues(role) : EMPTY_ROLE_FORM,\n    // Quiet until the first submit, then each field re-checks as it is corrected.\n    validationLogic: revalidateLogic({\n      mode: \"submit\",\n      modeAfterSubmission: \"change\",\n    }),\n    validators: { onDynamic: schema },\n    onSubmit: ({ value }) =>\n      asksBeforeSaving(role, holders) ? setConfirming(value) : submit(value),\n  })\n\n  return (\n    <FormDialogForm onSubmit={form.handleSubmit}>\n      <FormDialogHeader>\n        <FormDialogTitle>{role ? \"Edit Role\" : \"Create Role\"}</FormDialogTitle>\n        <FormDialogDescription>\n          {role\n            ? `Details for ${role.name}.`\n            : \"Pick a type, then name the role and choose its rights.\"}\n        </FormDialogDescription>\n      </FormDialogHeader>\n      <FormDialogBody>\n        {/* Rights belong to one type, so changing it starts the choice of rights over. */}\n        <form.AppField\n          listeners={{ onChange: () => form.setFieldValue(\"rights\", []) }}\n          name=\"type\"\n        >\n          {(field) => (\n            <RoleTypeTabs\n              locked={typeLocked}\n              onChange={field.handleChange}\n              type={field.state.value}\n            >\n              <FieldGroup>\n                {error && (\n                  <FormDialogError\n                    description={error}\n                    title=\"Could Not Save Role\"\n                  />\n                )}\n                {dropped.length > 0 && (\n                  <Callout title=\"Rights Of Another Type\" tone=\"warning\">\n                    {otherTypeMessage(\n                      dropped.map((right) => formatRight(right.name))\n                    )}\n                  </Callout>\n                )}\n                <form.AppField name=\"name\">\n                  {(name) => (\n                    <name.TextField autoComplete=\"off\" label=\"Name\" required />\n                  )}\n                </form.AppField>\n                <form.AppField name=\"description\">\n                  {(description) => (\n                    <description.TextareaField label=\"Description\" required />\n                  )}\n                </form.AppField>\n                {rights === undefined ? (\n                  <FieldSkeleton label=\"Rights\" required />\n                ) : (\n                  <form.AppField name=\"rights\">\n                    {(rightsField) => {\n                      const items = rightItems(\n                        rights,\n                        field.state.value,\n                        formatRight\n                      )\n                      const selected = items.filter((item) =>\n                        rightsField.state.value.includes(item.value)\n                      ).length\n                      return (\n                        <rightsField.MultiComboboxField\n                          description={`${selected} of ${items.length} selected.`}\n                          emptyMessage=\"No rights found.\"\n                          items={items}\n                          label=\"Rights\"\n                          placeholder=\"Search Rights...\"\n                          removeLabel={(label) => `Remove ${label}`}\n                          required\n                        />\n                      )\n                    }}\n                  </form.AppField>\n                )}\n              </FieldGroup>\n            </RoleTypeTabs>\n          )}\n        </form.AppField>\n      </FormDialogBody>\n      <FormDialogFooter>\n        <FormDialogCancel disabled={pending} />\n        <FormDialogSubmit disabled={rights === undefined} pending={pending}>\n          {role ? \"Save Changes\" : \"Create Role\"}\n        </FormDialogSubmit>\n      </FormDialogFooter>\n      <AlertDialog\n        onOpenChange={(open) => !open && setConfirming(undefined)}\n        open={Boolean(confirming)}\n      >\n        <AlertDialogContent>\n          <AlertDialogHeader>\n            <AlertDialogTitle>Change A Role In Use?</AlertDialogTitle>\n            <AlertDialogDescription>\n              {holders === 1 ? \"1 user has\" : `${holders} users have`}{\" \"}\n              {role?.name}. Saving changes what they can do right away.\n            </AlertDialogDescription>\n          </AlertDialogHeader>\n          <AlertDialogFooter>\n            <AlertDialogCancel>Cancel</AlertDialogCancel>\n            <Button\n              onClick={() => {\n                if (confirming) submit(confirming)\n                setConfirming(undefined)\n              }}\n            >\n              Save Changes\n            </Button>\n          </AlertDialogFooter>\n        </AlertDialogContent>\n      </AlertDialog>\n    </FormDialogForm>\n  )\n}\n\nfunction rightItems(\n  rights: readonly Right[],\n  type: RightType,\n  formatRight: (name: string) => string\n) {\n  return (\n    rights\n      .filter((right) => right.type === type)\n      .map((right) => ({ value: right.name, label: formatRight(right.name) }))\n      // oxlint-disable-next-line unicorn/no-array-sort -- sorts the fresh mapped array\n      .sort((a, b) => a.label.localeCompare(b.label))\n  )\n}\n\nfunction otherTypeMessage(labels: string[]) {\n  const list = labels.join(\", \")\n  return labels.length === 1\n    ? `This role also holds a right of another type, ${list}. Saving removes it, since a role holds rights of one type.`\n    : `This role also holds ${labels.length} rights of another type: ${list}. Saving removes them, since a role holds rights of one type.`\n}\n\ntype RoleTypeTabsProps = {\n  type: RightType\n  locked: boolean\n  onChange: (type: RightType) => void\n  children: ReactNode\n}\n\nfunction RoleTypeTabs({ type, locked, onChange, children }: RoleTypeTabsProps) {\n  const id = useId()\n\n  return (\n    <Tabs\n      className=\"gap-4\"\n      onValueChange={(value) => onChange(value as RightType)}\n      value={type}\n    >\n      <Field className=\"gap-2\">\n        <FieldTitle id={`${id}-label`}>\n          <FieldLabelText label=\"Role Type\" required />\n        </FieldTitle>\n        {/* Its own container, so the four tabs go two by two when the dialog is narrow. */}\n        <div className=\"@container\">\n          <TabsList\n            aria-describedby={`${id}-description`}\n            aria-labelledby={`${id}-label`}\n            className=\"grid w-full grid-cols-2 group-data-horizontal/tabs:h-auto @md:flex @md:group-data-horizontal/tabs:h-8\"\n          >\n            {ROLE_TYPES.map((item) => (\n              <TabsTrigger\n                disabled={locked && item.type !== type}\n                key={item.type}\n                value={item.type}\n              >\n                {item.label}\n              </TabsTrigger>\n            ))}\n          </TabsList>\n        </div>\n        <FieldDescription id={`${id}-description`}>\n          {roleTypeInfo(type).description}\n        </FieldDescription>\n      </Field>\n      {/* Not a tab stop of its own: the fields inside it take focus. */}\n      <TabsContent tabIndex={-1} value={type}>\n        {children}\n      </TabsContent>\n    </Tabs>\n  )\n}\n\nfunction MessageContent({\n  title,\n  message,\n}: {\n  title: string\n  message: string\n}) {\n  return (\n    <>\n      <FormDialogHeader>\n        <FormDialogTitle>{title}</FormDialogTitle>\n        <FormDialogDescription>{message}</FormDialogDescription>\n      </FormDialogHeader>\n      <FormDialogFooter>\n        <FormDialogCancel>Close</FormDialogCancel>\n      </FormDialogFooter>\n    </>\n  )\n}\n\n/** Laid out like the form, so nothing moves when the role arrives. */\nexport function RoleFormSkeleton({\n  title,\n  submitLabel,\n}: {\n  title: string\n  submitLabel: string\n}) {\n  return (\n    <>\n      <FormDialogHeader>\n        <FormDialogTitle>{title}</FormDialogTitle>\n        <SkeletonLine />\n      </FormDialogHeader>\n      <FormDialogBody>\n        <div aria-busy className=\"flex flex-col gap-4\">\n          <Field className=\"gap-2\">\n            <FieldTitle>\n              <FieldLabelText label=\"Role Type\" required />\n            </FieldTitle>\n            <div className=\"@container\">\n              <Skeleton className=\"h-15 w-full @md:h-8\" />\n            </div>\n            <SkeletonLine />\n          </Field>\n          <FieldGroup>\n            <FieldSkeleton label=\"Name\" required />\n            <FieldSkeleton label=\"Description\" required />\n            <FieldSkeleton label=\"Rights\" required />\n          </FieldGroup>\n        </div>\n      </FormDialogBody>\n      <FormDialogFooter>\n        <FormDialogCancel />\n        <FormDialogSubmit disabled>{submitLabel}</FormDialogSubmit>\n      </FormDialogFooter>\n    </>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/roles-page/role-form-dialog.tsx"
    },
    {
      "path": "registry/templates/openlmis/roles-page/components/role-form-dialog/role-form.ts",
      "content": "import { z } from \"zod\"\n\nimport {\n  type Right,\n  type RightType,\n  type Role,\n  roleTypeOf,\n} from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\n\n/** The four role types, in the order OpenLMIS shows them, with what each one is for. */\nexport const ROLE_TYPES = [\n  {\n    type: \"SUPERVISION\",\n    label: \"Supervision\",\n    description:\n      \"Rights for managing requisitions, stock and cold chain equipment at supervised facilities.\",\n  },\n  {\n    type: \"ORDER_FULFILLMENT\",\n    label: \"Fulfillment\",\n    description:\n      \"Rights for viewing, transferring and editing orders and shipments at a warehouse.\",\n  },\n  {\n    type: \"REPORTS\",\n    label: \"Reports\",\n    description: \"Rights for viewing reports and editing their templates.\",\n  },\n  {\n    type: \"GENERAL_ADMIN\",\n    label: \"Administration\",\n    description:\n      \"Rights for managing the system: users, facilities, products, programs and other settings.\",\n  },\n] as const satisfies readonly {\n  type: RightType\n  label: string\n  description: string\n}[]\n\nexport type RoleTypeInfo = (typeof ROLE_TYPES)[number]\n\nexport function roleTypeInfo(type: RightType): RoleTypeInfo {\n  return ROLE_TYPES.find((item) => item.type === type) ?? ROLE_TYPES[0]\n}\n\nconst sameName = (a: string, b: string) =>\n  a.trim().toLowerCase() === b.trim().toLowerCase()\n\n/** Role names are unique ignoring case; the role being edited keeps its own. */\nexport function roleFormSchema(\n  roles: readonly Pick<Role, \"id\" | \"name\">[],\n  editingId?: string\n) {\n  return z.object({\n    type: z.custom<RightType>(),\n    name: z\n      .string()\n      .trim()\n      .min(1, \"Enter a name.\")\n      .refine(\n        (name) =>\n          !roles.some(\n            (role) => role.id !== editingId && sameName(role.name, name)\n          ),\n        \"Another role already has this name.\"\n      ),\n    description: z.string().trim().min(1, \"Enter a description.\"),\n    /** The chosen rights by name, which is unique in OpenLMIS. */\n    rights: z.array(z.string()).min(1, \"Choose at least one right.\"),\n  })\n}\n\nexport type RoleFormValues = z.input<ReturnType<typeof roleFormSchema>>\n\nexport const EMPTY_ROLE_FORM: RoleFormValues = {\n  type: ROLE_TYPES[0].type,\n  name: \"\",\n  description: \"\",\n  rights: [],\n}\n\n/** Only the rights of the role's type: the form lists no others, and a role holds one type. */\nexport function toRoleFormValues(role: Role): RoleFormValues {\n  // A role saved without rights has no type yet, so it starts on the first one.\n  const type = roleTypeOf(role) ?? ROLE_TYPES[0].type\n  return {\n    type,\n    name: role.name,\n    description: role.description ?? \"\",\n    rights: role.rights\n      .filter((right) => right.type === type)\n      .map((right) => right.name),\n  }\n}\n\n/** Rights of another type than the role's, which a save through this form drops. */\nexport function otherTypeRights(role: Role | undefined): Right[] {\n  const type = roleTypeOf(role)\n  return role?.rights.filter((right) => right.type !== type) ?? []\n}\n\n/** Changing a role changes what everyone who holds it can do, so that is asked first. */\nexport function asksBeforeSaving(role: Role | undefined, holders: number) {\n  return role !== undefined && holders > 0\n}\n\n/** What the form saves: trimmed text and the chosen rights of the role's type. */\nexport type RoleFormResult = {\n  name: string\n  description: string\n  rights: Right[]\n}\n\nexport function toRoleResult(\n  values: RoleFormValues,\n  rights: readonly Right[]\n): RoleFormResult {\n  const chosen = new Set(values.rights)\n  return {\n    name: values.name.trim(),\n    description: values.description.trim(),\n    rights: rights\n      .filter((right) => right.type === values.type && chosen.has(right.name))\n      .map(({ name, type }) => ({ name, type })),\n  }\n}",
      "type": "registry:lib",
      "target": "components/openlmis/roles-page/role-form.ts"
    },
    {
      "path": "registry/templates/openlmis/roles-page/components/role-rights-dialog/role-rights-dialog.tsx",
      "content": "\"use client\"\n\nimport { CheckIcon } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Dialog,\n  DialogClose,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from \"@/components/ui/dialog\"\nimport {\n  type Role,\n  rightLabel,\n} from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\nimport { useDialogTarget } from \"@/components/openlmis/form-dialog/use-dialog-target\"\n\ntype RoleRightsDialogProps = {\n  /** The role whose rights are shown; open while set. Keep its identity while it stays open. */\n  role: Role | undefined\n  onClose: () => void\n  /** Names a right from its code; defaults to the code in words, e.g. \"Requisition Approve\". */\n  formatRight?: (name: string) => string\n}\n\n/** What a role lets its holder do, which the old UI only showed on hover. */\nexport function RoleRightsDialog({\n  role,\n  onClose,\n  formatRight = rightLabel,\n}: RoleRightsDialogProps) {\n  const { shown, dialogProps } = useDialogTarget(role, onClose)\n  const labels = (shown?.rights ?? []).map((right) => formatRight(right.name))\n  // oxlint-disable-next-line unicorn/no-array-sort -- sorts the fresh mapped array\n  const rights = labels.sort()\n\n  return (\n    <Dialog {...dialogProps()}>\n      {/* Flex instead of grid, so a long list scrolls inside the dialog. */}\n      {/* oxlint-disable-next-line shadcn/no-arbitrary-values -- no scale value keeps a margin inside the dynamic viewport */}\n      <DialogContent className=\"flex max-h-[calc(100dvh-2rem)] flex-col\">\n        <DialogHeader className=\"gap-1 pe-8\">\n          <DialogTitle>{shown ? `${shown.name} Rights` : \"Rights\"}</DialogTitle>\n          <DialogDescription>\n            {shown?.description ||\n              `${rights.length === 1 ? \"1 right\" : `${rights.length} rights`} granted by this role.`}\n          </DialogDescription>\n        </DialogHeader>\n        {rights.length > 0 && (\n          <ul className=\"-mx-4 flex min-h-0 flex-col gap-2 overflow-y-auto px-4 text-sm\">\n            {rights.map((right) => (\n              <li className=\"flex items-center gap-2\" key={right}>\n                <CheckIcon\n                  aria-hidden=\"true\"\n                  className=\"size-4 shrink-0 text-success\"\n                />\n                {right}\n              </li>\n            ))}\n          </ul>\n        )}\n        <DialogFooter>\n          <DialogClose render={<Button type=\"button\" variant=\"outline\" />}>\n            Close\n          </DialogClose>\n        </DialogFooter>\n      </DialogContent>\n    </Dialog>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/roles-page/role-rights-dialog.tsx"
    },
    {
      "path": "registry/templates/openlmis/roles-page/components/roles-list.ts",
      "content": "import {\n  type RightType,\n  type Role,\n  roleTypeOf,\n} from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\nimport { ROLE_TYPES } from \"@/components/openlmis/roles-page/role-form\"\n\nimport type { ListedRole } from \"@/components/openlmis/roles-page/mock-roles\"\n\nexport const ROLE_SORT_FIELDS = [\"name\", \"type\", \"count\"] as const\n\nexport type RoleSortField = (typeof ROLE_SORT_FIELDS)[number]\n\nexport type RolesQuery = {\n  search: string\n  /** An empty string means every type. */\n  type: RightType | \"\"\n  sortBy: RoleSortField\n  sortDesc: boolean\n  pageIndex: number\n  pageSize: number\n}\n\n// Folds case and accents, so \"sante\" finds \"Santé\".\nconst fold = (text: string) =>\n  text.normalize(\"NFD\").replace(/\\p{M}/gu, \"\").toLowerCase()\n\nexport function filterRoles(\n  roles: readonly ListedRole[],\n  { search, type }: Pick<RolesQuery, \"search\" | \"type\">\n) {\n  const term = fold(search.trim())\n  return roles.filter(\n    (role) =>\n      (!type || roleTypeOf(role) === type) &&\n      (!term ||\n        [role.name, role.description ?? \"\"].some((text) =>\n          fold(text).includes(term)\n        ))\n  )\n}\n\nconst byName = (a: Role, b: Role) =>\n  a.name.localeCompare(b.name, undefined, { sensitivity: \"base\" })\n\n// A role with no rights has no type, so it sorts after the four.\nconst typeRank = (role: Role) => {\n  const index = ROLE_TYPES.findIndex((item) => item.type === roleTypeOf(role))\n  return index === -1 ? ROLE_TYPES.length : index\n}\n\nconst COMPARE: Record<RoleSortField, (a: ListedRole, b: ListedRole) => number> =\n  {\n    name: byName,\n    type: (a, b) => typeRank(a) - typeRank(b),\n    count: (a, b) => a.count - b.count,\n  }\n\nexport function sortRoles(\n  roles: readonly ListedRole[],\n  field: RoleSortField,\n  desc: boolean\n) {\n  const compare = COMPARE[field]\n  // oxlint-disable-next-line unicorn/no-array-sort -- sorts a fresh copy; toSorted needs the ES2023 lib\n  return [...roles].sort(\n    (a, b) => (desc ? -compare(a, b) : compare(a, b)) || byName(a, b)\n  )\n}",
      "type": "registry:lib",
      "target": "components/openlmis/roles-page/roles-list.ts"
    },
    {
      "path": "registry/templates/openlmis/roles-page/components/roles-page.tsx",
      "content": "\"use client\"\n\nimport {\n  type ColumnVisibilityState,\n  functionalUpdate,\n  useTable,\n} from \"@tanstack/react-table\"\nimport { PlusIcon, SearchXIcon, ShieldIcon } from \"lucide-react\"\nimport { useCallback, useMemo, useState } from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  DataTable,\n  DataTableEmpty,\n  DataTablePagination,\n  dataTableFeatures,\n} from \"@/components/blocks/openlmis/data-table/data-table\"\nimport {\n  useColumnVisibility,\n  useContainerSize,\n} from \"@/components/blocks/openlmis/data-table/responsive-columns\"\nimport {\n  ListToolbar,\n  ListToolbarEnd,\n  ListToolbarFilter,\n  ListToolbarSearch,\n} from \"@/components/blocks/openlmis/list-toolbar\"\nimport type { RightType } from \"@/components/blocks/openlmis/role-assignments/role-assignments\"\nimport {\n  RoleFormDialog,\n  type RoleFormDialogTarget,\n} from \"@/components/openlmis/roles-page/role-form-dialog\"\nimport type { RoleFormResult } from \"@/components/openlmis/roles-page/role-form\"\nimport { ROLE_TYPES } from \"@/components/openlmis/roles-page/role-form\"\nimport { RoleRightsDialog } from \"@/components/openlmis/roles-page/role-rights-dialog\"\nimport {\n  Workspace,\n  WorkspaceContent,\n  WorkspaceDescription,\n  WorkspaceHeader,\n  WorkspaceHeading,\n  WorkspaceIcon,\n  WorkspaceTitle,\n} from \"@/components/blocks/openlmis/workspace\"\nimport { Callout } from \"@/components/openlmis/callout\"\nimport { ColumnViewOptions } from \"@/components/openlmis/column-view-options\"\nimport { PageBreadcrumbs } from \"@/components/openlmis/page-breadcrumbs\"\nimport { SearchInput } from \"@/components/openlmis/search-input/search-input\"\nimport { SelectFilter } from \"@/components/openlmis/select-filter\"\n\nimport { type ListedRole, MOCK_RIGHTS, MOCK_ROLES } from \"@/components/openlmis/roles-page/mock-roles\"\nimport { createRoleColumns, HIDEABLE_COLUMNS } from \"@/components/openlmis/roles-page/role-columns\"\nimport {\n  filterRoles,\n  type RoleSortField,\n  type RolesQuery,\n  sortRoles,\n} from \"@/components/openlmis/roles-page/roles-list\"\n\nconst INITIAL_QUERY: RolesQuery = {\n  search: \"\",\n  type: \"\",\n  sortBy: \"name\",\n  sortDesc: false,\n  pageIndex: 0,\n  pageSize: 10,\n}\n\nconst getRowId = (role: ListedRole) => role.id\n\ntype OpenDialog =\n  | { kind: \"role\"; target: RoleFormDialogTarget }\n  | { kind: \"rights\"; roleId: string }\n\ntype Notice = { title: string; description: string }\n\ntype RolesPageProps = {\n  /** Whether the user may create and edit roles; without it the list is read only. */\n  canEdit?: boolean\n  /** Whether the user may see what each role grants. */\n  canViewRights?: boolean\n}\n\n/** The roles list screen; mount it from any route, e.g. the `page.tsx` this template ships. */\nexport function RolesPage({\n  canEdit = true,\n  canViewRights = true,\n}: RolesPageProps) {\n  const [roles, setRoles] = useState(MOCK_ROLES)\n  const [query, setQuery] = useState(INITIAL_QUERY)\n  const [dialog, setDialog] = useState<OpenDialog>()\n  const [notice, setNotice] = useState<Notice>()\n  const closeDialog = () => setDialog(undefined)\n  /** A filter or sort starts again from the first page; paging keeps the rest. */\n  const update = (patch: Partial<RolesQuery>) => {\n    setNotice(undefined)\n    setQuery((previous) => ({\n      ...previous,\n      ...patch,\n      pageIndex: \"pageIndex\" in patch ? (patch.pageIndex ?? 0) : 0,\n    }))\n  }\n\n  // Stable, so the columns built from them keep their identity between renders.\n  const onEdit = useCallback((roleId: string) => {\n    setNotice(undefined)\n    setDialog({ kind: \"role\", target: roleId })\n  }, [])\n  const onViewRights = useCallback((roleId: string) => {\n    setNotice(undefined)\n    setDialog({ kind: \"rights\", roleId })\n  }, [])\n  const columns = useMemo(\n    () =>\n      createRoleColumns({\n        onEdit: canEdit ? onEdit : undefined,\n        onViewRights: canViewRights ? onViewRights : undefined,\n      }),\n    [canEdit, canViewRights, onEdit, onViewRights]\n  )\n  const [measureContent, contentSize] = useContainerSize<HTMLDivElement>()\n  // Kept for the visit only; store it (e.g. in localStorage) to remember it across visits.\n  const columnChoices = useState<ColumnVisibilityState>({})\n  const columnView = useColumnVisibility(\n    HIDEABLE_COLUMNS,\n    columnChoices,\n    contentSize\n  )\n\n  // Every role is in memory, so filtering, sorting and paging happen here.\n  const matching = useMemo(\n    () => sortRoles(filterRoles(roles, query), query.sortBy, query.sortDesc),\n    [roles, query]\n  )\n  // A filter that leaves fewer pages is held to the last page that exists.\n  const lastPage = Math.max(0, Math.ceil(matching.length / query.pageSize) - 1)\n  const pagination = useMemo(\n    () => ({\n      pageIndex: Math.min(query.pageIndex, lastPage),\n      pageSize: query.pageSize,\n    }),\n    [query.pageIndex, query.pageSize, lastPage]\n  )\n  const data = useMemo(\n    () =>\n      matching.slice(\n        pagination.pageIndex * pagination.pageSize,\n        (pagination.pageIndex + 1) * pagination.pageSize\n      ),\n    [matching, pagination]\n  )\n  // Memoized: the table compares controlled state by reference and would reset it every render.\n  const sorting = useMemo(\n    () => [{ id: query.sortBy, desc: query.sortDesc }],\n    [query.sortBy, query.sortDesc]\n  )\n\n  const table = useTable({\n    features: dataTableFeatures,\n    columns,\n    data,\n    getRowId,\n    rowCount: matching.length,\n    manualPagination: true,\n    manualSorting: true,\n    enableSortingRemoval: false,\n    state: { pagination, sorting, columnVisibility: columnView.visibility },\n    onPaginationChange: (updater) =>\n      update(functionalUpdate(updater, pagination)),\n    onSortingChange: (updater) => {\n      const [next] = functionalUpdate(updater, sorting)\n      if (next)\n        update({ sortBy: next.id as RoleSortField, sortDesc: next.desc })\n    },\n  })\n\n  const roleTarget = dialog?.kind === \"role\" ? dialog.target : undefined\n  const editing = roles.find((role) => role.id === roleTarget)\n  const rightsRole =\n    dialog?.kind === \"rights\"\n      ? roles.find((role) => role.id === dialog.roleId)\n      : undefined\n  const isFiltered = Boolean(query.search || query.type)\n\n  const saveRole = (\n    result: RoleFormResult,\n    existing: ListedRole | undefined\n  ) => {\n    if (existing) {\n      setRoles((current) =>\n        current.map((role) =>\n          role.id === existing.id ? { ...role, ...result } : role\n        )\n      )\n      setNotice({\n        title: \"Role Updated\",\n        description:\n          existing.count === 0\n            ? `Changes to ${result.name} are saved.`\n            : `Changes to ${result.name} are saved and apply to ${existing.count === 1 ? \"1 user\" : `${existing.count} users`}.`,\n      })\n    } else {\n      setRoles((current) => [\n        ...current,\n        { id: `role-${current.length + 1}`, ...result, count: 0 },\n      ])\n      setNotice({\n        title: \"Role Created\",\n        description: `${result.name} is ready to give to users.`,\n      })\n    }\n    closeDialog()\n  }\n\n  return (\n    <Workspace>\n      <PageBreadcrumbs\n        items={[\n          { label: \"Home\", href: \"#\" },\n          { label: \"Administration\" },\n          { label: \"Roles\" },\n        ]}\n      />\n      <WorkspaceHeader>\n        <WorkspaceHeading>\n          <WorkspaceIcon>\n            <ShieldIcon />\n          </WorkspaceIcon>\n          <WorkspaceTitle>Roles</WorkspaceTitle>\n          <WorkspaceDescription>\n            Named sets of rights to give to users.\n          </WorkspaceDescription>\n        </WorkspaceHeading>\n      </WorkspaceHeader>\n      <WorkspaceContent>\n        {/* Measured, because the room for columns depends on a sidebar as well as the window. */}\n        <div className=\"flex flex-col gap-4\" ref={measureContent}>\n          {notice && (\n            <Callout title={notice.title} tone=\"success\">\n              {notice.description}\n            </Callout>\n          )}\n          <ListToolbar>\n            <ListToolbarSearch>\n              <SearchInput\n                label=\"Search by name or description\"\n                onValueChange={(search) => update({ search })}\n                value={query.search}\n              />\n            </ListToolbarSearch>\n            <ListToolbarFilter>\n              <SelectFilter\n                label=\"Role Type\"\n                onValueChange={(type) =>\n                  update({ type: type as RightType | \"\" })\n                }\n                options={ROLE_TYPES.map((item) => ({\n                  value: item.type,\n                  label: item.label,\n                }))}\n                value={query.type}\n              />\n            </ListToolbarFilter>\n            <ListToolbarEnd>\n              <ColumnViewOptions\n                columns={HIDEABLE_COLUMNS}\n                onReset={columnView.onReset}\n                onVisibilityChange={columnView.onVisibilityChange}\n                visibility={columnView.visibility}\n              />\n            </ListToolbarEnd>\n            {canEdit && (\n              <div className=\"w-full @2xl/main:w-auto\">\n                <Button\n                  className=\"w-full\"\n                  onClick={() => {\n                    setNotice(undefined)\n                    setDialog({ kind: \"role\", target: \"new\" })\n                  }}\n                >\n                  <PlusIcon data-icon=\"inline-start\" />\n                  Create Role\n                </Button>\n              </div>\n            )}\n          </ListToolbar>\n\n          <DataTable\n            empty={\n              isFiltered ? (\n                <DataTableEmpty\n                  action={\n                    <Button\n                      onClick={() => update({ search: \"\", type: \"\" })}\n                      variant=\"destructive\"\n                    >\n                      Clear Filters\n                    </Button>\n                  }\n                  description=\"No role matches these filters.\"\n                  icon={<SearchXIcon />}\n                  title=\"No Matching Roles\"\n                />\n              ) : (\n                <DataTableEmpty\n                  description=\"Roles you create appear here.\"\n                  icon={<ShieldIcon />}\n                  title=\"No Roles Yet\"\n                />\n              )\n            }\n            footer={\n              matching.length > 0 && <DataTablePagination table={table} />\n            }\n            table={table}\n          />\n        </div>\n      </WorkspaceContent>\n\n      <RoleFormDialog\n        canEdit={canEdit}\n        holders={editing?.count ?? 0}\n        onClose={closeDialog}\n        onSubmit={(result) => saveRole(result, editing)}\n        rights={MOCK_RIGHTS}\n        role={editing}\n        roles={roles}\n        target={roleTarget}\n      />\n      <RoleRightsDialog onClose={closeDialog} role={rightsRole} />\n    </Workspace>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/roles-page/roles-page.tsx"
    },
    {
      "path": "registry/templates/openlmis/roles-page/page.tsx",
      "content": "import { RolesPage } from \"@/components/openlmis/roles-page/roles-page\"\n\n// A Next.js App Router route; in any other React app, render RolesPage from your own route.\nexport default function Page() {\n  return <RolesPage />\n}",
      "type": "registry:page",
      "target": "app/roles-page/page.tsx"
    }
  ],
  "cssVars": {
    "light": {
      "destructive": "oklch(0.577 0.245 27.325)",
      "destructive-foreground": "oklch(0.985 0 0)",
      "success": "oklch(0.596 0.145 163.225)",
      "success-foreground": "oklch(0.985 0 0)",
      "warning": "oklch(0.666 0.179 58.318)",
      "warning-foreground": "oklch(0.985 0 0)",
      "info": "oklch(0.55 0.13 237)",
      "info-foreground": "oklch(0.985 0 0)"
    },
    "dark": {
      "destructive": "oklch(0.704 0.191 22.216)",
      "destructive-foreground": "oklch(0.21 0.04 25)",
      "success": "oklch(0.696 0.17 162.48)",
      "success-foreground": "oklch(0.21 0.04 163)",
      "warning": "oklch(0.769 0.188 70.08)",
      "warning-foreground": "oklch(0.22 0.04 60)",
      "info": "oklch(0.7 0.14 237)",
      "info-foreground": "oklch(0.2 0.04 240)"
    }
  },
  "meta": {
    "project": "openlmis",
    "height": "783px"
  },
  "docs": "Requires a `base-*` style in components.json (the `shadcn init` default). Legacy `new-york`/`radix-*` styles install Radix primitives, which reject the `render` prop this item uses.",
  "categories": [
    "administration"
  ],
  "type": "registry:page"
}
