One glyph per family, drawn on one grid, for family types and the glyph option.
registry/patterns/file-type-family-glyphs/file-type-family-glyphs.tsx
/**
* Family glyphs - adapted for tealmac UI from the ReUI example "c-file-type-4"
* (https://github.com/keenthemes/reui), MIT License, Copyright (c) 2025
* Keenthemes Inc. The full licence text is in THIRD_PARTY_NOTICES.md.
* Changes: tealmac UI import paths and theme tokens, lucide icons, logical
* (RTL-safe) spacing and alignment, reduced-motion support and sample
* content.
*/
import { FILE_TYPE_CATEGORIES, FileType } from "@/components/reui/file-type"
// The blank page goes last: it stands for a file with no type, so it closes
// the set instead of sitting between two families.
const families = [
...FILE_TYPE_CATEGORIES.filter((family) => family !== "empty"),
"empty",
] as const
export function FileTypeFamilyGlyphs() {
// Cells fit "Presentation" in a monospace font. The width cap holds a row
// to 5, so with room the 13 families wrap as 5, 5 and a centered 3.
return (
<ul className="mx-auto flex max-w-lg flex-wrap justify-center gap-x-1 gap-y-5">
{families.map((family) => (
<li key={family} className="flex w-22 flex-col items-center gap-2">
{/* The caption names the family, so the icon would read twice. */}
<FileType type={family} aria-hidden="true" />
<span className="text-muted-foreground text-xs capitalize">
{family}
</span>
</li>
))}
</ul>
)
}
