exlab_wizard.ui.components.file_type_icon#

File-type icon component (materials file-type icons design, 2026-05-30).

Mirrors sync_status_icon: one source-of-truth map from file extension -> {Material Design Icons glyph, Okabe-Ito color token, tooltip, category}, plus pure prop functions and a thin NiceGUI render wrapper. The file list, the metadata pane, and any legend all read from this map so the iconography cannot drift.

Colours reference the theme’s categorical --oi-* (Okabe-Ito) tokens, not the semantic --color-* status tokens; the file-type icon lives in the Name column while sync status lives in the Status column, so the hue overlap between the two palettes is disambiguated by position and glyph.

Functions

file_type_icon(name, *[, is_dir])

Build a NiceGUI <q-icon> for name (or return props in tests).

file_type_legend_entries()

Return one props dict per file category (for an optional legend).

file_type_props(name, *, is_dir)

Return {icon_name, color_var, tooltip, category} for a file/folder.

exlab_wizard.ui.components.file_type_icon.file_type_icon(name, *, is_dir=False)[source]#

Build a NiceGUI <q-icon> for name (or return props in tests).

Parameters:
Return type:

Any

exlab_wizard.ui.components.file_type_icon.file_type_legend_entries()[source]#

Return one props dict per file category (for an optional legend).

Return type:

list[dict[str, str]]

exlab_wizard.ui.components.file_type_icon.file_type_props(name, *, is_dir)[source]#

Return {icon_name, color_var, tooltip, category} for a file/folder.

Pure; no NiceGUI import. Directories return the folder glyph; an unknown or absent extension returns the muted fallthrough.

Parameters:
Return type:

dict[str, str]