@verdaccio/ui-theme 6.0.0-6-next.9 → 6.0.0-6-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +1 -1
- package/.eslintrc +0 -15
- package/CHANGELOG.md +61 -0
- package/jest/api/packages.json +42 -0
- package/jest/jest.config.js +2 -2
- package/jest/server-handlers.ts +9 -0
- package/jest/server.ts +6 -0
- package/jest/setup-env.ts +18 -0
- package/jest/setup.ts +2 -7
- package/jest/unit/components/__mocks__/token.ts +0 -1
- package/jest/unit/components/store/login.ts +1 -0
- package/package.json +43 -33
- package/src/App/App.test.tsx +75 -51
- package/src/App/App.tsx +7 -42
- package/src/App/AppRoute.tsx +3 -16
- package/src/App/Footer/Footer.test.tsx +0 -1
- package/src/App/Footer/Footer.tsx +35 -22
- package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +208 -302
- package/src/App/Footer/styles.ts +2 -3
- package/src/App/Header/Header.test.tsx +53 -61
- package/src/App/Header/Header.tsx +13 -24
- package/src/App/Header/HeaderGreetings.tsx +0 -1
- package/src/App/Header/HeaderLeft.tsx +0 -1
- package/src/App/Header/HeaderMenu.tsx +6 -6
- package/src/App/Header/HeaderRight.tsx +1 -2
- package/src/App/Header/HeaderToolTip.tsx +0 -1
- package/src/App/Header/HeaderToolTipIcon.tsx +10 -10
- package/src/App/Header/LanguageSwitch.tsx +17 -79
- package/src/App/Header/LoginDialog/LoginDialog.test.tsx +25 -35
- package/src/App/Header/LoginDialog/LoginDialog.tsx +28 -46
- package/src/App/Header/LoginDialog/LoginDialogCloseButton.tsx +1 -2
- package/src/App/Header/LoginDialog/LoginDialogForm.tsx +0 -1
- package/src/App/Header/LoginDialog/LoginDialogFormError.tsx +1 -2
- package/src/App/Header/LoginDialog/LoginDialogHeader.tsx +4 -4
- package/src/App/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +1 -3
- package/src/App/Header/RegistryInfoContent/RegistryInfoContent.tsx +9 -10
- package/src/App/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +1 -2
- package/src/App/Header/RegistryInfoDialog/styles.ts +0 -1
- package/src/App/Header/Search/Search.test.tsx +48 -43
- package/src/App/Header/Search/Search.tsx +23 -108
- package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +392 -28
- package/src/App/Header/styles.ts +2 -3
- package/src/App/index.ts +0 -1
- package/src/App/utils/loadable.tsx +3 -1
- package/src/components/ActionBar/ActionBar.test.tsx +13 -14
- package/src/components/ActionBar/ActionBar.tsx +0 -2
- package/src/components/ActionBar/ActionBarAction.tsx +11 -14
- package/src/components/ActionBar/__snapshots__/ActionBar.test.tsx.snap +198 -53
- package/src/components/AppBar.tsx +1 -1
- package/src/components/Author/Author.test.tsx +1 -4
- package/src/components/Author/Author.tsx +2 -4
- package/src/components/Author/__snapshots__/Author.test.tsx.snap +804 -48
- package/src/components/Author/styles.ts +0 -1
- package/src/components/AutoComplete/AutoComplete.tsx +85 -163
- package/src/components/AutoComplete/AutoCompleteV2.tsx +8 -10
- package/src/components/AutoComplete/styles.tsx +0 -15
- package/src/components/Avatar.tsx +1 -1
- package/src/components/Box.tsx +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Card.tsx +1 -1
- package/src/components/CardActions.tsx +1 -1
- package/src/components/CardContent.tsx +1 -1
- package/src/components/Chip.tsx +1 -1
- package/src/components/CircularProgress.tsx +2 -2
- package/src/components/CopyToClipBoard.tsx +2 -3
- package/src/components/Dialog.tsx +1 -1
- package/src/components/DialogActions.tsx +2 -2
- package/src/components/DialogContent.tsx +2 -2
- package/src/components/DialogTitle.tsx +1 -1
- package/src/components/Divider.tsx +1 -1
- package/src/components/FloatingActionButton.tsx +1 -1
- package/src/components/FormControl.tsx +1 -1
- package/src/components/FormHelperText.tsx +2 -2
- package/src/components/Grid.tsx +1 -1
- package/src/components/Heading.tsx +1 -1
- package/src/components/IconButton.tsx +1 -1
- package/src/components/Icons/index.ts +1 -17
- package/src/components/Input.tsx +1 -1
- package/src/components/InputAdornment/InputAdornment.tsx +2 -2
- package/src/components/InputLabel.tsx +1 -1
- package/src/components/Label/Label.test.tsx +0 -1
- package/src/components/Label/Label.tsx +2 -3
- package/src/components/List.tsx +1 -1
- package/src/components/ListItem.tsx +1 -1
- package/src/components/ListItemText.tsx +1 -4
- package/src/components/Loading/Loading.test.tsx +0 -1
- package/src/components/Loading/Loading.tsx +1 -2
- package/src/components/Loading/Spinner/Spinner.test.tsx +1 -2
- package/src/components/Loading/Spinner/Spinner.tsx +1 -2
- package/src/components/Loading/Spinner/__snapshots__/Spinner.test.tsx.snap +114 -16
- package/src/components/Loading/__snapshots__/Loading.test.tsx.snap +63 -11
- package/src/components/Loading/styles.ts +1 -2
- package/src/components/Logo/Logo.test.tsx +0 -1
- package/src/components/Logo/Logo.tsx +1 -2
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +2 -0
- package/src/components/Menu.tsx +1 -1
- package/src/components/MenuItem.tsx +1 -1
- package/src/components/NotFound/NotFound.tsx +1 -3
- package/src/components/NotFound/Notfound.test.tsx +1 -2
- package/src/components/NotFound/__snapshots__/Notfound.test.tsx.snap +138 -11
- package/src/components/NotFound/styles.ts +0 -1
- package/src/components/Paper.tsx +1 -1
- package/src/components/SnackbarContent.tsx +1 -1
- package/src/components/SvgIcon.tsx +1 -1
- package/src/components/Tab.tsx +1 -1
- package/src/components/Tabs.tsx +1 -1
- package/src/components/Text/Text.tsx +1 -1
- package/src/components/Text/TextConfig.ts +1 -1
- package/src/components/TextField/TextField.test.tsx +0 -1
- package/src/components/TextField/TextField.tsx +2 -2
- package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +216 -3
- package/src/components/Toolbar.tsx +1 -1
- package/src/components/Tooltip.tsx +1 -1
- package/src/design-tokens/ResetStyles.tsx +1 -1
- package/src/design-tokens/StyleBaseline.tsx +2 -2
- package/src/design-tokens/ThemeContext.ts +1 -1
- package/src/design-tokens/ThemeProvider.tsx +15 -12
- package/src/design-tokens/theme.ts +28 -26
- package/src/design-tokens/useTheme.ts +1 -1
- package/src/{design-tokens → hooks}/useLocalStorage.ts +0 -0
- package/src/{design-tokens → hooks}/useOnClickOutside.ts +0 -0
- package/src/i18n/ABOUT_TRANSLATIONS.md +13 -0
- package/src/i18n/__mocks__/loadTranslationFile.ts +5 -0
- package/src/i18n/config.ts +38 -0
- package/src/i18n/crowdin/ui.json +170 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/cs-CZ.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/de-DE.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/en-US.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/es-ES.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/fr-FR.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/ja-JP.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/km-KH.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/pt-BR.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/ru-RU.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/tr-TR.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/uk-UA.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/zh-CN.json +0 -0
- package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/zh-TW.json +0 -0
- package/src/i18n/download_translations/ar-SA/ui.json +170 -0
- package/src/i18n/download_translations/cs-CZ/ui.json +170 -0
- package/src/i18n/download_translations/de-DE/ui.json +170 -0
- package/src/i18n/download_translations/es-ES/ui.json +170 -0
- package/src/i18n/download_translations/fi-FI/ui.json +170 -0
- package/src/i18n/download_translations/fil-PH/ui.json +170 -0
- package/src/i18n/download_translations/fr-FR/ui.json +170 -0
- package/src/i18n/download_translations/gl-ES/ui.json +170 -0
- package/src/i18n/download_translations/hi-IN/ui.json +170 -0
- package/src/i18n/download_translations/it-IT/ui.json +170 -0
- package/src/i18n/download_translations/ja-JP/ui.json +170 -0
- package/src/i18n/download_translations/km-KH/ui.json +170 -0
- package/src/i18n/download_translations/ko-KR/ui.json +170 -0
- package/src/i18n/download_translations/pl-PL/ui.json +170 -0
- package/src/i18n/download_translations/pt-BR/ui.json +170 -0
- package/src/i18n/download_translations/pt-PT/ui.json +170 -0
- package/src/i18n/download_translations/ro-RO/ui.json +170 -0
- package/src/i18n/download_translations/ru-RU/ui.json +170 -0
- package/src/i18n/download_translations/si-LK/ui.json +170 -0
- package/src/i18n/download_translations/sr-CS/ui.json +170 -0
- package/src/i18n/download_translations/sr-SP/ui.json +170 -0
- package/src/i18n/download_translations/tg-TJ/ui.json +170 -0
- package/src/i18n/download_translations/tr-TR/ui.json +170 -0
- package/src/i18n/download_translations/uk-UA/ui.json +170 -0
- package/src/i18n/download_translations/vi-VN/ui.json +170 -0
- package/src/i18n/download_translations/yo-NG/ui.json +170 -0
- package/src/i18n/download_translations/zh-CN/ui.json +170 -0
- package/src/i18n/download_translations/zh-TW/ui.json +170 -0
- package/src/i18n/enabledLanguages.ts +35 -0
- package/src/i18n/loadTranslationFile.ts +14 -0
- package/src/index.tsx +13 -11
- package/src/pages/Version/DetailContainer/Dependencies/Dependencies.test.tsx +0 -2
- package/src/pages/Version/DetailContainer/Dependencies/Dependencies.tsx +1 -3
- package/src/pages/Version/DetailContainer/Dependencies/styles.ts +0 -1
- package/src/pages/Version/DetailContainer/Deprecated/Deprecated.test.tsx +1 -3
- package/src/pages/Version/DetailContainer/Deprecated/Deprecated.tsx +2 -3
- package/src/pages/Version/DetailContainer/DetailContainer.test.tsx +0 -1
- package/src/pages/Version/DetailContainer/DetailContainer.tsx +1 -3
- package/src/pages/Version/DetailContainer/DetailContainerContent.tsx +0 -1
- package/src/pages/Version/DetailContainer/DetailContainerContentReadme.tsx +0 -1
- package/src/pages/Version/DetailContainer/DetailContainerTabs.tsx +0 -1
- package/src/pages/Version/DetailContainer/NoItems/NoItems.tsx +0 -1
- package/src/pages/Version/DetailContainer/NoItems/Noitems.test.tsx +0 -1
- package/src/pages/Version/DetailContainer/NoItems/__snapshots__/Noitems.test.tsx.snap +10 -1
- package/src/pages/Version/DetailContainer/Readme/Readme.spec.tsx +1 -2
- package/src/pages/Version/DetailContainer/Readme/Readme.tsx +1 -2
- package/src/pages/Version/DetailContainer/UpLinks/UpLinks.test.tsx +1 -9
- package/src/pages/Version/DetailContainer/UpLinks/UpLinks.tsx +1 -3
- package/src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap +184 -26
- package/src/pages/Version/DetailContainer/UpLinks/styles.ts +2 -3
- package/src/pages/Version/DetailContainer/Versions/Versions.test.tsx +3 -5
- package/src/pages/Version/DetailContainer/Versions/Versions.tsx +1 -2
- package/src/pages/Version/DetailContainer/Versions/VersionsHistoryList.tsx +2 -4
- package/src/pages/Version/DetailContainer/Versions/VersionsTagList.tsx +1 -3
- package/src/pages/Version/DetailContainer/Versions/styles.ts +2 -3
- package/src/pages/Version/DetailContainer/__snapshots__/DetailContainer.test.tsx.snap +168 -34
- package/src/pages/Version/DetailSidebar/DetailSidebar.tsx +0 -2
- package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.test.tsx +0 -2
- package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.tsx +1 -2
- package/src/pages/Version/DetailSidebar/DetailSidebarTitle.tsx +0 -1
- package/src/pages/Version/DetailSidebar/Developers/Developers.test.tsx +3 -5
- package/src/pages/Version/DetailSidebar/Developers/Developers.tsx +3 -5
- package/src/pages/Version/DetailSidebar/Developers/DevelopersTitle.tsx +0 -1
- package/src/pages/Version/DetailSidebar/Developers/__snapshots__/Developers.test.tsx.snap +328 -40
- package/src/pages/Version/DetailSidebar/Developers/styles.ts +0 -1
- package/src/pages/Version/DetailSidebar/Dist/Dist.test.tsx +1 -3
- package/src/pages/Version/DetailSidebar/Dist/Dist.tsx +1 -3
- package/src/pages/Version/DetailSidebar/Dist/__snapshots__/Dist.test.tsx.snap +1436 -74
- package/src/pages/Version/DetailSidebar/Dist/styles.ts +2 -1
- package/src/pages/Version/DetailSidebar/Engines/Engines.test.tsx +1 -3
- package/src/pages/Version/DetailSidebar/Engines/Engines.tsx +1 -3
- package/src/pages/Version/DetailSidebar/Engines/styles.ts +0 -1
- package/src/pages/Version/DetailSidebar/Install/Install.test.tsx +1 -3
- package/src/pages/Version/DetailSidebar/Install/Install.tsx +0 -2
- package/src/pages/Version/DetailSidebar/Install/InstallListItem.tsx +0 -1
- package/src/pages/Version/DetailSidebar/Repository/Repository.test.tsx +1 -3
- package/src/pages/Version/DetailSidebar/Repository/Repository.tsx +1 -3
- package/src/pages/Version/Version.test.tsx +3 -5
- package/src/pages/Version/Version.tsx +21 -6
- package/src/pages/Version/VersionContextProvider.tsx +14 -45
- package/src/pages/Version/VersionLayout.tsx +1 -1
- package/src/pages/Version/context.ts +1 -1
- package/src/pages/home/Home.tsx +9 -28
- package/src/pages/home/PackageList/Help/Help.test.tsx +0 -1
- package/src/pages/home/PackageList/Help/Help.tsx +0 -1
- package/src/pages/home/PackageList/Help/__snapshots__/Help.test.tsx.snap +298 -59
- package/src/pages/home/PackageList/Help/styles.ts +0 -1
- package/src/pages/home/PackageList/Package/Package.test.tsx +5 -4
- package/src/pages/home/PackageList/Package/Package.tsx +20 -28
- package/src/pages/home/PackageList/Package/Tag/Tag.test.tsx +0 -1
- package/src/pages/home/PackageList/Package/styles.ts +5 -6
- package/src/pages/home/PackageList/PackageList.tsx +17 -17
- package/src/pages/home/PackageList/Packagelist.test.tsx +6 -5
- package/src/providers/API/api.test.ts +1 -0
- package/src/providers/API/api.ts +7 -3
- package/src/providers/config/AppConfigurationProvider.tsx +3 -3
- package/src/store/index.ts +1 -0
- package/src/store/models/configuration.ts +41 -0
- package/src/store/models/download.ts +30 -0
- package/src/store/models/index.ts +18 -0
- package/src/store/models/login.ts +92 -0
- package/src/store/models/manifest.ts +91 -0
- package/src/store/models/packages.ts +36 -0
- package/src/store/models/search.ts +81 -0
- package/src/store/store.ts +15 -0
- package/src/utils/login.test.ts +3 -4
- package/src/utils/package.test.ts +2 -3
- package/src/utils/package.ts +2 -1
- package/src/utils/sec-utils.ts +1 -1
- package/src/utils/test-react-testing-library.tsx +22 -5
- package/src/utils/url.test.ts +1 -1
- package/src/utils/url.ts +1 -0
- package/static/Dependencies.15768a14646212b71166.js +2 -0
- package/static/Dependencies.15768a14646212b71166.js.LICENSE.txt +78 -0
- package/static/Dist.15768a14646212b71166.js +2 -0
- package/static/Dist.15768a14646212b71166.js.LICENSE.txt +60 -0
- package/static/Engines.15768a14646212b71166.js +2 -0
- package/static/Engines.15768a14646212b71166.js.LICENSE.txt +66 -0
- package/static/Home.15768a14646212b71166.js +2 -0
- package/static/Home.15768a14646212b71166.js.LICENSE.txt +222 -0
- package/static/Install.15768a14646212b71166.js +2 -0
- package/static/Install.15768a14646212b71166.js.LICENSE.txt +66 -0
- package/static/NotFound.15768a14646212b71166.js +2 -0
- package/static/NotFound.15768a14646212b71166.js.LICENSE.txt +40 -0
- package/static/Provider.15768a14646212b71166.js +2 -0
- package/static/Provider.15768a14646212b71166.js.LICENSE.txt +32 -0
- package/static/Repository.15768a14646212b71166.js +2 -0
- package/static/Repository.15768a14646212b71166.js.LICENSE.txt +50 -0
- package/static/UpLinks.15768a14646212b71166.js +2 -0
- package/static/UpLinks.15768a14646212b71166.js.LICENSE.txt +56 -0
- package/static/Version.15768a14646212b71166.js +2 -0
- package/static/Version.15768a14646212b71166.js.LICENSE.txt +380 -0
- package/static/Versions.15768a14646212b71166.js +2 -0
- package/static/Versions.15768a14646212b71166.js.LICENSE.txt +64 -0
- package/static/index.html +1 -1
- package/static/main.15768a14646212b71166.js +2 -0
- package/static/main.15768a14646212b71166.js.LICENSE.txt +972 -0
- package/static/manifest.json +17 -3
- package/static/runtime.15768a14646212b71166.js +2 -0
- package/static/{runtime.9525ddaaf85378590c63.js.LICENSE.txt → runtime.15768a14646212b71166.js.LICENSE.txt} +2 -2
- package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js +2 -0
- package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js.LICENSE.txt +148 -0
- package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js +2 -0
- package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js.LICENSE.txt +218 -0
- package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js +2 -0
- package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js.LICENSE.txt +316 -0
- package/static/vendors.15768a14646212b71166.js +103 -0
- package/static/vendors.15768a14646212b71166.js.LICENSE.txt +3158 -0
- package/tools/dev.server.js +0 -1
- package/tools/webpack.dev.config.babel.js +1 -3
- package/tools/webpack.prod.config.babel.js +1 -1
- package/tsconfig.json +1 -3
- package/types/index.ts +3 -20
- package/i18n/config.ts +0 -94
- package/src/App/AppContext.ts +0 -18
- package/src/App/AppContextProvider.tsx +0 -44
- package/src/App/Header/Search/SearchAdornment.tsx +0 -18
- package/src/components/Icons/Austria.tsx +0 -23
- package/src/components/Icons/Brazil.tsx +0 -44
- package/src/components/Icons/China.tsx +0 -33
- package/src/components/Icons/Czech.tsx +0 -21
- package/src/components/Icons/France.tsx +0 -27
- package/src/components/Icons/Germany.tsx +0 -27
- package/src/components/Icons/India.tsx +0 -44
- package/src/components/Icons/Japan.tsx +0 -23
- package/src/components/Icons/Khmer.tsx +0 -40
- package/src/components/Icons/Nicaragua.tsx +0 -66
- package/src/components/Icons/Russia.tsx +0 -27
- package/src/components/Icons/Spain.tsx +0 -43
- package/src/components/Icons/Taiwan.tsx +0 -25
- package/src/components/Icons/Turkey.tsx +0 -23
- package/src/components/Icons/Ukraine.tsx +0 -30
- package/src/components/Icons/Usa.tsx +0 -34
- package/src/design-tokens/emotion.ts +0 -5
- package/src/lib/constants.ts +0 -9
- package/src/pages/Version/DetailSidebar/ActionBar/ActionBar.test.tsx +0 -84
- package/src/pages/Version/DetailSidebar/ActionBar/__snapshots__/ActionBar.test.tsx.snap +0 -122
- package/src/pages/Version/is-package-version-valid.ts +0 -19
- package/src/providers/API/APIProvider.tsx +0 -109
- package/src/providers/API/index.ts +0 -1
- package/static/main.9525ddaaf85378590c63.js +0 -2
- package/static/main.9525ddaaf85378590c63.js.LICENSE.txt +0 -1588
- package/static/runtime.9525ddaaf85378590c63.js +0 -2
- package/static/vendors.9525ddaaf85378590c63.js +0 -2
- package/static/vendors.9525ddaaf85378590c63.js.LICENSE.txt +0 -4540
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
|
|
4
|
-
import { SvgIcon } from '../SvgIcon';
|
|
5
|
-
|
|
6
|
-
type Props = React.ComponentProps<typeof SvgIcon>;
|
|
7
|
-
|
|
8
|
-
const Spain = React.forwardRef(function Spain(props: Props, ref: React.Ref<SVGSVGElement>) {
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
return (
|
|
11
|
-
<SvgIcon viewBox="0 0 45 45" {...props} ref={ref} title={t('flag.spain')}>
|
|
12
|
-
<defs>
|
|
13
|
-
<clipPath id="prefix__a">
|
|
14
|
-
<path d="M0 36h36V0H0v36z" />
|
|
15
|
-
</clipPath>
|
|
16
|
-
</defs>
|
|
17
|
-
<g clipPath="url(#prefix__a)" transform="matrix(1.25 0 0 -1.25 0 45)">
|
|
18
|
-
<path
|
|
19
|
-
d="M36 9a4 4 0 00-4-4H4a4 4 0 00-4 4v18a4 4 0 004 4h28a4 4 0 004-4V9z"
|
|
20
|
-
fill="#c60a1d"
|
|
21
|
-
/>
|
|
22
|
-
<path d="M36 12H0v12h36V12z" fill="#ffc400" />
|
|
23
|
-
<path d="M9 19v-3a3 3 0 116 0v3H9z" fill="#ea596e" />
|
|
24
|
-
<path d="M12 17h3v3h-3v-3z" fill="#f4a2b2" />
|
|
25
|
-
<path d="M12 17H9v3h3v-3z" fill="#dd2e44" />
|
|
26
|
-
<path
|
|
27
|
-
d="M15 21.5c0-.829-1.343-1.5-3-1.5s-3 .671-3 1.5 1.343 1.5 3 1.5 3-.671 3-1.5"
|
|
28
|
-
fill="#ea596e"
|
|
29
|
-
/>
|
|
30
|
-
<path
|
|
31
|
-
d="M15 22.25c0 .414-1.343.75-3 .75s-3-.336-3-.75 1.343-.75 3-.75 3 .336 3 .75"
|
|
32
|
-
fill="#ffac33"
|
|
33
|
-
/>
|
|
34
|
-
<path d="M7 13h1v7H7v-7zm10 0h-1v7h1v-7z" fill="#99aab5" />
|
|
35
|
-
<path d="M9 13H6v1h3v-1zm9 0h-3v1h3v-1zM8 20H7v1h1v-1zm9 0h-1v1h1v-1z" fill="#66757f" />
|
|
36
|
-
</g>
|
|
37
|
-
</SvgIcon>
|
|
38
|
-
);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
Spain.displayName = 'Spain';
|
|
42
|
-
|
|
43
|
-
export { Spain };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
|
|
4
|
-
import { SvgIcon } from '../SvgIcon';
|
|
5
|
-
|
|
6
|
-
type Props = React.ComponentProps<typeof SvgIcon>;
|
|
7
|
-
|
|
8
|
-
const Taiwan = React.forwardRef(function Taiwan(props: Props, ref: React.Ref<SVGSVGElement>) {
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
return (
|
|
11
|
-
<SvgIcon viewBox="-60 -40 240 160" {...props} ref={ref} title={t('flag.taiwan')}>
|
|
12
|
-
<rect x={-60} y={-40} width="100%" height="100%" fill="#fe0000" />
|
|
13
|
-
<rect x={-60} y={-40} width="50%" height="50%" fill="#000095" />
|
|
14
|
-
<path id="prefix__a" d="M8 0L0 30-8 0l8-30M0 8l30-8L0-8l-30 8" fill="#fff" />
|
|
15
|
-
<use xlinkHref="#prefix__a" transform="rotate(30)" />
|
|
16
|
-
<use xlinkHref="#prefix__a" transform="rotate(60)" />
|
|
17
|
-
<circle r={17} fill="#000095" />
|
|
18
|
-
<circle r={15} fill="#fff" />
|
|
19
|
-
</SvgIcon>
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
Taiwan.displayName = 'Taiwan';
|
|
24
|
-
|
|
25
|
-
export { Taiwan };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
|
|
4
|
-
import { SvgIcon } from '../SvgIcon';
|
|
5
|
-
|
|
6
|
-
type Props = React.ComponentProps<typeof SvgIcon>;
|
|
7
|
-
|
|
8
|
-
const Turkey = React.forwardRef(function Turkey(props: Props, ref: React.Ref<SVGSVGElement>) {
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
return (
|
|
11
|
-
<SvgIcon viewBox="0 0 512 512" {...props} ref={ref} title={t('flag.turkey')}>
|
|
12
|
-
<path fill="#d80027" d="M0 85.337h512v341.326H0z" />
|
|
13
|
-
<g fill="#f0f0f0">
|
|
14
|
-
<path d="M247.213 216.787l17.594 24.246 28.493-9.239-17.621 24.224 17.592 24.244-28.484-9.274-17.621 24.225.018-29.955-28.484-9.275 28.494-9.239z" />
|
|
15
|
-
<path d="M199.202 316.602c-33.469 0-60.602-27.133-60.602-60.602s27.133-60.602 60.602-60.602c10.436 0 20.254 2.639 28.827 7.284-13.448-13.152-31.84-21.269-52.135-21.269-41.193 0-74.586 33.394-74.586 74.586s33.394 74.586 74.586 74.586c20.295 0 38.687-8.117 52.135-21.269-8.572 4.647-18.391 7.286-28.827 7.286z" />
|
|
16
|
-
</g>
|
|
17
|
-
</SvgIcon>
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
Turkey.displayName = 'Turkey';
|
|
22
|
-
|
|
23
|
-
export { Turkey };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
|
|
4
|
-
import { SvgIcon } from '../SvgIcon';
|
|
5
|
-
|
|
6
|
-
type Props = React.ComponentProps<typeof SvgIcon>;
|
|
7
|
-
|
|
8
|
-
const Ukraine = React.forwardRef(function Ukraine(props: Props, ref: React.Ref<SVGSVGElement>) {
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
return (
|
|
11
|
-
<SvgIcon viewBox="0 0 512 512" {...props} ref={ref} title={t('flag.ukraine')}>
|
|
12
|
-
<path
|
|
13
|
-
d="M0 248v121.6C0 396.8 21.6 416 48 416h400c26.4 0 48-19.2 48-46.4V248H0z"
|
|
14
|
-
fill="#fdce0c"
|
|
15
|
-
/>
|
|
16
|
-
<path d="M248 248l197.6 168c26.4 0 50.4-19.2 50.4-46.4V248H248z" fill="#f4ba00" />
|
|
17
|
-
<path
|
|
18
|
-
d="M448 80H48C21.6 80 0 99.2 0 126.4V248h496V126.4c0-27.2-21.6-46.4-48-46.4z"
|
|
19
|
-
fill="#44c1ef"
|
|
20
|
-
/>
|
|
21
|
-
<path d="M448 80H48l200 168h248V126.4c0-27.2-21.6-46.4-48-46.4z" fill="#18b4ea" />
|
|
22
|
-
<path d="M496 368.8c0 29.6-21.6 47.2-48 47.2H48c-26.4 0-48-20.8-48-48" fill="#f2a700" />
|
|
23
|
-
<path d="M48 80h400c26.4 0 48 19.2 48 46.4V216" fill="#10a2e2" />
|
|
24
|
-
</SvgIcon>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
Ukraine.displayName = 'Ukraine';
|
|
29
|
-
|
|
30
|
-
export { Ukraine };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
|
|
4
|
-
import { SvgIcon } from '../SvgIcon';
|
|
5
|
-
|
|
6
|
-
type Props = React.ComponentProps<typeof SvgIcon>;
|
|
7
|
-
|
|
8
|
-
const Usa = React.forwardRef(function Usa(props: Props, ref: React.Ref<SVGSVGElement>) {
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
return (
|
|
11
|
-
<SvgIcon viewBox="0 0 512 512" {...props} ref={ref} title={t('flag.usa')}>
|
|
12
|
-
<path
|
|
13
|
-
d="M473.655 88.276H38.345C17.167 88.276 0 105.443 0 126.621V385.38c0 21.177 17.167 38.345 38.345 38.345h435.31c21.177 0 38.345-17.167 38.345-38.345V126.621c0-21.178-17.167-38.345-38.345-38.345z"
|
|
14
|
-
fill="#f5f5f5"
|
|
15
|
-
/>
|
|
16
|
-
<path
|
|
17
|
-
d="M2.109 114.08H509.89c-5.196-15.017-19.452-25.804-36.235-25.804H38.345c-16.784 0-31.039 10.787-36.236 25.804zM0 191.49h512v25.803H0zm0-51.61h512v25.803H0zm0 120.194a8.829 8.829 0 008.828 8.828H512v-25.804H0v16.976zm0 86.246h512v25.804H0zm509.891 51.6H2.109c5.197 15.017 19.453 25.804 36.236 25.804h435.31c16.784 0 31.039-10.787 36.236-25.804zM0 294.71h512v25.803H0z"
|
|
18
|
-
fill="#ff4b55"
|
|
19
|
-
/>
|
|
20
|
-
<path
|
|
21
|
-
d="M8.828 268.902h220.69a8.829 8.829 0 008.828-8.828V97.103a8.828 8.828 0 00-8.828-8.828H38.345C17.167 88.276 0 105.443 0 126.621v133.453a8.828 8.828 0 008.828 8.828z"
|
|
22
|
-
fill="#41479b"
|
|
23
|
-
/>
|
|
24
|
-
<path
|
|
25
|
-
d="M24.789 108.537l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.669 1.864 5.889c.242.762-.627 1.394-1.278.928L24 122.841l-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.669c-.643-.476-.312-1.496.488-1.502l6.177-.047 1.954-5.86c.252-.76 1.324-.76 1.578-.001zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928L24 153.496l-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.324-.759 1.578-.001zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928L24 184.151l-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.76 1.324-.76 1.578-.001zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928L24 214.805l-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.76 1.324-.76 1.578-.001zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928L24 245.459l-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.324-.759 1.578-.001zm23.793-107.588l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.325-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.325-.758 1.578 0zm23.793-106.992l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.669 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.669c-.643-.476-.312-1.496.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.325-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.325-.758 1.578 0zm23.794-107.588l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.758 1.325-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.758 1.325-.758 1.578 0zm23.793-106.992l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.669 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.026-3.591-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.669c-.643-.476-.312-1.496.488-1.502l6.177-.047 1.954-5.86c.253-.76 1.326-.76 1.579-.001zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.026-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.758 1.326-.758 1.579 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.026-3.593-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.758 1.326-.758 1.579.001zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.026-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.759 1.326-.759 1.579 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.026-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.758 1.326-.758 1.579 0zm23.793-107.588l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.758 1.325-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.253-.758 1.325-.758 1.578 0zm23.794-106.992l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.669 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.669c-.643-.476-.312-1.496.488-1.502l6.177-.047 1.954-5.86c.251-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.758 1.325-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.251-.758 1.325-.758 1.578 0zm23.793-107.588l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.325-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.325-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.325-.758 1.578 0zm23.794-106.992l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.669 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.466-1.518-.166-1.278-.928l1.864-5.889-4.969-3.669c-.643-.476-.312-1.496.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.324-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.324-.758 1.578 0zm0 30.655l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.165-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.324-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.027.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.474-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.759 1.324-.759 1.578 0zm0 30.654l1.954 5.86 6.177.047c.8.007 1.131 1.026.488 1.502l-4.969 3.67 1.864 5.889c.242.762-.627 1.394-1.278.928l-5.025-3.592-5.025 3.592c-.651.465-1.518-.166-1.278-.928l1.864-5.889-4.969-3.67c-.643-.476-.312-1.495.488-1.502l6.177-.047 1.954-5.86c.252-.758 1.324-.758 1.578 0z"
|
|
26
|
-
fill="#f5f5f5"
|
|
27
|
-
/>
|
|
28
|
-
</SvgIcon>
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
Usa.displayName = 'Usa';
|
|
33
|
-
|
|
34
|
-
export { Usa };
|
package/src/lib/constants.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import ActionBar from 'verdaccio-ui/components/ActionBar';
|
|
4
|
-
import { render, cleanup } from 'verdaccio-ui/utils/test-react-testing-library';
|
|
5
|
-
|
|
6
|
-
import { DetailContext } from '../../context';
|
|
7
|
-
import { DetailContextProps } from '../../version-config';
|
|
8
|
-
|
|
9
|
-
const detailContextValue: DetailContextProps = {
|
|
10
|
-
packageName: 'foo',
|
|
11
|
-
readMe: 'test',
|
|
12
|
-
enableLoading: () => {},
|
|
13
|
-
isLoading: false,
|
|
14
|
-
hasNotBeenFound: false,
|
|
15
|
-
packageMeta: {
|
|
16
|
-
_uplinks: {},
|
|
17
|
-
latest: {
|
|
18
|
-
name: 'verdaccio-ui/local-storage',
|
|
19
|
-
version: '8.0.1-next.1',
|
|
20
|
-
dist: {
|
|
21
|
-
fileCount: 0,
|
|
22
|
-
unpackedSize: 0,
|
|
23
|
-
tarball: 'http://localhost:8080/bootstrap/-/bootstrap-4.3.1.tgz',
|
|
24
|
-
},
|
|
25
|
-
homepage: 'https://verdaccio.org',
|
|
26
|
-
bugs: {
|
|
27
|
-
url: 'https://github.com/verdaccio/monorepo/issues',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const ComponentToBeRendered: React.FC<{ contextValue: DetailContextProps }> = ({
|
|
34
|
-
contextValue,
|
|
35
|
-
}) => (
|
|
36
|
-
<DetailContext.Provider value={contextValue}>
|
|
37
|
-
<ActionBar />
|
|
38
|
-
</DetailContext.Provider>
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
describe('<ActionBar /> component', () => {
|
|
42
|
-
afterEach(() => {
|
|
43
|
-
cleanup();
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
test('should render the component in default state', () => {
|
|
47
|
-
const { container } = render(<ComponentToBeRendered contextValue={detailContextValue} />);
|
|
48
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
test('when there is no action bar data', () => {
|
|
52
|
-
const packageMeta = {
|
|
53
|
-
...detailContextValue.packageMeta,
|
|
54
|
-
latest: {
|
|
55
|
-
...detailContextValue.packageMeta.latest,
|
|
56
|
-
homepage: undefined,
|
|
57
|
-
bugs: undefined,
|
|
58
|
-
dist: {
|
|
59
|
-
...detailContextValue.packageMeta.latest.dist,
|
|
60
|
-
tarball: undefined,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const { container } = render(
|
|
66
|
-
<ComponentToBeRendered contextValue={{ ...detailContextValue, packageMeta }} />
|
|
67
|
-
);
|
|
68
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
test('when there is a button to download a tarball', () => {
|
|
72
|
-
const { getByTitle } = render(
|
|
73
|
-
<ComponentToBeRendered contextValue={{ ...detailContextValue }} />
|
|
74
|
-
);
|
|
75
|
-
expect(getByTitle('Download tarball')).toBeTruthy();
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
test('when there is a button to open an issue', () => {
|
|
79
|
-
const { getByTitle } = render(
|
|
80
|
-
<ComponentToBeRendered contextValue={{ ...detailContextValue }} />
|
|
81
|
-
);
|
|
82
|
-
expect(getByTitle('Open an issue')).toBeTruthy();
|
|
83
|
-
});
|
|
84
|
-
});
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<ActionBar /> component should render the component in default state 1`] = `
|
|
4
|
-
.emotion-0 {
|
|
5
|
-
background-color: #4b5e40;
|
|
6
|
-
color: #fff;
|
|
7
|
-
margin-right: 10px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.emotion-0:hover {
|
|
11
|
-
color: #4b5e40;
|
|
12
|
-
background: #fff;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
<div
|
|
16
|
-
class="MuiBox-root MuiBox-root-1"
|
|
17
|
-
>
|
|
18
|
-
<a
|
|
19
|
-
class=""
|
|
20
|
-
href="https://verdaccio.org"
|
|
21
|
-
rel="noopener noreferrer"
|
|
22
|
-
target="_blank"
|
|
23
|
-
title="Visit homepage"
|
|
24
|
-
>
|
|
25
|
-
<span
|
|
26
|
-
class="MuiTypography-root MuiTypography-subtitle1"
|
|
27
|
-
>
|
|
28
|
-
<button
|
|
29
|
-
class="MuiButtonBase-root MuiFab-root emotion-0 emotion-1 MuiFab-sizeSmall"
|
|
30
|
-
data-testid="fab"
|
|
31
|
-
tabindex="0"
|
|
32
|
-
type="button"
|
|
33
|
-
>
|
|
34
|
-
<span
|
|
35
|
-
class="MuiFab-label"
|
|
36
|
-
>
|
|
37
|
-
<svg
|
|
38
|
-
aria-hidden="true"
|
|
39
|
-
class="MuiSvgIcon-root"
|
|
40
|
-
focusable="false"
|
|
41
|
-
viewBox="0 0 24 24"
|
|
42
|
-
>
|
|
43
|
-
<path
|
|
44
|
-
d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"
|
|
45
|
-
/>
|
|
46
|
-
</svg>
|
|
47
|
-
</span>
|
|
48
|
-
<span
|
|
49
|
-
class="MuiTouchRipple-root"
|
|
50
|
-
/>
|
|
51
|
-
</button>
|
|
52
|
-
</span>
|
|
53
|
-
</a>
|
|
54
|
-
<a
|
|
55
|
-
class=""
|
|
56
|
-
href="https://github.com/verdaccio/monorepo/issues"
|
|
57
|
-
rel="noopener noreferrer"
|
|
58
|
-
target="_blank"
|
|
59
|
-
title="Open an issue"
|
|
60
|
-
>
|
|
61
|
-
<span
|
|
62
|
-
class="MuiTypography-root MuiTypography-subtitle1"
|
|
63
|
-
>
|
|
64
|
-
<button
|
|
65
|
-
class="MuiButtonBase-root MuiFab-root emotion-0 emotion-1 MuiFab-sizeSmall"
|
|
66
|
-
data-testid="fab"
|
|
67
|
-
tabindex="0"
|
|
68
|
-
type="button"
|
|
69
|
-
>
|
|
70
|
-
<span
|
|
71
|
-
class="MuiFab-label"
|
|
72
|
-
>
|
|
73
|
-
<svg
|
|
74
|
-
aria-hidden="true"
|
|
75
|
-
class="MuiSvgIcon-root"
|
|
76
|
-
focusable="false"
|
|
77
|
-
viewBox="0 0 24 24"
|
|
78
|
-
>
|
|
79
|
-
<path
|
|
80
|
-
d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"
|
|
81
|
-
/>
|
|
82
|
-
</svg>
|
|
83
|
-
</span>
|
|
84
|
-
<span
|
|
85
|
-
class="MuiTouchRipple-root"
|
|
86
|
-
/>
|
|
87
|
-
</button>
|
|
88
|
-
</span>
|
|
89
|
-
</a>
|
|
90
|
-
<button
|
|
91
|
-
class="MuiButtonBase-root MuiFab-root emotion-0 emotion-1 MuiFab-sizeSmall"
|
|
92
|
-
data-testid="fab"
|
|
93
|
-
tabindex="0"
|
|
94
|
-
title="Download tarball"
|
|
95
|
-
type="button"
|
|
96
|
-
>
|
|
97
|
-
<span
|
|
98
|
-
class="MuiFab-label"
|
|
99
|
-
>
|
|
100
|
-
<svg
|
|
101
|
-
aria-hidden="true"
|
|
102
|
-
class="MuiSvgIcon-root"
|
|
103
|
-
focusable="false"
|
|
104
|
-
viewBox="0 0 24 24"
|
|
105
|
-
>
|
|
106
|
-
<path
|
|
107
|
-
d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"
|
|
108
|
-
/>
|
|
109
|
-
</svg>
|
|
110
|
-
</span>
|
|
111
|
-
<span
|
|
112
|
-
class="MuiTouchRipple-root"
|
|
113
|
-
/>
|
|
114
|
-
</button>
|
|
115
|
-
</div>
|
|
116
|
-
`;
|
|
117
|
-
|
|
118
|
-
exports[`<ActionBar /> component when there is no action bar data 1`] = `
|
|
119
|
-
<div
|
|
120
|
-
class="MuiBox-root MuiBox-root-2"
|
|
121
|
-
/>
|
|
122
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PackageMetaInterface } from '../../../types/packageMeta';
|
|
2
|
-
|
|
3
|
-
function isPackageVersionValid(
|
|
4
|
-
packageMeta: Partial<PackageMetaInterface>,
|
|
5
|
-
packageVersion?: string
|
|
6
|
-
): boolean {
|
|
7
|
-
if (!packageVersion || typeof packageVersion === 'undefined') {
|
|
8
|
-
// if is undefined, that means versions does not exist, we continue
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (packageMeta.versions) {
|
|
13
|
-
return Object.keys(packageMeta.versions).includes(packageVersion);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default isPackageVersionValid;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
|
-
import { Package } from '@verdaccio/types';
|
|
3
|
-
import React, { createContext, FunctionComponent, useContext, useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
import { useConfig } from 'verdaccio-ui/providers/config';
|
|
6
|
-
|
|
7
|
-
import { HEADERS } from '../../../lib/constants';
|
|
8
|
-
import { PackageMetaInterface } from '../../../types/packageMeta';
|
|
9
|
-
|
|
10
|
-
import API from './api';
|
|
11
|
-
|
|
12
|
-
type ConfigProviderProps = {
|
|
13
|
-
callReadme: (packageName: string, packageVersion?: string) => Promise<string>;
|
|
14
|
-
callDetailPage: (packageName: string, packageVersion?: string) => Promise<PackageMetaInterface>;
|
|
15
|
-
callSearch: (value: string, signal: AbortSignal) => Promise<string>;
|
|
16
|
-
getPackages: () => Promise<Package[]>;
|
|
17
|
-
doLogin: (username: string, password: string) => Promise<LoginBody>;
|
|
18
|
-
getResource: (link: string) => Promise<Blob>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export interface LoginError {
|
|
22
|
-
type: string;
|
|
23
|
-
description: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface LoginBody {
|
|
27
|
-
username?: string;
|
|
28
|
-
token?: string;
|
|
29
|
-
error?: LoginError;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
const AppAPIContext = createContext<ConfigProviderProps>({});
|
|
34
|
-
|
|
35
|
-
const APIProvider: FunctionComponent = ({ children }) => {
|
|
36
|
-
const { configOptions } = useConfig();
|
|
37
|
-
|
|
38
|
-
const buildURL = (basePath: string) => {
|
|
39
|
-
return `${configOptions?.base}-/verdaccio/${basePath}`;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const callReadme = async (packageName: string, packageVersion?: string): Promise<string> => {
|
|
43
|
-
return await API.request<string>(
|
|
44
|
-
buildURL(`package/readme/${packageName}${packageVersion ? `?v=${packageVersion}` : ''}`),
|
|
45
|
-
'GET'
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const callDetailPage = async (
|
|
50
|
-
packageName: string,
|
|
51
|
-
packageVersion?: string
|
|
52
|
-
): Promise<PackageMetaInterface> => {
|
|
53
|
-
return await API.request<PackageMetaInterface>(
|
|
54
|
-
buildURL(`sidebar/${packageName}${packageVersion ? `?v=${packageVersion}` : ''}`),
|
|
55
|
-
'GET'
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const callSearch = async (value: string, signal: AbortSignal): Promise<string> => {
|
|
60
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility
|
|
61
|
-
// FUTURE: signal is not well supported for IE and Samsung Browser
|
|
62
|
-
return API.request(buildURL(`search/${encodeURIComponent(value)}`), 'GET', {
|
|
63
|
-
signal,
|
|
64
|
-
headers: {},
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const getPackages = async (): Promise<Package[]> => {
|
|
69
|
-
return await API.request(buildURL('packages'), 'GET');
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const doLogin = async (username: string, password: string): Promise<LoginBody> => {
|
|
73
|
-
return await API.request(buildURL('login'), 'POST', {
|
|
74
|
-
body: JSON.stringify({ username, password }),
|
|
75
|
-
headers: {
|
|
76
|
-
Accept: HEADERS.JSON,
|
|
77
|
-
'Content-Type': HEADERS.JSON,
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const getResource = async (link: string): Promise<Blob> => {
|
|
83
|
-
return await API.request(link, 'GET', {
|
|
84
|
-
headers: {
|
|
85
|
-
['accept']:
|
|
86
|
-
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
|
|
87
|
-
},
|
|
88
|
-
credentials: 'include',
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const value = useMemo(
|
|
93
|
-
() => ({
|
|
94
|
-
callReadme,
|
|
95
|
-
callDetailPage,
|
|
96
|
-
callSearch,
|
|
97
|
-
getPackages,
|
|
98
|
-
doLogin,
|
|
99
|
-
getResource,
|
|
100
|
-
}),
|
|
101
|
-
[callReadme, getResource, callDetailPage, callSearch, doLogin]
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
return <AppAPIContext.Provider value={value}>{children}</AppAPIContext.Provider>;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export default APIProvider;
|
|
108
|
-
|
|
109
|
-
export const useAPI = () => useContext(AppAPIContext);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, useAPI } from './APIProvider';
|