@kushagradhawan/kookie-ui 0.1.28 → 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.
Files changed (39) hide show
  1. package/components.css +452 -249
  2. package/dist/cjs/components/accordion.d.ts +22 -0
  3. package/dist/cjs/components/accordion.d.ts.map +1 -0
  4. package/dist/cjs/components/accordion.js +2 -0
  5. package/dist/cjs/components/accordion.js.map +7 -0
  6. package/dist/cjs/components/accordion.props.d.ts +88 -0
  7. package/dist/cjs/components/accordion.props.d.ts.map +1 -0
  8. package/dist/cjs/components/accordion.props.js +2 -0
  9. package/dist/cjs/components/accordion.props.js.map +7 -0
  10. package/dist/cjs/components/dialog.props.d.ts +1 -1
  11. package/dist/cjs/components/index.d.ts +1 -0
  12. package/dist/cjs/components/index.d.ts.map +1 -1
  13. package/dist/cjs/components/index.js +1 -1
  14. package/dist/cjs/components/index.js.map +3 -3
  15. package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
  16. package/dist/esm/components/accordion.d.ts +22 -0
  17. package/dist/esm/components/accordion.d.ts.map +1 -0
  18. package/dist/esm/components/accordion.js +2 -0
  19. package/dist/esm/components/accordion.js.map +7 -0
  20. package/dist/esm/components/accordion.props.d.ts +88 -0
  21. package/dist/esm/components/accordion.props.d.ts.map +1 -0
  22. package/dist/esm/components/accordion.props.js +2 -0
  23. package/dist/esm/components/accordion.props.js.map +7 -0
  24. package/dist/esm/components/dialog.props.d.ts +1 -1
  25. package/dist/esm/components/index.d.ts +1 -0
  26. package/dist/esm/components/index.d.ts.map +1 -1
  27. package/dist/esm/components/index.js +1 -1
  28. package/dist/esm/components/index.js.map +3 -3
  29. package/dist/esm/helpers/extract-margin-props.d.ts +7 -7
  30. package/package.json +1 -1
  31. package/src/components/_internal/base-sidebar-menu.css +223 -0
  32. package/src/components/_internal/base-sidebar.css +141 -0
  33. package/src/components/accordion.css +254 -0
  34. package/src/components/accordion.props.tsx +84 -0
  35. package/src/components/accordion.tsx +162 -0
  36. package/src/components/index.css +1 -0
  37. package/src/components/index.tsx +1 -0
  38. package/src/components/sidebar.css +180 -635
  39. package/styles.css +452 -249
@@ -1,80 +1,8 @@
1
1
  @import './_internal/base-menu.css';
2
+ @import './_internal/base-sidebar.css';
3
+ @import './_internal/base-sidebar-menu.css';
2
4
 
3
- /* Sidebar Provider - handles positioning */
4
- .rt-SidebarProvider {
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
-
5
+ /* Container Variants */
78
6
  .rt-SidebarContainer:where(.rt-variant-outline) {
79
7
  background-color: var(--color-panel);
80
8
  backdrop-filter: var(--backdrop-filter-panel);
@@ -109,59 +37,94 @@
109
37
  }
110
38
  }
111
39
 
112
- /* Sidebar Header */
113
- .rt-SidebarHeader {
114
- display: flex;
115
- flex-direction: column;
116
- flex-shrink: 0;
117
- border-radius: var(--sidebar-base-border-radius) var(--sidebar-base-border-radius) 0 0;
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
- /* Support for SidebarMenuButton inside header */
120
- & :where(.rt-SidebarMenuButton) {
121
- /* Inherit all base MenuButton styles */
122
- display: flex;
123
- align-items: center;
124
- gap: var(--space-2);
125
- min-height: var(--base-menu-item-height);
126
- padding-top: var(--base-menu-item-padding-y);
127
- padding-bottom: var(--base-menu-item-padding-y);
128
- padding-left: var(--base-menu-item-padding-left);
129
- padding-right: var(--base-menu-item-padding-right);
130
- box-sizing: border-box;
131
- position: relative;
132
- outline: none;
133
- background: none;
134
- border: none;
135
- width: 100%;
136
- text-align: left;
137
- cursor: var(--cursor-menu-item);
138
- user-select: none;
139
-
140
- /* Header-specific styling */
141
- justify-content: flex-start;
142
- border-radius: var(--sidebar-base-border-radius) var(--sidebar-base-border-radius) 0 0;
143
-
144
- /* Transitions */
145
- transition: background var(--duration-2) var(--ease-1),
146
- box-shadow var(--duration-2) var(--ease-1),
147
- filter var(--duration-2) var(--ease-1);
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
- /* Note: Hover/active states are handled by menu variants */
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
- /* Focus state */
152
- &:where(:focus-visible) {
153
- outline: 2px solid var(--focus-8);
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
- /* Reduced motion support */
158
- @media (prefers-reduced-motion: reduce) {
159
- transition: none;
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 container variant - default flex container */
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
- /* Flex utilities for header layouts */
180
- .rt-SidebarHeader:where(.rt-flex-row) {
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
- box-sizing: border-box;
274
- list-style: none;
275
- margin: 0;
276
- min-height: 0;
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
- /* Sidebar Menu Item */
284
- .rt-SidebarMenuItem {
285
- list-style: none;
286
- }
287
-
288
- /* Sidebar Menu Button - inherit from BaseMenuItem */
289
- .rt-SidebarMenuButton {
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); /* Will be overridden by size-specific gap */
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,289 +197,41 @@
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
- /* No default border radius - inherited from size-specific rules */
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
- &:where([data-disabled]) {
317
- cursor: default;
318
- color: var(--gray-a8);
319
- }
320
-
321
- /* Active navigation state - always accent-based */
322
- &:where([data-active], .rt-active) {
323
- background-color: var(--accent-a3);
324
- color: var(--accent-a12);
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
- /* Sidebar Menu Sub Components - Radix Accordion */
357
- .rt-SidebarMenuSubTrigger {
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
- /* Sidebar Footer */
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
233
  }
498
234
 
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
-
584
235
  /***************************************************************************************************
585
236
  * *
586
237
  * SIZES *
@@ -624,7 +275,7 @@
624
275
  line-height: var(--line-height-1);
625
276
  letter-spacing: var(--letter-spacing-1);
626
277
  border-radius: var(--radius-1);
627
- font-weight: var(--font-weight-medium); /* Add this line */
278
+ font-weight: var(--font-weight-medium);
628
279
 
629
280
  /* stylelint-disable-next-line selector-max-type */
630
281
  & :where(svg) {
@@ -650,8 +301,7 @@
650
301
  line-height: var(--line-height-2);
651
302
  letter-spacing: var(--letter-spacing-2);
652
303
  border-radius: var(--radius-2);
653
- font-weight: var(--font-weight-medium); /* Add this line */
654
-
304
+ font-weight: var(--font-weight-medium);
655
305
 
656
306
  /* stylelint-disable-next-line selector-max-type */
657
307
  & :where(svg) {
@@ -669,108 +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
- &:where(.rt-variant-surface) {
714
- /* Base state: neutral gray background (maintains sidebar neutrality) */
715
- background-color: var(--gray-1);
716
-
717
- /* Theme-level translucent override */
718
- :where([data-panel-background='translucent']) & {
719
- background-color: var(--gray-a1);
720
- backdrop-filter: var(--backdrop-filter-panel);
721
- }
722
-
723
- /* Component-level overrides (higher specificity) */
724
- &:where([data-panel-background='solid']) {
725
- background-color: var(--gray-1);
726
- backdrop-filter: none;
727
- --backdrop-filter-panel: none;
728
- --backdrop-filter-components: none;
729
- }
730
-
731
- &:where([data-panel-background='translucent']) {
732
- background-color: var(--gray-a1);
733
- backdrop-filter: var(--backdrop-filter-panel);
734
- --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
735
- --backdrop-filter-components: blur(var(--backdrop-blur-components));
736
- }
737
-
738
- /* Inset border like Card surface variant */
739
- /* Floating sidebars get full inset border */
740
- :where(.rt-SidebarRoot[data-type="floating"]) & {
741
- box-shadow: inset 0 0 0 1px var(--gray-6);
742
-
743
- /* Theme-level translucent override */
744
- :where([data-panel-background='translucent']) & {
745
- box-shadow: inset 0 0 0 1px var(--gray-a6);
746
- }
747
- }
748
-
749
- /* Non-floating sidebars get border only on the content-facing side */
750
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) & {
751
- box-shadow: inset -1px 0 0 0 var(--gray-6);
752
-
753
- /* Theme-level translucent override */
754
- :where([data-panel-background='translucent']) & {
755
- box-shadow: inset -1px 0 0 0 var(--gray-a6);
756
- }
757
- }
758
-
759
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) & {
760
- box-shadow: inset 1px 0 0 0 var(--gray-6);
761
-
762
- /* Theme-level translucent override */
763
- :where([data-panel-background='translucent']) & {
764
- box-shadow: inset 1px 0 0 0 var(--gray-a6);
765
- }
766
- }
767
- }
768
- }
769
-
770
- /* Ghost variant should have no shadows or background - it's truly transparent */
771
-
772
- /* Menu Button Variants - Independent of Container */
773
-
774
330
  /* Menu Variant: Solid - EXACT match to base menu */
775
331
  .rt-SidebarHeader:where(.rt-menu-variant-solid),
776
332
  .rt-SidebarContent:where(.rt-menu-variant-solid),
@@ -838,6 +394,12 @@
838
394
  & :where([data-accent-color='gray']:not(.rt-Badge)) {
839
395
  color: inherit !important;
840
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
+ }
841
403
  }
842
404
 
843
405
  /* Active navigation state for solid variant - same as highlighted */
@@ -853,6 +415,12 @@
853
415
  & :where([data-accent-color='gray']:not(.rt-Badge)) {
854
416
  color: inherit !important;
855
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
+ }
856
424
  }
857
425
 
858
426
  /* High contrast support for solid variant - EXACT match to base menu */
@@ -875,6 +443,12 @@
875
443
  color: inherit !important;
876
444
  }
877
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
+
878
452
  &:where([data-accent-color]) {
879
453
  background-color: var(--accent-9);
880
454
  color: var(--accent-contrast);
@@ -886,6 +460,11 @@
886
460
  & :where([data-accent-color='gray']:not(.rt-Badge)) {
887
461
  color: inherit !important;
888
462
  }
463
+
464
+ & :where(.rt-Badge) {
465
+ color: var(--accent-contrast) !important;
466
+ background-color: var(--accent-12) !important;
467
+ }
889
468
  }
890
469
  }
891
470
 
@@ -901,6 +480,11 @@
901
480
  color: inherit !important;
902
481
  }
903
482
 
483
+ & :where(.rt-Badge) {
484
+ color: var(--accent-1) !important;
485
+ background-color: var(--accent-9) !important;
486
+ }
487
+
904
488
  &:where([data-accent-color]) {
905
489
  background-color: var(--accent-9);
906
490
  color: var(--accent-contrast);
@@ -912,6 +496,11 @@
912
496
  & :where([data-accent-color='gray']:not(.rt-Badge)) {
913
497
  color: inherit !important;
914
498
  }
499
+
500
+ & :where(.rt-Badge) {
501
+ color: var(--accent-contrast) !important;
502
+ background-color: var(--accent-12) !important;
503
+ }
915
504
  }
916
505
  }
917
506
  }
@@ -1025,11 +614,11 @@
1025
614
  }
1026
615
  }
1027
616
 
1028
- /* Add balanced spacing for sidebar menu items while preserving base menu border radius */
1029
- .rt-SidebarContent :where(.rt-BaseMenuItem) {
1030
- margin-top: calc(var(--space-1) / 2);
1031
- margin-bottom: calc(var(--space-1) / 2);
1032
- }
617
+ /***************************************************************************************************
618
+ * *
619
+ * COLLAPSIBLE BEHAVIOR *
620
+ * *
621
+ ***************************************************************************************************/
1033
622
 
1034
623
  /* Collapsible behavior - ICON-ONLY MODE APPROACH */
1035
624
  .rt-SidebarRoot:where([data-collapsible="icon"]) {
@@ -1112,11 +701,7 @@
1112
701
  }
1113
702
  }
1114
703
 
1115
- /* ------------------------------------------------------------------------------------------ */
1116
- /* Dynamic width calculation for labels inside collapsed icon sidebar */
1117
- /* ------------------------------------------------------------------------------------------ */
1118
-
1119
- /* Compute usable label width based on sidebar icon width minus menu and item paddings */
704
+ /* Dynamic width calculation for labels inside collapsed icon sidebar */
1120
705
  &:where(.rt-r-size-1) {
1121
706
  /* Group labels (no button padding) */
1122
707
  --sidebar-group-label-width: calc(var(--sidebar-icon-width-1) - (var(--space-2) * 2));
@@ -1145,16 +730,12 @@
1145
730
  font-weight: var(--font-weight-medium);
1146
731
  }
1147
732
 
1148
- /* stylelint-disable selector-max-type, selector-max-specificity */
733
+ /* stylelint-disable selector-max-type, selector-max-specificity */
1149
734
  &.rt-menu-variant-solid :where(.rt-SidebarMenuButton[data-highlighted] span),
1150
735
  &.rt-menu-variant-solid :where(.rt-SidebarMenuButton[data-active] span) {
1151
736
  color: var(--accent-contrast) !important;
1152
737
  }
1153
-
1154
738
  /* stylelint-enable selector-max-type, selector-max-specificity */
1155
-
1156
- /* Size-specific overrides no longer needed – allow full width */
1157
- /* The general label/span rules below already handle ellipsis and overflow */
1158
739
 
1159
740
  /* Show group labels as small text instead of separators */
1160
741
  :where(.rt-SidebarGroupLabel) {
@@ -1263,8 +844,6 @@
1263
844
  margin: var(--space-2);
1264
845
  }
1265
846
 
1266
- /* Ghost sidebars have no shadows or background, so no special overflow handling needed */
1267
-
1268
847
  /* Mobile responsive behavior - hide completely on mobile regardless of icon mode */
1269
848
  @media (max-width: 768px) {
1270
849
  .rt-SidebarRoot:where([data-collapsible="icon"]) {
@@ -1288,38 +867,4 @@
1288
867
  .rt-SidebarRoot:where([data-collapsible="icon"]) {
1289
868
  transition: none;
1290
869
  }
1291
- }
1292
-
1293
- /* Responsive behavior */
1294
- @media (max-width: 768px) {
1295
- .rt-SidebarRoot {
1296
- display: none;
1297
- }
1298
- }
1299
-
1300
- /* Reduce right padding on menu buttons with trailing elements */
1301
- .rt-SidebarMenuButton:where(:has(.rt-SidebarMenuShortcut, .rt-SidebarMenuBadge)) {
1302
- /* Use base menu padding tokens */
1303
- :where(.rt-SidebarContent.rt-r-size-1) & {
1304
- padding-right: var(--base-menu-item-padding-y); /* Matches top/bottom padding */
1305
- }
1306
-
1307
- :where(.rt-SidebarContent.rt-r-size-2) & {
1308
- padding-right: var(--base-menu-item-padding-y); /* Matches top/bottom padding */
1309
- }
1310
- }
1311
-
1312
- .rt-SidebarMenuShortcut {
1313
- display: flex;
1314
- align-items: center;
1315
- margin-left: auto;
1316
- padding-left: var(--space-4);
1317
- color: var(--gray-a11);
1318
- }
1319
-
1320
- .rt-SidebarMenuBadge {
1321
- display: flex;
1322
- align-items: center;
1323
- margin-left: auto;
1324
- padding-left: var(--space-2);
1325
870
  }