yt-grabber 1.0.0
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/.eslintrc.json +29 -0
- package/.prettierrc +19 -0
- package/.vscode/extensions.json +7 -0
- package/.vscode/settings.json +23 -0
- package/.yarnrc.yml +13 -0
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/package.json +115 -0
- package/public/index.html +20 -0
- package/public/screenshots/cutting.png +0 -0
- package/public/screenshots/downloading.png +0 -0
- package/public/screenshots/editing.png +0 -0
- package/public/screenshots/errors.png +0 -0
- package/public/screenshots/settings.png +0 -0
- package/public/screenshots/tracklist.png +0 -0
- package/src/@types/global.d.ts +7 -0
- package/src/@types/i18next-scanner-webpack.d.ts +1 -0
- package/src/@types/stylus.d.ts +4 -0
- package/src/@types/svg.d.ts +1 -0
- package/src/App.styl +24 -0
- package/src/App.tsx +31 -0
- package/src/bootstrap.tsx +30 -0
- package/src/common/CancellablePromise.ts +22 -0
- package/src/common/ComponentDisplayMode.ts +8 -0
- package/src/common/Delay.ts +3 -0
- package/src/common/FileSystem.ts +171 -0
- package/src/common/Helpers.ts +270 -0
- package/src/common/Mappings.ts +14 -0
- package/src/common/PuppeteerOptions.ts +45 -0
- package/src/common/Selectors.ts +21 -0
- package/src/common/Store.ts +108 -0
- package/src/common/Theme.ts +4 -0
- package/src/common/Youtube.ts +80 -0
- package/src/components/appBar/AppBar.styl +22 -0
- package/src/components/appBar/AppBar.tsx +73 -0
- package/src/components/directoryPicker/DirectoryPicker.tsx +44 -0
- package/src/components/fileField/FileField.styl +3 -0
- package/src/components/fileField/FileField.tsx +152 -0
- package/src/components/languagePicker/LanguagePicker.styl +38 -0
- package/src/components/languagePicker/LanguagePicker.tsx +145 -0
- package/src/components/logo/Logo.tsx +15 -0
- package/src/components/modals/DetailsModal.styl +9 -0
- package/src/components/modals/DetailsModal.tsx +85 -0
- package/src/components/numberField/NumberField.styl +13 -0
- package/src/components/numberField/NumberField.tsx +154 -0
- package/src/components/progress/Progress.styl +15 -0
- package/src/components/progress/Progress.tsx +18 -0
- package/src/components/splitButton/SplitButton.styl +0 -0
- package/src/components/splitButton/SplitButton.tsx +125 -0
- package/src/components/themePicker/ThemePicker.styl +19 -0
- package/src/components/themePicker/ThemePicker.tsx +65 -0
- package/src/components/themeSwitcher/ThemeSwitcher.styl +10 -0
- package/src/components/themeSwitcher/ThemeSwitcher.tsx +43 -0
- package/src/components/youtube/formatSelector/FormatSelector.styl +3 -0
- package/src/components/youtube/formatSelector/FormatSelector.tsx +202 -0
- package/src/components/youtube/inputPanel/InputPanel.styl +7 -0
- package/src/components/youtube/inputPanel/InputPanel.tsx +189 -0
- package/src/components/youtube/mediaInfoPanel/MediaInfoPanel.styl +80 -0
- package/src/components/youtube/mediaInfoPanel/MediaInfoPanel.tsx +113 -0
- package/src/components/youtube/trackList/TrackList.styl +64 -0
- package/src/components/youtube/trackList/TrackList.tsx +258 -0
- package/src/enums/DataResponse.ts +5 -0
- package/src/enums/Media.ts +16 -0
- package/src/enums/MediaFormat.ts +10 -0
- package/src/enums/MimeTypes.ts +14 -0
- package/src/hooks/useCancellablePromises.ts +25 -0
- package/src/hooks/useClickCounter.ts +24 -0
- package/src/hooks/useData.ts +61 -0
- package/src/hooks/useMultiClickHandler.ts +41 -0
- package/src/i18next.ts +33 -0
- package/src/index.ts +65 -0
- package/src/react/actions/Action.ts +3 -0
- package/src/react/actions/AppActions.ts +41 -0
- package/src/react/contexts/AppContext.tsx +51 -0
- package/src/react/contexts/AppThemeContext.tsx +38 -0
- package/src/react/contexts/DataContext copy.tsx +76 -0
- package/src/react/contexts/DataContext.tsx +41 -0
- package/src/react/hooks/useAppTheme.ts +14 -0
- package/src/react/reducers/AppReducer.tsx +45 -0
- package/src/react/reducers/Reducer.ts +7 -0
- package/src/react/states/AppState.ts +29 -0
- package/src/react/states/State.ts +29 -0
- package/src/renderer.tsx +13 -0
- package/src/resources/bin/yt-dlp.exe +0 -0
- package/src/resources/fonts/Baloo-Regular.ttf +0 -0
- package/src/resources/fonts/Lato-Black.ttf +0 -0
- package/src/resources/fonts/Lato-BlackItalic.ttf +0 -0
- package/src/resources/fonts/Lato-Bold.ttf +0 -0
- package/src/resources/fonts/Lato-BoldItalic.ttf +0 -0
- package/src/resources/fonts/Lato-Italic.ttf +0 -0
- package/src/resources/fonts/Lato-Light.ttf +0 -0
- package/src/resources/fonts/Lato-LightItalic.ttf +0 -0
- package/src/resources/fonts/Lato-Regular.ttf +0 -0
- package/src/resources/fonts/Lato-Thin.ttf +0 -0
- package/src/resources/fonts/Lato-ThinItalic.ttf +0 -0
- package/src/resources/fonts/Material-Icons.woff2 +0 -0
- package/src/resources/icons/favicon-16x16.png +0 -0
- package/src/resources/icons/favicon-32x32.png +0 -0
- package/src/resources/icons/favicon.ico +0 -0
- package/src/resources/icons/logo-shape.png +0 -0
- package/src/resources/icons/logo-shape.svg +59 -0
- package/src/resources/images/loading.svg +28 -0
- package/src/resources/images/logo.png +0 -0
- package/src/resources/locales/de-DE/flag.svg +1 -0
- package/src/resources/locales/de-DE/translation.json +44 -0
- package/src/resources/locales/en-GB/flag.svg +43 -0
- package/src/resources/locales/en-GB/translation.json +44 -0
- package/src/resources/locales/pl-PL/flag.svg +36 -0
- package/src/resources/locales/pl-PL/translation.json +44 -0
- package/src/styles/MaterialThemes.ts +331 -0
- package/src/styles/fonts.styl +71 -0
- package/src/styles/mixins.styl +22 -0
- package/src/tests/CompleteTracksMock.ts +17384 -0
- package/src/tests/MissingDetailsTracksMock.ts +7737 -0
- package/src/theme/ColorThemes.ts +190 -0
- package/src/theme/Colors.ts +92 -0
- package/src/theme/Shadows.ts +9 -0
- package/src/theme/Shape.ts +7 -0
- package/src/theme/Theme.ts +24 -0
- package/src/theme/Typography.ts +56 -0
- package/src/views/development/DevelopmentView.styl +22 -0
- package/src/views/development/DevelopmentView.tsx +57 -0
- package/src/views/home/HomeView.styl +60 -0
- package/src/views/home/HomeView.tsx +505 -0
- package/src/views/settings/SettingsView.styl +27 -0
- package/src/views/settings/SettingsView.tsx +255 -0
- package/tsconfig.json +20 -0
- package/webpack.config.ts +226 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
5
|
+
style="margin: auto; background: none; display: block; shape-rendering: auto;"
|
|
6
|
+
width="224px"
|
|
7
|
+
height="224px"
|
|
8
|
+
viewBox="0 0 100 100"
|
|
9
|
+
preserveAspectRatio="xMidYMid"
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
fill="none"
|
|
13
|
+
stroke="#748a98"
|
|
14
|
+
stroke-width="6"
|
|
15
|
+
stroke-dasharray="187.30991760253906 69.27901062011719"
|
|
16
|
+
stroke-linecap="round"
|
|
17
|
+
style="transform:scale(0.72);transform-origin:50px 50px"
|
|
18
|
+
d="M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z"
|
|
19
|
+
>
|
|
20
|
+
<animate
|
|
21
|
+
attributeName="stroke-dashoffset"
|
|
22
|
+
repeatCount="indefinite"
|
|
23
|
+
dur="2.5s"
|
|
24
|
+
keyTimes="0;1"
|
|
25
|
+
values="0;256.58892822265625"
|
|
26
|
+
></animate>
|
|
27
|
+
</path>
|
|
28
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55.2 38.4"><g fill-rule="evenodd" clip-rule="evenodd"><path d="M3.03 0h49.13c1.67 0 3.03 1.36 3.03 3.03v32.33c0 1.66-1.36 3.02-3.02 3.03H3.02C1.36 38.4 0 37.03 0 35.37V3.03C0 1.36 1.36 0 3.03 0z"/><path d="M0 12.8h55.2v22.57c0 1.67-1.36 3.03-3.03 3.03H3.03C1.36 38.4 0 37.04 0 35.37V12.8z" fill="#d00"/><path d="M0 25.6h55.2v9.77c0 1.66-1.36 3.02-3.02 3.03H3.03A3.04 3.04 0 010 35.37V25.6z" fill="#ffce00"/></g></svg>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"albumOutputTemplate": "Ausgabenvorlage (Alben)",
|
|
3
|
+
"alwaysOverwrite": "Immer Überschreiben",
|
|
4
|
+
"artist": "Künstler",
|
|
5
|
+
"audioQuality": "Audio-Qualität",
|
|
6
|
+
"cancel": "Stornieren",
|
|
7
|
+
"cancelled": "Storniert",
|
|
8
|
+
"clear": "Löschen",
|
|
9
|
+
"close": "Schließen",
|
|
10
|
+
"concurrency": "Parallelität",
|
|
11
|
+
"dark": "Dunkel",
|
|
12
|
+
"debugMode": "Debug-Modus",
|
|
13
|
+
"detailsModalTitle": "Mediendetails bearbeiten",
|
|
14
|
+
"done": "Fertig",
|
|
15
|
+
"download": "Herunterladen",
|
|
16
|
+
"downloadFailed": "Falsch Herunterladen",
|
|
17
|
+
"downloading": "Herunterladen läuft",
|
|
18
|
+
"duration": "Dauer",
|
|
19
|
+
"edit": "Bearbeiten",
|
|
20
|
+
"extractingAudio": "Audio Extrahieren",
|
|
21
|
+
"format": "Format",
|
|
22
|
+
"from": "von",
|
|
23
|
+
"invalidTemplateKeys": "Ungültige Vorlagenschlüssel: {{invalidKeys}}",
|
|
24
|
+
"invalidYoutubeUrl": "Ungültige YouTube-URL",
|
|
25
|
+
"langName": "German",
|
|
26
|
+
"light": "Hell",
|
|
27
|
+
"loadInfo": "Infos laden",
|
|
28
|
+
"mediaType": "Typ",
|
|
29
|
+
"merging": "merging",
|
|
30
|
+
"missingMediaInfoError": "Fehlende Medieninformationen",
|
|
31
|
+
"ok": "OK",
|
|
32
|
+
"outputDirectory": "Ausgabeverzeichnis",
|
|
33
|
+
"playlistOutputTemplate": "Ausgabevorlage (Wiedergabeliste)",
|
|
34
|
+
"reading": "Lesen",
|
|
35
|
+
"releaseYear": "Erscheinungsjahr",
|
|
36
|
+
"resolution": "Qualität",
|
|
37
|
+
"startingDownload": "Der Download wird gestartet...",
|
|
38
|
+
"themeMode": "Designmodus",
|
|
39
|
+
"title": "Titel",
|
|
40
|
+
"to": "bis",
|
|
41
|
+
"trackOutputTemplate": "Ausgabevorlage (Audiospuren)",
|
|
42
|
+
"videoOutputTemplate": "Ausgabevorlage (videos)",
|
|
43
|
+
"youtubeUrl": "YouTube-URL"
|
|
44
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 512.002 512.002" style="enable-background:new 0 0 512.002 512.002;" xml:space="preserve">
|
|
4
|
+
<path style="fill:#41479B;" d="M503.172,423.725H8.828c-4.875,0-8.828-3.953-8.828-8.828V97.104c0-4.875,3.953-8.828,8.828-8.828 h494.345c4.875,0,8.828,3.953,8.828,8.828v317.793C512,419.772,508.047,423.725,503.172,423.725z"/>
|
|
5
|
+
<path style="fill:#F5F5F5;" d="M512,97.104c0-4.875-3.953-8.828-8.828-8.828h-39.495l-163.54,107.147V88.276h-88.276v107.147 L48.322,88.276H8.828C3.953,88.276,0,92.229,0,97.104v22.831l140.309,91.927H0v88.276h140.309L0,392.066v22.831 c0,4.875,3.953,8.828,8.828,8.828h39.495l163.54-107.147v107.147h88.276V316.578l163.54,107.147h39.495 c4.875,0,8.828-3.953,8.828-8.828v-22.831l-140.309-91.927H512v-88.276H371.691L512,119.935V97.104z"/>
|
|
6
|
+
<g>
|
|
7
|
+
<polygon style="fill:#FF4B55;" points="512,229.518 282.483,229.518 282.483,88.276 229.517,88.276 229.517,229.518 0,229.518 0,282.483 229.517,282.483 229.517,423.725 282.483,423.725 282.483,282.483 512,282.483 "/>
|
|
8
|
+
<path style="fill:#FF4B55;" d="M178.948,300.138L0.25,416.135c0.625,4.263,4.14,7.59,8.577,7.59h12.159l190.39-123.586h-32.428 V300.138z"/>
|
|
9
|
+
<path style="fill:#FF4B55;" d="M346.388,300.138H313.96l190.113,123.404c4.431-0.472,7.928-4.09,7.928-8.646v-7.258 L346.388,300.138z"/>
|
|
10
|
+
<path style="fill:#FF4B55;" d="M0,106.849l161.779,105.014h32.428L5.143,89.137C2.123,90.54,0,93.555,0,97.104V106.849z"/>
|
|
11
|
+
<path style="fill:#FF4B55;" d="M332.566,211.863L511.693,95.586c-0.744-4.122-4.184-7.309-8.521-7.309h-12.647L300.138,211.863 H332.566z"/>
|
|
12
|
+
</g>
|
|
13
|
+
<g>
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
</g>
|
|
17
|
+
<g>
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
</g>
|
|
21
|
+
<g>
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
</g>
|
|
25
|
+
<g>
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
</g>
|
|
29
|
+
<g>
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
</g>
|
|
33
|
+
<g>
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
</g>
|
|
37
|
+
<g>
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
</g>
|
|
41
|
+
<g>
|
|
42
|
+
</g>
|
|
43
|
+
</svg>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"albumOutputTemplate": "Output template (albums)",
|
|
3
|
+
"alwaysOverwrite": "Always overwrite",
|
|
4
|
+
"artist": "Artist",
|
|
5
|
+
"audioQuality": "Audio Quality",
|
|
6
|
+
"cancel": "Cancel",
|
|
7
|
+
"cancelled": "Cancelled",
|
|
8
|
+
"clear": "Clear",
|
|
9
|
+
"close": "Close",
|
|
10
|
+
"concurrency": "Concurrent downloads",
|
|
11
|
+
"dark": "Dark",
|
|
12
|
+
"debugMode": "Debug Mode",
|
|
13
|
+
"detailsModalTitle": "Edit media details",
|
|
14
|
+
"done": "Done",
|
|
15
|
+
"download": "Download",
|
|
16
|
+
"downloadFailed": "Download Failed",
|
|
17
|
+
"downloading": "Downloading",
|
|
18
|
+
"duration": "Duration",
|
|
19
|
+
"edit": "Edit",
|
|
20
|
+
"extractingAudio": "Extracting Audio",
|
|
21
|
+
"format": "Format",
|
|
22
|
+
"from": "from",
|
|
23
|
+
"invalidTemplateKeys": "Invalid template keys: {{invalidKeys}}",
|
|
24
|
+
"invalidYoutubeUrl": "Invalid Youtube url",
|
|
25
|
+
"langName": "English",
|
|
26
|
+
"light": "Light",
|
|
27
|
+
"loadInfo": "Load Info",
|
|
28
|
+
"mediaType": "Type",
|
|
29
|
+
"merging": "merging",
|
|
30
|
+
"missingMediaInfoError": "Missing media info",
|
|
31
|
+
"ok": "OK",
|
|
32
|
+
"outputDirectory": "Output Directory",
|
|
33
|
+
"playlistOutputTemplate": "Output template (playlists)",
|
|
34
|
+
"reading": "Reading",
|
|
35
|
+
"releaseYear": "Release Year",
|
|
36
|
+
"resolution": "Quality",
|
|
37
|
+
"startingDownload": "Starting download...",
|
|
38
|
+
"themeMode": "Theme Mode",
|
|
39
|
+
"title": "Title",
|
|
40
|
+
"to": "to",
|
|
41
|
+
"trackOutputTemplate": "Output template (audio tracks)",
|
|
42
|
+
"videoOutputTemplate": "Output template (videos)",
|
|
43
|
+
"youtubeUrl": "YouTube URL"
|
|
44
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512.001 512.001;" xml:space="preserve">
|
|
4
|
+
<path style="fill:#FF4B55;" d="M0,256h512v158.897c0,4.875-3.953,8.828-8.828,8.828H8.828c-4.875,0-8.828-3.953-8.828-8.828V256z"/>
|
|
5
|
+
<path style="fill:#F5F5F5;" d="M512,256H0V97.103c0-4.875,3.953-8.828,8.828-8.828h494.345c4.875,0,8.828,3.953,8.828,8.828L512,256 L512,256z"/>
|
|
6
|
+
<g>
|
|
7
|
+
</g>
|
|
8
|
+
<g>
|
|
9
|
+
</g>
|
|
10
|
+
<g>
|
|
11
|
+
</g>
|
|
12
|
+
<g>
|
|
13
|
+
</g>
|
|
14
|
+
<g>
|
|
15
|
+
</g>
|
|
16
|
+
<g>
|
|
17
|
+
</g>
|
|
18
|
+
<g>
|
|
19
|
+
</g>
|
|
20
|
+
<g>
|
|
21
|
+
</g>
|
|
22
|
+
<g>
|
|
23
|
+
</g>
|
|
24
|
+
<g>
|
|
25
|
+
</g>
|
|
26
|
+
<g>
|
|
27
|
+
</g>
|
|
28
|
+
<g>
|
|
29
|
+
</g>
|
|
30
|
+
<g>
|
|
31
|
+
</g>
|
|
32
|
+
<g>
|
|
33
|
+
</g>
|
|
34
|
+
<g>
|
|
35
|
+
</g>
|
|
36
|
+
</svg>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"albumOutputTemplate": "Szablon wyjściowy (albumy)",
|
|
3
|
+
"alwaysOverwrite": "Zawsze nadpisuj",
|
|
4
|
+
"artist": "Wykonawca",
|
|
5
|
+
"audioQuality": "Jakość audio",
|
|
6
|
+
"cancel": "Anuluj",
|
|
7
|
+
"cancelled": "Anulowane",
|
|
8
|
+
"clear": "Wyczyść",
|
|
9
|
+
"close": "Zamknij",
|
|
10
|
+
"concurrency": "Liczba równocześnie pobieranych plików",
|
|
11
|
+
"dark": "Ciemny",
|
|
12
|
+
"debugMode": "Tryb debugowania",
|
|
13
|
+
"detailsModalTitle": "Edycja danych",
|
|
14
|
+
"done": "Gotowe",
|
|
15
|
+
"download": "Ściągnij",
|
|
16
|
+
"downloadFailed": "Ściągnij Nieudane",
|
|
17
|
+
"downloading": "Pobieranie",
|
|
18
|
+
"duration": "Czas trwania",
|
|
19
|
+
"edit": "Edytuj",
|
|
20
|
+
"extractingAudio": "Wyodrębnianie dźwięku",
|
|
21
|
+
"format": "Format",
|
|
22
|
+
"from": "start",
|
|
23
|
+
"invalidTemplateKeys": "Nieprawidłowe wartości: {{invalidKeys}}",
|
|
24
|
+
"invalidYoutubeUrl": "Nieprawidłowy adres URL YouTube",
|
|
25
|
+
"langName": "Polski",
|
|
26
|
+
"light": "Jasny",
|
|
27
|
+
"loadInfo": "Wczytaj info",
|
|
28
|
+
"mediaType": "Typ",
|
|
29
|
+
"merging": "Łaczenie",
|
|
30
|
+
"missingMediaInfoError": "Metadane są niekompletne",
|
|
31
|
+
"ok": "OK",
|
|
32
|
+
"outputDirectory": "Katalog wyjściowy",
|
|
33
|
+
"playlistOutputTemplate": "Szablon wyjściowy (playlisty)",
|
|
34
|
+
"reading": "Odczytywanie",
|
|
35
|
+
"releaseYear": "Rok wydania",
|
|
36
|
+
"resolution": "Jakość",
|
|
37
|
+
"startingDownload": "Rozpoczynanie pobierania...",
|
|
38
|
+
"themeMode": "Tryb motywu",
|
|
39
|
+
"title": "Tytuł",
|
|
40
|
+
"to": "koniec",
|
|
41
|
+
"trackOutputTemplate": "Szablon wyjściowy (pliki audio)",
|
|
42
|
+
"videoOutputTemplate": "Szablon wyjściowy (pliki wideo)",
|
|
43
|
+
"youtubeUrl": "YouTube URL"
|
|
44
|
+
}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import $_ from "lodash";
|
|
2
|
+
|
|
3
|
+
import {Theme} from "@mui/material";
|
|
4
|
+
import {grey} from "@mui/material/colors";
|
|
5
|
+
|
|
6
|
+
import {IStringTMap} from "../common/Mappings";
|
|
7
|
+
|
|
8
|
+
const themes: IStringTMap<Partial<Theme> | any> = {
|
|
9
|
+
basic: {
|
|
10
|
+
typography: {
|
|
11
|
+
fontFamily: "Lato",
|
|
12
|
+
},
|
|
13
|
+
palette: {
|
|
14
|
+
light: {
|
|
15
|
+
type: "light",
|
|
16
|
+
background: {
|
|
17
|
+
default: "#dadada",
|
|
18
|
+
paper: "#ffffff",
|
|
19
|
+
},
|
|
20
|
+
default: {
|
|
21
|
+
main: grey[800],
|
|
22
|
+
light: grey[500],
|
|
23
|
+
dark: grey[900],
|
|
24
|
+
},
|
|
25
|
+
contrastThreshold: 4.5,
|
|
26
|
+
},
|
|
27
|
+
dark: {
|
|
28
|
+
type: "light",
|
|
29
|
+
background: {
|
|
30
|
+
default: "#dadada",
|
|
31
|
+
paper: "#ffffff",
|
|
32
|
+
},
|
|
33
|
+
default: {
|
|
34
|
+
main: grey[800],
|
|
35
|
+
light: grey[500],
|
|
36
|
+
dark: grey[900],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
"basic-dark": {
|
|
42
|
+
typography: {
|
|
43
|
+
fontFamily: "Lato",
|
|
44
|
+
},
|
|
45
|
+
palette: {
|
|
46
|
+
light: {
|
|
47
|
+
type: "dark",
|
|
48
|
+
default: {
|
|
49
|
+
main: grey[400],
|
|
50
|
+
light: grey[300],
|
|
51
|
+
dark: grey[700],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
dark: {
|
|
55
|
+
type: "dark",
|
|
56
|
+
default: {
|
|
57
|
+
main: grey[400],
|
|
58
|
+
light: grey[300],
|
|
59
|
+
dark: grey[700],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
"sandy-beach": {
|
|
65
|
+
typography: {
|
|
66
|
+
fontFamily: "Lato",
|
|
67
|
+
},
|
|
68
|
+
palette: {
|
|
69
|
+
light: {
|
|
70
|
+
type: "light",
|
|
71
|
+
background: {
|
|
72
|
+
default: "#e1e1e6",
|
|
73
|
+
},
|
|
74
|
+
primary: {
|
|
75
|
+
light: "#a6acd4",
|
|
76
|
+
main: "#7f85a7",
|
|
77
|
+
dark: "#4c527d",
|
|
78
|
+
},
|
|
79
|
+
secondary: {
|
|
80
|
+
light: "#ffd966",
|
|
81
|
+
main: "#ffc107",
|
|
82
|
+
dark: "#ffa520",
|
|
83
|
+
contrastText: "#ffffff",
|
|
84
|
+
},
|
|
85
|
+
text: {
|
|
86
|
+
primary: "#626578",
|
|
87
|
+
secondary: "#9e9e9e",
|
|
88
|
+
icon: "#ffffff",
|
|
89
|
+
},
|
|
90
|
+
default: {
|
|
91
|
+
main: grey[800],
|
|
92
|
+
light: grey[500],
|
|
93
|
+
dark: grey[900],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
dark: {
|
|
97
|
+
type: "dark",
|
|
98
|
+
background: {
|
|
99
|
+
default: "#3b3b3f",
|
|
100
|
+
paper: "#3b3b3f",
|
|
101
|
+
},
|
|
102
|
+
primary: {
|
|
103
|
+
light: "#a6acd4",
|
|
104
|
+
main: "#7f85a7",
|
|
105
|
+
dark: "#4c527d",
|
|
106
|
+
},
|
|
107
|
+
secondary: {
|
|
108
|
+
light: "#ffd966",
|
|
109
|
+
main: "#ffc107",
|
|
110
|
+
dark: "#ffa520",
|
|
111
|
+
contrastText: "#ffffff",
|
|
112
|
+
},
|
|
113
|
+
text: {
|
|
114
|
+
primary: "#626578",
|
|
115
|
+
secondary: "#9e9e9e",
|
|
116
|
+
icon: "#ffffff",
|
|
117
|
+
},
|
|
118
|
+
default: {
|
|
119
|
+
main: grey[800],
|
|
120
|
+
light: grey[500],
|
|
121
|
+
dark: grey[900],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
shape: {
|
|
126
|
+
borderRadius: 4,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
"mellow-pastel": {
|
|
130
|
+
typography: {
|
|
131
|
+
fontFamily: "Lato",
|
|
132
|
+
},
|
|
133
|
+
palette: {
|
|
134
|
+
light: {
|
|
135
|
+
type: "light",
|
|
136
|
+
background: {
|
|
137
|
+
default: "#e1e1e6",
|
|
138
|
+
},
|
|
139
|
+
primary: {
|
|
140
|
+
light: "#a6acd4",
|
|
141
|
+
main: "#7f85a7",
|
|
142
|
+
dark: "#4c527d",
|
|
143
|
+
},
|
|
144
|
+
secondary: {
|
|
145
|
+
light: "#aed581",
|
|
146
|
+
main: "#8bc34a",
|
|
147
|
+
dark: "#74a838",
|
|
148
|
+
contrastText: "#ffffff",
|
|
149
|
+
},
|
|
150
|
+
text: {
|
|
151
|
+
primary: "#626578",
|
|
152
|
+
secondary: "#9e9e9e",
|
|
153
|
+
icon: "#ffffff",
|
|
154
|
+
},
|
|
155
|
+
default: {
|
|
156
|
+
main: grey[800],
|
|
157
|
+
light: grey[500],
|
|
158
|
+
dark: grey[900],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
dark: {
|
|
162
|
+
type: "dark",
|
|
163
|
+
background: {
|
|
164
|
+
default: "#3b3b3f",
|
|
165
|
+
paper: "#3b3b3f",
|
|
166
|
+
},
|
|
167
|
+
primary: {
|
|
168
|
+
light: "#a6acd4",
|
|
169
|
+
main: "#7f85a7",
|
|
170
|
+
dark: "#4c527d",
|
|
171
|
+
},
|
|
172
|
+
secondary: {
|
|
173
|
+
light: "#aed581",
|
|
174
|
+
main: "#8bc34a",
|
|
175
|
+
dark: "#74a838",
|
|
176
|
+
contrastText: "#ffffff",
|
|
177
|
+
},
|
|
178
|
+
text: {
|
|
179
|
+
primary: "#626578",
|
|
180
|
+
secondary: "#9e9e9e",
|
|
181
|
+
icon: "#ffffff",
|
|
182
|
+
},
|
|
183
|
+
default: {
|
|
184
|
+
main: grey[800],
|
|
185
|
+
light: grey[500],
|
|
186
|
+
dark: grey[900],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
shape: {
|
|
191
|
+
borderRadius: 4,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
"purple-rain": {
|
|
195
|
+
typography: {
|
|
196
|
+
fontFamily: "Lato",
|
|
197
|
+
},
|
|
198
|
+
palette: {
|
|
199
|
+
light: {
|
|
200
|
+
type: "light",
|
|
201
|
+
background: {
|
|
202
|
+
default: "#e1e1e6",
|
|
203
|
+
},
|
|
204
|
+
primary: {
|
|
205
|
+
light: "#a6acd4",
|
|
206
|
+
main: "#7f85a7",
|
|
207
|
+
dark: "#4c527d",
|
|
208
|
+
},
|
|
209
|
+
secondary: {
|
|
210
|
+
light: "#ff8fa3",
|
|
211
|
+
main: "#ff6d89",
|
|
212
|
+
dark: "#d81b60",
|
|
213
|
+
contrastText: "#ffffff",
|
|
214
|
+
},
|
|
215
|
+
text: {
|
|
216
|
+
primary: "#626578",
|
|
217
|
+
secondary: "#9e9e9e",
|
|
218
|
+
icon: "#ffffff",
|
|
219
|
+
},
|
|
220
|
+
default: {
|
|
221
|
+
main: grey[800],
|
|
222
|
+
light: grey[500],
|
|
223
|
+
dark: grey[900],
|
|
224
|
+
},
|
|
225
|
+
contrastThreshold: 2.26,
|
|
226
|
+
},
|
|
227
|
+
dark: {
|
|
228
|
+
type: "dark",
|
|
229
|
+
background: {
|
|
230
|
+
default: "#3b3b3f",
|
|
231
|
+
paper: "#3b3b3f",
|
|
232
|
+
},
|
|
233
|
+
primary: {
|
|
234
|
+
light: "#a6acd4",
|
|
235
|
+
main: "#7f85a7",
|
|
236
|
+
dark: "#4c527d",
|
|
237
|
+
},
|
|
238
|
+
secondary: {
|
|
239
|
+
light: "#ff8fa3",
|
|
240
|
+
main: "#ff6d89",
|
|
241
|
+
dark: "#d81b60",
|
|
242
|
+
contrastText: "#ffffff",
|
|
243
|
+
},
|
|
244
|
+
text: {
|
|
245
|
+
primary: "#e6eaf5",
|
|
246
|
+
secondary: "#e0dede",
|
|
247
|
+
icon: "#ffffff",
|
|
248
|
+
},
|
|
249
|
+
default: {
|
|
250
|
+
main: grey[800],
|
|
251
|
+
light: grey[500],
|
|
252
|
+
dark: grey[900],
|
|
253
|
+
},
|
|
254
|
+
contrastThreshold: 2.26,
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
shape: {
|
|
258
|
+
borderRadius: 4,
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
"cloudy-sky": {
|
|
262
|
+
typography: {
|
|
263
|
+
fontFamily: "Lato",
|
|
264
|
+
},
|
|
265
|
+
palette: {
|
|
266
|
+
light: {
|
|
267
|
+
type: "light",
|
|
268
|
+
background: {
|
|
269
|
+
default: "#e1e7ea",
|
|
270
|
+
},
|
|
271
|
+
primary: {
|
|
272
|
+
light: "#71a9da",
|
|
273
|
+
main: "#3380c3",
|
|
274
|
+
dark: "#255d8e",
|
|
275
|
+
},
|
|
276
|
+
secondary: {
|
|
277
|
+
light: "#a5b7c0",
|
|
278
|
+
main: "#698796",
|
|
279
|
+
dark: "#4f6772",
|
|
280
|
+
contrastText: "#ffffff",
|
|
281
|
+
},
|
|
282
|
+
text: {
|
|
283
|
+
primary: "#5c7486",
|
|
284
|
+
secondary: "#9e9e9e",
|
|
285
|
+
icon: "#ffffff",
|
|
286
|
+
},
|
|
287
|
+
default: {
|
|
288
|
+
main: grey[800],
|
|
289
|
+
light: grey[500],
|
|
290
|
+
dark: grey[900],
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
dark: {
|
|
294
|
+
type: "dark",
|
|
295
|
+
background: {
|
|
296
|
+
default: "#e1e7ea",
|
|
297
|
+
},
|
|
298
|
+
primary: {
|
|
299
|
+
light: "#71a9da",
|
|
300
|
+
main: "#3380c3",
|
|
301
|
+
dark: "#255d8e",
|
|
302
|
+
},
|
|
303
|
+
secondary: {
|
|
304
|
+
light: "#a5b7c0",
|
|
305
|
+
main: "#698796",
|
|
306
|
+
dark: "#4f6772",
|
|
307
|
+
contrastText: "#ffffff",
|
|
308
|
+
},
|
|
309
|
+
text: {
|
|
310
|
+
primary: "#5c7486",
|
|
311
|
+
secondary: "#9e9e9e",
|
|
312
|
+
icon: "#ffffff",
|
|
313
|
+
},
|
|
314
|
+
default: {
|
|
315
|
+
main: grey[800],
|
|
316
|
+
light: grey[500],
|
|
317
|
+
dark: grey[900],
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
shape: {
|
|
322
|
+
borderRadius: 4,
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export const getThemeDefinition = (name: string, mode: "light" | "dark") => {
|
|
328
|
+
const theme = themes[name];
|
|
329
|
+
|
|
330
|
+
return $_.assign({}, theme, { palette: $_.get(theme, `palette.${mode}`) });
|
|
331
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "Baloo"
|
|
3
|
+
font-style: normal
|
|
4
|
+
font-weight: 400
|
|
5
|
+
src: local("Baloo Regular"), local("Baloo-Regular"), url(../resources/fonts/Baloo-Regular.ttf) format("ttf")
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: "Lato"
|
|
10
|
+
font-style: normal
|
|
11
|
+
font-weight: 400
|
|
12
|
+
src: local("Lato Regular"), local("Lato-Regular"), url(../resources/fonts/Lato-Regular.ttf) format("ttf")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: "Lato"
|
|
17
|
+
font-style: normal
|
|
18
|
+
font-weight: 700
|
|
19
|
+
src: local("Lato Bold"), local("Lato-Bold"), url(../resources/fonts/Lato-Bold.ttf) format("ttf")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: "Lato"
|
|
24
|
+
font-style: normal
|
|
25
|
+
font-weight: 900
|
|
26
|
+
src: local("Lato Black"), local("Lato-Black"), url(../resources/fonts/Lato-Black.ttf) format("ttf")
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: "Lato"
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 200
|
|
33
|
+
src: local("Lato Light"), local("Lato-Light"), url(../resources/fonts/Lato-Light.ttf) format("ttf")
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: "Lato"
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 100
|
|
40
|
+
src: local("Lato Thin"), local("Lato-Thin"), url(../resources/fonts/Lato-Thin.ttf) format("ttf")
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: "Lato"
|
|
45
|
+
font-style: italic;
|
|
46
|
+
font-weight: 400
|
|
47
|
+
src: local("Lato Italic"), local("Lato-Italic"), url(../resources/fonts/Lato-Italic.ttf) format("ttf")
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @font-face {
|
|
51
|
+
// font-family: "Material Icons";
|
|
52
|
+
// font-style: normal;
|
|
53
|
+
// font-weight: 400;
|
|
54
|
+
// src: url(../resources/fonts/Material-Icons.woff2) format("woff2");
|
|
55
|
+
// }
|
|
56
|
+
|
|
57
|
+
// .material-icons {
|
|
58
|
+
// font-family: "Material Icons";
|
|
59
|
+
// font-weight: normal;
|
|
60
|
+
// font-style: normal;
|
|
61
|
+
// font-size: 24px;
|
|
62
|
+
// line-height: 1;
|
|
63
|
+
// letter-spacing: normal;
|
|
64
|
+
// text-transform: none;
|
|
65
|
+
// display: inline-block;
|
|
66
|
+
// white-space: nowrap;
|
|
67
|
+
// word-wrap: normal;
|
|
68
|
+
// direction: ltr;
|
|
69
|
+
// -webkit-font-feature-settings: "liga";
|
|
70
|
+
// -webkit-font-smoothing: antialiased;
|
|
71
|
+
// }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
no-select() {
|
|
2
|
+
user-select: none;
|
|
3
|
+
-o-user-select: none;
|
|
4
|
+
-moz-user-select: none;
|
|
5
|
+
-khtml-user-select: none;
|
|
6
|
+
-webkit-user-select: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
vendor(prop, args) {
|
|
10
|
+
-webkit-{prop} args;
|
|
11
|
+
-moz-{prop} args;
|
|
12
|
+
-o-{prop} args;
|
|
13
|
+
{prop} args;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
uppercase() {
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
capitalize() {
|
|
21
|
+
text-transform: capitalize;
|
|
22
|
+
}
|