@taruvi/navkit 0.0.11 → 0.0.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/package.json +1 -1
- package/src/App.styles.ts +1 -0
- package/src/App.tsx +3 -2
- package/src/assets/taruvi-logo-black.png +0 -0
- package/src/components/AppLauncher/AppLauncher.styles.ts +3 -2
- package/src/components/Profile/Profile.styles.ts +3 -2
- package/src/components/Shortucts/ShortcutsMenu.styles.ts +3 -2
- package/src/styles/variables.ts +7 -1
- package/src/assets/taruvi-logo.png +0 -0
- /package/src/assets/{logo-text.png → taruvi-logo-white.png} +0 -0
package/package.json
CHANGED
package/src/App.styles.ts
CHANGED
package/src/App.tsx
CHANGED
|
@@ -7,7 +7,8 @@ import { AppLauncher, Profile, ProfileMenu, Shortcuts, ShortcutsMenu, Mattermost
|
|
|
7
7
|
import { Box, Modal, Card } from "@mui/material"
|
|
8
8
|
import { getAppStyles } from "./App.styles"
|
|
9
9
|
import { NavkitProvider, useNavigation } from "./NavkitContext"
|
|
10
|
-
import
|
|
10
|
+
import blackLogo from "./assets/taruvi-logo-white.png"
|
|
11
|
+
import whiteLogo from "./assets/taruvi-logo-black.png"
|
|
11
12
|
import type { Client } from "@taruvi/sdk"
|
|
12
13
|
|
|
13
14
|
const NavkitContent = () => {
|
|
@@ -40,7 +41,7 @@ const NavkitContent = () => {
|
|
|
40
41
|
}
|
|
41
42
|
<img
|
|
42
43
|
style={(siteSettings?.logo && siteSettings.logo !== '') ? styles.logo : styles.defaultLogo}
|
|
43
|
-
src={(siteSettings?.logo && siteSettings.logo !== '') ? siteSettings.logo :
|
|
44
|
+
src={(siteSettings?.logo && siteSettings.logo !== '') ? siteSettings.logo : (themeMode === 'light' ? whiteLogo : blackLogo)}
|
|
44
45
|
onClick={() => window.location.href = siteSettings.frontendUrl || '/desk'}
|
|
45
46
|
/>
|
|
46
47
|
</Box>
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colours, spacing, shadows, borderRadius, typography, zIndex, dimensions, getColors } from '../../styles/variables'
|
|
1
|
+
import { colours, spacing, shadows, borderRadius, typography, zIndex, dimensions, getColors, getShadows } from '../../styles/variables'
|
|
2
2
|
import type { ThemeMode } from '../../styles/variables'
|
|
3
3
|
|
|
4
4
|
export const appLauncherStyles = {
|
|
@@ -61,6 +61,7 @@ export const appLauncherStyles = {
|
|
|
61
61
|
|
|
62
62
|
export const getAppLauncherStyles = (mode: ThemeMode) => {
|
|
63
63
|
const colors = getColors(mode)
|
|
64
|
+
const themeShadows = getShadows(mode)
|
|
64
65
|
return {
|
|
65
66
|
container: {
|
|
66
67
|
position: 'absolute' as const,
|
|
@@ -70,7 +71,7 @@ export const getAppLauncherStyles = (mode: ThemeMode) => {
|
|
|
70
71
|
maxWidth: '800px',
|
|
71
72
|
maxHeight: { xs: 'calc(100vh - 80px)', md: '335px' },
|
|
72
73
|
borderRadius: borderRadius.default,
|
|
73
|
-
boxShadow:
|
|
74
|
+
boxShadow: themeShadows.dropdown,
|
|
74
75
|
p: spacing.lg,
|
|
75
76
|
backgroundColor: colors.bg.white,
|
|
76
77
|
zIndex: zIndex.overlay,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colours, spacing, shadows, borderRadius, typography, zIndex, dimensions, getColors } from '../../styles/variables'
|
|
1
|
+
import { colours, spacing, shadows, borderRadius, typography, zIndex, dimensions, getColors, getShadows } from '../../styles/variables'
|
|
2
2
|
import type { ThemeMode } from '../../styles/variables'
|
|
3
3
|
|
|
4
4
|
export const profileStyles = {
|
|
@@ -61,6 +61,7 @@ export const profileStyles = {
|
|
|
61
61
|
|
|
62
62
|
export const getProfileStyles = (mode: ThemeMode) => {
|
|
63
63
|
const colors = getColors(mode)
|
|
64
|
+
const themeShadows = getShadows(mode)
|
|
64
65
|
return {
|
|
65
66
|
container: {
|
|
66
67
|
position: 'relative' as const,
|
|
@@ -93,7 +94,7 @@ export const getProfileStyles = (mode: ThemeMode) => {
|
|
|
93
94
|
right: 0,
|
|
94
95
|
width: 200,
|
|
95
96
|
borderRadius: borderRadius.default,
|
|
96
|
-
boxShadow:
|
|
97
|
+
boxShadow: themeShadows.dropdown,
|
|
97
98
|
backgroundColor: colors.bg.white,
|
|
98
99
|
zIndex: zIndex.overlay,
|
|
99
100
|
py: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colours, spacing, shadows, borderRadius, typography, zIndex, dimensions, getColors } from '../../styles/variables'
|
|
1
|
+
import { colours, spacing, shadows, borderRadius, typography, zIndex, dimensions, getColors, getShadows } from '../../styles/variables'
|
|
2
2
|
import type { ThemeMode } from '../../styles/variables'
|
|
3
3
|
|
|
4
4
|
export const shortcutsMenuStyles = {
|
|
@@ -36,6 +36,7 @@ export const shortcutsMenuStyles = {
|
|
|
36
36
|
|
|
37
37
|
export const getShortcutsMenuStyles = (mode: ThemeMode) => {
|
|
38
38
|
const colors = getColors(mode)
|
|
39
|
+
const themeShadows = getShadows(mode)
|
|
39
40
|
return {
|
|
40
41
|
menu: {
|
|
41
42
|
position: 'absolute' as const,
|
|
@@ -43,7 +44,7 @@ export const getShortcutsMenuStyles = (mode: ThemeMode) => {
|
|
|
43
44
|
right: 0,
|
|
44
45
|
width: 200,
|
|
45
46
|
borderRadius: borderRadius.default,
|
|
46
|
-
boxShadow:
|
|
47
|
+
boxShadow: themeShadows.dropdown,
|
|
47
48
|
backgroundColor: colors.bg.white,
|
|
48
49
|
zIndex: zIndex.overlay,
|
|
49
50
|
py: 1,
|
package/src/styles/variables.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const darkColors = {
|
|
|
25
25
|
tertiary: '#9e9e9e',
|
|
26
26
|
},
|
|
27
27
|
bg: {
|
|
28
|
-
white: '#
|
|
28
|
+
white: '#111827',
|
|
29
29
|
light: '#2d2d2d',
|
|
30
30
|
avatar: '#424242',
|
|
31
31
|
},
|
|
@@ -50,6 +50,12 @@ export const shadows = {
|
|
|
50
50
|
dropdown: '0 4px 20px rgba(0,0,0,0.1)',
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
export const getShadows = (mode: ThemeMode) => ({
|
|
54
|
+
dropdown: mode === 'dark'
|
|
55
|
+
? '0 4px 20px rgba(255,255,255,0.1)'
|
|
56
|
+
: '0 4px 20px rgba(0,0,0,0.1)',
|
|
57
|
+
})
|
|
58
|
+
|
|
53
59
|
export const borderRadius = {
|
|
54
60
|
default: 2,
|
|
55
61
|
}
|
|
Binary file
|
|
File without changes
|