├── docs ├── .gitignore ├── doczrc.js ├── src │ ├── Gallery.mdx │ ├── index.mdx │ └── helpers.js └── package.json ├── src ├── .eslintrc ├── setupTests.js ├── index.js ├── index.test.js ├── languages.js └── countries.js ├── .eslintignore ├── .editorconfig ├── .prettierrc ├── .gitignore ├── .eslintrc ├── .github └── workflows │ ├── nodejs.yml │ ├── npm-publish.yml │ └── publish-docs.yml ├── LICENSE ├── index.d.ts ├── README.md └── package.json /docs/.gitignore: -------------------------------------------------------------------------------- 1 | .docz 2 | node_modules -------------------------------------------------------------------------------- /src/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-dom/extend-expect' 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/ 2 | dist/ 3 | node_modules/ 4 | .snapshots/ 5 | *.min.js 6 | coverage/ -------------------------------------------------------------------------------- /docs/doczrc.js: -------------------------------------------------------------------------------- 1 | export default { 2 | title: 'react-circle-flags', 3 | menu: ['Getting Started', 'Gallery'], 4 | base: '/react-circle-flags' 5 | } 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /docs/src/Gallery.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | name: Gallery 3 | route: /gallery 4 | --- 5 | 6 | import { Container, Gallery } from "./helpers"; 7 | 8 | # CircleFlag 9 | 10 | ## Gallery 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "jsxSingleQuote": true, 4 | "semi": false, 5 | "tabWidth": 2, 6 | "bracketSpacing": true, 7 | "jsxBracketSameLine": false, 8 | "arrowParens": "always", 9 | "trailingComma": "none" 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # See https://help.github.com/ignore-files/ for more about ignoring files. 3 | 4 | # dependencies 5 | node_modules 6 | 7 | # builds 8 | build 9 | dist 10 | .rpt2_cache 11 | 12 | # misc 13 | .DS_Store 14 | .env 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | coverage 24 | -------------------------------------------------------------------------------- /docs/src/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | name: Getting Started 3 | route: / 4 | --- 5 | 6 | import { Playground } from 'docz' 7 | import { CircleFlag } from 'react-circle-flags' 8 | 9 | # react-circle-flags 10 | 11 | ## Install 12 | 13 | ```bash 14 | npm install --save react-circle-flags 15 | ``` 16 | 17 | ## Basic usage 18 | 19 | 20 | 21 | 22 | 23 | You can pass all the react's `React.DetailedHTMLProps, HTMLImageElement>` props to CircleFlag. -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-circle-flags-docs", 3 | "version": "0.0.1", 4 | "license": "MIT", 5 | "scripts": { 6 | "dev": "docz dev", 7 | "build": "docz build", 8 | "serve": "docz serve", 9 | "deploy": "gh-pages -d .docz/build" 10 | }, 11 | "dependencies": { 12 | "@emotion/core": "10.1.1", 13 | "docz": "latest", 14 | "prop-types": "^15.7.2", 15 | "react": "^16.11.0", 16 | "react-circle-flags": "link:..", 17 | "react-dom": "^16.11.0" 18 | }, 19 | "devDependencies": { 20 | "gh-pages": "^6.2.0" 21 | }, 22 | "type": "commonjs" 23 | } 24 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": [ 4 | "standard", 5 | "standard-react", 6 | "plugin:prettier/recommended", 7 | "prettier/standard", 8 | "prettier/react" 9 | ], 10 | "env": { 11 | "node": true 12 | }, 13 | "parserOptions": { 14 | "ecmaVersion": 2020, 15 | "ecmaFeatures": { 16 | "legacyDecorators": true, 17 | "jsx": true 18 | } 19 | }, 20 | "settings": { 21 | "react": { 22 | "version": "16" 23 | } 24 | }, 25 | "rules": { 26 | "space-before-function-paren": 0, 27 | "react/prop-types": 0, 28 | "react/jsx-handler-names": 0, 29 | "react/jsx-fragments": 0, 30 | "react/no-unused-prop-types": 0, 31 | "import/export": 0 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docs/src/helpers.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { CircleFlag, countries } from 'react-circle-flags' 3 | 4 | export const Container = ({ children }) => ( 5 |
11 | {children} 12 |
13 | ) 14 | 15 | export const Item = ({ children }) => ( 16 |
23 | {children} 24 |
25 | ) 26 | 27 | export const Gallery = () => ( 28 | <> 29 | {Object.keys(countries).map((countryCode) => ( 30 | 31 | 35 |

36 | {countryCode.toUpperCase()} 37 |

38 |
39 | ))} 40 | 41 | ) 42 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | ci_build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Use Node.js 18 20 | uses: actions/setup-node@v4 21 | with: 22 | node-version: 18 23 | - run: npm i 24 | - run: npm run ci 25 | - run: npm test 26 | - name: Upload coverage 27 | uses: actions/upload-artifact@v4 28 | with: 29 | name: code_coverage 30 | path: ./coverage 31 | - name: Codecov 32 | uses: codecov/codecov-action@v4 33 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: 18 18 | - run: npm i 19 | - run: npm run ci 20 | - run: npm test 21 | 22 | publish-npm: 23 | needs: build 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v4 27 | - uses: actions/setup-node@v4 28 | with: 29 | node-version: 18 30 | registry-url: https://registry.npmjs.org/ 31 | - run: npm i 32 | - run: npm publish 33 | env: 34 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 35 | -------------------------------------------------------------------------------- /.github/workflows/publish-docs.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Publish docs 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | 10 | jobs: 11 | gh_pages_deploy: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Use Node.js 18 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: 18 21 | - run: npm i 22 | - run: npm run build 23 | - run: yarn 24 | working-directory: ./docs 25 | - run: yarn build 26 | working-directory: ./docs 27 | - name: Deploy to GitHub Pages 28 | uses: JamesIves/github-pages-deploy-action@v4 29 | with: 30 | token: ${{ secrets.GH_TOKEN }} 31 | branch: gh-pages 32 | folder: docs/.docz/dist 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Nick Holmes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | import { DetailedHTMLProps, ImgHTMLAttributes } from 'react' 2 | 3 | interface CircleFlagProps extends DetailedHTMLProps< 4 | ImgHTMLAttributes, 5 | HTMLImageElement 6 | > { 7 | /** 8 | * Country code of flag. 9 | */ 10 | countryCode: string 11 | /** 12 | * Custom CDN URL to use. 13 | */ 14 | cdnUrl?: string 15 | } 16 | 17 | interface CircleFlagLanguageProps extends DetailedHTMLProps< 18 | ImgHTMLAttributes, 19 | HTMLImageElement 20 | > { 21 | /** 22 | * Language code of flag. 23 | */ 24 | languageCode: string 25 | /** 26 | * Custom CDN URL to use. 27 | */ 28 | cdnUrl?: string 29 | } 30 | 31 | /** 32 | * 33 | * Demos: 34 | * - https://on-the-edge-cloud.github.io/react-circle-flags/gallery 35 | * 36 | * Docs: 37 | * - https://on-the-edge-cloud.github.io/react-circle-flags/ 38 | */ 39 | declare function CircleFlag(props: CircleFlagProps): JSX.Element 40 | declare function CircleFlagLanguage(props: CircleFlagLanguageProps): JSX.Element 41 | 42 | declare var countries: Record 43 | declare var languages: Record 44 | 45 | export { CircleFlag, CircleFlagLanguage, CircleFlagProps, countries, languages } 46 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import countries from './countries' 3 | import languages from './languages' 4 | 5 | const CDN_URL = 'https://react-circle-flags.pages.dev/' 6 | const FILE_SUFFIX = 'svg' 7 | 8 | const UNKNOWN_FLAG = 'xx' 9 | const DEFAULT_HEIGHT = 100 10 | 11 | /** 12 | * @param {string} code 13 | * @param {string} cdnUrl 14 | * @param {DetailedHTMLProps, HTMLImageElement>} otherProps 15 | * @param {string} cdnSuffix 16 | */ 17 | const getSvgProps = (code, cdnUrl, otherProps, cdnSuffix = '') => ({ 18 | ...otherProps, 19 | title: otherProps.title || code, 20 | height: otherProps.height || DEFAULT_HEIGHT, 21 | src: `${cdnUrl || CDN_URL}${cdnSuffix}${code}.${FILE_SUFFIX}` 22 | }) 23 | 24 | /** 25 | * @param {string} countryCode 26 | */ 27 | const parseCountryCode = (countryCode) => 28 | countries[countryCode] ? countryCode : UNKNOWN_FLAG 29 | 30 | const parseLanguageCode = (languageCode) => 31 | languages[languageCode] ? languageCode : UNKNOWN_FLAG 32 | 33 | /** 34 | * @param {import('../index').CircleFlagProps} param0 35 | */ 36 | export const CircleFlag = ({ countryCode, cdnUrl, ...otherProps }) => ( 37 | 45 | ) 46 | 47 | /** 48 | * @param {import('../index').CircleFlagLanguage} param0 49 | */ 50 | export const CircleFlagLanguage = ({ languageCode, cdnUrl, ...otherProps }) => ( 51 | 60 | ) 61 | 62 | export { countries, languages } 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-circle-flags 2 | 3 | > React circle flags (based on [circle-flags](https://github.com/HatScripts/circle-flags)) 4 | 5 | [![NPM](https://img.shields.io/npm/v/react-circle-flags.svg)](https://www.npmjs.com/package/react-circle-flags) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![codecov](https://codecov.io/gh/on-the-edge-cloud/react-circle-flags/branch/master/graph/badge.svg)](https://codecov.io/gh/on-the-edge-cloud/react-circle-flags) ![Node.js CI](https://github.com/on-the-edge-cloud/react-circle-flags/workflows/Node.js%20CI/badge.svg) 6 | 7 | ## Install 8 | 9 | ```bash 10 | npm install --save react-circle-flags 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```jsx 16 | import React from 'react' 17 | import { CircleFlag } from 'react-circle-flags' 18 | 19 | export const ArgentinianFlag = () => 20 | ``` 21 | 22 | ### With custom CDN 23 | 24 | ```jsx 25 | import React from 'react' 26 | import { CircleFlag } from 'react-circle-flags' 27 | 28 | export const ArgentinianFlag = () => 29 | ``` 30 | 31 | You can pass all the react's `React.DetailedHTMLProps, HTMLImageElement>` props to CircleFlag. :rocket: 32 | 33 | ### Language flags 34 | 35 | ```jsx 36 | import React from 'react' 37 | import { CircleFlagLanguage } from 'react-circle-flags' 38 | 39 | export const EnglishFlag = () => 40 | ``` 41 | 42 | ## Docs && Gallery 43 | 44 | Click [here]([https://on-the-edge-cloud.github.io/react-circle-flags/](https://on-the-edge-cloud.github.io/react-circle-flags/))! 45 | 46 | ## License 47 | 48 | MIT © [On The Edge IT Solutions](https://github.com/on-the-edge-cloud) 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-circle-flags", 3 | "version": "0.0.25", 4 | "description": "A React component with a collection of 300+ minimal circular SVG country flags", 5 | "author": "Tomás Novau(tnovau@ontheedge.cloud)", 6 | "license": "MIT", 7 | "repository": "on-the-edge-cloud/react-circle-flags", 8 | "main": "dist/index.js", 9 | "module": "dist/index.modern.js", 10 | "source": "src/index.js", 11 | "engines": { 12 | "node": ">=10" 13 | }, 14 | "types": "dist/index.d.ts", 15 | "scripts": { 16 | "ci": "npm run lint && npm run build:test", 17 | "build": "microbundle-crl --compress --no-sourcemap --format modern,cjs && shx cp index.d.ts dist/index.d.ts", 18 | "build:test": "npm run build", 19 | "start": "microbundle-crl watch --no-compress --format modern,cjs", 20 | "prepare": "npm run build", 21 | "test": "cross-env CI=1 react-scripts test --env=jsdom --coverage", 22 | "test:watch": "react-scripts test --env=jsdom", 23 | "lint": "eslint src/**/*.js docs/**/*.js" 24 | }, 25 | "peerDependencies": { 26 | "react": "^16.0.0 || 17.x || 18.x || 19.x" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.10.5", 30 | "@testing-library/jest-dom": "^5.11.2", 31 | "@testing-library/react": "^10.4.7", 32 | "@testing-library/user-event": "^12.0.17", 33 | "@types/jest": "^26.0.7", 34 | "babel-eslint": "^10.0.3", 35 | "cross-env": "^7.0.2", 36 | "eslint": "^6.8.0", 37 | "eslint-config-prettier": "^6.7.0", 38 | "eslint-config-standard": "^14.1.0", 39 | "eslint-config-standard-react": "^9.2.0", 40 | "eslint-plugin-import": "^2.18.2", 41 | "eslint-plugin-node": "^11.0.0", 42 | "eslint-plugin-prettier": "^3.1.1", 43 | "eslint-plugin-promise": "^4.2.1", 44 | "eslint-plugin-react": "^7.17.0", 45 | "eslint-plugin-react-hooks": "^4.0.8", 46 | "eslint-plugin-standard": "^4.0.1", 47 | "microbundle-crl": "^0.13.10", 48 | "prettier": "^2.0.4", 49 | "react": "^16.13.1", 50 | "react-dom": "^16.13.1", 51 | "react-scripts": "^5.0.1", 52 | "request": "^2.88.2", 53 | "shx": "^0.3.2" 54 | }, 55 | "files": [ 56 | "dist" 57 | ], 58 | "keywords": [ 59 | "react", 60 | "javascript", 61 | "npm", 62 | "component", 63 | "reactjs", 64 | "react-component", 65 | "react-components", 66 | "javascript-library", 67 | "flags", 68 | "countries", 69 | "react-component-library" 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /src/index.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from '@testing-library/react' 3 | import { CircleFlag, CircleFlagLanguage } from '.' 4 | 5 | describe('CircleFlag', () => { 6 | it('should render correctly with defaults', () => { 7 | const { getByTestId } = render() 8 | const countryFlag = getByTestId('circle-country-flag') 9 | expect(countryFlag).toBeInTheDocument() 10 | expect(countryFlag.getAttribute('src')).toBe( 11 | 'https://react-circle-flags.pages.dev/xx.svg' 12 | ) 13 | expect(countryFlag.title).toBe('xx') 14 | expect(countryFlag.getAttribute('height')).toBe('100') 15 | }) 16 | 17 | it('should render correctly with props', () => { 18 | const { getByTestId } = render( 19 | 20 | ) 21 | const countryFlag = getByTestId('circle-country-flag') 22 | expect(countryFlag).toBeInTheDocument() 23 | expect(countryFlag.getAttribute('src')).toBe( 24 | 'https://react-circle-flags.pages.dev/ar.svg' 25 | ) 26 | expect(countryFlag.title).toBe('Argentina') 27 | expect(countryFlag.getAttribute('height')).toBe('35') 28 | }) 29 | 30 | it('should render correctly with cdnUrl parameter', () => { 31 | const { getByTestId } = render( 32 | 38 | ) 39 | const countryFlag = getByTestId('circle-country-flag') 40 | expect(countryFlag).toBeInTheDocument() 41 | expect(countryFlag.getAttribute('src')).toBe( 42 | 'https://magic-cdn.com/flags/ar.svg' 43 | ) 44 | }) 45 | 46 | it('should render UNKNOWN_FLAG if the countryCode is not in countries', () => { 47 | const { getByTestId } = render( 48 | 49 | ) 50 | const countryFlag = getByTestId('circle-country-flag') 51 | expect(countryFlag).toBeInTheDocument() 52 | expect(countryFlag.getAttribute('src')).toBe( 53 | 'https://react-circle-flags.pages.dev/xx.svg' 54 | ) 55 | expect(countryFlag.title).toBe('xx') 56 | expect(countryFlag.getAttribute('height')).toBe('35') 57 | }) 58 | }) 59 | 60 | describe('CircleFlagLanguage', () => { 61 | it('should render correctly with defaults', () => { 62 | const { getByTestId } = render() 63 | const languageFlag = getByTestId('circle-language-flag') 64 | expect(languageFlag).toBeInTheDocument() 65 | expect(languageFlag.getAttribute('src')).toBe( 66 | 'https://react-circle-flags.pages.dev/language/xx.svg' 67 | ) 68 | expect(languageFlag.title).toBe('xx') 69 | expect(languageFlag.getAttribute('height')).toBe('100') 70 | }) 71 | 72 | it('should render correctly with props', () => { 73 | const { getByTestId } = render( 74 | 79 | ) 80 | const languageFlag = getByTestId('circle-language-flag') 81 | expect(languageFlag).toBeInTheDocument() 82 | expect(languageFlag.getAttribute('src')).toBe( 83 | 'https://react-circle-flags.pages.dev/language/en-us.svg' 84 | ) 85 | expect(languageFlag.title).toBe('United States') 86 | expect(languageFlag.getAttribute('height')).toBe('35') 87 | }) 88 | }) 89 | -------------------------------------------------------------------------------- /src/languages.js: -------------------------------------------------------------------------------- 1 | export default { 2 | aa: true, 3 | ab: true, 4 | af: true, 5 | ak: true, 6 | am: true, 7 | an: true, 8 | ar: true, 9 | as: true, 10 | av: true, 11 | ay: true, 12 | az: true, 13 | ba: true, 14 | be: true, 15 | bg: true, 16 | bi: true, 17 | bm: true, 18 | bn: true, 19 | bo: true, 20 | br: true, 21 | bs: true, 22 | ca: true, 23 | ce: true, 24 | ceb: true, 25 | ch: true, 26 | chm: true, 27 | ckb: true, 28 | co: true, 29 | cs: true, 30 | cv: true, 31 | cy: true, 32 | da: true, 33 | de: true, 34 | dv: true, 35 | dz: true, 36 | ee: true, 37 | el: true, 38 | 'en-au': true, 39 | 'en-ca': true, 40 | 'en-gh': true, 41 | 'en-hk': true, 42 | 'en-ie': true, 43 | 'en-in': true, 44 | 'en-ke': true, 45 | 'en-ng': true, 46 | 'en-nz': true, 47 | 'en-ph': true, 48 | 'en-sg': true, 49 | 'en-tz': true, 50 | 'en-us': true, 51 | 'en-za': true, 52 | en: true, 53 | eo: true, 54 | 'es-mx': true, 55 | es: true, 56 | et: true, 57 | eu: true, 58 | fa: true, 59 | fi: true, 60 | filenames_without_extensions: true, 61 | fj: true, 62 | fo: true, 63 | fr: true, 64 | fy: true, 65 | ga: true, 66 | gd: true, 67 | gl: true, 68 | gn: true, 69 | gu: true, 70 | gv: true, 71 | ha: true, 72 | haw: true, 73 | he: true, 74 | hi: true, 75 | hmn: true, 76 | ho: true, 77 | hr: true, 78 | ht: true, 79 | hu: true, 80 | hy: true, 81 | ia: true, 82 | id: true, 83 | ie: true, 84 | ig: true, 85 | ilo: true, 86 | interslavic: true, 87 | io: true, 88 | is: true, 89 | it: true, 90 | ja: true, 91 | jv: true, 92 | ka: true, 93 | kg: true, 94 | ki: true, 95 | kk: true, 96 | kl: true, 97 | km: true, 98 | kn: true, 99 | ko: true, 100 | kr: true, 101 | kri: true, 102 | ks: true, 103 | ku: true, 104 | kv: true, 105 | kw: true, 106 | ky: true, 107 | la: true, 108 | lb: true, 109 | lg: true, 110 | ln: true, 111 | lo: true, 112 | lt: true, 113 | lu: true, 114 | lus: true, 115 | lv: true, 116 | mg: true, 117 | mh: true, 118 | mi: true, 119 | mk: true, 120 | ml: true, 121 | mn: true, 122 | mni: true, 123 | mr: true, 124 | mrj: true, 125 | ms: true, 126 | mt: true, 127 | my: true, 128 | na: true, 129 | nb: true, 130 | nd: true, 131 | ne: true, 132 | nl: true, 133 | nn: true, 134 | no: true, 135 | non: true, 136 | nr: true, 137 | ny: true, 138 | oc: true, 139 | om: true, 140 | or: true, 141 | os: true, 142 | oto: true, 143 | pa: true, 144 | pap: true, 145 | pl: true, 146 | ps: true, 147 | 'pt-br': true, 148 | pt: true, 149 | qu: true, 150 | rm: true, 151 | rn: true, 152 | ro: true, 153 | ru: true, 154 | rw: true, 155 | sc: true, 156 | sd: true, 157 | se: true, 158 | sg: true, 159 | si: true, 160 | sk: true, 161 | sl: true, 162 | sm: true, 163 | sn: true, 164 | so: true, 165 | sq: true, 166 | sr: true, 167 | ss: true, 168 | st: true, 169 | su: true, 170 | sv: true, 171 | sw: true, 172 | ta: true, 173 | te: true, 174 | tg: true, 175 | th: true, 176 | ti: true, 177 | tk: true, 178 | tl: true, 179 | tn: true, 180 | to: true, 181 | tr: true, 182 | tt: true, 183 | ty: true, 184 | udm: true, 185 | ug: true, 186 | uk: true, 187 | ur: true, 188 | uz: true, 189 | vi: true, 190 | vo: true, 191 | xh: true, 192 | xx: true, 193 | yi: true, 194 | yo: true, 195 | yua: true, 196 | zh: true, 197 | zu: true 198 | } 199 | -------------------------------------------------------------------------------- /src/countries.js: -------------------------------------------------------------------------------- 1 | export default { 2 | ac: true, 3 | ad: true, 4 | ae: true, 5 | 'af-emirate': true, 6 | af: true, 7 | ag: true, 8 | ai: true, 9 | al: true, 10 | am: true, 11 | an: true, 12 | ao: true, 13 | 'aq-true_south': true, 14 | aq: true, 15 | ar: true, 16 | as: true, 17 | at: true, 18 | 'au-aboriginal': true, 19 | 'au-act': true, 20 | 'au-nsw': true, 21 | 'au-nt': true, 22 | 'au-qld': true, 23 | 'au-sa': true, 24 | 'au-tas': true, 25 | 'au-torres_strait_islands': true, 26 | 'au-vic': true, 27 | 'au-wa': true, 28 | au: true, 29 | aw: true, 30 | ax: true, 31 | az: true, 32 | ba: true, 33 | bb: true, 34 | bd: true, 35 | be: true, 36 | bf: true, 37 | bg: true, 38 | bh: true, 39 | bi: true, 40 | bj: true, 41 | bl: true, 42 | bm: true, 43 | bn: true, 44 | bo: true, 45 | 'bq-bo': true, 46 | 'bq-sa': true, 47 | 'bq-se': true, 48 | bq: true, 49 | br: true, 50 | bs: true, 51 | bt: true, 52 | bv: true, 53 | bw: true, 54 | by: true, 55 | bz: true, 56 | 'ca-bc': true, 57 | 'ca-qc': true, 58 | ca: true, 59 | cc: true, 60 | cd: true, 61 | cf: true, 62 | cg: true, 63 | 'ch-gr': true, 64 | ch: true, 65 | ci: true, 66 | ck: true, 67 | cl: true, 68 | cm: true, 69 | 'cn-hk': true, 70 | 'cn-xj': true, 71 | cn: true, 72 | co: true, 73 | cp: true, 74 | cq: true, 75 | cr: true, 76 | cu: true, 77 | cv: true, 78 | cw: true, 79 | cx: true, 80 | cy: true, 81 | cz: true, 82 | de: true, 83 | dg: true, 84 | dj: true, 85 | dk: true, 86 | dm: true, 87 | do: true, 88 | dz: true, 89 | ea: true, 90 | east_african_federation: true, 91 | easter_island: true, 92 | 'ec-w': true, 93 | ec: true, 94 | ee: true, 95 | eg: true, 96 | eh: true, 97 | er: true, 98 | 'es-ar': true, 99 | 'es-ce': true, 100 | 'es-cn': true, 101 | 'es-ct': true, 102 | 'es-ga': true, 103 | 'es-ib': true, 104 | 'es-ml': true, 105 | 'es-pv': true, 106 | 'es-variant': true, 107 | es: true, 108 | 'et-af': true, 109 | 'et-am': true, 110 | 'et-be': true, 111 | 'et-ga': true, 112 | 'et-ha': true, 113 | 'et-or': true, 114 | 'et-si': true, 115 | 'et-sn': true, 116 | 'et-so': true, 117 | 'et-sw': true, 118 | 'et-ti': true, 119 | et: true, 120 | eu: true, 121 | european_union: true, 122 | ewe: true, 123 | fi: true, 124 | fj: true, 125 | fk: true, 126 | fm: true, 127 | fo: true, 128 | 'fr-20r': true, 129 | 'fr-bre': true, 130 | 'fr-cp': true, 131 | fr: true, 132 | fx: true, 133 | ga: true, 134 | 'gb-con': true, 135 | 'gb-eng': true, 136 | 'gb-nir': true, 137 | 'gb-ork': true, 138 | 'gb-sct': true, 139 | 'gb-wls': true, 140 | gb: true, 141 | gd: true, 142 | 'ge-ab': true, 143 | ge: true, 144 | gf: true, 145 | gg: true, 146 | gh: true, 147 | gi: true, 148 | gl: true, 149 | gm: true, 150 | gn: true, 151 | gp: true, 152 | gq: true, 153 | gr: true, 154 | gs: true, 155 | gt: true, 156 | gu: true, 157 | guarani: true, 158 | gw: true, 159 | gy: true, 160 | hausa: true, 161 | hk: true, 162 | hm: true, 163 | hmong: true, 164 | hn: true, 165 | hr: true, 166 | ht: true, 167 | hu: true, 168 | ic: true, 169 | 'id-jb': true, 170 | 'id-jt': true, 171 | id: true, 172 | ie: true, 173 | il: true, 174 | im: true, 175 | 'in-as': true, 176 | 'in-gj': true, 177 | 'in-ka': true, 178 | 'in-mn': true, 179 | 'in-mz': true, 180 | 'in-or': true, 181 | 'in-tg': true, 182 | 'in-tn': true, 183 | in: true, 184 | io: true, 185 | 'iq-kr': true, 186 | iq: true, 187 | ir: true, 188 | is: true, 189 | 'it-21': true, 190 | 'it-23': true, 191 | 'it-25': true, 192 | 'it-32': true, 193 | 'it-34': true, 194 | 'it-36': true, 195 | 'it-42': true, 196 | 'it-45': true, 197 | 'it-52': true, 198 | 'it-55': true, 199 | 'it-57': true, 200 | 'it-62': true, 201 | 'it-65': true, 202 | 'it-67': true, 203 | 'it-72': true, 204 | 'it-75': true, 205 | 'it-77': true, 206 | 'it-78': true, 207 | 'it-82': true, 208 | 'it-88': true, 209 | it: true, 210 | je: true, 211 | jm: true, 212 | jo: true, 213 | jp: true, 214 | kanuri: true, 215 | ke: true, 216 | kg: true, 217 | kh: true, 218 | ki: true, 219 | kikuyu: true, 220 | km: true, 221 | kn: true, 222 | kongo: true, 223 | kp: true, 224 | kr: true, 225 | kw: true, 226 | ky: true, 227 | kz: true, 228 | la: true, 229 | language: true, 230 | lb: true, 231 | lc: true, 232 | li: true, 233 | lk: true, 234 | lr: true, 235 | ls: true, 236 | lt: true, 237 | lu: true, 238 | lv: true, 239 | ly: true, 240 | ma: true, 241 | malayali: true, 242 | maori: true, 243 | mc: true, 244 | md: true, 245 | me: true, 246 | mf: true, 247 | mg: true, 248 | mh: true, 249 | mk: true, 250 | ml: true, 251 | mm: true, 252 | mn: true, 253 | mo: true, 254 | mp: true, 255 | 'mq-old': true, 256 | mq: true, 257 | mr: true, 258 | ms: true, 259 | mt: true, 260 | mu: true, 261 | mv: true, 262 | mw: true, 263 | mx: true, 264 | my: true, 265 | mz: true, 266 | na: true, 267 | nc: true, 268 | ne: true, 269 | nf: true, 270 | ng: true, 271 | ni: true, 272 | 'nl-fr': true, 273 | nl: true, 274 | no: true, 275 | northern_cyprus: true, 276 | np: true, 277 | nr: true, 278 | nu: true, 279 | nz: true, 280 | occitania: true, 281 | om: true, 282 | other: true, 283 | otomi: true, 284 | pa: true, 285 | pe: true, 286 | pf: true, 287 | pg: true, 288 | ph: true, 289 | 'pk-jk': true, 290 | 'pk-sd': true, 291 | pk: true, 292 | pl: true, 293 | pm: true, 294 | pn: true, 295 | pr: true, 296 | ps: true, 297 | 'pt-20': true, 298 | 'pt-30': true, 299 | pt: true, 300 | pw: true, 301 | py: true, 302 | qa: true, 303 | quechua: true, 304 | re: true, 305 | ro: true, 306 | rs: true, 307 | 'ru-ba': true, 308 | 'ru-ce': true, 309 | 'ru-cu': true, 310 | 'ru-da': true, 311 | 'ru-dpr': true, 312 | 'ru-ko': true, 313 | 'ru-lpr': true, 314 | 'ru-ta': true, 315 | 'ru-ud': true, 316 | ru: true, 317 | rw: true, 318 | sa: true, 319 | sami: true, 320 | sb: true, 321 | sc: true, 322 | sd: true, 323 | se: true, 324 | sg: true, 325 | 'sh-ac': true, 326 | 'sh-hl': true, 327 | 'sh-ta': true, 328 | sh: true, 329 | si: true, 330 | sj: true, 331 | sk: true, 332 | sl: true, 333 | sm: true, 334 | sn: true, 335 | so: true, 336 | somaliland: true, 337 | south_ossetia: true, 338 | soviet_union: true, 339 | sr: true, 340 | ss: true, 341 | st: true, 342 | su: true, 343 | sv: true, 344 | sx: true, 345 | sy: true, 346 | sz: true, 347 | ta: true, 348 | tc: true, 349 | td: true, 350 | tf: true, 351 | tg: true, 352 | th: true, 353 | tibet: true, 354 | tj: true, 355 | tk: true, 356 | tl: true, 357 | tm: true, 358 | tn: true, 359 | to: true, 360 | tr: true, 361 | transnistria: true, 362 | tt: true, 363 | tv: true, 364 | tw: true, 365 | tz: true, 366 | ua: true, 367 | ug: true, 368 | uk: true, 369 | um: true, 370 | un: true, 371 | 'us-ak': true, 372 | 'us-al': true, 373 | 'us-ar': true, 374 | 'us-as': true, 375 | 'us-az': true, 376 | 'us-betsy_ross': true, 377 | 'us-ca': true, 378 | 'us-co': true, 379 | 'us-confederate_battle': true, 380 | 'us-dc': true, 381 | 'us-fl': true, 382 | 'us-ga': true, 383 | 'us-gu': true, 384 | 'us-hi': true, 385 | 'us-in': true, 386 | 'us-md': true, 387 | 'us-mo': true, 388 | 'us-mp': true, 389 | 'us-ms': true, 390 | 'us-nc': true, 391 | 'us-nm': true, 392 | 'us-or': true, 393 | 'us-pr': true, 394 | 'us-ri': true, 395 | 'us-sc': true, 396 | 'us-tn': true, 397 | 'us-tx': true, 398 | 'us-um': true, 399 | 'us-vi': true, 400 | 'us-wa': true, 401 | 'us-wi': true, 402 | 'us-wy': true, 403 | us: true, 404 | uy: true, 405 | uz: true, 406 | va: true, 407 | vc: true, 408 | ve: true, 409 | vg: true, 410 | vi: true, 411 | vn: true, 412 | vu: true, 413 | wf: true, 414 | wiphala: true, 415 | ws: true, 416 | xk: true, 417 | xx: true, 418 | ye: true, 419 | yorubaland: true, 420 | yt: true, 421 | yu: true, 422 | za: true, 423 | zm: true, 424 | zw: true 425 | } 426 | --------------------------------------------------------------------------------