mithril-materialized 3.5.3 → 3.5.5

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/dist/advanced.css CHANGED
@@ -866,6 +866,8 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
866
866
  backface-visibility: hidden;
867
867
  transform: translateX(-105%);
868
868
  transition: transform 0.3s ease, left 0.3s ease, right 0.3s ease;
869
+ display: flex;
870
+ flex-direction: column;
869
871
  }
870
872
  .sidenav.sidenav-left {
871
873
  left: 0;
@@ -911,13 +913,17 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
911
913
  background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
912
914
  }
913
915
  .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
914
- color: var(--mm-nav-active-text, #fff);
916
+ color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
915
917
  display: block;
916
918
  font-size: 14px;
917
919
  font-weight: 500;
918
920
  height: 48px;
919
921
  line-height: 48px;
920
922
  padding: 0 32px;
923
+ user-select: none;
924
+ -webkit-user-select: none;
925
+ -moz-user-select: none;
926
+ -ms-user-select: none;
921
927
  }
922
928
  .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > [class^=mdi-], .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) li > a > [class*=mdi-], .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
923
929
  float: left;
@@ -928,6 +934,13 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
928
934
  color: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
929
935
  user-select: none;
930
936
  }
937
+ .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
938
+ color: var(--mm-nav-active-text, #fff);
939
+ background-color: var(--mm-primary-color, #26a69a);
940
+ }
941
+ .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
942
+ color: var(--mm-nav-active-text, #fff);
943
+ }
931
944
  .sidenav li > .btn, .sidenav li > .btn-large, .sidenav li > .btn-flat, .sidenav li > .btn-floating {
932
945
  margin: 10px 32px;
933
946
  }
@@ -1119,13 +1132,23 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1119
1132
  .sidenav-subitem {
1120
1133
  list-style: none;
1121
1134
  transition: background-color 0.2s ease;
1135
+ user-select: none;
1136
+ -webkit-user-select: none;
1137
+ -moz-user-select: none;
1138
+ -ms-user-select: none;
1122
1139
  }
1123
1140
  .sidenav-subitem:hover {
1124
1141
  background: var(--mm-border-color, rgba(0, 0, 0, 0.05));
1125
1142
  }
1143
+ .sidenav-subitem.selected {
1144
+ background-color: var(--mm-primary-color-light, rgba(38, 166, 154, 0.15));
1145
+ }
1126
1146
  .sidenav-subitem.selected svg {
1127
1147
  fill: var(--mm-primary-color, #26a69a);
1128
1148
  }
1149
+ .sidenav-subitem.selected i.material-icons {
1150
+ color: var(--mm-primary-color, #26a69a);
1151
+ }
1129
1152
  .sidenav-subitem svg {
1130
1153
  fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
1131
1154
  transition: fill 0.2s ease;
@@ -1158,20 +1181,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1158
1181
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
1159
1182
  }
1160
1183
  [data-theme=dark] .sidenav li.active {
1161
- background-color: rgba(255, 255, 255, 0.05);
1184
+ background-color: var(--mm-primary-color, #26a69a);
1162
1185
  }
1163
1186
  [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
1164
- color: var(--mm-nav-active-text, #fff);
1187
+ color: #000;
1165
1188
  }
1166
1189
  [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
1167
- color: var(--mm-nav-active-text, #fff);
1190
+ color: #000;
1168
1191
  }
1169
1192
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a {
1170
- color: var(--mm-nav-active-text, #fff);
1193
+ color: #000;
1171
1194
  }
1172
1195
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i,
1173
1196
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i.material-icons {
1174
- color: var(--mm-nav-active-text, #fff);
1197
+ color: #000;
1175
1198
  }
1176
1199
  [data-theme=dark] .sidenav .subheader {
1177
1200
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
@@ -1188,6 +1211,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1188
1211
  [data-theme=dark] .sidenav-subitem i.material-icons {
1189
1212
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
1190
1213
  }
1214
+ [data-theme=dark] .sidenav-subitem.selected {
1215
+ background-color: rgba(38, 166, 154, 0.2);
1216
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
1217
+ }
1218
+ [data-theme=dark] .sidenav-subitem.selected svg {
1219
+ fill: var(--mm-primary-color, #26a69a);
1220
+ }
1221
+ [data-theme=dark] .sidenav-subitem.selected i.material-icons {
1222
+ color: var(--mm-primary-color, #26a69a);
1223
+ }
1224
+
1225
+ .sidenav-footer-item {
1226
+ margin-top: auto;
1227
+ }
1191
1228
 
1192
1229
  .sidenav {
1193
1230
  transition: transform 0.3s ease, width 0.3s ease;
@@ -1375,6 +1412,23 @@ nav .input-field label.active i {
1375
1412
  height: 64px;
1376
1413
  }
1377
1414
  }
1415
+ [data-theme=dark] nav ul li.active {
1416
+ background-color: rgba(38, 166, 154, 0.2);
1417
+ }
1418
+ [data-theme=dark] nav ul li.active a {
1419
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
1420
+ }
1421
+ [data-theme=dark] nav ul li.active i, [data-theme=dark] nav ul li.active .material-icons {
1422
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
1423
+ }
1424
+
1425
+ nav ul li {
1426
+ user-select: none;
1427
+ -webkit-user-select: none;
1428
+ -moz-user-select: none;
1429
+ -ms-user-select: none;
1430
+ }
1431
+
1378
1432
  /*
1379
1433
  @license
1380
1434
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -1619,6 +1619,8 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1619
1619
  backface-visibility: hidden;
1620
1620
  transform: translateX(-105%);
1621
1621
  transition: transform 0.3s ease, left 0.3s ease, right 0.3s ease;
1622
+ display: flex;
1623
+ flex-direction: column;
1622
1624
  }
1623
1625
  .sidenav.sidenav-left {
1624
1626
  left: 0;
@@ -1664,13 +1666,17 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1664
1666
  background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
1665
1667
  }
1666
1668
  .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
1667
- color: var(--mm-nav-active-text, #fff);
1669
+ color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
1668
1670
  display: block;
1669
1671
  font-size: 14px;
1670
1672
  font-weight: 500;
1671
1673
  height: 48px;
1672
1674
  line-height: 48px;
1673
1675
  padding: 0 32px;
1676
+ user-select: none;
1677
+ -webkit-user-select: none;
1678
+ -moz-user-select: none;
1679
+ -ms-user-select: none;
1674
1680
  }
1675
1681
  .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > [class^=mdi-], .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) li > a > [class*=mdi-], .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
1676
1682
  float: left;
@@ -1681,6 +1687,13 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1681
1687
  color: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
1682
1688
  user-select: none;
1683
1689
  }
1690
+ .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
1691
+ color: var(--mm-nav-active-text, #fff);
1692
+ background-color: var(--mm-primary-color, #26a69a);
1693
+ }
1694
+ .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
1695
+ color: var(--mm-nav-active-text, #fff);
1696
+ }
1684
1697
  .sidenav li > .btn, .sidenav li > .btn-large, .sidenav li > .btn-flat, .sidenav li > .btn-floating {
1685
1698
  margin: 10px 32px;
1686
1699
  }
@@ -1872,13 +1885,23 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1872
1885
  .sidenav-subitem {
1873
1886
  list-style: none;
1874
1887
  transition: background-color 0.2s ease;
1888
+ user-select: none;
1889
+ -webkit-user-select: none;
1890
+ -moz-user-select: none;
1891
+ -ms-user-select: none;
1875
1892
  }
1876
1893
  .sidenav-subitem:hover {
1877
1894
  background: var(--mm-border-color, rgba(0, 0, 0, 0.05));
1878
1895
  }
1896
+ .sidenav-subitem.selected {
1897
+ background-color: var(--mm-primary-color-light, rgba(38, 166, 154, 0.15));
1898
+ }
1879
1899
  .sidenav-subitem.selected svg {
1880
1900
  fill: var(--mm-primary-color, #26a69a);
1881
1901
  }
1902
+ .sidenav-subitem.selected i.material-icons {
1903
+ color: var(--mm-primary-color, #26a69a);
1904
+ }
1882
1905
  .sidenav-subitem svg {
1883
1906
  fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
1884
1907
  transition: fill 0.2s ease;
@@ -1911,20 +1934,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1911
1934
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
1912
1935
  }
1913
1936
  [data-theme=dark] .sidenav li.active {
1914
- background-color: rgba(255, 255, 255, 0.05);
1937
+ background-color: var(--mm-primary-color, #26a69a);
1915
1938
  }
1916
1939
  [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
1917
- color: var(--mm-nav-active-text, #fff);
1940
+ color: #000;
1918
1941
  }
1919
1942
  [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
1920
- color: var(--mm-nav-active-text, #fff);
1943
+ color: #000;
1921
1944
  }
1922
1945
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a {
1923
- color: var(--mm-nav-active-text, #fff);
1946
+ color: #000;
1924
1947
  }
1925
1948
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i,
1926
1949
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i.material-icons {
1927
- color: var(--mm-nav-active-text, #fff);
1950
+ color: #000;
1928
1951
  }
1929
1952
  [data-theme=dark] .sidenav .subheader {
1930
1953
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
@@ -1941,6 +1964,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
1941
1964
  [data-theme=dark] .sidenav-subitem i.material-icons {
1942
1965
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
1943
1966
  }
1967
+ [data-theme=dark] .sidenav-subitem.selected {
1968
+ background-color: rgba(38, 166, 154, 0.2);
1969
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
1970
+ }
1971
+ [data-theme=dark] .sidenav-subitem.selected svg {
1972
+ fill: var(--mm-primary-color, #26a69a);
1973
+ }
1974
+ [data-theme=dark] .sidenav-subitem.selected i.material-icons {
1975
+ color: var(--mm-primary-color, #26a69a);
1976
+ }
1977
+
1978
+ .sidenav-footer-item {
1979
+ margin-top: auto;
1980
+ }
1944
1981
 
1945
1982
  .sidenav {
1946
1983
  transition: transform 0.3s ease, width 0.3s ease;
@@ -3117,7 +3154,7 @@ body {
3117
3154
  --mm-button-flat-text: var(--mm-primary-color);
3118
3155
  --mm-nav-background: #1e1e1e;
3119
3156
  --mm-nav-text: #ffffff;
3120
- --mm-nav-active-text: #000000;
3157
+ --mm-nav-active-text: #ffffff;
3121
3158
  --mm-modal-background: #2d2d2d;
3122
3159
  --mm-overlay-background: rgba(0, 0, 0, 0.8);
3123
3160
  --mm-shadow-color: rgba(0, 0, 0, 0.5);
package/dist/index.css CHANGED
@@ -79,7 +79,7 @@ body {
79
79
  --mm-button-flat-text: var(--mm-primary-color);
80
80
  --mm-nav-background: #1e1e1e;
81
81
  --mm-nav-text: #ffffff;
82
- --mm-nav-active-text: #000000;
82
+ --mm-nav-active-text: #ffffff;
83
83
  --mm-modal-background: #2d2d2d;
84
84
  --mm-overlay-background: rgba(0, 0, 0, 0.8);
85
85
  --mm-shadow-color: rgba(0, 0, 0, 0.5);
@@ -4370,6 +4370,23 @@ nav .input-field label.active i {
4370
4370
  height: 64px;
4371
4371
  }
4372
4372
  }
4373
+ [data-theme=dark] nav ul li.active {
4374
+ background-color: rgba(38, 166, 154, 0.2);
4375
+ }
4376
+ [data-theme=dark] nav ul li.active a {
4377
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
4378
+ }
4379
+ [data-theme=dark] nav ul li.active i, [data-theme=dark] nav ul li.active .material-icons {
4380
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
4381
+ }
4382
+
4383
+ nav ul li {
4384
+ user-select: none;
4385
+ -webkit-user-select: none;
4386
+ -moz-user-select: none;
4387
+ -ms-user-select: none;
4388
+ }
4389
+
4373
4390
  a {
4374
4391
  text-decoration: none;
4375
4392
  }
@@ -7714,6 +7731,8 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
7714
7731
  backface-visibility: hidden;
7715
7732
  transform: translateX(-105%);
7716
7733
  transition: transform 0.3s ease, left 0.3s ease, right 0.3s ease;
7734
+ display: flex;
7735
+ flex-direction: column;
7717
7736
  }
7718
7737
  .sidenav.sidenav-left {
7719
7738
  left: 0;
@@ -7759,13 +7778,17 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
7759
7778
  background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
7760
7779
  }
7761
7780
  .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
7762
- color: var(--mm-nav-active-text, #fff);
7781
+ color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
7763
7782
  display: block;
7764
7783
  font-size: 14px;
7765
7784
  font-weight: 500;
7766
7785
  height: 48px;
7767
7786
  line-height: 48px;
7768
7787
  padding: 0 32px;
7788
+ user-select: none;
7789
+ -webkit-user-select: none;
7790
+ -moz-user-select: none;
7791
+ -ms-user-select: none;
7769
7792
  }
7770
7793
  .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > [class^=mdi-], .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) li > a > [class*=mdi-], .sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
7771
7794
  float: left;
@@ -7778,6 +7801,13 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
7778
7801
  -moz-user-select: none;
7779
7802
  user-select: none;
7780
7803
  }
7804
+ .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
7805
+ color: var(--mm-nav-active-text, #fff);
7806
+ background-color: var(--mm-primary-color, #26a69a);
7807
+ }
7808
+ .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
7809
+ color: var(--mm-nav-active-text, #fff);
7810
+ }
7781
7811
  .sidenav li > .btn, .sidenav li > .btn-large, .sidenav li > .btn-flat, .sidenav li > .btn-floating {
7782
7812
  margin: 10px 32px;
7783
7813
  }
@@ -7969,13 +7999,23 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
7969
7999
  .sidenav-subitem {
7970
8000
  list-style: none;
7971
8001
  transition: background-color 0.2s ease;
8002
+ user-select: none;
8003
+ -webkit-user-select: none;
8004
+ -moz-user-select: none;
8005
+ -ms-user-select: none;
7972
8006
  }
7973
8007
  .sidenav-subitem:hover {
7974
8008
  background: var(--mm-border-color, rgba(0, 0, 0, 0.05));
7975
8009
  }
8010
+ .sidenav-subitem.selected {
8011
+ background-color: var(--mm-primary-color-light, rgba(38, 166, 154, 0.15));
8012
+ }
7976
8013
  .sidenav-subitem.selected svg {
7977
8014
  fill: var(--mm-primary-color, #26a69a);
7978
8015
  }
8016
+ .sidenav-subitem.selected i.material-icons {
8017
+ color: var(--mm-primary-color, #26a69a);
8018
+ }
7979
8019
  .sidenav-subitem svg {
7980
8020
  fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
7981
8021
  transition: fill 0.2s ease;
@@ -8008,20 +8048,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
8008
8048
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
8009
8049
  }
8010
8050
  [data-theme=dark] .sidenav li.active {
8011
- background-color: rgba(255, 255, 255, 0.05);
8051
+ background-color: var(--mm-primary-color, #26a69a);
8012
8052
  }
8013
8053
  [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
8014
- color: var(--mm-nav-active-text, #fff);
8054
+ color: #000;
8015
8055
  }
8016
8056
  [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i, [data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) > i.material-icons {
8017
- color: var(--mm-nav-active-text, #fff);
8057
+ color: #000;
8018
8058
  }
8019
8059
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a {
8020
- color: var(--mm-nav-active-text, #fff);
8060
+ color: #000;
8021
8061
  }
8022
8062
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i,
8023
8063
  [data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i.material-icons {
8024
- color: var(--mm-nav-active-text, #fff);
8064
+ color: #000;
8025
8065
  }
8026
8066
  [data-theme=dark] .sidenav .subheader {
8027
8067
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
@@ -8038,6 +8078,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
8038
8078
  [data-theme=dark] .sidenav-subitem i.material-icons {
8039
8079
  color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
8040
8080
  }
8081
+ [data-theme=dark] .sidenav-subitem.selected {
8082
+ background-color: rgba(38, 166, 154, 0.2);
8083
+ color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
8084
+ }
8085
+ [data-theme=dark] .sidenav-subitem.selected svg {
8086
+ fill: var(--mm-primary-color, #26a69a);
8087
+ }
8088
+ [data-theme=dark] .sidenav-subitem.selected i.material-icons {
8089
+ color: var(--mm-primary-color, #26a69a);
8090
+ }
8091
+
8092
+ .sidenav-footer-item {
8093
+ margin-top: auto;
8094
+ }
8041
8095
 
8042
8096
  .sidenav {
8043
8097
  transition: transform 0.3s ease, width 0.3s ease;
package/dist/index.esm.js CHANGED
@@ -7810,6 +7810,87 @@ const FileUpload = () => {
7810
7810
  };
7811
7811
  };
7812
7812
 
7813
+ // List of MaterialIcon SVG icons that are available
7814
+ const materialIconSvgNames = [
7815
+ 'caret',
7816
+ 'close',
7817
+ 'chevron',
7818
+ 'chevron_left',
7819
+ 'chevron_right',
7820
+ 'menu',
7821
+ 'expand',
7822
+ 'collapse',
7823
+ 'check',
7824
+ 'radio_checked',
7825
+ 'radio_unchecked',
7826
+ 'light_mode',
7827
+ 'dark_mode',
7828
+ ];
7829
+ /**
7830
+ * Helper function to render icons based on IconDefinition type
7831
+ */
7832
+ const renderIcon = (icon, style) => {
7833
+ if (!icon)
7834
+ return null;
7835
+ if (typeof icon === 'string') {
7836
+ // Check if this is a MaterialIcon SVG name
7837
+ if (materialIconSvgNames.includes(icon)) {
7838
+ return m(MaterialIcon, { name: icon, style });
7839
+ }
7840
+ // Fall back to Material Icons font for other icon names
7841
+ return m('i.material-icons', { style }, icon);
7842
+ }
7843
+ if (icon.type === 'svg') {
7844
+ // Inline SVG
7845
+ return m.trust(icon.content);
7846
+ }
7847
+ if (icon.type === 'image') {
7848
+ // Image URL
7849
+ return m('img', {
7850
+ src: icon.content,
7851
+ style: Object.assign(Object.assign({}, style), { width: '24px', height: '24px', objectFit: 'contain' }),
7852
+ });
7853
+ }
7854
+ return null;
7855
+ };
7856
+ /**
7857
+ * Sidenav Header/Footer Item Component
7858
+ */
7859
+ const SidenavHeaderFooterItem = () => {
7860
+ return {
7861
+ view: ({ attrs }) => {
7862
+ const { text, icon, onclick, href, className = '', _isExpanded = true, _position = 'left' } = attrs;
7863
+ const isRightAligned = _position === 'right';
7864
+ const handleClick = (e) => {
7865
+ if (onclick) {
7866
+ e.preventDefault();
7867
+ onclick(e);
7868
+ }
7869
+ };
7870
+ const content = isRightAligned
7871
+ ? [
7872
+ _isExpanded &&
7873
+ m('span.sidenav-item-text', { style: { flex: '1', 'text-align': 'left', 'margin-right': '8px' } }, text),
7874
+ renderIcon(icon, { 'min-width': '24px', width: '24px' }),
7875
+ ]
7876
+ : [
7877
+ renderIcon(icon, { 'min-width': '24px', width: '24px' }),
7878
+ _isExpanded && m('span.sidenav-item-text', { style: { 'margin-left': '8px', flex: '1' } }, text),
7879
+ ];
7880
+ const linkStyle = {
7881
+ display: 'flex',
7882
+ 'align-items': 'center',
7883
+ padding: _isExpanded ? '12px 16px' : '12px 18px',
7884
+ 'justify-content': _isExpanded ? (isRightAligned ? 'flex-end' : 'flex-start') : 'center',
7885
+ };
7886
+ return m('li', { class: className }, m('a', {
7887
+ href: href || '#!',
7888
+ onclick: handleClick,
7889
+ style: linkStyle,
7890
+ }, content));
7891
+ },
7892
+ };
7893
+ };
7813
7894
  /**
7814
7895
  * Sidenav Component
7815
7896
  * A responsive navigation drawer that slides in from the side
@@ -7932,6 +8013,9 @@ const Sidenav = () => {
7932
8013
  name: 'menu',
7933
8014
  style: { width: '24px', height: '24px' },
7934
8015
  })),
8016
+ // Header item (if provided, appears before expand/collapse toggle)
8017
+ attrs.header &&
8018
+ m(SidenavHeaderFooterItem, Object.assign(Object.assign({}, attrs.header), { _isExpanded: isExpanded, _position: position })),
7935
8019
  // Expand/collapse toggle button (if expandable, right below hamburger)
7936
8020
  expandable &&
7937
8021
  m('li.sidenav-expand-toggle', {
@@ -7946,8 +8030,12 @@ const Sidenav = () => {
7946
8030
  onclick: () => toggleExpanded(attrs),
7947
8031
  }, m(MaterialIcon, {
7948
8032
  name: position === 'right'
7949
- ? (isExpanded ? 'chevron_right' : 'chevron_left')
7950
- : (isExpanded ? 'chevron_left' : 'chevron_right'),
8033
+ ? isExpanded
8034
+ ? 'chevron_right'
8035
+ : 'chevron_left'
8036
+ : isExpanded
8037
+ ? 'chevron_left'
8038
+ : 'chevron_right',
7951
8039
  style: { width: '24px', height: '24px' },
7952
8040
  })),
7953
8041
  // Children (menu items) - inject internal props
@@ -7960,6 +8048,9 @@ const Sidenav = () => {
7960
8048
  return child;
7961
8049
  })
7962
8050
  : children,
8051
+ // Footer item (if provided, appears at the bottom)
8052
+ attrs.footer &&
8053
+ m(SidenavHeaderFooterItem, Object.assign(Object.assign({}, attrs.footer), { _isExpanded: isExpanded, _position: position, className: 'sidenav-footer-item' })),
7963
8054
  ]),
7964
8055
  ];
7965
8056
  },
@@ -7978,43 +8069,42 @@ const NavbarSubItem = () => {
7978
8069
  }
7979
8070
  };
7980
8071
  const isRightAligned = position === 'right';
8072
+ // Render indicator icon for checkbox/radio modes
8073
+ const indicatorIcon = mode !== 'none'
8074
+ ? m(MaterialIcon, {
8075
+ name: mode === 'checkbox' ? (selected ? 'check' : 'close') : selected ? 'radio_checked' : 'radio_unchecked',
8076
+ style: {
8077
+ width: '18px',
8078
+ height: '18px',
8079
+ opacity: mode === 'checkbox' && !selected ? '0.3' : '1',
8080
+ },
8081
+ })
8082
+ : null;
7981
8083
  const submenuContent = isRightAligned
7982
8084
  ? [
7983
8085
  // Right-aligned: text on left, icons on right
7984
- isExpanded && m('span', { style: { 'flex': '1', 'text-align': 'left' } }, text),
7985
- icon && isExpanded && m('i.material-icons', { style: { 'font-size': '18px' } }, icon),
7986
- m(MaterialIcon, {
7987
- name: mode === 'checkbox' ? (selected ? 'check' : 'close') : selected ? 'radio_checked' : 'radio_unchecked',
7988
- style: {
7989
- width: '18px',
7990
- height: '18px',
7991
- opacity: mode === 'checkbox' && !selected ? '0.3' : '1',
7992
- },
7993
- }),
8086
+ isExpanded && m('span', { style: { flex: '1', 'text-align': 'left' } }, text),
8087
+ icon && isExpanded && renderIcon(icon, { 'font-size': '18px' }),
8088
+ indicatorIcon,
7994
8089
  ]
7995
8090
  : [
7996
8091
  // Left-aligned: indicator on left, text and icon on right
7997
- m(MaterialIcon, {
7998
- name: mode === 'checkbox' ? (selected ? 'check' : 'close') : selected ? 'radio_checked' : 'radio_unchecked',
7999
- style: {
8000
- width: '18px',
8001
- height: '18px',
8002
- opacity: mode === 'checkbox' && !selected ? '0.3' : '1',
8003
- },
8004
- }),
8005
- icon && isExpanded && m('i.material-icons', { style: { 'font-size': '18px', 'margin-left': '8px' } }, icon),
8006
- isExpanded && m('span', { style: { 'margin-left': icon ? '8px' : '8px' } }, text),
8092
+ indicatorIcon,
8093
+ icon && isExpanded && renderIcon(icon, { 'font-size': '18px', 'margin-left': indicatorIcon ? '8px' : '0' }),
8094
+ isExpanded && m('span', { style: { 'margin-left': icon || indicatorIcon ? '8px' : '0' } }, text),
8007
8095
  ];
8008
8096
  return m('li.sidenav-subitem', {
8009
8097
  class: selected ? 'selected' : '',
8010
8098
  style: {
8011
- padding: isExpanded ? '8px 16px 8px 48px' : '8px 16px',
8099
+ padding: isExpanded ? '0 16px 0 48px' : '0 16px',
8012
8100
  cursor: 'pointer',
8013
8101
  display: 'flex',
8014
8102
  'align-items': 'center',
8015
8103
  gap: '8px',
8016
8104
  'font-size': '0.9em',
8017
8105
  'justify-content': isRightAligned ? 'space-between' : 'flex-start',
8106
+ height: '48px',
8107
+ 'min-height': '48px',
8018
8108
  },
8019
8109
  onclick: handleClick,
8020
8110
  }, submenuContent);
@@ -8037,20 +8127,16 @@ const SidenavItem = () => {
8037
8127
  return m('li.subheader', text || children);
8038
8128
  }
8039
8129
  const hasSubmenu = submenu && submenu.length > 0;
8040
- const itemClasses = [
8041
- active ? 'active' : '',
8042
- disabled ? 'disabled' : '',
8043
- hasSubmenu ? 'has-submenu' : '',
8044
- className,
8045
- ]
8130
+ const itemClasses = [active ? 'active' : '', disabled ? 'disabled' : '', hasSubmenu ? 'has-submenu' : '', className]
8046
8131
  .filter(Boolean)
8047
8132
  .join(' ') || undefined;
8048
8133
  const handleMainClick = (e) => {
8049
- e.preventDefault();
8050
8134
  if (hasSubmenu) {
8135
+ e.preventDefault();
8051
8136
  isSubmenuOpen = active ? !isSubmenuOpen : true;
8052
8137
  }
8053
8138
  if (onclick && !disabled) {
8139
+ e.preventDefault();
8054
8140
  onclick(e);
8055
8141
  }
8056
8142
  };
@@ -8063,13 +8149,14 @@ const SidenavItem = () => {
8063
8149
  const content = isRightAligned
8064
8150
  ? [
8065
8151
  // Right-aligned: text on left, icon on right
8066
- isExpanded && m('span.sidenav-item-text', { style: { 'flex': '1', 'text-align': 'left', 'margin-right': '8px' } }, text || children),
8067
- m('i.material-icons', { style: { 'min-width': '24px', 'width': '24px' } }, icon || ''),
8152
+ isExpanded &&
8153
+ m('span.sidenav-item-text', { style: { flex: '1', 'text-align': 'left', 'margin-right': '8px' } }, text || children),
8154
+ renderIcon(icon, { 'min-width': '24px', width: '24px' }),
8068
8155
  ]
8069
8156
  : [
8070
8157
  // Left-aligned: icon on left, text on right
8071
- m('i.material-icons', { style: { 'min-width': '24px', 'width': '24px' } }, icon || ''),
8072
- isExpanded && m('span.sidenav-item-text', { style: { 'margin-left': '8px', 'flex': '1' } }, text || children),
8158
+ renderIcon(icon, { 'min-width': '24px', width: '24px' }),
8159
+ isExpanded && m('span.sidenav-item-text', { style: { 'margin-left': '8px', flex: '1' } }, text || children),
8073
8160
  ];
8074
8161
  const linkStyle = {
8075
8162
  display: 'flex',