@kushagradhawan/kookie-ui 0.1.27 → 0.1.29
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/components.css +583 -241
- package/dist/cjs/components/accordion.d.ts +22 -0
- package/dist/cjs/components/accordion.d.ts.map +1 -0
- package/dist/cjs/components/accordion.js +2 -0
- package/dist/cjs/components/accordion.js.map +7 -0
- package/dist/cjs/components/accordion.props.d.ts +88 -0
- package/dist/cjs/components/accordion.props.d.ts.map +1 -0
- package/dist/cjs/components/accordion.props.js +2 -0
- package/dist/cjs/components/accordion.props.js.map +7 -0
- package/dist/cjs/components/dialog.props.d.ts +1 -1
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/scroll-area.js.map +1 -1
- package/dist/cjs/components/sidebar.d.ts +1 -1
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +2 -2
- package/dist/cjs/components/sidebar.props.d.ts +2 -2
- package/dist/cjs/components/sidebar.props.js +1 -1
- package/dist/cjs/components/sidebar.props.js.map +2 -2
- package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
- package/dist/esm/components/accordion.d.ts +22 -0
- package/dist/esm/components/accordion.d.ts.map +1 -0
- package/dist/esm/components/accordion.js +2 -0
- package/dist/esm/components/accordion.js.map +7 -0
- package/dist/esm/components/accordion.props.d.ts +88 -0
- package/dist/esm/components/accordion.props.d.ts.map +1 -0
- package/dist/esm/components/accordion.props.js +2 -0
- package/dist/esm/components/accordion.props.js.map +7 -0
- package/dist/esm/components/dialog.props.d.ts +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/scroll-area.js.map +1 -1
- package/dist/esm/components/sidebar.d.ts +1 -1
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/sidebar.js.map +2 -2
- package/dist/esm/components/sidebar.props.d.ts +2 -2
- package/dist/esm/components/sidebar.props.js +1 -1
- package/dist/esm/components/sidebar.props.js.map +2 -2
- package/dist/esm/helpers/extract-margin-props.d.ts +7 -7
- package/package.json +1 -1
- package/src/components/_internal/base-sidebar-menu.css +223 -0
- package/src/components/_internal/base-sidebar.css +141 -0
- package/src/components/accordion.css +254 -0
- package/src/components/accordion.props.tsx +84 -0
- package/src/components/accordion.tsx +162 -0
- package/src/components/index.css +1 -0
- package/src/components/index.tsx +1 -0
- package/src/components/scroll-area.tsx +2 -2
- package/src/components/sidebar.css +367 -628
- package/src/components/sidebar.props.tsx +2 -2
- package/src/components/sidebar.tsx +2 -2
- package/src/styles/tokens/radius.css +1 -1
- package/styles.css +584 -242
- package/tokens/base.css +1 -1
- package/tokens.css +1 -1
|
@@ -1,81 +1,9 @@
|
|
|
1
1
|
@import './_internal/base-menu.css';
|
|
2
|
+
@import './_internal/base-sidebar.css';
|
|
3
|
+
@import './_internal/base-sidebar-menu.css';
|
|
2
4
|
|
|
3
|
-
/*
|
|
4
|
-
.rt-
|
|
5
|
-
/* Positioning based on side */
|
|
6
|
-
&:where([data-side="left"]) {
|
|
7
|
-
/* Left side is default - no additional positioning needed */
|
|
8
|
-
order: -1; /* Ensure it appears first in flex container */
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&:where([data-side="right"]) {
|
|
12
|
-
/* Position on the right side */
|
|
13
|
-
order: 999; /* Push to end in flex container */
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Sidebar Root Container */
|
|
18
|
-
.rt-SidebarRoot {
|
|
19
|
-
--sidebar-width: 16rem; /* Fixed width */
|
|
20
|
-
--sidebar-base-border-radius: 0; /* Default to no radius */
|
|
21
|
-
|
|
22
|
-
width: var(--sidebar-width);
|
|
23
|
-
height: 100%;
|
|
24
|
-
flex-shrink: 0;
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
|
|
28
|
-
/* Make sure Theme wrapper also participates in flex layout */
|
|
29
|
-
& :where(.radix-themes) {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
flex: 1;
|
|
33
|
-
height: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Floating type - ONLY visual changes */
|
|
37
|
-
&:where([data-type="floating"]) {
|
|
38
|
-
border-radius: var(--sidebar-base-border-radius);
|
|
39
|
-
margin: var(--space-2);
|
|
40
|
-
height: calc(100% - var(--space-4));
|
|
41
|
-
overflow: visible; /* Ensure shadow is not clipped */
|
|
42
|
-
position: relative; /* Ensure proper stacking context for floating sidebars */
|
|
43
|
-
|
|
44
|
-
/* Ensure Theme wrapper has proper border radius in floating mode */
|
|
45
|
-
& :where(.radix-themes) {
|
|
46
|
-
border-radius: inherit;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* Set border radius for floating sidebars based on size - set on the root where it's used */
|
|
52
|
-
.rt-SidebarRoot:where([data-type="floating"]) {
|
|
53
|
-
/* Default radius for floating sidebars */
|
|
54
|
-
--sidebar-base-border-radius: var(--radius-5);
|
|
55
|
-
|
|
56
|
-
&:where(.rt-r-size-1) {
|
|
57
|
-
--sidebar-base-border-radius: var(--radius-5);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:where(.rt-r-size-2) {
|
|
61
|
-
--sidebar-base-border-radius: var(--radius-6);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Sidebar Container */
|
|
66
|
-
.rt-SidebarContainer {
|
|
67
|
-
--sidebar-base-border-radius: 0; /* Default to no radius */
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
height: 100%;
|
|
71
|
-
width: 100%;
|
|
72
|
-
background-color: var(--color-panel);
|
|
73
|
-
backdrop-filter: var(--backdrop-filter-panel);
|
|
74
|
-
border-radius: inherit;
|
|
75
|
-
flex: 1;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.rt-SidebarContainer:where(.rt-variant-surface) {
|
|
5
|
+
/* Container Variants */
|
|
6
|
+
.rt-SidebarContainer:where(.rt-variant-outline) {
|
|
79
7
|
background-color: var(--color-panel);
|
|
80
8
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
81
9
|
|
|
@@ -109,59 +37,94 @@
|
|
|
109
37
|
}
|
|
110
38
|
}
|
|
111
39
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
40
|
+
.rt-SidebarContainer:where(.rt-variant-ghost) {
|
|
41
|
+
background-color: transparent;
|
|
42
|
+
backdrop-filter: none;
|
|
43
|
+
border: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.rt-SidebarContainer:where(.rt-variant-soft) {
|
|
47
|
+
/* Use solid gray for solid panels, alpha gray for translucent panels */
|
|
48
|
+
background-color: var(--gray-2);
|
|
118
49
|
|
|
119
|
-
/*
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
background:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
50
|
+
/* Theme-level translucent override */
|
|
51
|
+
:where([data-panel-background='translucent']) & {
|
|
52
|
+
background-color: var(--gray-a2);
|
|
53
|
+
backdrop-filter: var(--backdrop-filter-panel);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Component-level overrides (higher specificity) */
|
|
57
|
+
&:where([data-panel-background='solid']) {
|
|
58
|
+
background-color: var(--gray-2);
|
|
59
|
+
backdrop-filter: none;
|
|
60
|
+
--backdrop-filter-components: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:where([data-panel-background='translucent']) {
|
|
64
|
+
background-color: var(--gray-a2);
|
|
65
|
+
backdrop-filter: var(--backdrop-filter-panel);
|
|
66
|
+
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
67
|
+
--backdrop-filter-components: blur(var(--backdrop-blur-components));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.rt-SidebarContainer:where(.rt-variant-surface) {
|
|
72
|
+
/* Base state: neutral gray background (maintains sidebar neutrality) */
|
|
73
|
+
background-color: var(--gray-1);
|
|
74
|
+
|
|
75
|
+
/* Theme-level translucent override */
|
|
76
|
+
:where([data-panel-background='translucent']) & {
|
|
77
|
+
background-color: var(--gray-a1);
|
|
78
|
+
backdrop-filter: var(--backdrop-filter-panel);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Component-level overrides (higher specificity) */
|
|
82
|
+
&:where([data-panel-background='solid']) {
|
|
83
|
+
background-color: var(--gray-1);
|
|
84
|
+
backdrop-filter: none;
|
|
85
|
+
--backdrop-filter-panel: none;
|
|
86
|
+
--backdrop-filter-components: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:where([data-panel-background='translucent']) {
|
|
90
|
+
background-color: var(--gray-a1);
|
|
91
|
+
backdrop-filter: var(--backdrop-filter-panel);
|
|
92
|
+
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
93
|
+
--backdrop-filter-components: blur(var(--backdrop-blur-components));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Inset border like Card surface variant */
|
|
97
|
+
/* Floating sidebars get full inset border */
|
|
98
|
+
:where(.rt-SidebarRoot[data-type="floating"]) & {
|
|
99
|
+
box-shadow: inset 0 0 0 1px var(--gray-6);
|
|
148
100
|
|
|
149
|
-
/*
|
|
101
|
+
/* Theme-level translucent override */
|
|
102
|
+
:where([data-panel-background='translucent']) & {
|
|
103
|
+
box-shadow: inset 0 0 0 1px var(--gray-a6);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Non-floating sidebars get border only on the content-facing side */
|
|
108
|
+
:where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) & {
|
|
109
|
+
box-shadow: inset -1px 0 0 0 var(--gray-6);
|
|
150
110
|
|
|
151
|
-
/*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
outline-offset: 2px;
|
|
111
|
+
/* Theme-level translucent override */
|
|
112
|
+
:where([data-panel-background='translucent']) & {
|
|
113
|
+
box-shadow: inset -1px 0 0 0 var(--gray-a6);
|
|
155
114
|
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) & {
|
|
118
|
+
box-shadow: inset 1px 0 0 0 var(--gray-6);
|
|
156
119
|
|
|
157
|
-
/*
|
|
158
|
-
|
|
159
|
-
|
|
120
|
+
/* Theme-level translucent override */
|
|
121
|
+
:where([data-panel-background='translucent']) & {
|
|
122
|
+
box-shadow: inset 1px 0 0 0 var(--gray-a6);
|
|
160
123
|
}
|
|
161
124
|
}
|
|
162
125
|
}
|
|
163
126
|
|
|
164
|
-
/* Header
|
|
127
|
+
/* Header/Footer Layout Utilities */
|
|
165
128
|
.rt-SidebarHeader:where(.rt-SidebarHeader--container) {
|
|
166
129
|
display: flex;
|
|
167
130
|
flex-direction: row;
|
|
@@ -176,120 +139,56 @@
|
|
|
176
139
|
}
|
|
177
140
|
}
|
|
178
141
|
|
|
179
|
-
|
|
180
|
-
|
|
142
|
+
.rt-SidebarFooter:where(.rt-SidebarFooter--container) {
|
|
143
|
+
display: flex;
|
|
181
144
|
flex-direction: row;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.rt-SidebarHeader:where(.rt-flex-col) {
|
|
185
|
-
flex-direction: column;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.rt-SidebarHeader:where(.rt-items-center) {
|
|
189
145
|
align-items: center;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.rt-SidebarHeader:where(.rt-items-start) {
|
|
193
|
-
align-items: flex-start;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.rt-SidebarHeader:where(.rt-items-end) {
|
|
197
|
-
align-items: flex-end;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.rt-SidebarHeader:where(.rt-justify-between) {
|
|
201
|
-
justify-content: space-between;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.rt-SidebarHeader:where(.rt-justify-center) {
|
|
205
|
-
justify-content: center;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.rt-SidebarHeader:where(.rt-justify-start) {
|
|
209
|
-
justify-content: flex-start;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.rt-SidebarHeader:where(.rt-justify-end) {
|
|
213
|
-
justify-content: flex-end;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.rt-SidebarHeader:where(.rt-gap-1) {
|
|
217
|
-
gap: var(--space-1);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.rt-SidebarHeader:where(.rt-gap-2) {
|
|
221
146
|
gap: var(--space-2);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.rt-SidebarHeader:where(.rt-gap-3) {
|
|
225
|
-
gap: var(--space-3);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.rt-SidebarHeader:where(.rt-gap-4) {
|
|
229
|
-
gap: var(--space-4);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* Sidebar Content - based on rt-BaseMenuContent */
|
|
233
|
-
.rt-SidebarContent {
|
|
234
|
-
--scrollarea-scrollbar-vertical-margin-top: var(--base-menu-content-padding);
|
|
235
|
-
--scrollarea-scrollbar-vertical-margin-bottom: var(--base-menu-content-padding);
|
|
236
|
-
--scrollarea-scrollbar-horizontal-margin-left: var(--base-menu-content-padding);
|
|
237
|
-
--scrollarea-scrollbar-horizontal-margin-right: var(--base-menu-content-padding);
|
|
238
|
-
|
|
239
|
-
display: flex;
|
|
240
|
-
flex-direction: column;
|
|
241
|
-
flex: 1;
|
|
242
|
-
box-sizing: border-box;
|
|
243
|
-
min-height: 0; /* Critical for flex children to shrink */
|
|
244
|
-
|
|
245
|
-
/* Override base menu styling that's not appropriate for sidebars */
|
|
246
|
-
background-color: transparent !important;
|
|
247
|
-
backdrop-filter: none !important;
|
|
248
|
-
box-shadow: none !important;
|
|
249
|
-
border-radius: 0 !important;
|
|
250
|
-
|
|
251
|
-
/* Ensure ScrollArea takes full height within SidebarContent */
|
|
252
|
-
& :where(.rt-ScrollAreaRoot) {
|
|
253
|
-
flex: 1;
|
|
254
|
-
display: flex;
|
|
255
|
-
flex-direction: column;
|
|
256
|
-
min-height: 0;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
& :where(.rt-ScrollAreaViewport) {
|
|
260
|
-
flex: 1;
|
|
261
|
-
display: flex;
|
|
262
|
-
flex-direction: column;
|
|
263
|
-
min-height: 0;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/* Sidebar Menu - based on rt-BaseMenuViewport */
|
|
268
|
-
.rt-SidebarMenu {
|
|
269
|
-
flex: 1;
|
|
270
|
-
display: flex;
|
|
271
|
-
flex-direction: column;
|
|
272
147
|
padding: var(--base-menu-content-padding);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
:where(.rt-SidebarContent:has(.rt-ScrollAreaScrollbar[data-orientation='vertical'])) & {
|
|
279
|
-
padding-right: var(--space-3);
|
|
148
|
+
min-height: var(--base-menu-item-height);
|
|
149
|
+
|
|
150
|
+
/* Make MenuButtons expand to full width */
|
|
151
|
+
& :where(.rt-SidebarMenuButton) {
|
|
152
|
+
flex: 1;
|
|
280
153
|
}
|
|
281
154
|
}
|
|
282
155
|
|
|
283
|
-
/*
|
|
284
|
-
.rt-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
.rt-
|
|
156
|
+
/* Flex utilities for header/footer layouts */
|
|
157
|
+
.rt-SidebarHeader:where(.rt-flex-row) { flex-direction: row; }
|
|
158
|
+
.rt-SidebarHeader:where(.rt-flex-col) { flex-direction: column; }
|
|
159
|
+
.rt-SidebarHeader:where(.rt-items-center) { align-items: center; }
|
|
160
|
+
.rt-SidebarHeader:where(.rt-items-start) { align-items: flex-start; }
|
|
161
|
+
.rt-SidebarHeader:where(.rt-items-end) { align-items: flex-end; }
|
|
162
|
+
.rt-SidebarHeader:where(.rt-justify-between) { justify-content: space-between; }
|
|
163
|
+
.rt-SidebarHeader:where(.rt-justify-center) { justify-content: center; }
|
|
164
|
+
.rt-SidebarHeader:where(.rt-justify-start) { justify-content: flex-start; }
|
|
165
|
+
.rt-SidebarHeader:where(.rt-justify-end) { justify-content: flex-end; }
|
|
166
|
+
.rt-SidebarHeader:where(.rt-gap-1) { gap: var(--space-1); }
|
|
167
|
+
.rt-SidebarHeader:where(.rt-gap-2) { gap: var(--space-2); }
|
|
168
|
+
.rt-SidebarHeader:where(.rt-gap-3) { gap: var(--space-3); }
|
|
169
|
+
.rt-SidebarHeader:where(.rt-gap-4) { gap: var(--space-4); }
|
|
170
|
+
|
|
171
|
+
.rt-SidebarFooter:where(.rt-flex-row) { flex-direction: row; }
|
|
172
|
+
.rt-SidebarFooter:where(.rt-flex-col) { flex-direction: column; }
|
|
173
|
+
.rt-SidebarFooter:where(.rt-items-center) { align-items: center; }
|
|
174
|
+
.rt-SidebarFooter:where(.rt-items-start) { align-items: flex-start; }
|
|
175
|
+
.rt-SidebarFooter:where(.rt-items-end) { align-items: flex-end; }
|
|
176
|
+
.rt-SidebarFooter:where(.rt-justify-between) { justify-content: space-between; }
|
|
177
|
+
.rt-SidebarFooter:where(.rt-justify-center) { justify-content: center; }
|
|
178
|
+
.rt-SidebarFooter:where(.rt-justify-start) { justify-content: flex-start; }
|
|
179
|
+
.rt-SidebarFooter:where(.rt-justify-end) { justify-content: flex-end; }
|
|
180
|
+
.rt-SidebarFooter:where(.rt-gap-1) { gap: var(--space-1); }
|
|
181
|
+
.rt-SidebarFooter:where(.rt-gap-2) { gap: var(--space-2); }
|
|
182
|
+
.rt-SidebarFooter:where(.rt-gap-3) { gap: var(--space-3); }
|
|
183
|
+
.rt-SidebarFooter:where(.rt-gap-4) { gap: var(--space-4); }
|
|
184
|
+
|
|
185
|
+
/* Header/Footer Menu Button Support */
|
|
186
|
+
.rt-SidebarHeader :where(.rt-SidebarMenuButton),
|
|
187
|
+
.rt-SidebarFooter :where(.rt-SidebarMenuButton) {
|
|
188
|
+
/* Inherit all base MenuButton styles */
|
|
290
189
|
display: flex;
|
|
291
190
|
align-items: center;
|
|
292
|
-
gap: var(--space-2);
|
|
191
|
+
gap: var(--space-2);
|
|
293
192
|
min-height: var(--base-menu-item-height);
|
|
294
193
|
padding-top: var(--base-menu-item-padding-y);
|
|
295
194
|
padding-bottom: var(--base-menu-item-padding-y);
|
|
@@ -298,290 +197,39 @@
|
|
|
298
197
|
box-sizing: border-box;
|
|
299
198
|
position: relative;
|
|
300
199
|
outline: none;
|
|
301
|
-
scroll-margin: var(--base-menu-content-padding) 0;
|
|
302
200
|
background: none;
|
|
303
201
|
border: none;
|
|
304
202
|
width: 100%;
|
|
305
203
|
text-align: left;
|
|
306
|
-
border-radius: var(--radius-2); /* Will be overridden by size-specific radius */
|
|
307
|
-
|
|
308
|
-
/* Transitions - inherit from base menu */
|
|
309
|
-
transition: var(--transition-menu);
|
|
310
|
-
|
|
311
|
-
/* Fix sticky text highlighting after selection in Firefox */
|
|
312
|
-
user-select: none;
|
|
313
|
-
|
|
314
|
-
/* Cursors */
|
|
315
204
|
cursor: var(--cursor-menu-item);
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
/*
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
205
|
+
user-select: none;
|
|
206
|
+
|
|
207
|
+
/* Header/Footer-specific styling */
|
|
208
|
+
justify-content: flex-start;
|
|
209
|
+
|
|
210
|
+
/* Transitions */
|
|
211
|
+
transition: background var(--duration-2) var(--ease-1),
|
|
212
|
+
box-shadow var(--duration-2) var(--ease-1),
|
|
213
|
+
filter var(--duration-2) var(--ease-1);
|
|
214
|
+
|
|
327
215
|
/* Focus state */
|
|
328
216
|
&:where(:focus-visible) {
|
|
329
217
|
outline: 2px solid var(--focus-8);
|
|
330
218
|
outline-offset: 2px;
|
|
331
219
|
}
|
|
332
|
-
|
|
333
|
-
/* Accent color support */
|
|
334
|
-
&:where([data-accent-color]) {
|
|
335
|
-
color: var(--accent-a11);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/* Gray text support - inherit from base menu */
|
|
339
|
-
& :where(.rt-Text[data-accent-color='gray'], [data-accent-color='gray']:not(.rt-Badge)) {
|
|
340
|
-
color: var(--gray-a10);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/* Ensure shortcuts inherit color in disabled/highlighted/active states */
|
|
344
|
-
&:where([data-disabled], [data-highlighted], [data-active]) {
|
|
345
|
-
& :where(.rt-SidebarMenuShortcut) {
|
|
346
|
-
color: inherit;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
220
|
+
|
|
350
221
|
/* Reduced motion support */
|
|
351
222
|
@media (prefers-reduced-motion: reduce) {
|
|
352
223
|
transition: none;
|
|
353
224
|
}
|
|
354
225
|
}
|
|
355
226
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
justify-content: space-between;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/* Accordion trigger icon rotation */
|
|
362
|
-
.rt-SidebarMenuSubTrigger {
|
|
363
|
-
& :where(.rt-SidebarMenuSubTriggerIcon) {
|
|
364
|
-
transition: transform 0.2s ease;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
&:where([data-state="open"]) :where(.rt-SidebarMenuSubTriggerIcon) {
|
|
368
|
-
transform: rotate(90deg);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
.rt-SidebarMenuSubContent {
|
|
373
|
-
overflow: hidden;
|
|
374
|
-
|
|
375
|
-
/* Allow focus outlines to show */
|
|
376
|
-
&:where(:focus-within) {
|
|
377
|
-
overflow: visible;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/* Radix Accordion animation support */
|
|
381
|
-
&:where([data-state="open"]) {
|
|
382
|
-
animation: rt-sidebar-slide-down 200ms ease-out;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
&:where([data-state="closed"]) {
|
|
386
|
-
animation: rt-sidebar-slide-up 200ms ease-out;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
@keyframes rt-sidebar-slide-down {
|
|
391
|
-
from {
|
|
392
|
-
height: 0;
|
|
393
|
-
}
|
|
394
|
-
to {
|
|
395
|
-
height: var(--radix-accordion-content-height);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
@keyframes rt-sidebar-slide-up {
|
|
400
|
-
from {
|
|
401
|
-
height: var(--radix-accordion-content-height);
|
|
402
|
-
}
|
|
403
|
-
to {
|
|
404
|
-
height: 0;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.rt-SidebarMenuSubList {
|
|
409
|
-
padding-left: var(--space-4);
|
|
410
|
-
border-left: 1px solid var(--gray-a5);
|
|
411
|
-
margin-left: var(--space-3);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/* Sub-menu items have consistent heights based on size - match dropdown menu exactly */
|
|
415
|
-
:where(.rt-SidebarContent.rt-r-size-1) :where(.rt-SidebarMenuSubList) .rt-SidebarMenuButton {
|
|
416
|
-
padding-left: var(--space-3);
|
|
417
|
-
padding-top: calc(var(--space-1) * 0.75);
|
|
418
|
-
padding-bottom: calc(var(--space-1) * 0.75);
|
|
419
|
-
min-height: var(--space-5); /* 20px */
|
|
420
|
-
font-size: var(--font-size-1);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
:where(.rt-SidebarContent.rt-r-size-2) :where(.rt-SidebarMenuSubList) .rt-SidebarMenuButton {
|
|
424
|
-
padding-left: var(--space-3);
|
|
425
|
-
padding-top: var(--space-1);
|
|
426
|
-
padding-bottom: var(--space-1);
|
|
427
|
-
min-height: var(--space-6); /* 24px */
|
|
428
|
-
font-size: var(--font-size-2);
|
|
227
|
+
.rt-SidebarHeader :where(.rt-SidebarMenuButton) {
|
|
228
|
+
border-radius: var(--sidebar-base-border-radius) var(--sidebar-base-border-radius) 0 0;
|
|
429
229
|
}
|
|
430
230
|
|
|
431
|
-
|
|
432
|
-
.rt-SidebarFooter {
|
|
433
|
-
display: flex;
|
|
434
|
-
flex-direction: column;
|
|
435
|
-
flex-shrink: 0;
|
|
436
|
-
margin-top: auto;
|
|
231
|
+
.rt-SidebarFooter :where(.rt-SidebarMenuButton) {
|
|
437
232
|
border-radius: 0 0 var(--sidebar-base-border-radius) var(--sidebar-base-border-radius);
|
|
438
|
-
|
|
439
|
-
/* Support for SidebarMenuButton inside footer */
|
|
440
|
-
& :where(.rt-SidebarMenuButton) {
|
|
441
|
-
/* Inherit all base MenuButton styles */
|
|
442
|
-
display: flex;
|
|
443
|
-
align-items: center;
|
|
444
|
-
gap: var(--space-2);
|
|
445
|
-
min-height: var(--base-menu-item-height);
|
|
446
|
-
padding-top: var(--base-menu-item-padding-y);
|
|
447
|
-
padding-bottom: var(--base-menu-item-padding-y);
|
|
448
|
-
padding-left: var(--base-menu-item-padding-left);
|
|
449
|
-
padding-right: var(--base-menu-item-padding-right);
|
|
450
|
-
box-sizing: border-box;
|
|
451
|
-
position: relative;
|
|
452
|
-
outline: none;
|
|
453
|
-
background: none;
|
|
454
|
-
border: none;
|
|
455
|
-
width: 100%;
|
|
456
|
-
text-align: left;
|
|
457
|
-
cursor: var(--cursor-menu-item);
|
|
458
|
-
user-select: none;
|
|
459
|
-
|
|
460
|
-
/* Footer-specific styling */
|
|
461
|
-
justify-content: flex-start;
|
|
462
|
-
border-radius: 0 0 var(--sidebar-base-border-radius) var(--sidebar-base-border-radius);
|
|
463
|
-
|
|
464
|
-
/* Transitions */
|
|
465
|
-
transition: background var(--duration-2) var(--ease-1),
|
|
466
|
-
box-shadow var(--duration-2) var(--ease-1),
|
|
467
|
-
filter var(--duration-2) var(--ease-1);
|
|
468
|
-
|
|
469
|
-
/* Note: Hover/active states are handled by menu variants */
|
|
470
|
-
|
|
471
|
-
/* Focus state */
|
|
472
|
-
&:where(:focus-visible) {
|
|
473
|
-
outline: 2px solid var(--focus-8);
|
|
474
|
-
outline-offset: 2px;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/* Reduced motion support */
|
|
478
|
-
@media (prefers-reduced-motion: reduce) {
|
|
479
|
-
transition: none;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/* Footer container variant - default flex container */
|
|
485
|
-
.rt-SidebarFooter:where(.rt-SidebarFooter--container) {
|
|
486
|
-
display: flex;
|
|
487
|
-
flex-direction: row;
|
|
488
|
-
align-items: center;
|
|
489
|
-
gap: var(--space-2);
|
|
490
|
-
padding: var(--base-menu-content-padding);
|
|
491
|
-
min-height: var(--base-menu-item-height);
|
|
492
|
-
|
|
493
|
-
/* Make MenuButtons expand to full width */
|
|
494
|
-
& :where(.rt-SidebarMenuButton) {
|
|
495
|
-
flex: 1;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/* Flex utilities for footer layouts */
|
|
500
|
-
.rt-SidebarFooter:where(.rt-flex-row) {
|
|
501
|
-
flex-direction: row;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.rt-SidebarFooter:where(.rt-flex-col) {
|
|
505
|
-
flex-direction: column;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
.rt-SidebarFooter:where(.rt-items-center) {
|
|
509
|
-
align-items: center;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.rt-SidebarFooter:where(.rt-items-start) {
|
|
513
|
-
align-items: flex-start;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.rt-SidebarFooter:where(.rt-items-end) {
|
|
517
|
-
align-items: flex-end;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.rt-SidebarFooter:where(.rt-justify-between) {
|
|
521
|
-
justify-content: space-between;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
.rt-SidebarFooter:where(.rt-justify-center) {
|
|
525
|
-
justify-content: center;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
.rt-SidebarFooter:where(.rt-justify-start) {
|
|
529
|
-
justify-content: flex-start;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
.rt-SidebarFooter:where(.rt-justify-end) {
|
|
533
|
-
justify-content: flex-end;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.rt-SidebarFooter:where(.rt-gap-1) {
|
|
537
|
-
gap: var(--space-1);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
.rt-SidebarFooter:where(.rt-gap-2) {
|
|
541
|
-
gap: var(--space-2);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.rt-SidebarFooter:where(.rt-gap-3) {
|
|
545
|
-
gap: var(--space-3);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.rt-SidebarFooter:where(.rt-gap-4) {
|
|
549
|
-
gap: var(--space-4);
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/* Sidebar Separator - ensure full width and proper spacing */
|
|
553
|
-
.rt-SidebarSeparator {
|
|
554
|
-
width: 100%;
|
|
555
|
-
margin: var(--space-2) 0;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/* Sidebar Group Components - identical to base menu */
|
|
559
|
-
.rt-SidebarGroup {
|
|
560
|
-
/* No styling - purely semantic like BaseMenuGroup */
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
.rt-SidebarGroupLabel {
|
|
564
|
-
/* Inherit all BaseMenuLabel styles */
|
|
565
|
-
display: flex;
|
|
566
|
-
align-items: center;
|
|
567
|
-
min-height: var(--base-menu-item-height);
|
|
568
|
-
padding-top: var(--base-menu-item-padding-y);
|
|
569
|
-
padding-bottom: var(--base-menu-item-padding-y);
|
|
570
|
-
padding-left: var(--base-menu-item-padding-left);
|
|
571
|
-
padding-right: var(--base-menu-item-padding-right);
|
|
572
|
-
box-sizing: border-box;
|
|
573
|
-
color: var(--gray-a10);
|
|
574
|
-
user-select: none;
|
|
575
|
-
cursor: default;
|
|
576
|
-
|
|
577
|
-
/* Add margin-top when following menu items - identical to BaseMenuLabel */
|
|
578
|
-
:where(.rt-SidebarMenuItem) + & {
|
|
579
|
-
margin-top: var(--space-2);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.rt-SidebarGroupContent {
|
|
584
|
-
/* No styling - purely semantic container */
|
|
585
233
|
}
|
|
586
234
|
|
|
587
235
|
/***************************************************************************************************
|
|
@@ -627,6 +275,7 @@
|
|
|
627
275
|
line-height: var(--line-height-1);
|
|
628
276
|
letter-spacing: var(--letter-spacing-1);
|
|
629
277
|
border-radius: var(--radius-1);
|
|
278
|
+
font-weight: var(--font-weight-medium);
|
|
630
279
|
|
|
631
280
|
/* stylelint-disable-next-line selector-max-type */
|
|
632
281
|
& :where(svg) {
|
|
@@ -652,6 +301,7 @@
|
|
|
652
301
|
line-height: var(--line-height-2);
|
|
653
302
|
letter-spacing: var(--letter-spacing-2);
|
|
654
303
|
border-radius: var(--radius-2);
|
|
304
|
+
font-weight: var(--font-weight-medium);
|
|
655
305
|
|
|
656
306
|
/* stylelint-disable-next-line selector-max-type */
|
|
657
307
|
& :where(svg) {
|
|
@@ -669,58 +319,14 @@
|
|
|
669
319
|
margin-left: auto;
|
|
670
320
|
}
|
|
671
321
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
322
|
}
|
|
675
323
|
|
|
676
324
|
/***************************************************************************************************
|
|
677
325
|
* *
|
|
678
|
-
* VARIANTS
|
|
326
|
+
* MENU VARIANTS *
|
|
679
327
|
* *
|
|
680
328
|
***************************************************************************************************/
|
|
681
329
|
|
|
682
|
-
/* Sidebar Container Variants */
|
|
683
|
-
.rt-SidebarContainer {
|
|
684
|
-
&:where(.rt-variant-ghost) {
|
|
685
|
-
background-color: transparent;
|
|
686
|
-
backdrop-filter: none;
|
|
687
|
-
border: none;
|
|
688
|
-
}
|
|
689
|
-
&:where(.rt-variant-soft) {
|
|
690
|
-
/* Use solid gray for solid panels, alpha gray for translucent panels */
|
|
691
|
-
background-color: var(--gray-2);
|
|
692
|
-
|
|
693
|
-
/* Theme-level translucent override */
|
|
694
|
-
:where([data-panel-background='translucent']) & {
|
|
695
|
-
background-color: var(--gray-a2);
|
|
696
|
-
backdrop-filter: var(--backdrop-filter-panel);
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
/* Component-level overrides (higher specificity) */
|
|
700
|
-
&:where([data-panel-background='solid']) {
|
|
701
|
-
background-color: var(--gray-2);
|
|
702
|
-
backdrop-filter: none;
|
|
703
|
-
--backdrop-filter-components: none;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
&:where([data-panel-background='translucent']) {
|
|
707
|
-
background-color: var(--gray-a2);
|
|
708
|
-
backdrop-filter: var(--backdrop-filter-panel);
|
|
709
|
-
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
710
|
-
--backdrop-filter-components: blur(var(--backdrop-blur-components));
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/* Floating shadows - only for ghost variant */
|
|
716
|
-
.rt-SidebarContainer:where(.rt-variant-ghost) {
|
|
717
|
-
:where(.rt-SidebarRoot[data-type="floating"]) & {
|
|
718
|
-
box-shadow: var(--shadow-4);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
/* Menu Button Variants - Independent of Container */
|
|
723
|
-
|
|
724
330
|
/* Menu Variant: Solid - EXACT match to base menu */
|
|
725
331
|
.rt-SidebarHeader:where(.rt-menu-variant-solid),
|
|
726
332
|
.rt-SidebarContent:where(.rt-menu-variant-solid),
|
|
@@ -788,6 +394,12 @@
|
|
|
788
394
|
& :where([data-accent-color='gray']:not(.rt-Badge)) {
|
|
789
395
|
color: inherit !important;
|
|
790
396
|
}
|
|
397
|
+
|
|
398
|
+
/* FIX: Ensure badges maintain their own styling and don't inherit hover colors */
|
|
399
|
+
& :where(.rt-Badge) {
|
|
400
|
+
color: var(--accent-contrast) !important;
|
|
401
|
+
background-color: var(--accent-12) !important;
|
|
402
|
+
}
|
|
791
403
|
}
|
|
792
404
|
|
|
793
405
|
/* Active navigation state for solid variant - same as highlighted */
|
|
@@ -803,6 +415,12 @@
|
|
|
803
415
|
& :where([data-accent-color='gray']:not(.rt-Badge)) {
|
|
804
416
|
color: inherit !important;
|
|
805
417
|
}
|
|
418
|
+
|
|
419
|
+
/* FIX: Ensure badges maintain their own styling and don't inherit active colors */
|
|
420
|
+
& :where(.rt-Badge) {
|
|
421
|
+
color: var(--accent-contrast) !important;
|
|
422
|
+
background-color: var(--accent-12) !important;
|
|
423
|
+
}
|
|
806
424
|
}
|
|
807
425
|
|
|
808
426
|
/* High contrast support for solid variant - EXACT match to base menu */
|
|
@@ -825,6 +443,12 @@
|
|
|
825
443
|
color: inherit !important;
|
|
826
444
|
}
|
|
827
445
|
|
|
446
|
+
/* FIX: High contrast badge styling */
|
|
447
|
+
& :where(.rt-Badge) {
|
|
448
|
+
color: var(--accent-1) !important;
|
|
449
|
+
background-color: var(--accent-9) !important;
|
|
450
|
+
}
|
|
451
|
+
|
|
828
452
|
&:where([data-accent-color]) {
|
|
829
453
|
background-color: var(--accent-9);
|
|
830
454
|
color: var(--accent-contrast);
|
|
@@ -836,6 +460,11 @@
|
|
|
836
460
|
& :where([data-accent-color='gray']:not(.rt-Badge)) {
|
|
837
461
|
color: inherit !important;
|
|
838
462
|
}
|
|
463
|
+
|
|
464
|
+
& :where(.rt-Badge) {
|
|
465
|
+
color: var(--accent-contrast) !important;
|
|
466
|
+
background-color: var(--accent-12) !important;
|
|
467
|
+
}
|
|
839
468
|
}
|
|
840
469
|
}
|
|
841
470
|
|
|
@@ -851,6 +480,11 @@
|
|
|
851
480
|
color: inherit !important;
|
|
852
481
|
}
|
|
853
482
|
|
|
483
|
+
& :where(.rt-Badge) {
|
|
484
|
+
color: var(--accent-1) !important;
|
|
485
|
+
background-color: var(--accent-9) !important;
|
|
486
|
+
}
|
|
487
|
+
|
|
854
488
|
&:where([data-accent-color]) {
|
|
855
489
|
background-color: var(--accent-9);
|
|
856
490
|
color: var(--accent-contrast);
|
|
@@ -862,6 +496,11 @@
|
|
|
862
496
|
& :where([data-accent-color='gray']:not(.rt-Badge)) {
|
|
863
497
|
color: inherit !important;
|
|
864
498
|
}
|
|
499
|
+
|
|
500
|
+
& :where(.rt-Badge) {
|
|
501
|
+
color: var(--accent-contrast) !important;
|
|
502
|
+
background-color: var(--accent-12) !important;
|
|
503
|
+
}
|
|
865
504
|
}
|
|
866
505
|
}
|
|
867
506
|
}
|
|
@@ -975,75 +614,225 @@
|
|
|
975
614
|
}
|
|
976
615
|
}
|
|
977
616
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
617
|
+
/***************************************************************************************************
|
|
618
|
+
* *
|
|
619
|
+
* COLLAPSIBLE BEHAVIOR *
|
|
620
|
+
* *
|
|
621
|
+
***************************************************************************************************/
|
|
983
622
|
|
|
984
|
-
/* Collapsible behavior -
|
|
623
|
+
/* Collapsible behavior - ICON-ONLY MODE APPROACH */
|
|
985
624
|
.rt-SidebarRoot:where([data-collapsible="icon"]) {
|
|
986
625
|
/* No transitions - instant state changes for better UX */
|
|
987
626
|
transition: none;
|
|
988
|
-
overflow:
|
|
627
|
+
overflow: visible; /* Allow content to be visible */
|
|
989
628
|
flex-shrink: 0; /* Don't let flex container shrink this */
|
|
990
629
|
}
|
|
991
630
|
|
|
992
|
-
/*
|
|
993
|
-
|
|
994
|
-
|
|
631
|
+
/* Icon-only width - size-specific space tokens */
|
|
632
|
+
:where(.radix-themes) {
|
|
633
|
+
--sidebar-icon-width-1: calc(var(--space-9) + var(--space-1)); /* Size 1: 36px */
|
|
634
|
+
--sidebar-icon-width-2: calc(var(--space-9) + var(--space-3)); /* Size 2: 76px */
|
|
995
635
|
}
|
|
996
636
|
|
|
997
|
-
/*
|
|
637
|
+
/* Icon-only collapsed state - show narrow sidebar with icons only */
|
|
998
638
|
.rt-SidebarRoot:where([data-collapsible="icon"][data-state="collapsed"]) {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
639
|
+
opacity: 1; /* Keep visible */
|
|
640
|
+
pointer-events: auto; /* Keep interactive */
|
|
641
|
+
|
|
642
|
+
/* Size-specific widths */
|
|
643
|
+
&:where(.rt-r-size-1) {
|
|
644
|
+
width: var(--sidebar-icon-width-1);
|
|
645
|
+
min-width: var(--sidebar-icon-width-1);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
&:where(.rt-r-size-2) {
|
|
649
|
+
width: var(--sidebar-icon-width-2);
|
|
650
|
+
min-width: var(--sidebar-icon-width-2);
|
|
651
|
+
}
|
|
1004
652
|
}
|
|
1005
653
|
|
|
1006
|
-
/* Expanded state */
|
|
654
|
+
/* Expanded state - full width */
|
|
1007
655
|
.rt-SidebarRoot:where([data-collapsible="icon"][data-state="expanded"]) {
|
|
1008
656
|
width: var(--sidebar-width);
|
|
1009
|
-
min-width: var(--sidebar-width);
|
|
657
|
+
min-width: var(--sidebar-width);
|
|
1010
658
|
opacity: 1;
|
|
1011
659
|
pointer-events: auto;
|
|
1012
660
|
}
|
|
1013
661
|
|
|
1014
|
-
/* Container
|
|
662
|
+
/* Container sizing for icon mode */
|
|
663
|
+
.rt-SidebarContainer:where([data-collapsible="icon"]) {
|
|
664
|
+
/* Allow dynamic width based on state */
|
|
665
|
+
width: 100%;
|
|
666
|
+
min-width: 0;
|
|
667
|
+
flex-shrink: 0;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/* Content adjustments for icon mode */
|
|
671
|
+
.rt-SidebarContent:where([data-collapsible="icon"]) {
|
|
672
|
+
/* Allow content to shrink in icon mode */
|
|
673
|
+
width: 100%;
|
|
674
|
+
min-width: 0;
|
|
675
|
+
flex-shrink: 0;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/* Hide text content in collapsed icon mode */
|
|
1015
679
|
.rt-SidebarRoot:where([data-collapsible="icon"][data-state="collapsed"]) {
|
|
1016
|
-
/*
|
|
1017
|
-
|
|
1018
|
-
|
|
680
|
+
/* Style menu buttons for icon-only mode */
|
|
681
|
+
& :where(.rt-SidebarMenuButton) {
|
|
682
|
+
justify-content: center;
|
|
683
|
+
flex-direction: column;
|
|
684
|
+
padding: var(--space-2) var(--space-1);
|
|
685
|
+
gap: var(--space-1);
|
|
686
|
+
min-height: auto;
|
|
687
|
+
|
|
688
|
+
/* Show text spans as small labels under icons */
|
|
689
|
+
/* stylelint-disable-next-line selector-max-type */
|
|
690
|
+
& :where(span) {
|
|
691
|
+
display: block;
|
|
692
|
+
font-size: var(--font-size-0);
|
|
693
|
+
line-height: var(--line-height-0);
|
|
694
|
+
color: var(--gray-a10);
|
|
695
|
+
text-align: center;
|
|
696
|
+
font-weight: var(--font-weight-medium);
|
|
697
|
+
max-width: 100%;
|
|
698
|
+
overflow: hidden;
|
|
699
|
+
text-overflow: ellipsis;
|
|
700
|
+
white-space: nowrap;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/* Dynamic width calculation for labels inside collapsed icon sidebar */
|
|
705
|
+
&:where(.rt-r-size-1) {
|
|
706
|
+
/* Group labels (no button padding) */
|
|
707
|
+
--sidebar-group-label-width: calc(var(--sidebar-icon-width-1) - (var(--space-2) * 2));
|
|
708
|
+
/* Button labels (inside menu buttons, subtract button padding) */
|
|
709
|
+
--sidebar-button-label-width: calc(var(--sidebar-group-label-width) - (var(--space-1) * 2));
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
&:where(.rt-r-size-2) {
|
|
713
|
+
--sidebar-group-label-width: calc(var(--sidebar-icon-width-2) - (var(--space-2) * 2));
|
|
714
|
+
--sidebar-button-label-width: calc(var(--sidebar-group-label-width) - (var(--space-1) * 2));
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/* Apply the computed width to both group labels and the spans inside icon buttons */
|
|
718
|
+
& :where(.rt-SidebarGroupLabel) {
|
|
719
|
+
max-width: var(--sidebar-group-label-width);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/* stylelint-disable-next-line selector-max-type */
|
|
723
|
+
& :where(.rt-SidebarMenuButton span) {
|
|
724
|
+
max-width: var(--sidebar-button-label-width);
|
|
725
|
+
min-width: 0; /* allow shrinking */
|
|
726
|
+
overflow: hidden;
|
|
727
|
+
text-overflow: ellipsis;
|
|
728
|
+
white-space: nowrap;
|
|
729
|
+
color: var(--gray-a12);
|
|
730
|
+
font-weight: var(--font-weight-medium);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/* stylelint-disable selector-max-type, selector-max-specificity */
|
|
734
|
+
&.rt-menu-variant-solid :where(.rt-SidebarMenuButton[data-highlighted] span),
|
|
735
|
+
&.rt-menu-variant-solid :where(.rt-SidebarMenuButton[data-active] span) {
|
|
736
|
+
color: var(--accent-contrast) !important;
|
|
737
|
+
}
|
|
738
|
+
/* stylelint-enable selector-max-type, selector-max-specificity */
|
|
739
|
+
|
|
740
|
+
/* Show group labels as small text instead of separators */
|
|
741
|
+
:where(.rt-SidebarGroupLabel) {
|
|
742
|
+
/* Use block display to make text-overflow ellipsis work reliably */
|
|
743
|
+
display: block;
|
|
744
|
+
text-align: center;
|
|
745
|
+
min-width: 0;
|
|
746
|
+
min-height: auto; /* Remove inherited min-height constraint */
|
|
747
|
+
max-width: var(--sidebar-group-label-width);
|
|
748
|
+
font-size: var(--font-size-0);
|
|
749
|
+
line-height: var(--line-height-0);
|
|
750
|
+
color: var(--gray-a9);
|
|
751
|
+
font-weight: var(--font-weight-medium);
|
|
752
|
+
padding: var(--space-1) var(--space-1);
|
|
753
|
+
margin: var(--space-2) 0 var(--space-1) 0;
|
|
754
|
+
overflow: hidden;
|
|
755
|
+
text-overflow: ellipsis;
|
|
756
|
+
white-space: nowrap;
|
|
757
|
+
|
|
758
|
+
/* Hide label for the first group if you prefer */
|
|
759
|
+
:where(.rt-SidebarGroup:first-child) & {
|
|
760
|
+
margin-top: 0;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/* Hide badges and shortcuts */
|
|
765
|
+
:where(.rt-SidebarMenuBadge),
|
|
766
|
+
:where(.rt-SidebarMenuShortcut) {
|
|
767
|
+
display: none;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/* Keep sub-menu trigger icons hidden in icon mode, but preserve accordion functionality */
|
|
771
|
+
:where(.rt-SidebarMenuSubTriggerIcon) {
|
|
772
|
+
display: none;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/* Remove nested styling from sub-menu list to make items look like top-level */
|
|
776
|
+
:where(.rt-SidebarMenuSubList) {
|
|
777
|
+
padding-left: 0; /* Remove indentation */
|
|
778
|
+
border-left: none; /* Remove border */
|
|
779
|
+
margin-left: 0; /* Remove margin */
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/* Tighter menu padding for icon-only mode */
|
|
783
|
+
:where(.rt-SidebarMenu) {
|
|
784
|
+
padding: var(--space-2);
|
|
785
|
+
}
|
|
1019
786
|
}
|
|
1020
787
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
788
|
+
/* Icon size remapping for collapsed state - make icons more prominent */
|
|
789
|
+
.rt-SidebarRoot:where([data-collapsible="icon"][data-state="collapsed"]) {
|
|
790
|
+
/* Size 1 → use much larger icons (size 3 equivalent) */
|
|
791
|
+
&:where(.rt-r-size-1) {
|
|
792
|
+
/* stylelint-disable-next-line selector-max-type */
|
|
793
|
+
& :where(.rt-SidebarMenuButton svg) {
|
|
794
|
+
width: var(--content-icon-size-2) !important; /* ~19px instead of ~14px */
|
|
795
|
+
height: var(--content-icon-size-2) !important;
|
|
796
|
+
color: currentColor !important; /* Ensure icon color is visible */
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/* Size 2 → use largest icons (size 4 equivalent) */
|
|
801
|
+
&:where(.rt-r-size-2) {
|
|
802
|
+
/* stylelint-disable-next-line selector-max-type */
|
|
803
|
+
& :where(.rt-SidebarMenuButton svg) {
|
|
804
|
+
width: var(--content-icon-size-3) !important; /* 20px instead of 16px */
|
|
805
|
+
height: var(--content-icon-size-3) !important;
|
|
806
|
+
color: currentColor !important; /* Ensure icon color is visible */
|
|
807
|
+
}
|
|
808
|
+
}
|
|
1024
809
|
}
|
|
1025
810
|
|
|
1026
|
-
/* Floating sidebars
|
|
811
|
+
/* Floating sidebars in icon mode */
|
|
1027
812
|
.rt-SidebarRoot:where([data-collapsible="icon"][data-type="floating"]) {
|
|
1028
813
|
/* Same instant approach */
|
|
1029
814
|
transition: none;
|
|
1030
|
-
overflow:
|
|
815
|
+
overflow: visible; /* Allow content to be visible outside container */
|
|
1031
816
|
flex-shrink: 0;
|
|
1032
817
|
}
|
|
1033
818
|
|
|
1034
|
-
/*
|
|
1035
|
-
.rt-SidebarRoot:where([data-collapsible="icon"][data-type="floating"]
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
819
|
+
/* Floating collapsed state */
|
|
820
|
+
.rt-SidebarRoot:where([data-collapsible="icon"][data-type="floating"][data-state="collapsed"]) {
|
|
821
|
+
opacity: 1;
|
|
822
|
+
pointer-events: auto;
|
|
823
|
+
/* Keep floating margins but adjust for smaller width */
|
|
824
|
+
margin: var(--space-2);
|
|
825
|
+
|
|
826
|
+
/* Size-specific widths */
|
|
827
|
+
&:where(.rt-r-size-1) {
|
|
828
|
+
width: var(--sidebar-icon-width-1);
|
|
829
|
+
min-width: var(--sidebar-icon-width-1);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
&:where(.rt-r-size-2) {
|
|
833
|
+
width: var(--sidebar-icon-width-2);
|
|
834
|
+
min-width: var(--sidebar-icon-width-2);
|
|
835
|
+
}
|
|
1047
836
|
}
|
|
1048
837
|
|
|
1049
838
|
.rt-SidebarRoot:where([data-collapsible="icon"][data-type="floating"][data-state="expanded"]) {
|
|
@@ -1053,31 +842,15 @@
|
|
|
1053
842
|
pointer-events: auto;
|
|
1054
843
|
/* Restore floating margins */
|
|
1055
844
|
margin: var(--space-2);
|
|
1056
|
-
/* Remove the width override - let margin work naturally */
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
/* Content protection - prevent internal reflow */
|
|
1060
|
-
.rt-SidebarContainer:where([data-collapsible="icon"]) {
|
|
1061
|
-
/* Lock the content size to prevent internal shifting */
|
|
1062
|
-
width: var(--sidebar-width);
|
|
1063
|
-
min-width: var(--sidebar-width);
|
|
1064
|
-
flex-shrink: 0;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.rt-SidebarContent:where([data-collapsible="icon"]) {
|
|
1068
|
-
/* Prevent content from reflowing */
|
|
1069
|
-
width: 100%;
|
|
1070
|
-
min-width: var(--sidebar-width);
|
|
1071
|
-
flex-shrink: 0;
|
|
1072
845
|
}
|
|
1073
846
|
|
|
1074
|
-
/* Mobile responsive behavior - hide completely */
|
|
847
|
+
/* Mobile responsive behavior - hide completely on mobile regardless of icon mode */
|
|
1075
848
|
@media (max-width: 768px) {
|
|
1076
|
-
.rt-SidebarRoot {
|
|
849
|
+
.rt-SidebarRoot:where([data-collapsible="icon"]) {
|
|
1077
850
|
display: none;
|
|
1078
851
|
}
|
|
1079
852
|
|
|
1080
|
-
.rt-SidebarRoot:where([data-state="expanded"]) {
|
|
853
|
+
.rt-SidebarRoot:where([data-collapsible="icon"][data-state="expanded"]) {
|
|
1081
854
|
display: flex;
|
|
1082
855
|
position: fixed;
|
|
1083
856
|
top: 0;
|
|
@@ -1094,38 +867,4 @@
|
|
|
1094
867
|
.rt-SidebarRoot:where([data-collapsible="icon"]) {
|
|
1095
868
|
transition: none;
|
|
1096
869
|
}
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
/* Responsive behavior */
|
|
1100
|
-
@media (max-width: 768px) {
|
|
1101
|
-
.rt-SidebarRoot {
|
|
1102
|
-
display: none;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
/* Reduce right padding on menu buttons with trailing elements */
|
|
1107
|
-
.rt-SidebarMenuButton:where(:has(.rt-SidebarMenuShortcut, .rt-SidebarMenuBadge)) {
|
|
1108
|
-
/* Use base menu padding tokens */
|
|
1109
|
-
:where(.rt-SidebarContent.rt-r-size-1) & {
|
|
1110
|
-
padding-right: var(--base-menu-item-padding-y); /* Matches top/bottom padding */
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
:where(.rt-SidebarContent.rt-r-size-2) & {
|
|
1114
|
-
padding-right: var(--base-menu-item-padding-y); /* Matches top/bottom padding */
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
.rt-SidebarMenuShortcut {
|
|
1119
|
-
display: flex;
|
|
1120
|
-
align-items: center;
|
|
1121
|
-
margin-left: auto;
|
|
1122
|
-
padding-left: var(--space-4);
|
|
1123
|
-
color: var(--gray-a11);
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
.rt-SidebarMenuBadge {
|
|
1127
|
-
display: flex;
|
|
1128
|
-
align-items: center;
|
|
1129
|
-
margin-left: auto;
|
|
1130
|
-
padding-left: var(--space-2);
|
|
1131
870
|
}
|