mithril-materialized 3.5.3 → 3.5.4
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 +54 -6
- package/dist/components.css +38 -7
- package/dist/index.css +55 -7
- package/dist/index.esm.js +86 -23
- package/dist/index.js +86 -23
- package/dist/index.min.css +2 -2
- package/dist/index.umd.js +86 -23
- package/dist/sidenav.d.ts +15 -6
- package/package.json +12 -12
- package/sass/components/_navbar.scss +23 -0
- package/sass/components/_sidenav.scss +44 -9
- package/sass/components/_theme-variables.scss +1 -1
package/dist/advanced.css
CHANGED
|
@@ -911,13 +911,17 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
911
911
|
background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
912
912
|
}
|
|
913
913
|
.sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
914
|
-
color: var(--mm-
|
|
914
|
+
color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
|
|
915
915
|
display: block;
|
|
916
916
|
font-size: 14px;
|
|
917
917
|
font-weight: 500;
|
|
918
918
|
height: 48px;
|
|
919
919
|
line-height: 48px;
|
|
920
920
|
padding: 0 32px;
|
|
921
|
+
user-select: none;
|
|
922
|
+
-webkit-user-select: none;
|
|
923
|
+
-moz-user-select: none;
|
|
924
|
+
-ms-user-select: none;
|
|
921
925
|
}
|
|
922
926
|
.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
927
|
float: left;
|
|
@@ -928,6 +932,13 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
928
932
|
color: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
|
|
929
933
|
user-select: none;
|
|
930
934
|
}
|
|
935
|
+
.sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
936
|
+
color: var(--mm-nav-active-text, #fff);
|
|
937
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
938
|
+
}
|
|
939
|
+
.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 {
|
|
940
|
+
color: var(--mm-nav-active-text, #fff);
|
|
941
|
+
}
|
|
931
942
|
.sidenav li > .btn, .sidenav li > .btn-large, .sidenav li > .btn-flat, .sidenav li > .btn-floating {
|
|
932
943
|
margin: 10px 32px;
|
|
933
944
|
}
|
|
@@ -1119,13 +1130,23 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1119
1130
|
.sidenav-subitem {
|
|
1120
1131
|
list-style: none;
|
|
1121
1132
|
transition: background-color 0.2s ease;
|
|
1133
|
+
user-select: none;
|
|
1134
|
+
-webkit-user-select: none;
|
|
1135
|
+
-moz-user-select: none;
|
|
1136
|
+
-ms-user-select: none;
|
|
1122
1137
|
}
|
|
1123
1138
|
.sidenav-subitem:hover {
|
|
1124
1139
|
background: var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
1125
1140
|
}
|
|
1141
|
+
.sidenav-subitem.selected {
|
|
1142
|
+
background-color: var(--mm-primary-color-light, rgba(38, 166, 154, 0.15));
|
|
1143
|
+
}
|
|
1126
1144
|
.sidenav-subitem.selected svg {
|
|
1127
1145
|
fill: var(--mm-primary-color, #26a69a);
|
|
1128
1146
|
}
|
|
1147
|
+
.sidenav-subitem.selected i.material-icons {
|
|
1148
|
+
color: var(--mm-primary-color, #26a69a);
|
|
1149
|
+
}
|
|
1129
1150
|
.sidenav-subitem svg {
|
|
1130
1151
|
fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
|
|
1131
1152
|
transition: fill 0.2s ease;
|
|
@@ -1158,20 +1179,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1158
1179
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
1159
1180
|
}
|
|
1160
1181
|
[data-theme=dark] .sidenav li.active {
|
|
1161
|
-
background-color:
|
|
1182
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
1162
1183
|
}
|
|
1163
1184
|
[data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
1164
|
-
color:
|
|
1185
|
+
color: #000;
|
|
1165
1186
|
}
|
|
1166
1187
|
[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:
|
|
1188
|
+
color: #000;
|
|
1168
1189
|
}
|
|
1169
1190
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a {
|
|
1170
|
-
color:
|
|
1191
|
+
color: #000;
|
|
1171
1192
|
}
|
|
1172
1193
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i,
|
|
1173
1194
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i.material-icons {
|
|
1174
|
-
color:
|
|
1195
|
+
color: #000;
|
|
1175
1196
|
}
|
|
1176
1197
|
[data-theme=dark] .sidenav .subheader {
|
|
1177
1198
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
@@ -1188,6 +1209,16 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1188
1209
|
[data-theme=dark] .sidenav-subitem i.material-icons {
|
|
1189
1210
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
1190
1211
|
}
|
|
1212
|
+
[data-theme=dark] .sidenav-subitem.selected {
|
|
1213
|
+
background-color: rgba(38, 166, 154, 0.2);
|
|
1214
|
+
color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
|
|
1215
|
+
}
|
|
1216
|
+
[data-theme=dark] .sidenav-subitem.selected svg {
|
|
1217
|
+
fill: var(--mm-primary-color, #26a69a);
|
|
1218
|
+
}
|
|
1219
|
+
[data-theme=dark] .sidenav-subitem.selected i.material-icons {
|
|
1220
|
+
color: var(--mm-primary-color, #26a69a);
|
|
1221
|
+
}
|
|
1191
1222
|
|
|
1192
1223
|
.sidenav {
|
|
1193
1224
|
transition: transform 0.3s ease, width 0.3s ease;
|
|
@@ -1375,6 +1406,23 @@ nav .input-field label.active i {
|
|
|
1375
1406
|
height: 64px;
|
|
1376
1407
|
}
|
|
1377
1408
|
}
|
|
1409
|
+
[data-theme=dark] nav ul li.active {
|
|
1410
|
+
background-color: rgba(38, 166, 154, 0.2);
|
|
1411
|
+
}
|
|
1412
|
+
[data-theme=dark] nav ul li.active a {
|
|
1413
|
+
color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
|
|
1414
|
+
}
|
|
1415
|
+
[data-theme=dark] nav ul li.active i, [data-theme=dark] nav ul li.active .material-icons {
|
|
1416
|
+
color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
nav ul li {
|
|
1420
|
+
user-select: none;
|
|
1421
|
+
-webkit-user-select: none;
|
|
1422
|
+
-moz-user-select: none;
|
|
1423
|
+
-ms-user-select: none;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1378
1426
|
/*
|
|
1379
1427
|
@license
|
|
1380
1428
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
package/dist/components.css
CHANGED
|
@@ -1664,13 +1664,17 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1664
1664
|
background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
1665
1665
|
}
|
|
1666
1666
|
.sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
1667
|
-
color: var(--mm-
|
|
1667
|
+
color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
|
|
1668
1668
|
display: block;
|
|
1669
1669
|
font-size: 14px;
|
|
1670
1670
|
font-weight: 500;
|
|
1671
1671
|
height: 48px;
|
|
1672
1672
|
line-height: 48px;
|
|
1673
1673
|
padding: 0 32px;
|
|
1674
|
+
user-select: none;
|
|
1675
|
+
-webkit-user-select: none;
|
|
1676
|
+
-moz-user-select: none;
|
|
1677
|
+
-ms-user-select: none;
|
|
1674
1678
|
}
|
|
1675
1679
|
.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
1680
|
float: left;
|
|
@@ -1681,6 +1685,13 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1681
1685
|
color: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
|
|
1682
1686
|
user-select: none;
|
|
1683
1687
|
}
|
|
1688
|
+
.sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
1689
|
+
color: var(--mm-nav-active-text, #fff);
|
|
1690
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
1691
|
+
}
|
|
1692
|
+
.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 {
|
|
1693
|
+
color: var(--mm-nav-active-text, #fff);
|
|
1694
|
+
}
|
|
1684
1695
|
.sidenav li > .btn, .sidenav li > .btn-large, .sidenav li > .btn-flat, .sidenav li > .btn-floating {
|
|
1685
1696
|
margin: 10px 32px;
|
|
1686
1697
|
}
|
|
@@ -1872,13 +1883,23 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1872
1883
|
.sidenav-subitem {
|
|
1873
1884
|
list-style: none;
|
|
1874
1885
|
transition: background-color 0.2s ease;
|
|
1886
|
+
user-select: none;
|
|
1887
|
+
-webkit-user-select: none;
|
|
1888
|
+
-moz-user-select: none;
|
|
1889
|
+
-ms-user-select: none;
|
|
1875
1890
|
}
|
|
1876
1891
|
.sidenav-subitem:hover {
|
|
1877
1892
|
background: var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
1878
1893
|
}
|
|
1894
|
+
.sidenav-subitem.selected {
|
|
1895
|
+
background-color: var(--mm-primary-color-light, rgba(38, 166, 154, 0.15));
|
|
1896
|
+
}
|
|
1879
1897
|
.sidenav-subitem.selected svg {
|
|
1880
1898
|
fill: var(--mm-primary-color, #26a69a);
|
|
1881
1899
|
}
|
|
1900
|
+
.sidenav-subitem.selected i.material-icons {
|
|
1901
|
+
color: var(--mm-primary-color, #26a69a);
|
|
1902
|
+
}
|
|
1882
1903
|
.sidenav-subitem svg {
|
|
1883
1904
|
fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
|
|
1884
1905
|
transition: fill 0.2s ease;
|
|
@@ -1911,20 +1932,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1911
1932
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
1912
1933
|
}
|
|
1913
1934
|
[data-theme=dark] .sidenav li.active {
|
|
1914
|
-
background-color:
|
|
1935
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
1915
1936
|
}
|
|
1916
1937
|
[data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
1917
|
-
color:
|
|
1938
|
+
color: #000;
|
|
1918
1939
|
}
|
|
1919
1940
|
[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:
|
|
1941
|
+
color: #000;
|
|
1921
1942
|
}
|
|
1922
1943
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a {
|
|
1923
|
-
color:
|
|
1944
|
+
color: #000;
|
|
1924
1945
|
}
|
|
1925
1946
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i,
|
|
1926
1947
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i.material-icons {
|
|
1927
|
-
color:
|
|
1948
|
+
color: #000;
|
|
1928
1949
|
}
|
|
1929
1950
|
[data-theme=dark] .sidenav .subheader {
|
|
1930
1951
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
@@ -1941,6 +1962,16 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
1941
1962
|
[data-theme=dark] .sidenav-subitem i.material-icons {
|
|
1942
1963
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
1943
1964
|
}
|
|
1965
|
+
[data-theme=dark] .sidenav-subitem.selected {
|
|
1966
|
+
background-color: rgba(38, 166, 154, 0.2);
|
|
1967
|
+
color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
|
|
1968
|
+
}
|
|
1969
|
+
[data-theme=dark] .sidenav-subitem.selected svg {
|
|
1970
|
+
fill: var(--mm-primary-color, #26a69a);
|
|
1971
|
+
}
|
|
1972
|
+
[data-theme=dark] .sidenav-subitem.selected i.material-icons {
|
|
1973
|
+
color: var(--mm-primary-color, #26a69a);
|
|
1974
|
+
}
|
|
1944
1975
|
|
|
1945
1976
|
.sidenav {
|
|
1946
1977
|
transition: transform 0.3s ease, width 0.3s ease;
|
|
@@ -3117,7 +3148,7 @@ body {
|
|
|
3117
3148
|
--mm-button-flat-text: var(--mm-primary-color);
|
|
3118
3149
|
--mm-nav-background: #1e1e1e;
|
|
3119
3150
|
--mm-nav-text: #ffffff;
|
|
3120
|
-
--mm-nav-active-text: #
|
|
3151
|
+
--mm-nav-active-text: #ffffff;
|
|
3121
3152
|
--mm-modal-background: #2d2d2d;
|
|
3122
3153
|
--mm-overlay-background: rgba(0, 0, 0, 0.8);
|
|
3123
3154
|
--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: #
|
|
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
|
}
|
|
@@ -7759,13 +7776,17 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
7759
7776
|
background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
7760
7777
|
}
|
|
7761
7778
|
.sidenav li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
7762
|
-
color: var(--mm-
|
|
7779
|
+
color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
|
|
7763
7780
|
display: block;
|
|
7764
7781
|
font-size: 14px;
|
|
7765
7782
|
font-weight: 500;
|
|
7766
7783
|
height: 48px;
|
|
7767
7784
|
line-height: 48px;
|
|
7768
7785
|
padding: 0 32px;
|
|
7786
|
+
user-select: none;
|
|
7787
|
+
-webkit-user-select: none;
|
|
7788
|
+
-moz-user-select: none;
|
|
7789
|
+
-ms-user-select: none;
|
|
7769
7790
|
}
|
|
7770
7791
|
.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
7792
|
float: left;
|
|
@@ -7778,6 +7799,13 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
7778
7799
|
-moz-user-select: none;
|
|
7779
7800
|
user-select: none;
|
|
7780
7801
|
}
|
|
7802
|
+
.sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
7803
|
+
color: var(--mm-nav-active-text, #fff);
|
|
7804
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
7805
|
+
}
|
|
7806
|
+
.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 {
|
|
7807
|
+
color: var(--mm-nav-active-text, #fff);
|
|
7808
|
+
}
|
|
7781
7809
|
.sidenav li > .btn, .sidenav li > .btn-large, .sidenav li > .btn-flat, .sidenav li > .btn-floating {
|
|
7782
7810
|
margin: 10px 32px;
|
|
7783
7811
|
}
|
|
@@ -7969,13 +7997,23 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
7969
7997
|
.sidenav-subitem {
|
|
7970
7998
|
list-style: none;
|
|
7971
7999
|
transition: background-color 0.2s ease;
|
|
8000
|
+
user-select: none;
|
|
8001
|
+
-webkit-user-select: none;
|
|
8002
|
+
-moz-user-select: none;
|
|
8003
|
+
-ms-user-select: none;
|
|
7972
8004
|
}
|
|
7973
8005
|
.sidenav-subitem:hover {
|
|
7974
8006
|
background: var(--mm-border-color, rgba(0, 0, 0, 0.05));
|
|
7975
8007
|
}
|
|
8008
|
+
.sidenav-subitem.selected {
|
|
8009
|
+
background-color: var(--mm-primary-color-light, rgba(38, 166, 154, 0.15));
|
|
8010
|
+
}
|
|
7976
8011
|
.sidenav-subitem.selected svg {
|
|
7977
8012
|
fill: var(--mm-primary-color, #26a69a);
|
|
7978
8013
|
}
|
|
8014
|
+
.sidenav-subitem.selected i.material-icons {
|
|
8015
|
+
color: var(--mm-primary-color, #26a69a);
|
|
8016
|
+
}
|
|
7979
8017
|
.sidenav-subitem svg {
|
|
7980
8018
|
fill: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
|
|
7981
8019
|
transition: fill 0.2s ease;
|
|
@@ -8008,20 +8046,20 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
8008
8046
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
8009
8047
|
}
|
|
8010
8048
|
[data-theme=dark] .sidenav li.active {
|
|
8011
|
-
background-color:
|
|
8049
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
8012
8050
|
}
|
|
8013
8051
|
[data-theme=dark] .sidenav li.active > a:not(.btn):not(.btn-large):not(.btn-flat):not(.btn-floating) {
|
|
8014
|
-
color:
|
|
8052
|
+
color: #000;
|
|
8015
8053
|
}
|
|
8016
8054
|
[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:
|
|
8055
|
+
color: #000;
|
|
8018
8056
|
}
|
|
8019
8057
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a {
|
|
8020
|
-
color:
|
|
8058
|
+
color: #000;
|
|
8021
8059
|
}
|
|
8022
8060
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i,
|
|
8023
8061
|
[data-theme=dark] .sidenav .collapsible-body > ul:not(.collapsible) > li.active a i.material-icons {
|
|
8024
|
-
color:
|
|
8062
|
+
color: #000;
|
|
8025
8063
|
}
|
|
8026
8064
|
[data-theme=dark] .sidenav .subheader {
|
|
8027
8065
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
@@ -8038,6 +8076,16 @@ ul.sidenav.right-aligned li > a:not(.btn):not(.btn-large):not(.btn-flat):not(.bt
|
|
|
8038
8076
|
[data-theme=dark] .sidenav-subitem i.material-icons {
|
|
8039
8077
|
color: var(--mm-text-secondary, rgba(255, 255, 255, 0.6));
|
|
8040
8078
|
}
|
|
8079
|
+
[data-theme=dark] .sidenav-subitem.selected {
|
|
8080
|
+
background-color: rgba(38, 166, 154, 0.2);
|
|
8081
|
+
color: var(--mm-text-primary, rgba(255, 255, 255, 0.87));
|
|
8082
|
+
}
|
|
8083
|
+
[data-theme=dark] .sidenav-subitem.selected svg {
|
|
8084
|
+
fill: var(--mm-primary-color, #26a69a);
|
|
8085
|
+
}
|
|
8086
|
+
[data-theme=dark] .sidenav-subitem.selected i.material-icons {
|
|
8087
|
+
color: var(--mm-primary-color, #26a69a);
|
|
8088
|
+
}
|
|
8041
8089
|
|
|
8042
8090
|
.sidenav {
|
|
8043
8091
|
transition: transform 0.3s ease, width 0.3s ease;
|
package/dist/index.esm.js
CHANGED
|
@@ -7810,6 +7810,66 @@ const FileUpload = () => {
|
|
|
7810
7810
|
};
|
|
7811
7811
|
};
|
|
7812
7812
|
|
|
7813
|
+
// List of MaterialIcon SVG icons that are available
|
|
7814
|
+
const materialIconSvgNames = [
|
|
7815
|
+
'caret', 'close', 'chevron', 'chevron_left', 'chevron_right', 'menu',
|
|
7816
|
+
'expand', 'collapse', 'check', 'radio_checked', 'radio_unchecked',
|
|
7817
|
+
'light_mode', 'dark_mode'
|
|
7818
|
+
];
|
|
7819
|
+
/**
|
|
7820
|
+
* Helper function to render icons based on IconDefinition type
|
|
7821
|
+
*/
|
|
7822
|
+
const renderIcon = (icon, style) => {
|
|
7823
|
+
if (!icon)
|
|
7824
|
+
return null;
|
|
7825
|
+
if (typeof icon === 'string') {
|
|
7826
|
+
// Check if this is a MaterialIcon SVG name
|
|
7827
|
+
if (materialIconSvgNames.includes(icon)) {
|
|
7828
|
+
return m(MaterialIcon, { name: icon, style });
|
|
7829
|
+
}
|
|
7830
|
+
// Fall back to Material Icons font for other icon names
|
|
7831
|
+
return m('i.material-icons', { style }, icon);
|
|
7832
|
+
}
|
|
7833
|
+
if (icon.type === 'svg') {
|
|
7834
|
+
// Inline SVG
|
|
7835
|
+
return m.trust(icon.content);
|
|
7836
|
+
}
|
|
7837
|
+
if (icon.type === 'image') {
|
|
7838
|
+
// Image URL
|
|
7839
|
+
return m('img', {
|
|
7840
|
+
src: icon.content,
|
|
7841
|
+
style: Object.assign(Object.assign({}, style), { width: '24px', height: '24px', objectFit: 'contain' }),
|
|
7842
|
+
});
|
|
7843
|
+
}
|
|
7844
|
+
return null;
|
|
7845
|
+
};
|
|
7846
|
+
/**
|
|
7847
|
+
* Helper function to render a single sidenav item (for header/footer items)
|
|
7848
|
+
*/
|
|
7849
|
+
const renderSidenavItem = (item, isExpanded, position) => {
|
|
7850
|
+
const { text, icon, onclick, href, className = '' } = item;
|
|
7851
|
+
const isRightAligned = position === 'right';
|
|
7852
|
+
const content = isRightAligned
|
|
7853
|
+
? [
|
|
7854
|
+
isExpanded && m('span.sidenav-item-text', { style: { 'flex': '1', 'text-align': 'left', 'margin-right': '8px' } }, text),
|
|
7855
|
+
renderIcon(icon, { 'min-width': '24px', 'width': '24px' }),
|
|
7856
|
+
]
|
|
7857
|
+
: [
|
|
7858
|
+
renderIcon(icon, { 'min-width': '24px', 'width': '24px' }),
|
|
7859
|
+
isExpanded && m('span.sidenav-item-text', { style: { 'margin-left': '8px', 'flex': '1' } }, text),
|
|
7860
|
+
];
|
|
7861
|
+
const linkStyle = {
|
|
7862
|
+
display: 'flex',
|
|
7863
|
+
'align-items': 'center',
|
|
7864
|
+
padding: isExpanded ? '12px 16px' : '12px 18px',
|
|
7865
|
+
'justify-content': isExpanded ? (isRightAligned ? 'flex-end' : 'flex-start') : 'center',
|
|
7866
|
+
};
|
|
7867
|
+
return m('li', { class: className }, m('a', {
|
|
7868
|
+
href: href || '#!',
|
|
7869
|
+
onclick: onclick,
|
|
7870
|
+
style: linkStyle,
|
|
7871
|
+
}, content));
|
|
7872
|
+
};
|
|
7813
7873
|
/**
|
|
7814
7874
|
* Sidenav Component
|
|
7815
7875
|
* A responsive navigation drawer that slides in from the side
|
|
@@ -7932,6 +7992,8 @@ const Sidenav = () => {
|
|
|
7932
7992
|
name: 'menu',
|
|
7933
7993
|
style: { width: '24px', height: '24px' },
|
|
7934
7994
|
})),
|
|
7995
|
+
// Header item (if provided, appears before expand/collapse toggle)
|
|
7996
|
+
attrs.header && renderSidenavItem(attrs.header, isExpanded, position),
|
|
7935
7997
|
// Expand/collapse toggle button (if expandable, right below hamburger)
|
|
7936
7998
|
expandable &&
|
|
7937
7999
|
m('li.sidenav-expand-toggle', {
|
|
@@ -7960,6 +8022,8 @@ const Sidenav = () => {
|
|
|
7960
8022
|
return child;
|
|
7961
8023
|
})
|
|
7962
8024
|
: children,
|
|
8025
|
+
// Footer item (if provided, appears at the bottom)
|
|
8026
|
+
attrs.footer && renderSidenavItem(attrs.footer, isExpanded, position),
|
|
7963
8027
|
]),
|
|
7964
8028
|
];
|
|
7965
8029
|
},
|
|
@@ -7978,43 +8042,42 @@ const NavbarSubItem = () => {
|
|
|
7978
8042
|
}
|
|
7979
8043
|
};
|
|
7980
8044
|
const isRightAligned = position === 'right';
|
|
8045
|
+
// Render indicator icon for checkbox/radio modes
|
|
8046
|
+
const indicatorIcon = mode !== 'none'
|
|
8047
|
+
? m(MaterialIcon, {
|
|
8048
|
+
name: mode === 'checkbox' ? (selected ? 'check' : 'close') : selected ? 'radio_checked' : 'radio_unchecked',
|
|
8049
|
+
style: {
|
|
8050
|
+
width: '18px',
|
|
8051
|
+
height: '18px',
|
|
8052
|
+
opacity: mode === 'checkbox' && !selected ? '0.3' : '1',
|
|
8053
|
+
},
|
|
8054
|
+
})
|
|
8055
|
+
: null;
|
|
7981
8056
|
const submenuContent = isRightAligned
|
|
7982
8057
|
? [
|
|
7983
8058
|
// Right-aligned: text on left, icons on right
|
|
7984
8059
|
isExpanded && m('span', { style: { 'flex': '1', 'text-align': 'left' } }, text),
|
|
7985
|
-
icon && isExpanded &&
|
|
7986
|
-
|
|
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
|
-
}),
|
|
8060
|
+
icon && isExpanded && renderIcon(icon, { 'font-size': '18px' }),
|
|
8061
|
+
indicatorIcon,
|
|
7994
8062
|
]
|
|
7995
8063
|
: [
|
|
7996
8064
|
// Left-aligned: indicator on left, text and icon on right
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
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),
|
|
8065
|
+
indicatorIcon,
|
|
8066
|
+
icon && isExpanded && renderIcon(icon, { 'font-size': '18px', 'margin-left': indicatorIcon ? '8px' : '0' }),
|
|
8067
|
+
isExpanded && m('span', { style: { 'margin-left': icon || indicatorIcon ? '8px' : '0' } }, text),
|
|
8007
8068
|
];
|
|
8008
8069
|
return m('li.sidenav-subitem', {
|
|
8009
8070
|
class: selected ? 'selected' : '',
|
|
8010
8071
|
style: {
|
|
8011
|
-
padding: isExpanded ? '
|
|
8072
|
+
padding: isExpanded ? '0 16px 0 48px' : '0 16px',
|
|
8012
8073
|
cursor: 'pointer',
|
|
8013
8074
|
display: 'flex',
|
|
8014
8075
|
'align-items': 'center',
|
|
8015
8076
|
gap: '8px',
|
|
8016
8077
|
'font-size': '0.9em',
|
|
8017
8078
|
'justify-content': isRightAligned ? 'space-between' : 'flex-start',
|
|
8079
|
+
height: '48px',
|
|
8080
|
+
'min-height': '48px',
|
|
8018
8081
|
},
|
|
8019
8082
|
onclick: handleClick,
|
|
8020
8083
|
}, submenuContent);
|
|
@@ -8046,8 +8109,8 @@ const SidenavItem = () => {
|
|
|
8046
8109
|
.filter(Boolean)
|
|
8047
8110
|
.join(' ') || undefined;
|
|
8048
8111
|
const handleMainClick = (e) => {
|
|
8049
|
-
e.preventDefault();
|
|
8050
8112
|
if (hasSubmenu) {
|
|
8113
|
+
e.preventDefault();
|
|
8051
8114
|
isSubmenuOpen = active ? !isSubmenuOpen : true;
|
|
8052
8115
|
}
|
|
8053
8116
|
if (onclick && !disabled) {
|
|
@@ -8064,11 +8127,11 @@ const SidenavItem = () => {
|
|
|
8064
8127
|
? [
|
|
8065
8128
|
// Right-aligned: text on left, icon on right
|
|
8066
8129
|
isExpanded && m('span.sidenav-item-text', { style: { 'flex': '1', 'text-align': 'left', 'margin-right': '8px' } }, text || children),
|
|
8067
|
-
|
|
8130
|
+
renderIcon(icon, { 'min-width': '24px', 'width': '24px' }),
|
|
8068
8131
|
]
|
|
8069
8132
|
: [
|
|
8070
8133
|
// Left-aligned: icon on left, text on right
|
|
8071
|
-
|
|
8134
|
+
renderIcon(icon, { 'min-width': '24px', 'width': '24px' }),
|
|
8072
8135
|
isExpanded && m('span.sidenav-item-text', { style: { 'margin-left': '8px', 'flex': '1' } }, text || children),
|
|
8073
8136
|
];
|
|
8074
8137
|
const linkStyle = {
|