kmaterialize 2.0.0 → 2.3.3-1.0.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 (150) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +55 -91
  3. package/components/appbar/_navbar.old.scss +223 -0
  4. package/components/appbar/appbar.css +235 -0
  5. package/components/appbar/appbar.mjs +54 -0
  6. package/components/appbar/appbar.test.mjs +9 -0
  7. package/components/atomic/atomic.mjs +19 -0
  8. package/components/atomic/component.mjs +67 -0
  9. package/components/badge/_badges.scss +75 -0
  10. package/components/badge/badge.mjs +11 -0
  11. package/components/breadcrumb/_breadcrumb.scss +27 -0
  12. package/components/button/_buttons.scss +352 -0
  13. package/components/button/button.mjs +11 -0
  14. package/components/button/buttons.stories.ts +150 -0
  15. package/components/button/buttons.ts +282 -0
  16. package/components/button/examples.iso.js +18 -0
  17. package/components/button/fabSpec.js +65 -0
  18. package/components/button/test-button.mjs +16 -0
  19. package/components/card/_cards.scss +229 -0
  20. package/components/card/card.mjs +10 -0
  21. package/components/card/cards.ts +185 -0
  22. package/components/card/cardsSpec.js +269 -0
  23. package/components/carousel/_carousel.scss +93 -0
  24. package/components/carousel/_slider.scss +119 -0
  25. package/components/carousel/carousel.ts +693 -0
  26. package/components/carousel/carouselSpec.js +61 -0
  27. package/components/carousel/slider.ts +431 -0
  28. package/components/carousel/sliderSpec.js +99 -0
  29. package/components/checkbox/_checkboxes.scss +281 -0
  30. package/components/checkbox/checkbox.mdx +24 -0
  31. package/components/checkbox/checkbox.stories.ts +120 -0
  32. package/components/chip/chip.mjs +37 -0
  33. package/components/chip/chip.test.mjs +10 -0
  34. package/components/chip/chips.css +126 -0
  35. package/components/chip/chips.mdx +33 -0
  36. package/components/chip/chips.ts +440 -0
  37. package/components/chip/chipsSpec.js +165 -0
  38. package/components/chip/readme.md +323 -0
  39. package/components/collapsible/_collapsible.scss +82 -0
  40. package/components/collapsible/collapsible.ts +230 -0
  41. package/components/collapsible/collapsibleSpec.js +240 -0
  42. package/components/datepicker/_datepicker.scss +268 -0
  43. package/components/datepicker/datepicker.ts +1450 -0
  44. package/components/datepicker/datepickerSpec.js +162 -0
  45. package/components/dialog/_materialbox.scss +42 -0
  46. package/components/dialog/_modal.scss +79 -0
  47. package/components/dialog/materialbox.ts +446 -0
  48. package/components/dialog/materialboxSpec.js +37 -0
  49. package/components/dialog/modal.ts +111 -0
  50. package/components/dialog/modalSpec.js +83 -0
  51. package/components/dialog/readme.md +5 -0
  52. package/components/divider/readme.md +15 -0
  53. package/components/dropdown/_dropdown.scss +83 -0
  54. package/components/dropdown/dropdown.ts +653 -0
  55. package/components/dropdown/dropdownSpec.js +108 -0
  56. package/components/list/_collection.scss +114 -0
  57. package/components/list/_list.scss +6 -0
  58. package/components/list/list.mjs +58 -0
  59. package/components/list/list.test.mjs +16 -0
  60. package/components/loading/loading.mjs +26 -0
  61. package/components/loading/loading.test.mjs +10 -0
  62. package/components/navigation-bar/_old +582 -0
  63. package/components/navigation-bar/navigation-bar.mdx +20 -0
  64. package/components/navigation-bar/navigation-bar.stories.ts +39 -0
  65. package/components/navigation-drawer/_sidenav.scss +247 -0
  66. package/components/navigation-drawer/sidenav.ts +546 -0
  67. package/components/navigation-drawer/sidenavSpec.js +124 -0
  68. package/components/pagination/_pagination.scss +47 -0
  69. package/components/progress/_preloader.scss +416 -0
  70. package/components/radio-button/_radio-buttons.scss +112 -0
  71. package/components/radio-button/radio-buttons.mdx +28 -0
  72. package/components/radio-button/radio-buttons.stories.ts +51 -0
  73. package/components/search/autocomplete.ts +620 -0
  74. package/components/search/autocompleteSpec.js +321 -0
  75. package/components/slider/_range.scss +157 -0
  76. package/components/slider/range.ts +216 -0
  77. package/components/snackbar/_toast.scss +68 -0
  78. package/components/snackbar/toastSpec.js +132 -0
  79. package/components/snackbar/toasts.ts +312 -0
  80. package/components/switch/_switches.scss +121 -0
  81. package/components/tabs/_tabs.scss +171 -0
  82. package/components/tabs/tabs.mjs +31 -0
  83. package/components/tabs/tabs.ts +358 -0
  84. package/components/tabs/tabsSpec.js +180 -0
  85. package/components/textfield/_file-input.scss +41 -0
  86. package/components/textfield/_input-fields.scss +368 -0
  87. package/components/textfield/_select.scss +104 -0
  88. package/components/textfield/formfields.css +311 -0
  89. package/components/textfield/forms.ts +182 -0
  90. package/components/textfield/formsSpec.js +142 -0
  91. package/components/textfield/select.ts +472 -0
  92. package/components/textfield/selectSpec.js +390 -0
  93. package/components/textfield/textfield.mjs +29 -0
  94. package/components/textfield/textfield.test.mjs +10 -0
  95. package/components/timepicker/_timepicker.scss +362 -0
  96. package/components/timepicker/timepicker.ts +905 -0
  97. package/components/tooltip/_tooltip.scss +40 -0
  98. package/components/tooltip/tooltip.ts +380 -0
  99. package/components/tooltip/tooltipSpec.js +145 -0
  100. package/dist/css/materialize.colors.min.css +6 -0
  101. package/dist/css/materialize.css +7578 -6326
  102. package/dist/css/materialize.min.css +6 -13
  103. package/dist/css/materialize.min.css.map +1 -0
  104. package/dist/js/materialize.cjs.js +8410 -0
  105. package/dist/js/materialize.d.ts +2625 -0
  106. package/dist/js/materialize.js +8415 -12374
  107. package/dist/js/materialize.min.js +6 -6
  108. package/dist/js/materialize.mjs +8382 -0
  109. package/package.json +82 -47
  110. package/sass/_colors.scss +417 -0
  111. package/sass/_global.scss +490 -0
  112. package/sass/_grid.scss +172 -0
  113. package/sass/_table_of_contents.scss +28 -0
  114. package/sass/_tapTarget.scss +102 -0
  115. package/sass/_typography.scss +58 -0
  116. package/sass/_variables.scss +56 -0
  117. package/sass/materialize.scss +51 -0
  118. package/sass/mixins.module.scss +168 -0
  119. package/extras/noUiSlider/nouislider.css +0 -406
  120. package/extras/noUiSlider/nouislider.js +0 -2147
  121. package/extras/noUiSlider/nouislider.min.js +0 -1
  122. package/js/anime.min.js +0 -34
  123. package/js/autocomplete.js +0 -448
  124. package/js/buttons.js +0 -354
  125. package/js/cards.js +0 -40
  126. package/js/carousel.js +0 -717
  127. package/js/cash.js +0 -960
  128. package/js/characterCounter.js +0 -136
  129. package/js/chips.js +0 -481
  130. package/js/collapsible.js +0 -275
  131. package/js/component.js +0 -44
  132. package/js/datepicker.js +0 -975
  133. package/js/dropdown.js +0 -635
  134. package/js/forms.js +0 -275
  135. package/js/global.js +0 -444
  136. package/js/materialbox.js +0 -453
  137. package/js/modal.js +0 -382
  138. package/js/parallax.js +0 -138
  139. package/js/pushpin.js +0 -148
  140. package/js/range.js +0 -263
  141. package/js/scrollspy.js +0 -295
  142. package/js/select.js +0 -450
  143. package/js/sidenav.js +0 -580
  144. package/js/slider.js +0 -359
  145. package/js/tabs.js +0 -402
  146. package/js/tapTarget.js +0 -314
  147. package/js/timepicker.js +0 -647
  148. package/js/toasts.js +0 -310
  149. package/js/tooltip.js +0 -303
  150. package/js/waves.js +0 -335
@@ -0,0 +1,40 @@
1
+ .material-tooltip {
2
+ padding: 0 8px;
3
+ border-radius: 4px;
4
+ color: var(--md-sys-color-inverse-on-surface);
5
+ background-color: var(--md-sys-color-inverse-surface);
6
+ font-family: var(--md-sys-typescale-body-small-font-family-name);
7
+ font-size: var(--md-sys-typescale-body-small-font-size);
8
+ line-height: var(--md-sys-typescale-body-small-line-height);
9
+ font-weight: var(--md-sys-typescale-body-small-font-weight);
10
+ min-height: 24px;
11
+ opacity: 0;
12
+ padding-top: 6px;
13
+ padding-bottom: 6px;
14
+ font-size: 12px;
15
+ line-height: 16px;
16
+ font-weight: 400;
17
+ letter-spacing: 0.4px;
18
+ position: absolute;
19
+ max-width: 300px;
20
+ overflow: hidden;
21
+ left: 0;
22
+ top: 0;
23
+ pointer-events: none;
24
+ display: flex;
25
+ align-items: center;
26
+ visibility: hidden;
27
+ z-index: 2000;
28
+ }
29
+
30
+ .backdrop {
31
+ position: absolute;
32
+ opacity: 0;
33
+ height: 7px;
34
+ width: 14px;
35
+ border-radius: 0 0 50% 50%;
36
+ background-color: var(--md-sys-color-inverse-surface);
37
+ z-index: -1;
38
+ transform-origin: 50% 0;
39
+ visibility: hidden;
40
+ }
@@ -0,0 +1,380 @@
1
+ import { Utils } from '../../src/utils';
2
+ import { Bounding } from '../../src/bounding';
3
+ import { Component, BaseOptions, InitElements, MElement } from '../../src/component';
4
+
5
+ // TODO: Rewrite this using popover and js only
6
+
7
+ export type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';
8
+
9
+ export interface TooltipOptions extends BaseOptions {
10
+ /**
11
+ * Delay time before tooltip disappears.
12
+ * @default 200
13
+ */
14
+ exitDelay: number;
15
+ /**
16
+ * Delay time before tooltip appears.
17
+ * @default 0
18
+ */
19
+ enterDelay: number;
20
+ /**
21
+ * Element Id for the tooltip.
22
+ * @default ""
23
+ */
24
+ tooltipId?: string;
25
+ /**
26
+ * Text string for the tooltip.
27
+ * @default ""
28
+ */
29
+ text: string;
30
+ /**
31
+ * Set distance tooltip appears away from its activator
32
+ * excluding transitionMovement.
33
+ * @default 5
34
+ */
35
+ margin: number;
36
+ /**
37
+ * Enter transition duration.
38
+ * @default 300
39
+ */
40
+ inDuration: number;
41
+ /**
42
+ * Opacity of the tooltip.
43
+ * @default 1
44
+ */
45
+ opacity: number;
46
+ /**
47
+ * Exit transition duration.
48
+ * @default 250
49
+ */
50
+ outDuration: number;
51
+ /**
52
+ * Set the direction of the tooltip.
53
+ * @default 'bottom'
54
+ */
55
+ position: TooltipPosition;
56
+ /**
57
+ * Amount in px that the tooltip moves during its transition.
58
+ * @default 10
59
+ */
60
+ transitionMovement: number;
61
+ }
62
+
63
+ const _defaults: TooltipOptions = {
64
+ exitDelay: 200,
65
+ enterDelay: 0,
66
+ text: '',
67
+ margin: 5,
68
+ inDuration: 250,
69
+ outDuration: 200,
70
+ position: 'bottom' as TooltipPosition,
71
+ transitionMovement: 10,
72
+ opacity: 1
73
+ };
74
+
75
+ export class Tooltip extends Component<TooltipOptions> {
76
+ /**
77
+ * If tooltip is open.
78
+ */
79
+ isOpen: boolean;
80
+ /**
81
+ * If tooltip is hovered.
82
+ */
83
+ isHovered: boolean;
84
+ /**
85
+ * If tooltip is focused.
86
+ */
87
+ isFocused: boolean;
88
+ tooltipEl: HTMLElement;
89
+ private _exitDelayTimeout: string | number | NodeJS.Timeout;
90
+ private _enterDelayTimeout: string | number | NodeJS.Timeout;
91
+ xMovement: number;
92
+ yMovement: number;
93
+
94
+ constructor(el: HTMLElement, options: Partial<TooltipOptions>) {
95
+ super(el, options, Tooltip);
96
+ this.el['M_Tooltip'] = this;
97
+
98
+ this.options = {
99
+ ...Tooltip.defaults,
100
+ ...this._getAttributeOptions(),
101
+ ...options
102
+ };
103
+
104
+ this.isOpen = false;
105
+ this.isHovered = false;
106
+ this.isFocused = false;
107
+ this._appendTooltipEl();
108
+ this._setupEventHandlers();
109
+ }
110
+
111
+ static get defaults(): TooltipOptions {
112
+ return _defaults;
113
+ }
114
+
115
+ /**
116
+ * Initializes instance of Tooltip.
117
+ * @param el HTML element.
118
+ * @param options Component options.
119
+ */
120
+ static init(el: HTMLElement, options?: Partial<TooltipOptions>): Tooltip;
121
+ /**
122
+ * Initializes instances of Tooltip.
123
+ * @param els HTML elements.
124
+ * @param options Component options.
125
+ */
126
+ static init(els: InitElements<MElement>, options?: Partial<TooltipOptions>): Tooltip[];
127
+ /**
128
+ * Initializes instances of Tooltip.
129
+ * @param els HTML elements.
130
+ * @param options Component options.
131
+ */
132
+ static init(
133
+ els: HTMLElement | InitElements<MElement>,
134
+ options: Partial<TooltipOptions> = {}
135
+ ): Tooltip | Tooltip[] {
136
+ return super.init(els, options, Tooltip);
137
+ }
138
+
139
+ static getInstance(el: HTMLElement): Tooltip {
140
+ return el['M_Tooltip'];
141
+ }
142
+
143
+ destroy() {
144
+ this.tooltipEl.remove();
145
+ this._removeEventHandlers();
146
+ this.el['M_Tooltip'] = undefined;
147
+ }
148
+
149
+ _appendTooltipEl() {
150
+ this.tooltipEl = document.createElement('div');
151
+ this.tooltipEl.classList.add('material-tooltip');
152
+
153
+ const tooltipContentEl = this.options.tooltipId
154
+ ? document.getElementById(this.options.tooltipId)
155
+ : document.createElement('div');
156
+ this.tooltipEl.append(tooltipContentEl);
157
+ tooltipContentEl.style.display = '';
158
+
159
+ tooltipContentEl.classList.add('tooltip-content');
160
+ this._setTooltipContent(tooltipContentEl);
161
+ this.tooltipEl.appendChild(tooltipContentEl);
162
+ document.body.appendChild(this.tooltipEl);
163
+ }
164
+
165
+ _setTooltipContent(tooltipContentEl: HTMLElement) {
166
+ if (this.options.tooltipId) return;
167
+ tooltipContentEl.innerText = this.options.text;
168
+ }
169
+
170
+ _updateTooltipContent() {
171
+ this._setTooltipContent(this.tooltipEl.querySelector('.tooltip-content'));
172
+ }
173
+
174
+ _setupEventHandlers() {
175
+ this.el.addEventListener('mouseenter', this._handleMouseEnter);
176
+ this.el.addEventListener('mouseleave', this._handleMouseLeave);
177
+ this.el.addEventListener('focus', this._handleFocus, true);
178
+ this.el.addEventListener('blur', this._handleBlur, true);
179
+ }
180
+
181
+ _removeEventHandlers() {
182
+ this.el.removeEventListener('mouseenter', this._handleMouseEnter);
183
+ this.el.removeEventListener('mouseleave', this._handleMouseLeave);
184
+ this.el.removeEventListener('focus', this._handleFocus, true);
185
+ this.el.removeEventListener('blur', this._handleBlur, true);
186
+ }
187
+
188
+ /**
189
+ * Show tooltip.
190
+ */
191
+ open = (isManual: boolean) => {
192
+ if (this.isOpen) return;
193
+ isManual = isManual === undefined ? true : undefined; // Default value true
194
+ this.isOpen = true;
195
+ // Update tooltip content with HTML attribute options
196
+ this.options = { ...this.options, ...this._getAttributeOptions() };
197
+ this._updateTooltipContent();
198
+ this._setEnterDelayTimeout(isManual);
199
+ };
200
+
201
+ /**
202
+ * Hide tooltip.
203
+ */
204
+ close = () => {
205
+ if (!this.isOpen) return;
206
+ this.isHovered = false;
207
+ this.isFocused = false;
208
+ this.isOpen = false;
209
+ this._setExitDelayTimeout();
210
+ };
211
+
212
+ _setExitDelayTimeout() {
213
+ clearTimeout(this._exitDelayTimeout);
214
+ this._exitDelayTimeout = setTimeout(() => {
215
+ if (this.isHovered || this.isFocused) return;
216
+ this._animateOut();
217
+ }, this.options.exitDelay);
218
+ }
219
+
220
+ _setEnterDelayTimeout(isManual) {
221
+ clearTimeout(this._enterDelayTimeout);
222
+ this._enterDelayTimeout = setTimeout(() => {
223
+ if (!this.isHovered && !this.isFocused && !isManual) return;
224
+ this._animateIn();
225
+ }, this.options.enterDelay);
226
+ }
227
+
228
+ _positionTooltip() {
229
+ const tooltip: HTMLElement = this.tooltipEl;
230
+ const origin = this.el as HTMLElement,
231
+ originHeight = origin.offsetHeight,
232
+ originWidth = origin.offsetWidth,
233
+ tooltipHeight = tooltip.offsetHeight,
234
+ tooltipWidth = tooltip.offsetWidth,
235
+ margin = this.options.margin;
236
+
237
+ this.xMovement = 0;
238
+ this.yMovement = 0;
239
+
240
+ let targetTop = origin.getBoundingClientRect().top + Utils.getDocumentScrollTop();
241
+ let targetLeft = origin.getBoundingClientRect().left + Utils.getDocumentScrollLeft();
242
+ if (this.options.position === 'top') {
243
+ targetTop += -tooltipHeight - margin;
244
+ targetLeft += originWidth / 2 - tooltipWidth / 2;
245
+ this.yMovement = -this.options.transitionMovement;
246
+ } else if (this.options.position === 'right') {
247
+ targetTop += originHeight / 2 - tooltipHeight / 2;
248
+ targetLeft += originWidth + margin;
249
+ this.xMovement = this.options.transitionMovement;
250
+ } else if (this.options.position === 'left') {
251
+ targetTop += originHeight / 2 - tooltipHeight / 2;
252
+ targetLeft += -tooltipWidth - margin;
253
+ this.xMovement = -this.options.transitionMovement;
254
+ } else {
255
+ targetTop += originHeight + margin;
256
+ targetLeft += originWidth / 2 - tooltipWidth / 2;
257
+ this.yMovement = this.options.transitionMovement;
258
+ }
259
+
260
+ const newCoordinates = this._repositionWithinScreen(
261
+ targetLeft,
262
+ targetTop,
263
+ tooltipWidth,
264
+ tooltipHeight
265
+ );
266
+
267
+ tooltip.style.top = newCoordinates.y + 'px';
268
+ tooltip.style.left = newCoordinates.x + 'px';
269
+ }
270
+
271
+ _repositionWithinScreen(x: number, y: number, width: number, height: number) {
272
+ const scrollLeft = Utils.getDocumentScrollLeft();
273
+ const scrollTop = Utils.getDocumentScrollTop();
274
+ let newX = x - scrollLeft;
275
+ let newY = y - scrollTop;
276
+
277
+ const bounding: Bounding = {
278
+ left: newX,
279
+ top: newY,
280
+ width: width,
281
+ height: height
282
+ };
283
+ const offset = this.options.margin + this.options.transitionMovement;
284
+ const edges = Utils.checkWithinContainer(document.body, bounding, offset);
285
+
286
+ if (edges.left) {
287
+ newX = offset;
288
+ } else if (edges.right) {
289
+ newX -= newX + width - window.innerWidth;
290
+ }
291
+ if (edges.top) {
292
+ newY = offset;
293
+ } else if (edges.bottom) {
294
+ newY -= newY + height - window.innerHeight;
295
+ }
296
+ return {
297
+ x: newX + scrollLeft,
298
+ y: newY + scrollTop
299
+ };
300
+ }
301
+
302
+ _animateIn() {
303
+ this._positionTooltip();
304
+ this.tooltipEl.style.visibility = 'visible';
305
+ const duration = this.options.inDuration;
306
+ // easeOutCubic
307
+ this.tooltipEl.style.transition = `
308
+ transform ${duration}ms ease-out,
309
+ opacity ${duration}ms ease-out`;
310
+ setTimeout(() => {
311
+ this.tooltipEl.style.transform = `translateX(${this.xMovement}px) translateY(${this.yMovement}px)`;
312
+ this.tooltipEl.style.opacity = (this.options.opacity || 1).toString();
313
+ }, 1);
314
+ }
315
+
316
+ _animateOut() {
317
+ const duration = this.options.outDuration;
318
+ // easeOutCubic
319
+ this.tooltipEl.style.transition = `
320
+ transform ${duration}ms ease-out,
321
+ opacity ${duration}ms ease-out`;
322
+ setTimeout(() => {
323
+ this.tooltipEl.style.transform = `translateX(0px) translateY(0px)`;
324
+ this.tooltipEl.style.opacity = '0';
325
+ }, 1);
326
+ /*
327
+ anim.remove(this.tooltipEl);
328
+ anim({
329
+ targets: this.tooltipEl,
330
+ opacity: 0,
331
+ translateX: 0,
332
+ translateY: 0,
333
+ duration: this.options.outDuration,
334
+ easing: 'easeOutCubic'
335
+ });
336
+ */
337
+ }
338
+
339
+ _handleMouseEnter = () => {
340
+ this.isHovered = true;
341
+ this.isFocused = false; // Allows close of tooltip when opened by focus.
342
+ this.open(false);
343
+ };
344
+
345
+ _handleMouseLeave = () => {
346
+ this.isHovered = false;
347
+ this.isFocused = false; // Allows close of tooltip when opened by focus.
348
+ this.close();
349
+ };
350
+
351
+ _handleFocus = () => {
352
+ if (Utils.tabPressed) {
353
+ this.isFocused = true;
354
+ this.open(false);
355
+ }
356
+ };
357
+
358
+ _handleBlur = () => {
359
+ this.isFocused = false;
360
+ this.close();
361
+ };
362
+
363
+ _getAttributeOptions(): Partial<TooltipOptions> {
364
+ const attributeOptions: Partial<TooltipOptions> = {};
365
+ const tooltipTextOption = this.el.getAttribute('data-tooltip');
366
+ const tooltipId = this.el.getAttribute('data-tooltip-id');
367
+ const positionOption = this.el.getAttribute('data-position');
368
+ if (tooltipTextOption) {
369
+ attributeOptions.text = tooltipTextOption;
370
+ }
371
+ if (positionOption) {
372
+ attributeOptions.position = positionOption as TooltipPosition;
373
+ }
374
+ if (tooltipId) {
375
+ attributeOptions.tooltipId = tooltipId;
376
+ }
377
+
378
+ return attributeOptions;
379
+ }
380
+ }
@@ -0,0 +1,145 @@
1
+ describe('Tooltip:', () => {
2
+ const fixture = `<a
3
+ id="test"
4
+ class="btn tooltipped"
5
+ data-position="bottom"
6
+ data-delay="50"
7
+ data-tooltip="I am tooltip">
8
+ Hover me!
9
+ </a>
10
+
11
+ <a
12
+ id="test1"
13
+ class="btn tooltipped"
14
+ data-position="bottom"
15
+ data-delay="50"
16
+ data-tooltip="I am a tooltip that is really really long so that I would definitely overflow off the screen if I were not smart!">
17
+ Hover me!
18
+ </a>
19
+
20
+ <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
21
+ <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
22
+ <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
23
+ <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
24
+
25
+ <div style="position: fixed; top: 50%; left: 50%;">
26
+ <a
27
+ id="test2"
28
+ class="btn tooltipped"
29
+ data-position="bottom"
30
+ data-delay="50"
31
+ data-tooltip="Fixed position tooltip">
32
+ Hover me!
33
+ </a>
34
+ </div>`;
35
+
36
+ beforeEach(() => {
37
+ XloadHtml(fixture);
38
+ M.Tooltip.init(document.querySelectorAll('.tooltipped'), {
39
+ enterDelay: 0,
40
+ exitDelay: 0,
41
+ inDuration: 0,
42
+ outDuration: 0
43
+ });
44
+ });
45
+ afterEach(() => XunloadFixtures());
46
+
47
+ describe('opens and closes properly', () => {
48
+ it('shows tooltip on mouse enter', (done) => {
49
+ const tooltippedBtn = document.querySelector('#test');
50
+ const tooltip = M.Tooltip.getInstance(tooltippedBtn).tooltipEl;
51
+ mouseenter(tooltippedBtn);
52
+ setTimeout(() => {
53
+ expect(tooltip).toBeVisible('because mouse entered tooltipped btn');
54
+ expect(tooltip.querySelector('.tooltip-content').innerText).toBe(
55
+ 'I am tooltip',
56
+ 'because that is the defined text in the html attribute'
57
+ );
58
+ mouseleave(tooltippedBtn);
59
+ setTimeout(() => {
60
+ expect(tooltip).toBeVisible('because mouse left tooltipped btn');
61
+ done();
62
+ }, 10);
63
+ }, 10);
64
+ });
65
+
66
+ it('should place tooltips on the bottom within the screen bounds', (done) => {
67
+ const tooltippedBtn = document.querySelector('#test1');
68
+ const tooltip = M.Tooltip.getInstance(tooltippedBtn).tooltipEl;
69
+ mouseenter(tooltippedBtn);
70
+ // tooltippedBtn.trigger('mouseenter');
71
+ setTimeout(() => {
72
+ const tooltipRect = tooltip.getBoundingClientRect();
73
+ const tooltippedBtnRect = tooltippedBtn.getBoundingClientRect();
74
+ // Check window bounds
75
+ expect(tooltipRect.top).toBeGreaterThanOrEqual(0);
76
+ expect(tooltipRect.bottom).toBeLessThanOrEqual(window.innerHeight);
77
+ expect(tooltipRect.left).toBeGreaterThanOrEqual(0);
78
+ expect(tooltipRect.right).toBeLessThanOrEqual(window.innerWidth);
79
+ // check if tooltip is under btn
80
+ expect(tooltipRect.top).toBeGreaterThan(tooltippedBtnRect.bottom);
81
+ done();
82
+ }, 10);
83
+ });
84
+
85
+ it('removes tooltip dom object', () => {
86
+ const tooltippedBtn = document.querySelector('#test1');
87
+ M.Tooltip.getInstance(tooltippedBtn).destroy();
88
+ // Check DOM element is removed
89
+ const tooltipInstance = M.Tooltip.getInstance(tooltippedBtn);
90
+ expect(tooltipInstance).toBe(undefined);
91
+ });
92
+
93
+ it('changes position attribute dynamically and positions tooltips on the right correctly', (done) => {
94
+ const tooltippedBtn = document.querySelector('#test');
95
+ tooltippedBtn.setAttribute('data-position', 'right');
96
+ const tooltip = M.Tooltip.getInstance(tooltippedBtn).tooltipEl;
97
+ mouseenter(tooltippedBtn);
98
+ setTimeout(() => {
99
+ const tooltipRect = tooltip.getBoundingClientRect();
100
+ const tooltippedBtnRect = tooltippedBtn.getBoundingClientRect();
101
+ expect(tooltipRect.left).toBeGreaterThan(tooltippedBtnRect.right);
102
+ done();
103
+ }, 10);
104
+ });
105
+
106
+ it('accepts delay option from javascript initialization', (done) => {
107
+ const tooltippedBtn = document.querySelector('#test');
108
+ tooltippedBtn.removeAttribute('data-delay');
109
+ M.Tooltip.init(tooltippedBtn, { enterDelay: 200 });
110
+ const tooltip = M.Tooltip.getInstance(tooltippedBtn).tooltipEl;
111
+ mouseenter(tooltippedBtn);
112
+ setTimeout(() => {
113
+ const tooltipVisibility = getComputedStyle(tooltip).getPropertyValue('visibility');
114
+ expect(tooltipVisibility).toBe('hidden', 'because the delay is 200 seconds');
115
+ }, 150);
116
+ setTimeout(() => {
117
+ expect(tooltip).toBeVisible('because 200 seconds has passed');
118
+ done();
119
+ }, 250);
120
+ });
121
+
122
+ it('works with a fixed position parent', (done) => {
123
+ const tooltippedBtn = document.querySelector('#test2');
124
+ const tooltip = M.Tooltip.getInstance(tooltippedBtn).tooltipEl;
125
+ mouseenter(tooltippedBtn);
126
+ setTimeout(() => {
127
+ const tooltipRect = tooltip.getBoundingClientRect();
128
+ const tooltippedBtnRect = tooltippedBtn.getBoundingClientRect();
129
+ const verticalDiff = tooltipRect.top - tooltippedBtnRect.top;
130
+ const horizontalDiff =
131
+ tooltipRect.left +
132
+ tooltipRect.width / 2 -
133
+ (tooltippedBtnRect.left + tooltippedBtnRect.width / 2);
134
+ // 52 is magic number for tooltip vertical offset... increased to 100
135
+ expect(verticalDiff > 0 && verticalDiff < 100).toBeTruthy(
136
+ 'top position in fixed to be correct'
137
+ );
138
+ expect(horizontalDiff > -1 && horizontalDiff < 1).toBeTruthy(
139
+ 'left position in fixed to be correct'
140
+ );
141
+ done();
142
+ }, 10);
143
+ });
144
+ });
145
+ });
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Materialize v2.3.3-1.0.0 (https://materializeweb.com)
3
+ * Copyright 2014-2026 Materialize
4
+ * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
5
+ */
6
+ .materialize-red{background-color:#e51c23 !important}.materialize-red-text{color:#e51c23 !important}.materialize-red.lighten-5{background-color:#fdeaeb !important}.materialize-red-text.text-lighten-5{color:#fdeaeb !important}.materialize-red.lighten-4{background-color:#f8c1c3 !important}.materialize-red-text.text-lighten-4{color:#f8c1c3 !important}.materialize-red.lighten-3{background-color:#f3989b !important}.materialize-red-text.text-lighten-3{color:#f3989b !important}.materialize-red.lighten-2{background-color:#ee6e73 !important}.materialize-red-text.text-lighten-2{color:#ee6e73 !important}.materialize-red.lighten-1{background-color:#ea454b !important}.materialize-red-text.text-lighten-1{color:#ea454b !important}.materialize-red.darken-1{background-color:#d0181e !important}.materialize-red-text.text-darken-1{color:#d0181e !important}.materialize-red.darken-2{background-color:#b9151b !important}.materialize-red-text.text-darken-2{color:#b9151b !important}.materialize-red.darken-3{background-color:#a21318 !important}.materialize-red-text.text-darken-3{color:#a21318 !important}.materialize-red.darken-4{background-color:#8b1014 !important}.materialize-red-text.text-darken-4{color:#8b1014 !important}.red{background-color:#f44336 !important}.red-text{color:#f44336 !important}.red.lighten-5{background-color:#ffebee !important}.red-text.text-lighten-5{color:#ffebee !important}.red.lighten-4{background-color:#ffcdd2 !important}.red-text.text-lighten-4{color:#ffcdd2 !important}.red.lighten-3{background-color:#ef9a9a !important}.red-text.text-lighten-3{color:#ef9a9a !important}.red.lighten-2{background-color:#e57373 !important}.red-text.text-lighten-2{color:#e57373 !important}.red.lighten-1{background-color:#ef5350 !important}.red-text.text-lighten-1{color:#ef5350 !important}.red.darken-1{background-color:#e53935 !important}.red-text.text-darken-1{color:#e53935 !important}.red.darken-2{background-color:#d32f2f !important}.red-text.text-darken-2{color:#d32f2f !important}.red.darken-3{background-color:#c62828 !important}.red-text.text-darken-3{color:#c62828 !important}.red.darken-4{background-color:#b71c1c !important}.red-text.text-darken-4{color:#b71c1c !important}.red.accent-1{background-color:#ff8a80 !important}.red-text.text-accent-1{color:#ff8a80 !important}.red.accent-2{background-color:#ff5252 !important}.red-text.text-accent-2{color:#ff5252 !important}.red.accent-3{background-color:#ff1744 !important}.red-text.text-accent-3{color:#ff1744 !important}.red.accent-4{background-color:#d50000 !important}.red-text.text-accent-4{color:#d50000 !important}.pink{background-color:#e91e63 !important}.pink-text{color:#e91e63 !important}.pink.lighten-5{background-color:#fce4ec !important}.pink-text.text-lighten-5{color:#fce4ec !important}.pink.lighten-4{background-color:#f8bbd0 !important}.pink-text.text-lighten-4{color:#f8bbd0 !important}.pink.lighten-3{background-color:#f48fb1 !important}.pink-text.text-lighten-3{color:#f48fb1 !important}.pink.lighten-2{background-color:#f06292 !important}.pink-text.text-lighten-2{color:#f06292 !important}.pink.lighten-1{background-color:#ec407a !important}.pink-text.text-lighten-1{color:#ec407a !important}.pink.darken-1{background-color:#d81b60 !important}.pink-text.text-darken-1{color:#d81b60 !important}.pink.darken-2{background-color:#c2185b !important}.pink-text.text-darken-2{color:#c2185b !important}.pink.darken-3{background-color:#ad1457 !important}.pink-text.text-darken-3{color:#ad1457 !important}.pink.darken-4{background-color:#880e4f !important}.pink-text.text-darken-4{color:#880e4f !important}.pink.accent-1{background-color:#ff80ab !important}.pink-text.text-accent-1{color:#ff80ab !important}.pink.accent-2{background-color:#ff4081 !important}.pink-text.text-accent-2{color:#ff4081 !important}.pink.accent-3{background-color:#f50057 !important}.pink-text.text-accent-3{color:#f50057 !important}.pink.accent-4{background-color:#c51162 !important}.pink-text.text-accent-4{color:#c51162 !important}.purple{background-color:#9c27b0 !important}.purple-text{color:#9c27b0 !important}.purple.lighten-5{background-color:#f3e5f5 !important}.purple-text.text-lighten-5{color:#f3e5f5 !important}.purple.lighten-4{background-color:#e1bee7 !important}.purple-text.text-lighten-4{color:#e1bee7 !important}.purple.lighten-3{background-color:#ce93d8 !important}.purple-text.text-lighten-3{color:#ce93d8 !important}.purple.lighten-2{background-color:#ba68c8 !important}.purple-text.text-lighten-2{color:#ba68c8 !important}.purple.lighten-1{background-color:#ab47bc !important}.purple-text.text-lighten-1{color:#ab47bc !important}.purple.darken-1{background-color:#8e24aa !important}.purple-text.text-darken-1{color:#8e24aa !important}.purple.darken-2{background-color:#7b1fa2 !important}.purple-text.text-darken-2{color:#7b1fa2 !important}.purple.darken-3{background-color:#6a1b9a !important}.purple-text.text-darken-3{color:#6a1b9a !important}.purple.darken-4{background-color:#4a148c !important}.purple-text.text-darken-4{color:#4a148c !important}.purple.accent-1{background-color:#ea80fc !important}.purple-text.text-accent-1{color:#ea80fc !important}.purple.accent-2{background-color:#e040fb !important}.purple-text.text-accent-2{color:#e040fb !important}.purple.accent-3{background-color:#d500f9 !important}.purple-text.text-accent-3{color:#d500f9 !important}.purple.accent-4{background-color:#a0f !important}.purple-text.text-accent-4{color:#a0f !important}.deep-purple{background-color:#673ab7 !important}.deep-purple-text{color:#673ab7 !important}.deep-purple.lighten-5{background-color:#ede7f6 !important}.deep-purple-text.text-lighten-5{color:#ede7f6 !important}.deep-purple.lighten-4{background-color:#d1c4e9 !important}.deep-purple-text.text-lighten-4{color:#d1c4e9 !important}.deep-purple.lighten-3{background-color:#b39ddb !important}.deep-purple-text.text-lighten-3{color:#b39ddb !important}.deep-purple.lighten-2{background-color:#9575cd !important}.deep-purple-text.text-lighten-2{color:#9575cd !important}.deep-purple.lighten-1{background-color:#7e57c2 !important}.deep-purple-text.text-lighten-1{color:#7e57c2 !important}.deep-purple.darken-1{background-color:#5e35b1 !important}.deep-purple-text.text-darken-1{color:#5e35b1 !important}.deep-purple.darken-2{background-color:#512da8 !important}.deep-purple-text.text-darken-2{color:#512da8 !important}.deep-purple.darken-3{background-color:#4527a0 !important}.deep-purple-text.text-darken-3{color:#4527a0 !important}.deep-purple.darken-4{background-color:#311b92 !important}.deep-purple-text.text-darken-4{color:#311b92 !important}.deep-purple.accent-1{background-color:#b388ff !important}.deep-purple-text.text-accent-1{color:#b388ff !important}.deep-purple.accent-2{background-color:#7c4dff !important}.deep-purple-text.text-accent-2{color:#7c4dff !important}.deep-purple.accent-3{background-color:#651fff !important}.deep-purple-text.text-accent-3{color:#651fff !important}.deep-purple.accent-4{background-color:#6200ea !important}.deep-purple-text.text-accent-4{color:#6200ea !important}.indigo{background-color:#3f51b5 !important}.indigo-text{color:#3f51b5 !important}.indigo.lighten-5{background-color:#e8eaf6 !important}.indigo-text.text-lighten-5{color:#e8eaf6 !important}.indigo.lighten-4{background-color:#c5cae9 !important}.indigo-text.text-lighten-4{color:#c5cae9 !important}.indigo.lighten-3{background-color:#9fa8da !important}.indigo-text.text-lighten-3{color:#9fa8da !important}.indigo.lighten-2{background-color:#7986cb !important}.indigo-text.text-lighten-2{color:#7986cb !important}.indigo.lighten-1{background-color:#5c6bc0 !important}.indigo-text.text-lighten-1{color:#5c6bc0 !important}.indigo.darken-1{background-color:#3949ab !important}.indigo-text.text-darken-1{color:#3949ab !important}.indigo.darken-2{background-color:#303f9f !important}.indigo-text.text-darken-2{color:#303f9f !important}.indigo.darken-3{background-color:#283593 !important}.indigo-text.text-darken-3{color:#283593 !important}.indigo.darken-4{background-color:#1a237e !important}.indigo-text.text-darken-4{color:#1a237e !important}.indigo.accent-1{background-color:#8c9eff !important}.indigo-text.text-accent-1{color:#8c9eff !important}.indigo.accent-2{background-color:#536dfe !important}.indigo-text.text-accent-2{color:#536dfe !important}.indigo.accent-3{background-color:#3d5afe !important}.indigo-text.text-accent-3{color:#3d5afe !important}.indigo.accent-4{background-color:#304ffe !important}.indigo-text.text-accent-4{color:#304ffe !important}.blue{background-color:#2196f3 !important}.blue-text{color:#2196f3 !important}.blue.lighten-5{background-color:#e3f2fd !important}.blue-text.text-lighten-5{color:#e3f2fd !important}.blue.lighten-4{background-color:#bbdefb !important}.blue-text.text-lighten-4{color:#bbdefb !important}.blue.lighten-3{background-color:#90caf9 !important}.blue-text.text-lighten-3{color:#90caf9 !important}.blue.lighten-2{background-color:#64b5f6 !important}.blue-text.text-lighten-2{color:#64b5f6 !important}.blue.lighten-1{background-color:#42a5f5 !important}.blue-text.text-lighten-1{color:#42a5f5 !important}.blue.darken-1{background-color:#1e88e5 !important}.blue-text.text-darken-1{color:#1e88e5 !important}.blue.darken-2{background-color:#1976d2 !important}.blue-text.text-darken-2{color:#1976d2 !important}.blue.darken-3{background-color:#1565c0 !important}.blue-text.text-darken-3{color:#1565c0 !important}.blue.darken-4{background-color:#0d47a1 !important}.blue-text.text-darken-4{color:#0d47a1 !important}.blue.accent-1{background-color:#82b1ff !important}.blue-text.text-accent-1{color:#82b1ff !important}.blue.accent-2{background-color:#448aff !important}.blue-text.text-accent-2{color:#448aff !important}.blue.accent-3{background-color:#2979ff !important}.blue-text.text-accent-3{color:#2979ff !important}.blue.accent-4{background-color:#2962ff !important}.blue-text.text-accent-4{color:#2962ff !important}.light-blue{background-color:#03a9f4 !important}.light-blue-text{color:#03a9f4 !important}.light-blue.lighten-5{background-color:#e1f5fe !important}.light-blue-text.text-lighten-5{color:#e1f5fe !important}.light-blue.lighten-4{background-color:#b3e5fc !important}.light-blue-text.text-lighten-4{color:#b3e5fc !important}.light-blue.lighten-3{background-color:#81d4fa !important}.light-blue-text.text-lighten-3{color:#81d4fa !important}.light-blue.lighten-2{background-color:#4fc3f7 !important}.light-blue-text.text-lighten-2{color:#4fc3f7 !important}.light-blue.lighten-1{background-color:#29b6f6 !important}.light-blue-text.text-lighten-1{color:#29b6f6 !important}.light-blue.darken-1{background-color:#039be5 !important}.light-blue-text.text-darken-1{color:#039be5 !important}.light-blue.darken-2{background-color:#0288d1 !important}.light-blue-text.text-darken-2{color:#0288d1 !important}.light-blue.darken-3{background-color:#0277bd !important}.light-blue-text.text-darken-3{color:#0277bd !important}.light-blue.darken-4{background-color:#01579b !important}.light-blue-text.text-darken-4{color:#01579b !important}.light-blue.accent-1{background-color:#80d8ff !important}.light-blue-text.text-accent-1{color:#80d8ff !important}.light-blue.accent-2{background-color:#40c4ff !important}.light-blue-text.text-accent-2{color:#40c4ff !important}.light-blue.accent-3{background-color:#00b0ff !important}.light-blue-text.text-accent-3{color:#00b0ff !important}.light-blue.accent-4{background-color:#0091ea !important}.light-blue-text.text-accent-4{color:#0091ea !important}.cyan{background-color:#00bcd4 !important}.cyan-text{color:#00bcd4 !important}.cyan.lighten-5{background-color:#e0f7fa !important}.cyan-text.text-lighten-5{color:#e0f7fa !important}.cyan.lighten-4{background-color:#b2ebf2 !important}.cyan-text.text-lighten-4{color:#b2ebf2 !important}.cyan.lighten-3{background-color:#80deea !important}.cyan-text.text-lighten-3{color:#80deea !important}.cyan.lighten-2{background-color:#4dd0e1 !important}.cyan-text.text-lighten-2{color:#4dd0e1 !important}.cyan.lighten-1{background-color:#26c6da !important}.cyan-text.text-lighten-1{color:#26c6da !important}.cyan.darken-1{background-color:#00acc1 !important}.cyan-text.text-darken-1{color:#00acc1 !important}.cyan.darken-2{background-color:#0097a7 !important}.cyan-text.text-darken-2{color:#0097a7 !important}.cyan.darken-3{background-color:#00838f !important}.cyan-text.text-darken-3{color:#00838f !important}.cyan.darken-4{background-color:#006064 !important}.cyan-text.text-darken-4{color:#006064 !important}.cyan.accent-1{background-color:#84ffff !important}.cyan-text.text-accent-1{color:#84ffff !important}.cyan.accent-2{background-color:#18ffff !important}.cyan-text.text-accent-2{color:#18ffff !important}.cyan.accent-3{background-color:#00e5ff !important}.cyan-text.text-accent-3{color:#00e5ff !important}.cyan.accent-4{background-color:#00b8d4 !important}.cyan-text.text-accent-4{color:#00b8d4 !important}.teal{background-color:#009688 !important}.teal-text{color:#009688 !important}.teal.lighten-5{background-color:#e0f2f1 !important}.teal-text.text-lighten-5{color:#e0f2f1 !important}.teal.lighten-4{background-color:#b2dfdb !important}.teal-text.text-lighten-4{color:#b2dfdb !important}.teal.lighten-3{background-color:#80cbc4 !important}.teal-text.text-lighten-3{color:#80cbc4 !important}.teal.lighten-2{background-color:#4db6ac !important}.teal-text.text-lighten-2{color:#4db6ac !important}.teal.lighten-1{background-color:#26a69a !important}.teal-text.text-lighten-1{color:#26a69a !important}.teal.darken-1{background-color:#00897b !important}.teal-text.text-darken-1{color:#00897b !important}.teal.darken-2{background-color:#00796b !important}.teal-text.text-darken-2{color:#00796b !important}.teal.darken-3{background-color:#00695c !important}.teal-text.text-darken-3{color:#00695c !important}.teal.darken-4{background-color:#004d40 !important}.teal-text.text-darken-4{color:#004d40 !important}.teal.accent-1{background-color:#a7ffeb !important}.teal-text.text-accent-1{color:#a7ffeb !important}.teal.accent-2{background-color:#64ffda !important}.teal-text.text-accent-2{color:#64ffda !important}.teal.accent-3{background-color:#1de9b6 !important}.teal-text.text-accent-3{color:#1de9b6 !important}.teal.accent-4{background-color:#00bfa5 !important}.teal-text.text-accent-4{color:#00bfa5 !important}.green{background-color:#4caf50 !important}.green-text{color:#4caf50 !important}.green.lighten-5{background-color:#e8f5e9 !important}.green-text.text-lighten-5{color:#e8f5e9 !important}.green.lighten-4{background-color:#c8e6c9 !important}.green-text.text-lighten-4{color:#c8e6c9 !important}.green.lighten-3{background-color:#a5d6a7 !important}.green-text.text-lighten-3{color:#a5d6a7 !important}.green.lighten-2{background-color:#81c784 !important}.green-text.text-lighten-2{color:#81c784 !important}.green.lighten-1{background-color:#66bb6a !important}.green-text.text-lighten-1{color:#66bb6a !important}.green.darken-1{background-color:#43a047 !important}.green-text.text-darken-1{color:#43a047 !important}.green.darken-2{background-color:#388e3c !important}.green-text.text-darken-2{color:#388e3c !important}.green.darken-3{background-color:#2e7d32 !important}.green-text.text-darken-3{color:#2e7d32 !important}.green.darken-4{background-color:#1b5e20 !important}.green-text.text-darken-4{color:#1b5e20 !important}.green.accent-1{background-color:#b9f6ca !important}.green-text.text-accent-1{color:#b9f6ca !important}.green.accent-2{background-color:#69f0ae !important}.green-text.text-accent-2{color:#69f0ae !important}.green.accent-3{background-color:#00e676 !important}.green-text.text-accent-3{color:#00e676 !important}.green.accent-4{background-color:#00c853 !important}.green-text.text-accent-4{color:#00c853 !important}.light-green{background-color:#8bc34a !important}.light-green-text{color:#8bc34a !important}.light-green.lighten-5{background-color:#f1f8e9 !important}.light-green-text.text-lighten-5{color:#f1f8e9 !important}.light-green.lighten-4{background-color:#dcedc8 !important}.light-green-text.text-lighten-4{color:#dcedc8 !important}.light-green.lighten-3{background-color:#c5e1a5 !important}.light-green-text.text-lighten-3{color:#c5e1a5 !important}.light-green.lighten-2{background-color:#aed581 !important}.light-green-text.text-lighten-2{color:#aed581 !important}.light-green.lighten-1{background-color:#9ccc65 !important}.light-green-text.text-lighten-1{color:#9ccc65 !important}.light-green.darken-1{background-color:#7cb342 !important}.light-green-text.text-darken-1{color:#7cb342 !important}.light-green.darken-2{background-color:#689f38 !important}.light-green-text.text-darken-2{color:#689f38 !important}.light-green.darken-3{background-color:#558b2f !important}.light-green-text.text-darken-3{color:#558b2f !important}.light-green.darken-4{background-color:#33691e !important}.light-green-text.text-darken-4{color:#33691e !important}.light-green.accent-1{background-color:#ccff90 !important}.light-green-text.text-accent-1{color:#ccff90 !important}.light-green.accent-2{background-color:#b2ff59 !important}.light-green-text.text-accent-2{color:#b2ff59 !important}.light-green.accent-3{background-color:#76ff03 !important}.light-green-text.text-accent-3{color:#76ff03 !important}.light-green.accent-4{background-color:#64dd17 !important}.light-green-text.text-accent-4{color:#64dd17 !important}.lime{background-color:#cddc39 !important}.lime-text{color:#cddc39 !important}.lime.lighten-5{background-color:#f9fbe7 !important}.lime-text.text-lighten-5{color:#f9fbe7 !important}.lime.lighten-4{background-color:#f0f4c3 !important}.lime-text.text-lighten-4{color:#f0f4c3 !important}.lime.lighten-3{background-color:#e6ee9c !important}.lime-text.text-lighten-3{color:#e6ee9c !important}.lime.lighten-2{background-color:#dce775 !important}.lime-text.text-lighten-2{color:#dce775 !important}.lime.lighten-1{background-color:#d4e157 !important}.lime-text.text-lighten-1{color:#d4e157 !important}.lime.darken-1{background-color:#c0ca33 !important}.lime-text.text-darken-1{color:#c0ca33 !important}.lime.darken-2{background-color:#afb42b !important}.lime-text.text-darken-2{color:#afb42b !important}.lime.darken-3{background-color:#9e9d24 !important}.lime-text.text-darken-3{color:#9e9d24 !important}.lime.darken-4{background-color:#827717 !important}.lime-text.text-darken-4{color:#827717 !important}.lime.accent-1{background-color:#f4ff81 !important}.lime-text.text-accent-1{color:#f4ff81 !important}.lime.accent-2{background-color:#eeff41 !important}.lime-text.text-accent-2{color:#eeff41 !important}.lime.accent-3{background-color:#c6ff00 !important}.lime-text.text-accent-3{color:#c6ff00 !important}.lime.accent-4{background-color:#aeea00 !important}.lime-text.text-accent-4{color:#aeea00 !important}.yellow{background-color:#ffeb3b !important}.yellow-text{color:#ffeb3b !important}.yellow.lighten-5{background-color:#fffde7 !important}.yellow-text.text-lighten-5{color:#fffde7 !important}.yellow.lighten-4{background-color:#fff9c4 !important}.yellow-text.text-lighten-4{color:#fff9c4 !important}.yellow.lighten-3{background-color:#fff59d !important}.yellow-text.text-lighten-3{color:#fff59d !important}.yellow.lighten-2{background-color:#fff176 !important}.yellow-text.text-lighten-2{color:#fff176 !important}.yellow.lighten-1{background-color:#ffee58 !important}.yellow-text.text-lighten-1{color:#ffee58 !important}.yellow.darken-1{background-color:#fdd835 !important}.yellow-text.text-darken-1{color:#fdd835 !important}.yellow.darken-2{background-color:#fbc02d !important}.yellow-text.text-darken-2{color:#fbc02d !important}.yellow.darken-3{background-color:#f9a825 !important}.yellow-text.text-darken-3{color:#f9a825 !important}.yellow.darken-4{background-color:#f57f17 !important}.yellow-text.text-darken-4{color:#f57f17 !important}.yellow.accent-1{background-color:#ffff8d !important}.yellow-text.text-accent-1{color:#ffff8d !important}.yellow.accent-2{background-color:#ff0 !important}.yellow-text.text-accent-2{color:#ff0 !important}.yellow.accent-3{background-color:#ffea00 !important}.yellow-text.text-accent-3{color:#ffea00 !important}.yellow.accent-4{background-color:#ffd600 !important}.yellow-text.text-accent-4{color:#ffd600 !important}.amber{background-color:#ffc107 !important}.amber-text{color:#ffc107 !important}.amber.lighten-5{background-color:#fff8e1 !important}.amber-text.text-lighten-5{color:#fff8e1 !important}.amber.lighten-4{background-color:#ffecb3 !important}.amber-text.text-lighten-4{color:#ffecb3 !important}.amber.lighten-3{background-color:#ffe082 !important}.amber-text.text-lighten-3{color:#ffe082 !important}.amber.lighten-2{background-color:#ffd54f !important}.amber-text.text-lighten-2{color:#ffd54f !important}.amber.lighten-1{background-color:#ffca28 !important}.amber-text.text-lighten-1{color:#ffca28 !important}.amber.darken-1{background-color:#ffb300 !important}.amber-text.text-darken-1{color:#ffb300 !important}.amber.darken-2{background-color:#ffa000 !important}.amber-text.text-darken-2{color:#ffa000 !important}.amber.darken-3{background-color:#ff8f00 !important}.amber-text.text-darken-3{color:#ff8f00 !important}.amber.darken-4{background-color:#ff6f00 !important}.amber-text.text-darken-4{color:#ff6f00 !important}.amber.accent-1{background-color:#ffe57f !important}.amber-text.text-accent-1{color:#ffe57f !important}.amber.accent-2{background-color:#ffd740 !important}.amber-text.text-accent-2{color:#ffd740 !important}.amber.accent-3{background-color:#ffc400 !important}.amber-text.text-accent-3{color:#ffc400 !important}.amber.accent-4{background-color:#ffab00 !important}.amber-text.text-accent-4{color:#ffab00 !important}.orange{background-color:#ff9800 !important}.orange-text{color:#ff9800 !important}.orange.lighten-5{background-color:#fff3e0 !important}.orange-text.text-lighten-5{color:#fff3e0 !important}.orange.lighten-4{background-color:#ffe0b2 !important}.orange-text.text-lighten-4{color:#ffe0b2 !important}.orange.lighten-3{background-color:#ffcc80 !important}.orange-text.text-lighten-3{color:#ffcc80 !important}.orange.lighten-2{background-color:#ffb74d !important}.orange-text.text-lighten-2{color:#ffb74d !important}.orange.lighten-1{background-color:#ffa726 !important}.orange-text.text-lighten-1{color:#ffa726 !important}.orange.darken-1{background-color:#fb8c00 !important}.orange-text.text-darken-1{color:#fb8c00 !important}.orange.darken-2{background-color:#f57c00 !important}.orange-text.text-darken-2{color:#f57c00 !important}.orange.darken-3{background-color:#ef6c00 !important}.orange-text.text-darken-3{color:#ef6c00 !important}.orange.darken-4{background-color:#e65100 !important}.orange-text.text-darken-4{color:#e65100 !important}.orange.accent-1{background-color:#ffd180 !important}.orange-text.text-accent-1{color:#ffd180 !important}.orange.accent-2{background-color:#ffab40 !important}.orange-text.text-accent-2{color:#ffab40 !important}.orange.accent-3{background-color:#ff9100 !important}.orange-text.text-accent-3{color:#ff9100 !important}.orange.accent-4{background-color:#ff6d00 !important}.orange-text.text-accent-4{color:#ff6d00 !important}.deep-orange{background-color:#ff5722 !important}.deep-orange-text{color:#ff5722 !important}.deep-orange.lighten-5{background-color:#fbe9e7 !important}.deep-orange-text.text-lighten-5{color:#fbe9e7 !important}.deep-orange.lighten-4{background-color:#ffccbc !important}.deep-orange-text.text-lighten-4{color:#ffccbc !important}.deep-orange.lighten-3{background-color:#ffab91 !important}.deep-orange-text.text-lighten-3{color:#ffab91 !important}.deep-orange.lighten-2{background-color:#ff8a65 !important}.deep-orange-text.text-lighten-2{color:#ff8a65 !important}.deep-orange.lighten-1{background-color:#ff7043 !important}.deep-orange-text.text-lighten-1{color:#ff7043 !important}.deep-orange.darken-1{background-color:#f4511e !important}.deep-orange-text.text-darken-1{color:#f4511e !important}.deep-orange.darken-2{background-color:#e64a19 !important}.deep-orange-text.text-darken-2{color:#e64a19 !important}.deep-orange.darken-3{background-color:#d84315 !important}.deep-orange-text.text-darken-3{color:#d84315 !important}.deep-orange.darken-4{background-color:#bf360c !important}.deep-orange-text.text-darken-4{color:#bf360c !important}.deep-orange.accent-1{background-color:#ff9e80 !important}.deep-orange-text.text-accent-1{color:#ff9e80 !important}.deep-orange.accent-2{background-color:#ff6e40 !important}.deep-orange-text.text-accent-2{color:#ff6e40 !important}.deep-orange.accent-3{background-color:#ff3d00 !important}.deep-orange-text.text-accent-3{color:#ff3d00 !important}.deep-orange.accent-4{background-color:#dd2c00 !important}.deep-orange-text.text-accent-4{color:#dd2c00 !important}.brown{background-color:#795548 !important}.brown-text{color:#795548 !important}.brown.lighten-5{background-color:#efebe9 !important}.brown-text.text-lighten-5{color:#efebe9 !important}.brown.lighten-4{background-color:#d7ccc8 !important}.brown-text.text-lighten-4{color:#d7ccc8 !important}.brown.lighten-3{background-color:#bcaaa4 !important}.brown-text.text-lighten-3{color:#bcaaa4 !important}.brown.lighten-2{background-color:#a1887f !important}.brown-text.text-lighten-2{color:#a1887f !important}.brown.lighten-1{background-color:#8d6e63 !important}.brown-text.text-lighten-1{color:#8d6e63 !important}.brown.darken-1{background-color:#6d4c41 !important}.brown-text.text-darken-1{color:#6d4c41 !important}.brown.darken-2{background-color:#5d4037 !important}.brown-text.text-darken-2{color:#5d4037 !important}.brown.darken-3{background-color:#4e342e !important}.brown-text.text-darken-3{color:#4e342e !important}.brown.darken-4{background-color:#3e2723 !important}.brown-text.text-darken-4{color:#3e2723 !important}.blue-grey{background-color:#607d8b !important}.blue-grey-text{color:#607d8b !important}.blue-grey.lighten-5{background-color:#eceff1 !important}.blue-grey-text.text-lighten-5{color:#eceff1 !important}.blue-grey.lighten-4{background-color:#cfd8dc !important}.blue-grey-text.text-lighten-4{color:#cfd8dc !important}.blue-grey.lighten-3{background-color:#b0bec5 !important}.blue-grey-text.text-lighten-3{color:#b0bec5 !important}.blue-grey.lighten-2{background-color:#90a4ae !important}.blue-grey-text.text-lighten-2{color:#90a4ae !important}.blue-grey.lighten-1{background-color:#78909c !important}.blue-grey-text.text-lighten-1{color:#78909c !important}.blue-grey.darken-1{background-color:#546e7a !important}.blue-grey-text.text-darken-1{color:#546e7a !important}.blue-grey.darken-2{background-color:#455a64 !important}.blue-grey-text.text-darken-2{color:#455a64 !important}.blue-grey.darken-3{background-color:#37474f !important}.blue-grey-text.text-darken-3{color:#37474f !important}.blue-grey.darken-4{background-color:#263238 !important}.blue-grey-text.text-darken-4{color:#263238 !important}.grey{background-color:#9e9e9e !important}.grey-text{color:#9e9e9e !important}.grey.lighten-5{background-color:#fafafa !important}.grey-text.text-lighten-5{color:#fafafa !important}.grey.lighten-4{background-color:#f5f5f5 !important}.grey-text.text-lighten-4{color:#f5f5f5 !important}.grey.lighten-3{background-color:#eee !important}.grey-text.text-lighten-3{color:#eee !important}.grey.lighten-2{background-color:#e0e0e0 !important}.grey-text.text-lighten-2{color:#e0e0e0 !important}.grey.lighten-1{background-color:#bdbdbd !important}.grey-text.text-lighten-1{color:#bdbdbd !important}.grey.darken-1{background-color:#757575 !important}.grey-text.text-darken-1{color:#757575 !important}.grey.darken-2{background-color:#616161 !important}.grey-text.text-darken-2{color:#616161 !important}.grey.darken-3{background-color:#424242 !important}.grey-text.text-darken-3{color:#424242 !important}.grey.darken-4{background-color:#212121 !important}.grey-text.text-darken-4{color:#212121 !important}.gold{background-color:#a68b4d !important}.gold-text{color:#a68b4d !important}.gold.lighten-5{background-color:#f4f1ea !important}.gold-text.text-lighten-5{color:#f4f1ea !important}.gold.lighten-4{background-color:#e4dcca !important}.gold-text.text-lighten-4{color:#e4dcca !important}.gold.lighten-3{background-color:#d2c5a6 !important}.gold-text.text-lighten-3{color:#d2c5a6 !important}.gold.lighten-2{background-color:#c1ae82 !important}.gold-text.text-lighten-2{color:#c1ae82 !important}.gold.lighten-1{background-color:#b29a64 !important}.gold-text.text-lighten-1{color:#b29a64 !important}.gold.darken-1{background-color:#907943 !important}.gold-text.text-darken-1{color:#907943 !important}.gold.darken-2{background-color:#746136 !important}.gold-text.text-darken-2{color:#746136 !important}.gold.darken-3{background-color:#534626 !important}.gold-text.text-darken-3{color:#534626 !important}.gold.darken-4{background-color:#322a17 !important}.gold-text.text-darken-4{color:#322a17 !important}.black{background-color:#000 !important}.black-text{color:#000 !important}.white{background-color:#fff !important}.white-text{color:#fff !important}.transparent{background-color:rgba(0,0,0,0) !important}.transparent-text{color:rgba(0,0,0,0) !important}