@sykoramaros/marosh-components 0.1.17 → 0.2.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/dist/cli/index.cjs +3 -3
- package/dist/index.d.ts +11 -46
- package/dist/index.js +23 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2544 -3618
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -7
- package/src/components/basicComponents/CustomButton.stories.tsx +60 -0
- package/src/components/basicComponents/Footer.stories.tsx +47 -0
- package/src/components/basicComponents/Footer.tsx +13 -5
- package/src/components/basicComponents/MainNav.stories.tsx +34 -0
- package/src/components/basicComponents/MainNav.tsx +24 -6
- package/src/components/basicComponents/MainSidebarLayout.stories.tsx +77 -0
- package/src/components/basicComponents/MainSidebarLayout.tsx +32 -27
- package/src/components/basicComponents/Switcher.stories.tsx +42 -0
- package/src/components/basicComponents/Switcher.tsx +2 -0
- package/src/index.ts +1 -7
- package/src/providers/BaseUrlProvider.tsx +1 -1
- package/src/providers/ThemeContextProvider.tsx +13 -1
- package/src/vite-env.d.ts +1 -0
- package/src/config/projectData.ts +0 -122
- package/src/providers/ProjectDataProvider.tsx +0 -26
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Home,
|
|
3
|
-
FolderOpenDot,
|
|
4
|
-
SmilePlus,
|
|
5
|
-
MessageSquareMore,
|
|
6
|
-
Facebook,
|
|
7
|
-
Linkedin,
|
|
8
|
-
Info,
|
|
9
|
-
Gitlab,
|
|
10
|
-
} from "lucide-react"
|
|
11
|
-
import type { LucideIcon } from "lucide-react"
|
|
12
|
-
|
|
13
|
-
export interface ProjectData {
|
|
14
|
-
appName: string
|
|
15
|
-
navItems: NavItem[]
|
|
16
|
-
footerItems: FooterItem
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface NavItem {
|
|
20
|
-
title: string
|
|
21
|
-
url: string
|
|
22
|
-
icon: LucideIcon
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface FooterItem {
|
|
26
|
-
links: Link[]
|
|
27
|
-
socialProfiles: SocialProfile[]
|
|
28
|
-
copyright: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface Link {
|
|
32
|
-
title: string
|
|
33
|
-
url: string
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface SocialProfile {
|
|
37
|
-
title: string
|
|
38
|
-
url: string
|
|
39
|
-
icon: LucideIcon
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const projectData: ProjectData = {
|
|
43
|
-
appName: "Frontend App Template",
|
|
44
|
-
navItems: [
|
|
45
|
-
{
|
|
46
|
-
title: "Home",
|
|
47
|
-
url: "/",
|
|
48
|
-
icon: Home,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: "About",
|
|
52
|
-
url: "/portfolio/about",
|
|
53
|
-
icon: Info,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: "Skills",
|
|
57
|
-
url: "/portfolio/skills",
|
|
58
|
-
icon: SmilePlus,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
title: "Projects",
|
|
62
|
-
url: "/portfolio/projects",
|
|
63
|
-
icon: FolderOpenDot,
|
|
64
|
-
},
|
|
65
|
-
// {
|
|
66
|
-
// title: "Hobbies",
|
|
67
|
-
// url: "/portfolio/hobbies",
|
|
68
|
-
// icon: FerrisWheel,
|
|
69
|
-
// },
|
|
70
|
-
{
|
|
71
|
-
title: "Contact",
|
|
72
|
-
url: "/portfolio/contact",
|
|
73
|
-
icon: MessageSquareMore,
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
footerItems: {
|
|
77
|
-
links: [
|
|
78
|
-
{
|
|
79
|
-
title: "Home",
|
|
80
|
-
url: "/",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
title: "Contact",
|
|
84
|
-
url: "/portfolio/contact",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
title: "Services",
|
|
88
|
-
url: "/portfolio/services",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
title: "About",
|
|
92
|
-
url: "/portfolio/about",
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
title: "Terms",
|
|
96
|
-
url: "/portfolio/terms",
|
|
97
|
-
},
|
|
98
|
-
// {
|
|
99
|
-
// title: "Privacy Policy",
|
|
100
|
-
// url: "/privacy-policy",
|
|
101
|
-
// },
|
|
102
|
-
],
|
|
103
|
-
copyright: "Copyright Marosh ©" + new Date().getFullYear(),
|
|
104
|
-
socialProfiles: [
|
|
105
|
-
{
|
|
106
|
-
title: "Facebook",
|
|
107
|
-
url: "https://facebook.com/",
|
|
108
|
-
icon: Facebook,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
title: "Gitlab",
|
|
112
|
-
url: "https://gitlab.com/",
|
|
113
|
-
icon: Gitlab,
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
title: "LinkedIn",
|
|
117
|
-
url: "https://www.linkedin.com/",
|
|
118
|
-
icon: Linkedin,
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
},
|
|
122
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext, ReactNode } from "react"
|
|
2
|
-
|
|
3
|
-
import { projectData } from "@/config/projectData"
|
|
4
|
-
|
|
5
|
-
type ProjectData = typeof projectData
|
|
6
|
-
|
|
7
|
-
const ProjectContext = createContext<ProjectData | undefined>(undefined)
|
|
8
|
-
|
|
9
|
-
export interface ProjectProviderProps {
|
|
10
|
-
children: ReactNode
|
|
11
|
-
value: ProjectData
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const ProjectProvider = ({ children, value }: ProjectProviderProps) => {
|
|
15
|
-
return (
|
|
16
|
-
<ProjectContext.Provider value={value}>{children}</ProjectContext.Provider>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const useProject = (): ProjectData => {
|
|
21
|
-
const context = useContext(ProjectContext)
|
|
22
|
-
if (context === undefined) {
|
|
23
|
-
throw new Error("useProject must be used within ProjectProvider")
|
|
24
|
-
}
|
|
25
|
-
return context
|
|
26
|
-
}
|