How do I add a source or notes to figures and tables?

I need to add notes to tables and figures, as shown in the image below.

A similar topic can be found in this post: How to add more fields to figure function? - #2 by quachpas, but I have additional requirements:

  • The notes must match the width of the figure/table and be left-aligned;

  • I need fields for notes, the source, and “footnotes” (like ᵃText, ᵇText) stacked vertically;

  • Cross-referencing commands (e.g., <label>) must work normally;

  • The entire structure must be unbreakable — meaning the title and notes should not be separated by a page break.

Ultimately, I need something like this:

#figure(
   image("image.png"),
   caption: [Title],
   source: [Text],
   note: [Text],
   footnote: [Text],
) <label>

Or whatever approach works best if the one above isn’t ideal.

I’ve tried redefining standard elements using something like #let default-figure = figure, but I’m not sure if that’s the correct way to do it, so I’d appreciate an explanation.