@dashadmin/dash-styles 1.3.72 → 1.3.74-srcfree.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.
Files changed (57) hide show
  1. package/dist/helpers/getAllCssVariablesFromStyleSheets.d.ts +2 -0
  2. package/dist/index.d.ts +6 -9
  3. package/package.json +5 -5
  4. package/src/assets/fonts/Montserrat-Black.ttf +0 -0
  5. package/src/assets/fonts/Montserrat-Bold.ttf +0 -0
  6. package/src/assets/fonts/Montserrat-Medium.ttf +0 -0
  7. package/src/assets/fonts/Montserrat-Regular.ttf +0 -0
  8. package/src/assets/fonts/Montserrat-SemiBold.ttf +0 -0
  9. package/src/dash-css-transformer.less +0 -769
  10. package/src/dash-variables.less +0 -10
  11. package/src/dash.less +0 -38
  12. package/src/helpers/getAllCssVariablesFromStyleSheets.tsx +0 -46
  13. package/src/index.tsx +0 -1089
  14. package/src/index.tsx.suffixed +0 -680
  15. package/src/styles/button.less +0 -120
  16. package/src/styles/buttons.less +0 -10
  17. package/src/styles/card.less +0 -361
  18. package/src/styles/common.less +0 -62
  19. package/src/styles/components/notfound.less +0 -50
  20. package/src/styles/extra.less +0 -25
  21. package/src/styles/filters.less +0 -7
  22. package/src/styles/forms.less +0 -41
  23. package/src/styles/framed.less +0 -45
  24. package/src/styles/header.less +0 -882
  25. package/src/styles/input.copy.less +0 -223
  26. package/src/styles/input.less +0 -223
  27. package/src/styles/layout.less +0 -298
  28. package/src/styles/links.less +0 -28
  29. package/src/styles/loader.less +0 -20
  30. package/src/styles/login.less +0 -331
  31. package/src/styles/modal.less +0 -127
  32. package/src/styles/module.less +0 -29
  33. package/src/styles/mui-overrides.less +0 -62
  34. package/src/styles/notification.less +0 -46
  35. package/src/styles/pages/profile.less +0 -139
  36. package/src/styles/pagination.less +0 -90
  37. package/src/styles/popover.less +0 -21
  38. package/src/styles/react-admin/common.less +0 -184
  39. package/src/styles/react-admin/toolbar.less +0 -22
  40. package/src/styles/root.less +0 -13
  41. package/src/styles/sidebar.less +0 -1015
  42. package/src/styles/splash.less +0 -44
  43. package/src/styles/static.less +0 -59
  44. package/src/styles/stats.less +0 -5
  45. package/src/styles/svg.less +0 -30
  46. package/src/styles/switch.less +0 -7
  47. package/src/styles/table.less +0 -196
  48. package/src/styles/tabs.less +0 -181
  49. package/src/styles/tags.less +0 -97
  50. package/src/styles/toast.less +0 -83
  51. package/src/styles/toolbar.less +0 -90
  52. package/src/styles/transition.less +0 -226
  53. package/src/styles/uploader.less +0 -38
  54. package/src/variables/breakpoints.less +0 -35
  55. package/src/variables/colors.less +0 -205
  56. package/src/variables/dash-colors.less +0 -52
  57. package/src/variables/sizes.less +0 -150
@@ -1,1015 +0,0 @@
1
- .expanded.small, .collapsed.large, .collapsed.small {
2
- .sidebar-drawer .MuiDrawer-paper {
3
- width: var(--sidebar-small-width);
4
- transition: width 225ms cubic-bezier(0.4, 0, 0.6, 1) 0ms;
5
- overflow-x: hidden;
6
- }
7
- }
8
-
9
- .expanded.large {
10
- .sidebar-drawer .MuiDrawer-paper {
11
- width: var(--sidebar-large-width);
12
- transition: width 195ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
13
- overflow-x: hidden;
14
- }
15
- }
16
-
17
- // Alternative approach - add transitions to all drawer papers
18
- .sidebar-drawer .MuiDrawer-paper {
19
- transition: width 225ms cubic-bezier(0.4, 0, 0.6, 1) 0ms;
20
- overflow-x: hidden;
21
- }
22
-
23
- // Specific timing for expanding (faster)
24
- .expanded.large .sidebar-drawer .MuiDrawer-paper {
25
- transition: width 195ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
26
- }
27
-
28
- // Specific timing for collapsing (slower)
29
- .collapsed .sidebar-drawer .MuiDrawer-paper,
30
- .expanded.small .sidebar-drawer .MuiDrawer-paper {
31
- transition: width 225ms cubic-bezier(0.4, 0, 0.6, 1) 0ms;
32
- }
33
-
34
- .dash-menu-actions {
35
- display: flex;
36
- align-self: anchor-center;
37
- flex-direction: row;
38
- }
39
-
40
- .expanded.large .dash-menu-user {
41
- position: relative;
42
- display: flex;
43
- justify-content: center;
44
- margin-top: -30px;
45
-
46
- .dash-menu-actions {
47
- display: flex;
48
- align-self: anchor-center;
49
- flex-direction: row;
50
- justify-content: flex-end;
51
- width: 200px;
52
- position:absolute;
53
- bottom:0px;
54
- gap:5px;
55
- }
56
- .dash-user-avatar {
57
- .MuiAvatar-root{
58
- width: 200px;
59
- height: 200px;
60
- background-color: var(--primary-color);
61
- }
62
- }
63
- }
64
-
65
- .collapsed .dash-menu-user, .small .dash-menu-user {
66
- position: relative;
67
- display: flex;
68
- justify-content: center;
69
- flex-direction: column;
70
- align-items: center;
71
- gap:8px;
72
-
73
- .dash-menu-actions {
74
- align-self: anchor-center;
75
-
76
- display: flex;
77
- flex-direction: column;
78
- justify-content: center;
79
- gap:8px;
80
- align-items: center;
81
- }
82
- .dash-user-avatar {
83
-
84
- .MuiAvatar-root{
85
- width: 50px;
86
- height: 50px;
87
- background-color: var(--primary-color);
88
- }
89
- }
90
- }
91
-
92
-
93
- .dash-icon-button {
94
- &-color {
95
- color: var(--highlight-color);
96
- svg {
97
- fill: var(--highlight-color);
98
- }
99
- &:hover {
100
- svg {
101
- fill: var(--highlight-color-contrast);
102
- }
103
- color: var(--highlight-color-contrast);
104
- }
105
- }
106
- &-bg {
107
- color: var(--text-color);
108
- background-color: var(--secondary-color);
109
- svg {
110
- fill: var(--text-color);
111
- }
112
- &:hover {
113
- color: var(--text-color);
114
- background-color: var(--highlight-color);
115
- svg {
116
- fill: var(--text-color);
117
- }
118
- }
119
- }
120
- }
121
-
122
-
123
-
124
- .dash-language-menu-portal {
125
- background: var(--module-bg);
126
-
127
- z-index: 9999;
128
- pointer-events: none;
129
-
130
- .dash-language-menu {
131
- background: var(--module-bg);
132
- color: var(--text-light);
133
- box-shadow: 0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12);
134
- border-radius: 4px;
135
- pointer-events: auto;
136
- display: none;
137
-
138
- &.show {
139
- display: block;
140
- animation: popIn 0.2s ease-out forwards;
141
- }
142
-
143
- &.hide {
144
- animation: popOut 0.2s ease-out forwards;
145
- }
146
-
147
- .dash-language-menu-item {
148
- &:hover {
149
- background-color: var(--component-hover-bg) !important;
150
- }
151
-
152
- &.selected {
153
- font-weight: 500;
154
- }
155
- }
156
- }
157
- }
158
-
159
- // This is the popover of the Avatar
160
- .dash-user-menu-portal {
161
- position: fixed;
162
- top: 0;
163
- left: 0;
164
- right: 0;
165
- bottom: 0;
166
- z-index: 9999;
167
- pointer-events: none;
168
-
169
- .dash-user-menu {
170
- pointer-events: auto;
171
- display: none;
172
-
173
- &.show {
174
- display: block;
175
- animation: popIn 0.2s ease-out forwards;
176
- }
177
-
178
- &.hide {
179
- animation: popOut 0.2s ease-out forwards;
180
- }
181
- }
182
- }
183
- .dash-user-menu {
184
- background-color: var(--module-bg);
185
- color: var(--text-light);
186
- box-shadow: 0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12);
187
- border-radius: 4px;
188
- min-width: 200px;
189
- padding: 8px 0;
190
-
191
- span,p {
192
- color: var(--text-light) !important;
193
- }
194
- svg {
195
- fill: var(--text-light) !important;
196
- }
197
-
198
- /*.dash-user-item {
199
- &:hover {
200
- background-color: var(--component-hover-bg) !important;
201
-
202
- .dash-user-icon {
203
- color: var(--highlight-color);
204
- svg {
205
- color: var(--highlight-color) !important;
206
- fill: var(--highlight-color) !important;
207
- }
208
- }
209
- }
210
-
211
- .dash-user-icon {
212
- display: flex;
213
- align-items: center;
214
- margin-right: 8px;
215
- color: var(--secondary-color);
216
- svg {
217
- color: var(--secondary-color) !important;
218
- fill: var(--secondary-color) !important;
219
- }
220
- }
221
- }*/
222
-
223
- .dash-user-name {
224
- font-weight: 500;
225
- border-bottom: 1px solid var(--border-color);
226
- margin-bottom: 8px;
227
- }
228
- }
229
-
230
- // ==========================================================================
231
- // DESIGN DECISION (2026-07-21): the sidebar/menu system always renders in
232
- // DARK mode colors, regardless of the app-wide light/dark toggle. This
233
- // mixin redefines the mode-agnostic base custom properties the sidebar
234
- // consumes, pinning each to its "--dark" suffixed value (which is always
235
- // statically defined by the transformer/app overrides — see
236
- // N4-Build-Toolchain design-system docs — so this does NOT depend on
237
- // updateDomCssVariables() having run, and is unaffected by the current
238
- // light/dark toggle state).
239
- //
240
- // TO MAKE THE SIDEBAR THEME-AWARE AGAIN IN THE FUTURE: delete the two
241
- // ".sidebar-force-dark-vars();" calls below (one in .sidebar-drawer, one in
242
- // .sidebar-collapsed-menu — the flyout portal renders outside .sidebar-drawer
243
- // in the DOM, so it needs its own copy). Or change every "--dark" here to
244
- // "--light", or replace the hardcoded suffix with a LESS variable if
245
- // per-tenant/per-app switching is needed later.
246
- // ==========================================================================
247
- .sidebar-force-dark-vars() {
248
- --primary-color: var(--primary-color--dark);
249
- --primary-contrast: var(--primary-contrast--dark);
250
- --highlight-color: var(--highlight-color--dark);
251
- --highlight-color-contrast: var(--highlight-color-contrast--dark);
252
- --btn-bg: var(--btn-bg--dark);
253
- --btn-color: var(--btn-color--dark);
254
- --sidebar-primary: var(--sidebar-primary--dark);
255
- --sidebar-bg-primary: var(--sidebar-bg-primary--dark);
256
- --sidebar-handle-primary: var(--sidebar-handle-primary--dark);
257
- --sidebar-handle-contrast: var(--sidebar-handle-contrast--dark);
258
- --sidebar_submenu-color-primary: var(--sidebar_submenu-color-primary--dark);
259
- --sidebar_submenu-color-contrast: var(--sidebar_submenu-color-contrast--dark);
260
- }
261
-
262
- // Truncate any overflowing item label with an ellipsis instead of letting it
263
- // clip abruptly or push the layout wider. Requires min-width: 0 on the flex
264
- // item (MuiListItemText) — flex children default to min-width: auto (their
265
- // own content size), which blocks shrinking/ellipsis entirely otherwise.
266
- .dash-sidebar-text-ellipsis() {
267
- overflow: hidden;
268
- text-overflow: ellipsis;
269
- white-space: nowrap;
270
- min-width: 0;
271
- }
272
-
273
-
274
- .sidebar-drawer {
275
- .sidebar-force-dark-vars();
276
- z-index: 2000;
277
-
278
- .MuiListItemButton-root {
279
- min-width: 0;
280
- }
281
- .MuiListItemText-root {
282
- .dash-sidebar-text-ellipsis();
283
- .MuiTypography-root {
284
- .dash-sidebar-text-ellipsis();
285
- }
286
- }
287
-
288
- > .MuiPaper-root.MuiDrawer-paper{
289
- // Solid base layer: guarantees the sidebar is always primary-color even in
290
- // the rare case the gradient below fails to resolve (e.g. a var is unset).
291
- background-color: var(--primary-color);
292
- // Brand gradient (always primary-color -> primary-contrast, both modes) with
293
- // a subtle top-left sheen layered on top for depth. The sheen is a pure
294
- // white-alpha overlay — it never introduces a third brand color.
295
- background-image:
296
- radial-gradient(130% 110% at 0% 0%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%),
297
- linear-gradient(160deg, var(--primary-color) 0%, var(--primary-color) 45%, var(--primary-contrast) 100%);
298
- background-repeat: no-repeat;
299
-
300
- flex-shrink: 0;
301
- white-space: nowrap;
302
- box-sizing: border-box;
303
- border-radius: 0px 20px 20px 0px;
304
- box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;
305
- }
306
- /*.sidebar-header{
307
- width: 100%;
308
- padding: 10px;
309
- }*/
310
- .sidebar-logo{
311
- display: block;
312
- height: 50px;
313
- margin: 10px auto;
314
- > img{
315
- width: 100%;
316
- height: 100%;
317
- object-fit: contain;
318
- }
319
- }
320
- /*dark & .sidebar-logo{
321
- > img{
322
- filter: brightness(0) invert(1);
323
- }
324
- }*/
325
-
326
-
327
-
328
- .sidebar-list {
329
- display: flex;
330
- flex-direction: column;
331
- overflow-y: auto;
332
- &::-webkit-scrollbar {
333
- width: 5px;
334
- }
335
- &::-webkit-scrollbar-track {
336
- background: transparent;
337
- }
338
- &::-webkit-scrollbar-thumb {
339
- background: var(--sidebar-handle-primary);
340
- border-radius: 5px;
341
- }
342
- &::-webkit-scrollbar-thumb:hover {
343
- background: var(--sidebar-handle-contrast);
344
- }
345
-
346
-
347
-
348
- .MuiButtonBase-root.MuiListItemButton-root{
349
- //color: var(--sidebar-primary);
350
- background-color: var(--sidebar-bg-primary);
351
- display: flex;
352
- align-items: center;
353
- min-height: auto;
354
- padding: 8px 16px 8px 8px;
355
-
356
- // No row-level background on hover/active — the highlight design lives
357
- // on the icon tile only (see .MuiListItemIcon-root hover/selected below).
358
-
359
- // Main button icons sit on a solid rounded tile (design-system default 8px)
360
- .MuiListItemIcon-root{
361
- width: 32px;
362
- height: 32px;
363
- margin: 0 10px 0 8px;
364
- min-width: auto;
365
- border-radius: 8px;
366
- background-color: var(--primary-contrast);
367
- color: var(--sidebar-primary);
368
- display: grid;
369
- place-items: center;
370
- flex-shrink: 0;
371
-
372
- svg{
373
- width: 18px;
374
- height: 18px;
375
- object-fit: contain;
376
- // Force icons to inherit the tile's text color instead of
377
- // whatever fill is hardcoded in the icon's own SVG source —
378
- // this is what actually makes icons white in dark mode
379
- // (--sidebar-primary is white by design-system default).
380
- fill: currentColor !important;
381
- color: currentColor;
382
- path, circle, rect, polygon {
383
- fill: currentColor !important;
384
- }
385
- }
386
- }
387
-
388
- // Hover/active design lives entirely on the icon tile, no row background.
389
- // Hover: highlight color. Current/selected page: the primary-button color,
390
- // so "you are here" reads distinctly from a passive mouse hover.
391
- &:hover .MuiListItemIcon-root {
392
- background-color: var(--highlight-color);
393
- color: var(--highlight-color-contrast);
394
- }
395
- &.Mui-selected .MuiListItemIcon-root {
396
- background-color: var(--btn-bg);
397
- color: var(--btn-color);
398
- }
399
-
400
- // Group expand/collapse arrow: small circle in the primary-button color
401
- .expand-icon-wrapper {
402
- width: 16px;
403
- height: 16px;
404
- border-radius: 50%;
405
- // Same color pair the primary button uses.
406
- background-color: var(--btn-bg);
407
- color: var(--btn-color);
408
- display: flex;
409
- align-items: center;
410
- justify-content: center;
411
- flex-shrink: 0;
412
- cursor: pointer;
413
- transition: background-color 0.15s ease, transform 0.15s ease;
414
-
415
- &:hover {
416
- transform: scale(1.08);
417
- }
418
-
419
- .expand-icon {
420
- width: 11px;
421
- height: 11px;
422
- fill: currentColor !important;
423
- path {
424
- fill: currentColor !important;
425
- }
426
- }
427
- }
428
-
429
- .MuiListItemText-root{
430
- margin: 0;
431
- .MuiTypography-root{
432
- font-family: 'Montserrat';
433
- font-style: normal;
434
- font-weight: 500;
435
- font-size: 14px;
436
- line-height: 22px;
437
- }
438
- }
439
- }
440
-
441
- // Inline (expanded-sidebar) nested submenu: solid card-like panel on the
442
- // brand contrast color, styled after the design-system reference menu —
443
- // opaque surface, hairline border, soft shadow, inner padding. Text is
444
- // white by default in both modes (primary-contrast is dark by contract);
445
- // override via --submenu-color if a domain ships a light contrast.
446
- .MuiCollapse-root {
447
- margin: 0 8px 6px;
448
- }
449
- .MuiCollapse-wrapper{
450
- background-color: var(--primary-contrast);
451
- border: 1px solid rgba(255, 255, 255, 0.08);
452
- border-radius: 12px;
453
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
454
- overflow: hidden;
455
- padding: 6px;
456
-
457
- .MuiButtonBase-root.MuiListItemButton-root{
458
- border-radius: 8px;
459
- margin-bottom: 2px;
460
- color: var(--submenu-color, #ffffff);
461
-
462
- &:last-child {
463
- margin-bottom: 0;
464
- }
465
-
466
- // Nested items use plain small icons (no tile), like the reference
467
- .MuiListItemIcon-root {
468
- width: 18px;
469
- height: 18px;
470
- background-color: transparent;
471
- border-radius: 0;
472
- margin: 0 10px 0 12px;
473
-
474
- svg {
475
- fill: currentColor !important;
476
- path, circle, rect, polygon {
477
- fill: currentColor !important;
478
- }
479
- }
480
- }
481
-
482
- .MuiListItemIcon-root,
483
- .MuiListItemText-root .MuiTypography-root {
484
- color: var(--submenu-color, #ffffff);
485
- }
486
-
487
- // Nested items have no icon tile (unlike top-level buttons) — the row
488
- // itself carries the color. Hover uses the highlight color; the
489
- // current/selected page uses the primary-button color instead, so
490
- // "you are here" reads distinctly from a passive mouse hover.
491
- // The explicit "background-color: transparent" on .MuiListItemIcon-root
492
- // in both states is required: without it, the broader top-level
493
- // ".MuiButtonBase-root:hover .MuiListItemIcon-root" tile rule (higher
494
- // specificity via the extra .sidebar-drawer/:hover ancestor) leaks in
495
- // here and paints an unwanted tile background — nested items never
496
- // have a tile.
497
- &:hover {
498
- background-color: var(--highlight-color);
499
- .MuiListItemIcon-root,
500
- .MuiListItemText-root .MuiTypography-root {
501
- color: var(--highlight-color-contrast);
502
- }
503
- .MuiListItemIcon-root {
504
- background-color: transparent;
505
- }
506
- }
507
- &.Mui-selected {
508
- background-color: var(--btn-bg);
509
- .MuiListItemIcon-root,
510
- .MuiListItemText-root .MuiTypography-root {
511
- color: var(--btn-color);
512
- }
513
- .MuiListItemIcon-root {
514
- background-color: transparent;
515
- }
516
- }
517
-
518
- span.RaMenuItemLink-icon {
519
- border-radius: 5px;
520
- padding: 3px;
521
- background-color: var(--sidebar-bg-primary);
522
- width: 18px;
523
- height: 18px;
524
- display: inline-grid;
525
- margin-right: 3px;
526
- }
527
- span.RaMenuItemLink-icon .MuiSvgIcon-root {
528
- width: 12px;
529
- height: 12px;
530
- }
531
- a.RaMenuItemLink-active{
532
- background-color: var(--highlight-color);
533
- color: var(--highlight-color-contrast);
534
- }
535
- }
536
- }
537
- }
538
-
539
- &.large.expanded {
540
- .sidebar-logo{
541
- width: 100%;
542
- }
543
- .sidebar-list{
544
- .MuiButtonBase-root.MuiListItemButton-root{
545
- a{
546
- display: block;
547
- width: 100%;
548
- padding: 9px 17.55px 9px 15.15px;
549
- }
550
- }
551
- }
552
- }
553
-
554
- &.small.collapsed, &.large.collapsed {
555
- .sidebar-logo{
556
- display: block;
557
- height: 60px;
558
- margin: 0 auto 8px;
559
- > img{
560
- width: 100%;
561
- height: 100%;
562
- object-fit: contain;
563
- }
564
- }
565
-
566
- .sidebar-list{
567
- .MuiButtonBase-root.MuiListItemButton-root{
568
- // Symmetric, tighter padding + centered content so the icon tile
569
- // lines up on the same horizontal axis as the circular buttons
570
- // above it (Avatar/bell/globe/theme toggle), which are simple
571
- // centered flex items with no manual offset.
572
- padding: 8px;
573
- justify-content: center;
574
- position: relative;
575
- &::before{
576
- content: "";
577
- display: block;
578
- position: absolute;
579
- width: 32px;
580
- height: 0px;
581
- bottom: 0;
582
- left: 50%;
583
- transform: translateX(-50%);
584
- border-bottom: 0.5px solid rgba(255, 255, 255, 0.2);
585
- pointer-events: none;
586
- }
587
- }
588
- .MuiListItemIcon-root{
589
- // No auto-margin here — centering comes from the row's own
590
- // justify-content: center (above) plus a symmetric tile margin.
591
- margin: 0 !important;
592
- }
593
-
594
- // No row-level background here — hover/selected styling for main sidebar
595
- // rows lives entirely on the icon tile (see the icon-tile hover/selected
596
- // rules earlier in this file). This legacy rule duplicated/conflicted
597
- // with that by painting a highlight-color row background specifically
598
- // in collapsed mode.
599
- }
600
- }
601
- }
602
-
603
- .sidebar-drawer .sidebar-list-sub .MuiListItemButton-root {
604
- .MuiListItemIcon-root{
605
- margin-left: 25px !important;
606
- }
607
- }
608
-
609
- .sidebar-collapsed-menu {
610
- // Renders in a portal outside .sidebar-drawer, so it needs its own copy
611
- // of the ellipsis treatment (can't inherit a rule scoped to .sidebar-drawer).
612
- .MuiListItemButton-root {
613
- min-width: 0;
614
- }
615
- .MuiListItemText-root {
616
- .dash-sidebar-text-ellipsis();
617
- .MuiTypography-root {
618
- .dash-sidebar-text-ellipsis();
619
- }
620
- }
621
-
622
- .menu-items {
623
- position: relative;
624
- font-size: 14px;
625
- }
626
-
627
- .menu-items a {
628
- display: block;
629
- font-size: inherit;
630
- color: inherit;
631
- text-decoration: none;
632
- }
633
-
634
- .menu-items button {
635
- display: flex;
636
- align-items: center;
637
- color: inherit;
638
- font-size: inherit;
639
- border: none;
640
- background-color: transparent;
641
- cursor: pointer;
642
- width: 100%;
643
- }
644
-
645
- button span {
646
- margin-left: 3px;
647
- }
648
-
649
- .menu-items > a, .menu-items button {
650
- text-align: left;
651
- padding: 0.7rem 1rem;
652
- }
653
-
654
- .arrow::after {
655
- content: "";
656
- display: inline-block;
657
- margin-left: 0.28em;
658
- vertical-align: 0.09em;
659
- border-top: 0.42em solid;
660
- border-right: 0.32em solid transparent;
661
- border-left: 0.32em solid transparent;
662
- }
663
-
664
- .dropdown {
665
- // NOT position:fixed — the SubmenuPortal WRAPPER (inline style, dash-admin)
666
- // is the one that's position:fixed with calculated top/left. If this <ul>
667
- // is ALSO fixed (with no top/left of its own), it's pulled out of the
668
- // wrapper's flow independently and renders at its default position —
669
- // the wrapper then collapses to an empty box since its only child no
670
- // longer participates in flow. This was the "wrapper not showing" bug.
671
- position: static;
672
- width: 100%;
673
- box-sizing: border-box;
674
- // Panel visuals (surface, border, shadow, radius, padding) are owned by
675
- // the SubmenuPortal wrapper (inline style in dash-admin) — this list must
676
- // stay transparent, or the two stacked borders/backgrounds render as a
677
- // seam line along the top edge of the flyout.
678
- font-size: 0.875rem;
679
- z-index: 9999;
680
- min-width: 12rem;
681
- list-style: none;
682
- background: transparent;
683
- display: none;
684
-
685
- // Flyout lives in a portal on <body> (outside .sidebar-drawer), so item
686
- // styling must be self-contained here. The panel surface is the brand
687
- // primary-contrast (dark by design-system contract), so text/icons are
688
- // white by default in BOTH modes — override via --submenu-color if a
689
- // domain ever ships a light primary-contrast.
690
- .MuiButtonBase-root.MuiListItemButton-root {
691
- border-radius: 8px;
692
- margin-bottom: 2px;
693
- padding: 8px 14px 8px 8px;
694
- transition: background-color 0.15s ease, color 0.15s ease;
695
- color: var(--submenu-color, #ffffff);
696
-
697
- &:last-child {
698
- margin-bottom: 0;
699
- }
700
-
701
- // Portal renders outside .sidebar-drawer, so icon sizing must be
702
- // repeated here (the drawer-scoped rules never reach this subtree).
703
- .MuiListItemIcon-root {
704
- min-width: auto;
705
- width: 18px;
706
- height: 18px;
707
- margin-right: 10px;
708
-
709
- svg {
710
- width: 100%;
711
- height: 100%;
712
- object-fit: contain;
713
- fill: currentColor !important;
714
- path, circle, rect, polygon {
715
- fill: currentColor !important;
716
- }
717
- }
718
- }
719
-
720
- .MuiListItemIcon-root,
721
- .MuiListItemText-root .MuiTypography-root {
722
- color: var(--submenu-color, #ffffff);
723
- }
724
-
725
- // Hover uses the highlight color; the current/selected page uses the
726
- // primary-button color instead, so "you are here" reads distinctly
727
- // from a passive mouse hover.
728
- &:hover {
729
- background-color: var(--highlight-color);
730
- color: var(--highlight-color-contrast);
731
- .MuiListItemIcon-root,
732
- .MuiListItemText-root .MuiTypography-root {
733
- color: var(--highlight-color-contrast);
734
- }
735
- }
736
- &.Mui-selected {
737
- background-color: var(--btn-bg);
738
- color: var(--btn-color);
739
- .MuiListItemIcon-root,
740
- .MuiListItemText-root .MuiTypography-root {
741
- color: var(--btn-color);
742
- }
743
- }
744
- }
745
- }
746
-
747
- .dropdown.show {
748
- display: block;
749
- }
750
-
751
- .dropdown .dropdown-submenu {
752
- position: absolute;
753
- left: 100%;
754
- top: -7px;
755
- }
756
- }
757
-
758
- .sidebar-list, .dropdown {
759
- > .MuiButtonBase-root {
760
- border-radius: 0.5rem;
761
- transition: background-color 0.15s ease, color 0.15s ease;
762
- margin-bottom: 2px;
763
-
764
- &:last-child {
765
- margin-bottom: 0;
766
- }
767
-
768
- > .MuiListItemIcon-root,
769
- > .MuiListItemText-root .MuiTypography-root {
770
- color: var(--sidebar-primary);
771
- transition: color 0.15s ease;
772
- }
773
- }
774
- }
775
-
776
- // Flyout rows only: full-row highlight on hover/active. Main sidebar (.sidebar-list)
777
- // rows deliberately have NO row-level highlight — that design lives on the icon
778
- // tile instead (see .MuiListItemIcon-root hover/selected above). Flyout items have
779
- // no icon tile, so the row itself carries the highlight, matching the reference.
780
- .dropdown > .MuiButtonBase-root {
781
- // Hover uses the highlight color; the current/selected page uses the
782
- // primary-button color instead, so "you are here" reads distinctly
783
- // from a passive mouse hover.
784
- &:hover {
785
- background-color: var(--highlight-color);
786
- color: var(--highlight-color-contrast);
787
- .MuiListItemIcon-root,
788
- .MuiListItemText-root .MuiTypography-root {
789
- color: var(--highlight-color-contrast);
790
- }
791
- }
792
- &.Mui-selected {
793
- background-color: var(--btn-bg);
794
- color: var(--btn-color);
795
- .MuiListItemIcon-root,
796
- .MuiListItemText-root .MuiTypography-root {
797
- color: var(--btn-color);
798
- }
799
- }
800
- }
801
-
802
- // Restored as an explicit sibling selector (was previously "&-sub" nested inside
803
- // ".sidebar-list, .dropdown" — splitting that block apart for the icon-tile-hover
804
- // change above meant "&-sub" would have compiled to the wrong, broken selector
805
- // ".dropdown > .MuiButtonBase-root-sub" instead of ".sidebar-list-sub, .dropdown-sub".
806
- .sidebar-list-sub, .dropdown-sub {
807
- .MuiButtonBase-root {
808
- .MuiListItemIcon-root {
809
- color: var(--sidebar_submenu-color-primary);
810
- }
811
- .MuiListItemText-root .MuiTypography-root {
812
- color: var(--sidebar_submenu-color-primary);
813
- }
814
- &:hover {
815
- .MuiListItemText-root .MuiTypography-root,
816
- .MuiListItemIcon-root {
817
- color: var(--sidebar_submenu-color-contrast);
818
- }
819
- }
820
- }
821
- }
822
-
823
- // ============================================================================
824
- // SIDEBAR POSITION VARIANTS
825
- // ============================================================================
826
-
827
- .dash-app-layout {
828
- // Default left position (inherits existing styles)
829
- &.sidebar-position-left {
830
- flex-direction: row;
831
-
832
- .sidebar-drawer .MuiDrawer-paper {
833
- border-radius: 0px 20px 20px 0px;
834
- }
835
- }
836
-
837
- // Right position
838
- &.sidebar-position-right {
839
- flex-direction: row-reverse;
840
-
841
- .sidebar-drawer .MuiDrawer-paper {
842
- border-radius: 20px 0px 0px 20px;
843
- }
844
- }
845
-
846
- // Top position - horizontal nav bar
847
- &.sidebar-position-top {
848
- flex-direction: column;
849
-
850
-
851
-
852
- .sidebar-drawer {
853
- width: 100% !important;
854
-
855
- .MuiDrawer-paper {
856
- width: 100% !important;
857
- height: var(--sidebar-horizontal-height, 64px);
858
- max-height: 120px;
859
- border-radius: 0px 0px 20px 20px;
860
- display: flex !important;
861
- flex-direction: row !important;
862
- align-items: center !important;
863
- overflow-x: auto;
864
- overflow-y: hidden;
865
- }
866
-
867
- .sidebar-header {
868
- display: flex !important;
869
- flex-direction: row !important;
870
- align-items: center !important;
871
- width: auto;
872
- min-width: auto;
873
- padding: 0px;
874
- flex-shrink: 0;
875
- }
876
-
877
- .dash-layout-sider-scrollbar {
878
- display: flex !important;
879
- flex-direction: row !important;
880
- overflow-x: auto !important;
881
- overflow-y: hidden !important;
882
- flex: 1;
883
-
884
- /* Move scrollbar to top by rotating the container */
885
- transform: rotateX(180deg);
886
-
887
- > div, > * {
888
- display: flex !important;
889
- flex-direction: row !important;
890
- /* Rotate content back to appear normal */
891
- transform: rotateX(180deg);
892
- }
893
- }
894
-
895
- .sidebar-list,
896
- .sidebar-list.sidebar-collapsed-menu {
897
- display: flex !important;
898
- flex-direction: row !important;
899
- flex-wrap: nowrap !important;
900
- align-items: center;
901
- padding: 0;
902
- margin: 0;
903
-
904
- > .MuiButtonBase-root,
905
- > .MuiListItemButton-root,
906
- > .menu-items,
907
- > li {
908
- flex-shrink: 0;
909
- white-space: nowrap;
910
- }
911
- }
912
- }
913
-
914
- .dash-app-layout-content {
915
- flex: 1;
916
- height: auto;
917
- overflow: auto;
918
- }
919
- }
920
-
921
- // Bottom position
922
- &.sidebar-position-bottom {
923
- flex-direction: column-reverse;
924
-
925
- .sidebar-drawer {
926
- width: 100% !important;
927
-
928
- .MuiDrawer-paper {
929
- width: 100% !important;
930
- height: auto !important;
931
- max-height: 120px;
932
- border-radius: 20px 20px 0px 0px;
933
- display: flex !important;
934
- flex-direction: row !important;
935
- align-items: center !important;
936
- overflow-x: auto;
937
- overflow-y: hidden;
938
- }
939
-
940
- .sidebar-header {
941
- display: flex !important;
942
- flex-direction: row !important;
943
- align-items: center !important;
944
- width: auto;
945
- min-width: auto;
946
- //padding: 10px;
947
- flex-shrink: 0;
948
- }
949
-
950
- .dash-layout-sider-scrollbar {
951
- display: flex !important;
952
- flex-direction: row !important;
953
- overflow-x: auto !important;
954
- overflow-y: hidden !important;
955
- flex: 1;
956
-
957
- > div {
958
- display: flex !important;
959
- flex-direction: row !important;
960
- }
961
- }
962
-
963
- .sidebar-list,
964
- .sidebar-list.sidebar-collapsed-menu {
965
- display: flex !important;
966
- flex-direction: row !important;
967
- flex-wrap: nowrap !important;
968
- align-items: center;
969
- padding: 0;
970
- margin: 0;
971
-
972
- > .MuiButtonBase-root,
973
- > .MuiListItemButton-root,
974
- > .menu-items,
975
- > li {
976
- flex-shrink: 0;
977
- white-space: nowrap;
978
- }
979
- }
980
- }
981
-
982
- .dash-app-layout-content {
983
- flex: 1;
984
- height: auto;
985
- overflow: auto;
986
- }
987
- }
988
- }
989
-
990
- // Horizontal mode styles for scrollbar and menu
991
- .horizontal-mode {
992
- display: flex !important;
993
- flex-direction: row !important;
994
- overflow-x: auto !important;
995
- overflow-y: hidden !important;
996
- flex: 1;
997
- height: 100%;
998
-
999
- > div,
1000
- > nav,
1001
- > ul,
1002
- .sidebar-list,
1003
- .sidebar-collapsed-menu {
1004
- display: flex !important;
1005
- flex-direction: row !important;
1006
- flex-wrap: nowrap !important;
1007
- align-items: center !important;
1008
- }
1009
-
1010
- .MuiList-root,
1011
- .MuiButtonBase-root {
1012
- flex-shrink: 0 !important;
1013
- white-space: nowrap !important;
1014
- }
1015
- }