@materializecss/materialize 2.0.3 → 2.1.0

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 (56) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +15 -17
  3. package/dist/css/materialize.css +677 -566
  4. package/dist/css/materialize.min.css +3 -3
  5. package/dist/js/materialize.js +103 -77
  6. package/dist/js/materialize.min.js +3 -3
  7. package/dist/js/materialize.min.js.map +1 -1
  8. package/dist/src/bounding.d.ts.map +1 -1
  9. package/dist/src/dropdown.d.ts +1 -0
  10. package/dist/src/dropdown.d.ts.map +1 -1
  11. package/dist/src/edges.d.ts.map +1 -1
  12. package/dist/src/modal.d.ts.map +1 -1
  13. package/dist/src/select.d.ts.map +1 -1
  14. package/dist/src/tabs.d.ts.map +1 -1
  15. package/dist/src/toasts.d.ts.map +1 -1
  16. package/dist/src/utils.d.ts.map +1 -1
  17. package/dist/src/waves.d.ts.map +1 -1
  18. package/package.json +16 -35
  19. package/sass/components/_badges.scss +17 -12
  20. package/sass/components/_buttons.scss +137 -126
  21. package/sass/components/_cards.scss +12 -14
  22. package/sass/components/_carousel.scss +8 -6
  23. package/sass/components/_chips.scss +10 -11
  24. package/sass/components/_collapsible.scss +6 -8
  25. package/sass/components/_collection.scss +15 -15
  26. package/sass/components/_datepicker.scss +15 -15
  27. package/sass/components/_dropdown.scss +5 -17
  28. package/sass/components/_global.scss +65 -137
  29. package/sass/components/_grid.scss +12 -4
  30. package/sass/components/_materialbox.scss +1 -1
  31. package/sass/components/_modal.scss +14 -9
  32. package/sass/components/_navbar.scss +31 -25
  33. package/sass/components/_preloader.scss +5 -6
  34. package/sass/components/_sidenav.scss +42 -26
  35. package/sass/components/_slider.scss +5 -5
  36. package/sass/components/_table_of_contents.scss +7 -8
  37. package/sass/components/_tabs.scss +16 -17
  38. package/sass/components/_tapTarget.scss +3 -3
  39. package/sass/components/_timepicker.scss +12 -12
  40. package/sass/components/_toast.scss +17 -10
  41. package/sass/components/_tooltip.scss +13 -6
  42. package/sass/components/_variables.scss +13 -377
  43. package/sass/components/colors.module.scss +74 -180
  44. package/sass/components/forms/_checkboxes.scss +22 -22
  45. package/sass/components/forms/_file-input.scss +2 -5
  46. package/sass/components/forms/_forms.scss +5 -3
  47. package/sass/components/forms/_input-fields.scss +40 -41
  48. package/sass/components/forms/_radio-buttons.scss +11 -14
  49. package/sass/components/forms/_range.scss +16 -24
  50. package/sass/components/forms/_select.scss +34 -28
  51. package/sass/components/forms/_switches.scss +9 -12
  52. package/sass/components/theme.module.scss +140 -0
  53. package/sass/materialize.scss +6 -3
  54. package/sass/components/_theme_variables.scss +0 -78
  55. package/sass/components/theme.dark.module.scss +0 -32
  56. package/sass/components/theme.light.module.scss +0 -32
@@ -4,24 +4,23 @@
4
4
  height: 4px;
5
5
  display: block;
6
6
  width: 100%;
7
-
8
7
  @extend .surface-variant;
9
-
10
- border-radius: 2px;
8
+ border-radius: 4px;
11
9
  margin: $element-top-margin 0 $element-bottom-margin 0;
12
10
  overflow: hidden;
11
+ background-color: var(--md-sys-color-secondary-container);
13
12
 
14
13
  .determinate {
15
14
  position: absolute;
16
15
  top: 0;
17
16
  left: 0;
18
17
  bottom: 0;
19
- background-color: $progress-bar-color;
18
+ background-color: var(--md-sys-color-primary);
20
19
  transition: width .3s linear;
21
20
  }
22
21
 
23
22
  .indeterminate {
24
- background-color: $progress-bar-color;
23
+ background-color: var(--md-sys-color-primary);
25
24
 
26
25
  &:before {
27
26
  content: '';
@@ -148,7 +147,7 @@
148
147
  width: 100%;
149
148
  height: 100%;
150
149
  opacity: 0;
151
- border-color: $spinner-default-color;
150
+ border-color: var(--md-sys-color-primary);
152
151
  }
153
152
 
154
153
  .spinner-blue,
@@ -1,21 +1,28 @@
1
1
  /* This should be an UL-Element*/
2
2
  .sidenav {
3
+ --sidenav-width: 300px;
4
+ --sidenav-font-size: 14px;
5
+ --sidenav-padding: 16px;
6
+ --sidenav-item-height: 48px;
7
+ --sidenav-line-height: var(--sidenav-item-height);
8
+
3
9
  position: fixed;
4
- width: $sidenav-width;
10
+ width: var(--sidenav-width);
5
11
  left: 0;
6
12
  top: 0;
7
13
  margin: 0;
8
14
  transform: translateX(-100%);
9
15
  height: 100vh;
10
16
  padding: 0;
11
- background-color: $sidenav-bg-color;
12
17
  z-index: 999;
13
18
  overflow-y: auto;
14
19
  will-change: transform;
15
20
  backface-visibility: hidden;
16
21
  transform: translateX(-105%);
17
22
  user-select: none;
18
-
23
+
24
+ color: var(--md-sys-color-on-secondary-container);
25
+ background-color: var(--md-sys-color-surface);
19
26
  @extend .z-depth-1;
20
27
 
21
28
  // Right Align
@@ -31,16 +38,19 @@
31
38
  }
32
39
 
33
40
  /* Hover only on top row */
34
- a:hover {
35
- background-color: $button-flat-hover-background-color;
36
- }
41
+ /*a:hover {
42
+ //color: red;
43
+ //background-color: var(--md-sys-color-on-secondary-container);
44
+ //md.sys.color.on-secondary-container
45
+ }*/
37
46
  a:focus {
38
- background-color: $button-flat-focus-background-color;
47
+ background-color: rgba(0, 0, 0, 0.12);
39
48
  }
40
49
 
41
50
  li.active > a:not(.collapsible-header):not(.btn):not(.btn-large):not(.btn-small):not(.btn-flat):not(.btn-large):not(.btn-floating) {
42
- color: $font-on-secondary-container-color;
43
- background-color: $secondary-container-color;
51
+ //color: var(--md-sys-color-on-secondary-container); //var(--md-sys-color-on-secondary-container);
52
+ //background-color: var(--md-sys-color-secondary-container);
53
+ background-color: color-mix(in srgb, var(--md-sys-color-secondary) 10%, transparent);
44
54
  }
45
55
 
46
56
  .collapsible-body > ul { padding-left: 10px; }
@@ -52,11 +62,11 @@
52
62
  }
53
63
  li > a {
54
64
  /* https://stackoverflow.com/questions/5848090/full-width-hover-background-for-nested-lists */
55
- //padding-left: calc(100% + $sidenav-padding);
65
+ //padding-left: calc(100% + var(--sidenav-padding));
56
66
  //margin-left: -100%;
57
67
  margin: 0 12px;
58
- padding: 0 $sidenav-padding;
59
- //padding-left: $sidenav-padding;
68
+ padding: 0 var(--sidenav-padding);
69
+ //padding-left: var(--sidenav-padding);
60
70
 
61
71
  // Truncate too long text
62
72
  /*
@@ -67,15 +77,21 @@
67
77
  */
68
78
 
69
79
  display: flex;
70
- height: $sidenav-item-height;
71
- font-size: $sidenav-font-size;
80
+ height: var(--sidenav-item-height);
81
+ font-size: var(--sidenav-font-size);
72
82
  font-weight: 500;
73
83
  align-items: center;
74
84
  overflow: hidden;
75
85
  border-radius: 100px;
76
86
 
77
87
  &:not(.btn):not(.btn-flat):not(.btn-large):not(.btn-floating) {
78
- color: $sidenav-font-color;
88
+ color: var(--md-sys-color-on-secondary-container);
89
+ //color: $sidenav-font-color;
90
+ &:hover {
91
+ //color: var(--md-sys-color-on-secondary-container);
92
+ //md.sys.color.on-secondary-container
93
+ background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
94
+ }
79
95
  }
80
96
 
81
97
  &.btn, &.btn-large, &.btn-flat, &.btn-floating {
@@ -87,29 +103,29 @@
87
103
  & > .material-symbols-rounded, & > .material-symbols-sharp {
88
104
  display: inline-flex;
89
105
  vertical-align: middle;
90
- color: $sidenav-icon-color;
106
+ //color: $sidenav-icon-color;
91
107
  margin-right: 12px;
92
108
  }
93
109
  }
94
110
 
95
111
  .divider {
96
- margin: ($sidenav-padding * 0.5) 0 0 0;
112
+ margin: calc(var(--sidenav-padding) * 0.5) 0 0 0;
97
113
  }
98
114
 
99
115
  .subheader {
100
116
  cursor: initial;
101
117
  pointer-events: none;
102
- color: $sidenav-subheader-color;
103
- font-size: $sidenav-font-size;
118
+ color: red; //$sidenav-subheader-color;
119
+ font-size: var(--sidenav-font-size);
104
120
  font-weight: 500;
105
- line-height: $sidenav-line-height;
121
+ line-height: var(--sidenav-line-height);
106
122
  }
107
123
 
108
124
  // Remove this? is very custom
109
125
  .user-view {
110
126
  position: relative;
111
- padding: ($sidenav-padding * 2) ($sidenav-padding * 2) 0;
112
- margin-bottom: $sidenav-padding * 0.5;
127
+ padding: calc(var(--sidenav-padding) * 2) calc(var(--sidenav-padding) * 2) 0;
128
+ margin-bottom: calc(var(--sidenav-padding) * 0.5);
113
129
 
114
130
  & > a {
115
131
  &:hover {
@@ -141,8 +157,8 @@
141
157
 
142
158
  .name,
143
159
  .email {
144
- font-size: $sidenav-font-size;
145
- line-height: $sidenav-line-height * 0.5;
160
+ font-size: var(--sidenav-font-size);
161
+ line-height: calc(var(--sidenav-line-height) * 0.5);
146
162
  }
147
163
 
148
164
  .name {
@@ -193,10 +209,10 @@
193
209
  }
194
210
  }
195
211
  > a {
196
- padding: 0 $sidenav-padding;
212
+ padding: 0 var(--sidenav-padding);
197
213
  }
198
214
  .user-view {
199
- padding: $sidenav-padding $sidenav-padding 0;
215
+ padding: var(--sidenav-padding) var(--sidenav-padding) 0;
200
216
  }
201
217
  }
202
218
  }
@@ -26,10 +26,10 @@
26
26
  bottom: 30px;
27
27
 
28
28
  .indicator-item {
29
- background-color: $slider-fullscreen-indicator-color;
29
+ background-color: rgba(255, 255, 255, 0.45);
30
30
 
31
31
  &.active {
32
- background-color: $slider-fullscreen-indicator-color-active;
32
+ background-color: var(--md-ref-palette-primary100);
33
33
  }
34
34
  }
35
35
 
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .slides {
40
- background-color: $slider-bg-color;
40
+ background-color: var(--md-sys-color-surface);
41
41
  margin: 0;
42
42
  height: 400px;
43
43
  padding-left: 0;
@@ -104,14 +104,14 @@
104
104
  top: 0;
105
105
  left: 0;
106
106
  cursor: pointer;
107
- background-color: $slider-indicator-color;
107
+ background-color: var(--md-sys-color-shadow-light);
108
108
 
109
109
  transition: background-color .3s;
110
110
  border-radius: 50%;
111
111
  border-width: 0;
112
112
 
113
113
  &.active {
114
- background-color: $slider-indicator-color-active;
114
+ background-color: var(--md-sys-color-primary);
115
115
  }
116
116
 
117
117
  width: 100%;
@@ -1,7 +1,6 @@
1
- /***************
2
- Nav List
3
- ***************/
4
1
  .table-of-contents {
2
+ list-style: none;
3
+
5
4
  &.fixed {
6
5
  position: fixed;
7
6
  }
@@ -13,21 +12,21 @@
13
12
  a {
14
13
  display: inline-block;
15
14
  font-weight: 400;
16
- color: $font-color-medium;
15
+ color: var(--md-sys-color-secondary);
17
16
  padding-left: 16px;
18
17
  height: 2rem;
19
18
  line-height: 2rem;
20
- border-left: 1px solid $divider-color;
19
+ border-left: 1px solid var(--md-sys-color-outline-variant);
21
20
 
22
21
  &:hover {
23
- color: $font-color-main;
22
+ color: var(--md-sys-color-on-background);
24
23
  padding-left: 15px;
25
24
  }
26
25
  &.active {
27
- color: $primary-color;
26
+ color: var(--md-sys-color-primary);
28
27
  font-weight: 500;
29
28
  padding-left: 14px;
30
- border-left: 2px solid $primary-color;
29
+ border-left: 2px solid var(--md-sys-color-primary);
31
30
  }
32
31
  }
33
32
  }
@@ -6,17 +6,17 @@
6
6
  background-color: transparent;
7
7
 
8
8
  .tab a {
9
- color: $font-on-primary-color-medium;
9
+ color: var(--font-on-primary-color-medium);
10
10
  }
11
11
 
12
12
  .tab.disabled a,
13
13
  .tab.disabled a:hover,
14
14
  .tab.disabled a:focus {
15
- color: $font-on-primary-color-disabled;
15
+ color: rgba(255, 255, 255, 0.38);
16
16
  }
17
17
 
18
18
  .tab a:hover {
19
- background-color: $surface-hover-color-opaque;
19
+ background-color: rgba(0, 0, 0, 0.04);
20
20
  }
21
21
 
22
22
  .tab a.active,
@@ -27,11 +27,11 @@
27
27
  .tab a:hover,
28
28
  .tab a.active,
29
29
  .tab a:focus {
30
- color: $font-on-primary-color-main;
30
+ color: var(--md-sys-color-on-primary);
31
31
  }
32
32
 
33
33
  .indicator {
34
- background-color: $font-on-primary-color-main;
34
+ background-color: var(--md-sys-color-on-primary);
35
35
  }
36
36
  }
37
37
 
@@ -47,7 +47,7 @@
47
47
  overflow-y: hidden;
48
48
  height: 48px;
49
49
  width: 100%;
50
- background-color: $tabs-bg-color;
50
+ background-color: var(--md-sys-color-surface);
51
51
  margin: 0 auto;
52
52
  white-space: nowrap;
53
53
 
@@ -69,20 +69,20 @@
69
69
  &.active,
70
70
  &:focus,
71
71
  &:hover {
72
- color: $tabs-text-active-color;
72
+ color: var(--md-sys-color-primary);
73
73
  }
74
74
 
75
75
  &:hover {
76
- background-color: $primary-color-hover-opaque;
76
+ background-color: rgba(var(--md-sys-color-primary-numeric), 0.06);
77
77
  }
78
78
 
79
79
  &:focus,
80
80
  &.active {
81
- background-color: $primary-color-focus-opaque;
81
+ background-color: rgba(var(--md-sys-color-primary-numeric), 0.18);
82
82
  outline: none;
83
83
  }
84
84
 
85
- color: $tabs-text-inactive-color;
85
+ color: var(--md-sys-color-on-surface-variant);
86
86
  display: block;
87
87
  width: 100%;
88
88
  height: 100%;
@@ -98,8 +98,7 @@
98
98
  &:not(:focus) {
99
99
  background-color: transparent;
100
100
  }
101
-
102
- color: $tabs-text-disabled-color;
101
+ color: var(--md-sys-color-on-surface);
103
102
  cursor: default;
104
103
  background-color: transparent;
105
104
  }
@@ -108,20 +107,20 @@
108
107
  .indicator {
109
108
  position: absolute;
110
109
  bottom: 0;
111
- height: 2px;
112
- background-color: $tabs-underline-color;
110
+ height: 3px;
111
+ background-color: var(--md-sys-color-primary);
113
112
  will-change: left, right;
113
+ border-radius: 3px 3px 0 0;
114
114
  }
115
115
  }
116
116
 
117
- // Fixed Sidenav hide on smaller
117
+ /* Fixed Sidenav hide on smaller */
118
+
118
119
  @media #{$medium-and-down} {
119
120
  .tabs {
120
121
  display: flex;
121
-
122
122
  .tab {
123
123
  flex-grow: 1;
124
-
125
124
  a {
126
125
  padding: 0 12px;
127
126
  }
@@ -36,8 +36,8 @@
36
36
  position: absolute;
37
37
  font-size: 1rem;
38
38
  border-radius: 50%;
39
- background-color: $secondary-color;
40
- color: $font-on-secondary-color-main;
39
+ background-color: var(--md-sys-color-surface);//var(--md-sys-color-secondary);
40
+ color: var(--md-sys-color-on-secondary);
41
41
  box-shadow: 0 20px 20px 0 rgba(0, 0, 0, 0.14), 0 10px 50px 0 rgba(0, 0, 0, 0.12), 0 30px 10px -20px rgba(0, 0, 0, 0.2);
42
42
  width: 100%;
43
43
  height: 100%;
@@ -61,7 +61,7 @@
61
61
  width: 100%;
62
62
  height: 100%;
63
63
  border-radius: 50%;
64
- background-color: $surface-color
64
+ background-color: var(--md-sys-color-surface)
65
65
  }
66
66
  &::before {
67
67
  transform: scale(0);
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  .text-primary {
14
- color: $font-on-primary-color-main;
14
+ color: var(--md-sys-color-on-primary);
15
15
  }
16
16
 
17
17
 
@@ -19,7 +19,7 @@
19
19
  .timepicker-digital-display {
20
20
  width: 200px;
21
21
  flex: 1 auto;
22
- background-color: $primary-color;
22
+ background-color: var(--md-sys-color-primary);;
23
23
  padding: 10px;
24
24
  font-weight: 300;
25
25
  }
@@ -28,7 +28,7 @@
28
28
  font-size: 4rem;
29
29
  font-weight: bold;
30
30
  text-align: center;
31
- color: $font-on-primary-color-medium;
31
+ color: var(--font-on-primary-color-medium);
32
32
  font-weight: 400;
33
33
  position: relative;
34
34
  user-select: none;
@@ -75,11 +75,11 @@ input[type=text].text-primary {
75
75
  /* Analog Clock Display */
76
76
  .timepicker-analog-display {
77
77
  flex: 2.5 auto;
78
- background-color: $timepicker-clock-bg;
78
+ background-color: var(--md-sys-color-surface);
79
79
  }
80
80
 
81
81
  .timepicker-plate {
82
- background-color: $timepicker-clock-plate-bg;
82
+ background-color: rgba(0, 0, 0, 0.09);
83
83
  border-radius: 50%;
84
84
  width: 270px;
85
85
  height: 270px;
@@ -106,7 +106,7 @@ input[type=text].text-primary {
106
106
 
107
107
  .timepicker-tick {
108
108
  border-radius: 50%;
109
- color: $timepicker-clock-color;
109
+ color: var(--md-sys-color-on-background);
110
110
  line-height: 40px;
111
111
  text-align: center;
112
112
  width: 40px;
@@ -118,7 +118,7 @@ input[type=text].text-primary {
118
118
 
119
119
  .timepicker-tick.active,
120
120
  .timepicker-tick:hover {
121
- background-color: $primary-color-hover-opaque;
121
+ background-color: rgba(var(--md-sys-color-primary-numeric), 0.06);
122
122
  }
123
123
 
124
124
  .timepicker-dial {
@@ -141,7 +141,7 @@ input[type=text].text-primary {
141
141
  transition: opacity 175ms;
142
142
 
143
143
  line {
144
- stroke: $primary-color;
144
+ stroke: var(--md-sys-color-primary);
145
145
  stroke-width: 4;
146
146
  stroke-linecap: round;
147
147
  }
@@ -153,12 +153,12 @@ input[type=text].text-primary {
153
153
 
154
154
  .timepicker-canvas-bearing {
155
155
  stroke: none;
156
- fill: $primary-color;
156
+ fill: var(--md-sys-color-primary);
157
157
  }
158
158
 
159
159
  .timepicker-canvas-bg {
160
160
  stroke: none;
161
- fill: $primary-color;
161
+ fill: var(--md-sys-color-primary);
162
162
  }
163
163
 
164
164
 
@@ -171,11 +171,11 @@ input[type=text].text-primary {
171
171
  }
172
172
 
173
173
  .timepicker-clear {
174
- color: $error-color;
174
+ color: var(--md-sys-color-error);
175
175
  }
176
176
 
177
177
  .timepicker-close {
178
- color: $primary-color;
178
+ color: var(--md-sys-color-primary);
179
179
  }
180
180
 
181
181
  .timepicker-clear,
@@ -20,28 +20,35 @@
20
20
  }
21
21
 
22
22
  .toast {
23
- @extend .z-depth-1;
24
- border-radius: 2px;
23
+ @extend .z-depth-3;
24
+ border-radius: 4px;
25
25
  top: 35px;
26
26
  width: auto;
27
27
  margin-top: 10px;
28
28
  position: relative;
29
29
  max-width: 100%;
30
30
  height: auto;
31
- min-height: $toast-height;
32
- line-height: 1.5em;
33
- background-color: $toast-color;
34
- padding: 10px 25px;
35
- font-size: 1rem;
36
- font-weight: 400;
37
- color: $toast-text-color;
31
+ min-height: 48px;
32
+
33
+ //line-height: 1.5em;
34
+ //padding: 10px 25px;
35
+ padding-left: 16px;
36
+ padding-right: 12px;
37
+
38
+ font-size: 14px;
39
+ font-weight: 500;
40
+ line-height: 20px;
41
+
42
+ color: var(--md-sys-color-inverse-on-surface);
43
+ background-color: var(--md-sys-color-inverse-surface);
44
+
38
45
  display: flex;
39
46
  align-items: center;
40
47
  justify-content: space-between;
41
48
  cursor: default;
42
49
 
43
50
  .toast-action {
44
- color: $toast-action-color;
51
+ color: var(--md-sys-color-inverse-primary);
45
52
  font-weight: 500;
46
53
  margin-right: -25px;
47
54
  margin-left: 3rem;
@@ -2,9 +2,9 @@
2
2
  padding: 0 8px;
3
3
  border-radius: 4px;
4
4
 
5
- background-color: $tooltip-bg-color;
6
- color: $tooltip-font-color;
7
-
5
+ color: var(--md-sys-color-inverse-on-surface);
6
+ background-color: var(--md-sys-color-inverse-surface);
7
+
8
8
  font-family: var(--md-sys-typescale-body-small-font-family-name);
9
9
  font-size: var(--md-sys-typescale-body-small-font-size);
10
10
  line-height: var(--md-sys-typescale-body-small-line-height);
@@ -12,10 +12,17 @@
12
12
 
13
13
  min-height: 24px;
14
14
  opacity: 0;
15
- text-align: center;
15
+
16
+ padding-top: 6px;
17
+ padding-bottom: 6px;
18
+
19
+ font-size: 12px;
20
+ line-height: 16px;
21
+ font-weight: 400;
22
+ letter-spacing: 0.4px;
16
23
 
17
24
  position: absolute;
18
- max-width: calc(100% - 4px);
25
+ max-width: 300px;
19
26
  overflow: hidden;
20
27
  left: 0;
21
28
  top: 0;
@@ -34,7 +41,7 @@
34
41
  height: 7px;
35
42
  width: 14px;
36
43
  border-radius: 0 0 50% 50%;
37
- background-color: $tooltip-bg-color;
44
+ background-color: var(--md-sys-color-inverse-surface);
38
45
  z-index: -1;
39
46
  transform-origin: 50% 0;
40
47
  visibility: hidden;