@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.
- package/.babelrc +1 -1
- package/.eslintrc +0 -15
- package/CHANGELOG.md +6 -0
- package/jest/setup-env.ts +4 -1
- package/jest/unit/components/__mocks__/token.ts +0 -1
- package/jest/unit/components/store/login.ts +1 -0
- package/package.json +34 -37
- package/src/App/App.test.tsx +4 -6
- package/src/App/App.tsx +3 -5
- package/src/App/AppRoute.tsx +1 -1
- package/src/App/Footer/Footer.test.tsx +0 -1
- package/src/App/Footer/Footer.tsx +3 -3
- package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +25 -9
- package/src/App/Footer/styles.ts +2 -3
- package/src/App/Header/Header.test.tsx +3 -5
- package/src/App/Header/Header.tsx +3 -5
- package/src/App/Header/HeaderGreetings.tsx +0 -1
- package/src/App/Header/HeaderLeft.tsx +0 -1
- package/src/App/Header/HeaderMenu.tsx +3 -3
- 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 +4 -5
- package/src/App/Header/LoginDialog/LoginDialog.test.tsx +4 -7
- package/src/App/Header/LoginDialog/LoginDialog.tsx +2 -4
- 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 -2
- 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 +32 -41
- package/src/App/Header/Search/Search.tsx +15 -58
- package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +392 -28
- package/src/App/Header/styles.ts +2 -3
- package/src/App/utils/loadable.tsx +2 -1
- package/src/components/ActionBar/ActionBar.test.tsx +5 -13
- package/src/components/ActionBar/ActionBar.tsx +0 -2
- package/src/components/ActionBar/ActionBarAction.tsx +6 -7
- 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 -3
- 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 +7 -9
- 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/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 +1 -2
- 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/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/__mocks__/loadTranslationFile.ts +5 -0
- package/src/i18n/config.ts +1 -15
- package/src/i18n/download_translations/es-ES/ui.json +17 -17
- package/src/i18n/download_translations/it-IT/ui.json +77 -77
- package/src/i18n/download_translations/tr-TR/ui.json +6 -6
- package/src/i18n/download_translations/vi-VN/ui.json +2 -2
- package/src/i18n/loadTranslationFile.ts +14 -0
- package/src/index.tsx +2 -1
- 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 -3
- 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 +2 -4
- 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 +1 -3
- package/src/pages/Version/Version.tsx +1 -3
- package/src/pages/Version/VersionContextProvider.tsx +0 -1
- package/src/pages/Version/VersionLayout.tsx +1 -1
- package/src/pages/Version/context.ts +1 -1
- package/src/pages/home/Home.tsx +0 -2
- 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 +295 -56
- package/src/pages/home/PackageList/Help/styles.ts +0 -1
- package/src/pages/home/PackageList/Package/Package.test.tsx +1 -3
- package/src/pages/home/PackageList/Package/Package.tsx +14 -19
- 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 +0 -1
- package/src/pages/home/PackageList/Packagelist.test.tsx +1 -3
- package/src/providers/API/api.ts +1 -1
- package/src/providers/config/AppConfigurationProvider.tsx +3 -3
- package/src/store/models/configuration.ts +2 -3
- package/src/store/models/download.ts +1 -2
- package/src/store/models/index.ts +1 -0
- package/src/store/models/login.ts +4 -2
- package/src/store/models/manifest.ts +2 -2
- package/src/store/models/packages.ts +2 -2
- package/src/store/models/search.ts +5 -5
- package/src/store/store.ts +2 -2
- package/src/utils/login.test.ts +2 -3
- 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 +11 -7
- 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.87dd0a7ff6e306a24166.js.LICENSE.txt → main.15768a14646212b71166.js.LICENSE.txt} +63 -663
- package/static/manifest.json +17 -3
- package/static/runtime.15768a14646212b71166.js +2 -0
- package/static/{runtime.87dd0a7ff6e306a24166.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.87dd0a7ff6e306a24166.js.LICENSE.txt → vendors.15768a14646212b71166.js.LICENSE.txt} +1261 -1035
- package/tools/dev.server.js +0 -1
- package/tools/webpack.dev.config.babel.js +1 -3
- package/tsconfig.json +0 -2
- package/types/index.ts +1 -0
- package/src/App/Header/Search/SearchAdornment.tsx +0 -18
- package/src/design-tokens/emotion.ts +0 -5
- package/src/lib/constants.ts +0 -9
- package/static/main.87dd0a7ff6e306a24166.js +0 -2
- package/static/runtime.87dd0a7ff6e306a24166.js +0 -2
- package/static/vendors.87dd0a7ff6e306a24166.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as MaterialUITextField, TextFieldProps } from '@material
|
|
1
|
+
import { default as MaterialUITextField, TextFieldProps } from '@mui/material/TextField';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
|
|
4
4
|
// The default element type of MUI's TextField is 'div'
|
|
@@ -11,7 +11,7 @@ const TextField = forwardRef<TextFieldRef, TextFieldProps>(function TextField(
|
|
|
11
11
|
return (
|
|
12
12
|
<MaterialUITextField
|
|
13
13
|
{...props}
|
|
14
|
-
|
|
14
|
+
ref={ref}
|
|
15
15
|
InputProps={{
|
|
16
16
|
...InputProps,
|
|
17
17
|
classes,
|
|
@@ -1,19 +1,232 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<TextField /> component should load the component in default state 1`] = `
|
|
4
|
+
.emotion-0 {
|
|
5
|
+
display: -webkit-inline-box;
|
|
6
|
+
display: -webkit-inline-flex;
|
|
7
|
+
display: -ms-inline-flexbox;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
-webkit-flex-direction: column;
|
|
10
|
+
-ms-flex-direction: column;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
position: relative;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin: 0;
|
|
16
|
+
border: 0;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.emotion-1 {
|
|
21
|
+
font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
font-size: 1rem;
|
|
24
|
+
line-height: 1.4375em;
|
|
25
|
+
color: rgba(0, 0, 0, 0.87);
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
position: relative;
|
|
28
|
+
cursor: text;
|
|
29
|
+
display: -webkit-inline-box;
|
|
30
|
+
display: -webkit-inline-flex;
|
|
31
|
+
display: -ms-inline-flexbox;
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
-webkit-align-items: center;
|
|
34
|
+
-webkit-box-align: center;
|
|
35
|
+
-ms-flex-align: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
position: relative;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.emotion-1.Mui-disabled {
|
|
42
|
+
color: rgba(0, 0, 0, 0.38);
|
|
43
|
+
cursor: default;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.emotion-1:hover .MuiOutlinedInput-notchedOutline {
|
|
47
|
+
border-color: rgba(0, 0, 0, 0.87);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (hover: none) {
|
|
51
|
+
.emotion-1:hover .MuiOutlinedInput-notchedOutline {
|
|
52
|
+
border-color: rgba(0, 0, 0, 0.23);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.emotion-1.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
57
|
+
border-color: #4b5e40;
|
|
58
|
+
border-width: 2px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.emotion-1.Mui-error .MuiOutlinedInput-notchedOutline {
|
|
62
|
+
border-color: #d32f2f;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.emotion-1.Mui-disabled .MuiOutlinedInput-notchedOutline {
|
|
66
|
+
border-color: rgba(0, 0, 0, 0.26);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.emotion-2 {
|
|
70
|
+
font: inherit;
|
|
71
|
+
letter-spacing: inherit;
|
|
72
|
+
color: currentColor;
|
|
73
|
+
padding: 4px 0 5px;
|
|
74
|
+
border: 0;
|
|
75
|
+
box-sizing: content-box;
|
|
76
|
+
background: none;
|
|
77
|
+
height: 1.4375em;
|
|
78
|
+
margin: 0;
|
|
79
|
+
-webkit-tap-highlight-color: transparent;
|
|
80
|
+
display: block;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
width: 100%;
|
|
83
|
+
-webkit-animation-name: mui-auto-fill-cancel;
|
|
84
|
+
animation-name: mui-auto-fill-cancel;
|
|
85
|
+
-webkit-animation-duration: 10ms;
|
|
86
|
+
animation-duration: 10ms;
|
|
87
|
+
padding: 16.5px 14px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.emotion-2::-webkit-input-placeholder {
|
|
91
|
+
color: currentColor;
|
|
92
|
+
opacity: 0.42;
|
|
93
|
+
-webkit-transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
94
|
+
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.emotion-2::-moz-placeholder {
|
|
98
|
+
color: currentColor;
|
|
99
|
+
opacity: 0.42;
|
|
100
|
+
-webkit-transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
101
|
+
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.emotion-2:-ms-input-placeholder {
|
|
105
|
+
color: currentColor;
|
|
106
|
+
opacity: 0.42;
|
|
107
|
+
-webkit-transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
108
|
+
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.emotion-2::-ms-input-placeholder {
|
|
112
|
+
color: currentColor;
|
|
113
|
+
opacity: 0.42;
|
|
114
|
+
-webkit-transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
115
|
+
transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.emotion-2:focus {
|
|
119
|
+
outline: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.emotion-2:invalid {
|
|
123
|
+
box-shadow: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.emotion-2::-webkit-search-decoration {
|
|
127
|
+
-webkit-appearance: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2::-webkit-input-placeholder {
|
|
131
|
+
opacity: 0!important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2::-moz-placeholder {
|
|
135
|
+
opacity: 0!important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2:-ms-input-placeholder {
|
|
139
|
+
opacity: 0!important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2::-ms-input-placeholder {
|
|
143
|
+
opacity: 0!important;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2:focus::-webkit-input-placeholder {
|
|
147
|
+
opacity: 0.42;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2:focus::-moz-placeholder {
|
|
151
|
+
opacity: 0.42;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2:focus:-ms-input-placeholder {
|
|
155
|
+
opacity: 0.42;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
label[data-shrink=false]+.MuiInputBase-formControl .emotion-2:focus::-ms-input-placeholder {
|
|
159
|
+
opacity: 0.42;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.emotion-2.Mui-disabled {
|
|
163
|
+
opacity: 1;
|
|
164
|
+
-webkit-text-fill-color: rgba(0, 0, 0, 0.38);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.emotion-2:-webkit-autofill {
|
|
168
|
+
-webkit-animation-duration: 5000s;
|
|
169
|
+
animation-duration: 5000s;
|
|
170
|
+
-webkit-animation-name: mui-auto-fill;
|
|
171
|
+
animation-name: mui-auto-fill;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.emotion-2:-webkit-autofill {
|
|
175
|
+
border-radius: inherit;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.emotion-3 {
|
|
179
|
+
text-align: left;
|
|
180
|
+
position: absolute;
|
|
181
|
+
bottom: 0;
|
|
182
|
+
right: 0;
|
|
183
|
+
top: -5px;
|
|
184
|
+
left: 0;
|
|
185
|
+
margin: 0;
|
|
186
|
+
padding: 0 8px;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
border-radius: inherit;
|
|
189
|
+
border-style: solid;
|
|
190
|
+
border-width: 1px;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
min-width: 0%;
|
|
193
|
+
border-color: rgba(0, 0, 0, 0.23);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.emotion-4 {
|
|
197
|
+
padding: 0;
|
|
198
|
+
line-height: 11px;
|
|
199
|
+
-webkit-transition: width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
|
|
200
|
+
transition: width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
|
|
201
|
+
}
|
|
202
|
+
|
|
4
203
|
<div
|
|
5
|
-
class="MuiFormControl-root MuiTextField-root"
|
|
204
|
+
class="MuiFormControl-root MuiTextField-root emotion-0"
|
|
6
205
|
>
|
|
7
206
|
<div
|
|
8
|
-
class="
|
|
207
|
+
class="MuiOutlinedInput-root MuiInputBase-root MuiInputBase-colorPrimary MuiInputBase-formControl emotion-1"
|
|
9
208
|
>
|
|
10
209
|
<input
|
|
11
210
|
aria-invalid="false"
|
|
12
|
-
class="MuiInputBase-input
|
|
211
|
+
class="MuiOutlinedInput-input MuiInputBase-input emotion-2"
|
|
13
212
|
name="test"
|
|
14
213
|
type="text"
|
|
15
214
|
value="test"
|
|
16
215
|
/>
|
|
216
|
+
<fieldset
|
|
217
|
+
aria-hidden="true"
|
|
218
|
+
class="MuiOutlinedInput-notchedOutline emotion-3"
|
|
219
|
+
>
|
|
220
|
+
<legend
|
|
221
|
+
class="emotion-4"
|
|
222
|
+
>
|
|
223
|
+
<span
|
|
224
|
+
class="notranslate"
|
|
225
|
+
>
|
|
226
|
+
|
|
227
|
+
</span>
|
|
228
|
+
</legend>
|
|
229
|
+
</fieldset>
|
|
17
230
|
</div>
|
|
18
231
|
</div>
|
|
19
232
|
`;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ThemeProvider as EmotionThemeProvider } from 'emotion-theming';
|
|
1
|
+
import { StyledEngineProvider, Theme, ThemeProvider } from '@mui/material/styles';
|
|
3
2
|
import i18next from 'i18next';
|
|
4
|
-
import React, {
|
|
5
|
-
|
|
3
|
+
import React, { useCallback, useEffect } from 'react';
|
|
6
4
|
import { useConfig } from 'verdaccio-ui/providers/config';
|
|
7
5
|
|
|
8
|
-
import
|
|
9
|
-
import { getTheme, ThemeMode } from './theme';
|
|
6
|
+
import useLocalStorage from '../hooks/useLocalStorage';
|
|
10
7
|
import ThemeContext from './ThemeContext';
|
|
11
|
-
import
|
|
8
|
+
import loadDayJSLocale from './load-dayjs-locale';
|
|
9
|
+
import { ThemeMode, getTheme } from './theme';
|
|
10
|
+
|
|
11
|
+
declare module '@mui/styles/defaultTheme' {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
interface DefaultTheme extends Theme {}
|
|
14
|
+
}
|
|
12
15
|
|
|
13
|
-
const
|
|
16
|
+
const ThemeProviderWrapper: React.FC = ({ children }) => {
|
|
14
17
|
const prefersDarkMode = window.matchMedia?.('(prefers-color-scheme:dark)').matches;
|
|
15
18
|
const isDarkModeDefault = window?.__VERDACCIO_BASENAME_UI_OPTIONS?.darkMode || prefersDarkMode;
|
|
16
19
|
const currentLanguage = i18next.languages?.[0];
|
|
@@ -34,11 +37,11 @@ const ThemeProvider: React.FC = ({ children }) => {
|
|
|
34
37
|
|
|
35
38
|
return (
|
|
36
39
|
<ThemeContext.Provider value={{ isDarkMode, setIsDarkMode, language, setLanguage }}>
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
</
|
|
40
|
+
<StyledEngineProvider injectFirst={true}>
|
|
41
|
+
<ThemeProvider theme={currentTheme}>{children}</ThemeProvider>
|
|
42
|
+
</StyledEngineProvider>
|
|
40
43
|
</ThemeContext.Provider>
|
|
41
44
|
);
|
|
42
45
|
};
|
|
43
46
|
|
|
44
|
-
export default
|
|
47
|
+
export default ThemeProviderWrapper;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { adaptV4Theme, createTheme } from '@mui/material/styles';
|
|
3
2
|
import { PRIMARY_COLOR } from 'verdaccio-ui/utils/colors';
|
|
4
3
|
|
|
5
4
|
const colors = {
|
|
@@ -59,6 +58,7 @@ const fontSize = {
|
|
|
59
58
|
md: 18,
|
|
60
59
|
default: 16,
|
|
61
60
|
sm: 14,
|
|
61
|
+
ssm: 12,
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export type FontSize = keyof typeof fontSize;
|
|
@@ -92,40 +92,42 @@ type CustomizedTheme = typeof customizedTheme;
|
|
|
92
92
|
|
|
93
93
|
export const getTheme = (themeMode: ThemeMode, primaryColor: string) => {
|
|
94
94
|
const palette = applyPrimaryColor(themeMode, primaryColor);
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
95
|
+
return createTheme(
|
|
96
|
+
adaptV4Theme({
|
|
97
|
+
typography: {
|
|
98
|
+
fontFamily: [
|
|
99
|
+
'-apple-system',
|
|
100
|
+
'BlinkMacSystemFont',
|
|
101
|
+
'"Helvetica Neue"',
|
|
102
|
+
'Arial',
|
|
103
|
+
'sans-serif',
|
|
104
|
+
].join(','),
|
|
105
|
+
},
|
|
106
|
+
palette: {
|
|
107
|
+
mode: themeMode,
|
|
108
|
+
...palette,
|
|
109
|
+
primary: { main: palette.primary },
|
|
110
|
+
secondary: { main: palette.secondary },
|
|
111
|
+
error: { main: palette.red },
|
|
112
|
+
background: {
|
|
113
|
+
default: palette.background,
|
|
114
|
+
},
|
|
113
115
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
...customizedTheme,
|
|
117
|
+
})
|
|
118
|
+
);
|
|
117
119
|
};
|
|
118
120
|
|
|
119
121
|
export type Theme = ReturnType<typeof getTheme>;
|
|
120
122
|
|
|
121
|
-
declare module '@material
|
|
123
|
+
declare module '@mui/material/styles/createMuiTheme' {
|
|
122
124
|
/* eslint-disable-next-line @typescript-eslint/no-empty-interface */
|
|
123
125
|
interface Theme extends CustomizedTheme {}
|
|
124
126
|
/* eslint-disable-next-line @typescript-eslint/no-empty-interface */
|
|
125
|
-
interface
|
|
127
|
+
interface DeprecatedThemeOptions extends CustomizedTheme {}
|
|
126
128
|
}
|
|
127
129
|
|
|
128
|
-
declare module '@material
|
|
130
|
+
declare module '@mui/material/styles/createPalette' {
|
|
129
131
|
interface CustomPalette {
|
|
130
132
|
black: string;
|
|
131
133
|
white: string;
|
|
File without changes
|
|
File without changes
|
package/src/i18n/config.ts
CHANGED
|
@@ -7,21 +7,7 @@ import {
|
|
|
7
7
|
listLanguages,
|
|
8
8
|
listLanguagesAsString,
|
|
9
9
|
} from './enabledLanguages';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* In development mode translations files might be not available,
|
|
13
|
-
* crowdin translations are only available in CI.
|
|
14
|
-
*/
|
|
15
|
-
function loadTranslationFile(lng) {
|
|
16
|
-
try {
|
|
17
|
-
return require(`./download_translations/${lng}/ui.json`);
|
|
18
|
-
} catch {
|
|
19
|
-
// eslint-disable-next-line no-console
|
|
20
|
-
console.warn(`language ${lng} file not found, fallback to en-US`);
|
|
21
|
-
// in case the file is not there, fallback to en-US
|
|
22
|
-
return require(`./crowdin/ui.json`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
10
|
+
import { loadTranslationFile } from './loadTranslationFile';
|
|
25
11
|
|
|
26
12
|
const languages = listLanguages.reduce((acc, item: LanguageConfiguration) => {
|
|
27
13
|
acc[item.lng] = {
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
"title": "Repositorio"
|
|
101
101
|
},
|
|
102
102
|
"author": {
|
|
103
|
-
"title": "
|
|
103
|
+
"title": "Autor"
|
|
104
104
|
},
|
|
105
105
|
"distribution": {
|
|
106
106
|
"title": "Latest Distribution",
|
|
107
|
-
"license": "
|
|
107
|
+
"license": "Licencia",
|
|
108
108
|
"size": "Size",
|
|
109
109
|
"file-count": "file count"
|
|
110
110
|
},
|
|
@@ -112,19 +112,19 @@
|
|
|
112
112
|
"title": "Maintainers"
|
|
113
113
|
},
|
|
114
114
|
"contributors": {
|
|
115
|
-
"title": "
|
|
115
|
+
"title": "Contribuidores"
|
|
116
116
|
},
|
|
117
117
|
"engines": {
|
|
118
|
-
"npm-version": "NPM
|
|
118
|
+
"npm-version": "Versión de NPM",
|
|
119
119
|
"node-js": "NODE JS"
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
"footer": {
|
|
123
123
|
"powered-by": "Powered by",
|
|
124
|
-
"made-with-love-on": "
|
|
124
|
+
"made-with-love-on": "Hecho con <0>♥</0>"
|
|
125
125
|
},
|
|
126
126
|
"button": {
|
|
127
|
-
"close": "
|
|
127
|
+
"close": "Cerrar",
|
|
128
128
|
"cancel": "Cancel",
|
|
129
129
|
"login": "Login",
|
|
130
130
|
"logout": "Logout",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"error": {
|
|
136
136
|
"unspecific": "Something went wrong.",
|
|
137
137
|
"404": {
|
|
138
|
-
"page-not-found": "404 -
|
|
138
|
+
"page-not-found": "404 - Página no encontrada",
|
|
139
139
|
"sorry-we-could-not-find-it": "Sorry, we couldn't find it..."
|
|
140
140
|
},
|
|
141
141
|
"app-context-not-correct-used": "The app context was not used correctly",
|
|
@@ -147,24 +147,24 @@
|
|
|
147
147
|
"czech": "Czech",
|
|
148
148
|
"japanese": "Japanese",
|
|
149
149
|
"portuguese": "Portuguese",
|
|
150
|
-
"spanish": "
|
|
151
|
-
"german": "
|
|
152
|
-
"chinese": "
|
|
153
|
-
"chineseTraditional": "
|
|
154
|
-
"french": "
|
|
155
|
-
"russian": "
|
|
150
|
+
"spanish": "Español",
|
|
151
|
+
"german": "Alemán",
|
|
152
|
+
"chinese": "Chino",
|
|
153
|
+
"chineseTraditional": "Chino (Tradicional)",
|
|
154
|
+
"french": "Francés",
|
|
155
|
+
"russian": "Ruso",
|
|
156
156
|
"turkish": "Turkish",
|
|
157
|
-
"ukraine": "
|
|
157
|
+
"ukraine": "Ucrania",
|
|
158
158
|
"khmer": "Khmer"
|
|
159
159
|
},
|
|
160
160
|
"flag": {
|
|
161
161
|
"austria": "Austria",
|
|
162
|
-
"brazil": "
|
|
163
|
-
"spain": "
|
|
162
|
+
"brazil": "Brasil",
|
|
163
|
+
"spain": "España",
|
|
164
164
|
"nicaragua": "Nicaragua",
|
|
165
165
|
"india": "India",
|
|
166
166
|
"china": "China",
|
|
167
|
-
"germany": "
|
|
167
|
+
"germany": "Alemania",
|
|
168
168
|
"taiwan": "Taiwan"
|
|
169
169
|
}
|
|
170
170
|
}
|