{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "openlmis-list-page",
  "title": "List Page",
  "description": "Complete users list screen on mock data: breadcrumbs and heading, a toolbar with search, a status filter, a View menu and Add User, a table with sorting, paging, empty and no-matches states, and row actions that open Edit User and Reset Password, with Add User going on to Set Password.",
  "dependencies": [
    "@tanstack/react-form@^1",
    "@tanstack/react-table@^9",
    "lucide-react@^1",
    "zod@^4",
    "@base-ui/react@^1"
  ],
  "registryDependencies": [
    "badge",
    "button",
    "dropdown-menu",
    "field",
    "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-password-requirements.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-status-badge.json",
    "https://registry.soldevelo.com/r/openlmis-workspace.json"
  ],
  "files": [
    {
      "path": "registry/templates/openlmis/list-page/components/list-page.tsx",
      "content": "\"use client\"\n\nimport {\n  type ColumnVisibilityState,\n  functionalUpdate,\n  useTable,\n} from \"@tanstack/react-table\"\nimport { PlusIcon, SearchXIcon, UsersIcon } from \"lucide-react\"\nimport { useCallback, useMemo, useState } from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { PageBreadcrumbs } from \"@/components/openlmis/page-breadcrumbs\"\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 {\n  Workspace,\n  WorkspaceContent,\n  WorkspaceDescription,\n  WorkspaceHeader,\n  WorkspaceHeading,\n  WorkspaceIcon,\n  WorkspaceTitle,\n} from \"@/components/blocks/openlmis/workspace\"\nimport { ColumnViewOptions } from \"@/components/openlmis/column-view-options\"\nimport { SearchInput } from \"@/components/openlmis/search-input/search-input\"\nimport { SelectFilter } from \"@/components/openlmis/select-filter\"\nimport {\n  type PasswordDialogTarget,\n  ResetPasswordDialog,\n} from \"@/components/openlmis/list-page/reset-password-dialog\"\nimport {\n  UserFormDialog,\n  type UserFormDialogTarget,\n} from \"@/components/openlmis/list-page/user-form-dialog\"\n\nimport { MOCK_FACILITIES, type User, type UsersQuery } from \"@/components/openlmis/list-page/mock-users\"\nimport { createUserColumns, HIDEABLE_COLUMNS } from \"@/components/openlmis/list-page/user-columns\"\nimport { useUserList } from \"@/components/openlmis/list-page/use-user-list\"\n\nconst getRowId = (user: User) => user.id\n\n// One dialog at a time: adding a user hands over to Set Password rather than stacking a second dialog.\ntype OpenDialog =\n  | { kind: \"user\"; target: UserFormDialogTarget }\n  | { kind: \"password\"; target: PasswordDialogTarget }\n\n/** The whole users list screen; mount it from any route, e.g. the `page.tsx` this template ships. */\nexport function ListPage() {\n  const list = useUserList()\n  const { query, update, page } = list\n  const [dialog, setDialog] = useState<OpenDialog>()\n  const [saveError, setSaveError] = useState<string>()\n  const closeDialog = () => {\n    setDialog(undefined)\n    setSaveError(undefined)\n  }\n  const userTarget = dialog?.kind === \"user\" ? dialog.target : undefined\n  const passwordTarget = dialog?.kind === \"password\" ? dialog.target : undefined\n  const findUser = (userId: string | undefined) =>\n    list.users.find((user) => user.id === userId)\n  // Stable, so the columns built from them keep their identity between renders.\n  const onEdit = useCallback(\n    (userId: string) => setDialog({ kind: \"user\", target: userId }),\n    []\n  )\n  const onResetPassword = useCallback(\n    (userId: string) =>\n      setDialog({ kind: \"password\", target: { userId, created: false } }),\n    []\n  )\n  const columns = useMemo(\n    () => createUserColumns({ onEdit, onResetPassword }),\n    [onEdit, onResetPassword]\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  const pagination = { pageIndex: query.pageIndex, pageSize: query.pageSize }\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: page.rows,\n    getRowId,\n    rowCount: page.total,\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 UsersQuery[\"sortBy\"], sortDesc: next.desc })\n    },\n  })\n\n  return (\n    <Workspace>\n      <PageBreadcrumbs\n        items={[\n          { label: \"Home\", href: \"#\" },\n          { label: \"Administration\" },\n          { label: \"Users\" },\n        ]}\n      />\n      <WorkspaceHeader>\n        <WorkspaceHeading>\n          <WorkspaceIcon>\n            <UsersIcon />\n          </WorkspaceIcon>\n          <WorkspaceTitle>Users</WorkspaceTitle>\n          <WorkspaceDescription>\n            Accounts that can sign in to OpenLMIS.\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          <ListToolbar>\n            <ListToolbarSearch>\n              <SearchInput\n                label=\"Search by username, name or email\"\n                onValueChange={(search) => update({ search })}\n                value={query.search}\n              />\n            </ListToolbarSearch>\n            <ListToolbarFilter>\n              <SelectFilter\n                label=\"Status\"\n                onValueChange={(status) =>\n                  update({ status: status as UsersQuery[\"status\"] })\n                }\n                options={[\n                  { value: \"active\", label: \"Active\" },\n                  { value: \"inactive\", label: \"Inactive\" },\n                ]}\n                value={query.status}\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              <Button\n                onClick={() => setDialog({ kind: \"user\", target: \"new\" })}\n              >\n                <PlusIcon data-icon=\"inline-start\" />\n                Add User\n              </Button>\n            </ListToolbarEnd>\n          </ListToolbar>\n\n          <DataTable\n            empty={\n              list.isFiltered ? (\n                <DataTableEmpty\n                  action={\n                    <Button onClick={list.clearFilters} variant=\"destructive\">\n                      Clear Filters\n                    </Button>\n                  }\n                  description=\"Try a different search or clear the filters.\"\n                  icon={<SearchXIcon />}\n                  title=\"No Matching Users\"\n                />\n              ) : (\n                <DataTableEmpty\n                  description=\"Users added to OpenLMIS appear here.\"\n                  icon={<UsersIcon />}\n                  title=\"No Users Yet\"\n                />\n              )\n            }\n            footer={page.total > 0 && <DataTablePagination table={table} />}\n            table={table}\n          />\n        </div>\n      </WorkspaceContent>\n\n      <UserFormDialog\n        error={saveError}\n        facilities={MOCK_FACILITIES}\n        onClose={closeDialog}\n        onSubmit={(values, existing) => {\n          const result = list.saveUser(values, existing)\n          if (\"error\" in result) return setSaveError(result.error)\n          setSaveError(undefined)\n          // A new user has no password yet, so setting one comes next.\n          setDialog(\n            existing\n              ? undefined\n              : {\n                  kind: \"password\",\n                  target: { userId: result.id, created: true },\n                }\n          )\n        }}\n        target={userTarget}\n        user={userTarget === \"new\" ? undefined : findUser(userTarget)}\n      />\n      <ResetPasswordDialog\n        onClose={closeDialog}\n        // Wire this to your own call that emails a reset link or sets the password.\n        onSubmit={closeDialog}\n        target={passwordTarget}\n        user={findUser(passwordTarget?.userId)}\n      />\n    </Workspace>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/list-page/list-page.tsx"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/mock-users.ts",
      "content": "// Mock users and the rules the list applies to them, so the page runs with no backend.\n\nimport type {\n  Facility,\n  UserDetails,\n  UserFormValues,\n} from \"@/components/openlmis/list-page/user-form\"\n\nexport type User = {\n  id: string\n  username: string\n  firstName: string\n  lastName: string\n  email: string | null\n  active: boolean\n}\n\nexport type UsersQuery = {\n  pageIndex: number\n  pageSize: number\n  sortBy: \"username\" | \"lastName\" | \"active\"\n  sortDesc: boolean\n  /** Matches username, first or last name, or email. */\n  search: string\n  status: \"\" | \"active\" | \"inactive\"\n}\n\nexport type UsersPage = {\n  rows: User[]\n  total: number\n}\n\nconst FIRST_NAMES = [\n  \"Adora\",\n  \"Alan\",\n  \"Chimango\",\n  \"Grace\",\n  \"Ibrahim\",\n  \"Lindiwe\",\n  \"Mateus\",\n  \"Nia\",\n  \"Omar\",\n  \"Priya\",\n  \"Tendai\",\n  \"Zara\",\n]\nconst LAST_NAMES = [\n  \"Adamovich\",\n  \"Banda\",\n  \"Costa\",\n  \"Diallo\",\n  \"Ehrenfreund\",\n  \"Hopper\",\n  \"Kamau\",\n  \"Mwale\",\n  \"Okafor\",\n  \"Silva\",\n  \"Tebulo\",\n  \"Zulu\",\n]\n\nexport const MOCK_FACILITIES: Facility[] = [\n  { id: \"facility-1\", code: \"HC01\", name: \"Balaka District Hospital\" },\n  { id: \"facility-2\", code: \"HC02\", name: \"Comfort Health Clinic\" },\n  { id: \"facility-3\", code: \"HC03\", name: \"Kankao Health Facility\" },\n  { id: \"facility-4\", code: \"HC04\", name: \"Nandumbo Health Center\" },\n  { id: \"facility-5\", code: \"W001\", name: \"Ntcheu District Warehouse\" },\n]\n\nexport const MOCK_USERS: UserDetails[] = Array.from(\n  { length: 57 },\n  (_, index) => {\n    const firstName = FIRST_NAMES[index % FIRST_NAMES.length] as string\n    // Offset each round of first names, so no two users share a full name.\n    const lastName = LAST_NAMES[\n      (index + Math.floor(index / FIRST_NAMES.length)) % LAST_NAMES.length\n    ] as string\n    const username = `${firstName[0]}${lastName}${index + 1}`.toLowerCase()\n    const email = index % 3 === 0 ? null : `${username}@example.org`\n    // Only an address can be verified, and notifications need a verified one.\n    const verified = email !== null && index % 2 === 0\n    return {\n      id: `user-${index + 1}`,\n      username,\n      firstName,\n      lastName,\n      email,\n      emailVerified: verified,\n      jobTitle: null,\n      phoneNumber: null,\n      active: index % 4 !== 0,\n      homeFacilityId:\n        MOCK_FACILITIES[index % MOCK_FACILITIES.length]?.id ?? null,\n      allowNotify: verified,\n      homeFacilityRoleCount: index % 3,\n    }\n  }\n)\n\nconst toRow = ({ id, username, firstName, lastName, email, active }: User) => ({\n  id,\n  username,\n  firstName,\n  lastName,\n  email,\n  active,\n})\n\n/** One page of `users` for the list's search, filter, sort and paging. */\nexport function queryUsers(\n  users: readonly UserDetails[],\n  query: UsersQuery\n): UsersPage {\n  const term = query.search.trim().toLowerCase()\n  const matches = users.filter((user) => {\n    const text = `${user.username} ${user.firstName} ${user.lastName} ${user.email ?? \"\"}`\n    const status =\n      query.status === \"\" || user.active === (query.status === \"active\")\n    return status && text.toLowerCase().includes(term)\n  })\n\n  // oxlint-disable-next-line unicorn/no-array-sort -- sorts a copy; toSorted needs the ES2023 lib\n  const sorted = [...matches].sort((a, b) => {\n    const order = String(a[query.sortBy]).localeCompare(String(b[query.sortBy]))\n    return query.sortDesc ? -order : order\n  })\n\n  const start = query.pageIndex * query.pageSize\n  return {\n    rows: sorted.slice(start, start + query.pageSize).map(toRow),\n    total: matches.length,\n  }\n}\n\n/** The user the form describes, created or updated from `existing`. */\nexport function toSavedUser(\n  values: UserFormValues,\n  id: string,\n  existing?: UserDetails\n): UserDetails {\n  return {\n    id,\n    username: values.username,\n    firstName: values.firstName,\n    lastName: values.lastName,\n    email: values.email || null,\n    // A changed address has to be verified again.\n    emailVerified:\n      existing !== undefined &&\n      existing.emailVerified &&\n      existing.email === (values.email || null),\n    jobTitle: values.jobTitle || null,\n    phoneNumber: values.phoneNumber || null,\n    active: values.active,\n    homeFacilityId: values.homeFacilityId,\n    allowNotify: values.allowNotify,\n    homeFacilityRoleCount: values.removeHomeFacilityRoles\n      ? 0\n      : (existing?.homeFacilityRoleCount ?? 0),\n  }\n}",
      "type": "registry:lib",
      "target": "components/openlmis/list-page/mock-users.ts"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/reset-password-dialog/password-form.ts",
      "content": "import { z } from \"zod\"\n\nimport {\n  type PasswordOwner,\n  passwordIssue,\n} from \"@/components/openlmis/password-requirements/password-rules\"\n\nexport type PasswordMethod = \"email\" | \"manual\"\n\n/** With an owner, a typed password may not contain their username or names. */\nexport function passwordFormSchemaFor(owner?: PasswordOwner) {\n  return z\n    .object({\n      method: z.enum([\"email\", \"manual\"]),\n      password: z.string(),\n    })\n    .superRefine(({ method, password }, context) => {\n      const message =\n        method === \"manual\" ? passwordIssue(password, owner) : undefined\n      if (message)\n        context.addIssue({ code: \"custom\", path: [\"password\"], message })\n    })\n}\n\n/** The rules without an owner, for a password whose user is not known. */\nexport const passwordFormSchema = passwordFormSchemaFor()\n\nexport type PasswordFormValues = z.input<typeof passwordFormSchema>\n\n/** The address to send a reset link to; empty text counts as none, so it never hides the password field. */\nexport function resetEmail(email: string | null | undefined): string | null {\n  return email?.trim() || null\n}\n\n/** An emailed link when the user has an address, as the legacy UI does, otherwise a typed password. */\nexport function defaultPasswordForm(email: string | null): PasswordFormValues {\n  return { method: email ? \"email\" : \"manual\", password: \"\" }\n}",
      "type": "registry:lib",
      "target": "components/openlmis/list-page/password-form.ts"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/reset-password-dialog/reset-password-dialog.tsx",
      "content": "\"use client\"\n\nimport { revalidateLogic } from \"@tanstack/react-form\"\nimport { type ReactNode, useId, useMemo } from \"react\"\n\nimport { FieldGroup, FieldLegend, FieldSet } from \"@/components/ui/field\"\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  ChoiceCardSkeleton,\n  SkeletonLine,\n} from \"@/components/openlmis/form-fields/form-fields\"\nimport { PasswordRequirements } from \"@/components/openlmis/password-requirements/password-requirements\"\n\nimport {\n  defaultPasswordForm,\n  passwordFormSchemaFor,\n  resetEmail,\n} from \"@/components/openlmis/list-page/password-form\"\n\n/** The user whose password is set, and whether they were just created and have none yet. */\nexport type PasswordDialogTarget = {\n  userId: string\n  created: boolean\n}\n\nexport type PasswordUser = {\n  id: string\n  username: string\n  email: string | null\n  /** With the names, a typed password may not contain them either. */\n  firstName?: string | null\n  lastName?: string | null\n}\n\n/** What the user chose: email a reset link, or set this password now. */\nexport type PasswordChange =\n  | { method: \"email\"; email: string }\n  | { method: \"manual\"; password: string }\n\ntype ResetPasswordDialogProps = {\n  /** Opens the dialog while set; keep the object's identity while it stays open. */\n  target: PasswordDialogTarget | undefined\n  /** The target's user; the form shows a skeleton until it is set. */\n  user?: PasswordUser | undefined\n  /** Called with the choice; carry it out, then clear `target` to close. */\n  onSubmit: (change: PasswordChange, user: PasswordUser) => void\n  /** Keeps the dialog open and shows a spinner while the change is sent. */\n  pending?: boolean\n  /** Shown above the choice, e.g. why the change failed. */\n  error?: ReactNode\n  onClose: () => void\n}\n\nexport function ResetPasswordDialog({\n  target,\n  user,\n  onSubmit,\n  pending = false,\n  error,\n  onClose,\n}: ResetPasswordDialogProps) {\n  const { shown, dialogProps } = useDialogTarget(target, onClose)\n  const title = shown?.created ? \"Set Password\" : \"Reset Password\"\n\n  return (\n    <FormDialog {...dialogProps(pending)}>\n      {shown &&\n        (user?.id === shown.userId ? (\n          <PasswordForm\n            error={error}\n            key={user.id}\n            onSubmit={onSubmit}\n            pending={pending}\n            target={shown}\n            title={title}\n            user={user}\n          />\n        ) : (\n          <PasswordFormSkeleton title={title} />\n        ))}\n    </FormDialog>\n  )\n}\n\nfunction PasswordForm({\n  target,\n  title,\n  user,\n  onSubmit,\n  pending,\n  error,\n}: Pick<ResetPasswordDialogProps, \"onSubmit\" | \"error\"> & {\n  target: PasswordDialogTarget\n  title: string\n  user: PasswordUser\n  pending: boolean\n}) {\n  const { username } = user\n  const email = resetEmail(user.email)\n  const requirementsId = useId()\n  const schema = useMemo(() => passwordFormSchemaFor(user), [user])\n\n  const form = useAppForm({\n    defaultValues: defaultPasswordForm(email),\n    validationLogic: revalidateLogic({\n      mode: \"submit\",\n      modeAfterSubmission: \"change\",\n    }),\n    validators: { onDynamic: schema },\n    onSubmit: ({ value }) =>\n      onSubmit(\n        value.method === \"email\" && email\n          ? { method: \"email\", email }\n          : { method: \"manual\", password: value.password },\n        user\n      ),\n  })\n\n  const description = target.created\n    ? email\n      ? `${username} has no password yet. Email a link or set one now so they can sign in.`\n      : `${username} has no password yet. Set one so they can sign in.`\n    : email\n      ? `Choose how ${username} gets a new password.`\n      : `Set a new password for ${username}.`\n\n  return (\n    <FormDialogForm onSubmit={() => void form.handleSubmit()}>\n      <PasswordDialogHeader title={title}>\n        <FormDialogDescription>{description}</FormDialogDescription>\n      </PasswordDialogHeader>\n      <FormDialogBody>\n        <FieldGroup>\n          {error && (\n            <FormDialogError\n              description={error}\n              title={\n                target.created\n                  ? \"Could Not Set Password\"\n                  : \"Could Not Reset Password\"\n              }\n            />\n          )}\n\n          {email && (\n            <form.AppField name=\"method\">\n              {(field) => (\n                <field.RadioGroupField\n                  label=\"Method\"\n                  options={[\n                    {\n                      value: \"email\",\n                      label: \"Send Reset Email\",\n                      description: `Email a link to ${email}, where the user chooses a password.`,\n                    },\n                    {\n                      value: \"manual\",\n                      label: \"Set Password Manually\",\n                      description: \"Type a password to share with the user.\",\n                    },\n                  ]}\n                />\n              )}\n            </form.AppField>\n          )}\n\n          <form.Subscribe selector={(state) => state.values.method}>\n            {(method) =>\n              method === \"manual\" && (\n                <form.AppField name=\"password\">\n                  {(field) => (\n                    <div className=\"grid gap-3\">\n                      <field.PasswordField\n                        describedBy={requirementsId}\n                        hideLabel=\"Hide Password\"\n                        label=\"New Password\"\n                        required\n                        showLabel=\"Show Password\"\n                      />\n                      <PasswordRequirements\n                        id={requirementsId}\n                        owner={user}\n                        password={field.state.value}\n                      />\n                    </div>\n                  )}\n                </form.AppField>\n              )\n            }\n          </form.Subscribe>\n        </FieldGroup>\n      </FormDialogBody>\n      <FormDialogFooter>\n        <FormDialogCancel disabled={pending} />\n        <form.Subscribe selector={(state) => state.values.method}>\n          {(method) => (\n            <FormDialogSubmit pending={pending}>\n              {method === \"email\" ? \"Send Email\" : \"Set Password\"}\n            </FormDialogSubmit>\n          )}\n        </form.Subscribe>\n      </FormDialogFooter>\n    </FormDialogForm>\n  )\n}\n\nfunction PasswordDialogHeader({\n  title,\n  children,\n}: {\n  title: string\n  children: ReactNode\n}) {\n  return (\n    <FormDialogHeader>\n      <FormDialogTitle>{title}</FormDialogTitle>\n      {children}\n    </FormDialogHeader>\n  )\n}\n\n/** Laid out like the usual case, a user with an email choosing between the two methods. */\nfunction PasswordFormSkeleton({ title }: { title: string }) {\n  return (\n    <>\n      <PasswordDialogHeader title={title}>\n        <SkeletonLine width=\"short\" />\n      </PasswordDialogHeader>\n      <FormDialogBody>\n        <div aria-busy>\n          <FieldGroup>\n            <FieldSet>\n              <FieldLegend variant=\"label\">Method</FieldLegend>\n              <ChoiceCardSkeleton control=\"radio\" label=\"Send Reset Email\" />\n              <ChoiceCardSkeleton\n                control=\"radio\"\n                label=\"Set Password Manually\"\n              />\n            </FieldSet>\n          </FieldGroup>\n        </div>\n      </FormDialogBody>\n      <FormDialogFooter>\n        <FormDialogCancel />\n        <FormDialogSubmit disabled>Send Email</FormDialogSubmit>\n      </FormDialogFooter>\n    </>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/list-page/reset-password-dialog.tsx"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/use-user-list.ts",
      "content": "\"use client\"\n\nimport { useMemo, useState } from \"react\"\n\nimport type { UserDetails, UserFormValues } from \"@/components/openlmis/list-page/user-form\"\n\nimport {\n  MOCK_USERS,\n  queryUsers,\n  toSavedUser,\n  type UsersQuery,\n} from \"@/components/openlmis/list-page/mock-users\"\n\nconst INITIAL_QUERY: UsersQuery = {\n  pageIndex: 0,\n  pageSize: 10,\n  sortBy: \"username\",\n  sortDesc: false,\n  search: \"\",\n  status: \"\",\n}\n\n/** The list's users and state in plain React; swap `users` for your own data and `saveUser` for your save. */\nexport function useUserList() {\n  const [users, setUsers] = useState(MOCK_USERS)\n  const [query, setQuery] = useState(INITIAL_QUERY)\n  const page = useMemo(() => queryUsers(users, query), [users, query])\n\n  /** A filter or sort starts again from the first page; paging keeps the rest. */\n  const update = (patch: Partial<UsersQuery>) =>\n    setQuery((previous) => ({\n      ...previous,\n      ...patch,\n      pageIndex: \"pageIndex\" in patch ? (patch.pageIndex ?? 0) : 0,\n    }))\n\n  /** Creates the user, or updates `existing`; returns its id, or why it could not be saved. */\n  const saveUser = (\n    values: UserFormValues,\n    existing?: UserDetails\n  ): { id: string } | { error: string } => {\n    const taken = users.some(\n      (user) => user.username === values.username && user.id !== existing?.id\n    )\n    if (taken) return { error: `Username ${values.username} is already taken.` }\n\n    const id = existing?.id ?? `user-${users.length + 1}`\n    const saved = toSavedUser(values, id, existing)\n    setUsers((current) =>\n      existing\n        ? current.map((user) => (user.id === id ? saved : user))\n        : [...current, saved]\n    )\n    return { id }\n  }\n\n  return {\n    query,\n    update,\n    page,\n    users,\n    saveUser,\n    /** Whether the rows come from a search or filter, which picks the empty state. */\n    isFiltered: Boolean(query.search || query.status),\n    clearFilters: () => update({ search: \"\", status: \"\" }),\n  }\n}",
      "type": "registry:hook",
      "target": "components/openlmis/list-page/use-user-list.ts"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/user-columns.tsx",
      "content": "\"use client\"\n\nimport { createColumnHelper } from \"@tanstack/react-table\"\nimport {\n  EllipsisIcon,\n  KeyRoundIcon,\n  PencilIcon,\n  ShieldIcon,\n} 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 { StatusBadge } from \"@/components/openlmis/status-badge\"\n\nimport type { User } from \"@/components/openlmis/list-page/mock-users\"\n\n/** The columns the View menu lists, in order; `hideBelow` drops them while the table is narrow. */\nexport const HIDEABLE_COLUMNS: (ResponsiveColumn & { label: string })[] = [\n  { id: \"lastName\", label: \"Name\", hideBelow: \"xl\" },\n  { id: \"email\", label: \"Email\", hideBelow: \"4xl\" },\n  { id: \"active\", label: \"Status\" },\n]\n\nconst columnHelper = createColumnHelper<DataTableFeatures, User>()\n\n/** What the row menu does; Roles is left for you to wire to a screen of your own. */\nexport type UserRowActions = {\n  onEdit: (userId: string) => void\n  onResetPassword: (userId: string) => void\n}\n\nexport const createUserColumns = (actions: UserRowActions) =>\n  columnHelper.columns([\n    // Shows the full name but sorts by last name, the usual order for a list of people.\n    columnHelper.accessor(\"lastName\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Name\" />\n      ),\n      cell: ({ row }) => `${row.original.firstName} ${row.original.lastName}`,\n      meta: { className: \"@xl/table:w-2/5 @4xl/table:w-1/5\" },\n    }),\n    columnHelper.accessor(\"username\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Username\" />\n      ),\n      cell: ({ getValue }) => <span className=\"font-medium\">{getValue()}</span>,\n      // No width below 4xl, so the username takes the room the hidden columns leave.\n      meta: { className: \"@4xl/table:w-1/6\" },\n    }),\n    columnHelper.accessor(\"email\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Email\" />\n      ),\n      cell: ({ getValue }) =>\n        getValue() ?? <span className=\"text-muted-foreground\">-</span>,\n      enableSorting: false,\n    }),\n    columnHelper.accessor(\"active\", {\n      header: ({ column }) => (\n        <DataTableColumnHeader column={column} title=\"Status\" />\n      ),\n      cell: ({ getValue }) =>\n        getValue() ? (\n          <StatusBadge tone=\"success\">Active</StatusBadge>\n        ) : (\n          <StatusBadge tone=\"destructive\">Inactive</StatusBadge>\n        ),\n      meta: { className: \"w-32\" },\n    }),\n    columnHelper.display({\n      id: \"actions\",\n      header: () => <span className=\"sr-only\">Actions</span>,\n      cell: ({ row }) => (\n        <UserActions\n          onEdit={() => actions.onEdit(row.original.id)}\n          onResetPassword={() => actions.onResetPassword(row.original.id)}\n          username={row.original.username}\n        />\n      ),\n      meta: { className: \"w-16\" },\n    }),\n  ])\n\nfunction UserActions({\n  username,\n  onEdit,\n  onResetPassword,\n}: { username: string } & Record<\"onEdit\" | \"onResetPassword\", () => void>) {\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 ${username}`}\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          <DropdownMenuItem onClick={menu.opensDialog(onEdit)}>\n            <PencilIcon />\n            Edit\n          </DropdownMenuItem>\n          <DropdownMenuItem>\n            <ShieldIcon />\n            Roles\n          </DropdownMenuItem>\n          <DropdownMenuItem\n            onClick={menu.opensDialog(onResetPassword)}\n            variant=\"destructive\"\n          >\n            <KeyRoundIcon />\n            Reset Password\n          </DropdownMenuItem>\n        </DropdownMenuContent>\n      </DropdownMenu>\n    </div>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/list-page/user-columns.tsx"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/user-form-dialog/user-form-dialog.tsx",
      "content": "\"use client\"\n\nimport { revalidateLogic } from \"@tanstack/react-form\"\nimport { type ReactNode, useMemo } from \"react\"\n\nimport { Badge } from \"@/components/ui/badge\"\nimport { FieldGroup } from \"@/components/ui/field\"\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  SwitchField,\n  ChoiceCardSkeleton,\n  ComboboxField,\n  FieldSkeleton,\n  SkeletonLine,\n} from \"@/components/openlmis/form-fields/form-fields\"\nimport { Callout } from \"@/components/openlmis/callout\"\nimport { StatusBadge } from \"@/components/openlmis/status-badge\"\n\nimport {\n  canNotify,\n  EMPTY_USER_FORM,\n  type Facility,\n  statusMismatch,\n  toSavedValues,\n  toUserFormValues,\n  type UserDetails,\n  type UserFormValues,\n  userFormSchema,\n} from \"@/components/openlmis/list-page/user-form\"\n\n/** `\"new\"` adds a user; an id edits that user. */\nexport type UserFormDialogTarget = \"new\" | (string & {})\n\ntype UserFormDialogProps = {\n  /** Opens the dialog while set. */\n  target: UserFormDialogTarget | undefined\n  /** The user being edited; the form shows a skeleton until it is set. */\n  user?: UserDetails | undefined\n  /** The home facility choices; the field shows a skeleton until they are set. */\n  facilities: readonly Facility[] | undefined\n  /** Called with trimmed values; save them, then clear `target` to close. */\n  onSubmit: (values: UserFormValues, existing?: UserDetails) => void\n  /** Keeps the dialog open and shows a spinner while the save runs. */\n  pending?: boolean\n  /** Shown above the fields, e.g. why the save failed; what was typed stays. */\n  error?: ReactNode\n  onClose: () => void\n}\n\nexport function UserFormDialog({\n  target,\n  user,\n  facilities,\n  onSubmit,\n  pending = false,\n  error,\n  onClose,\n}: UserFormDialogProps) {\n  const { shown, dialogProps } = useDialogTarget(target, onClose)\n  const form = { facilities, onSubmit, pending, error }\n\n  return (\n    <FormDialog {...dialogProps(pending)}>\n      {shown === \"new\" && <UserForm {...form} />}\n      {shown !== undefined &&\n        shown !== \"new\" &&\n        (user?.id === shown ? (\n          // Keyed, so another user's values never carry over.\n          <UserForm {...form} details={user} key={user.id} />\n        ) : (\n          <UserFormSkeleton />\n        ))}\n    </FormDialog>\n  )\n}\n\ntype UserFormProps = Pick<\n  UserFormDialogProps,\n  \"facilities\" | \"onSubmit\" | \"error\"\n> & {\n  pending: boolean\n  details?: UserDetails\n}\n\nfunction UserForm({\n  details,\n  facilities,\n  onSubmit,\n  pending,\n  error,\n}: UserFormProps) {\n  const isEdit = details !== undefined\n\n  const form = useAppForm({\n    defaultValues: details ? toUserFormValues(details) : EMPTY_USER_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: userFormSchema },\n    onSubmit: ({ value }) => onSubmit(toSavedValues(value, details), details),\n  })\n\n  const savedEmail = details?.email ?? \"\"\n  const homeFacilityRoles = details?.homeFacilityRoleCount ?? 0\n  const savedFacilityId = details?.homeFacilityId ?? null\n  const mismatch = details && statusMismatch(details)\n\n  return (\n    <FormDialogForm onSubmit={() => void form.handleSubmit()}>\n      <FormDialogHeader>\n        <FormDialogTitle>{isEdit ? \"Edit User\" : \"Add User\"}</FormDialogTitle>\n        <FormDialogDescription>\n          {isEdit\n            ? `Details for ${details.username}.`\n            : \"Create an account that can sign in to OpenLMIS.\"}\n        </FormDialogDescription>\n      </FormDialogHeader>\n      <FormDialogBody>\n        <FieldGroup>\n          {error && (\n            <FormDialogError description={error} title=\"Could Not Save User\" />\n          )}\n\n          <form.AppField name=\"username\">\n            {(field) => (\n              <field.TextField\n                autoComplete=\"off\"\n                dir=\"ltr\"\n                label=\"Username\"\n                required\n              />\n            )}\n          </form.AppField>\n\n          <FieldRow>\n            <form.AppField name=\"firstName\">\n              {(field) => (\n                <field.TextField\n                  autoComplete=\"off\"\n                  label=\"First Name\"\n                  required\n                />\n              )}\n            </form.AppField>\n            <form.AppField name=\"lastName\">\n              {(field) => (\n                <field.TextField\n                  autoComplete=\"off\"\n                  label=\"Last Name\"\n                  required\n                />\n              )}\n            </form.AppField>\n          </FieldRow>\n\n          <form.AppField\n            listeners={{\n              // Notifications go to the verified address, so a new one switches them off.\n              onChange: ({ value }) => {\n                if (isEdit && value.trim() !== savedEmail)\n                  form.setFieldValue(\"allowNotify\", false)\n              },\n            }}\n            name=\"email\"\n          >\n            {(field) => (\n              <field.TextField\n                autoComplete=\"off\"\n                description={\n                  isEdit &&\n                  savedEmail &&\n                  field.state.value.trim() === savedEmail && (\n                    <EmailStatus verified={details.emailVerified} />\n                  )\n                }\n                dir=\"ltr\"\n                label=\"Email\"\n                type=\"email\"\n              />\n            )}\n          </form.AppField>\n\n          <FieldRow>\n            <form.AppField name=\"jobTitle\">\n              {(field) => (\n                <field.TextField autoComplete=\"off\" label=\"Job Title\" />\n              )}\n            </form.AppField>\n            <form.AppField name=\"phoneNumber\">\n              {(field) => (\n                <field.TextField\n                  autoComplete=\"off\"\n                  dir=\"ltr\"\n                  label=\"Phone Number\"\n                  type=\"tel\"\n                />\n              )}\n            </form.AppField>\n          </FieldRow>\n\n          <form.AppField name=\"homeFacilityId\">\n            {() => <HomeFacilityField facilities={facilities} />}\n          </form.AppField>\n\n          {homeFacilityRoles > 0 && (\n            <form.Subscribe selector={(state) => state.values.homeFacilityId}>\n              {(homeFacilityId) =>\n                homeFacilityId !== savedFacilityId && (\n                  <form.AppField name=\"removeHomeFacilityRoles\">\n                    {() => (\n                      <SwitchField\n                        description={`${homeFacilityRoles === 1 ? \"1 role applies\" : `${homeFacilityRoles} roles apply`} only at the current home facility.`}\n                        label=\"Remove Home Facility Roles\"\n                      />\n                    )}\n                  </form.AppField>\n                )\n              }\n            </form.Subscribe>\n          )}\n\n          {mismatch && (\n            <Callout title=\"Status Does Not Match\" tone=\"warning\">\n              {mismatch === \"listed-inactive\"\n                ? `The Users list shows ${details.username} as inactive, but they can still sign in. Saving applies the Active switch below to both.`\n                : `The Users list shows ${details.username} as active, but they cannot sign in. Saving applies the Active switch below to both.`}\n            </Callout>\n          )}\n\n          <form.AppField name=\"active\">\n            {(field) => (\n              <field.SwitchField\n                description=\"Inactive users cannot sign in.\"\n                label=\"Active\"\n              />\n            )}\n          </form.AppField>\n\n          {isEdit && (\n            <form.Subscribe\n              selector={(state) =>\n                canNotify(\n                  state.values.email,\n                  details.email,\n                  details.emailVerified\n                )\n              }\n            >\n              {(verified) => (\n                <form.AppField name=\"allowNotify\">\n                  {(field) => (\n                    <field.SwitchField\n                      description={\n                        verified\n                          ? \"Send every notification this user's roles allow.\"\n                          : \"Available once the email address is verified.\"\n                      }\n                      disabled={!verified}\n                      label=\"Allow Notifications\"\n                    />\n                  )}\n                </form.AppField>\n              )}\n            </form.Subscribe>\n          )}\n        </FieldGroup>\n      </FormDialogBody>\n      <FormDialogFooter>\n        <FormDialogCancel disabled={pending} />\n        <FormDialogSubmit pending={pending}>\n          {isEdit ? \"Save Changes\" : \"Create User\"}\n        </FormDialogSubmit>\n      </FormDialogFooter>\n    </FormDialogForm>\n  )\n}\n\nfunction FieldRow({ children }: { children: ReactNode }) {\n  return <div className=\"grid gap-5 sm:grid-cols-2\">{children}</div>\n}\n\nfunction EmailStatus({ verified }: { verified: boolean }) {\n  return verified ? (\n    <StatusBadge tone=\"success\">Verified</StatusBadge>\n  ) : (\n    <Badge variant=\"secondary\">Not Verified</Badge>\n  )\n}\n\n/** Reads its field from the surrounding `AppField`. */\nfunction HomeFacilityField({\n  facilities,\n}: Pick<UserFormDialogProps, \"facilities\">) {\n  const items = useMemo(\n    () =>\n      (facilities ?? []).map((facility) => ({\n        value: facility.id,\n        label: `${facility.code} - ${facility.name}`,\n      })),\n    [facilities]\n  )\n\n  if (!facilities) return <FieldSkeleton label=\"Home Facility\" />\n  return (\n    <ComboboxField\n      clearLabel=\"Clear Home Facility\"\n      emptyMessage=\"No facilities found.\"\n      items={items}\n      label=\"Home Facility\"\n      placeholder=\"Search Facilities...\"\n    />\n  )\n}\n\n/** The edit form as it will look, laid out the same, so nothing moves when the user arrives. */\nfunction UserFormSkeleton() {\n  return (\n    <>\n      <FormDialogHeader>\n        <FormDialogTitle>Edit User</FormDialogTitle>\n        <SkeletonLine width=\"short\" />\n      </FormDialogHeader>\n      <FormDialogBody>\n        <div aria-busy>\n          <FieldGroup>\n            <FieldSkeleton label=\"Username\" required />\n            <FieldRow>\n              <FieldSkeleton label=\"First Name\" required />\n              <FieldSkeleton label=\"Last Name\" required />\n            </FieldRow>\n            <FieldSkeleton label=\"Email\" />\n            <FieldRow>\n              <FieldSkeleton label=\"Job Title\" />\n              <FieldSkeleton label=\"Phone Number\" />\n            </FieldRow>\n            <FieldSkeleton label=\"Home Facility\" />\n            <ChoiceCardSkeleton\n              description=\"Inactive users cannot sign in.\"\n              label=\"Active\"\n            />\n            <ChoiceCardSkeleton label=\"Allow Notifications\" />\n          </FieldGroup>\n        </div>\n      </FormDialogBody>\n      <FormDialogFooter>\n        <FormDialogCancel />\n        <FormDialogSubmit disabled>Save Changes</FormDialogSubmit>\n      </FormDialogFooter>\n    </>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/list-page/user-form-dialog.tsx"
    },
    {
      "path": "registry/templates/openlmis/list-page/components/user-form-dialog/user-form.ts",
      "content": "import { z } from \"zod\"\n\n/** What the dialog shows for an existing user; map your API's user onto it. */\nexport type UserDetails = {\n  id: string\n  username: string\n  firstName: string\n  lastName: string\n  email: string | null\n  emailVerified: boolean\n  jobTitle: string | null\n  phoneNumber: string | null\n  /** Whether the Users list shows the user as active; the Active switch saves it. */\n  active: boolean\n  /** Whether the account can sign in, if known; the form warns when it disagrees with `active`. */\n  signInEnabled?: boolean\n  homeFacilityId: string | null\n  allowNotify: boolean\n  /** Roles that only apply at the home facility, so they lose their meaning when it changes. */\n  homeFacilityRoleCount: number\n}\n\nexport type Facility = {\n  id: string\n  code: string\n  name: string\n}\n\nconst requiredText = (message: string) => z.string().trim().min(1, message)\n\nexport const userFormSchema = z.object({\n  username: requiredText(\"Enter a username.\").regex(\n    /^\\w*$/,\n    \"Use Latin letters, numbers and underscores only.\"\n  ),\n  email: z\n    .string()\n    .trim()\n    .refine(\n      (email) => email === \"\" || z.email().safeParse(email).success,\n      \"Enter a valid email address.\"\n    ),\n  firstName: requiredText(\"Enter a first name.\"),\n  lastName: requiredText(\"Enter a last name.\"),\n  jobTitle: z.string(),\n  phoneNumber: z.string(),\n  active: z.boolean(),\n  homeFacilityId: z.string().nullable(),\n  allowNotify: z.boolean(),\n  removeHomeFacilityRoles: z.boolean(),\n})\n\nexport type UserFormValues = z.input<typeof userFormSchema>\n\nexport const EMPTY_USER_FORM: UserFormValues = {\n  username: \"\",\n  email: \"\",\n  firstName: \"\",\n  lastName: \"\",\n  jobTitle: \"\",\n  phoneNumber: \"\",\n  active: true,\n  homeFacilityId: null,\n  allowNotify: false,\n  removeHomeFacilityRoles: false,\n}\n\nexport function toUserFormValues(user: UserDetails): UserFormValues {\n  return {\n    username: user.username,\n    email: user.email ?? \"\",\n    firstName: user.firstName,\n    lastName: user.lastName,\n    jobTitle: user.jobTitle ?? \"\",\n    phoneNumber: user.phoneNumber ?? \"\",\n    active: user.active,\n    homeFacilityId: user.homeFacilityId,\n    allowNotify: user.allowNotify,\n    removeHomeFacilityRoles: false,\n  }\n}\n\n/** The list shows `active`, while sign-in follows the account; undefined when they agree or sign-in is unknown. */\nexport function statusMismatch({\n  active,\n  signInEnabled,\n}: Pick<UserDetails, \"active\" | \"signInEnabled\">):\n  | \"listed-inactive\"\n  | \"listed-active\"\n  | undefined {\n  if (signInEnabled === undefined || signInEnabled === active) return undefined\n  return signInEnabled ? \"listed-inactive\" : \"listed-active\"\n}\n\n/** Notifications need a verified address, and only the saved one can be verified yet. */\nexport function canNotify(\n  email: string,\n  savedEmail: string | null,\n  emailVerified: boolean\n) {\n  return emailVerified && savedEmail !== null && email.trim() === savedEmail\n}\n\n/** The values to save: trimmed, notifications only to a verified address, and roles removed only if the facility changed. */\nexport function toSavedValues(\n  values: UserFormValues,\n  existing?: UserDetails\n): UserFormValues {\n  return {\n    ...values,\n    username: values.username.trim(),\n    email: values.email.trim(),\n    firstName: values.firstName.trim(),\n    lastName: values.lastName.trim(),\n    jobTitle: values.jobTitle.trim(),\n    phoneNumber: values.phoneNumber.trim(),\n    allowNotify:\n      values.allowNotify &&\n      existing !== undefined &&\n      canNotify(values.email, existing.email, existing.emailVerified),\n    removeHomeFacilityRoles:\n      values.removeHomeFacilityRoles &&\n      values.homeFacilityId !== (existing?.homeFacilityId ?? null),\n  }\n}",
      "type": "registry:lib",
      "target": "components/openlmis/list-page/user-form.ts"
    },
    {
      "path": "registry/templates/openlmis/list-page/page.tsx",
      "content": "import { ListPage } from \"@/components/openlmis/list-page/list-page\"\n\n// A Next.js App Router route; in any other React app, render ListPage from your own route.\nexport default function Page() {\n  return <ListPage />\n}",
      "type": "registry:page",
      "target": "app/list-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": [
    "data-table",
    "users"
  ],
  "type": "registry:page"
}
