@verdaccio/ui-theme 6.0.0-6-next.12 → 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.
Files changed (246) hide show
  1. package/.babelrc +1 -1
  2. package/.eslintrc +0 -15
  3. package/CHANGELOG.md +6 -0
  4. package/jest/setup-env.ts +4 -1
  5. package/jest/unit/components/__mocks__/token.ts +0 -1
  6. package/jest/unit/components/store/login.ts +1 -0
  7. package/package.json +34 -37
  8. package/src/App/App.test.tsx +4 -6
  9. package/src/App/App.tsx +3 -5
  10. package/src/App/AppRoute.tsx +1 -1
  11. package/src/App/Footer/Footer.test.tsx +0 -1
  12. package/src/App/Footer/Footer.tsx +3 -3
  13. package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +25 -9
  14. package/src/App/Footer/styles.ts +2 -3
  15. package/src/App/Header/Header.test.tsx +3 -5
  16. package/src/App/Header/Header.tsx +3 -5
  17. package/src/App/Header/HeaderGreetings.tsx +0 -1
  18. package/src/App/Header/HeaderLeft.tsx +0 -1
  19. package/src/App/Header/HeaderMenu.tsx +3 -3
  20. package/src/App/Header/HeaderRight.tsx +1 -2
  21. package/src/App/Header/HeaderToolTip.tsx +0 -1
  22. package/src/App/Header/HeaderToolTipIcon.tsx +10 -10
  23. package/src/App/Header/LanguageSwitch.tsx +4 -5
  24. package/src/App/Header/LoginDialog/LoginDialog.test.tsx +4 -7
  25. package/src/App/Header/LoginDialog/LoginDialog.tsx +2 -4
  26. package/src/App/Header/LoginDialog/LoginDialogCloseButton.tsx +1 -2
  27. package/src/App/Header/LoginDialog/LoginDialogForm.tsx +0 -1
  28. package/src/App/Header/LoginDialog/LoginDialogFormError.tsx +1 -2
  29. package/src/App/Header/LoginDialog/LoginDialogHeader.tsx +4 -4
  30. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +1 -2
  31. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.tsx +9 -10
  32. package/src/App/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +1 -2
  33. package/src/App/Header/RegistryInfoDialog/styles.ts +0 -1
  34. package/src/App/Header/Search/Search.test.tsx +32 -41
  35. package/src/App/Header/Search/Search.tsx +15 -58
  36. package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +392 -28
  37. package/src/App/Header/styles.ts +2 -3
  38. package/src/App/utils/loadable.tsx +2 -1
  39. package/src/components/ActionBar/ActionBar.test.tsx +5 -13
  40. package/src/components/ActionBar/ActionBar.tsx +0 -2
  41. package/src/components/ActionBar/ActionBarAction.tsx +6 -7
  42. package/src/components/ActionBar/__snapshots__/ActionBar.test.tsx.snap +198 -53
  43. package/src/components/AppBar.tsx +1 -1
  44. package/src/components/Author/Author.test.tsx +1 -3
  45. package/src/components/Author/Author.tsx +2 -4
  46. package/src/components/Author/__snapshots__/Author.test.tsx.snap +804 -48
  47. package/src/components/Author/styles.ts +0 -1
  48. package/src/components/AutoComplete/AutoComplete.tsx +85 -163
  49. package/src/components/AutoComplete/AutoCompleteV2.tsx +7 -9
  50. package/src/components/AutoComplete/styles.tsx +0 -15
  51. package/src/components/Avatar.tsx +1 -1
  52. package/src/components/Box.tsx +1 -1
  53. package/src/components/Button.tsx +1 -1
  54. package/src/components/Card.tsx +1 -1
  55. package/src/components/CardActions.tsx +1 -1
  56. package/src/components/CardContent.tsx +1 -1
  57. package/src/components/Chip.tsx +1 -1
  58. package/src/components/CircularProgress.tsx +2 -2
  59. package/src/components/CopyToClipBoard.tsx +2 -3
  60. package/src/components/Dialog.tsx +1 -1
  61. package/src/components/DialogActions.tsx +2 -2
  62. package/src/components/DialogContent.tsx +2 -2
  63. package/src/components/DialogTitle.tsx +1 -1
  64. package/src/components/Divider.tsx +1 -1
  65. package/src/components/FloatingActionButton.tsx +1 -1
  66. package/src/components/FormControl.tsx +1 -1
  67. package/src/components/FormHelperText.tsx +2 -2
  68. package/src/components/Grid.tsx +1 -1
  69. package/src/components/Heading.tsx +1 -1
  70. package/src/components/IconButton.tsx +1 -1
  71. package/src/components/Input.tsx +1 -1
  72. package/src/components/InputAdornment/InputAdornment.tsx +2 -2
  73. package/src/components/InputLabel.tsx +1 -1
  74. package/src/components/Label/Label.test.tsx +0 -1
  75. package/src/components/Label/Label.tsx +1 -2
  76. package/src/components/List.tsx +1 -1
  77. package/src/components/ListItem.tsx +1 -1
  78. package/src/components/ListItemText.tsx +1 -4
  79. package/src/components/Loading/Loading.test.tsx +0 -1
  80. package/src/components/Loading/Loading.tsx +1 -2
  81. package/src/components/Loading/Spinner/Spinner.test.tsx +1 -2
  82. package/src/components/Loading/Spinner/Spinner.tsx +1 -2
  83. package/src/components/Loading/Spinner/__snapshots__/Spinner.test.tsx.snap +114 -16
  84. package/src/components/Loading/__snapshots__/Loading.test.tsx.snap +63 -11
  85. package/src/components/Loading/styles.ts +1 -2
  86. package/src/components/Logo/Logo.test.tsx +0 -1
  87. package/src/components/Logo/Logo.tsx +1 -2
  88. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +2 -0
  89. package/src/components/Menu.tsx +1 -1
  90. package/src/components/MenuItem.tsx +1 -1
  91. package/src/components/NotFound/NotFound.tsx +1 -3
  92. package/src/components/NotFound/Notfound.test.tsx +1 -2
  93. package/src/components/NotFound/__snapshots__/Notfound.test.tsx.snap +138 -11
  94. package/src/components/NotFound/styles.ts +0 -1
  95. package/src/components/Paper.tsx +1 -1
  96. package/src/components/SnackbarContent.tsx +1 -1
  97. package/src/components/SvgIcon.tsx +1 -1
  98. package/src/components/Tab.tsx +1 -1
  99. package/src/components/Tabs.tsx +1 -1
  100. package/src/components/Text/Text.tsx +1 -1
  101. package/src/components/Text/TextConfig.ts +1 -1
  102. package/src/components/TextField/TextField.test.tsx +0 -1
  103. package/src/components/TextField/TextField.tsx +2 -2
  104. package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +216 -3
  105. package/src/components/Toolbar.tsx +1 -1
  106. package/src/components/Tooltip.tsx +1 -1
  107. package/src/design-tokens/ResetStyles.tsx +1 -1
  108. package/src/design-tokens/StyleBaseline.tsx +2 -2
  109. package/src/design-tokens/ThemeProvider.tsx +15 -12
  110. package/src/design-tokens/theme.ts +28 -26
  111. package/src/design-tokens/useTheme.ts +1 -1
  112. package/src/{design-tokens → hooks}/useLocalStorage.ts +0 -0
  113. package/src/{design-tokens → hooks}/useOnClickOutside.ts +0 -0
  114. package/src/i18n/__mocks__/loadTranslationFile.ts +5 -0
  115. package/src/i18n/config.ts +1 -15
  116. package/src/i18n/download_translations/es-ES/ui.json +17 -17
  117. package/src/i18n/download_translations/it-IT/ui.json +77 -77
  118. package/src/i18n/download_translations/tr-TR/ui.json +6 -6
  119. package/src/i18n/download_translations/vi-VN/ui.json +2 -2
  120. package/src/i18n/loadTranslationFile.ts +14 -0
  121. package/src/index.tsx +2 -1
  122. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.test.tsx +0 -2
  123. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.tsx +1 -3
  124. package/src/pages/Version/DetailContainer/Dependencies/styles.ts +0 -1
  125. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.test.tsx +1 -3
  126. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.tsx +2 -3
  127. package/src/pages/Version/DetailContainer/DetailContainer.test.tsx +0 -1
  128. package/src/pages/Version/DetailContainer/DetailContainer.tsx +1 -3
  129. package/src/pages/Version/DetailContainer/DetailContainerContent.tsx +0 -1
  130. package/src/pages/Version/DetailContainer/DetailContainerContentReadme.tsx +0 -1
  131. package/src/pages/Version/DetailContainer/DetailContainerTabs.tsx +0 -1
  132. package/src/pages/Version/DetailContainer/NoItems/NoItems.tsx +0 -1
  133. package/src/pages/Version/DetailContainer/NoItems/Noitems.test.tsx +0 -1
  134. package/src/pages/Version/DetailContainer/NoItems/__snapshots__/Noitems.test.tsx.snap +10 -1
  135. package/src/pages/Version/DetailContainer/Readme/Readme.spec.tsx +1 -2
  136. package/src/pages/Version/DetailContainer/Readme/Readme.tsx +1 -2
  137. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.test.tsx +1 -3
  138. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.tsx +1 -3
  139. package/src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap +184 -26
  140. package/src/pages/Version/DetailContainer/UpLinks/styles.ts +2 -3
  141. package/src/pages/Version/DetailContainer/Versions/Versions.test.tsx +2 -4
  142. package/src/pages/Version/DetailContainer/Versions/Versions.tsx +1 -2
  143. package/src/pages/Version/DetailContainer/Versions/VersionsHistoryList.tsx +2 -4
  144. package/src/pages/Version/DetailContainer/Versions/VersionsTagList.tsx +1 -3
  145. package/src/pages/Version/DetailContainer/Versions/styles.ts +2 -3
  146. package/src/pages/Version/DetailContainer/__snapshots__/DetailContainer.test.tsx.snap +168 -34
  147. package/src/pages/Version/DetailSidebar/DetailSidebar.tsx +0 -2
  148. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.test.tsx +0 -2
  149. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.tsx +1 -2
  150. package/src/pages/Version/DetailSidebar/DetailSidebarTitle.tsx +0 -1
  151. package/src/pages/Version/DetailSidebar/Developers/Developers.test.tsx +3 -5
  152. package/src/pages/Version/DetailSidebar/Developers/Developers.tsx +3 -5
  153. package/src/pages/Version/DetailSidebar/Developers/DevelopersTitle.tsx +0 -1
  154. package/src/pages/Version/DetailSidebar/Developers/__snapshots__/Developers.test.tsx.snap +328 -40
  155. package/src/pages/Version/DetailSidebar/Developers/styles.ts +0 -1
  156. package/src/pages/Version/DetailSidebar/Dist/Dist.test.tsx +1 -3
  157. package/src/pages/Version/DetailSidebar/Dist/Dist.tsx +1 -3
  158. package/src/pages/Version/DetailSidebar/Dist/__snapshots__/Dist.test.tsx.snap +1436 -74
  159. package/src/pages/Version/DetailSidebar/Dist/styles.ts +2 -1
  160. package/src/pages/Version/DetailSidebar/Engines/Engines.test.tsx +1 -3
  161. package/src/pages/Version/DetailSidebar/Engines/Engines.tsx +1 -3
  162. package/src/pages/Version/DetailSidebar/Engines/styles.ts +0 -1
  163. package/src/pages/Version/DetailSidebar/Install/Install.test.tsx +1 -3
  164. package/src/pages/Version/DetailSidebar/Install/Install.tsx +0 -2
  165. package/src/pages/Version/DetailSidebar/Install/InstallListItem.tsx +0 -1
  166. package/src/pages/Version/DetailSidebar/Repository/Repository.test.tsx +1 -3
  167. package/src/pages/Version/DetailSidebar/Repository/Repository.tsx +1 -3
  168. package/src/pages/Version/Version.test.tsx +1 -3
  169. package/src/pages/Version/Version.tsx +1 -3
  170. package/src/pages/Version/VersionContextProvider.tsx +0 -1
  171. package/src/pages/Version/VersionLayout.tsx +1 -1
  172. package/src/pages/Version/context.ts +1 -1
  173. package/src/pages/home/Home.tsx +0 -2
  174. package/src/pages/home/PackageList/Help/Help.test.tsx +0 -1
  175. package/src/pages/home/PackageList/Help/Help.tsx +0 -1
  176. package/src/pages/home/PackageList/Help/__snapshots__/Help.test.tsx.snap +295 -56
  177. package/src/pages/home/PackageList/Help/styles.ts +0 -1
  178. package/src/pages/home/PackageList/Package/Package.test.tsx +1 -3
  179. package/src/pages/home/PackageList/Package/Package.tsx +14 -19
  180. package/src/pages/home/PackageList/Package/Tag/Tag.test.tsx +0 -1
  181. package/src/pages/home/PackageList/Package/styles.ts +5 -6
  182. package/src/pages/home/PackageList/PackageList.tsx +0 -1
  183. package/src/pages/home/PackageList/Packagelist.test.tsx +1 -3
  184. package/src/providers/API/api.ts +1 -1
  185. package/src/providers/config/AppConfigurationProvider.tsx +3 -3
  186. package/src/store/models/configuration.ts +2 -3
  187. package/src/store/models/download.ts +1 -2
  188. package/src/store/models/index.ts +1 -0
  189. package/src/store/models/login.ts +4 -2
  190. package/src/store/models/manifest.ts +2 -2
  191. package/src/store/models/packages.ts +2 -2
  192. package/src/store/models/search.ts +5 -5
  193. package/src/store/store.ts +2 -2
  194. package/src/utils/login.test.ts +2 -3
  195. package/src/utils/package.test.ts +2 -3
  196. package/src/utils/package.ts +2 -1
  197. package/src/utils/sec-utils.ts +1 -1
  198. package/src/utils/test-react-testing-library.tsx +11 -7
  199. package/src/utils/url.test.ts +1 -1
  200. package/src/utils/url.ts +1 -0
  201. package/static/Dependencies.15768a14646212b71166.js +2 -0
  202. package/static/Dependencies.15768a14646212b71166.js.LICENSE.txt +78 -0
  203. package/static/Dist.15768a14646212b71166.js +2 -0
  204. package/static/Dist.15768a14646212b71166.js.LICENSE.txt +60 -0
  205. package/static/Engines.15768a14646212b71166.js +2 -0
  206. package/static/Engines.15768a14646212b71166.js.LICENSE.txt +66 -0
  207. package/static/Home.15768a14646212b71166.js +2 -0
  208. package/static/Home.15768a14646212b71166.js.LICENSE.txt +222 -0
  209. package/static/Install.15768a14646212b71166.js +2 -0
  210. package/static/Install.15768a14646212b71166.js.LICENSE.txt +66 -0
  211. package/static/NotFound.15768a14646212b71166.js +2 -0
  212. package/static/NotFound.15768a14646212b71166.js.LICENSE.txt +40 -0
  213. package/static/Provider.15768a14646212b71166.js +2 -0
  214. package/static/Provider.15768a14646212b71166.js.LICENSE.txt +32 -0
  215. package/static/Repository.15768a14646212b71166.js +2 -0
  216. package/static/Repository.15768a14646212b71166.js.LICENSE.txt +50 -0
  217. package/static/UpLinks.15768a14646212b71166.js +2 -0
  218. package/static/UpLinks.15768a14646212b71166.js.LICENSE.txt +56 -0
  219. package/static/Version.15768a14646212b71166.js +2 -0
  220. package/static/Version.15768a14646212b71166.js.LICENSE.txt +380 -0
  221. package/static/Versions.15768a14646212b71166.js +2 -0
  222. package/static/Versions.15768a14646212b71166.js.LICENSE.txt +64 -0
  223. package/static/index.html +1 -1
  224. package/static/main.15768a14646212b71166.js +2 -0
  225. package/static/{main.87dd0a7ff6e306a24166.js.LICENSE.txt → main.15768a14646212b71166.js.LICENSE.txt} +63 -663
  226. package/static/manifest.json +17 -3
  227. package/static/runtime.15768a14646212b71166.js +2 -0
  228. package/static/{runtime.87dd0a7ff6e306a24166.js.LICENSE.txt → runtime.15768a14646212b71166.js.LICENSE.txt} +2 -2
  229. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js +2 -0
  230. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js.LICENSE.txt +148 -0
  231. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js +2 -0
  232. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js.LICENSE.txt +218 -0
  233. package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js +2 -0
  234. package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js.LICENSE.txt +316 -0
  235. package/static/vendors.15768a14646212b71166.js +103 -0
  236. package/static/{vendors.87dd0a7ff6e306a24166.js.LICENSE.txt → vendors.15768a14646212b71166.js.LICENSE.txt} +1261 -1035
  237. package/tools/dev.server.js +0 -1
  238. package/tools/webpack.dev.config.babel.js +1 -3
  239. package/tsconfig.json +0 -2
  240. package/types/index.ts +1 -0
  241. package/src/App/Header/Search/SearchAdornment.tsx +0 -18
  242. package/src/design-tokens/emotion.ts +0 -5
  243. package/src/lib/constants.ts +0 -9
  244. package/static/main.87dd0a7ff6e306a24166.js +0 -2
  245. package/static/runtime.87dd0a7ff6e306a24166.js +0 -2
  246. package/static/vendors.87dd0a7ff6e306a24166.js +0 -2
@@ -1,5 +1,4 @@
1
1
  import styled from '@emotion/styled';
2
-
3
2
  import Chip from 'verdaccio-ui/components/Chip';
4
3
  import FloatingActionButton from 'verdaccio-ui/components/FloatingActionButton';
5
4
  import ListItem from 'verdaccio-ui/components/ListItem';
@@ -14,11 +13,13 @@ export const StyledText = styled(Text)<{ theme?: Theme }>((props) => ({
14
13
  export const DistListItem = styled(ListItem)({
15
14
  paddingLeft: 0,
16
15
  paddingRight: 0,
16
+ flexWrap: 'wrap',
17
17
  });
18
18
 
19
19
  export const DistChips = styled(Chip)({
20
20
  marginRight: 5,
21
21
  textTransform: 'capitalize',
22
+ marginTop: 5,
22
23
  });
23
24
 
24
25
  export const DownloadButton = styled(FloatingActionButton)<{ theme?: Theme }>((props) => ({
@@ -1,10 +1,8 @@
1
1
  import React from 'react';
2
-
3
- import { render, cleanup } from 'verdaccio-ui/utils/test-react-testing-library';
2
+ import { cleanup, render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import { PackageMetaInterface } from '../../../../../types/packageMeta';
6
5
  import { DetailContext } from '../../context';
7
-
8
6
  import Engine from './Engines';
9
7
 
10
8
  jest.mock('./img/node.png', () => '');
@@ -1,6 +1,5 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
-
4
3
  import Avatar from 'verdaccio-ui/components/Avatar';
5
4
  import Grid from 'verdaccio-ui/components/Grid';
6
5
  import List from 'verdaccio-ui/components/List';
@@ -8,9 +7,8 @@ import ListItemText from 'verdaccio-ui/components/ListItemText';
8
7
 
9
8
  import { DetailContext } from '../../context';
10
9
  import npm from '../Install/img/npm.svg';
11
-
12
10
  import node from './img/node.png';
13
- import { StyledText, EngineListItem } from './styles';
11
+ import { EngineListItem, StyledText } from './styles';
14
12
 
15
13
  const Engine: React.FC = () => {
16
14
  const { packageMeta } = useContext(DetailContext);
@@ -1,5 +1,4 @@
1
1
  import styled from '@emotion/styled';
2
-
3
2
  import ListItem from 'verdaccio-ui/components/ListItem';
4
3
  import Text from 'verdaccio-ui/components/Text';
5
4
  import { Theme } from 'verdaccio-ui/design-tokens/theme';
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
-
3
2
  import { render, screen } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import { DetailContext } from '../../context';
6
5
  import { DetailContextProps } from '../../version-config';
7
-
8
- import data from './__partials__/data.json';
9
6
  import Install from './Install';
7
+ import data from './__partials__/data.json';
10
8
 
11
9
  const detailContextValue: Partial<DetailContextProps> = {
12
10
  packageName: 'foo',
@@ -1,14 +1,12 @@
1
1
  import styled from '@emotion/styled';
2
2
  import React, { useContext } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
-
5
4
  import List from 'verdaccio-ui/components/List';
6
5
  import Text from 'verdaccio-ui/components/Text';
7
6
  import { Theme } from 'verdaccio-ui/design-tokens/theme';
8
7
  import { useConfig } from 'verdaccio-ui/providers/config';
9
8
 
10
9
  import { DetailContext } from '../..';
11
-
12
10
  import InstallListItem, { DependencyManager } from './InstallListItem';
13
11
 
14
12
  const StyledText = styled(Text)<{ theme?: Theme }>((props) => ({
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
-
5
4
  import Avatar from 'verdaccio-ui/components/Avatar';
6
5
  import CopyToClipBoard from 'verdaccio-ui/components/CopyToClipBoard';
7
6
  import ListItem from 'verdaccio-ui/components/ListItem';
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
-
3
2
  import { render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import { DetailContext } from '../../context';
6
5
  import { DetailContextProps } from '../../version-config';
7
-
8
- import data from './__partials__/data.json';
9
6
  import Repository from './Repository';
7
+ import data from './__partials__/data.json';
10
8
 
11
9
  const detailContextValue: DetailContextProps = {
12
10
  packageName: 'foo',
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
-
5
4
  import Avatar from 'verdaccio-ui/components/Avatar';
6
5
  import CopyToClipBoard from 'verdaccio-ui/components/CopyToClipBoard';
7
6
  import Link from 'verdaccio-ui/components/Link';
@@ -13,7 +12,6 @@ import { Theme } from 'verdaccio-ui/design-tokens/theme';
13
12
  import { isURL } from 'verdaccio-ui/utils/url';
14
13
 
15
14
  import { DetailContext } from '../../context';
16
-
17
15
  import git from './img/git.png';
18
16
 
19
17
  const StyledText = styled(Text)<{ theme?: Theme }>((props) => ({
@@ -22,7 +20,7 @@ const StyledText = styled(Text)<{ theme?: Theme }>((props) => ({
22
20
  }));
23
21
 
24
22
  const GithubLink = styled(Link)<{ theme?: Theme }>(({ theme }) => ({
25
- color: theme?.palette.type === 'light' ? theme?.palette.primary.main : theme?.palette.white,
23
+ color: theme?.palette.mode === 'light' ? theme?.palette.primary.main : theme?.palette.white,
26
24
  ':hover': {
27
25
  color: theme?.palette.dodgerBlue,
28
26
  },
@@ -1,14 +1,12 @@
1
1
  import { waitFor } from '@testing-library/dom';
2
2
  import React from 'react';
3
3
  import { MemoryRouter } from 'react-router';
4
-
5
4
  import { render } from 'verdaccio-ui/utils/test-react-testing-library';
6
5
 
7
6
  import translationEN from '../../i18n/crowdin/ui.json';
8
-
7
+ import Version from './Version';
9
8
  import data from './__partials__/data.json';
10
9
  import { DetailContext } from './context';
11
- import Version from './Version';
12
10
 
13
11
  // :-) we mock this otherways fails on render, some weird issue on material-ui
14
12
  jest.mock('verdaccio-ui/components/Avatar');
@@ -1,14 +1,12 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import { useDispatch, useSelector } from 'react-redux';
3
3
  import { useParams } from 'react-router-dom';
4
-
5
4
  import Loading from 'verdaccio-ui/components/Loading';
6
5
  import NotFound from 'verdaccio-ui/components/NotFound';
7
6
 
8
7
  import { Dispatch, RootState } from '../../store/store';
9
-
10
- import getRouterPackageName from './get-route-package-name';
11
8
  import VersionLayout from './VersionLayout';
9
+ import getRouterPackageName from './get-route-package-name';
12
10
 
13
11
  interface Params {
14
12
  scope?: string;
@@ -3,7 +3,6 @@ import { useDispatch, useSelector } from 'react-redux';
3
3
  import { useParams } from 'react-router-dom';
4
4
 
5
5
  import { Dispatch, RootState } from '../../store/store';
6
-
7
6
  import { DetailContext } from './context';
8
7
  import getRouterPackageName from './get-route-package-name';
9
8
 
@@ -1,4 +1,4 @@
1
- import Grid from '@material-ui/core/Grid';
1
+ import Grid from '@mui/material/Grid';
2
2
  import React from 'react';
3
3
 
4
4
  import DetailContainer from './DetailContainer';
@@ -1,4 +1,4 @@
1
- import { createContext, Consumer, Provider } from 'react';
1
+ import { Consumer, Provider, createContext } from 'react';
2
2
 
3
3
  import { DetailContextProps, VersionPageConsumerProps } from './version-config';
4
4
 
@@ -1,10 +1,8 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import { useDispatch, useSelector } from 'react-redux';
3
-
4
3
  import Loading from 'verdaccio-ui/components/Loading';
5
4
 
6
5
  import { Dispatch, RootState } from '../../store/store';
7
-
8
6
  import { PackageList } from './PackageList';
9
7
 
10
8
  const Home: React.FC = () => {
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import { render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import Help from './Help';
@@ -1,6 +1,5 @@
1
1
  import React, { Fragment } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
-
4
3
  import Button from 'verdaccio-ui/components/Button';
5
4
  import CardActions from 'verdaccio-ui/components/CardActions';
6
5
  import CardContent from 'verdaccio-ui/components/CardContent';
@@ -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-0 {
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-4 {
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-6 {
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 MuiPaper-elevation1 MuiPaper-rounded"
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 emotion-2 emotion-3 MuiTypography-h6 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
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-4 emotion-5"
309
+ class="emotion-7 emotion-8"
62
310
  >
63
311
  <span
64
- class="emotion-6 emotion-7"
312
+ class="emotion-9 emotion-10"
65
313
  >
66
314
  npm adduser --registry http://localhost:9000/
67
315
  </span>
68
316
  <button
69
- class="MuiButtonBase-root MuiIconButton-root"
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
- <span
76
- class="MuiIconButton-label"
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
- <svg
79
- aria-hidden="true"
80
- class="MuiSvgIcon-root"
81
- focusable="false"
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-4 emotion-5"
346
+ class="emotion-7 emotion-8"
101
347
  >
102
348
  <span
103
- class="emotion-6 emotion-7"
349
+ class="emotion-9 emotion-10"
104
350
  >
105
351
  npm publish --registry http://localhost:9000/
106
352
  </span>
107
353
  <button
108
- class="MuiButtonBase-root MuiIconButton-root"
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
- <span
115
- class="MuiIconButton-label"
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
- <svg
118
- aria-hidden="true"
119
- class="MuiSvgIcon-root"
120
- focusable="false"
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
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
- aria-disabled="false"
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="MuiButton-label"
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,5 +1,4 @@
1
1
  import styled from '@emotion/styled';
2
-
3
2
  import Card from 'verdaccio-ui/components/Card';
4
3
  import { default as Typography } from 'verdaccio-ui/components/Heading';
5
4