aboutsummaryrefslogtreecommitdiff
path: root/packages/memory-graph/src/components/spaces-dropdown.css.ts
blob: d7af22583dd3d032532ee8fc5aa18558b098e046 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import { style } from "@vanilla-extract/css";
import { themeContract } from "../styles/theme.css";

/**
 * Dropdown container
 */
export const container = style({
	position: "relative",
});

/**
 * Main trigger button with gradient border effect
 */
export const trigger = style({
	display: "flex",
	alignItems: "center",
	gap: themeContract.space[3],
	paddingLeft: themeContract.space[4],
	paddingRight: themeContract.space[4],
	paddingTop: themeContract.space[3],
	paddingBottom: themeContract.space[3],
	borderRadius: themeContract.radii.xl,
	border: "2px solid transparent",
	backgroundImage:
		"linear-gradient(#1a1f29, #1a1f29), linear-gradient(150.262deg, #A4E8F5 0%, #267FFA 26%, #464646 49%, #747474 70%, #A4E8F5 100%)",
	backgroundOrigin: "border-box",
	backgroundClip: "padding-box, border-box",
	boxShadow: "inset 0px 2px 1px rgba(84, 84, 84, 0.15)",
	backdropFilter: "blur(12px)",
	WebkitBackdropFilter: "blur(12px)",
	transition: themeContract.transitions.normal,
	cursor: "pointer",
	minWidth: "15rem", // min-w-60 = 240px = 15rem

	selectors: {
		"&:hover": {
			boxShadow: "inset 0px 2px 1px rgba(84, 84, 84, 0.25)",
		},
	},
});

export const triggerIcon = style({
	width: "1rem",
	height: "1rem",
	color: themeContract.colors.text.secondary,
});

export const triggerContent = style({
	flex: 1,
	textAlign: "left",
});

export const triggerLabel = style({
	fontSize: themeContract.typography.fontSize.sm,
	color: themeContract.colors.text.secondary,
	fontWeight: themeContract.typography.fontWeight.medium,
});

export const triggerSubtext = style({
	fontSize: themeContract.typography.fontSize.xs,
	color: themeContract.colors.text.muted,
});

export const triggerChevron = style({
	width: "1rem",
	height: "1rem",
	color: themeContract.colors.text.secondary,
	transition: "transform 200ms ease",
});

export const triggerChevronOpen = style({
	transform: "rotate(180deg)",
});

/**
 * Dropdown menu
 */
export const dropdown = style({
	position: "absolute",
	top: "100%",
	left: 0,
	right: 0,
	marginTop: themeContract.space[2],
	background: "rgba(15, 23, 42, 0.95)", // slate-900/95
	backdropFilter: "blur(12px)",
	WebkitBackdropFilter: "blur(12px)",
	border: "1px solid rgba(71, 85, 105, 0.4)", // slate-700/40
	borderRadius: themeContract.radii.xl,
	boxShadow:
		"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)", // shadow-xl
	zIndex: 20,
	overflow: "hidden",
});

export const dropdownInner = style({
	padding: themeContract.space[1],
});

/**
 * Dropdown items
 */
const dropdownItemBase = style({
	width: "100%",
	display: "flex",
	alignItems: "center",
	justifyContent: "space-between",
	paddingLeft: themeContract.space[3],
	paddingRight: themeContract.space[3],
	paddingTop: themeContract.space[2],
	paddingBottom: themeContract.space[2],
	borderRadius: themeContract.radii.lg,
	textAlign: "left",
	transition: themeContract.transitions.normal,
	cursor: "pointer",
	border: "none",
	background: "transparent",
});

export const dropdownItem = style([
	dropdownItemBase,
	{
		color: themeContract.colors.text.secondary,

		selectors: {
			"&:hover": {
				backgroundColor: "rgba(51, 65, 85, 0.5)", // slate-700/50
			},
		},
	},
]);

export const dropdownItemActive = style([
	dropdownItemBase,
	{
		backgroundColor: "rgba(59, 130, 246, 0.2)", // blue-500/20
		color: "rgb(147, 197, 253)", // blue-300
	},
]);

export const dropdownItemLabel = style({
	fontSize: themeContract.typography.fontSize.sm,
	flex: 1,
});

export const dropdownItemLabelTruncate = style({
	fontSize: themeContract.typography.fontSize.sm,
	flex: 1,
	overflow: "hidden",
	textOverflow: "ellipsis",
	whiteSpace: "nowrap",
});

export const dropdownItemBadge = style({
	backgroundColor: "rgba(51, 65, 85, 0.5)", // slate-700/50
	color: themeContract.colors.text.secondary,
	fontSize: themeContract.typography.fontSize.xs,
	marginLeft: themeContract.space[2],
});