@veevarts/design-system 1.0.0-alpha.4 → 1.0.0-alpha.6
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/dist/index.cjs +10 -10
- package/dist/index.js +1416 -1296
- package/dist/patterns/Navbar/Navbar.d.ts +23 -7
- package/dist/patterns/Navbar/Navbar.test.d.ts +1 -0
- package/dist/theme/index.d.ts +2 -2
- package/dist/tokens/colors.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Navbar Component
|
|
3
|
+
*
|
|
4
|
+
* A flexible, stateless navigation bar pattern for React apps.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Logo on the left (image URL via `logo` prop)
|
|
8
|
+
* - Language selector dropdown with a globe icon (disabled if no languages)
|
|
9
|
+
* - Login/Logout button with user icon, fully controlled via props
|
|
10
|
+
* - All state and actions (login, logout, language change) are controlled by parent via props
|
|
11
|
+
* - Strictly typed with TypeScript
|
|
12
|
+
*/
|
|
2
13
|
export interface NavbarLink {
|
|
3
14
|
label: string;
|
|
4
15
|
href: string;
|
|
@@ -8,17 +19,22 @@ export interface NavbarLanguage {
|
|
|
8
19
|
code: string;
|
|
9
20
|
label: string;
|
|
10
21
|
}
|
|
22
|
+
export interface NavbarLabels {
|
|
23
|
+
login: string;
|
|
24
|
+
logout: string;
|
|
25
|
+
selectLanguage: string;
|
|
26
|
+
}
|
|
11
27
|
export interface NavbarProps {
|
|
12
|
-
logo?:
|
|
13
|
-
links?: NavbarLink[];
|
|
28
|
+
logo?: string;
|
|
14
29
|
languages?: NavbarLanguage[];
|
|
15
30
|
selectedLanguage?: string;
|
|
16
31
|
onLanguageChange?: (languageCode: string) => void;
|
|
17
32
|
isLoggedIn?: boolean;
|
|
18
|
-
|
|
33
|
+
hasLanguages?: boolean;
|
|
34
|
+
hasAuth?: boolean;
|
|
19
35
|
onLogin?: () => void;
|
|
20
36
|
onLogout?: () => void;
|
|
21
|
-
|
|
22
|
-
|
|
37
|
+
labels?: Partial<NavbarLabels>;
|
|
38
|
+
className?: string;
|
|
23
39
|
}
|
|
24
|
-
export declare function Navbar(
|
|
40
|
+
export declare function Navbar({ logo, languages, selectedLanguage, onLanguageChange, isLoggedIn, onLogin, onLogout, hasLanguages, hasAuth, labels, className, }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -23,12 +23,12 @@ export declare const theme: {
|
|
|
23
23
|
readonly 200: "#e5e7eb";
|
|
24
24
|
readonly 300: "#d1d5db";
|
|
25
25
|
readonly 400: "#9ca3af";
|
|
26
|
-
readonly 500:
|
|
26
|
+
readonly 500: "#000000";
|
|
27
27
|
readonly 600: "#000000";
|
|
28
28
|
readonly 700: "#000000";
|
|
29
29
|
readonly 800: "#000000";
|
|
30
30
|
readonly 900: "#000000";
|
|
31
|
-
readonly DEFAULT:
|
|
31
|
+
readonly DEFAULT: "#000000";
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
};
|
package/dist/tokens/colors.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veevarts/design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@tiptap/pm": "^2.27.0",
|
|
75
75
|
"@tiptap/react": "^2.27.0",
|
|
76
76
|
"@tiptap/starter-kit": "^2.27.0",
|
|
77
|
-
"@types/node": "^24.10.
|
|
77
|
+
"@types/node": "^24.10.9",
|
|
78
78
|
"@types/react": "^19.2.5",
|
|
79
79
|
"@types/react-dom": "^19.2.3",
|
|
80
80
|
"@vitejs/plugin-react": "^5.1.1",
|