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.
- package/LICENSE +21 -21
- package/README.md +55 -91
- package/components/appbar/_navbar.old.scss +223 -0
- package/components/appbar/appbar.css +235 -0
- package/components/appbar/appbar.mjs +54 -0
- package/components/appbar/appbar.test.mjs +9 -0
- package/components/atomic/atomic.mjs +19 -0
- package/components/atomic/component.mjs +67 -0
- package/components/badge/_badges.scss +75 -0
- package/components/badge/badge.mjs +11 -0
- package/components/breadcrumb/_breadcrumb.scss +27 -0
- package/components/button/_buttons.scss +352 -0
- package/components/button/button.mjs +11 -0
- package/components/button/buttons.stories.ts +150 -0
- package/components/button/buttons.ts +282 -0
- package/components/button/examples.iso.js +18 -0
- package/components/button/fabSpec.js +65 -0
- package/components/button/test-button.mjs +16 -0
- package/components/card/_cards.scss +229 -0
- package/components/card/card.mjs +10 -0
- package/components/card/cards.ts +185 -0
- package/components/card/cardsSpec.js +269 -0
- package/components/carousel/_carousel.scss +93 -0
- package/components/carousel/_slider.scss +119 -0
- package/components/carousel/carousel.ts +693 -0
- package/components/carousel/carouselSpec.js +61 -0
- package/components/carousel/slider.ts +431 -0
- package/components/carousel/sliderSpec.js +99 -0
- package/components/checkbox/_checkboxes.scss +281 -0
- package/components/checkbox/checkbox.mdx +24 -0
- package/components/checkbox/checkbox.stories.ts +120 -0
- package/components/chip/chip.mjs +37 -0
- package/components/chip/chip.test.mjs +10 -0
- package/components/chip/chips.css +126 -0
- package/components/chip/chips.mdx +33 -0
- package/components/chip/chips.ts +440 -0
- package/components/chip/chipsSpec.js +165 -0
- package/components/chip/readme.md +323 -0
- package/components/collapsible/_collapsible.scss +82 -0
- package/components/collapsible/collapsible.ts +230 -0
- package/components/collapsible/collapsibleSpec.js +240 -0
- package/components/datepicker/_datepicker.scss +268 -0
- package/components/datepicker/datepicker.ts +1450 -0
- package/components/datepicker/datepickerSpec.js +162 -0
- package/components/dialog/_materialbox.scss +42 -0
- package/components/dialog/_modal.scss +79 -0
- package/components/dialog/materialbox.ts +446 -0
- package/components/dialog/materialboxSpec.js +37 -0
- package/components/dialog/modal.ts +111 -0
- package/components/dialog/modalSpec.js +83 -0
- package/components/dialog/readme.md +5 -0
- package/components/divider/readme.md +15 -0
- package/components/dropdown/_dropdown.scss +83 -0
- package/components/dropdown/dropdown.ts +653 -0
- package/components/dropdown/dropdownSpec.js +108 -0
- package/components/list/_collection.scss +114 -0
- package/components/list/_list.scss +6 -0
- package/components/list/list.mjs +58 -0
- package/components/list/list.test.mjs +16 -0
- package/components/loading/loading.mjs +26 -0
- package/components/loading/loading.test.mjs +10 -0
- package/components/navigation-bar/_old +582 -0
- package/components/navigation-bar/navigation-bar.mdx +20 -0
- package/components/navigation-bar/navigation-bar.stories.ts +39 -0
- package/components/navigation-drawer/_sidenav.scss +247 -0
- package/components/navigation-drawer/sidenav.ts +546 -0
- package/components/navigation-drawer/sidenavSpec.js +124 -0
- package/components/pagination/_pagination.scss +47 -0
- package/components/progress/_preloader.scss +416 -0
- package/components/radio-button/_radio-buttons.scss +112 -0
- package/components/radio-button/radio-buttons.mdx +28 -0
- package/components/radio-button/radio-buttons.stories.ts +51 -0
- package/components/search/autocomplete.ts +620 -0
- package/components/search/autocompleteSpec.js +321 -0
- package/components/slider/_range.scss +157 -0
- package/components/slider/range.ts +216 -0
- package/components/snackbar/_toast.scss +68 -0
- package/components/snackbar/toastSpec.js +132 -0
- package/components/snackbar/toasts.ts +312 -0
- package/components/switch/_switches.scss +121 -0
- package/components/tabs/_tabs.scss +171 -0
- package/components/tabs/tabs.mjs +31 -0
- package/components/tabs/tabs.ts +358 -0
- package/components/tabs/tabsSpec.js +180 -0
- package/components/textfield/_file-input.scss +41 -0
- package/components/textfield/_input-fields.scss +368 -0
- package/components/textfield/_select.scss +104 -0
- package/components/textfield/formfields.css +311 -0
- package/components/textfield/forms.ts +182 -0
- package/components/textfield/formsSpec.js +142 -0
- package/components/textfield/select.ts +472 -0
- package/components/textfield/selectSpec.js +390 -0
- package/components/textfield/textfield.mjs +29 -0
- package/components/textfield/textfield.test.mjs +10 -0
- package/components/timepicker/_timepicker.scss +362 -0
- package/components/timepicker/timepicker.ts +905 -0
- package/components/tooltip/_tooltip.scss +40 -0
- package/components/tooltip/tooltip.ts +380 -0
- package/components/tooltip/tooltipSpec.js +145 -0
- package/dist/css/materialize.colors.min.css +6 -0
- package/dist/css/materialize.css +7578 -6326
- package/dist/css/materialize.min.css +6 -13
- package/dist/css/materialize.min.css.map +1 -0
- package/dist/js/materialize.cjs.js +8410 -0
- package/dist/js/materialize.d.ts +2625 -0
- package/dist/js/materialize.js +8415 -12374
- package/dist/js/materialize.min.js +6 -6
- package/dist/js/materialize.mjs +8382 -0
- package/package.json +82 -47
- package/sass/_colors.scss +417 -0
- package/sass/_global.scss +490 -0
- package/sass/_grid.scss +172 -0
- package/sass/_table_of_contents.scss +28 -0
- package/sass/_tapTarget.scss +102 -0
- package/sass/_typography.scss +58 -0
- package/sass/_variables.scss +56 -0
- package/sass/materialize.scss +51 -0
- package/sass/mixins.module.scss +168 -0
- package/extras/noUiSlider/nouislider.css +0 -406
- package/extras/noUiSlider/nouislider.js +0 -2147
- package/extras/noUiSlider/nouislider.min.js +0 -1
- package/js/anime.min.js +0 -34
- package/js/autocomplete.js +0 -448
- package/js/buttons.js +0 -354
- package/js/cards.js +0 -40
- package/js/carousel.js +0 -717
- package/js/cash.js +0 -960
- package/js/characterCounter.js +0 -136
- package/js/chips.js +0 -481
- package/js/collapsible.js +0 -275
- package/js/component.js +0 -44
- package/js/datepicker.js +0 -975
- package/js/dropdown.js +0 -635
- package/js/forms.js +0 -275
- package/js/global.js +0 -444
- package/js/materialbox.js +0 -453
- package/js/modal.js +0 -382
- package/js/parallax.js +0 -138
- package/js/pushpin.js +0 -148
- package/js/range.js +0 -263
- package/js/scrollspy.js +0 -295
- package/js/select.js +0 -450
- package/js/sidenav.js +0 -580
- package/js/slider.js +0 -359
- package/js/tabs.js +0 -402
- package/js/tapTarget.js +0 -314
- package/js/timepicker.js +0 -647
- package/js/toasts.js +0 -310
- package/js/tooltip.js +0 -303
- package/js/waves.js +0 -335
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Component } from '../atomic/component.mjs';
|
|
2
|
+
|
|
3
|
+
// AppBar is the old *Navbar*
|
|
4
|
+
|
|
5
|
+
class AppBar extends Component {
|
|
6
|
+
#title = '';
|
|
7
|
+
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options);
|
|
10
|
+
this.setTagName('nav').addClassname('nav navbar');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setTitle(title) {
|
|
14
|
+
this.#title = title;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
setSearch() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setLogo() {
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
addLeftIcon() {
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
addRightIcon() {
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
toHTML() {
|
|
35
|
+
const html = `<div class="nav-wrapper">
|
|
36
|
+
<a href="#" class="brand-logo">${this.#title}</a>
|
|
37
|
+
<ul class="right hide-on-med-and-down">
|
|
38
|
+
<li><a href="sass.html"><i class="material-icons">search</i></a></li>
|
|
39
|
+
<li><a href="badges.html"><i class="material-icons">view_module</i></a></li>
|
|
40
|
+
<li><a href="collapsible.html"><i class="material-icons">refresh</i></a></li>
|
|
41
|
+
<li><a href="mobile.html"><i class="material-icons">more_vert</i></a></li>
|
|
42
|
+
</ul>
|
|
43
|
+
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
|
44
|
+
<li><a href="sass.html">Sass</a></li>
|
|
45
|
+
<li><a href="badges.html">Components</a></li>
|
|
46
|
+
<li><a href="collapsible.html">JavaScript</a></li>
|
|
47
|
+
</ul>
|
|
48
|
+
</div>`;
|
|
49
|
+
this.setChildren(html);
|
|
50
|
+
return super.toHTML();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { AppBar };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component } from './component.mjs';
|
|
2
|
+
|
|
3
|
+
class Text extends Component {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
this.setTagName('span');
|
|
7
|
+
this.addClassname('mw-text');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class Number extends Component {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
super(options);
|
|
14
|
+
this.setTagName('span');
|
|
15
|
+
this.addClassname('mw-number');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Text, Number };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// function escapeHTML(str) {
|
|
2
|
+
// return str
|
|
3
|
+
// .replaceAll('&', '&')
|
|
4
|
+
// .replaceAll('<', '<')
|
|
5
|
+
// .replaceAll('>', '>')
|
|
6
|
+
// .replaceAll('"', '"')
|
|
7
|
+
// .replaceAll("'", ''');
|
|
8
|
+
// }
|
|
9
|
+
|
|
10
|
+
class Component {
|
|
11
|
+
#tagname;
|
|
12
|
+
#children;
|
|
13
|
+
#classnames;
|
|
14
|
+
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.#tagname = 'div';
|
|
17
|
+
this.#children = [];
|
|
18
|
+
this.#classnames = [];
|
|
19
|
+
if (typeof options === 'object' && options.children) {
|
|
20
|
+
// Tree Nodes
|
|
21
|
+
options.children.forEach((c) => this.addChild(c));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// Text or numeric
|
|
25
|
+
this.#children = options;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
setChildren(children) {
|
|
29
|
+
this.#children = children;
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
setTagName(tagname) {
|
|
34
|
+
if (typeof tagname !== 'string') throw new Error('tagname needs to be string');
|
|
35
|
+
this.#tagname = tagname;
|
|
36
|
+
return this;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
addChild(child) {
|
|
40
|
+
if (!(child instanceof Component)) throw new Error('child is no valid component');
|
|
41
|
+
this.#children.push(child);
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
addClassname(name) {
|
|
46
|
+
this.#classnames.push(name);
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
toHTML() {
|
|
51
|
+
const classAttr =
|
|
52
|
+
this.#classnames.length === 0 ? '' : ' class="' + this.#classnames.join(' ') + '"';
|
|
53
|
+
if (typeof this.#children === 'object')
|
|
54
|
+
return `<${this.#tagname}${classAttr}>${this.#children.map((child) => child.toHTML()).join('')}</${this.#tagname}>`;
|
|
55
|
+
// string or number
|
|
56
|
+
return `<${this.#tagname}${classAttr}>${this.#children}</${this.#tagname}>`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// TODO: remove here
|
|
60
|
+
toDOM() {
|
|
61
|
+
const template = document.createElement('template');
|
|
62
|
+
template.innerHTML = this.toHTML();
|
|
63
|
+
return template.content.firstElementChild;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { Component };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// TODO: Make better structure
|
|
2
|
+
:root {
|
|
3
|
+
--bagde-height: 22px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
span.badge {
|
|
7
|
+
min-width: 3rem;
|
|
8
|
+
padding: 0 6px;
|
|
9
|
+
margin-left: 14px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
line-height: var(--bagde-height);
|
|
13
|
+
height: var(--bagde-height);
|
|
14
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
15
|
+
float: right;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&.new {
|
|
19
|
+
font-weight: 300;
|
|
20
|
+
font-size: 0.8rem;
|
|
21
|
+
color: var(--md-sys-color-on-primary);
|
|
22
|
+
background-color: var(--md-sys-color-primary);
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
}
|
|
25
|
+
&.new:after {
|
|
26
|
+
content: ' new';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&[data-badge-caption]::after {
|
|
30
|
+
content: ' ' attr(data-badge-caption);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.active span.badge {
|
|
35
|
+
color: var(--md-sys-color-on-primary);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Special cases
|
|
39
|
+
|
|
40
|
+
.navbar ul a span.badge {
|
|
41
|
+
display: inline-block;
|
|
42
|
+
float: none;
|
|
43
|
+
margin-left: 4px;
|
|
44
|
+
line-height: var(--bagde-height);
|
|
45
|
+
height: var(--bagde-height);
|
|
46
|
+
-webkit-font-smoothing: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Line height centering
|
|
50
|
+
.collection-item span.badge {
|
|
51
|
+
margin-top: calc(calc(1.5rem * 0.5) - calc(var(--bagde-height) * 0.5));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.collapsible span.badge {
|
|
55
|
+
margin-left: auto;
|
|
56
|
+
|
|
57
|
+
&.leading {
|
|
58
|
+
margin-right: 7px;
|
|
59
|
+
order: -1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.collapsible .active span.badge:not(.new) {
|
|
64
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.sidenav span.badge {
|
|
68
|
+
margin-top: calc(calc(var(--sidenav-line-height) * 0.5) - calc(22px * 0.5));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
table span.badge {
|
|
72
|
+
display: inline-block;
|
|
73
|
+
float: none;
|
|
74
|
+
margin-left: auto;
|
|
75
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.breadcrumb-wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.breadcrumb {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
i,
|
|
11
|
+
i.material-icons, i.material-symbols-outlined,
|
|
12
|
+
i.material-symbols-rounded, i.material-symbols-sharp,
|
|
13
|
+
&:before {
|
|
14
|
+
font-weight: normal;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-size: 24px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:before {
|
|
20
|
+
content: '\E5CC';
|
|
21
|
+
font-family: 'Material Symbols Outlined', 'Material Symbols Rounded', 'Material Symbols Sharp', 'Material Icons';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:first-child:before {
|
|
25
|
+
visibility: hidden;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
@use '../../sass/mixins.module.scss' as *;
|
|
2
|
+
@use '../../sass/variables' as *;
|
|
3
|
+
|
|
4
|
+
@at-root {
|
|
5
|
+
:root {
|
|
6
|
+
--btn-height: 40px;
|
|
7
|
+
--btn-font-size-icon: 16px;
|
|
8
|
+
--btn-padding: 24px;
|
|
9
|
+
--btn-padding-icon: 16px;
|
|
10
|
+
--btn-gap-icon: 8px;
|
|
11
|
+
--btn-border-radius: 4px;
|
|
12
|
+
--btn-font-size: 14px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.btn, .btn-floating, .btn-large, .btn-small, .btn-flat {
|
|
17
|
+
@include btn(
|
|
18
|
+
var(--btn-height),
|
|
19
|
+
var(--btn-border-radius),
|
|
20
|
+
var(--btn-padding),
|
|
21
|
+
var(--btn-padding),
|
|
22
|
+
var(--btn-font-size)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Icon
|
|
27
|
+
.btn.icon-left, .btn.icon-right {
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.btn.icon-left {
|
|
32
|
+
padding-left: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.btn.icon-right {
|
|
36
|
+
padding-right: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.btn.icon-left i, .btn.icon-right i {
|
|
40
|
+
position: absolute;
|
|
41
|
+
font-size: var(--btn-font-size-icon);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.btn.icon-left i {
|
|
45
|
+
left: var(--btn-padding-icon);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.btn.icon-right i {
|
|
49
|
+
right: var(--btn-padding-icon);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//------------------ Enabled
|
|
53
|
+
|
|
54
|
+
.btn.filled {
|
|
55
|
+
@include btn-filled;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.btn.tonal {
|
|
59
|
+
@include btn-tonal;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.btn.elevated {
|
|
63
|
+
@include btn-elevated;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.btn.outlined {
|
|
67
|
+
@include btn-outlined;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.btn.text, .btn-flat {
|
|
71
|
+
@include btn-flat;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//------------------ Disabled
|
|
75
|
+
|
|
76
|
+
.btn.disabled, .btn-floating.disabled, .btn-large.disabled, .btn-small.disabled, .btn-flat.disabled,
|
|
77
|
+
.btn:disabled, .btn-floating:disabled, .btn-large:disabled, .btn-small:disabled, .btn-flat:disabled,
|
|
78
|
+
.btn[disabled], .btn-floating[disabled], .btn-large[disabled], .btn-small[disabled], .btn-flat[disabled] {
|
|
79
|
+
@include btn-disabled();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//------------------ Hover
|
|
83
|
+
|
|
84
|
+
//------------------ Focus
|
|
85
|
+
|
|
86
|
+
// Floating button
|
|
87
|
+
.btn-floating {
|
|
88
|
+
// FIXES
|
|
89
|
+
// width: unset;
|
|
90
|
+
// padding: 16px !important;
|
|
91
|
+
// padding-right: 24px !important; /* only with icon */
|
|
92
|
+
// gap: 8px;
|
|
93
|
+
@extend .btn;
|
|
94
|
+
width: $button-floating-size;
|
|
95
|
+
height: $button-floating-size;
|
|
96
|
+
color: var(--md-sys-color-on-primary-container);
|
|
97
|
+
background-color: var(--md-sys-color-primary-container);
|
|
98
|
+
border-radius: $button-floating-radius;
|
|
99
|
+
padding: 0;
|
|
100
|
+
display: grid;
|
|
101
|
+
grid-auto-flow: column;
|
|
102
|
+
align-items: center;
|
|
103
|
+
position: relative;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
z-index: 1;
|
|
106
|
+
@extend .z-depth-1;
|
|
107
|
+
transition: background-color .3s;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
vertical-align: middle;
|
|
110
|
+
text-align: center;
|
|
111
|
+
|
|
112
|
+
&:hover {
|
|
113
|
+
@extend .z-depth-1-half;
|
|
114
|
+
background-color: color-mix(in srgb, var(--md-sys-color-primary-container), var(--md-sys-color-on-primary-container) 16%);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&:focus {
|
|
118
|
+
background-color: $button-floating-background-focus;
|
|
119
|
+
@extend .z-depth-1-half;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:before {
|
|
123
|
+
border-radius: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.btn-large {
|
|
127
|
+
width: 56px;
|
|
128
|
+
height: 56px;
|
|
129
|
+
padding: 0;
|
|
130
|
+
&.halfway-fab {
|
|
131
|
+
bottom: -56px * 0.5;
|
|
132
|
+
}
|
|
133
|
+
// font-size:
|
|
134
|
+
// i {
|
|
135
|
+
// // line-height: 56px;
|
|
136
|
+
// }
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.btn-small {
|
|
140
|
+
--btn-small-height: calc(0.75 * var(--btn-height));
|
|
141
|
+
width: var(--btn-small-height);
|
|
142
|
+
height: var(--btn-small-height);
|
|
143
|
+
|
|
144
|
+
&.halfway-fab {
|
|
145
|
+
bottom: calc(var(--btn-small-height) * -0.5);
|
|
146
|
+
}
|
|
147
|
+
// i {
|
|
148
|
+
// line-height: $button-floating-small-size;
|
|
149
|
+
// }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.halfway-fab {
|
|
153
|
+
position: absolute;
|
|
154
|
+
right: 24px;
|
|
155
|
+
bottom: -$button-floating-size * 0.5;
|
|
156
|
+
|
|
157
|
+
&.left {
|
|
158
|
+
right: auto;
|
|
159
|
+
left: 24px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
i {
|
|
164
|
+
color: currentColor;
|
|
165
|
+
font-size: 1.6rem;
|
|
166
|
+
width: inherit;
|
|
167
|
+
display: inline-block;
|
|
168
|
+
text-align: center;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// button fix
|
|
173
|
+
button.btn-floating {
|
|
174
|
+
border: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Fixed Action Button
|
|
178
|
+
.fixed-action-btn {
|
|
179
|
+
position: fixed;
|
|
180
|
+
right: 23px;
|
|
181
|
+
bottom: 23px;
|
|
182
|
+
padding-top: 15px;
|
|
183
|
+
margin-bottom: 0;
|
|
184
|
+
z-index: 997;
|
|
185
|
+
|
|
186
|
+
&.active {
|
|
187
|
+
ul {
|
|
188
|
+
visibility: visible;
|
|
189
|
+
padding-left: 0;
|
|
190
|
+
list-style-type: none;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Directions
|
|
195
|
+
&.direction-left,
|
|
196
|
+
&.direction-right {
|
|
197
|
+
padding: 0 0 0 15px;
|
|
198
|
+
|
|
199
|
+
ul {
|
|
200
|
+
text-align: right;
|
|
201
|
+
right: 64px;
|
|
202
|
+
top: 50%;
|
|
203
|
+
transform: translateY(-50%);
|
|
204
|
+
height: 100%;
|
|
205
|
+
left: auto;
|
|
206
|
+
/*width 100% only goes to width of button container */
|
|
207
|
+
width: 500px;
|
|
208
|
+
|
|
209
|
+
li {
|
|
210
|
+
display: inline-block;
|
|
211
|
+
margin: 7.5px 15px 0 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&.direction-right {
|
|
217
|
+
padding: 0 15px 0 0;
|
|
218
|
+
|
|
219
|
+
ul {
|
|
220
|
+
text-align: left;
|
|
221
|
+
direction: rtl;
|
|
222
|
+
left: 64px;
|
|
223
|
+
right: auto;
|
|
224
|
+
|
|
225
|
+
li {
|
|
226
|
+
margin: 7.5px 0 0 15px;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&.direction-bottom {
|
|
232
|
+
padding: 0 0 15px 0;
|
|
233
|
+
|
|
234
|
+
ul {
|
|
235
|
+
top: 64px;
|
|
236
|
+
bottom: auto;
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-direction: column-reverse;
|
|
239
|
+
|
|
240
|
+
li {
|
|
241
|
+
margin: 15px 0 0 0;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&.toolbar {
|
|
247
|
+
padding: 0;
|
|
248
|
+
height: 56px;
|
|
249
|
+
|
|
250
|
+
&.active {
|
|
251
|
+
& > a i {
|
|
252
|
+
opacity: 0;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
ul {
|
|
257
|
+
display: flex;
|
|
258
|
+
top: 0;
|
|
259
|
+
bottom: 0;
|
|
260
|
+
z-index: 1;
|
|
261
|
+
|
|
262
|
+
li {
|
|
263
|
+
flex: 1;
|
|
264
|
+
display: inline-block;
|
|
265
|
+
margin: 0;
|
|
266
|
+
height: 100%;
|
|
267
|
+
transition: none;
|
|
268
|
+
|
|
269
|
+
a {
|
|
270
|
+
display: block;
|
|
271
|
+
overflow: hidden;
|
|
272
|
+
position: relative;
|
|
273
|
+
width: 100%;
|
|
274
|
+
height: 100%;
|
|
275
|
+
background-color: transparent;
|
|
276
|
+
box-shadow: none;
|
|
277
|
+
color: $button-floating-color;
|
|
278
|
+
line-height: 56px;
|
|
279
|
+
z-index: 1;
|
|
280
|
+
|
|
281
|
+
i {
|
|
282
|
+
line-height: inherit;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
ul {
|
|
290
|
+
left: 0;
|
|
291
|
+
right: 0;
|
|
292
|
+
text-align: center;
|
|
293
|
+
position: absolute;
|
|
294
|
+
bottom: 64px;
|
|
295
|
+
margin: 0;
|
|
296
|
+
visibility: hidden;
|
|
297
|
+
|
|
298
|
+
li {
|
|
299
|
+
margin-bottom: 15px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
a.btn-floating {
|
|
303
|
+
opacity: 0;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.fab-backdrop {
|
|
308
|
+
position: absolute;
|
|
309
|
+
top: 0;
|
|
310
|
+
left: 0;
|
|
311
|
+
z-index: -1;
|
|
312
|
+
width: $button-floating-size;
|
|
313
|
+
height: $button-floating-size;
|
|
314
|
+
background-color: $button-floating-background;
|
|
315
|
+
border-radius: $button-floating-radius;
|
|
316
|
+
transform: scale(0);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
//--- Helper classes (for all)
|
|
321
|
+
|
|
322
|
+
// Large button
|
|
323
|
+
.btn-large {
|
|
324
|
+
@extend .btn;
|
|
325
|
+
height: calc(1.5 * var(--btn-height));
|
|
326
|
+
font-size: 18px;
|
|
327
|
+
padding: 0 28px;
|
|
328
|
+
|
|
329
|
+
i {
|
|
330
|
+
font-size: 1.6rem;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Small button
|
|
335
|
+
.btn-small {
|
|
336
|
+
@extend .btn;
|
|
337
|
+
height: calc(0.75 * var(--btn-height));
|
|
338
|
+
font-size: 13px;
|
|
339
|
+
|
|
340
|
+
i {
|
|
341
|
+
font-size: 1.2rem;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Block button
|
|
346
|
+
.btn-block {
|
|
347
|
+
display: block;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.btn.rounded {
|
|
351
|
+
border-radius: 99999px;
|
|
352
|
+
}
|