aboutsummaryrefslogtreecommitdiff
path: root/packages/memory-graph/src/ui/glass-effect.css.ts
blob: c7160d9872227d62a46e1293bcabc5b89e1506f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { style } from "@vanilla-extract/css"
import { recipe } from "@vanilla-extract/recipes"
import { themeContract } from "../styles/theme.css"

/**
 * Glass menu effect container
 */
export const glassMenuContainer = style({
	position: "absolute",
	inset: 0,
})

/**
 * Glass menu effect with customizable border radius
 */
export const glassMenuEffect = recipe({
	base: {
		position: "absolute",
		inset: 0,
		backdropFilter: "blur(12px)",
		WebkitBackdropFilter: "blur(12px)",
		background: "rgba(255, 255, 255, 0.05)",
		border: `1px solid ${themeContract.colors.document.border}`,
	},

	variants: {
		rounded: {
			none: {
				borderRadius: themeContract.radii.none,
			},
			sm: {
				borderRadius: themeContract.radii.sm,
			},
			md: {
				borderRadius: themeContract.radii.md,
			},
			lg: {
				borderRadius: themeContract.radii.lg,
			},
			xl: {
				borderRadius: themeContract.radii.xl,
			},
			"2xl": {
				borderRadius: themeContract.radii["2xl"],
			},
			"3xl": {
				borderRadius: "1.5rem", // Tailwind's rounded-3xl
			},
			full: {
				borderRadius: themeContract.radii.full,
			},
		},
	},

	defaultVariants: {
		rounded: "3xl",
	},
})