@taruvi/navkit 0.0.1
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/.claude/settings.local.json +9 -0
- package/README.md +757 -0
- package/adr.md +1414 -0
- package/eslint.config.js +23 -0
- package/index.html +13 -0
- package/package.json +39 -0
- package/src/App.styles.ts +65 -0
- package/src/App.tsx +111 -0
- package/src/NavkitContext.tsx +152 -0
- package/src/assets/logo-text.png +0 -0
- package/src/assets/nopfp.png +0 -0
- package/src/assets/taruvi-logo.png +0 -0
- package/src/components/AppLauncher/AppLauncher.styles.ts +59 -0
- package/src/components/AppLauncher/AppLauncher.tsx +74 -0
- package/src/components/MattermostChat/MattermostChat.tsx +132 -0
- package/src/components/MattermostChat/README.md +227 -0
- package/src/components/Profile/Profile.styles.ts +59 -0
- package/src/components/Profile/Profile.tsx +36 -0
- package/src/components/Profile/ProfileMenu.tsx +42 -0
- package/src/components/Search/Search.styles.ts +7 -0
- package/src/components/Search/Search.tsx +51 -0
- package/src/components/Shortucts/Shortcuts.styles.ts +29 -0
- package/src/components/Shortucts/Shortcuts.tsx +72 -0
- package/src/components/Shortucts/ShortcutsMenu.styles.ts +34 -0
- package/src/components/Shortucts/ShortcutsMenu.tsx +62 -0
- package/src/components/index.ts +8 -0
- package/src/styles/commonStyles.ts +42 -0
- package/src/styles/variables.ts +61 -0
- package/src/types.ts +38 -0
- package/tsconfig.app.json +28 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +13 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Design Tokens - Centralized design values for consistent theming
|
|
2
|
+
|
|
3
|
+
export const colours = {
|
|
4
|
+
text: {
|
|
5
|
+
primary: '#333333',
|
|
6
|
+
secondary: '#424242',
|
|
7
|
+
tertiary: '#9e9e9e',
|
|
8
|
+
},
|
|
9
|
+
bg: {
|
|
10
|
+
white: '#fff',
|
|
11
|
+
light: '#f5f5f5',
|
|
12
|
+
avatar: '#E0E0E0',
|
|
13
|
+
},
|
|
14
|
+
border: {
|
|
15
|
+
light: '#e0e0e0',
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const spacing = {
|
|
20
|
+
xs: '10px',
|
|
21
|
+
sm: 1.5,
|
|
22
|
+
md: 2,
|
|
23
|
+
lg: 3,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const shadows = {
|
|
27
|
+
dropdown: '0 4px 20px rgba(0,0,0,0.1)',
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const borderRadius = {
|
|
31
|
+
default: 2,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const typography = {
|
|
35
|
+
sizes: {
|
|
36
|
+
xs: '0.8125rem',
|
|
37
|
+
sm: '0.875rem',
|
|
38
|
+
md: '1.125rem',
|
|
39
|
+
},
|
|
40
|
+
weights: {
|
|
41
|
+
regular: 400,
|
|
42
|
+
semibold: 600,
|
|
43
|
+
},
|
|
44
|
+
letterSpacing: {
|
|
45
|
+
default: '0.5px',
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const zIndex = {
|
|
50
|
+
overlay: 1300,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const dimensions = {
|
|
54
|
+
navHeight: '60px',
|
|
55
|
+
avatarSize: 30,
|
|
56
|
+
iconSize: {
|
|
57
|
+
sm: '18px',
|
|
58
|
+
md: '24px',
|
|
59
|
+
lg: '1.25rem',
|
|
60
|
+
},
|
|
61
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from "react"
|
|
2
|
+
|
|
3
|
+
export interface AppData {
|
|
4
|
+
appname: string,
|
|
5
|
+
icon: string,
|
|
6
|
+
url: string,
|
|
7
|
+
id: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UserData {
|
|
11
|
+
fullName?: string
|
|
12
|
+
pfp?: string
|
|
13
|
+
username?: string
|
|
14
|
+
email?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SiteSettings {
|
|
18
|
+
shortcuts?: AppData[]
|
|
19
|
+
logo?: string
|
|
20
|
+
showChat: boolean
|
|
21
|
+
frontendUrl: string
|
|
22
|
+
mattermostUrl: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface NavigationContextType {
|
|
26
|
+
navigateToUrl: (url: string, openInLine: boolean) => void
|
|
27
|
+
isDesk: boolean
|
|
28
|
+
appsList: AppData[]
|
|
29
|
+
userData: UserData | null
|
|
30
|
+
siteSettings: SiteSettings
|
|
31
|
+
jwtToken: string
|
|
32
|
+
isUserAuthenticated: boolean
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface NavkitProviderProps {
|
|
36
|
+
children: ReactNode
|
|
37
|
+
client: object
|
|
38
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"types": ["vite/client"],
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
"erasableSyntaxOnly": true,
|
|
24
|
+
"noFallthroughCasesInSwitch": true,
|
|
25
|
+
"noUncheckedSideEffectImports": true
|
|
26
|
+
},
|
|
27
|
+
"include": ["src"]
|
|
28
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"erasableSyntaxOnly": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["vite.config.ts"]
|
|
26
|
+
}
|
package/vite.config.ts
ADDED