@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,16 +1,55 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<Help /> component should load the component in default state 1`] = `
|
|
4
|
-
.emotion-
|
|
4
|
+
.emotion-1 {
|
|
5
|
+
background-color: #fff;
|
|
6
|
+
color: rgba(0, 0, 0, 0.87);
|
|
7
|
+
-webkit-transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
8
|
+
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12);
|
|
11
|
+
overflow: hidden;
|
|
5
12
|
width: 600px;
|
|
6
13
|
margin: auto;
|
|
7
14
|
}
|
|
8
15
|
|
|
9
16
|
.emotion-2 {
|
|
17
|
+
padding: 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.emotion-2:last-child {
|
|
21
|
+
padding-bottom: 24px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.emotion-3 {
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
font-size: 1.5rem;
|
|
29
|
+
line-height: 1.334;
|
|
30
|
+
margin-bottom: 0.35em;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.emotion-5 {
|
|
34
|
+
margin: 0;
|
|
35
|
+
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
font-size: 1.25rem;
|
|
38
|
+
line-height: 1.6;
|
|
39
|
+
margin-bottom: 0.35em;
|
|
40
|
+
color: rgba(0, 0, 0, 0.6);
|
|
10
41
|
margin-bottom: 20px;
|
|
11
42
|
}
|
|
12
43
|
|
|
13
|
-
.emotion-
|
|
44
|
+
.emotion-6 {
|
|
45
|
+
margin: 0;
|
|
46
|
+
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
line-height: 1.5;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.emotion-7 {
|
|
14
53
|
display: -webkit-box;
|
|
15
54
|
display: -webkit-flex;
|
|
16
55
|
display: -ms-flexbox;
|
|
@@ -21,11 +60,10 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
|
|
21
60
|
align-items: center;
|
|
22
61
|
-webkit-box-pack: justify;
|
|
23
62
|
-webkit-justify-content: space-between;
|
|
24
|
-
-ms-flex-pack: justify;
|
|
25
63
|
justify-content: space-between;
|
|
26
64
|
}
|
|
27
65
|
|
|
28
|
-
.emotion-
|
|
66
|
+
.emotion-9 {
|
|
29
67
|
display: inline-block;
|
|
30
68
|
overflow: hidden;
|
|
31
69
|
white-space: nowrap;
|
|
@@ -34,124 +72,325 @@ exports[`<Help /> component should load the component in default state 1`] = `
|
|
|
34
72
|
font-size: 1rem;
|
|
35
73
|
}
|
|
36
74
|
|
|
75
|
+
.emotion-11 {
|
|
76
|
+
display: -webkit-inline-box;
|
|
77
|
+
display: -webkit-inline-flex;
|
|
78
|
+
display: -ms-inline-flexbox;
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
-webkit-align-items: center;
|
|
81
|
+
-webkit-box-align: center;
|
|
82
|
+
-ms-flex-align: center;
|
|
83
|
+
align-items: center;
|
|
84
|
+
-webkit-box-pack: center;
|
|
85
|
+
-ms-flex-pack: center;
|
|
86
|
+
-webkit-justify-content: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
position: relative;
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
-webkit-tap-highlight-color: transparent;
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
outline: 0;
|
|
93
|
+
border: 0;
|
|
94
|
+
margin: 0;
|
|
95
|
+
border-radius: 0;
|
|
96
|
+
padding: 0;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
-webkit-user-select: none;
|
|
99
|
+
-moz-user-select: none;
|
|
100
|
+
-ms-user-select: none;
|
|
101
|
+
user-select: none;
|
|
102
|
+
vertical-align: middle;
|
|
103
|
+
-moz-appearance: none;
|
|
104
|
+
-webkit-appearance: none;
|
|
105
|
+
-webkit-text-decoration: none;
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
color: inherit;
|
|
108
|
+
text-align: center;
|
|
109
|
+
-webkit-flex: 0 0 auto;
|
|
110
|
+
-ms-flex: 0 0 auto;
|
|
111
|
+
flex: 0 0 auto;
|
|
112
|
+
font-size: 1.5rem;
|
|
113
|
+
padding: 8px;
|
|
114
|
+
border-radius: 50%;
|
|
115
|
+
overflow: visible;
|
|
116
|
+
color: rgba(0, 0, 0, 0.54);
|
|
117
|
+
-webkit-transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
118
|
+
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
119
|
+
padding: 12px;
|
|
120
|
+
font-size: 1.75rem;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.emotion-11::-moz-focus-inner {
|
|
124
|
+
border-style: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.emotion-11.Mui-disabled {
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
cursor: default;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media print {
|
|
133
|
+
.emotion-11 {
|
|
134
|
+
-webkit-print-color-adjust: exact;
|
|
135
|
+
color-adjust: exact;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.emotion-11:hover {
|
|
140
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (hover: none) {
|
|
144
|
+
.emotion-11:hover {
|
|
145
|
+
background-color: transparent;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.emotion-11.Mui-disabled {
|
|
150
|
+
background-color: transparent;
|
|
151
|
+
color: rgba(0, 0, 0, 0.26);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.emotion-12 {
|
|
155
|
+
-webkit-user-select: none;
|
|
156
|
+
-moz-user-select: none;
|
|
157
|
+
-ms-user-select: none;
|
|
158
|
+
user-select: none;
|
|
159
|
+
width: 1em;
|
|
160
|
+
height: 1em;
|
|
161
|
+
display: inline-block;
|
|
162
|
+
fill: currentColor;
|
|
163
|
+
-webkit-flex-shrink: 0;
|
|
164
|
+
-ms-flex-negative: 0;
|
|
165
|
+
flex-shrink: 0;
|
|
166
|
+
-webkit-transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
167
|
+
transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
168
|
+
font-size: 1.5rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.emotion-13 {
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
pointer-events: none;
|
|
174
|
+
position: absolute;
|
|
175
|
+
z-index: 0;
|
|
176
|
+
top: 0;
|
|
177
|
+
right: 0;
|
|
178
|
+
bottom: 0;
|
|
179
|
+
left: 0;
|
|
180
|
+
border-radius: inherit;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.emotion-22 {
|
|
184
|
+
margin: 0;
|
|
185
|
+
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
|
186
|
+
font-weight: 400;
|
|
187
|
+
font-size: 0.875rem;
|
|
188
|
+
line-height: 1.43;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.emotion-23 {
|
|
192
|
+
display: -webkit-box;
|
|
193
|
+
display: -webkit-flex;
|
|
194
|
+
display: -ms-flexbox;
|
|
195
|
+
display: flex;
|
|
196
|
+
-webkit-align-items: center;
|
|
197
|
+
-webkit-box-align: center;
|
|
198
|
+
-ms-flex-align: center;
|
|
199
|
+
align-items: center;
|
|
200
|
+
padding: 8px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.emotion-23>:not(:first-of-type) {
|
|
204
|
+
margin-left: 8px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.emotion-24 {
|
|
208
|
+
display: -webkit-inline-box;
|
|
209
|
+
display: -webkit-inline-flex;
|
|
210
|
+
display: -ms-inline-flexbox;
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
-webkit-align-items: center;
|
|
213
|
+
-webkit-box-align: center;
|
|
214
|
+
-ms-flex-align: center;
|
|
215
|
+
align-items: center;
|
|
216
|
+
-webkit-box-pack: center;
|
|
217
|
+
-ms-flex-pack: center;
|
|
218
|
+
-webkit-justify-content: center;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
position: relative;
|
|
221
|
+
box-sizing: border-box;
|
|
222
|
+
-webkit-tap-highlight-color: transparent;
|
|
223
|
+
background-color: transparent;
|
|
224
|
+
outline: 0;
|
|
225
|
+
border: 0;
|
|
226
|
+
margin: 0;
|
|
227
|
+
border-radius: 0;
|
|
228
|
+
padding: 0;
|
|
229
|
+
cursor: pointer;
|
|
230
|
+
-webkit-user-select: none;
|
|
231
|
+
-moz-user-select: none;
|
|
232
|
+
-ms-user-select: none;
|
|
233
|
+
user-select: none;
|
|
234
|
+
vertical-align: middle;
|
|
235
|
+
-moz-appearance: none;
|
|
236
|
+
-webkit-appearance: none;
|
|
237
|
+
-webkit-text-decoration: none;
|
|
238
|
+
text-decoration: none;
|
|
239
|
+
color: inherit;
|
|
240
|
+
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
|
241
|
+
font-weight: 500;
|
|
242
|
+
font-size: 0.8125rem;
|
|
243
|
+
line-height: 1.75;
|
|
244
|
+
text-transform: uppercase;
|
|
245
|
+
min-width: 64px;
|
|
246
|
+
padding: 4px 5px;
|
|
247
|
+
border-radius: 4px;
|
|
248
|
+
-webkit-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
249
|
+
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
250
|
+
color: #4b5e40;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.emotion-24::-moz-focus-inner {
|
|
254
|
+
border-style: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.emotion-24.Mui-disabled {
|
|
258
|
+
pointer-events: none;
|
|
259
|
+
cursor: default;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@media print {
|
|
263
|
+
.emotion-24 {
|
|
264
|
+
-webkit-print-color-adjust: exact;
|
|
265
|
+
color-adjust: exact;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.emotion-24:hover {
|
|
270
|
+
-webkit-text-decoration: none;
|
|
271
|
+
text-decoration: none;
|
|
272
|
+
background-color: rgba(75, 94, 64, 0.04);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (hover: none) {
|
|
276
|
+
.emotion-24:hover {
|
|
277
|
+
background-color: transparent;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.emotion-24.Mui-disabled {
|
|
282
|
+
color: rgba(0, 0, 0, 0.26);
|
|
283
|
+
}
|
|
284
|
+
|
|
37
285
|
<div
|
|
38
|
-
class="MuiPaper-root MuiCard-root emotion-0 emotion-1
|
|
286
|
+
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 MuiCard-root emotion-0 emotion-1"
|
|
39
287
|
id="help-card"
|
|
40
288
|
>
|
|
41
289
|
<div
|
|
42
|
-
class="MuiCardContent-root"
|
|
290
|
+
class="MuiCardContent-root emotion-2"
|
|
43
291
|
>
|
|
44
292
|
<h5
|
|
45
|
-
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom"
|
|
293
|
+
class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom emotion-3"
|
|
46
294
|
id="help-card__title"
|
|
47
295
|
>
|
|
48
296
|
No Package Published Yet.
|
|
49
297
|
</h5>
|
|
50
298
|
<h6
|
|
51
|
-
class="MuiTypography-root
|
|
299
|
+
class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom emotion-4 emotion-5"
|
|
52
300
|
>
|
|
53
301
|
To publish your first package just:
|
|
54
302
|
</h6>
|
|
55
303
|
<span
|
|
56
|
-
class="MuiTypography-root MuiTypography-body1"
|
|
304
|
+
class="MuiTypography-root MuiTypography-body1 emotion-6"
|
|
57
305
|
>
|
|
58
306
|
1. Login
|
|
59
307
|
</span>
|
|
60
308
|
<div
|
|
61
|
-
class="emotion-
|
|
309
|
+
class="emotion-7 emotion-8"
|
|
62
310
|
>
|
|
63
311
|
<span
|
|
64
|
-
class="emotion-
|
|
312
|
+
class="emotion-9 emotion-10"
|
|
65
313
|
>
|
|
66
|
-
npm adduser --registry http://localhost
|
|
314
|
+
npm adduser --registry http://localhost:9000/
|
|
67
315
|
</span>
|
|
68
316
|
<button
|
|
69
|
-
|
|
317
|
+
aria-label="Copy to clipboard"
|
|
318
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeLarge emotion-11"
|
|
319
|
+
data-mui-internal-clone-element="true"
|
|
70
320
|
data-testid="copy-icon"
|
|
71
321
|
tabindex="0"
|
|
72
|
-
title="Copy to clipboard"
|
|
73
322
|
type="button"
|
|
74
323
|
>
|
|
75
|
-
<
|
|
76
|
-
|
|
324
|
+
<svg
|
|
325
|
+
aria-hidden="true"
|
|
326
|
+
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium emotion-12"
|
|
327
|
+
data-testid="FileCopyIcon"
|
|
328
|
+
focusable="false"
|
|
329
|
+
viewBox="0 0 24 24"
|
|
77
330
|
>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
viewBox="0 0 24 24"
|
|
83
|
-
>
|
|
84
|
-
<path
|
|
85
|
-
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"
|
|
86
|
-
/>
|
|
87
|
-
</svg>
|
|
88
|
-
</span>
|
|
331
|
+
<path
|
|
332
|
+
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"
|
|
333
|
+
/>
|
|
334
|
+
</svg>
|
|
89
335
|
<span
|
|
90
|
-
class="MuiTouchRipple-root"
|
|
336
|
+
class="MuiTouchRipple-root emotion-13"
|
|
91
337
|
/>
|
|
92
338
|
</button>
|
|
93
339
|
</div>
|
|
94
340
|
<span
|
|
95
|
-
class="MuiTypography-root MuiTypography-body1"
|
|
341
|
+
class="MuiTypography-root MuiTypography-body1 emotion-6"
|
|
96
342
|
>
|
|
97
343
|
2. Publish
|
|
98
344
|
</span>
|
|
99
345
|
<div
|
|
100
|
-
class="emotion-
|
|
346
|
+
class="emotion-7 emotion-8"
|
|
101
347
|
>
|
|
102
348
|
<span
|
|
103
|
-
class="emotion-
|
|
349
|
+
class="emotion-9 emotion-10"
|
|
104
350
|
>
|
|
105
|
-
npm publish --registry http://localhost
|
|
351
|
+
npm publish --registry http://localhost:9000/
|
|
106
352
|
</span>
|
|
107
353
|
<button
|
|
108
|
-
|
|
354
|
+
aria-label="Copy to clipboard"
|
|
355
|
+
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeLarge emotion-11"
|
|
356
|
+
data-mui-internal-clone-element="true"
|
|
109
357
|
data-testid="copy-icon"
|
|
110
358
|
tabindex="0"
|
|
111
|
-
title="Copy to clipboard"
|
|
112
359
|
type="button"
|
|
113
360
|
>
|
|
114
|
-
<
|
|
115
|
-
|
|
361
|
+
<svg
|
|
362
|
+
aria-hidden="true"
|
|
363
|
+
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium emotion-12"
|
|
364
|
+
data-testid="FileCopyIcon"
|
|
365
|
+
focusable="false"
|
|
366
|
+
viewBox="0 0 24 24"
|
|
116
367
|
>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
viewBox="0 0 24 24"
|
|
122
|
-
>
|
|
123
|
-
<path
|
|
124
|
-
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"
|
|
125
|
-
/>
|
|
126
|
-
</svg>
|
|
127
|
-
</span>
|
|
368
|
+
<path
|
|
369
|
+
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"
|
|
370
|
+
/>
|
|
371
|
+
</svg>
|
|
128
372
|
<span
|
|
129
|
-
class="MuiTouchRipple-root"
|
|
373
|
+
class="MuiTouchRipple-root emotion-13"
|
|
130
374
|
/>
|
|
131
375
|
</button>
|
|
132
376
|
</div>
|
|
133
377
|
<span
|
|
134
|
-
class="MuiTypography-root MuiTypography-body2"
|
|
378
|
+
class="MuiTypography-root MuiTypography-body2 emotion-22"
|
|
135
379
|
>
|
|
136
|
-
3. Refresh this page
|
|
380
|
+
3. Refresh this page
|
|
137
381
|
</span>
|
|
138
382
|
</div>
|
|
139
383
|
<div
|
|
140
|
-
class="MuiCardActions-root MuiCardActions-spacing"
|
|
384
|
+
class="MuiCardActions-root MuiCardActions-spacing emotion-23"
|
|
141
385
|
>
|
|
142
386
|
<a
|
|
143
|
-
|
|
144
|
-
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-textSizeSmall MuiButton-sizeSmall"
|
|
387
|
+
class="MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButtonBase-root emotion-24"
|
|
145
388
|
href="https://verdaccio.org/docs/en/installation"
|
|
146
389
|
tabindex="0"
|
|
147
390
|
>
|
|
391
|
+
Learn More
|
|
148
392
|
<span
|
|
149
|
-
class="
|
|
150
|
-
>
|
|
151
|
-
Learn More
|
|
152
|
-
</span>
|
|
153
|
-
<span
|
|
154
|
-
class="MuiTouchRipple-root"
|
|
393
|
+
class="MuiTouchRipple-root emotion-13"
|
|
155
394
|
/>
|
|
156
395
|
</a>
|
|
157
396
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router';
|
|
3
|
+
import { cleanup, renderWithStore } from 'verdaccio-ui/utils/test-react-testing-library';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
5
|
+
import { store } from '../../../../store';
|
|
6
6
|
import Package from './Package';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -29,7 +29,7 @@ describe('<Package /> component', () => {
|
|
|
29
29
|
keywords: ['verdaccio'],
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const wrapper =
|
|
32
|
+
const wrapper = renderWithStore(
|
|
33
33
|
<MemoryRouter>
|
|
34
34
|
<Package
|
|
35
35
|
author={props.author}
|
|
@@ -39,7 +39,8 @@ describe('<Package /> component', () => {
|
|
|
39
39
|
time={props.time}
|
|
40
40
|
version={props.version}
|
|
41
41
|
/>
|
|
42
|
-
</MemoryRouter
|
|
42
|
+
</MemoryRouter>,
|
|
43
|
+
store
|
|
43
44
|
);
|
|
44
45
|
|
|
45
46
|
// FUTURE: improve this expectectations
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { css } from '@emotion/
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import BugReport from '@
|
|
4
|
-
import DownloadIcon from '@
|
|
5
|
-
import HomeIcon from '@
|
|
3
|
+
import BugReport from '@mui/icons-material/BugReport';
|
|
4
|
+
import DownloadIcon from '@mui/icons-material/CloudDownload';
|
|
5
|
+
import HomeIcon from '@mui/icons-material/Home';
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
|
|
8
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import Grid from 'verdaccio-ui/components/Grid';
|
|
10
|
-
import {
|
|
10
|
+
import { FileBinary, Law, Time, Version } from 'verdaccio-ui/components/Icons';
|
|
11
11
|
import Link from 'verdaccio-ui/components/Link';
|
|
12
12
|
import ListItem from 'verdaccio-ui/components/ListItem';
|
|
13
13
|
import Tooltip from 'verdaccio-ui/components/Tooltip';
|
|
14
14
|
import { Theme } from 'verdaccio-ui/design-tokens/theme';
|
|
15
|
-
import { useAPI } from 'verdaccio-ui/providers/API/APIProvider';
|
|
16
|
-
import { useConfig } from 'verdaccio-ui/providers/config';
|
|
17
15
|
import fileSizeSI from 'verdaccio-ui/utils/file-size';
|
|
18
16
|
import { formatDate, formatDateDistance, getAuthorName } from 'verdaccio-ui/utils/package';
|
|
19
|
-
import { extractFileName, downloadFile } from 'verdaccio-ui/utils/url';
|
|
20
17
|
import { isURL } from 'verdaccio-ui/utils/url';
|
|
21
18
|
|
|
22
|
-
import {
|
|
23
|
-
|
|
19
|
+
import { Author as PackageAuthor, PackageMetaInterface } from '../../../../../types/packageMeta';
|
|
20
|
+
import { Dispatch, RootState } from '../../../../store/store';
|
|
21
|
+
import Tag from './Tag';
|
|
24
22
|
import {
|
|
25
23
|
Author,
|
|
26
24
|
Avatar,
|
|
@@ -29,15 +27,14 @@ import {
|
|
|
29
27
|
GridRightAligned,
|
|
30
28
|
IconButton,
|
|
31
29
|
OverviewItem,
|
|
32
|
-
Wrapper,
|
|
33
30
|
PackageListItemText,
|
|
34
31
|
PackageTitle,
|
|
35
32
|
Published,
|
|
36
33
|
TagContainer,
|
|
37
34
|
Text,
|
|
35
|
+
Wrapper,
|
|
38
36
|
WrapperLink,
|
|
39
37
|
} from './styles';
|
|
40
|
-
import Tag from './Tag';
|
|
41
38
|
|
|
42
39
|
interface Bugs {
|
|
43
40
|
url: string;
|
|
@@ -72,19 +69,17 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
72
69
|
time,
|
|
73
70
|
version,
|
|
74
71
|
}) => {
|
|
72
|
+
const config = useSelector((state: RootState) => state.configuration.config);
|
|
73
|
+
const dispatch = useDispatch<Dispatch>();
|
|
75
74
|
const { t } = useTranslation();
|
|
76
|
-
const { getResource } = useAPI();
|
|
77
|
-
const { configOptions } = useConfig();
|
|
78
75
|
|
|
79
76
|
const handleDownload = useCallback(
|
|
80
77
|
async (tarballDist: string) => {
|
|
81
78
|
// FIXME: check, the dist might be different thant npmjs
|
|
82
|
-
const link = tarballDist.replace(`https://registry.npmjs.org/`,
|
|
83
|
-
|
|
84
|
-
const fileName = extractFileName(link);
|
|
85
|
-
downloadFile(fileStream, fileName);
|
|
79
|
+
const link = tarballDist.replace(`https://registry.npmjs.org/`, config.base);
|
|
80
|
+
dispatch.download.getTarball({ link });
|
|
86
81
|
},
|
|
87
|
-
[
|
|
82
|
+
[dispatch, config]
|
|
88
83
|
);
|
|
89
84
|
|
|
90
85
|
const renderVersionInfo = (): React.ReactNode =>
|
|
@@ -137,7 +132,7 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
137
132
|
isURL(homepage) && (
|
|
138
133
|
<Link external={true} to={homepage}>
|
|
139
134
|
<Tooltip aria-label={t('package.homepage')} title={t('package.visit-home-page')}>
|
|
140
|
-
<IconButton aria-label={t('package.homepage')}>
|
|
135
|
+
<IconButton aria-label={t('package.homepage')} size="large">
|
|
141
136
|
<HomeIcon />
|
|
142
137
|
</IconButton>
|
|
143
138
|
</Tooltip>
|
|
@@ -149,7 +144,7 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
149
144
|
isURL(bugs.url) && (
|
|
150
145
|
<Link external={true} to={bugs.url}>
|
|
151
146
|
<Tooltip aria-label={t('package.bugs')} title={t('package.open-an-issue')}>
|
|
152
|
-
<IconButton aria-label={t('package.bugs')}>
|
|
147
|
+
<IconButton aria-label={t('package.bugs')} size="large">
|
|
153
148
|
<BugReport />
|
|
154
149
|
</IconButton>
|
|
155
150
|
</Tooltip>
|
|
@@ -159,7 +154,6 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
159
154
|
const renderDownloadLink = (): React.ReactNode =>
|
|
160
155
|
dist?.tarball &&
|
|
161
156
|
isURL(dist.tarball) && (
|
|
162
|
-
// eslint-disable-next-line
|
|
163
157
|
<Link
|
|
164
158
|
external={true}
|
|
165
159
|
onClick={() => {
|
|
@@ -169,7 +163,7 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
169
163
|
<Tooltip
|
|
170
164
|
aria-label={t('package.download', { what: t('package.the-tar-file') })}
|
|
171
165
|
title={t('package.tarball')}>
|
|
172
|
-
<IconButton aria-label={t('package.download')}>
|
|
166
|
+
<IconButton aria-label={t('package.download')} size="large">
|
|
173
167
|
<DownloadIcon />
|
|
174
168
|
</IconButton>
|
|
175
169
|
</Tooltip>
|
|
@@ -179,7 +173,7 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
179
173
|
const renderPrimaryComponent = (): React.ReactNode => {
|
|
180
174
|
return (
|
|
181
175
|
<Grid container={true} item={true} xs={12}>
|
|
182
|
-
<Grid item={true} xs={
|
|
176
|
+
<Grid item={true} xs={11}>
|
|
183
177
|
<WrapperLink to={`/-/web/detail/${packageName}`}>
|
|
184
178
|
<PackageTitle className="package-title">{packageName}</PackageTitle>
|
|
185
179
|
</WrapperLink>
|
|
@@ -211,8 +205,6 @@ const Package: React.FC<PackageInterface> = ({
|
|
|
211
205
|
const renderPackageListItemText = (): React.ReactNode => (
|
|
212
206
|
<PackageListItemText
|
|
213
207
|
className="package-link"
|
|
214
|
-
// @ts-ignore
|
|
215
|
-
component="div"
|
|
216
208
|
primary={renderPrimaryComponent()}
|
|
217
209
|
secondary={renderSecondaryComponent()}
|
|
218
210
|
/>
|
|
@@ -236,7 +228,7 @@ export default Package;
|
|
|
236
228
|
|
|
237
229
|
const iconStyle = ({ theme }: { theme: Theme }) => css`
|
|
238
230
|
margin: 2px 10px 0 0;
|
|
239
|
-
fill: ${theme?.palette.
|
|
231
|
+
fill: ${theme?.palette.mode === 'light' ? theme?.palette.greyLight2 : theme?.palette.white};
|
|
240
232
|
`;
|
|
241
233
|
|
|
242
234
|
const StyledVersion = styled(Version)`
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
|
-
|
|
4
3
|
import { default as Photo } from 'verdaccio-ui/components/Avatar';
|
|
5
4
|
import Grid from 'verdaccio-ui/components/Grid';
|
|
6
5
|
import { default as MuiIconButton } from 'verdaccio-ui/components/IconButton';
|
|
@@ -14,7 +13,7 @@ export const OverviewItem = styled('span')<{ theme?: Theme }>(({ theme }) => ({
|
|
|
14
13
|
display: 'flex',
|
|
15
14
|
alignItems: 'center',
|
|
16
15
|
margin: '0 0 0 16px',
|
|
17
|
-
color: theme?.palette.
|
|
16
|
+
color: theme?.palette.mode === 'light' ? theme?.palette.greyLight2 : theme?.palette.white,
|
|
18
17
|
fontSize: 12,
|
|
19
18
|
[`@media (max-width: ${theme?.breakPoints.medium}px)`]: {
|
|
20
19
|
':nth-of-type(3)': {
|
|
@@ -29,14 +28,14 @@ export const OverviewItem = styled('span')<{ theme?: Theme }>(({ theme }) => ({
|
|
|
29
28
|
}));
|
|
30
29
|
|
|
31
30
|
export const Published = styled('span')<{ theme?: Theme }>(({ theme }) => ({
|
|
32
|
-
color: theme?.palette.
|
|
31
|
+
color: theme?.palette.mode === 'light' ? theme?.palette.greyLight2 : theme?.palette.white,
|
|
33
32
|
margin: '0 5px 0 0',
|
|
34
33
|
}));
|
|
35
34
|
|
|
36
35
|
export const Text = styled(Label)<{ theme?: Theme }>(({ theme }) => ({
|
|
37
36
|
fontSize: '12px',
|
|
38
37
|
fontWeight: theme?.fontWeight.semiBold,
|
|
39
|
-
color: theme?.palette.
|
|
38
|
+
color: theme?.palette.mode === 'light' ? theme?.palette.greyLight2 : theme?.palette.white,
|
|
40
39
|
}));
|
|
41
40
|
|
|
42
41
|
export const Details = styled('span')({
|
|
@@ -65,7 +64,7 @@ export const PackageTitle = styled('span')<{ theme?: Theme }>(({ theme }) => ({
|
|
|
65
64
|
fontSize: 20,
|
|
66
65
|
display: 'block',
|
|
67
66
|
marginBottom: 12,
|
|
68
|
-
color: theme?.palette.
|
|
67
|
+
color: theme?.palette.mode == 'dark' ? theme?.palette.dodgerBlue : theme?.palette.eclipse,
|
|
69
68
|
cursor: 'pointer',
|
|
70
69
|
[`@media (max-width: ${theme?.breakPoints.small}px)`]: {
|
|
71
70
|
fontSize: 14,
|
|
@@ -106,7 +105,7 @@ export const PackageListItemText = styled(ListItemText)({
|
|
|
106
105
|
});
|
|
107
106
|
|
|
108
107
|
export const Description = styled(MuiText)<{ theme?: Theme }>(({ theme }) => ({
|
|
109
|
-
color: theme?.palette.
|
|
108
|
+
color: theme?.palette.mode === 'light' ? theme?.palette.greyDark2 : theme?.palette.white,
|
|
110
109
|
fontSize: '14px',
|
|
111
110
|
paddingRight: 0,
|
|
112
111
|
}));
|