bbdocsmaterialize 0.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.
Binary file
Binary file
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="64px" height="16px" viewBox="0 0 64 16" enable-background="new 0 0 64 16" xml:space="preserve">
6
+ <g transform="translate(0, 0)">
7
+ <polygon fill="#FFFFFF" points="8,12.6000004 0.3,4.9000001 1.7,3.4000001 8,9.6999998 14.3000002,3.4000001 15.6999998,4.9000001
8
+ "/>
9
+ </g>
10
+ <g transform="translate(16, 0)">
11
+ <path fill="#6C7079" d="M15,3H8.3999996L5.6999998,0.3C5.5,0.1,5.3000002,0,5,0H1C0.4,0,0,0.4,0,1v14c0,0.6000004,0.4,1,1,1h14
12
+ c0.6000004,0,1-0.3999996,1-1V4C16,3.4000001,15.6000004,3,15,3z"/>
13
+ </g>
14
+ <g transform="translate(32, 0)">
15
+ <path fill="#6C7079" d="M15.8000002,7.4000001C15.6000004,7.1999998,15.3000002,7,15,7H4
16
+ C3.5999999,7,3.2,7.1999998,3.0999999,7.5999999l-3,7.0000005C-0.1,15.1999998,0.1,16,1,16h11
17
+ c0.3999996,0,0.8000002-0.1999998,0.8999996-0.6000004l3-7C16.1000004,8.1000004,16,7.6999998,15.8000002,7.4000001z"/>
18
+ <path fill="#6C7079" d="M1.2,6.8000002C1.7,5.6999998,2.8,5,4,5h9V3c0-0.5999999-0.3999996-1-1-1H6.4000001L4.6999998,0.3
19
+ C4.5,0.1,4.3000002,0,4,0H1C0.4,0,0,0.4,0,1v8.6999998L1.2,6.8000002z"/>
20
+ </g>
21
+ <g transform="translate(48, 0)">
22
+ <path fill="#6C7079" d="M15,0H1C0.4,0,0,0.4,0,1v14c0,0.6000004,0.4,1,1,1h14c0.6000004,0,1-0.3999996,1-1V1
23
+ C16,0.4,15.6000004,0,15,0z M6,4c0.5999999,0,1,0.4000001,1,1S6.5999999,6,6,6S5,5.5999999,5,5S5.4000001,4,6,4z M3,12l2-4l2,2l3-4
24
+ l3,6H3z"/>
25
+ </g>
26
+ </svg>
Binary file
@@ -0,0 +1,53 @@
1
+ let AccordionMenu = function(selector) {
2
+ this.colMenu = document.querySelectorAll(`${selector} li`);
3
+ let This = this;
4
+ this.colMenu.forEach(function(items) {
5
+ if (items.querySelector('ul')) {
6
+ items.firstElementChild.insertAdjacentHTML('beforeend', '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 451.847 451.847" xml:space="preserve"> <g> <path d="M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751 c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0 c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"/> </g> </svg>');
7
+
8
+ items.firstElementChild.onclick = function(e) {
9
+ e.preventDefault();
10
+
11
+ let isTrue = this.parentElement.classList.toggle('open');
12
+
13
+ if (isTrue) {
14
+ This.show(this.nextElementSibling);
15
+ } else {
16
+ This.hide(this.nextElementSibling);
17
+ }
18
+ }
19
+ }
20
+ })
21
+ }
22
+
23
+ // Show an element
24
+ AccordionMenu.prototype.show = function(elem) {
25
+ // Get the natural height of the element
26
+ var getHeight = function() {
27
+ elem.style.display = 'block'; // Make it visible
28
+ var height = elem.scrollHeight + 'px'; // Get it's height
29
+ return height;
30
+ };
31
+
32
+ var height = getHeight(); // Get the natural height
33
+ elem.style.height = height; // Update the height
34
+
35
+ setTimeout(function() {
36
+ elem.style.height = 'auto';
37
+ }, 350);
38
+ };
39
+
40
+ // Hide an element
41
+ AccordionMenu.prototype.hide = function(elem) {
42
+ // Give the element a height to change from
43
+ elem.style.height = elem.scrollHeight + 'px';
44
+
45
+ // Set the height back to 0
46
+ setTimeout(function() {
47
+ elem.style.height = '0';
48
+ }, 110);
49
+
50
+ setTimeout(function() {
51
+ elem.style.display = '';
52
+ }, 700);
53
+ };
@@ -0,0 +1,108 @@
1
+ import { find, findOne, ready, on, fire } from 'domassist';
2
+ import scrollTriggers from 'scroll-triggers';
3
+ import { init as smoothScroll, scroll } from 'smooth-scroller';
4
+
5
+ function init(el) {
6
+ if (!el) {
7
+ el = find('[data-toc]');
8
+ el.forEach(e => init(e));
9
+ return;
10
+ }
11
+
12
+ if (!el) {
13
+ return;
14
+ }
15
+
16
+ const container = el.dataset.tocContainer ?
17
+ findOne(el.dataset.tocContainer) || document.body : document.body;
18
+ const selectors = el.dataset.toc.split(',').map(s => s.trim());
19
+ const tocItems = [];
20
+ const offset = el.dataset.tocOffset ? parseInt(el.dataset.tocOffset, 10) : 1;
21
+ let i = 1;
22
+
23
+ // Building dict
24
+ selectors.forEach(selector => {
25
+ const items = find(selector, container);
26
+
27
+ items.forEach(item => {
28
+ // Keep the id if already there
29
+ const index = item.id || `toc-${i++}`;
30
+ const text = item.dataset.tocTitle ?
31
+ item.dataset.tocTitle.trim() : item.textContent.trim();
32
+ const sanitizedClassName = selector.replace(/((:+[\w-\d]*)|[^A-z0-9-\s])/g, ' ').replace(/\s{2,}/g, ' ').trim();
33
+ const className = `toc-${sanitizedClassName}`;
34
+
35
+ // Set it if none
36
+ if (item.id !== index) {
37
+ item.id = index;
38
+ }
39
+
40
+ tocItems.push({ index, text, className });
41
+ });
42
+ });
43
+
44
+ let html = '<ul>';
45
+ const triggerOptions = [];
46
+
47
+ // Building markup
48
+ tocItems.forEach((item, j) => {
49
+ const nextEl = tocItems[j + 1];
50
+ const options = {
51
+ el: `.toc-li-${j}`,
52
+ fixed: 'true',
53
+ start: `#${item.index}`,
54
+ position: 'top',
55
+ positionEnd: 'top',
56
+ className: 'toc-visible'
57
+ };
58
+ html += `\n<li class="toc-li-${j} ${item.className}"><a href="#${item.index}">${item.text}</a></li>`;
59
+
60
+ if (nextEl) {
61
+ options.end = `#${nextEl.index}`;
62
+ }
63
+
64
+ triggerOptions.push(options);
65
+ });
66
+
67
+ html += '</ul>';
68
+
69
+ el.innerHTML = html;
70
+ const tocs = find('li', el);
71
+ const anchors = find('a', el);
72
+
73
+ // Setting up scroll triggers and smooth scroll
74
+ scrollTriggers(triggerOptions);
75
+ smoothScroll(anchors, offset);
76
+
77
+ // Pause scroll triggers while smoothscrolling
78
+ on(document.body, 'smoothscroll:start', () => {
79
+ fire(tocs, 'scrolltriggers:pause');
80
+ });
81
+
82
+ on(document.body, 'smoothscroll:end', () => {
83
+ fire(tocs, 'scrolltriggers:resume');
84
+ fire(window, 'scroll');
85
+ });
86
+
87
+ if (window.location.hash) {
88
+ anchors.some(anchor => {
89
+ const found = anchor.getAttribute('href') === window.location.hash;
90
+
91
+ if (found) {
92
+ setTimeout(() => {
93
+ const element = findOne(window.location.hash);
94
+ if (element) {
95
+ // Silent scroll to element
96
+ scroll(element, null, offset, true);
97
+ }
98
+ });
99
+ }
100
+
101
+ return found;
102
+ });
103
+ }
104
+ }
105
+
106
+ export default init;
107
+
108
+ ready(init);
@@ -0,0 +1,461 @@
1
+ /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
2
+
3
+ /**
4
+ * 1. Change the default font family in all browsers (opinionated).
5
+ * 2. Correct the line height in all browsers.
6
+ * 3. Prevent adjustments of font size after orientation changes in
7
+ * IE on Windows Phone and in iOS.
8
+ */
9
+
10
+ /* Document
11
+ ========================================================================== */
12
+
13
+ html {
14
+ font-family: sans-serif; /* 1 */
15
+ line-height: 1.15; /* 2 */
16
+ -ms-text-size-adjust: 100%; /* 3 */
17
+ -webkit-text-size-adjust: 100%; /* 3 */
18
+ }
19
+
20
+ /* Sections
21
+ ========================================================================== */
22
+
23
+ /**
24
+ * Remove the margin in all browsers (opinionated).
25
+ */
26
+
27
+ body {
28
+ margin: 0;
29
+ }
30
+
31
+ /**
32
+ * Add the correct display in IE 9-.
33
+ */
34
+
35
+ article,
36
+ aside,
37
+ footer,
38
+ header,
39
+ nav,
40
+ section {
41
+ display: block;
42
+ }
43
+
44
+ /**
45
+ * Correct the font size and margin on `h1` elements within `section` and
46
+ * `article` contexts in Chrome, Firefox, and Safari.
47
+ */
48
+
49
+ h1 {
50
+ font-size: 2em;
51
+ margin: 0.67em 0;
52
+ }
53
+
54
+ /* Grouping content
55
+ ========================================================================== */
56
+
57
+ /**
58
+ * Add the correct display in IE 9-.
59
+ * 1. Add the correct display in IE.
60
+ */
61
+
62
+ figcaption,
63
+ figure,
64
+ main { /* 1 */
65
+ display: block;
66
+ }
67
+
68
+ /**
69
+ * Add the correct margin in IE 8.
70
+ */
71
+
72
+ figure {
73
+ margin: 1em 40px;
74
+ }
75
+
76
+ /**
77
+ * 1. Add the correct box sizing in Firefox.
78
+ * 2. Show the overflow in Edge and IE.
79
+ */
80
+
81
+ hr {
82
+ box-sizing: content-box; /* 1 */
83
+ height: 0; /* 1 */
84
+ overflow: visible; /* 2 */
85
+ }
86
+
87
+ /**
88
+ * 1. Correct the inheritance and scaling of font size in all browsers.
89
+ * 2. Correct the odd `em` font sizing in all browsers.
90
+ */
91
+
92
+ pre {
93
+ font-family: monospace, monospace; /* 1 */
94
+ font-size: 1em; /* 2 */
95
+ }
96
+
97
+ /* Text-level semantics
98
+ ========================================================================== */
99
+
100
+ /**
101
+ * 1. Remove the gray background on active links in IE 10.
102
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
103
+ */
104
+
105
+ a {
106
+ background-color: transparent; /* 1 */
107
+ -webkit-text-decoration-skip: objects; /* 2 */
108
+ }
109
+
110
+ /**
111
+ * Remove the outline on focused links when they are also active or hovered
112
+ * in all browsers (opinionated).
113
+ */
114
+
115
+ a:active,
116
+ a:hover {
117
+ outline-width: 0;
118
+ }
119
+
120
+ /**
121
+ * 1. Remove the bottom border in Firefox 39-.
122
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
123
+ */
124
+
125
+ abbr[title] {
126
+ border-bottom: none; /* 1 */
127
+ text-decoration: underline; /* 2 */
128
+ text-decoration: underline dotted; /* 2 */
129
+ }
130
+
131
+ /**
132
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
133
+ */
134
+
135
+ b,
136
+ strong {
137
+ font-weight: inherit;
138
+ }
139
+
140
+ /**
141
+ * Add the correct font weight in Chrome, Edge, and Safari.
142
+ */
143
+
144
+ b,
145
+ strong {
146
+ font-weight: bolder;
147
+ }
148
+
149
+ /**
150
+ * 1. Correct the inheritance and scaling of font size in all browsers.
151
+ * 2. Correct the odd `em` font sizing in all browsers.
152
+ */
153
+
154
+ code,
155
+ kbd,
156
+ samp {
157
+ font-family: monospace, monospace; /* 1 */
158
+ font-size: 1em; /* 2 */
159
+ }
160
+
161
+ /**
162
+ * Add the correct font style in Android 4.3-.
163
+ */
164
+
165
+ dfn {
166
+ font-style: italic;
167
+ }
168
+
169
+ /**
170
+ * Add the correct background and color in IE 9-.
171
+ */
172
+
173
+ mark {
174
+ background-color: #ff0;
175
+ color: #000;
176
+ }
177
+
178
+ /**
179
+ * Add the correct font size in all browsers.
180
+ */
181
+
182
+ small {
183
+ font-size: 80%;
184
+ }
185
+
186
+ /**
187
+ * Prevent `sub` and `sup` elements from affecting the line height in
188
+ * all browsers.
189
+ */
190
+
191
+ sub,
192
+ sup {
193
+ font-size: 75%;
194
+ line-height: 0;
195
+ position: relative;
196
+ vertical-align: baseline;
197
+ }
198
+
199
+ sub {
200
+ bottom: -0.25em;
201
+ }
202
+
203
+ sup {
204
+ top: -0.5em;
205
+ }
206
+
207
+ /* Embedded content
208
+ ========================================================================== */
209
+
210
+ /**
211
+ * Add the correct display in IE 9-.
212
+ */
213
+
214
+ audio,
215
+ video {
216
+ display: inline-block;
217
+ }
218
+
219
+ /**
220
+ * Add the correct display in iOS 4-7.
221
+ */
222
+
223
+ audio:not([controls]) {
224
+ display: none;
225
+ height: 0;
226
+ }
227
+
228
+ /**
229
+ * Remove the border on images inside links in IE 10-.
230
+ */
231
+
232
+ img {
233
+ border-style: none;
234
+ }
235
+
236
+ /**
237
+ * Hide the overflow in IE.
238
+ */
239
+
240
+ svg:not(:root) {
241
+ overflow: hidden;
242
+ }
243
+
244
+ /* Forms
245
+ ========================================================================== */
246
+
247
+ /**
248
+ * 1. Change the font styles in all browsers (opinionated).
249
+ * 2. Remove the margin in Firefox and Safari.
250
+ */
251
+
252
+ button,
253
+ input,
254
+ optgroup,
255
+ select,
256
+ textarea {
257
+ font-family: sans-serif; /* 1 */
258
+ font-size: 100%; /* 1 */
259
+ line-height: 1.15; /* 1 */
260
+ margin: 0; /* 2 */
261
+ }
262
+
263
+ /**
264
+ * Show the overflow in IE.
265
+ * 1. Show the overflow in Edge.
266
+ */
267
+
268
+ button,
269
+ input { /* 1 */
270
+ overflow: visible;
271
+ }
272
+
273
+ /**
274
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
275
+ * 1. Remove the inheritance of text transform in Firefox.
276
+ */
277
+
278
+ button,
279
+ select { /* 1 */
280
+ text-transform: none;
281
+ }
282
+
283
+ /**
284
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
285
+ * controls in Android 4.
286
+ * 2. Correct the inability to style clickable types in iOS and Safari.
287
+ */
288
+
289
+ button,
290
+ html [type="button"], /* 1 */
291
+ [type="reset"],
292
+ [type="submit"] {
293
+ -webkit-appearance: button; /* 2 */
294
+ }
295
+
296
+ /**
297
+ * Remove the inner border and padding in Firefox.
298
+ */
299
+
300
+ button::-moz-focus-inner,
301
+ [type="button"]::-moz-focus-inner,
302
+ [type="reset"]::-moz-focus-inner,
303
+ [type="submit"]::-moz-focus-inner {
304
+ border-style: none;
305
+ padding: 0;
306
+ }
307
+
308
+ /**
309
+ * Restore the focus styles unset by the previous rule.
310
+ */
311
+
312
+ button:-moz-focusring,
313
+ [type="button"]:-moz-focusring,
314
+ [type="reset"]:-moz-focusring,
315
+ [type="submit"]:-moz-focusring {
316
+ outline: 1px dotted ButtonText;
317
+ }
318
+
319
+ /**
320
+ * Change the border, margin, and padding in all browsers (opinionated).
321
+ */
322
+
323
+ fieldset {
324
+ border: 1px solid #c0c0c0;
325
+ margin: 0 2px;
326
+ padding: 0.35em 0.625em 0.75em;
327
+ }
328
+
329
+ /**
330
+ * 1. Correct the text wrapping in Edge and IE.
331
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
332
+ * 3. Remove the padding so developers are not caught out when they zero out
333
+ * `fieldset` elements in all browsers.
334
+ */
335
+
336
+ legend {
337
+ box-sizing: border-box; /* 1 */
338
+ color: inherit; /* 2 */
339
+ display: table; /* 1 */
340
+ max-width: 100%; /* 1 */
341
+ padding: 0; /* 3 */
342
+ white-space: normal; /* 1 */
343
+ }
344
+
345
+ /**
346
+ * 1. Add the correct display in IE 9-.
347
+ * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
348
+ */
349
+
350
+ progress {
351
+ display: inline-block; /* 1 */
352
+ vertical-align: baseline; /* 2 */
353
+ }
354
+
355
+ /**
356
+ * Remove the default vertical scrollbar in IE.
357
+ */
358
+
359
+ textarea {
360
+ overflow: auto;
361
+ }
362
+
363
+ /**
364
+ * 1. Add the correct box sizing in IE 10-.
365
+ * 2. Remove the padding in IE 10-.
366
+ */
367
+
368
+ [type="checkbox"],
369
+ [type="radio"] {
370
+ box-sizing: border-box; /* 1 */
371
+ padding: 0; /* 2 */
372
+ }
373
+
374
+ /**
375
+ * Correct the cursor style of increment and decrement buttons in Chrome.
376
+ */
377
+
378
+ [type="number"]::-webkit-inner-spin-button,
379
+ [type="number"]::-webkit-outer-spin-button {
380
+ height: auto;
381
+ }
382
+
383
+ /**
384
+ * 1. Correct the odd appearance in Chrome and Safari.
385
+ * 2. Correct the outline style in Safari.
386
+ */
387
+
388
+ [type="search"] {
389
+ -webkit-appearance: textfield; /* 1 */
390
+ outline-offset: -2px; /* 2 */
391
+ }
392
+
393
+ /**
394
+ * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
395
+ */
396
+
397
+ [type="search"]::-webkit-search-cancel-button,
398
+ [type="search"]::-webkit-search-decoration {
399
+ -webkit-appearance: none;
400
+ }
401
+
402
+ /**
403
+ * 1. Correct the inability to style clickable types in iOS and Safari.
404
+ * 2. Change font properties to `inherit` in Safari.
405
+ */
406
+
407
+ ::-webkit-file-upload-button {
408
+ -webkit-appearance: button; /* 1 */
409
+ font: inherit; /* 2 */
410
+ }
411
+
412
+ /* Interactive
413
+ ========================================================================== */
414
+
415
+ /*
416
+ * Add the correct display in IE 9-.
417
+ * 1. Add the correct display in Edge, IE, and Firefox.
418
+ */
419
+
420
+ details, /* 1 */
421
+ menu {
422
+ display: block;
423
+ }
424
+
425
+ /*
426
+ * Add the correct display in all browsers.
427
+ */
428
+
429
+ summary {
430
+ display: list-item;
431
+ }
432
+
433
+ /* Scripting
434
+ ========================================================================== */
435
+
436
+ /**
437
+ * Add the correct display in IE 9-.
438
+ */
439
+
440
+ canvas {
441
+ display: inline-block;
442
+ }
443
+
444
+ /**
445
+ * Add the correct display in IE.
446
+ */
447
+
448
+ template {
449
+ display: none;
450
+ }
451
+
452
+ /* Hidden
453
+ ========================================================================== */
454
+
455
+ /**
456
+ * Add the correct display in IE 10-.
457
+ */
458
+
459
+ [hidden] {
460
+ display: none;
461
+ }