pallote-css 0.0.0 → 0.2.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/README.md +100 -43
- package/dist/pallote.min.css +1 -0
- package/dist/pallote.min.css.map +1 -0
- package/dist/pallote.min.js +1 -0
- package/dist/pallote.scss +38 -0
- package/dist/scripts/accordion.js +42 -0
- package/dist/scripts/button.js +5 -0
- package/dist/scripts/cookie.js +15 -0
- package/dist/scripts/input.js +24 -0
- package/dist/scripts/nav.js +22 -0
- package/dist/scripts/navbar.js +28 -0
- package/dist/scripts/tabs.js +30 -0
- package/{assets/_sass → dist/styles}/common/_editor.scss +13 -2
- package/{assets/_sass → dist/styles}/common/_global.scss +28 -7
- package/{assets/_sass → dist/styles}/common/_mixins.scss +1 -1
- package/{assets/_sass → dist/styles}/common/_variables.scss +41 -29
- package/dist/styles/components/_accordion.scss +130 -0
- package/{assets/_sass → dist/styles}/components/_alert.scss +20 -16
- package/dist/styles/components/_breadcrumbs.scss +47 -0
- package/{assets/_sass → dist/styles}/components/_button.scss +3 -98
- package/{assets/_sass → dist/styles}/components/_card.scss +20 -8
- package/{assets/_sass/components/_nav.scss → dist/styles/components/_detail.scss} +18 -51
- package/dist/styles/components/_divider.scss +51 -0
- package/{assets/_sass → dist/styles}/components/_input.scss +2 -3
- package/dist/styles/components/_nav.scss +259 -0
- package/dist/styles/components/_navbar.scss +189 -0
- package/{assets/_sass → dist/styles}/components/_section.scss +86 -21
- package/dist/styles/components/_sidebar.scss +57 -0
- package/dist/styles/components/_snippet.scss +82 -0
- package/dist/styles/components/_status.scss +58 -0
- package/dist/styles/components/_switch.scss +72 -0
- package/dist/styles/components/_tabs.scss +115 -0
- package/{assets/_sass → dist/styles}/components/_tag.scss +3 -3
- package/{assets/_sass → dist/styles}/modules/_cookie.scss +7 -1
- package/{assets/_sass → dist/styles}/utilities/_color.scss +6 -6
- package/{assets/_sass → dist/styles}/utilities/_global.scss +1 -0
- package/package.json +13 -5
- package/_site/LICENSE +0 -21
- package/_site/README.md +0 -88
- package/_site/package.json +0 -28
- package/assets/_sass/.DS_Store +0 -0
- package/assets/_sass/components/_navbar.scss +0 -207
- package/assets/_sass/components/_sidebar.scss +0 -27
- package/assets/_sass/plugins/_highlighter-theme.scss +0 -68
- /package/{assets/_sass → dist/styles}/common/_fontface.scss +0 -0
- /package/{assets/_sass → dist/styles}/common/_reset.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_buttons.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_form.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_grid.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_link.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_list.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_page.scss +0 -0
- /package/{assets/_sass → dist/styles}/components/_text.scss +0 -0
- /package/{assets/_sass → dist/styles}/utilities/_text.scss +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
document.addEventListener("DOMContentLoaded",function(){var acc=document.getElementsByClassName("accordion__control");var panels=document.getElementsByClassName("accordion__content");var activeAccordionItem=document.querySelector(".accordion__item--active");for(var i=0;i<acc.length;i++){acc[i].addEventListener("click",function(){var panel=this.nextElementSibling;var isActive=this.parentElement.classList.contains("accordion__item--active");closeAllPanels();if(!isActive){this.parentElement.classList.add("accordion__item--active");panel.style.maxHeight=panel.scrollHeight+"px"}})}if(activeAccordionItem){var activePanel=activeAccordionItem.querySelector(".accordion__content");activeAccordionItem.classList.add("accordion__item--active");activePanel.style.maxHeight=activePanel.scrollHeight+"px"}function closeAllPanels(){for(var i=0;i<panels.length;i++){var panel=panels[i];var accordionBtn=panel.previousElementSibling;if(accordionBtn.parentElement.classList.contains("accordion__item--active")){accordionBtn.parentElement.classList.remove("accordion__item--active");panel.style.maxHeight=null}}}});var buttonDisabledElement=document.querySelector(".button--disabled");if(buttonDisabledElement!==null){buttonDisabledElement.setAttribute("disabled","disabled")}function closeCookieNotice(){const nowDate=new Date;const expireDate=new Date(nowDate.setDate(nowDate.getDate()+30)).toUTCString();document.cookie="cookie_notice=0;path=/;expires="+expireDate+";SameSite=Lax;";document.getElementById("cookie").classList.add("js-cookie-accepted")}document.addEventListener("DOMContentLoaded",function(){const cookie_notice=("; "+document.cookie).split("; cookie_notice=").pop().split(";")[0];if(cookie_notice!=="0"){document.getElementById("cookie").style.display="flex"}});var inputFocusElement=document.querySelector(".input--focused .input__control");if(inputFocusElement!==null){inputFocusElement.focus()}var inputDisabledElement=document.querySelector(".input--disabled .input__control");if(inputDisabledElement!==null){inputDisabledElement.setAttribute("disabled","disabled")}var inputRequiredElement=document.querySelector(".input--required .input__control");if(inputRequiredElement!==null){inputRequiredElement.setAttribute("required","required")}const dropdownTriggers=document.querySelectorAll(".nav__trigger");dropdownTriggers.forEach(trigger=>{trigger.addEventListener("click",function(e){e.stopPropagation();const dropdown=this.parentElement;dropdown.classList.toggle("js-show")})});document.addEventListener("click",function(e){const dropdowns=document.querySelectorAll(".nav__item--dropdown");dropdowns.forEach(dropdown=>{if(!dropdown.contains(e.target)){dropdown.classList.remove("js-show")}})});const body=document.querySelector("body");const navbar=document.querySelector(".navbar");const buttonNavbar=document.querySelector(".navbar__button");const sidebar=document.querySelector(".sidebar");const buttonSidebarOpen=document.querySelector(".sidebar__button");const buttonSidebarClose=document.querySelector(".sidebar__button--close");if(buttonNavbar!==null){buttonNavbar.addEventListener("click",function(){buttonNavbar.classList.toggle("js-opened");navbar.classList.toggle("js-opened");body.classList.toggle("js-navbar")})}if(buttonSidebarOpen!==null){buttonSidebarOpen.addEventListener("click",function(){sidebar.classList.add("js-opened");body.classList.add("js-sidebar");buttonNavbar.classList.remove("js-opened");navbar.classList.remove("js-opened");body.classList.remove("js-navbar")});buttonSidebarClose.addEventListener("click",function(){sidebar.classList.remove("js-opened");body.classList.remove("js-sidebar")})}function tabify(element){const header=element.querySelector(".tabs__controls");const content=element.querySelector(".tabs__content");const tabHeaders=[...header.children];const tabContents=[...content.children];tabContents.forEach(x=>x.style.display="none");let current_tab_index=-1;function setTab(index){if(current_tab_index>-1){tabHeaders[current_tab_index].classList.remove("tabs__item--active");tabContents[current_tab_index].style.display="none"}tabHeaders[index].classList.add("tabs__item--active");tabContents[index].style.display="flex";current_tab_index=index}default_tab_index=tabHeaders.findIndex(x=>{return[...x.classList].indexOf("tabs__item--default")>-1});default_tab_index=default_tab_index===-1?0:default_tab_index;setTab(default_tab_index);tabHeaders.forEach((x,i)=>x.onclick=event=>setTab(i))}[...document.querySelectorAll(".tabs")].forEach(x=>tabify(x));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@import
|
|
2
|
+
|
|
3
|
+
"styles/common/_variables",
|
|
4
|
+
"styles/common/_mixins",
|
|
5
|
+
"styles/common/_reset",
|
|
6
|
+
"styles/common/_editor",
|
|
7
|
+
"styles/common/_fontface",
|
|
8
|
+
"styles/common/_global",
|
|
9
|
+
|
|
10
|
+
"styles/utilities/_color",
|
|
11
|
+
"styles/utilities/_global",
|
|
12
|
+
"styles/utilities/_text",
|
|
13
|
+
|
|
14
|
+
"styles/components/_text",
|
|
15
|
+
"styles/components/_accordion",
|
|
16
|
+
"styles/components/_alert",
|
|
17
|
+
"styles/components/_breadcrumbs",
|
|
18
|
+
"styles/components/_button",
|
|
19
|
+
"styles/components/_buttons",
|
|
20
|
+
"styles/components/_card",
|
|
21
|
+
"styles/components/_detail",
|
|
22
|
+
"styles/components/_divider",
|
|
23
|
+
"styles/components/_form",
|
|
24
|
+
"styles/components/_grid",
|
|
25
|
+
"styles/components/_input",
|
|
26
|
+
"styles/components/_link",
|
|
27
|
+
"styles/components/_list",
|
|
28
|
+
"styles/components/_nav",
|
|
29
|
+
"styles/components/_navbar",
|
|
30
|
+
"styles/components/_page",
|
|
31
|
+
"styles/components/_section",
|
|
32
|
+
"styles/components/_sidebar",
|
|
33
|
+
"styles/components/_snippet",
|
|
34
|
+
"styles/components/_status",
|
|
35
|
+
"styles/components/_switch",
|
|
36
|
+
"styles/components/_tabs",
|
|
37
|
+
"styles/components/_tag"
|
|
38
|
+
;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
2
|
+
var acc = document.getElementsByClassName("accordion__control");
|
|
3
|
+
var panels = document.getElementsByClassName("accordion__content");
|
|
4
|
+
var activeAccordionItem = document.querySelector(".accordion__item--active");
|
|
5
|
+
|
|
6
|
+
for (var i = 0; i < acc.length; i++) {
|
|
7
|
+
acc[i].addEventListener("click", function() {
|
|
8
|
+
var panel = this.nextElementSibling;
|
|
9
|
+
|
|
10
|
+
// Check if the clicked accordion__control is already active
|
|
11
|
+
var isActive = this.parentElement.classList.contains("accordion__item--active");
|
|
12
|
+
|
|
13
|
+
// Close all panels
|
|
14
|
+
closeAllPanels();
|
|
15
|
+
|
|
16
|
+
// If the clicked accordion__control is not already active, open it
|
|
17
|
+
if (!isActive) {
|
|
18
|
+
// Toggle the clicked accordion__control
|
|
19
|
+
this.parentElement.classList.add("accordion__item--active");
|
|
20
|
+
panel.style.maxHeight = panel.scrollHeight + "px";
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// If any accordion item has the class accordion__item--active, expand it on page load
|
|
26
|
+
if (activeAccordionItem) {
|
|
27
|
+
var activePanel = activeAccordionItem.querySelector(".accordion__content");
|
|
28
|
+
activeAccordionItem.classList.add("accordion__item--active");
|
|
29
|
+
activePanel.style.maxHeight = activePanel.scrollHeight + "px";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function closeAllPanels() {
|
|
33
|
+
for (var i = 0; i < panels.length; i++) {
|
|
34
|
+
var panel = panels[i];
|
|
35
|
+
var accordionBtn = panel.previousElementSibling;
|
|
36
|
+
if (accordionBtn.parentElement.classList.contains("accordion__item--active")) {
|
|
37
|
+
accordionBtn.parentElement.classList.remove("accordion__item--active");
|
|
38
|
+
panel.style.maxHeight = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function closeCookieNotice() {
|
|
2
|
+
const nowDate = new Date();
|
|
3
|
+
const expireDate = new Date(nowDate.setDate(nowDate.getDate() + 30)).toUTCString();
|
|
4
|
+
|
|
5
|
+
document.cookie = "cookie_notice=0;path=/;expires=" + expireDate + ";SameSite=Lax;";
|
|
6
|
+
document.getElementById("cookie").classList.add("js-cookie-accepted");
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
10
|
+
const cookie_notice = ('; ' + document.cookie).split('; cookie_notice=').pop().split(';')[0];
|
|
11
|
+
|
|
12
|
+
if (cookie_notice !== "0") {
|
|
13
|
+
document.getElementById("cookie").style.display = "flex";
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// focus an input element on page load
|
|
2
|
+
var inputFocusElement = document.querySelector('.input--focused .input__control');
|
|
3
|
+
if (inputFocusElement !== null) {
|
|
4
|
+
inputFocusElement.focus();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// add 'disabled' attribute to the input element
|
|
8
|
+
var inputDisabledElement = document.querySelector('.input--disabled .input__control');
|
|
9
|
+
if (inputDisabledElement !== null) {
|
|
10
|
+
inputDisabledElement.setAttribute('disabled', 'disabled');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// add 'required' attribute to the input element
|
|
14
|
+
var inputRequiredElement = document.querySelector('.input--required .input__control');
|
|
15
|
+
if (inputRequiredElement !== null) {
|
|
16
|
+
inputRequiredElement.setAttribute('required', 'required');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
// Update disabled and required above to add attributes when used for checkboxes and radios
|
|
21
|
+
|
|
22
|
+
// Make functional, careful that the other functions still work after
|
|
23
|
+
// var checkboxDisabledElement = document.querySelector('.checkbox--disabled .checkbox__control');
|
|
24
|
+
// checkboxDisabledElement.setAttribute('disabled', 'disabled');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Get all dropdown trigger buttons
|
|
2
|
+
const dropdownTriggers = document.querySelectorAll('.nav__trigger');
|
|
3
|
+
|
|
4
|
+
// Add click event listener to each trigger button
|
|
5
|
+
dropdownTriggers.forEach(trigger => {
|
|
6
|
+
trigger.addEventListener('click', function(e) {
|
|
7
|
+
e.stopPropagation(); // Prevents the click event from bubbling up
|
|
8
|
+
|
|
9
|
+
const dropdown = this.parentElement; // Get parent dropdown element
|
|
10
|
+
dropdown.classList.toggle('js-show'); // Toggle show class
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// Add click event listener to document to close dropdowns when clicking outside
|
|
15
|
+
document.addEventListener('click', function(e) {
|
|
16
|
+
const dropdowns = document.querySelectorAll('.nav__item--dropdown');
|
|
17
|
+
dropdowns.forEach(dropdown => {
|
|
18
|
+
if (!dropdown.contains(e.target)) {
|
|
19
|
+
dropdown.classList.remove('js-show'); // Close dropdown
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const body = document.querySelector('body');
|
|
2
|
+
const navbar = document.querySelector('.navbar');
|
|
3
|
+
const buttonNavbar = document.querySelector('.navbar__button');
|
|
4
|
+
const sidebar = document.querySelector('.sidebar');
|
|
5
|
+
const buttonSidebarOpen = document.querySelector('.sidebar__button');
|
|
6
|
+
const buttonSidebarClose = document.querySelector('.sidebar__button--close');
|
|
7
|
+
|
|
8
|
+
if (buttonNavbar !== null) {
|
|
9
|
+
buttonNavbar.addEventListener('click', function () {
|
|
10
|
+
buttonNavbar.classList.toggle('js-opened');
|
|
11
|
+
navbar.classList.toggle('js-opened');
|
|
12
|
+
body.classList.toggle('js-navbar');
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (buttonSidebarOpen !== null) {
|
|
17
|
+
buttonSidebarOpen.addEventListener('click', function () {
|
|
18
|
+
sidebar.classList.add('js-opened');
|
|
19
|
+
body.classList.add('js-sidebar');
|
|
20
|
+
buttonNavbar.classList.remove('js-opened');
|
|
21
|
+
navbar.classList.remove('js-opened');
|
|
22
|
+
body.classList.remove('js-navbar');
|
|
23
|
+
});
|
|
24
|
+
buttonSidebarClose.addEventListener('click', function () {
|
|
25
|
+
sidebar.classList.remove('js-opened');
|
|
26
|
+
body.classList.remove('js-sidebar');
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function tabify( element ){
|
|
2
|
+
const header = element.querySelector('.tabs__controls');
|
|
3
|
+
const content = element.querySelector('.tabs__content');
|
|
4
|
+
const tabHeaders = [...header.children];
|
|
5
|
+
const tabContents = [...content.children];
|
|
6
|
+
tabContents.forEach( x => x.style.display = 'none');
|
|
7
|
+
let current_tab_index = -1;
|
|
8
|
+
|
|
9
|
+
function setTab( index ){
|
|
10
|
+
if( current_tab_index > -1 ){
|
|
11
|
+
tabHeaders[current_tab_index].classList.remove('tabs__item--active');
|
|
12
|
+
tabContents[ current_tab_index ].style.display = 'none';
|
|
13
|
+
}
|
|
14
|
+
tabHeaders[index].classList.add('tabs__item--active');
|
|
15
|
+
tabContents[ index ].style.display = 'flex';
|
|
16
|
+
current_tab_index = index;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
default_tab_index = tabHeaders.findIndex( x => {
|
|
20
|
+
return [...x.classList].indexOf('tabs__item--default') > -1;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
default_tab_index = default_tab_index === -1 ? 0 : default_tab_index;
|
|
24
|
+
setTab( default_tab_index );
|
|
25
|
+
tabHeaders.forEach((x,i) => x.onclick = event => setTab(i));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// this is where the magic happens!
|
|
29
|
+
[...document.querySelectorAll('.tabs')]
|
|
30
|
+
.forEach(x => tabify(x));
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
margin-top: 1.5rem;
|
|
41
41
|
margin-bottom: 1.5rem;
|
|
42
42
|
width: fit-content;
|
|
43
|
+
white-space: nowrap;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
a {
|
|
@@ -109,10 +110,16 @@
|
|
|
109
110
|
// table
|
|
110
111
|
// —————————————————————————————————————————————————————————————————
|
|
111
112
|
|
|
113
|
+
.table {
|
|
114
|
+
width: 100%;
|
|
115
|
+
overflow: scroll;
|
|
116
|
+
}
|
|
117
|
+
|
|
112
118
|
table {
|
|
113
119
|
border-collapse: separate;
|
|
114
120
|
border: $border;
|
|
115
121
|
border-radius: $border-radius-sm;
|
|
122
|
+
width: 100%;
|
|
116
123
|
|
|
117
124
|
&.table--dense {
|
|
118
125
|
|
|
@@ -150,17 +157,21 @@
|
|
|
150
157
|
|
|
151
158
|
td,
|
|
152
159
|
th {
|
|
153
|
-
padding: $spacing-xs $spacing-sm $spacing-sm;
|
|
154
160
|
border-top: $border;
|
|
155
|
-
|
|
161
|
+
|
|
156
162
|
&:not(:first-child) {
|
|
157
163
|
border-left: $border;
|
|
158
164
|
}
|
|
159
165
|
}
|
|
160
166
|
|
|
161
167
|
th {
|
|
168
|
+
padding: $spacing-xs $spacing-sm;
|
|
162
169
|
font-size: 0.875rem;
|
|
163
170
|
font-weight: bold;
|
|
164
171
|
color: $text-alt;
|
|
165
172
|
}
|
|
173
|
+
|
|
174
|
+
td {
|
|
175
|
+
padding: $spacing-xs $spacing-sm $spacing-sm;
|
|
176
|
+
}
|
|
166
177
|
}
|
|
@@ -14,8 +14,32 @@ body {
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
min-height: 100vh;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
&:after {
|
|
18
|
+
transition: opacity $transition-md;
|
|
19
|
+
content: '';
|
|
20
|
+
position: fixed;
|
|
21
|
+
background-color: $overlay;
|
|
22
|
+
height: 100vh;
|
|
23
|
+
width: 100vw;
|
|
24
|
+
top: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
opacity: 0;
|
|
27
|
+
z-index: 12;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.js-sidebar,
|
|
32
|
+
&.js-navbar {
|
|
18
33
|
overflow: hidden;
|
|
34
|
+
|
|
35
|
+
&:after {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
pointer-events: initial;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.js-navbar:after {
|
|
42
|
+
z-index: 10;
|
|
19
43
|
}
|
|
20
44
|
}
|
|
21
45
|
|
|
@@ -46,17 +70,17 @@ footer {
|
|
|
46
70
|
// text selection
|
|
47
71
|
::-moz-selection {
|
|
48
72
|
background: $primary;
|
|
49
|
-
color: $primary-
|
|
73
|
+
color: $primary-contrast;
|
|
50
74
|
}
|
|
51
75
|
|
|
52
76
|
::selection {
|
|
53
77
|
background: $primary;
|
|
54
|
-
color: $primary-
|
|
78
|
+
color: $primary-contrast;
|
|
55
79
|
}
|
|
56
80
|
|
|
57
81
|
::-moz-selection {
|
|
58
82
|
background: $primary;
|
|
59
|
-
color: $primary-
|
|
83
|
+
color: $primary-contrast;
|
|
60
84
|
}
|
|
61
85
|
|
|
62
86
|
// remove autocomplete from webkit browsers
|
|
@@ -122,9 +146,6 @@ strong {
|
|
|
122
146
|
.z-index--#{$i} { z-index: $i; }
|
|
123
147
|
}
|
|
124
148
|
|
|
125
|
-
.cookie { z-index: 10; }
|
|
126
|
-
header { z-index: 11; }
|
|
127
|
-
|
|
128
149
|
// background
|
|
129
150
|
|
|
130
151
|
.background-cover {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// dependencies
|
|
2
3
|
// color palette
|
|
3
4
|
// spacing
|
|
4
5
|
// typography
|
|
@@ -6,14 +7,21 @@
|
|
|
6
7
|
// misc
|
|
7
8
|
// —————————————————————————————————————————————————————————————————
|
|
8
9
|
|
|
10
|
+
// —————————————————————————————————————————————————————————————————
|
|
11
|
+
// dependencies
|
|
12
|
+
// —————————————————————————————————————————————————————————————————
|
|
13
|
+
|
|
14
|
+
$fonts-path: '../../assets/fonts/';
|
|
15
|
+
$icons-path: '../../assets/icons/';
|
|
16
|
+
|
|
9
17
|
// —————————————————————————————————————————————————————————————————
|
|
10
18
|
// color palette
|
|
11
19
|
// —————————————————————————————————————————————————————————————————
|
|
12
20
|
|
|
13
21
|
// main
|
|
14
22
|
|
|
15
|
-
$white: #
|
|
16
|
-
$black: #
|
|
23
|
+
$white: #FFFFFF !default;
|
|
24
|
+
$black: #000A1E !default;
|
|
17
25
|
|
|
18
26
|
// grey
|
|
19
27
|
|
|
@@ -40,45 +48,45 @@ $text-contrast-disabled: rgba($text-contrast, 0.3) !default;
|
|
|
40
48
|
|
|
41
49
|
// brand
|
|
42
50
|
|
|
43
|
-
$primary
|
|
44
|
-
$primary:
|
|
45
|
-
$primary-dark:
|
|
46
|
-
$primary-
|
|
51
|
+
$primary: #00F3FF !default;
|
|
52
|
+
$primary-light: mix($white, $primary, 70%) !default;
|
|
53
|
+
$primary-dark: mix($black, $primary, 50%) !default;
|
|
54
|
+
$primary-contrast: $text-contrast !default;
|
|
47
55
|
|
|
48
|
-
$secondary
|
|
49
|
-
$secondary:
|
|
50
|
-
$secondary-dark:
|
|
51
|
-
$secondary-
|
|
56
|
+
$secondary: #E7FC00 !default;
|
|
57
|
+
$secondary-light: mix($white, $secondary, 70%) !default;
|
|
58
|
+
$secondary-dark: mix($black, $secondary, 50%) !default;
|
|
59
|
+
$secondary-contrast: $text-contrast !default;
|
|
52
60
|
|
|
53
|
-
$highlight
|
|
54
|
-
$highlight:
|
|
55
|
-
$highlight-dark:
|
|
56
|
-
$highlight-
|
|
61
|
+
$highlight: #FF74E6 !default;
|
|
62
|
+
$highlight-light: mix($white, $highlight, 70%) !default;
|
|
63
|
+
$highlight-dark: mix($black, $highlight, 50%) !default;
|
|
64
|
+
$highlight-contrast: $text-contrast !default;
|
|
57
65
|
|
|
58
66
|
// feedback
|
|
59
67
|
|
|
60
|
-
$success-light: #E7F9EE !default;
|
|
61
68
|
$success: #27AE60 !default;
|
|
62
|
-
$success-
|
|
63
|
-
$success-
|
|
69
|
+
$success-light: mix($white, $success, 70%) !default;
|
|
70
|
+
$success-dark: mix($black, $success, 50%) !default;
|
|
71
|
+
$success-background: mix($black, $success, 80%) !default;
|
|
64
72
|
$success-contrast: $text !default;
|
|
65
73
|
|
|
66
|
-
$info-light: #E9F8FD !default;
|
|
67
74
|
$info: #17A0CC !default;
|
|
68
|
-
$info-
|
|
69
|
-
$info-
|
|
75
|
+
$info-light: mix($white, $info, 70%) !default;
|
|
76
|
+
$info-dark: mix($black, $info, 50%) !default;
|
|
77
|
+
$info-background: mix($black, $info, 80%) !default;
|
|
70
78
|
$info-contrast: $text !default;
|
|
71
79
|
|
|
72
|
-
$warning-light: #FFFAE5 !default;
|
|
73
80
|
$warning: #FFDC46 !default;
|
|
74
|
-
$warning-
|
|
75
|
-
$warning-
|
|
81
|
+
$warning-light: mix($white, $warning, 70%) !default;
|
|
82
|
+
$warning-dark: mix($black, $warning, 50%) !default;
|
|
83
|
+
$warning-background: mix($black, $warning, 80%) !default;
|
|
76
84
|
$warning-contrast: $text-contrast !default;
|
|
77
85
|
|
|
78
|
-
$error-light: #FCE7E7 !default;
|
|
79
86
|
$error: #EB5757 !default;
|
|
80
|
-
$error-
|
|
81
|
-
$error-
|
|
87
|
+
$error-light: mix($white, $error, 70%) !default;
|
|
88
|
+
$error-dark: mix($black, $error, 50%) !default;
|
|
89
|
+
$error-background: mix($black, $error, 80%) !default;
|
|
82
90
|
$error-contrast: $text !default;
|
|
83
91
|
|
|
84
92
|
// background
|
|
@@ -90,11 +98,14 @@ $background-paper: $grey-90 !default;
|
|
|
90
98
|
|
|
91
99
|
$border-color: rgba($text, 0.2) !default;
|
|
92
100
|
$border: 1px solid $border-color !default;
|
|
101
|
+
$border-color-contrast: rgba($text-contrast, 0.2) !default;
|
|
102
|
+
$border-contrast: 1px solid $border-color !default;
|
|
93
103
|
|
|
94
104
|
$hover: rgba($text, 0.12) !default;
|
|
105
|
+
$hover-contrast: rgba($text-contrast, 0.12) !default;
|
|
95
106
|
|
|
96
|
-
$
|
|
97
|
-
$
|
|
107
|
+
$overlay: rgba($text-contrast, 0.8) !default;
|
|
108
|
+
$overlay-contrast: rgba($text, 0.2) !default;
|
|
98
109
|
|
|
99
110
|
// —————————————————————————————————————————————————————————————————
|
|
100
111
|
// spacing
|
|
@@ -114,13 +125,14 @@ $max-width-subtitle: $spacing-xxl*4 !default;
|
|
|
114
125
|
$max-width-editor: $spacing-xxl*6 !default;
|
|
115
126
|
|
|
116
127
|
$navbar-height: 4rem !default;
|
|
128
|
+
$navbar-height-sm: 3rem !default;
|
|
129
|
+
$nav-item: $spacing-md !default;
|
|
117
130
|
|
|
118
131
|
// —————————————————————————————————————————————————————————————————
|
|
119
132
|
// typography
|
|
120
133
|
// —————————————————————————————————————————————————————————————————
|
|
121
134
|
|
|
122
135
|
// typefaces
|
|
123
|
-
|
|
124
136
|
$font: "Barlow", Arial, sans-serif !default;
|
|
125
137
|
|
|
126
138
|
// weight
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// elements
|
|
3
|
+
// size
|
|
4
|
+
// transparent
|
|
5
|
+
// active
|
|
6
|
+
// —————————————————————————————————————————————————————————————————
|
|
7
|
+
|
|
8
|
+
// —————————————————————————————————————————————————————————————————
|
|
9
|
+
// elements
|
|
10
|
+
// —————————————————————————————————————————————————————————————————
|
|
11
|
+
|
|
12
|
+
.accordion {
|
|
13
|
+
width: 100%;
|
|
14
|
+
|
|
15
|
+
&__item {
|
|
16
|
+
position: relative;
|
|
17
|
+
background-color: $hover;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__control,
|
|
22
|
+
&__content {
|
|
23
|
+
transition: padding $transition-md;
|
|
24
|
+
will-change: padding;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__control {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
width: 100%;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
|
|
33
|
+
&:after {
|
|
34
|
+
content: url($icons-path + '/phosphor/caret-down.svg');
|
|
35
|
+
transition: transform $transition-md;
|
|
36
|
+
will-change: transform;
|
|
37
|
+
position: absolute;
|
|
38
|
+
height: $spacing-md;
|
|
39
|
+
width: $spacing-md;
|
|
40
|
+
transform-origin: center 60%;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__content {
|
|
46
|
+
max-height: 0;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
transition: max-height $transition-md;
|
|
49
|
+
will-change: max-height;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// —————————————————————————————————————————————————————————————————
|
|
54
|
+
// size
|
|
55
|
+
// —————————————————————————————————————————————————————————————————
|
|
56
|
+
|
|
57
|
+
@mixin size($proportion, $size) {
|
|
58
|
+
|
|
59
|
+
.accordion {
|
|
60
|
+
|
|
61
|
+
&__item {
|
|
62
|
+
border-radius: calc($size*2/3);
|
|
63
|
+
|
|
64
|
+
&:not(:last-child) { margin-bottom: calc($size/3); }
|
|
65
|
+
&--active { padding-bottom: $size; }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__control {
|
|
69
|
+
padding: $size $size*1.5;
|
|
70
|
+
|
|
71
|
+
&:after {
|
|
72
|
+
top: $size;
|
|
73
|
+
right: $size*1.25;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__header {
|
|
78
|
+
|
|
79
|
+
@if $proportion == sm { margin-bottom: -1px; }
|
|
80
|
+
@if $proportion == lg { margin: -1px 0 -2px 0; }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__content {
|
|
84
|
+
padding: 0 $size*1.5;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.accordion--transparent .accordion__item--active:not(:first-child) {
|
|
90
|
+
margin-top: calc($size/3);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.accordion {
|
|
95
|
+
|
|
96
|
+
@include size(md, $spacing-sm);
|
|
97
|
+
&--sm { @include size(sm, $spacing-xs); }
|
|
98
|
+
&--lg { @include size(lg, $spacing-md); }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// —————————————————————————————————————————————————————————————————
|
|
102
|
+
// transparent
|
|
103
|
+
// —————————————————————————————————————————————————————————————————
|
|
104
|
+
|
|
105
|
+
.accordion--transparent {
|
|
106
|
+
|
|
107
|
+
.accordion__item {
|
|
108
|
+
transition: background-color $transition-md, margin $transition-md;
|
|
109
|
+
will-change: background-color, margin;
|
|
110
|
+
background-color: transparent;
|
|
111
|
+
|
|
112
|
+
@include hover { background-color: $hover; }
|
|
113
|
+
&--active { background-color: $hover; }
|
|
114
|
+
|
|
115
|
+
&:not(:last-child):not(.accordion__item--active) {
|
|
116
|
+
margin-bottom: 0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// —————————————————————————————————————————————————————————————————
|
|
122
|
+
// active
|
|
123
|
+
// —————————————————————————————————————————————————————————————————
|
|
124
|
+
|
|
125
|
+
.accordion__item--active {
|
|
126
|
+
|
|
127
|
+
.accordion__control:after {
|
|
128
|
+
transform: rotate(180deg);
|
|
129
|
+
}
|
|
130
|
+
}
|