mithril-materialized 1.4.2 → 2.0.0-beta.2

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 (82) hide show
  1. package/README.md +112 -351
  2. package/dist/autocomplete.d.ts +12 -4
  3. package/dist/button.d.ts +10 -10
  4. package/dist/carousel.d.ts +26 -7
  5. package/dist/chip.d.ts +2 -2
  6. package/dist/code-block.d.ts +2 -3
  7. package/dist/collapsible.d.ts +12 -7
  8. package/dist/collection.d.ts +8 -8
  9. package/dist/dropdown.d.ts +5 -5
  10. package/dist/floating-action-button.d.ts +9 -5
  11. package/dist/icon.d.ts +2 -2
  12. package/dist/index.css +7968 -2
  13. package/dist/index.d.ts +1 -2
  14. package/dist/index.esm.js +4211 -2
  15. package/dist/index.js +4265 -2
  16. package/dist/index.umd.js +4269 -2
  17. package/dist/input-options.d.ts +3 -1
  18. package/dist/input.d.ts +17 -12
  19. package/dist/label.d.ts +4 -5
  20. package/dist/material-box.d.ts +22 -4
  21. package/dist/material-icon.d.ts +14 -0
  22. package/dist/modal.d.ts +23 -7
  23. package/dist/option.d.ts +12 -11
  24. package/dist/pagination.d.ts +5 -9
  25. package/dist/parallax.d.ts +8 -6
  26. package/dist/pickers.d.ts +129 -5
  27. package/dist/radio.d.ts +10 -6
  28. package/dist/search-select.d.ts +2 -2
  29. package/dist/select.d.ts +5 -5
  30. package/dist/switch.d.ts +4 -5
  31. package/dist/tabs.d.ts +18 -5
  32. package/dist/utils.d.ts +17 -0
  33. package/package.json +35 -10
  34. package/sass/components/_badges.scss +59 -0
  35. package/sass/components/_buttons.scss +327 -0
  36. package/sass/components/_cards.scss +197 -0
  37. package/sass/components/_carousel.scss +92 -0
  38. package/sass/components/_chips.scss +92 -0
  39. package/sass/components/_collapsible.scss +94 -0
  40. package/sass/components/_color-classes.scss +34 -0
  41. package/sass/components/_color-variables.scss +371 -0
  42. package/sass/components/_datepicker.scss +251 -0
  43. package/sass/components/_dropdown.scss +90 -0
  44. package/sass/components/_global.scss +775 -0
  45. package/sass/components/_grid.scss +160 -0
  46. package/sass/components/_icons-material-design.scss +5 -0
  47. package/sass/components/_materialbox.scss +43 -0
  48. package/sass/components/_modal.scss +97 -0
  49. package/sass/components/_navbar.scss +211 -0
  50. package/sass/components/_normalize.scss +447 -0
  51. package/sass/components/_preloader.scss +336 -0
  52. package/sass/components/_pulse.scss +34 -0
  53. package/sass/components/_sidenav.scss +213 -0
  54. package/sass/components/_slider.scss +94 -0
  55. package/sass/components/_table_of_contents.scss +36 -0
  56. package/sass/components/_tabs.scss +102 -0
  57. package/sass/components/_tapTarget.scss +105 -0
  58. package/sass/components/_timepicker.scss +170 -0
  59. package/sass/components/_toast.scss +61 -0
  60. package/sass/components/_tooltip.scss +32 -0
  61. package/sass/components/_transitions.scss +13 -0
  62. package/sass/components/_typography.scss +61 -0
  63. package/sass/components/_variables.scss +352 -0
  64. package/sass/components/_waves.scss +114 -0
  65. package/sass/components/forms/_checkboxes.scss +203 -0
  66. package/sass/components/forms/_file-input.scss +50 -0
  67. package/sass/components/forms/_form-groups.scss +28 -0
  68. package/sass/components/forms/_forms.scss +24 -0
  69. package/sass/components/forms/_input-fields.scss +361 -0
  70. package/sass/components/forms/_radio-buttons.scss +118 -0
  71. package/sass/components/forms/_range.scss +164 -0
  72. package/sass/components/forms/_select.scss +193 -0
  73. package/sass/components/forms/_switches.scss +92 -0
  74. package/sass/materialize.scss +41 -0
  75. package/dist/index.css.map +0 -1
  76. package/dist/index.esm.js.map +0 -1
  77. package/dist/index.js.map +0 -1
  78. package/dist/index.modern.js +0 -2
  79. package/dist/index.modern.js.map +0 -1
  80. package/dist/index.umd.js.map +0 -1
  81. package/dist/map-editor.d.ts +0 -63
  82. package/dist/timeline.d.ts +0 -24
@@ -0,0 +1,160 @@
1
+ @use "sass:string";
2
+ @use 'sass:math';
3
+ @use "variables";
4
+
5
+ .container {
6
+ margin: 0 auto;
7
+ max-width: 1280px;
8
+ width: 90%;
9
+ }
10
+ @media #{variables.$medium-and-up} {
11
+ .container {
12
+ width: 85%;
13
+ }
14
+ }
15
+ @media #{variables.$large-and-up} {
16
+ .container {
17
+ width: 70%;
18
+ }
19
+ }
20
+ .col .row {
21
+ margin-left: math.div(-1 * variables.$gutter-width, 2);
22
+ margin-right: math.div(-1 * variables.$gutter-width, 2);
23
+ }
24
+
25
+ .section {
26
+ padding-top: 1rem;
27
+ padding-bottom: 1rem;
28
+
29
+ &.no-pad {
30
+ padding: 0;
31
+ }
32
+ &.no-pad-bot {
33
+ padding-bottom: 0;
34
+ }
35
+ &.no-pad-top {
36
+ padding-top: 0;
37
+ }
38
+ }
39
+
40
+
41
+ // Mixins to eliminate code repitition
42
+ @mixin reset-offset {
43
+ margin-left: auto;
44
+ left: auto;
45
+ right: auto;
46
+ }
47
+ @mixin grid-classes($size, $i, $perc) {
48
+ &.offset-#{$size}#{$i} {
49
+ margin-left: $perc;
50
+ }
51
+ &.pull-#{$size}#{$i} {
52
+ right: $perc;
53
+ }
54
+ &.push-#{$size}#{$i} {
55
+ left: $perc;
56
+ }
57
+ }
58
+
59
+
60
+ .row {
61
+ margin-left: auto;
62
+ margin-right: auto;
63
+ margin-bottom: 20px;
64
+
65
+ // Clear floating children
66
+ &:after {
67
+ content: "";
68
+ display: table;
69
+ clear: both;
70
+ }
71
+
72
+ .col {
73
+ float: left;
74
+ box-sizing: border-box;
75
+ padding: 0 math.div(variables.$gutter-width, 2);
76
+ min-height: 1px;
77
+
78
+ &[class*="push-"],
79
+ &[class*="pull-"] {
80
+ position: relative;
81
+ }
82
+
83
+ $i: 1;
84
+ @while $i <= variables.$num-cols {
85
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
86
+ &.s#{$i} {
87
+ width: $perc;
88
+ @include reset-offset;
89
+ }
90
+ $i: $i + 1;
91
+ }
92
+
93
+ $i: 1;
94
+ @while $i <= variables.$num-cols {
95
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
96
+ @include grid-classes("s", $i, $perc);
97
+ $i: $i + 1;
98
+ }
99
+
100
+ @media #{variables.$medium-and-up} {
101
+
102
+ $i: 1;
103
+ @while $i <= variables.$num-cols {
104
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
105
+ &.m#{$i} {
106
+ width: $perc;
107
+ @include reset-offset;
108
+ }
109
+ $i: $i + 1
110
+ }
111
+
112
+ $i: 1;
113
+ @while $i <= variables.$num-cols {
114
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
115
+ @include grid-classes("m", $i, $perc);
116
+ $i: $i + 1;
117
+ }
118
+ }
119
+
120
+ @media #{variables.$large-and-up} {
121
+
122
+ $i: 1;
123
+ @while $i <= variables.$num-cols {
124
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
125
+ &.l#{$i} {
126
+ width: $perc;
127
+ @include reset-offset;
128
+ }
129
+ $i: $i + 1;
130
+ }
131
+
132
+ $i: 1;
133
+ @while $i <= variables.$num-cols {
134
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
135
+ @include grid-classes("l", $i, $perc);
136
+ $i: $i + 1;
137
+ }
138
+ }
139
+
140
+ @media #{variables.$extra-large-and-up} {
141
+
142
+ $i: 1;
143
+ @while $i <= variables.$num-cols {
144
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
145
+ &.xl#{$i} {
146
+ width: $perc;
147
+ @include reset-offset;
148
+ }
149
+ $i: $i + 1;
150
+ }
151
+
152
+ $i: 1;
153
+ @while $i <= variables.$num-cols {
154
+ $perc: string.unquote(math.div(100, math.div(variables.$num-cols, $i)) + "%");
155
+ @include grid-classes("xl", $i, $perc);
156
+ $i: $i + 1;
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,5 @@
1
+ /* This is needed for some mobile phones to display the Google Icon font properly */
2
+ .material-icons {
3
+ text-rendering: optimizeLegibility;
4
+ font-feature-settings: 'liga';
5
+ }
@@ -0,0 +1,43 @@
1
+ .materialboxed {
2
+ &:hover {
3
+ &:not(.active) {
4
+ opacity: .8;
5
+ }
6
+ }
7
+
8
+ display: block;
9
+ cursor: zoom-in;
10
+ position: relative;
11
+ transition: opacity .4s;
12
+ -webkit-backface-visibility: hidden;
13
+
14
+ &.active {
15
+ cursor: zoom-out;
16
+ }
17
+ }
18
+
19
+ #materialbox-overlay {
20
+ position:fixed;
21
+ top: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ left: 0;
25
+ background-color: #292929;
26
+ z-index: 1000;
27
+ will-change: opacity;
28
+ }
29
+
30
+ .materialbox-caption {
31
+ position: fixed;
32
+ display: none;
33
+ color: #fff;
34
+ line-height: 50px;
35
+ bottom: 0;
36
+ left: 0;
37
+ width: 100%;
38
+ text-align: center;
39
+ padding: 0% 15%;
40
+ height: 50px;
41
+ z-index: 1000;
42
+ -webkit-font-smoothing: antialiased;
43
+ }
@@ -0,0 +1,97 @@
1
+ @use "variables";
2
+ @use "global";
3
+
4
+ .modal {
5
+ &:focus {
6
+ outline: none;
7
+ }
8
+
9
+ @extend .z-depth-5 !optional;
10
+
11
+ display: none;
12
+ position: fixed;
13
+ left: 0;
14
+ right: 0;
15
+ background-color: #fafafa;
16
+ padding: 0;
17
+ max-height: 70%;
18
+ width: 55%;
19
+ margin: auto;
20
+ overflow-y: auto;
21
+
22
+ border-radius: 2px;
23
+ will-change: top, opacity;
24
+
25
+ @media #{variables.$medium-and-down} {
26
+ width: 80%;
27
+ }
28
+
29
+ h1,h2,h3,h4 {
30
+ margin-top: 0;
31
+ }
32
+
33
+ .modal-content {
34
+ padding: 24px;
35
+ }
36
+ .modal-close {
37
+ cursor: pointer;
38
+ }
39
+
40
+ .modal-footer {
41
+ border-radius: 0 0 2px 2px;
42
+ background-color: #fafafa;
43
+ padding: 4px 6px;
44
+ height: 56px;
45
+ width: 100%;
46
+ text-align: right;
47
+
48
+ .btn, .btn-flat {
49
+ margin: 6px 0;
50
+ }
51
+ }
52
+ }
53
+ .modal-overlay {
54
+ position: fixed;
55
+ z-index: 999;
56
+ top: -25%;
57
+ left: 0;
58
+ bottom: 0;
59
+ right: 0;
60
+ height: 125%;
61
+ width: 100%;
62
+ background: #000;
63
+ display: none;
64
+
65
+ will-change: opacity;
66
+ }
67
+
68
+ // Modal with fixed action footer
69
+ .modal.modal-fixed-footer {
70
+ padding: 0;
71
+ height: 70%;
72
+
73
+ .modal-content {
74
+ position: absolute;
75
+ height: calc(100% - 56px);
76
+ max-height: 100%;
77
+ width: 100%;
78
+ overflow-y: auto;
79
+ }
80
+
81
+ .modal-footer {
82
+ border-top: 1px solid rgba(0,0,0,.1);
83
+ position: absolute;
84
+ bottom: 0;
85
+ }
86
+ }
87
+
88
+ // Modal Bottom Sheet Style
89
+ .modal.bottom-sheet {
90
+ top: auto;
91
+ bottom: -100%;
92
+ margin: 0;
93
+ width: 100%;
94
+ max-height: 45%;
95
+ border-radius: 0;
96
+ will-change: bottom, opacity;
97
+ }
@@ -0,0 +1,211 @@
1
+ @use "variables";
2
+ @use "global";
3
+
4
+ nav {
5
+ &.nav-extended {
6
+ height: auto;
7
+
8
+ .nav-wrapper {
9
+ min-height: variables.$navbar-height-mobile;
10
+ height: auto;
11
+ }
12
+
13
+ .nav-content {
14
+ position: relative;
15
+ line-height: normal;
16
+ }
17
+ }
18
+
19
+ color: variables.$navbar-font-color;
20
+ @extend .z-depth-1 !optional;
21
+ background-color: variables.$primary-color;
22
+ width: 100%;
23
+ height: variables.$navbar-height-mobile;
24
+ line-height: variables.$navbar-line-height-mobile;
25
+
26
+ a { color: variables.$navbar-font-color; }
27
+
28
+ i,
29
+ [class^="mdi-"], [class*="mdi-"],
30
+ i.material-icons {
31
+ display: block;
32
+ font-size: 24px;
33
+ height: variables.$navbar-height-mobile;
34
+ line-height: variables.$navbar-line-height-mobile;
35
+ }
36
+
37
+ .nav-wrapper {
38
+ position: relative;
39
+ height: 100%;
40
+ }
41
+
42
+ @media #{variables.$large-and-up} {
43
+ a.sidenav-trigger { display: none; }
44
+ }
45
+
46
+
47
+ // Collapse button
48
+ .sidenav-trigger {
49
+ float: left;
50
+ position: relative;
51
+ z-index: 1;
52
+ height: variables.$navbar-height-mobile;
53
+ margin: 0 18px;
54
+
55
+ i {
56
+ height: variables.$navbar-height-mobile;
57
+ line-height: variables.$navbar-line-height-mobile;
58
+ }
59
+ }
60
+
61
+
62
+ // Logo
63
+ .brand-logo {
64
+ position: absolute;
65
+ color: variables.$navbar-font-color;
66
+ display: inline-block;
67
+ font-size: variables.$navbar-brand-font-size;
68
+ padding: 0;
69
+
70
+ &.center {
71
+ left: 50%;
72
+ transform: translateX(-50%);
73
+ }
74
+
75
+ @media #{variables.$medium-and-down} {
76
+ left: 50%;
77
+ transform: translateX(-50%);
78
+
79
+ &.left, &.right {
80
+ padding: 0;
81
+ transform: none;
82
+ }
83
+
84
+ &.left { left: 0.5rem; }
85
+ &.right {
86
+ right: 0.5rem;
87
+ left: auto;
88
+ }
89
+ }
90
+
91
+ &.right {
92
+ right: 0.5rem;
93
+ padding: 0;
94
+ }
95
+
96
+ i,
97
+ [class^="mdi-"], [class*="mdi-"],
98
+ i.material-icons {
99
+ float: left;
100
+ margin-right: 15px;
101
+ }
102
+ }
103
+
104
+
105
+ // Title
106
+ .nav-title {
107
+ display: inline-block;
108
+ font-size: 32px;
109
+ padding: 28px 0;
110
+ }
111
+
112
+
113
+ // Navbar Links
114
+ ul {
115
+ margin: 0;
116
+
117
+ li {
118
+ transition: background-color .3s;
119
+ float: left;
120
+ padding: 0;
121
+
122
+ &.active {
123
+ background-color: rgba(0,0,0,.1);
124
+ }
125
+ }
126
+ a {
127
+ transition: background-color .3s;
128
+ font-size: variables.$navbar-font-size;
129
+ color: variables.$navbar-font-color;
130
+ display: block;
131
+ padding: 0 15px;
132
+ cursor: pointer;
133
+
134
+ &.btn, &.btn-large, &.btn-flat, &.btn-floating {
135
+ margin-top: -2px;
136
+ margin-left: 15px;
137
+ margin-right: 15px;
138
+
139
+ & > .material-icons {
140
+ height: inherit;
141
+ line-height: inherit;
142
+ }
143
+ }
144
+
145
+ &:hover {
146
+ background-color: rgba(0,0,0,.1);
147
+ }
148
+ }
149
+
150
+ &.left {
151
+ float: left;
152
+ }
153
+ }
154
+
155
+ // Navbar Search Form
156
+ form {
157
+ height: 100%;
158
+ }
159
+
160
+ .input-field {
161
+ margin: 0;
162
+ height: 100%;
163
+
164
+ input {
165
+ height: 100%;
166
+ font-size: 1.2rem;
167
+ border: none;
168
+ padding-left: 2rem;
169
+
170
+ &:focus, &[type=text]:valid, &[type=password]:valid,
171
+ &[type=email]:valid, &[type=url]:valid, &[type=date]:valid {
172
+ border: none;
173
+ box-shadow: none;
174
+ }
175
+ }
176
+
177
+ label {
178
+ top: 0;
179
+ left: 0;
180
+
181
+ i {
182
+ color: rgba(255,255,255,.7);
183
+ transition: color .3s;
184
+ }
185
+ &.active i { color: variables.$navbar-font-color; }
186
+ }
187
+ }
188
+ }
189
+
190
+ // Fixed Navbar
191
+ .navbar-fixed {
192
+ position: relative;
193
+ height: variables.$navbar-height-mobile;
194
+ z-index: 997;
195
+
196
+ nav {
197
+ position: fixed;
198
+ }
199
+ }
200
+ @media #{variables.$medium-and-up} {
201
+ nav.nav-extended .nav-wrapper {
202
+ min-height: variables.$navbar-height;
203
+ }
204
+ nav, nav .nav-wrapper i, nav a.sidenav-trigger, nav a.sidenav-trigger i {
205
+ height: variables.$navbar-height;
206
+ line-height: variables.$navbar-line-height;
207
+ }
208
+ .navbar-fixed {
209
+ height: variables.$navbar-height;
210
+ }
211
+ }