Skip to content

feat: add source-owned local country flags - #161

Merged
DominusKelvin merged 3 commits into
mainfrom
feat/flag-country
Oct 1, 2026
Merged

DominusKelvin merged 3 commits into
mainfrom
feat/flag-country

Conversation

@DominusKelvin

@DominusKelvin DominusKelvin commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Adds original, source-owned Flag implementations for Vue, React and Svelte with native img/fallback elements and caller-owned Tailwind appearance. Built-in country-only flags derive a fixed English country name when alt is omitted: yields Nigeria. Any explicit alt string wins, including alt="" for decoration and application-localized labels. No Boolean alt overload. Any nonempty custom src disables inferred naming even when country is supplied. Invalid/missing codes and failed images fall back truthfully; changing source retries. React immediate image failures are preserved without a post-render reset race.

Pinned MIT country-flag-icons@1.6.20 supplies 257 locally bundled flags; full license travels in flags.js. Checked-in English names make default SSR and hydration deterministic without runtime Intl, locale props, or remote calls. Registry size is 246,858 bytes raw / 69,835 gzip; CSP img-src data: is required. Names follow asset-specific XA/XC/XO code meanings.

Canonical installation/API/source/live examples: sailscastshq/docs.sailscasts.com#284. All three Storybooks demonstrate inferred/default, explicit decorative/label override, width classes, circular crop, custom source and failure cases. Pairlore explicitly keeps flags beside country names decorative: https://github.com/sailscastshq/pairlore/pull/242.

Validation: 611 unit tests; all-framework server rendering checks included in release:check; production build; canonical Tailwind; registry lineage; packed CLI; all three Storybook builds. Headless Vue/React/Svelte omitted/empty/string/custom-source-with-country/invalid/failure/retry checks pass in light/dark mobile. No merge, package release or manual deployment.

@DominusKelvin
DominusKelvin marked this pull request as ready for review October 1, 2026 07:41
@DominusKelvin
DominusKelvin merged commit a4403b2 into main Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant