@deix/rossini-core 1.0.9 → 2.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/lib/components/buttons/Avatar/Avatar.d.ts.map +1 -0
- package/lib/components/buttons/Avatar/Avatar.js +49 -0
- package/lib/components/buttons/LanguageSelect/LanguageSelect.d.ts.map +1 -0
- package/lib/components/buttons/LanguageSelect/LanguageSelect.js +57 -0
- package/lib/components/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -0
- package/lib/components/buttons/ToggleButtonGroup/ToggleButtonGroup.js +18 -0
- package/lib/components/buttons/index.d.ts.map +1 -0
- package/lib/components/buttons/index.js +3 -0
- package/lib/components/display/Accordion/Accordion.d.ts.map +1 -0
- package/lib/components/display/Accordion/Accordion.js +22 -0
- package/lib/components/display/StyledValue/ImprovementChip.d.ts.map +1 -0
- package/lib/components/display/StyledValue/ImprovementChip.js +62 -0
- package/lib/components/display/StyledValue/StyledValue.d.ts.map +1 -0
- package/lib/components/display/StyledValue/StyledValue.js +84 -0
- package/lib/components/display/StyledValue/hooks.d.ts +6 -0
- package/lib/components/display/StyledValue/hooks.d.ts.map +1 -0
- package/lib/{src/components → components}/display/StyledValue/hooks.js +4 -7
- package/lib/components/display/index.d.ts.map +1 -0
- package/lib/components/display/index.js +3 -0
- package/lib/components/i18n/Link.d.ts +9 -0
- package/lib/components/i18n/Link.d.ts.map +1 -0
- package/lib/components/i18n/Link.js +20 -0
- package/lib/components/i18n/index.d.ts +3 -0
- package/lib/components/i18n/index.d.ts.map +1 -0
- package/lib/components/i18n/index.js +1 -0
- package/lib/{src/components → components}/index.d.ts +4 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +6 -0
- package/lib/components/layout/MinimalLayout/MinimalLayout.d.ts.map +1 -0
- package/lib/components/layout/MinimalLayout/MinimalLayout.js +59 -0
- package/lib/{src/components/layout/StandardLayout → components/layout/MinimalLayout}/translations.json +1 -0
- package/lib/components/layout/StandardLayout/StandardLayout.d.ts.map +1 -0
- package/lib/components/layout/StandardLayout/StandardLayout.js +72 -0
- package/lib/{src/components/layout/MinimalLayout → components/layout/StandardLayout}/translations.json +1 -0
- package/lib/components/layout/assets/DeixLogo.d.ts.map +1 -0
- package/lib/components/layout/assets/DeixLogo.js +15 -0
- package/lib/components/layout/assets/ServerDown.d.ts.map +1 -0
- package/lib/components/layout/assets/ServerDown.js +55 -0
- package/lib/components/layout/components/AppLogo/AppLogo.d.ts.map +1 -0
- package/lib/components/layout/components/AppLogo/AppLogo.js +25 -0
- package/lib/components/layout/components/Footer/Footer.d.ts.map +1 -0
- package/lib/components/layout/components/Footer/Footer.js +59 -0
- package/lib/components/layout/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/lib/components/layout/components/Sidebar/Sidebar.js +237 -0
- package/lib/components/layout/components/Topbar/ElevationScroll.d.ts.map +1 -0
- package/lib/components/layout/components/Topbar/ElevationScroll.js +13 -0
- package/lib/components/layout/components/Topbar/Topbar.d.ts.map +1 -0
- package/lib/components/layout/components/Topbar/Topbar.js +38 -0
- package/lib/{src/components → components}/layout/components/Topbar/translations.json +4 -0
- package/lib/components/layout/components/Topline/TopLine.d.ts.map +1 -0
- package/lib/components/layout/components/Topline/TopLine.js +14 -0
- package/lib/components/layout/index.d.ts.map +1 -0
- package/lib/components/layout/index.js +2 -0
- package/lib/components/progress/CircularLoading/CircularLoading.d.ts.map +1 -0
- package/lib/components/progress/CircularLoading/CircularLoading.js +19 -0
- package/lib/components/progress/index.d.ts.map +1 -0
- package/lib/components/progress/index.js +1 -0
- package/lib/{src/utils → components}/provider/PageProvider.d.ts +1 -3
- package/lib/components/provider/PageProvider.d.ts.map +1 -0
- package/lib/components/provider/PageProvider.js +9 -0
- package/lib/components/provider/ThemeProvider.d.ts +15 -0
- package/lib/components/provider/ThemeProvider.d.ts.map +1 -0
- package/lib/components/provider/ThemeProvider.js +36 -0
- package/lib/components/provider/index.d.ts +3 -0
- package/lib/components/provider/index.d.ts.map +1 -0
- package/lib/components/provider/index.js +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +3 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/{src/types → types}/api.d.ts +1 -1
- package/lib/types/api.d.ts.map +1 -0
- package/lib/types/api.js +1 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +1 -0
- package/lib/{src/types → types}/languages.d.ts +2 -1
- package/lib/types/languages.d.ts.map +1 -0
- package/lib/types/languages.js +15 -0
- package/lib/{src/types → types}/palette.d.ts +2 -1
- package/lib/types/palette.d.ts.map +1 -0
- package/lib/types/palette.js +1 -0
- package/lib/utils/helpers/colorHelpers.d.ts.map +1 -0
- package/lib/{src/utils → utils}/helpers/colorHelpers.js +6 -13
- package/lib/utils/helpers/dateHelpers.d.ts.map +1 -0
- package/lib/{src/utils → utils}/helpers/dateHelpers.js +5 -12
- package/lib/utils/helpers/index.d.ts +4 -0
- package/lib/utils/helpers/index.d.ts.map +1 -0
- package/lib/{src/utils/helpers/index.d.ts → utils/helpers/index.js} +1 -2
- package/lib/{src/utils → utils}/helpers/stringHelpers.d.ts +1 -0
- package/lib/utils/helpers/stringHelpers.d.ts.map +1 -0
- package/lib/utils/helpers/stringHelpers.js +40 -0
- package/lib/{src/utils → utils}/hooks/index.d.ts +1 -0
- package/lib/utils/hooks/index.d.ts.map +1 -0
- package/lib/utils/hooks/index.js +5 -0
- package/lib/utils/hooks/useAPI.d.ts.map +1 -0
- package/lib/utils/hooks/useAPI.js +18 -0
- package/lib/utils/hooks/useLocale.d.ts.map +1 -0
- package/lib/utils/hooks/useLocale.js +9 -0
- package/lib/utils/hooks/usePathname.d.ts +2 -0
- package/lib/utils/hooks/usePathname.d.ts.map +1 -0
- package/lib/utils/hooks/usePathname.js +7 -0
- package/lib/{src/utils → utils}/hooks/usePersistedState.d.ts +2 -1
- package/lib/utils/hooks/usePersistedState.d.ts.map +1 -0
- package/lib/{src/utils → utils}/hooks/usePersistedState.js +18 -20
- package/lib/{src/utils → utils}/hooks/useUserInfo.d.ts +2 -1
- package/lib/utils/hooks/useUserInfo.d.ts.map +1 -0
- package/lib/utils/hooks/useUserInfo.js +25 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/middleware/createI18nMiddleware.d.ts +8 -0
- package/lib/utils/middleware/createI18nMiddleware.d.ts.map +1 -0
- package/lib/utils/middleware/createI18nMiddleware.js +35 -0
- package/lib/utils/theme/components/MuiAccordion.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiAccordion.js +1 -3
- package/lib/utils/theme/components/MuiCard.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiCard.js +1 -3
- package/lib/utils/theme/components/MuiCardHeader.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiCardHeader.js +1 -3
- package/lib/utils/theme/components/MuiFormControl.d.ts.map +1 -0
- package/lib/utils/theme/components/MuiFormControl.js +6 -0
- package/lib/utils/theme/components/MuiGrid.d.ts.map +1 -0
- package/lib/utils/theme/components/MuiGrid.js +5 -0
- package/lib/utils/theme/components/MuiPaper.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiPaper.js +1 -3
- package/lib/utils/theme/components/MuiTypography.d.ts.map +1 -0
- package/lib/utils/theme/components/MuiTypography.js +5 -0
- package/lib/utils/theme/components/index.d.ts.map +1 -0
- package/lib/utils/theme/components/index.js +17 -0
- package/lib/utils/theme/index.d.ts.map +1 -0
- package/lib/utils/theme/index.js +56 -0
- package/lib/{src/utils → utils}/theme/palette/index.d.ts +2 -2
- package/lib/utils/theme/palette/index.d.ts.map +1 -0
- package/lib/utils/theme/palette/index.js +96 -0
- package/lib/utils/theme/typography.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/typography.js +1 -3
- package/package.json +50 -42
- package/lib/package.json +0 -85
- package/lib/src/components/buttons/Avatar/Avatar.d.ts.map +0 -1
- package/lib/src/components/buttons/Avatar/Avatar.js +0 -78
- package/lib/src/components/buttons/LanguageSelect/LanguageSelect.d.ts.map +0 -1
- package/lib/src/components/buttons/LanguageSelect/LanguageSelect.js +0 -58
- package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +0 -1
- package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.js +0 -44
- package/lib/src/components/buttons/index.d.ts.map +0 -1
- package/lib/src/components/buttons/index.js +0 -9
- package/lib/src/components/display/Accordion/Accordion.d.ts.map +0 -1
- package/lib/src/components/display/Accordion/Accordion.js +0 -26
- package/lib/src/components/display/StyledValue/ImprovementChip.d.ts.map +0 -1
- package/lib/src/components/display/StyledValue/ImprovementChip.js +0 -66
- package/lib/src/components/display/StyledValue/StyledValue.d.ts.map +0 -1
- package/lib/src/components/display/StyledValue/StyledValue.js +0 -86
- package/lib/src/components/display/StyledValue/hooks.d.ts +0 -4
- package/lib/src/components/display/StyledValue/hooks.d.ts.map +0 -1
- package/lib/src/components/display/index.d.ts.map +0 -1
- package/lib/src/components/display/index.js +0 -12
- package/lib/src/components/index.d.ts.map +0 -1
- package/lib/src/components/index.js +0 -16
- package/lib/src/components/layout/MinimalLayout/MinimalLayout.d.ts.map +0 -1
- package/lib/src/components/layout/MinimalLayout/MinimalLayout.js +0 -64
- package/lib/src/components/layout/StandardLayout/StandardLayout.d.ts.map +0 -1
- package/lib/src/components/layout/StandardLayout/StandardLayout.js +0 -74
- package/lib/src/components/layout/assets/DeixLogo.d.ts.map +0 -1
- package/lib/src/components/layout/assets/DeixLogo.js +0 -20
- package/lib/src/components/layout/assets/ServerDown.d.ts.map +0 -1
- package/lib/src/components/layout/assets/ServerDown.js +0 -60
- package/lib/src/components/layout/components/AppLogo/AppLogo.d.ts.map +0 -1
- package/lib/src/components/layout/components/AppLogo/AppLogo.js +0 -30
- package/lib/src/components/layout/components/Footer/Footer.d.ts.map +0 -1
- package/lib/src/components/layout/components/Footer/Footer.js +0 -64
- package/lib/src/components/layout/components/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/src/components/layout/components/Sidebar/Sidebar.js +0 -237
- package/lib/src/components/layout/components/Topbar/ElevationScroll.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topbar/ElevationScroll.js +0 -17
- package/lib/src/components/layout/components/Topbar/Topbar.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topbar/Topbar.js +0 -61
- package/lib/src/components/layout/components/Topbar/Topbar.styles.d.ts +0 -18
- package/lib/src/components/layout/components/Topbar/Topbar.styles.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topbar/Topbar.styles.js +0 -16
- package/lib/src/components/layout/components/Topline/TopLine.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topline/TopLine.js +0 -18
- package/lib/src/components/layout/index.d.ts.map +0 -1
- package/lib/src/components/layout/index.js +0 -10
- package/lib/src/components/progress/CircularLoading/CircularLoading.d.ts.map +0 -1
- package/lib/src/components/progress/CircularLoading/CircularLoading.js +0 -22
- package/lib/src/components/progress/index.d.ts.map +0 -1
- package/lib/src/components/progress/index.js +0 -8
- package/lib/src/index.d.ts +0 -7
- package/lib/src/index.d.ts.map +0 -1
- package/lib/src/index.js +0 -32
- package/lib/src/types/api.d.ts.map +0 -1
- package/lib/src/types/api.js +0 -2
- package/lib/src/types/index.d.ts.map +0 -1
- package/lib/src/types/index.js +0 -5
- package/lib/src/types/languages.d.ts.map +0 -1
- package/lib/src/types/languages.js +0 -18
- package/lib/src/types/palette.d.ts.map +0 -1
- package/lib/src/types/palette.js +0 -2
- package/lib/src/utils/helpers/colorHelpers.d.ts.map +0 -1
- package/lib/src/utils/helpers/dateHelpers.d.ts.map +0 -1
- package/lib/src/utils/helpers/index.d.ts.map +0 -1
- package/lib/src/utils/helpers/index.js +0 -17
- package/lib/src/utils/helpers/stringHelpers.d.ts.map +0 -1
- package/lib/src/utils/helpers/stringHelpers.js +0 -39
- package/lib/src/utils/hooks/index.d.ts.map +0 -1
- package/lib/src/utils/hooks/index.js +0 -14
- package/lib/src/utils/hooks/useAPI.d.ts.map +0 -1
- package/lib/src/utils/hooks/useAPI.js +0 -23
- package/lib/src/utils/hooks/useLocale.d.ts.map +0 -1
- package/lib/src/utils/hooks/useLocale.js +0 -13
- package/lib/src/utils/hooks/usePersistedState.d.ts.map +0 -1
- package/lib/src/utils/hooks/useUserInfo.d.ts.map +0 -1
- package/lib/src/utils/hooks/useUserInfo.js +0 -32
- package/lib/src/utils/index.d.ts +0 -5
- package/lib/src/utils/index.d.ts.map +0 -1
- package/lib/src/utils/index.js +0 -25
- package/lib/src/utils/provider/PageProvider.d.ts.map +0 -1
- package/lib/src/utils/provider/PageProvider.js +0 -19
- package/lib/src/utils/provider/ThemeProvider.d.ts +0 -9
- package/lib/src/utils/provider/ThemeProvider.d.ts.map +0 -1
- package/lib/src/utils/provider/ThemeProvider.js +0 -47
- package/lib/src/utils/theme/components/MuiAccordion.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiCard.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiCardHeader.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiFormControl.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiFormControl.js +0 -8
- package/lib/src/utils/theme/components/MuiGrid.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiGrid.js +0 -7
- package/lib/src/utils/theme/components/MuiPaper.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiTypography.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiTypography.js +0 -7
- package/lib/src/utils/theme/components/index.d.ts.map +0 -1
- package/lib/src/utils/theme/components/index.js +0 -22
- package/lib/src/utils/theme/createEmotionCache.d.ts +0 -2
- package/lib/src/utils/theme/createEmotionCache.d.ts.map +0 -1
- package/lib/src/utils/theme/createEmotionCache.js +0 -11
- package/lib/src/utils/theme/index.d.ts.map +0 -1
- package/lib/src/utils/theme/index.js +0 -85
- package/lib/src/utils/theme/palette/index.d.ts.map +0 -1
- package/lib/src/utils/theme/palette/index.js +0 -100
- package/lib/src/utils/theme/typography.d.ts.map +0 -1
- /package/lib/{src/components → components}/buttons/Avatar/Avatar.d.ts +0 -0
- /package/lib/{src/components → components}/buttons/LanguageSelect/LanguageSelect.d.ts +0 -0
- /package/lib/{src/components → components}/buttons/LanguageSelect/translations.json +0 -0
- /package/lib/{src/components → components}/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -0
- /package/lib/{src/components → components}/buttons/index.d.ts +0 -0
- /package/lib/{src/components → components}/display/Accordion/Accordion.d.ts +0 -0
- /package/lib/{src/components → components}/display/StyledValue/ImprovementChip.d.ts +0 -0
- /package/lib/{src/components → components}/display/StyledValue/StyledValue.d.ts +0 -0
- /package/lib/{src/components → components}/display/StyledValue/translations.json +0 -0
- /package/lib/{src/components → components}/display/index.d.ts +0 -0
- /package/lib/{src/components → components}/layout/MinimalLayout/MinimalLayout.d.ts +0 -0
- /package/lib/{src/components → components}/layout/StandardLayout/StandardLayout.d.ts +0 -0
- /package/lib/{src/components → components}/layout/assets/DeixLogo.d.ts +0 -0
- /package/lib/{src/components → components}/layout/assets/DeixLogo.tsx +0 -0
- /package/lib/{src/components → components}/layout/assets/ServerDown.d.ts +0 -0
- /package/lib/{src/components → components}/layout/assets/ServerDown.tsx +0 -0
- /package/lib/{src/components → components}/layout/assets/deix_logo_symbol_minimal.svg +0 -0
- /package/lib/{src/components → components}/layout/assets/undraw_server_down.svg +0 -0
- /package/lib/{src/components → components}/layout/components/AppLogo/AppLogo.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Footer/Footer.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Sidebar/Sidebar.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Topbar/ElevationScroll.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Topbar/Topbar.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Topline/TopLine.d.ts +0 -0
- /package/lib/{src/components → components}/layout/index.d.ts +0 -0
- /package/lib/{src/components → components}/progress/CircularLoading/CircularLoading.d.ts +0 -0
- /package/lib/{src/components → components}/progress/CircularLoading/translations.json +0 -0
- /package/lib/{src/components → components}/progress/index.d.ts +0 -0
- /package/lib/{src/types → types}/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/helpers/colorHelpers.d.ts +0 -0
- /package/lib/{src/utils → utils}/helpers/dateHelpers.d.ts +0 -0
- /package/lib/{src/utils → utils}/hooks/useAPI.d.ts +0 -0
- /package/lib/{src/utils → utils}/hooks/useLocale.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiAccordion.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiCard.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiCardHeader.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiFormControl.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiGrid.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiPaper.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiTypography.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/typography.d.ts +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createTheme } from '@mui/material/styles';
|
|
2
|
+
import * as locales from '@mui/material/locale';
|
|
3
|
+
import { css } from '@mui/system';
|
|
4
|
+
import components from './components';
|
|
5
|
+
import { adaptivePalette } from './palette';
|
|
6
|
+
import typography from './typography';
|
|
7
|
+
const localeMapping = {
|
|
8
|
+
en: 'enUS',
|
|
9
|
+
es: 'esES',
|
|
10
|
+
fr: 'frFR',
|
|
11
|
+
de: 'deDE',
|
|
12
|
+
it: 'itIT',
|
|
13
|
+
};
|
|
14
|
+
export const adaptiveTheme = (mode, locale, lightPalette, darkPalette) => {
|
|
15
|
+
const theme = {
|
|
16
|
+
palette: adaptivePalette(mode, lightPalette, darkPalette),
|
|
17
|
+
typography,
|
|
18
|
+
components,
|
|
19
|
+
zIndex: {
|
|
20
|
+
appBar: 1100,
|
|
21
|
+
drawer: 1200,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
return createTheme(theme, locales[localeMapping[locale]]);
|
|
25
|
+
};
|
|
26
|
+
export const globalStyles = css `
|
|
27
|
+
:root {
|
|
28
|
+
display: flex;
|
|
29
|
+
}
|
|
30
|
+
body {
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
a {
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
}
|
|
36
|
+
html {
|
|
37
|
+
height: 100%;
|
|
38
|
+
-webkit-font-smoothing: antialiased;
|
|
39
|
+
-moz-osx-font-smoothing: grayscale;
|
|
40
|
+
}
|
|
41
|
+
#__next {
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
margin: 0px;
|
|
45
|
+
padding: 0px;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
display: flex;
|
|
48
|
+
overflow-y: auto;
|
|
49
|
+
// /* hide scrollbar for IE, Edge and Firefox */
|
|
50
|
+
// -ms-overflow-style: none;
|
|
51
|
+
// scrollbar-width: none;
|
|
52
|
+
}
|
|
53
|
+
// ::-webkit-scrollbar {
|
|
54
|
+
// display: none;
|
|
55
|
+
// }
|
|
56
|
+
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PaletteOptions } from
|
|
2
|
-
export type AllowedTheme = NonNullable<PaletteOptions[
|
|
1
|
+
import { PaletteOptions } from '@mui/material/styles';
|
|
2
|
+
export type AllowedTheme = NonNullable<PaletteOptions['mode']>;
|
|
3
3
|
export declare const DEFAULT_THEME: AllowedTheme;
|
|
4
4
|
export declare const defaultLightPalette: PaletteOptions;
|
|
5
5
|
export declare const defaultDarkPalette: PaletteOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme/palette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,YAAsB,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,cA2CjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAyChC,CAAC;AAEF,eAAO,MAAM,eAAe,SACpB,YAAY,iBACH,cAAc,gBACf,cAAc,KAC3B,cAQF,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export const DEFAULT_THEME = 'light';
|
|
2
|
+
export const defaultLightPalette = {
|
|
3
|
+
mode: 'light',
|
|
4
|
+
gradient: {
|
|
5
|
+
main: `linear-gradient(90deg, #008080, #00283D)`,
|
|
6
|
+
},
|
|
7
|
+
primary: {
|
|
8
|
+
main: '#008080',
|
|
9
|
+
},
|
|
10
|
+
secondary: {
|
|
11
|
+
main: '#E2634E',
|
|
12
|
+
},
|
|
13
|
+
success: {
|
|
14
|
+
main: '#26B540',
|
|
15
|
+
},
|
|
16
|
+
info: {
|
|
17
|
+
main: '#2466F4',
|
|
18
|
+
},
|
|
19
|
+
warning: {
|
|
20
|
+
main: '#EA8A04',
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
main: '#D3343F',
|
|
24
|
+
},
|
|
25
|
+
background: {
|
|
26
|
+
default: '#fafafa',
|
|
27
|
+
paper: '#ffffff',
|
|
28
|
+
},
|
|
29
|
+
text: {
|
|
30
|
+
secondary: 'rgba(0,0,0,0.54)',
|
|
31
|
+
primary: 'rgba(0,0,0,0.87)',
|
|
32
|
+
disabled: 'rgba(0,0,0,0.38)',
|
|
33
|
+
},
|
|
34
|
+
divider: 'rgba(0,0,0,0.12)',
|
|
35
|
+
linkNotActive: {
|
|
36
|
+
main: '#afafaf',
|
|
37
|
+
},
|
|
38
|
+
sidebar: {
|
|
39
|
+
main: '#fafafa',
|
|
40
|
+
contrastText: '#008080',
|
|
41
|
+
light: '#afafaf',
|
|
42
|
+
dark: '#00283D',
|
|
43
|
+
},
|
|
44
|
+
topbar: { main: '#008080', contrastText: '#fafafa' },
|
|
45
|
+
};
|
|
46
|
+
export const defaultDarkPalette = {
|
|
47
|
+
mode: 'dark',
|
|
48
|
+
gradient: {
|
|
49
|
+
main: `linear-gradient(90deg, #2CB2A7, #C6F8E7)`,
|
|
50
|
+
},
|
|
51
|
+
primary: {
|
|
52
|
+
main: '#2CB2A7',
|
|
53
|
+
},
|
|
54
|
+
secondary: {
|
|
55
|
+
main: '#E2634E',
|
|
56
|
+
},
|
|
57
|
+
success: {
|
|
58
|
+
main: '#26B540',
|
|
59
|
+
},
|
|
60
|
+
info: {
|
|
61
|
+
main: '#2466F4',
|
|
62
|
+
},
|
|
63
|
+
warning: {
|
|
64
|
+
main: '#EA8A04',
|
|
65
|
+
},
|
|
66
|
+
error: {
|
|
67
|
+
main: '#D3343F',
|
|
68
|
+
},
|
|
69
|
+
background: {
|
|
70
|
+
default: '#303030',
|
|
71
|
+
paper: '#424242',
|
|
72
|
+
},
|
|
73
|
+
text: {
|
|
74
|
+
primary: '#ffffff',
|
|
75
|
+
secondary: 'rgba(255,255,255,0.7)',
|
|
76
|
+
disabled: 'rgba(255,255,255,0.5)',
|
|
77
|
+
},
|
|
78
|
+
divider: 'rgba(255,255,255,0.12)',
|
|
79
|
+
linkNotActive: { main: '#afafaf' },
|
|
80
|
+
sidebar: {
|
|
81
|
+
main: '#303030',
|
|
82
|
+
contrastText: '#2CB2A7',
|
|
83
|
+
dark: '#000000',
|
|
84
|
+
light: '#afafaf',
|
|
85
|
+
},
|
|
86
|
+
topbar: { main: '#303030', contrastText: '#ffffff' },
|
|
87
|
+
};
|
|
88
|
+
export const adaptivePalette = (mode, lightPalette, darkPalette) => {
|
|
89
|
+
let light = defaultLightPalette;
|
|
90
|
+
let dark = defaultDarkPalette;
|
|
91
|
+
if (lightPalette !== undefined && darkPalette !== undefined) {
|
|
92
|
+
light = lightPalette;
|
|
93
|
+
dark = darkPalette;
|
|
94
|
+
}
|
|
95
|
+
return mode === 'light' ? light : dark;
|
|
96
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/utils/theme/typography.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEV,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
const fonts = {
|
|
4
2
|
fontFamily: 'Raleway, Arial',
|
|
5
3
|
body1: {
|
|
@@ -65,4 +63,4 @@ const fonts = {
|
|
|
65
63
|
lineHeight: 1.375,
|
|
66
64
|
},
|
|
67
65
|
};
|
|
68
|
-
|
|
66
|
+
export default fonts;
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deix/rossini-core",
|
|
3
|
-
"version": "
|
|
4
|
-
"main": "lib/
|
|
5
|
-
"type": "commonjs",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"main": "lib/index.js",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "https://github.com/deix-ai/rossini-core.git"
|
|
@@ -13,66 +12,72 @@
|
|
|
13
12
|
"name": "Jacopo Corno"
|
|
14
13
|
},
|
|
15
14
|
"scripts": {
|
|
16
|
-
"lint": "
|
|
17
|
-
"build": "tsc -p tsconfig.json && cp -r src/components/layout/assets/ lib/
|
|
18
|
-
"prepare": "tsc -p tsconfig.json && cp -r src/components/layout/assets/ lib/
|
|
15
|
+
"lint": "eslint src",
|
|
16
|
+
"build": "tsc -p tsconfig.json && cp -r src/components/layout/assets/ lib/components/layout/",
|
|
17
|
+
"prepare": "tsc -p tsconfig.json && cp -r src/components/layout/assets/ lib/components/layout/",
|
|
19
18
|
"storybook": "storybook dev -p 6006",
|
|
20
19
|
"build-storybook": "storybook build"
|
|
21
20
|
},
|
|
22
21
|
"peerDependencies": {
|
|
23
|
-
"@emotion/react": "^11.
|
|
24
|
-
"@emotion/styled": "^11.
|
|
25
|
-
"@fontsource/raleway": "^
|
|
22
|
+
"@emotion/react": "^11.11.3",
|
|
23
|
+
"@emotion/styled": "^11.11.0",
|
|
24
|
+
"@fontsource/raleway": "^5.0.15",
|
|
26
25
|
"@mui/icons-material": "^5.11.0",
|
|
27
26
|
"@mui/material": "^5.11.8",
|
|
27
|
+
"@tanstack/react-query": "^5.12.2",
|
|
28
|
+
"@tanstack/react-query-devtools": "^5.12.2",
|
|
28
29
|
"@types/react": "^18.0.28",
|
|
29
30
|
"@types/react-dom": "^18.0.8",
|
|
30
31
|
"axios": "^1.3.2",
|
|
31
|
-
"next": "^
|
|
32
|
-
"next-themes": "^0.2.1",
|
|
32
|
+
"next": "^14.0.3",
|
|
33
33
|
"react": "^18.2.0",
|
|
34
|
-
"react-dom": "^18.2.0"
|
|
35
|
-
"react-query": "^3.39.3"
|
|
34
|
+
"react-dom": "^18.2.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@babel/core": "^7.
|
|
39
|
-
"@emotion/react": "^11.
|
|
40
|
-
"@emotion/styled": "^11.
|
|
41
|
-
"@fontsource/raleway": "^
|
|
42
|
-
"@mui/icons-material": "^5.
|
|
43
|
-
"@mui/material": "^5.
|
|
44
|
-
"@storybook/addon-essentials": "^7.
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
53
|
-
"
|
|
37
|
+
"@babel/core": "^7.23.5",
|
|
38
|
+
"@emotion/react": "^11.11.3",
|
|
39
|
+
"@emotion/styled": "^11.11.0",
|
|
40
|
+
"@fontsource/raleway": "^5.0.15",
|
|
41
|
+
"@mui/icons-material": "^5.14.18",
|
|
42
|
+
"@mui/material": "^5.14.18",
|
|
43
|
+
"@storybook/addon-essentials": "^7.6.1",
|
|
44
|
+
"@storybook/addon-interactions": "^7.6.6",
|
|
45
|
+
"@storybook/addon-links": "^7.6.6",
|
|
46
|
+
"@storybook/addon-onboarding": "^1.0.10",
|
|
47
|
+
"@storybook/blocks": "^7.6.6",
|
|
48
|
+
"@storybook/manager-api": "^7.6.6",
|
|
49
|
+
"@storybook/nextjs": "^7.6.1",
|
|
50
|
+
"@storybook/react": "^7.6.1",
|
|
51
|
+
"@storybook/test": "^7.6.6",
|
|
52
|
+
"@storybook/testing-library": "^0.2.2",
|
|
53
|
+
"@tanstack/react-query": "^5.12.2",
|
|
54
|
+
"@tanstack/react-query-devtools": "^5.12.2",
|
|
55
|
+
"@types/node": "^20.10.0",
|
|
56
|
+
"@types/react": "^18.2.39",
|
|
57
|
+
"@types/react-dom": "^18.2.17",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
59
|
+
"axios": "^1.6.2",
|
|
60
|
+
"babel-loader": "^9.1.3",
|
|
54
61
|
"commitizen": "^4.3.0",
|
|
55
62
|
"cz-conventional-changelog": "^3.3.0",
|
|
56
|
-
"eslint": "^8.
|
|
57
|
-
"eslint-config-next": "^
|
|
58
|
-
"eslint-config-prettier": "^
|
|
59
|
-
"eslint-plugin-prettier": "^
|
|
60
|
-
"eslint-plugin-storybook": "^0.6.
|
|
61
|
-
"next": "^
|
|
62
|
-
"next-themes": "^0.2.1",
|
|
63
|
+
"eslint": "^8.54.0",
|
|
64
|
+
"eslint-config-next": "^14.0.3",
|
|
65
|
+
"eslint-config-prettier": "^9.0.0",
|
|
66
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
67
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
68
|
+
"next": "^14.0.3",
|
|
63
69
|
"react": "^18.2.0",
|
|
64
70
|
"react-docgen-typescript-plugin": "^1.0.5",
|
|
65
71
|
"react-dom": "^18.2.0",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"typescript": "4.9.5"
|
|
72
|
+
"storybook": "^7.6.1",
|
|
73
|
+
"ts-loader": "^9.5.1",
|
|
74
|
+
"typescript": "^5.3.3"
|
|
70
75
|
},
|
|
71
76
|
"resolutions": {
|
|
72
77
|
"@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2"
|
|
73
78
|
},
|
|
74
79
|
"files": [
|
|
75
|
-
"lib
|
|
80
|
+
"lib"
|
|
76
81
|
],
|
|
77
82
|
"config": {
|
|
78
83
|
"commitizen": {
|
|
@@ -80,6 +85,9 @@
|
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
87
|
"dependencies": {
|
|
83
|
-
"@
|
|
88
|
+
"@formatjs/intl-localematcher": "^0.5.2",
|
|
89
|
+
"@types/negotiator": "^0.6.3",
|
|
90
|
+
"negotiator": "^0.6.3",
|
|
91
|
+
"notistack": "^3.0.1"
|
|
84
92
|
}
|
|
85
93
|
}
|
package/lib/package.json
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@deix/rossini-core",
|
|
3
|
-
"version": "1.0.9",
|
|
4
|
-
"main": "lib/src/index.js",
|
|
5
|
-
"type": "commonjs",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/deix-ai/rossini-core.git"
|
|
9
|
-
},
|
|
10
|
-
"license": "UNLICENSED",
|
|
11
|
-
"private": false,
|
|
12
|
-
"author": {
|
|
13
|
-
"name": "Jacopo Corno"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"lint": "next lint",
|
|
17
|
-
"build": "tsc -p tsconfig.json && cp -r src/components/layout/assets/ lib/src/components/layout/",
|
|
18
|
-
"prepare": "tsc -p tsconfig.json && cp -r src/components/layout/assets/ lib/src/components/layout/",
|
|
19
|
-
"storybook": "storybook dev -p 6006",
|
|
20
|
-
"build-storybook": "storybook build"
|
|
21
|
-
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"@emotion/react": "^11.10.5",
|
|
24
|
-
"@emotion/styled": "^11.10.5",
|
|
25
|
-
"@fontsource/raleway": "^4.5.12",
|
|
26
|
-
"@mui/icons-material": "^5.11.0",
|
|
27
|
-
"@mui/material": "^5.11.8",
|
|
28
|
-
"@types/react": "^18.0.28",
|
|
29
|
-
"@types/react-dom": "^18.0.8",
|
|
30
|
-
"axios": "^1.3.2",
|
|
31
|
-
"next": "^13.1.3",
|
|
32
|
-
"next-themes": "^0.2.1",
|
|
33
|
-
"react": "^18.2.0",
|
|
34
|
-
"react-dom": "^18.2.0",
|
|
35
|
-
"react-query": "^3.39.3"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@babel/core": "^7.21.3",
|
|
39
|
-
"@emotion/react": "^11.10.6",
|
|
40
|
-
"@emotion/styled": "^11.10.6",
|
|
41
|
-
"@fontsource/raleway": "^4.5.12",
|
|
42
|
-
"@mui/icons-material": "^5.11.11",
|
|
43
|
-
"@mui/material": "^5.11.13",
|
|
44
|
-
"@storybook/addon-essentials": "^7.0.0-rc.2",
|
|
45
|
-
"@storybook/nextjs": "^7.0.0-rc.2",
|
|
46
|
-
"@storybook/react": "^7.0.0-rc.2",
|
|
47
|
-
"@storybook/testing-library": "^0.0.14-next.1",
|
|
48
|
-
"@types/node": "^18.15.3",
|
|
49
|
-
"@types/react": "^18.0.28",
|
|
50
|
-
"@types/react-dom": "^18.0.11",
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
|
52
|
-
"axios": "^1.3.4",
|
|
53
|
-
"babel-loader": "^9.1.2",
|
|
54
|
-
"commitizen": "^4.3.0",
|
|
55
|
-
"cz-conventional-changelog": "^3.3.0",
|
|
56
|
-
"eslint": "^8.36.0",
|
|
57
|
-
"eslint-config-next": "^13.2.4",
|
|
58
|
-
"eslint-config-prettier": "^8.7.0",
|
|
59
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
60
|
-
"eslint-plugin-storybook": "^0.6.11",
|
|
61
|
-
"next": "^13.2.4",
|
|
62
|
-
"next-themes": "^0.2.1",
|
|
63
|
-
"react": "^18.2.0",
|
|
64
|
-
"react-docgen-typescript-plugin": "^1.0.5",
|
|
65
|
-
"react-dom": "^18.2.0",
|
|
66
|
-
"react-query": "^3.39.3",
|
|
67
|
-
"storybook": "^7.0.0-rc.2",
|
|
68
|
-
"ts-loader": "^9.4.2",
|
|
69
|
-
"typescript": "4.9.5"
|
|
70
|
-
},
|
|
71
|
-
"resolutions": {
|
|
72
|
-
"@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2"
|
|
73
|
-
},
|
|
74
|
-
"files": [
|
|
75
|
-
"lib/**/*"
|
|
76
|
-
],
|
|
77
|
-
"config": {
|
|
78
|
-
"commitizen": {
|
|
79
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"dependencies": {
|
|
83
|
-
"@emotion/babel-plugin": "^11.10.6"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/buttons/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAmBxC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2ExC,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Avatar = void 0;
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const link_1 = __importDefault(require("next/link"));
|
|
32
|
-
const Face_1 = __importDefault(require("@mui/icons-material/Face"));
|
|
33
|
-
const Logout_1 = __importDefault(require("@mui/icons-material/Logout"));
|
|
34
|
-
const material_1 = require("@mui/material");
|
|
35
|
-
const useUserInfo_1 = require("../../../utils/hooks/useUserInfo");
|
|
36
|
-
const Avatar = ({ logoutUrl, accountSettingsUrl, }) => {
|
|
37
|
-
const muiTheme = (0, material_1.useTheme)();
|
|
38
|
-
// Menu
|
|
39
|
-
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
40
|
-
const open = Boolean(anchorEl);
|
|
41
|
-
const handleClick = (event) => {
|
|
42
|
-
setAnchorEl(event.currentTarget);
|
|
43
|
-
};
|
|
44
|
-
const handleClose = () => {
|
|
45
|
-
setAnchorEl(null);
|
|
46
|
-
};
|
|
47
|
-
// User data
|
|
48
|
-
const { data: userInfo } = (0, useUserInfo_1.useUserInfo)();
|
|
49
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
50
|
-
react_1.default.createElement(material_1.Tooltip, { title: userInfo?.preferredUsername || 'Anonymous User' },
|
|
51
|
-
react_1.default.createElement(material_1.Avatar, { alt: userInfo?.preferredUsername || 'user-name', sx: {
|
|
52
|
-
width: 24,
|
|
53
|
-
height: 24,
|
|
54
|
-
bgcolor: muiTheme.palette.topbar.contrastText,
|
|
55
|
-
}, onClick: handleClick })),
|
|
56
|
-
react_1.default.createElement(material_1.Menu, { anchorEl: anchorEl, open: open, onClose: handleClose, anchorOrigin: {
|
|
57
|
-
vertical: 'bottom',
|
|
58
|
-
horizontal: 'right',
|
|
59
|
-
}, transformOrigin: {
|
|
60
|
-
vertical: 'top',
|
|
61
|
-
horizontal: 'right',
|
|
62
|
-
}, PaperProps: {
|
|
63
|
-
sx: {
|
|
64
|
-
padding: '4px',
|
|
65
|
-
},
|
|
66
|
-
} },
|
|
67
|
-
accountSettingsUrl && (react_1.default.createElement(link_1.default, { href: accountSettingsUrl },
|
|
68
|
-
react_1.default.createElement(material_1.MenuItem, { onClick: handleClose },
|
|
69
|
-
react_1.default.createElement(material_1.ListItemIcon, null,
|
|
70
|
-
react_1.default.createElement(Face_1.default, { fontSize: 'small' })),
|
|
71
|
-
react_1.default.createElement(material_1.ListItemText, null, "Account")))),
|
|
72
|
-
logoutUrl && (react_1.default.createElement(link_1.default, { href: logoutUrl },
|
|
73
|
-
react_1.default.createElement(material_1.MenuItem, { onClick: handleClose },
|
|
74
|
-
react_1.default.createElement(material_1.ListItemIcon, null,
|
|
75
|
-
react_1.default.createElement(Logout_1.default, { fontSize: 'small' })),
|
|
76
|
-
react_1.default.createElement(material_1.ListItemText, null, "Logout")))))));
|
|
77
|
-
};
|
|
78
|
-
exports.Avatar = Avatar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/buttons/LanguageSelect/LanguageSelect.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAiBjD,OAAO,EAGL,QAAQ,EACR,MAAM,EACP,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CA+EjE,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.LanguageSelect = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const link_1 = __importDefault(require("next/link"));
|
|
9
|
-
const router_1 = require("next/router");
|
|
10
|
-
const Language_1 = __importDefault(require("@mui/icons-material/Language"));
|
|
11
|
-
const material_1 = require("@mui/material");
|
|
12
|
-
const languages_1 = require("../../../types/languages");
|
|
13
|
-
const translations_json_1 = __importDefault(require("./translations.json"));
|
|
14
|
-
const LanguageSelect = ({ locale = 'en', languages = [
|
|
15
|
-
{
|
|
16
|
-
id: 'en',
|
|
17
|
-
label: 'English',
|
|
18
|
-
countryCode: 'us',
|
|
19
|
-
MUILocale: 'enUS',
|
|
20
|
-
},
|
|
21
|
-
], }) => {
|
|
22
|
-
const muiTheme = (0, material_1.useTheme)();
|
|
23
|
-
// Menu controls
|
|
24
|
-
const [anchorEl, setAnchorEl] = react_1.default.useState(null);
|
|
25
|
-
const open = Boolean(anchorEl);
|
|
26
|
-
const openOptions = (evt) => {
|
|
27
|
-
setAnchorEl(evt.currentTarget);
|
|
28
|
-
};
|
|
29
|
-
const closeOptions = () => {
|
|
30
|
-
setAnchorEl(null);
|
|
31
|
-
};
|
|
32
|
-
// Set the current language
|
|
33
|
-
const setLocale = (locale) => {
|
|
34
|
-
document.cookie = `NEXT_LOCALE=${locale}; max-age=31536000; path=/`;
|
|
35
|
-
};
|
|
36
|
-
const router = (0, router_1.useRouter)();
|
|
37
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
|
-
react_1.default.createElement(material_1.Tooltip, { title: translations_json_1.default['tooltip'][locale] },
|
|
39
|
-
react_1.default.createElement(material_1.IconButton, { component: 'span', "aria-label": 'language', onClick: openOptions },
|
|
40
|
-
react_1.default.createElement(Language_1.default, { htmlColor: muiTheme.palette.topbar.contrastText }))),
|
|
41
|
-
react_1.default.createElement(material_1.Menu, { anchorEl: anchorEl, id: 'language-menu', open: open, onClose: closeOptions, onClick: closeOptions, anchorOrigin: {
|
|
42
|
-
vertical: 'bottom',
|
|
43
|
-
horizontal: 'right',
|
|
44
|
-
}, transformOrigin: {
|
|
45
|
-
vertical: 'top',
|
|
46
|
-
horizontal: 'right',
|
|
47
|
-
}, PaperProps: {
|
|
48
|
-
sx: {
|
|
49
|
-
padding: '4px',
|
|
50
|
-
},
|
|
51
|
-
} },
|
|
52
|
-
react_1.default.createElement(material_1.MenuList, { dense: true }, languages?.map((lang) => (react_1.default.createElement(link_1.default, { key: lang.id, href: router.asPath, locale: lang.id },
|
|
53
|
-
react_1.default.createElement(material_1.MenuItem, { selected: lang.id === locale, onClick: () => setLocale(lang.id) },
|
|
54
|
-
react_1.default.createElement(material_1.ListItemIcon, null,
|
|
55
|
-
react_1.default.createElement("span", null, languages_1.flagIcons[lang.countryCode])),
|
|
56
|
-
react_1.default.createElement(material_1.ListItemText, null, lang.label)))))))));
|
|
57
|
-
};
|
|
58
|
-
exports.LanguageSelect = LanguageSelect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButtonGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoC9D,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ToggleButtonGroup = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
|
-
const material_1 = require("@mui/material");
|
|
29
|
-
const useLocale_1 = require("../../../utils/hooks/useLocale");
|
|
30
|
-
const ToggleButtonGroup = ({ onChange, options, size = 'small', value, }) => {
|
|
31
|
-
const locale = (0, useLocale_1.useLocale)();
|
|
32
|
-
// Handle selection
|
|
33
|
-
const [selected, setSelected] = (0, react_1.useState)('');
|
|
34
|
-
(0, react_1.useEffect)(() => {
|
|
35
|
-
if (value) {
|
|
36
|
-
setSelected(value);
|
|
37
|
-
}
|
|
38
|
-
}, [value]);
|
|
39
|
-
return (react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } }, options.map((opt) => {
|
|
40
|
-
return (react_1.default.createElement(material_1.Tooltip, { key: opt.id, title: opt.tooltip?.[locale] || '' },
|
|
41
|
-
react_1.default.createElement(material_1.Button, { key: opt.id, size: size, color: 'primary', disabled: opt.disabled, variant: opt.id === selected ? 'contained' : 'outlined', onClick: () => onChange(opt.id) }, opt.label[locale])));
|
|
42
|
-
})));
|
|
43
|
-
};
|
|
44
|
-
exports.ToggleButtonGroup = ToggleButtonGroup;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,YAAY,EACV,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,uCAAuC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToggleButtonGroup = exports.LanguageSelect = exports.Avatar = void 0;
|
|
4
|
-
var Avatar_1 = require("./Avatar/Avatar");
|
|
5
|
-
Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return Avatar_1.Avatar; } });
|
|
6
|
-
var LanguageSelect_1 = require("./LanguageSelect/LanguageSelect");
|
|
7
|
-
Object.defineProperty(exports, "LanguageSelect", { enumerable: true, get: function () { return LanguageSelect_1.LanguageSelect; } });
|
|
8
|
-
var ToggleButtonGroup_1 = require("./ToggleButtonGroup/ToggleButtonGroup");
|
|
9
|
-
Object.defineProperty(exports, "ToggleButtonGroup", { enumerable: true, get: function () { return ToggleButtonGroup_1.ToggleButtonGroup; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EAGL,cAAc,IAAI,iBAAiB,EAInC,eAAe,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,UAAU,qBAAqB;IAC7B;;OAEG;IACH,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACzC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAChD,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAEnC,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqCvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const types_1 = require("../../../types");
|
|
10
|
-
const utils_1 = require("../../../utils");
|
|
11
|
-
const Accordion = ({ title, titleProps = { variant: 'h6', color: 'textPrimary' }, subtitle, subtitleProps = { variant: 'subtitle1', gutterBottom: true }, icon, tooltip, expandIcon = react_1.default.createElement(ExpandMore_1.default, null), children, ...muiProps }) => {
|
|
12
|
-
const locale = (0, utils_1.useLocale)();
|
|
13
|
-
const titleString = (0, types_1.isStringTranslation)(title) ? title[locale] : title;
|
|
14
|
-
const subtitleString = subtitle && (0, types_1.isStringTranslation)(subtitle) ? subtitle[locale] : subtitle;
|
|
15
|
-
return (react_1.default.createElement(material_1.Tooltip, { title: tooltip || '' },
|
|
16
|
-
react_1.default.createElement(react_1.default.Fragment, null,
|
|
17
|
-
react_1.default.createElement(material_1.Accordion, { ...muiProps },
|
|
18
|
-
react_1.default.createElement(material_1.AccordionSummary, { expandIcon: expandIcon },
|
|
19
|
-
icon && react_1.default.createElement("div", { style: { marginRight: '16px' } }, icon),
|
|
20
|
-
react_1.default.createElement(material_1.Typography, { ...titleProps }, titleString)),
|
|
21
|
-
react_1.default.createElement(material_1.AccordionDetails, null,
|
|
22
|
-
react_1.default.createElement(react_1.default.Fragment, null,
|
|
23
|
-
subtitle && (react_1.default.createElement(material_1.Typography, { ...subtitleProps }, subtitleString)),
|
|
24
|
-
children))))));
|
|
25
|
-
};
|
|
26
|
-
exports.default = Accordion;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImprovementChip.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/StyledValue/ImprovementChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAQ,SAAS,EAAW,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC5D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;CACtC;AA4CD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuCnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|