@materializecss/materialize 2.0.0-alpha → 2.0.1-alpha

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Builds Materialize distribution packages",
4
4
  "author": "Alvin Wang, Alan Chang",
5
5
  "homepage": "https://materializecss.github.io/materialize/",
6
- "version": "2.0.0-alpha",
6
+ "version": "2.0.1-alpha",
7
7
  "main": "dist/js/materialize.js",
8
8
  "style": "dist/css/materialize.css",
9
9
  "sass": "sass/materialize.scss",
@@ -0,0 +1,98 @@
1
+ :root {
2
+ --surface-color: #f3f6fc;
3
+ --background-color: #ffffff;
4
+
5
+ --font-color-main: rgba(0, 0, 0, 0.87);
6
+ --font-color-medium: rgba(0, 0, 0, 0.56);
7
+ --font-color-disabled: rgba(0, 0, 0, 0.38);
8
+
9
+ --font-on-primary-color-main: rgba(255, 255, 255, 0.87);
10
+ --font-on-primary-color-dark-main: rgba(255, 255, 255, 0.87);
11
+ --font-on-primary-color-dark-medium: rgba(255, 255, 255, 0.60);
12
+ --font-on-primary-color-medium: rgba(255, 255, 255, 0.60);
13
+ --font-on-primary-color-disabled: rgba(255, 255, 255, 0.38);
14
+ --font-on-secondary-color-main: rgba(0, 0, 0, 0.87);
15
+
16
+ --hover-color: rgba(0, 0, 0, 0.04);
17
+ --focus-color: rgba(0, 0, 0, 0.12);
18
+ --focus-color-solid: #E0E0E0;
19
+
20
+ --background-color-disabled: rgba(0, 0, 0, 0.12);
21
+ --background-color-level-4dp: rgba(0, 0, 0, 0.09);
22
+ --background-color-level-16dp-solid: var(--surface-color);
23
+ --background-color-slight-emphasis: rgba(0, 0, 0, 0.025); /* stripes in table */
24
+ --background-color-card: var(--surface-color);
25
+
26
+ --tooltip-background-color: #313033;
27
+ --tooltip-font-color: rgba(255, 255, 255, 0.77);
28
+
29
+ --separator-color: #DDDDDD; /* borders between components */
30
+
31
+ --error-color: #F44336;
32
+
33
+ --slider-track-color: rgba(0, 0, 0, 0.26);
34
+ --switch-thumb-off-color: #ffffff;
35
+
36
+ --carousel-indicator-color: rgba(255, 255, 255, 0.45);
37
+ --carousel-indicator-active-color: #FFF;
38
+
39
+ --primary-color: #26a69a;
40
+ --primary-color-dark: #009688;
41
+ --primary-color-numeric: 38, 166, 154;
42
+ --primary-color-raised-hover-solid: #30B0A4;
43
+ --primary-color-raised-focus-solid: #44C4B8;
44
+ --primary-color-font-medium-color: rgba(var(--primary-color-numeric), 0.7);
45
+ --primary-color-font-disabled-color: rgba(var(--primary-color-numeric), 0.4);
46
+ --primary-color-hover-opaque: rgba(var(--primary-color-numeric), 0.06);
47
+ --primary-color-focus-opaque: rgba(var(--primary-color-numeric), 0.18);
48
+
49
+ --secondary-color: #EF5350;
50
+ --secondary-color-hover-solid: #FE625F;
51
+ --secondary-color-focus-solid: #FF7B78;
52
+
53
+ --md_sys_color_on-surface: 28, 27, 31;
54
+ }
55
+
56
+ :root[theme='dark'] {
57
+ --background-color: #121212;
58
+ --surface-color: #242424;
59
+
60
+ --font-color-main: rgba(255, 255, 255, 0.87);
61
+ --font-color-medium: rgba(255, 255, 255, 0.60);
62
+ --font-color-disabled: rgba(255, 255, 255, 0.38);
63
+
64
+ --font-on-primary-color-main: rgba(0, 0, 0, 0.87);
65
+ --font-on-primary-color-dark-main: rgba(255, 255, 255, 0.87);
66
+ --font-on-primary-color-dark-medium: rgba(255, 255, 255, 0.60);
67
+ --font-on-primary-color-medium: rgba(0, 0, 0, 0.56);
68
+ --font-on-primary-color-disabled: rgba(0, 0, 0, 0.38);
69
+
70
+ --hover-color: rgba(255, 255, 255, 0.04);
71
+ --focus-color: rgba(255, 255, 255, 0.12);
72
+ --focus-color-solid: #424242;
73
+
74
+ --background-color-disabled: rgba(255, 255, 255, 0.12);
75
+ --background-color-level-4dp: rgba(255, 255, 255, 0.09);
76
+ --background-color-level-16dp-solid: #262626;
77
+ --background-color-card: var(--surface-color);
78
+ --background-color-slight-emphasis: rgba(255, 255, 255, 0.05);
79
+
80
+ --separator-color: #424242; /* borders between components */
81
+
82
+ --error-color: #CF6679;
83
+
84
+ --slider-track-color: rgba(255, 255, 255, 0.26);
85
+ --switch-thumb-off-color: #bababa;
86
+
87
+ --primary-color: #B39DDB;
88
+ --primary-color-dark: #9575CD;
89
+ --primary-color-numeric: 179, 157, 219;
90
+ --primary-color-raised-hover-solid: #C2ACEA;
91
+ --primary-color-raised-focus-solid: #DBC5FF;
92
+
93
+ --secondary-color: #CDDC39;
94
+ --secondary-color-hover-solid: #DCEB48;
95
+ --secondary-color-focus-solid: #F5FF61;
96
+
97
+ --md_sys_color_on-surface: 230, 225, 229;
98
+ }
package/src/global.ts CHANGED
@@ -27,7 +27,7 @@ import { Waves } from './waves';
27
27
  import { Range } from './range';
28
28
 
29
29
  export class M {
30
- static version = '2.0.0-alpha';
30
+ static version = '2.0.1-alpha';
31
31
 
32
32
  static keys = {
33
33
  TAB: 9,
@@ -382,4 +382,4 @@ export class M {
382
382
  }
383
383
  }
384
384
 
385
- module.exports = M
385
+ export default M;
package/src/tabs.ts CHANGED
@@ -104,7 +104,8 @@ export class Tabs extends Component {
104
104
  // Update the variables with the new link and content
105
105
 
106
106
  this._activeTabLink = tabLink;
107
- this._content = document.querySelector(tabLink.hash);
107
+ if (tabLink.hash)
108
+ this._content = document.querySelector(tabLink.hash);
108
109
  this._tabLinks = this.el.querySelectorAll('li.tab > a');
109
110
  // Make the tab active
110
111
  this._activeTabLink.classList.add('active');
@@ -160,7 +161,7 @@ export class Tabs extends Component {
160
161
  this._activeTabLink.classList.add('active');
161
162
 
162
163
  this._index = Math.max(Array.from(this._tabLinks).indexOf(this._activeTabLink), 0);
163
- if (this._activeTabLink) {
164
+ if (this._activeTabLink && this._activeTabLink.hash) {
164
165
  this._content = document.querySelector(this._activeTabLink.hash);
165
166
  this._content.classList.add('active');
166
167
  }
@@ -173,9 +174,11 @@ export class Tabs extends Component {
173
174
 
174
175
  const tabsContent = [];
175
176
  this._tabLinks.forEach(a => {
176
- const currContent = document.querySelector(a.hash);
177
- currContent.classList.add('carousel-item');
178
- tabsContent.push(currContent);
177
+ if (a.hash) {
178
+ const currContent = document.querySelector(a.hash);
179
+ currContent.classList.add('carousel-item');
180
+ tabsContent.push(currContent);
181
+ }
179
182
  });
180
183
 
181
184
  // Create Carousel-Wrapper around Tab-Contents