@sykoramaros/marosh-components 0.1.14 → 0.1.17
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.d.ts +1036 -1
- package/dist/index.js +22 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2719 -2597
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/basicComponents/Footer.tsx +14 -11
- package/src/config/projectData.ts +122 -0
- package/src/index.ts +31 -0
- package/src/providers/BaseUrlProvider.tsx +24 -0
- package/src/providers/ProjectDataProvider.tsx +26 -0
- package/src/providers/ThemeContextProvider.tsx +260 -0
- package/src/themes/bubblegum.json +134 -0
- package/src/themes/default.json +134 -0
- package/src/themes/index.ts +17 -0
- package/src/themes/marosh-theme.json +135 -0
- package/src/themes/nature.json +134 -0
- package/src/themes/new-theme.json +139 -0
- package/src/themes/retro-arcade.json +134 -0
- package/src/themes/tangerine.json +134 -0
- package/src/themes/themes/bubblegum.json +134 -0
- package/src/themes/themes/default.json +134 -0
- package/src/themes/themes/marosh-theme.json +135 -0
- package/src/themes/themes/nature.json +134 -0
- package/src/themes/themes/new-theme.json +139 -0
- package/src/themes/themes/retro-arcade.json +134 -0
- package/src/themes/themes/tangerine.json +134 -0
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ export interface FooterLinks {
|
|
|
10
10
|
export interface FooterSocial {
|
|
11
11
|
title: string
|
|
12
12
|
url: string
|
|
13
|
-
icon?: LucideIcon | React.ComponentType
|
|
13
|
+
icon?: string | LucideIcon | React.ComponentType
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface FooterItems extends React.ComponentPropsWithoutRef<"footer"> {
|
|
@@ -31,16 +31,19 @@ export const Footer = ({
|
|
|
31
31
|
<footer className={cn(className)} {...props}>
|
|
32
32
|
<div className="flex flex-col items-center justify-center gap-5 bg-background py-8 border-t">
|
|
33
33
|
<div className="flex justify-center gap-5 sm:gap-8 xl:gap-13">
|
|
34
|
-
{socialProfiles.map((item) =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
{socialProfiles.map((item) => {
|
|
35
|
+
const Icon = typeof item.icon === "string" ? null : item.icon
|
|
36
|
+
return (
|
|
37
|
+
<Link
|
|
38
|
+
to={item.url}
|
|
39
|
+
className="rounded-xl"
|
|
40
|
+
key={item.title}
|
|
41
|
+
target="_blank"
|
|
42
|
+
>
|
|
43
|
+
{Icon && <Icon />}
|
|
44
|
+
</Link>
|
|
45
|
+
)
|
|
46
|
+
})}
|
|
44
47
|
</div>
|
|
45
48
|
<div className="flex justify-center gap-5 sm:gap-8 xl:gap-13">
|
|
46
49
|
{links.map((item) => {
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { cn } from "@/lib/utils.ts"
|
|
2
2
|
export { Link } from "@tanstack/react-router"
|
|
3
|
+
|
|
4
|
+
// COMPONENTS
|
|
5
|
+
|
|
3
6
|
export {
|
|
4
7
|
CustomButton,
|
|
5
8
|
type CustomButtonProps,
|
|
@@ -20,3 +23,31 @@ export {
|
|
|
20
23
|
type MainSidebarLayoutProps,
|
|
21
24
|
} from "@/components/basicComponents/MainSidebarLayout"
|
|
22
25
|
export { Switcher } from "@/components/basicComponents/Switcher"
|
|
26
|
+
|
|
27
|
+
// PROVIDERS
|
|
28
|
+
export {
|
|
29
|
+
BaseUrlProvider,
|
|
30
|
+
useBaseUrl,
|
|
31
|
+
type BaseUrlProviderProps,
|
|
32
|
+
} from "@/providers/BaseUrlProvider"
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
ProjectProvider,
|
|
36
|
+
useProject,
|
|
37
|
+
type ProjectProviderProps,
|
|
38
|
+
} from "@/providers/ProjectDataProvider"
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
ThemeContextProvider,
|
|
42
|
+
useThemeContext,
|
|
43
|
+
type ThemeContextProviderProps,
|
|
44
|
+
type ThemeConfig,
|
|
45
|
+
type ThemeRegistry,
|
|
46
|
+
type ThemeMode,
|
|
47
|
+
} from "@/providers/ThemeContextProvider"
|
|
48
|
+
|
|
49
|
+
// HOOKS
|
|
50
|
+
// ...
|
|
51
|
+
|
|
52
|
+
// THEMES
|
|
53
|
+
export { themeData } from "@/themes/index"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createContext, useContext, ReactNode } from "react"
|
|
2
|
+
|
|
3
|
+
export const BaseUrlContext = createContext<string>("")
|
|
4
|
+
|
|
5
|
+
export interface BaseUrlProviderProps {
|
|
6
|
+
children: ReactNode
|
|
7
|
+
value: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const BaseUrlProvider = ({ children, value }: BaseUrlProviderProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<BaseUrlContext.Provider value={value}>{children}</BaseUrlContext.Provider>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const useBaseUrl = (): string => {
|
|
17
|
+
const context = useContext(BaseUrlContext)
|
|
18
|
+
|
|
19
|
+
if (context === undefined) {
|
|
20
|
+
throw new Error("useBaseUrl must be used within BaseUrlProvider")
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return context
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
// src/providers/ThemeContextProvider.tsx
|
|
2
|
+
import React, { createContext, useContext, useEffect, useState } from "react"
|
|
3
|
+
|
|
4
|
+
// Typy - EXPORTUJ JE!
|
|
5
|
+
export type ThemeMode = "light" | "dark"
|
|
6
|
+
|
|
7
|
+
export interface ThemeConfig {
|
|
8
|
+
name: string
|
|
9
|
+
cssVars: {
|
|
10
|
+
theme: Record<string, string>
|
|
11
|
+
light: Record<string, string>
|
|
12
|
+
dark: Record<string, string>
|
|
13
|
+
}
|
|
14
|
+
css?: {
|
|
15
|
+
"@layer base"?: Record<string, any>
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type ThemeRegistry = Record<string, ThemeConfig>
|
|
20
|
+
|
|
21
|
+
// Context
|
|
22
|
+
interface ThemeContextType {
|
|
23
|
+
isDarkMode: boolean
|
|
24
|
+
setIsDarkMode: (value: boolean) => void
|
|
25
|
+
themeName: string
|
|
26
|
+
setThemeName: (value: string) => void
|
|
27
|
+
availableThemes: string[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const ThemeContext = createContext<ThemeContextType | undefined>(undefined)
|
|
31
|
+
|
|
32
|
+
export const useThemeContext = () => {
|
|
33
|
+
const context = useContext(ThemeContext)
|
|
34
|
+
if (!context) {
|
|
35
|
+
throw new Error("useThemeContext must be used within ThemeContextProvider")
|
|
36
|
+
}
|
|
37
|
+
return context
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Provider Props
|
|
41
|
+
export interface ThemeContextProviderProps {
|
|
42
|
+
children: React.ReactNode
|
|
43
|
+
themes: ThemeRegistry // <- Uživatel předá své themes!
|
|
44
|
+
defaultTheme?: string
|
|
45
|
+
defaultMode?: ThemeMode
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Provider
|
|
49
|
+
export const ThemeContextProvider = ({
|
|
50
|
+
children,
|
|
51
|
+
themes,
|
|
52
|
+
defaultTheme,
|
|
53
|
+
defaultMode = "light",
|
|
54
|
+
}: ThemeContextProviderProps) => {
|
|
55
|
+
// Určit default theme
|
|
56
|
+
const initialTheme = defaultTheme || Object.keys(themes)[0] || "default"
|
|
57
|
+
|
|
58
|
+
const [isDarkMode, setIsDarkMode] = useState(defaultMode === "dark")
|
|
59
|
+
const [themeName, setThemeName] = useState<string>(initialTheme)
|
|
60
|
+
|
|
61
|
+
const mode: ThemeMode = isDarkMode ? "dark" : "light"
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
const theme = themes[themeName] || Object.values(themes)[0]
|
|
65
|
+
|
|
66
|
+
if (!theme) {
|
|
67
|
+
console.warn(`Theme "${themeName}" not found`)
|
|
68
|
+
return
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Aplikovat CSS proměnné pro mode (light/dark)
|
|
72
|
+
Object.entries(theme.cssVars[mode] || {}).forEach(([key, value]) => {
|
|
73
|
+
document.documentElement.style.setProperty(`--${key}`, value)
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
// Aplikovat CSS proměnné z theme (včetně fontů)
|
|
77
|
+
Object.entries(theme.cssVars.theme || {}).forEach(([key, value]) => {
|
|
78
|
+
document.documentElement.style.setProperty(`--${key}`, value)
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// Vytvořit a přidat @layer base styly
|
|
82
|
+
const styleId = "theme-base-styles"
|
|
83
|
+
let styleElement = document.getElementById(styleId) as HTMLStyleElement
|
|
84
|
+
|
|
85
|
+
if (!styleElement) {
|
|
86
|
+
styleElement = document.createElement("style")
|
|
87
|
+
styleElement.id = styleId
|
|
88
|
+
document.head.appendChild(styleElement)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Převést objekt @layer base na CSS řetězec
|
|
92
|
+
const baseStyles = theme.css?.["@layer base"]
|
|
93
|
+
if (baseStyles) {
|
|
94
|
+
const cssString = Object.entries(baseStyles)
|
|
95
|
+
.map(([selector, styles]) => {
|
|
96
|
+
const styleString = Object.entries(styles as Record<string, string>)
|
|
97
|
+
.map(([prop, val]) => `${prop}: ${val};`)
|
|
98
|
+
.join(" ")
|
|
99
|
+
return `${selector} { ${styleString} }`
|
|
100
|
+
})
|
|
101
|
+
.join("\n")
|
|
102
|
+
|
|
103
|
+
styleElement.textContent = `@layer base { ${cssString} }`
|
|
104
|
+
} else {
|
|
105
|
+
styleElement.textContent = ""
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Nastavit data atributy
|
|
109
|
+
document.documentElement.setAttribute("data-theme", themeName)
|
|
110
|
+
document.documentElement.setAttribute("data-mode", mode)
|
|
111
|
+
}, [themeName, mode, themes])
|
|
112
|
+
|
|
113
|
+
const availableThemes = Object.keys(themes)
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<ThemeContext.Provider
|
|
117
|
+
value={{
|
|
118
|
+
isDarkMode,
|
|
119
|
+
setIsDarkMode,
|
|
120
|
+
themeName,
|
|
121
|
+
setThemeName,
|
|
122
|
+
availableThemes,
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
{children}
|
|
126
|
+
</ThemeContext.Provider>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// // src/providers/ThemeContextProvider.tsx
|
|
131
|
+
// import React, { createContext, useContext, useEffect, useState } from "react"
|
|
132
|
+
|
|
133
|
+
// // Přímý import JSON
|
|
134
|
+
// import defaultJson from "@/themes/default.json"
|
|
135
|
+
// import maroshThemeJson from "@/themes/marosh-theme.json"
|
|
136
|
+
// import newThemeJson from "@/themes/new-theme.json"
|
|
137
|
+
// import natureJson from "@/themes/nature.json"
|
|
138
|
+
// import retroArcadeJson from "@/themes/retro-arcade.json"
|
|
139
|
+
// import tangerineJson from "@/themes/tangerine.json"
|
|
140
|
+
// import bubblegumJson from "@/themes/bubblegum.json"
|
|
141
|
+
|
|
142
|
+
// // Typy
|
|
143
|
+
// type ThemeMode = "light" | "dark"
|
|
144
|
+
// type ThemeName =
|
|
145
|
+
// | "default"
|
|
146
|
+
// | "marosh"
|
|
147
|
+
// | "newTheme"
|
|
148
|
+
// | "nature"
|
|
149
|
+
// | "retro-arcade"
|
|
150
|
+
// | "tangerine"
|
|
151
|
+
// | "bubblegum"
|
|
152
|
+
|
|
153
|
+
// interface ThemeConfig {
|
|
154
|
+
// name: string
|
|
155
|
+
// cssVars: {
|
|
156
|
+
// theme: Record<string, string>
|
|
157
|
+
// light: Record<string, string>
|
|
158
|
+
// dark: Record<string, string>
|
|
159
|
+
// }
|
|
160
|
+
// css: {
|
|
161
|
+
// "@layer base": Record<string, any>
|
|
162
|
+
// }
|
|
163
|
+
// }
|
|
164
|
+
|
|
165
|
+
// // Data
|
|
166
|
+
// const themeData = {
|
|
167
|
+
// default: defaultJson as ThemeConfig,
|
|
168
|
+
// marosh: maroshThemeJson as ThemeConfig,
|
|
169
|
+
// newTheme: newThemeJson as ThemeConfig,
|
|
170
|
+
// nature: natureJson as ThemeConfig,
|
|
171
|
+
// "retro-arcade": retroArcadeJson as ThemeConfig,
|
|
172
|
+
// tangerine: tangerineJson as ThemeConfig,
|
|
173
|
+
// bubblegum: bubblegumJson as ThemeConfig,
|
|
174
|
+
// }
|
|
175
|
+
|
|
176
|
+
// // Context
|
|
177
|
+
// interface ThemeContextType {
|
|
178
|
+
// isDarkMode: boolean
|
|
179
|
+
// setIsDarkMode: (value: boolean) => void
|
|
180
|
+
// themeName: ThemeName
|
|
181
|
+
// setThemeName: (value: ThemeName) => void
|
|
182
|
+
// }
|
|
183
|
+
|
|
184
|
+
// const ThemeContext = createContext<ThemeContextType>({
|
|
185
|
+
// isDarkMode: false,
|
|
186
|
+
// setIsDarkMode: () => {},
|
|
187
|
+
// themeName: "marosh",
|
|
188
|
+
// setThemeName: () => {},
|
|
189
|
+
// })
|
|
190
|
+
|
|
191
|
+
// export const useThemeContext = () => useContext(ThemeContext)
|
|
192
|
+
|
|
193
|
+
// // Provider
|
|
194
|
+
// export const ThemeContextProvider = ({
|
|
195
|
+
// children,
|
|
196
|
+
// defaultTheme = "marosh",
|
|
197
|
+
// }: {
|
|
198
|
+
// children: React.ReactNode
|
|
199
|
+
// defaultTheme?: ThemeName
|
|
200
|
+
// }) => {
|
|
201
|
+
// const [isDarkMode, setIsDarkMode] = useState(false)
|
|
202
|
+
// const [themeName, setThemeName] = useState<ThemeName>(defaultTheme)
|
|
203
|
+
|
|
204
|
+
// const mode: ThemeMode = isDarkMode ? "dark" : "light"
|
|
205
|
+
|
|
206
|
+
// console.log("ThemeContextProvider - isDarkMode:", isDarkMode, "mode:", mode)
|
|
207
|
+
|
|
208
|
+
// useEffect(() => {
|
|
209
|
+
// const theme = themeData[themeName] || themeData.default
|
|
210
|
+
|
|
211
|
+
// // Aplikovat CSS proměnné
|
|
212
|
+
// Object.entries(theme.cssVars[mode]).forEach(([key, value]) => {
|
|
213
|
+
// document.documentElement.style.setProperty(`--${key}`, value)
|
|
214
|
+
// })
|
|
215
|
+
|
|
216
|
+
// // Aplikovat CSS proměnné z theme (včetně fontů)
|
|
217
|
+
// Object.entries(theme.cssVars.theme).forEach(([key, value]) => {
|
|
218
|
+
// document.documentElement.style.setProperty(`--${key}`, value)
|
|
219
|
+
// })
|
|
220
|
+
|
|
221
|
+
// // Vytvořit a přidat @layer base styly
|
|
222
|
+
// const styleId = "theme-base-styles"
|
|
223
|
+
// let styleElement = document.getElementById(styleId) as HTMLStyleElement
|
|
224
|
+
|
|
225
|
+
// if (!styleElement) {
|
|
226
|
+
// styleElement = document.createElement("style")
|
|
227
|
+
// styleElement.id = styleId
|
|
228
|
+
// document.head.appendChild(styleElement)
|
|
229
|
+
// }
|
|
230
|
+
|
|
231
|
+
// // Převést objekt @layer base na CSS řetězec
|
|
232
|
+
// const baseStyles = theme.css?.["@layer base"]
|
|
233
|
+
// if (baseStyles) {
|
|
234
|
+
// const cssString = Object.entries(baseStyles)
|
|
235
|
+
// .map(([selector, styles]) => {
|
|
236
|
+
// const styleString = Object.entries(styles as Record<string, string>)
|
|
237
|
+
// .map(([prop, val]) => `${prop}: ${val};`)
|
|
238
|
+
// .join(" ")
|
|
239
|
+
// return `${selector} { ${styleString} }`
|
|
240
|
+
// })
|
|
241
|
+
// .join("\n")
|
|
242
|
+
|
|
243
|
+
// styleElement.textContent = `@layer base { ${cssString} }`
|
|
244
|
+
// } else {
|
|
245
|
+
// styleElement.textContent = ""
|
|
246
|
+
// }
|
|
247
|
+
|
|
248
|
+
// // Nastavit data atributy
|
|
249
|
+
// document.documentElement.setAttribute("data-theme", themeName)
|
|
250
|
+
// document.documentElement.setAttribute("data-mode", mode)
|
|
251
|
+
// }, [themeName, mode])
|
|
252
|
+
|
|
253
|
+
// return (
|
|
254
|
+
// <ThemeContext.Provider
|
|
255
|
+
// value={{ isDarkMode, setIsDarkMode, themeName, setThemeName }}
|
|
256
|
+
// >
|
|
257
|
+
// {children}
|
|
258
|
+
// </ThemeContext.Provider>
|
|
259
|
+
// )
|
|
260
|
+
// }
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "bubblegum",
|
|
4
|
+
"type": "registry:style",
|
|
5
|
+
"css": {
|
|
6
|
+
"@layer base": {
|
|
7
|
+
"body": {
|
|
8
|
+
"letter-spacing": "var(--tracking-normal)"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"cssVars": {
|
|
13
|
+
"theme": {
|
|
14
|
+
"font-sans": "Poppins, sans-serif",
|
|
15
|
+
"font-mono": "Fira Code, monospace",
|
|
16
|
+
"font-serif": "Lora, serif",
|
|
17
|
+
"radius": "0.4rem",
|
|
18
|
+
"tracking-tighter": "calc(var(--tracking-normal) - 0.05em)",
|
|
19
|
+
"tracking-tight": "calc(var(--tracking-normal) - 0.025em)",
|
|
20
|
+
"tracking-wide": "calc(var(--tracking-normal) + 0.025em)",
|
|
21
|
+
"tracking-wider": "calc(var(--tracking-normal) + 0.05em)",
|
|
22
|
+
"tracking-widest": "calc(var(--tracking-normal) + 0.1em)"
|
|
23
|
+
},
|
|
24
|
+
"light": {
|
|
25
|
+
"background": "oklch(0.9399 0.0203 345.6985)",
|
|
26
|
+
"foreground": "oklch(0.4712 0 0)",
|
|
27
|
+
"card": "oklch(0.9498 0.0500 86.8891)",
|
|
28
|
+
"card-foreground": "oklch(0.4712 0 0)",
|
|
29
|
+
"popover": "oklch(1.0000 0 0)",
|
|
30
|
+
"popover-foreground": "oklch(0.4712 0 0)",
|
|
31
|
+
"primary": "oklch(0.6209 0.1801 348.1385)",
|
|
32
|
+
"primary-foreground": "oklch(1.0000 0 0)",
|
|
33
|
+
"secondary": "oklch(0.8095 0.0694 198.1863)",
|
|
34
|
+
"secondary-foreground": "oklch(0.3211 0 0)",
|
|
35
|
+
"muted": "oklch(0.8800 0.0504 212.0952)",
|
|
36
|
+
"muted-foreground": "oklch(0.5795 0 0)",
|
|
37
|
+
"accent": "oklch(0.9195 0.0801 87.6670)",
|
|
38
|
+
"accent-foreground": "oklch(0.3211 0 0)",
|
|
39
|
+
"destructive": "oklch(0.7091 0.1697 21.9551)",
|
|
40
|
+
"destructive-foreground": "oklch(1.0000 0 0)",
|
|
41
|
+
"border": "oklch(0.6209 0.1801 348.1385)",
|
|
42
|
+
"input": "oklch(0.9189 0 0)",
|
|
43
|
+
"ring": "oklch(0.7002 0.1597 350.7532)",
|
|
44
|
+
"chart-1": "oklch(0.7002 0.1597 350.7532)",
|
|
45
|
+
"chart-2": "oklch(0.8189 0.0799 212.0892)",
|
|
46
|
+
"chart-3": "oklch(0.9195 0.0801 87.6670)",
|
|
47
|
+
"chart-4": "oklch(0.7998 0.1110 348.1791)",
|
|
48
|
+
"chart-5": "oklch(0.6197 0.1899 353.9091)",
|
|
49
|
+
"radius": "0.4rem",
|
|
50
|
+
"sidebar": "oklch(0.9140 0.0424 343.0913)",
|
|
51
|
+
"sidebar-foreground": "oklch(0.3211 0 0)",
|
|
52
|
+
"sidebar-primary": "oklch(0.6559 0.2118 354.3084)",
|
|
53
|
+
"sidebar-primary-foreground": "oklch(1.0000 0 0)",
|
|
54
|
+
"sidebar-accent": "oklch(0.8228 0.1095 346.0184)",
|
|
55
|
+
"sidebar-accent-foreground": "oklch(0.3211 0 0)",
|
|
56
|
+
"sidebar-border": "oklch(0.9464 0.0327 307.1745)",
|
|
57
|
+
"sidebar-ring": "oklch(0.6559 0.2118 354.3084)",
|
|
58
|
+
"font-sans": "Poppins, sans-serif",
|
|
59
|
+
"font-serif": "Lora, serif",
|
|
60
|
+
"font-mono": "Fira Code, monospace",
|
|
61
|
+
"shadow-color": "hsl(325.78 58.18% 56.86% / 0.5)",
|
|
62
|
+
"shadow-opacity": "1.0",
|
|
63
|
+
"shadow-blur": "0px",
|
|
64
|
+
"shadow-spread": "0px",
|
|
65
|
+
"shadow-offset-x": "3px",
|
|
66
|
+
"shadow-offset-y": "3px",
|
|
67
|
+
"letter-spacing": "0em",
|
|
68
|
+
"spacing": "0.25rem",
|
|
69
|
+
"shadow-2xs": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 0.50)",
|
|
70
|
+
"shadow-xs": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 0.50)",
|
|
71
|
+
"shadow-sm": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 1.00), 3px 1px 2px -1px hsl(325.7800 58.1800% 56.8600% / 1.00)",
|
|
72
|
+
"shadow": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 1.00), 3px 1px 2px -1px hsl(325.7800 58.1800% 56.8600% / 1.00)",
|
|
73
|
+
"shadow-md": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 1.00), 3px 2px 4px -1px hsl(325.7800 58.1800% 56.8600% / 1.00)",
|
|
74
|
+
"shadow-lg": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 1.00), 3px 4px 6px -1px hsl(325.7800 58.1800% 56.8600% / 1.00)",
|
|
75
|
+
"shadow-xl": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 1.00), 3px 8px 10px -1px hsl(325.7800 58.1800% 56.8600% / 1.00)",
|
|
76
|
+
"shadow-2xl": "3px 3px 0px 0px hsl(325.7800 58.1800% 56.8600% / 2.50)",
|
|
77
|
+
"tracking-normal": "0em"
|
|
78
|
+
},
|
|
79
|
+
"dark": {
|
|
80
|
+
"background": "oklch(0.2497 0.0305 234.1628)",
|
|
81
|
+
"foreground": "oklch(0.9306 0.0197 349.0785)",
|
|
82
|
+
"card": "oklch(0.2902 0.0299 233.5352)",
|
|
83
|
+
"card-foreground": "oklch(0.9306 0.0197 349.0785)",
|
|
84
|
+
"popover": "oklch(0.2902 0.0299 233.5352)",
|
|
85
|
+
"popover-foreground": "oklch(0.9306 0.0197 349.0785)",
|
|
86
|
+
"primary": "oklch(0.9195 0.0801 87.6670)",
|
|
87
|
+
"primary-foreground": "oklch(0.2497 0.0305 234.1628)",
|
|
88
|
+
"secondary": "oklch(0.7794 0.0803 4.1330)",
|
|
89
|
+
"secondary-foreground": "oklch(0.2497 0.0305 234.1628)",
|
|
90
|
+
"muted": "oklch(0.2713 0.0086 255.5780)",
|
|
91
|
+
"muted-foreground": "oklch(0.7794 0.0803 4.1330)",
|
|
92
|
+
"accent": "oklch(0.6699 0.0988 356.9762)",
|
|
93
|
+
"accent-foreground": "oklch(0.9306 0.0197 349.0785)",
|
|
94
|
+
"destructive": "oklch(0.6702 0.1806 350.3599)",
|
|
95
|
+
"destructive-foreground": "oklch(0.2497 0.0305 234.1628)",
|
|
96
|
+
"border": "oklch(0.3907 0.0399 242.2181)",
|
|
97
|
+
"input": "oklch(0.3093 0.0305 232.0027)",
|
|
98
|
+
"ring": "oklch(0.6998 0.0896 201.8672)",
|
|
99
|
+
"chart-1": "oklch(0.6998 0.0896 201.8672)",
|
|
100
|
+
"chart-2": "oklch(0.7794 0.0803 4.1330)",
|
|
101
|
+
"chart-3": "oklch(0.6699 0.0988 356.9762)",
|
|
102
|
+
"chart-4": "oklch(0.4408 0.0702 217.0848)",
|
|
103
|
+
"chart-5": "oklch(0.2713 0.0086 255.5780)",
|
|
104
|
+
"radius": "0.4rem",
|
|
105
|
+
"sidebar": "oklch(0.2303 0.0270 235.9743)",
|
|
106
|
+
"sidebar-foreground": "oklch(0.9670 0.0029 264.5419)",
|
|
107
|
+
"sidebar-primary": "oklch(0.6559 0.2118 354.3084)",
|
|
108
|
+
"sidebar-primary-foreground": "oklch(1.0000 0 0)",
|
|
109
|
+
"sidebar-accent": "oklch(0.8228 0.1095 346.0184)",
|
|
110
|
+
"sidebar-accent-foreground": "oklch(0.2781 0.0296 256.8480)",
|
|
111
|
+
"sidebar-border": "oklch(0.3729 0.0306 259.7328)",
|
|
112
|
+
"sidebar-ring": "oklch(0.6559 0.2118 354.3084)",
|
|
113
|
+
"font-sans": "Poppins, sans-serif",
|
|
114
|
+
"font-serif": "Lora, serif",
|
|
115
|
+
"font-mono": "Fira Code, monospace",
|
|
116
|
+
"shadow-color": "#324859",
|
|
117
|
+
"shadow-opacity": "1.0",
|
|
118
|
+
"shadow-blur": "0px",
|
|
119
|
+
"shadow-spread": "0px",
|
|
120
|
+
"shadow-offset-x": "3px",
|
|
121
|
+
"shadow-offset-y": "3px",
|
|
122
|
+
"letter-spacing": "0em",
|
|
123
|
+
"spacing": "0.25rem",
|
|
124
|
+
"shadow-2xs": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 0.50)",
|
|
125
|
+
"shadow-xs": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 0.50)",
|
|
126
|
+
"shadow-sm": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 1.00), 3px 1px 2px -1px hsl(206.1538 28.0576% 27.2549% / 1.00)",
|
|
127
|
+
"shadow": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 1.00), 3px 1px 2px -1px hsl(206.1538 28.0576% 27.2549% / 1.00)",
|
|
128
|
+
"shadow-md": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 1.00), 3px 2px 4px -1px hsl(206.1538 28.0576% 27.2549% / 1.00)",
|
|
129
|
+
"shadow-lg": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 1.00), 3px 4px 6px -1px hsl(206.1538 28.0576% 27.2549% / 1.00)",
|
|
130
|
+
"shadow-xl": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 1.00), 3px 8px 10px -1px hsl(206.1538 28.0576% 27.2549% / 1.00)",
|
|
131
|
+
"shadow-2xl": "3px 3px 0px 0px hsl(206.1538 28.0576% 27.2549% / 2.50)"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|