@sykoramaros/marosh-components 0.0.9 → 0.1.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/README.md +56 -0
- package/dist/cli/index.cjs +7854 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -3
- package/src/App.css +42 -0
- package/src/App.tsx +42 -0
- package/src/components/CustomButton.tsx +32 -0
- package/src/components/Footer.tsx +59 -0
- package/src/components/MainNav.tsx +81 -0
- package/src/components/ui/button.tsx +62 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/components/ui/sidebar.tsx +726 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/tooltip.tsx +59 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +122 -0
- package/src/index.ts +17 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +10 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils"
|
|
2
|
+
|
|
3
|
+
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
data-slot="skeleton"
|
|
7
|
+
className={cn("bg-accent animate-pulse rounded-md", className)}
|
|
8
|
+
{...props}
|
|
9
|
+
/>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Skeleton }
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
function TooltipProvider({
|
|
7
|
+
delayDuration = 0,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
10
|
+
return (
|
|
11
|
+
<TooltipPrimitive.Provider
|
|
12
|
+
data-slot="tooltip-provider"
|
|
13
|
+
delayDuration={delayDuration}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function Tooltip({
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
22
|
+
return (
|
|
23
|
+
<TooltipProvider>
|
|
24
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
25
|
+
</TooltipProvider>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function TooltipTrigger({
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
32
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function TooltipContent({
|
|
36
|
+
className,
|
|
37
|
+
sideOffset = 0,
|
|
38
|
+
children,
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
41
|
+
return (
|
|
42
|
+
<TooltipPrimitive.Portal>
|
|
43
|
+
<TooltipPrimitive.Content
|
|
44
|
+
data-slot="tooltip-content"
|
|
45
|
+
sideOffset={sideOffset}
|
|
46
|
+
className={cn(
|
|
47
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
>
|
|
52
|
+
{children}
|
|
53
|
+
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
54
|
+
</TooltipPrimitive.Content>
|
|
55
|
+
</TooltipPrimitive.Portal>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
const MOBILE_BREAKPOINT = 768
|
|
4
|
+
|
|
5
|
+
export function useIsMobile() {
|
|
6
|
+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
|
7
|
+
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
|
10
|
+
const onChange = () => {
|
|
11
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
12
|
+
}
|
|
13
|
+
mql.addEventListener("change", onChange)
|
|
14
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
15
|
+
return () => mql.removeEventListener("change", onChange)
|
|
16
|
+
}, [])
|
|
17
|
+
|
|
18
|
+
return !!isMobile
|
|
19
|
+
}
|
package/src/index.css
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
@import "tw-animate-css";
|
|
4
|
+
|
|
5
|
+
@custom-variant dark (&:is(.dark *));
|
|
6
|
+
|
|
7
|
+
@theme inline {
|
|
8
|
+
--color-background: var(--background);
|
|
9
|
+
--color-foreground: var(--foreground);
|
|
10
|
+
--color-card: var(--card);
|
|
11
|
+
--color-card-foreground: var(--card-foreground);
|
|
12
|
+
--color-popover: var(--popover);
|
|
13
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
14
|
+
--color-primary: var(--primary);
|
|
15
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
16
|
+
--color-secondary: var(--secondary);
|
|
17
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
18
|
+
--color-muted: var(--muted);
|
|
19
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
20
|
+
--color-accent: var(--accent);
|
|
21
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
22
|
+
--color-destructive: var(--destructive);
|
|
23
|
+
--color-border: var(--border);
|
|
24
|
+
--color-input: var(--input);
|
|
25
|
+
--color-ring: var(--ring);
|
|
26
|
+
--color-chart-1: var(--chart-1);
|
|
27
|
+
--color-chart-2: var(--chart-2);
|
|
28
|
+
--color-chart-3: var(--chart-3);
|
|
29
|
+
--color-chart-4: var(--chart-4);
|
|
30
|
+
--color-chart-5: var(--chart-5);
|
|
31
|
+
--color-sidebar: var(--sidebar);
|
|
32
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
33
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
34
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
35
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
36
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
37
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
38
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
39
|
+
|
|
40
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
41
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
42
|
+
--radius-lg: var(--radius);
|
|
43
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:root {
|
|
47
|
+
--radius: 0.625rem;
|
|
48
|
+
--background: oklch(1 0 0);
|
|
49
|
+
--foreground: oklch(0.145 0 0);
|
|
50
|
+
--card: oklch(1 0 0);
|
|
51
|
+
--card-foreground: oklch(0.145 0 0);
|
|
52
|
+
--popover: oklch(1 0 0);
|
|
53
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
54
|
+
--primary: oklch(0.205 0 0);
|
|
55
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
56
|
+
--secondary: oklch(0.97 0 0);
|
|
57
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
58
|
+
--muted: oklch(0.97 0 0);
|
|
59
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
60
|
+
--accent: oklch(0.97 0 0);
|
|
61
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
62
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
63
|
+
--border: oklch(0.922 0 0);
|
|
64
|
+
--input: oklch(0.922 0 0);
|
|
65
|
+
--ring: oklch(0.708 0 0);
|
|
66
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
67
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
68
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
69
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
70
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
71
|
+
--sidebar: hsl(0 0% 98%);
|
|
72
|
+
--sidebar-foreground: hsl(240 5.3% 26.1%);
|
|
73
|
+
--sidebar-primary: hsl(240 5.9% 10%);
|
|
74
|
+
--sidebar-primary-foreground: hsl(0 0% 98%);
|
|
75
|
+
--sidebar-accent: hsl(240 4.8% 95.9%);
|
|
76
|
+
--sidebar-accent-foreground: hsl(240 5.9% 10%);
|
|
77
|
+
--sidebar-border: hsl(220 13% 91%);
|
|
78
|
+
--sidebar-ring: hsl(217.2 91.2% 59.8%);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dark {
|
|
82
|
+
--background: oklch(0.145 0 0);
|
|
83
|
+
--foreground: oklch(0.985 0 0);
|
|
84
|
+
--card: oklch(0.205 0 0);
|
|
85
|
+
--card-foreground: oklch(0.985 0 0);
|
|
86
|
+
--popover: oklch(0.205 0 0);
|
|
87
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
88
|
+
--primary: oklch(0.922 0 0);
|
|
89
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
90
|
+
--secondary: oklch(0.269 0 0);
|
|
91
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
92
|
+
--muted: oklch(0.269 0 0);
|
|
93
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
94
|
+
--accent: oklch(0.269 0 0);
|
|
95
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
96
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
97
|
+
--border: oklch(1 0 0 / 10%);
|
|
98
|
+
--input: oklch(1 0 0 / 15%);
|
|
99
|
+
--ring: oklch(0.556 0 0);
|
|
100
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
101
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
102
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
103
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
104
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
105
|
+
--sidebar: hsl(240 5.9% 10%);
|
|
106
|
+
--sidebar-foreground: hsl(240 4.8% 95.9%);
|
|
107
|
+
--sidebar-primary: hsl(224.3 76.3% 48%);
|
|
108
|
+
--sidebar-primary-foreground: hsl(0 0% 100%);
|
|
109
|
+
--sidebar-accent: hsl(240 3.7% 15.9%);
|
|
110
|
+
--sidebar-accent-foreground: hsl(240 4.8% 95.9%);
|
|
111
|
+
--sidebar-border: hsl(240 3.7% 15.9%);
|
|
112
|
+
--sidebar-ring: hsl(217.2 91.2% 59.8%);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@layer base {
|
|
116
|
+
* {
|
|
117
|
+
@apply border-border outline-ring/50;
|
|
118
|
+
}
|
|
119
|
+
body {
|
|
120
|
+
@apply bg-background text-foreground;
|
|
121
|
+
}
|
|
122
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { cn } from "@/lib/utils.ts"
|
|
2
|
+
export { Link } from "@tanstack/react-router"
|
|
3
|
+
export {
|
|
4
|
+
CustomButton,
|
|
5
|
+
type CustomButtonProps,
|
|
6
|
+
} from "@/components/CustomButton.tsx"
|
|
7
|
+
export {
|
|
8
|
+
MainNav,
|
|
9
|
+
type NavItem,
|
|
10
|
+
type MainNavProps,
|
|
11
|
+
} from "@/components/MainNav.tsx"
|
|
12
|
+
export {
|
|
13
|
+
Footer,
|
|
14
|
+
type FooterProps,
|
|
15
|
+
type FooterLinks,
|
|
16
|
+
type FooterSocial,
|
|
17
|
+
} from "@/components/Footer.tsx"
|
package/src/lib/utils.ts
ADDED
package/src/main.tsx
ADDED