Merge bd32a54f627baf404262a4dfd218addbfcd6d01e into aae8bbdb3510697f541de4d58abc954d359b9391

This commit is contained in:
Maisam Afshar 2025-01-06 16:56:16 -04:00 committed by GitHub
commit 171d769911
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
172 changed files with 87253 additions and 7931 deletions

3
.npmrc Normal file
View File

@ -0,0 +1,3 @@
legacy-peer-deps=true
auto-install-peers=true
strict-peer-dependencies=false

View File

@ -1,5 +1,9 @@
# Change Logs
## [2.0.1] 2023-06-14
- Update dependencies & devDependencies
## [2.0.0] 2022-08-19
- Update the dependencies

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Creative Tim
Copyright (c) 2023 Creative Tim
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
# [Vue Material Kit 2](http://demos.creative-tim.com/vue-material-kit/#/?ref=readme-vmk) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?url=https://www.creative-tim.com/product/vue-material-kit&text=Check%20Vue%20Material%20kit%20Pro%20made%20by%20@CreativeTim%20#webdesign%20#kit%20#materialdesign%20#vue%20https://www.creative-tim.com/product/vue-material-kit)
![version](https://img.shields.io/badge/version-2.0.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/vue-material-kit.svg)](https://github.com/creativetimofficial/vue-material-kit/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/vue-material-kit.svg)](https://github.com/creativetimofficial/vue-material-kit/issues?q=is%3Aissue+is%3Aclosed)
![version](https://img.shields.io/badge/version-2.0.1-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/vue-material-kit.svg)](https://github.com/creativetimofficial/vue-material-kit/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/vue-material-kit.svg)](https://github.com/creativetimofficial/vue-material-kit/issues?q=is%3Aissue+is%3Aclosed)
![Image](https://s3.amazonaws.com/creativetim_bucket/products/97/original/vue-material-kit-2.jpg)
@ -188,7 +188,7 @@ If you have questions or need help integrating the product please [contact us](h
## Licensing
- Copyright 2022 [Creative Tim](https://www.creative-tim.com?ref=readme-vmk)
- Copyright 2023 [Creative Tim](https://www.creative-tim.com?ref=readme-vmk)
- Creative Tim [license](https://www.creative-tim.com/license?ref=readme-vmk)
## Useful Links

View File

@ -11,7 +11,7 @@
sizes="76x76"
href="./assets/img/apple-icon.png"
/>
<link rel="icon" type="image/png" href="./src/assets/img/favicon.png" />
<link rel="icon" type="image/png" href="./favicon.png" />
<title>Vue Material Kit 2 by Creative Tim</title>
<!-- Fonts and icons -->
<link

View File

@ -1,33 +1,34 @@
{
"name": "vue-material-kit-2",
"version": "2.0.0",
"version": "2.0.1",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 4173",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
"lint": "eslint . --ext .vue,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
"prettify": "prettier --write ."
},
"dependencies": {
"@popperjs/core": "2.11.5",
"bootstrap": "5.1.3",
"pinia": "2.0.14",
"prismjs": "1.28.0",
"typed.js": "2.0.12",
"vue": "3.2.36",
"@popperjs/core": "2.11.8",
"bootstrap": "5.3.0",
"pinia": "2.1.3",
"prismjs": "1.29.0",
"typed.js": "2.0.16",
"vue": "3.3.4",
"vue-clipboard3": "2.0.0",
"vue-count-to": "1.0.13",
"vue-prism-editor": "2.0.0-alpha.2",
"vue-router": "4.0.15"
"vue-router": "4.2.2"
},
"devDependencies": {
"@rushstack/eslint-patch": "1.1.0",
"@vitejs/plugin-vue": "2.3.3",
"@vue/eslint-config-prettier": "7.0.0",
"eslint": "8.19.0",
"eslint-plugin-vue": "9.0.0",
"prettier": "2.5.1",
"sass": "1.52.3",
"sass-loader": "13.0.0",
"vite": "2.9.9"
"@rushstack/eslint-patch": "1.3.1",
"@vitejs/plugin-vue": "4.2.3",
"@vue/eslint-config-prettier": "7.1.0",
"eslint": "8.42.0",
"eslint-plugin-vue": "9.14.1",
"prettier": "2.8.8",
"sass": "1.63.4",
"sass-loader": "13.3.2",
"vite": "4.3.9"
}
}

BIN
public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

View File

@ -1,11 +1,11 @@
<script setup>
/*
=========================================================
* Vue Material Kit 2 - v2.0.0
* Vue Material Kit 2 - v2.0.1
=========================================================
* Product Page: https://www.creative-tim.com/product/vue-material-kit
* Copyright 2022 Creative Tim (https://www.creative-tim.com)
* Copyright 2023 Creative Tim (https://www.creative-tim.com)
Coded by www.creative-tim.com

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,9 +5,13 @@ License - nucleoapp.com/license/
-------------------------------- */
@font-face {
font-family: 'NucleoIcons';
src: url('../fonts/nucleo-icons.eot');
src: url('../fonts/nucleo-icons.eot') format('embedded-opentype'), url('../fonts/nucleo-icons.woff2') format('woff2'), url('../fonts/nucleo-icons.woff') format('woff'), url('../fonts/nucleo-icons.ttf') format('truetype'), url('../fonts/nucleo-icons.svg') format('svg');
font-family: "NucleoIcons";
src: url("../fonts/nucleo-icons.eot");
src: url("../fonts/nucleo-icons.eot") format("embedded-opentype"),
url("../fonts/nucleo-icons.woff2") format("woff2"),
url("../fonts/nucleo-icons.woff") format("woff"),
url("../fonts/nucleo-icons.ttf") format("truetype"),
url("../fonts/nucleo-icons.svg") format("svg");
font-weight: normal;
font-style: normal;
}
@ -593,5 +597,4 @@ License - nucleoapp.com/license/
content: "\ea65";
}
/* all icon font classes list here */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@ if (document.querySelectorAll(".input-group").length != 0) {
allInputs.forEach((el) =>
setAttributes(el, {
onfocus: "focused(this)",
onfocusout: "defocused(this)"
onfocusout: "defocused(this)",
})
);
}

View File

@ -38,7 +38,7 @@ function debounce(func, wait, immediate) {
function smoothToPricing(id) {
if (document.getElementById(id)) {
document.getElementById(id).scrollIntoView({
behavior: "smooth"
behavior: "smooth",
});
}
}
@ -239,7 +239,7 @@ if (document.querySelector(".blur-shadow-avatar")) {
"avatar-sm",
"avatar-lg",
"avatar-xl",
"avatar-xxl"
"avatar-xxl",
];
for (var k = 0; k < avatarClasses.length; k++) {
@ -269,7 +269,7 @@ if (document.querySelector(".blur-shadow-avatar")) {
"avatar-sm",
"avatar-lg",
"avatar-xl",
"avatar-xxl"
"avatar-xxl",
];
for (var k = 0; k < avatarClasses.length; k++) {
@ -301,80 +301,80 @@ if (document.querySelector("#google-maps")) {
elementType: "labels.text.fill",
stylers: [
{
color: "#444444"
}
]
color: "#444444",
},
],
},
{
featureType: "landscape",
elementType: "all",
stylers: [
{
color: "#f2f2f2"
}
]
color: "#f2f2f2",
},
],
},
{
featureType: "poi",
elementType: "all",
stylers: [
{
visibility: "off"
}
]
visibility: "off",
},
],
},
{
featureType: "road",
elementType: "all",
stylers: [
{
saturation: -100
saturation: -100,
},
{
lightness: 45
}
]
lightness: 45,
},
],
},
{
featureType: "road.highway",
elementType: "all",
stylers: [
{
visibility: "simplified"
}
]
visibility: "simplified",
},
],
},
{
featureType: "road.arterial",
elementType: "labels.icon",
stylers: [
{
visibility: "off"
}
]
visibility: "off",
},
],
},
{
featureType: "transit",
elementType: "all",
stylers: [
{
visibility: "off"
}
]
visibility: "off",
},
],
},
{
featureType: "water",
elementType: "all",
stylers: [
{
color: "#C5CBF5"
color: "#C5CBF5",
},
{
visibility: "on"
}
]
}
]
visibility: "on",
},
],
},
],
};
var map = new google.maps.Map(
@ -384,7 +384,7 @@ if (document.querySelector("#google-maps")) {
var marker = new google.maps.Marker({
position: myLatlng,
title: "Hello World!"
title: "Hello World!",
});
// To add the marker to the map, call setMap();

File diff suppressed because one or more lines are too long

View File

@ -1,51 +1,63 @@
/* eslint-disable */
export default function setNavPills() {
var total = document.querySelectorAll('.nav-pills');
var total = document.querySelectorAll(".nav-pills");
function initNavs() {
total.forEach(function (item, i) {
var moving_div = document.createElement('div');
var first_li = item.querySelector('li:first-child .nav-link');
var moving_div = document.createElement("div");
var first_li = item.querySelector("li:first-child .nav-link");
var tab = first_li.cloneNode();
tab.innerHTML = "-";
moving_div.classList.add('moving-tab', 'position-absolute', 'nav-link');
moving_div.classList.add("moving-tab", "position-absolute", "nav-link");
moving_div.appendChild(tab);
item.appendChild(moving_div);
var list_length = item.getElementsByTagName("li").length;
moving_div.style.padding = '0px';
moving_div.style.width = item.querySelector('li:nth-child(1)').offsetWidth + 'px';
moving_div.style.transform = 'translate3d(0px, 0px, 0px)';
moving_div.style.transition = '.5s ease';
moving_div.style.padding = "0px";
moving_div.style.width =
item.querySelector("li:nth-child(1)").offsetWidth + "px";
moving_div.style.transform = "translate3d(0px, 0px, 0px)";
moving_div.style.transition = ".5s ease";
item.onmouseover = function (event) {
let target = getEventTarget(event);
let li = target.closest('li'); // get reference
let li = target.closest("li"); // get reference
if (li) {
let nodes = Array.from(li.closest('ul').children); // get array
let nodes = Array.from(li.closest("ul").children); // get array
let index = nodes.indexOf(li) + 1;
item.querySelector('li:nth-child(' + index + ') .nav-link').onclick = function () {
moving_div = item.querySelector('.moving-tab');
item.querySelector("li:nth-child(" + index + ") .nav-link").onclick =
function () {
moving_div = item.querySelector(".moving-tab");
let sum = 0;
if (item.classList.contains('flex-column')) {
if (item.classList.contains("flex-column")) {
for (var j = 1; j <= nodes.indexOf(li); j++) {
sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;
sum += item.querySelector(
"li:nth-child(" + j + ")"
).offsetHeight;
}
moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';
moving_div.style.height = item.querySelector('li:nth-child(' + j + ')').offsetHeight;
moving_div.style.transform =
"translate3d(0px," + sum + "px, 0px)";
moving_div.style.height = item.querySelector(
"li:nth-child(" + j + ")"
).offsetHeight;
} else {
for (var j = 1; j <= nodes.indexOf(li); j++) {
sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;
}
moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
}
sum += item.querySelector(
"li:nth-child(" + j + ")"
).offsetWidth;
}
moving_div.style.transform =
"translate3d(" + sum + "px, 0px, 0px)";
moving_div.style.width =
item.querySelector("li:nth-child(" + index + ")")
.offsetWidth + "px";
}
};
}
};
});
}
@ -55,90 +67,97 @@ export default function setNavPills() {
// Tabs navigation resize
window.addEventListener('resize', function (event) {
window.addEventListener("resize", function (event) {
total.forEach(function (item, i) {
item.querySelector('.moving-tab').remove();
var moving_div = document.createElement('div');
item.querySelector(".moving-tab").remove();
var moving_div = document.createElement("div");
var tab = item.querySelector(".nav-link.active").cloneNode();
tab.innerHTML = "-";
moving_div.classList.add('moving-tab', 'position-absolute', 'nav-link');
moving_div.classList.add("moving-tab", "position-absolute", "nav-link");
moving_div.appendChild(tab);
item.appendChild(moving_div);
moving_div.style.padding = '0px';
moving_div.style.transition = '.5s ease';
moving_div.style.padding = "0px";
moving_div.style.transition = ".5s ease";
let li = item.querySelector(".nav-link.active").parentElement;
if (li) {
let nodes = Array.from(li.closest('ul').children); // get array
let nodes = Array.from(li.closest("ul").children); // get array
let index = nodes.indexOf(li) + 1;
let sum = 0;
if (item.classList.contains('flex-column')) {
if (item.classList.contains("flex-column")) {
for (var j = 1; j <= nodes.indexOf(li); j++) {
sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;
sum += item.querySelector("li:nth-child(" + j + ")").offsetHeight;
}
moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
moving_div.style.height = item.querySelector('li:nth-child(' + j + ')').offsetHeight;
moving_div.style.transform = "translate3d(0px," + sum + "px, 0px)";
moving_div.style.width =
item.querySelector("li:nth-child(" + index + ")").offsetWidth +
"px";
moving_div.style.height = item.querySelector(
"li:nth-child(" + j + ")"
).offsetHeight;
} else {
for (var j = 1; j <= nodes.indexOf(li); j++) {
sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;
sum += item.querySelector("li:nth-child(" + j + ")").offsetWidth;
}
moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
moving_div.style.transform = "translate3d(" + sum + "px, 0px, 0px)";
moving_div.style.width =
item.querySelector("li:nth-child(" + index + ")").offsetWidth +
"px";
}
}
});
if (window.innerWidth < 991) {
total.forEach(function (item, i) {
if (!item.classList.contains('flex-column')) {
item.classList.remove('flex-row');
item.classList.add('flex-column', 'on-resize');
if (!item.classList.contains("flex-column")) {
item.classList.remove("flex-row");
item.classList.add("flex-column", "on-resize");
let li = item.querySelector(".nav-link.active").parentElement;
let nodes = Array.from(li.closest('ul').children); // get array
let nodes = Array.from(li.closest("ul").children); // get array
let index = nodes.indexOf(li) + 1;
let sum = 0;
for (var j = 1; j <= nodes.indexOf(li); j++) {
sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;
sum += item.querySelector("li:nth-child(" + j + ")").offsetHeight;
}
var moving_div = document.querySelector('.moving-tab');
moving_div.style.width = item.querySelector('li:nth-child(1)').offsetWidth + 'px';
moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';
var moving_div = document.querySelector(".moving-tab");
moving_div.style.width =
item.querySelector("li:nth-child(1)").offsetWidth + "px";
moving_div.style.transform = "translate3d(0px," + sum + "px, 0px)";
}
});
} else {
total.forEach(function (item, i) {
if (item.classList.contains('on-resize')) {
item.classList.remove('flex-column', 'on-resize');
item.classList.add('flex-row');
if (item.classList.contains("on-resize")) {
item.classList.remove("flex-column", "on-resize");
item.classList.add("flex-row");
let li = item.querySelector(".nav-link.active").parentElement;
let nodes = Array.from(li.closest('ul').children); // get array
let nodes = Array.from(li.closest("ul").children); // get array
let index = nodes.indexOf(li) + 1;
let sum = 0;
for (var j = 1; j <= nodes.indexOf(li); j++) {
sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;
sum += item.querySelector("li:nth-child(" + j + ")").offsetWidth;
}
var moving_div = document.querySelector('.moving-tab');
moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';
moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';
var moving_div = document.querySelector(".moving-tab");
moving_div.style.transform = "translate3d(" + sum + "px, 0px, 0px)";
moving_div.style.width =
item.querySelector("li:nth-child(" + index + ")").offsetWidth +
"px";
}
})
});
}
});
// Function to remove flex row on mobile devices
if (window.innerWidth < 991) {
total.forEach(function (item, i) {
if (item.classList.contains('flex-row')) {
item.classList.remove('flex-row');
item.classList.add('flex-column', 'on-resize');
if (item.classList.contains("flex-row")) {
item.classList.remove("flex-row");
item.classList.add("flex-column", "on-resize");
}
});
}

View File

@ -3,25 +3,719 @@
Released under the MIT license
*/
var $jscomp$this = this;
(function(u,r){"function"===typeof define&&define.amd?define([],r):"object"===typeof module&&module.exports?module.exports=r():u.anime=r()})(this,function(){function u(a){if(!g.col(a))try{return document.querySelectorAll(a)}catch(b){}}function r(a){return a.reduce(function(a,c){return a.concat(g.arr(c)?r(c):c)},[])}function v(a){if(g.arr(a))return a;g.str(a)&&(a=u(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]}function E(a,b){return a.some(function(a){return a===b})}
function z(a){var b={},c;for(c in a)b[c]=a[c];return b}function F(a,b){var c=z(a),d;for(d in a)c[d]=b.hasOwnProperty(d)?b[d]:a[d];return c}function A(a,b){var c=z(a),d;for(d in b)c[d]=g.und(a[d])?b[d]:a[d];return c}function R(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,h){return b+b+c+c+h+h});var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);a=parseInt(b[1],16);var c=parseInt(b[2],16),b=parseInt(b[3],16);return"rgb("+a+","+c+","+b+")"}function S(a){function b(a,b,c){0>
c&&(c+=1);1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?b:c<2/3?a+(b-a)*(2/3-c)*6:a}var c=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a);a=parseInt(c[1])/360;var d=parseInt(c[2])/100,c=parseInt(c[3])/100;if(0==d)d=c=a=c;else{var e=.5>c?c*(1+d):c+d-c*d,k=2*c-e,d=b(k,e,a+1/3),c=b(k,e,a);a=b(k,e,a-1/3)}return"rgb("+255*d+","+255*c+","+255*a+")"}function w(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg|rad|turn)?/.exec(a))return a[2]}function T(a){if(-1<a.indexOf("translate"))return"px";
if(-1<a.indexOf("rotate")||-1<a.indexOf("skew"))return"deg"}function G(a,b){return g.fnc(a)?a(b.target,b.id,b.total):a}function B(a,b){if(b in a.style)return getComputedStyle(a).getPropertyValue(b.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function H(a,b){if(g.dom(a)&&E(U,b))return"transform";if(g.dom(a)&&(a.getAttribute(b)||g.svg(a)&&a[b]))return"attribute";if(g.dom(a)&&"transform"!==b&&B(a,b))return"css";if(null!=a[b])return"object"}function V(a,b){var c=T(b),c=-1<b.indexOf("scale")?
1:0+c;a=a.style.transform;if(!a)return c;for(var d=[],e=[],k=[],h=/(\w+)\((.+?)\)/g;d=h.exec(a);)e.push(d[1]),k.push(d[2]);a=k.filter(function(a,c){return e[c]===b});return a.length?a[0]:c}function I(a,b){switch(H(a,b)){case "transform":return V(a,b);case "css":return B(a,b);case "attribute":return a.getAttribute(b)}return a[b]||0}function J(a,b){var c=/^(\*=|\+=|-=)/.exec(a);if(!c)return a;b=parseFloat(b);a=parseFloat(a.replace(c[0],""));switch(c[0][0]){case "+":return b+a;case "-":return b-a;case "*":return b*
a}}function C(a){return g.obj(a)&&a.hasOwnProperty("totalLength")}function W(a,b){function c(c){c=void 0===c?0:c;return a.el.getPointAtLength(1<=b+c?b+c:0)}var d=c(),e=c(-1),k=c(1);switch(a.property){case "x":return d.x;case "y":return d.y;case "angle":return 180*Math.atan2(k.y-e.y,k.x-e.x)/Math.PI}}function K(a,b){var c=/-?\d*\.?\d+/g;a=C(a)?a.totalLength:a;if(g.col(a))b=g.rgb(a)?a:g.hex(a)?R(a):g.hsl(a)?S(a):void 0;else{var d=w(a);a=d?a.substr(0,a.length-d.length):a;b=b?a+b:a}b+="";return{original:b,
numbers:b.match(c)?b.match(c).map(Number):[0],strings:b.split(c)}}function X(a,b){return b.reduce(function(b,d,e){return b+a[e-1]+d})}function L(a){return(a?r(g.arr(a)?a.map(v):v(a)):[]).filter(function(a,c,d){return d.indexOf(a)===c})}function Y(a){var b=L(a);return b.map(function(a,d){return{target:a,id:d,total:b.length}})}function Z(a,b){var c=z(b);if(g.arr(a)){var d=a.length;2!==d||g.obj(a[0])?g.fnc(b.duration)||(c.duration=b.duration/d):a={value:a}}return v(a).map(function(a,c){c=c?0:b.delay;
a=g.obj(a)&&!C(a)?a:{value:a};g.und(a.delay)&&(a.delay=c);return a}).map(function(a){return A(a,c)})}function aa(a,b){var c={},d;for(d in a){var e=G(a[d],b);g.arr(e)&&(e=e.map(function(a){return G(a,b)}),1===e.length&&(e=e[0]));c[d]=e}c.duration=parseFloat(c.duration);c.delay=parseFloat(c.delay);return c}function ba(a){return g.arr(a)?x.apply(this,a):M[a]}function ca(a,b){var c;return a.tweens.map(function(d){d=aa(d,b);var e=d.value,k=I(b.target,a.name),h=c?c.to.original:k,h=g.arr(e)?e[0]:h,n=J(g.arr(e)?
e[1]:e,h),k=w(n)||w(h)||w(k);d.isPath=C(e);d.from=K(h,k);d.to=K(n,k);d.start=c?c.end:a.offset;d.end=d.start+d.delay+d.duration;d.easing=ba(d.easing);d.elasticity=(1E3-Math.min(Math.max(d.elasticity,1),999))/1E3;g.col(d.from.original)&&(d.round=1);return c=d})}function da(a,b){return r(a.map(function(a){return b.map(function(b){var c=H(a.target,b.name);if(c){var d=ca(b,a);b={type:c,property:b.name,animatable:a,tweens:d,duration:d[d.length-1].end,delay:d[0].delay}}else b=void 0;return b})})).filter(function(a){return!g.und(a)})}
function N(a,b,c){var d="delay"===a?Math.min:Math.max;return b.length?d.apply(Math,b.map(function(b){return b[a]})):c[a]}function ea(a){var b=F(fa,a),c=F(ga,a),d=Y(a.targets),e=[],g=A(b,c),h;for(h in a)g.hasOwnProperty(h)||"targets"===h||e.push({name:h,offset:g.offset,tweens:Z(a[h],c)});a=da(d,e);return A(b,{animatables:d,animations:a,duration:N("duration",a,c),delay:N("delay",a,c)})}function m(a){function b(){return window.Promise&&new Promise(function(a){return P=a})}function c(a){return f.reversed?
f.duration-a:a}function d(a){for(var b=0,c={},d=f.animations,e={};b<d.length;){var g=d[b],h=g.animatable,n=g.tweens;e.tween=n.filter(function(b){return a<b.end})[0]||n[n.length-1];e.isPath$0=e.tween.isPath;e.round=e.tween.round;e.eased=e.tween.easing(Math.min(Math.max(a-e.tween.start-e.tween.delay,0),e.tween.duration)/e.tween.duration,e.tween.elasticity);n=X(e.tween.to.numbers.map(function(a){return function(b,c){c=a.isPath$0?0:a.tween.from.numbers[c];b=c+a.eased*(b-c);a.isPath$0&&(b=W(a.tween.value,
b));a.round&&(b=Math.round(b*a.round)/a.round);return b}}(e)),e.tween.to.strings);ha[g.type](h.target,g.property,n,c,h.id);g.currentValue=n;b++;e={isPath$0:e.isPath$0,tween:e.tween,eased:e.eased,round:e.round}}if(c)for(var k in c)D||(D=B(document.body,"transform")?"transform":"-webkit-transform"),f.animatables[k].target.style[D]=c[k].join(" ");f.currentTime=a;f.progress=a/f.duration*100}function e(a){if(f[a])f[a](f)}function g(){f.remaining&&!0!==f.remaining&&f.remaining--}function h(a){var h=f.duration,
k=f.offset,m=f.delay,O=f.currentTime,p=f.reversed,q=c(a),q=Math.min(Math.max(q,0),h);q>k&&q<h?(d(q),!f.began&&q>=m&&(f.began=!0,e("begin")),e("run")):(q<=k&&0!==O&&(d(0),p&&g()),q>=h&&O!==h&&(d(h),p||g()));a>=h&&(f.remaining?(t=n,"alternate"===f.direction&&(f.reversed=!f.reversed)):(f.pause(),P(),Q=b(),f.completed||(f.completed=!0,e("complete"))),l=0);if(f.children)for(a=f.children,h=0;h<a.length;h++)a[h].seek(q);e("update")}a=void 0===a?{}:a;var n,t,l=0,P=null,Q=b(),f=ea(a);f.reset=function(){var a=
f.direction,b=f.loop;f.currentTime=0;f.progress=0;f.paused=!0;f.began=!1;f.completed=!1;f.reversed="reverse"===a;f.remaining="alternate"===a&&1===b?2:b};f.tick=function(a){n=a;t||(t=n);h((l+n-t)*m.speed)};f.seek=function(a){h(c(a))};f.pause=function(){var a=p.indexOf(f);-1<a&&p.splice(a,1);f.paused=!0};f.play=function(){f.paused&&(f.paused=!1,t=0,l=f.completed?0:c(f.currentTime),p.push(f),y||ia())};f.reverse=function(){f.reversed=!f.reversed;t=0;l=c(f.currentTime)};f.restart=function(){f.pause();
f.reset();f.play()};f.finished=Q;f.reset();f.autoplay&&f.play();return f}var fa={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},ga={duration:1E3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},U="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY".split(" "),D,g={arr:function(a){return Array.isArray(a)},obj:function(a){return-1<Object.prototype.toString.call(a).indexOf("Object")},svg:function(a){return a instanceof
SVGElement},dom:function(a){return a.nodeType||g.svg(a)},str:function(a){return"string"===typeof a},fnc:function(a){return"function"===typeof a},und:function(a){return"undefined"===typeof a},hex:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},rgb:function(a){return/^rgb/.test(a)},hsl:function(a){return/^hsl/.test(a)},col:function(a){return g.hex(a)||g.rgb(a)||g.hsl(a)}},x=function(){function a(a,c,d){return(((1-3*d+3*c)*a+(3*d-6*c))*a+3*c)*a}return function(b,c,d,e){if(0<=b&&1>=b&&
0<=d&&1>=d){var g=new Float32Array(11);if(b!==c||d!==e)for(var h=0;11>h;++h)g[h]=a(.1*h,b,d);return function(h){if(b===c&&d===e)return h;if(0===h)return 0;if(1===h)return 1;for(var k=0,l=1;10!==l&&g[l]<=h;++l)k+=.1;--l;var l=k+(h-g[l])/(g[l+1]-g[l])*.1,n=3*(1-3*d+3*b)*l*l+2*(3*d-6*b)*l+3*b;if(.001<=n){for(k=0;4>k;++k){n=3*(1-3*d+3*b)*l*l+2*(3*d-6*b)*l+3*b;if(0===n)break;var m=a(l,b,d)-h,l=l-m/n}h=l}else if(0===n)h=l;else{var l=k,k=k+.1,f=0;do m=l+(k-l)/2,n=a(m,b,d)-h,0<n?k=m:l=m;while(1e-7<Math.abs(n)&&
10>++f);h=m}return a(h,c,e)}}}}(),M=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var b="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),c={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],
[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},d={linear:x(.25,.25,.75,.75)},e={},k;for(k in c)e.type=k,c[e.type].forEach(function(a){return function(c,e){d["ease"+a.type+b[e]]=g.fnc(c)?c:x.apply($jscomp$this,c)}}(e)),e={type:e.type};return d}(),ha={css:function(a,b,c){return a.style[b]=
c},attribute:function(a,b,c){return a.setAttribute(b,c)},object:function(a,b,c){return a[b]=c},transform:function(a,b,c,d,e){d[e]||(d[e]=[]);d[e].push(b+"("+c+")")}},p=[],y=0,ia=function(){function a(){y=requestAnimationFrame(b)}function b(b){var c=p.length;if(c){for(var e=0;e<c;)p[e]&&p[e].tick(b),e++;a()}else cancelAnimationFrame(y),y=0}return a}();m.version="2.0.1";m.speed=1;m.running=p;m.remove=function(a){a=L(a);for(var b=p.length-1;0<=b;b--)for(var c=p[b],d=c.animations,e=d.length-1;0<=e;e--)E(a,
d[e].animatable.target)&&(d.splice(e,1),d.length||c.pause())};m.getValue=I;m.path=function(a,b){var c=g.str(a)?u(a)[0]:a,d=b||100;return function(a){return{el:c,property:a,totalLength:c.getTotalLength()*(d/100)}}};m.setDashoffset=function(a){var b=a.getTotalLength();a.setAttribute("stroke-dasharray",b);return b};m.bezier=x;m.easings=M;m.timeline=function(a){var b=m(a);b.duration=0;b.children=[];b.add=function(a){v(a).forEach(function(a){var c=a.offset,d=b.duration;a.autoplay=!1;a.offset=g.und(c)?
d:J(c,d);a=m(a);a.duration>d&&(b.duration=a.duration);b.children.push(a)});return b};return b};m.random=function(a,b){return Math.floor(Math.random()*(b-a+1))+a};return m});
(function (u, r) {
"function" === typeof define && define.amd
? define([], r)
: "object" === typeof module && module.exports
? (module.exports = r())
: (u.anime = r());
})(this, function () {
function u(a) {
if (!g.col(a))
try {
return document.querySelectorAll(a);
} catch (b) {}
}
function r(a) {
return a.reduce(function (a, c) {
return a.concat(g.arr(c) ? r(c) : c);
}, []);
}
function v(a) {
if (g.arr(a)) return a;
g.str(a) && (a = u(a) || a);
return a instanceof NodeList || a instanceof HTMLCollection
? [].slice.call(a)
: [a];
}
function E(a, b) {
return a.some(function (a) {
return a === b;
});
}
function z(a) {
var b = {},
c;
for (c in a) b[c] = a[c];
return b;
}
function F(a, b) {
var c = z(a),
d;
for (d in a) c[d] = b.hasOwnProperty(d) ? b[d] : a[d];
return c;
}
function A(a, b) {
var c = z(a),
d;
for (d in b) c[d] = g.und(a[d]) ? b[d] : a[d];
return c;
}
function R(a) {
a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, b, c, h) {
return b + b + c + c + h + h;
});
var b = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
a = parseInt(b[1], 16);
var c = parseInt(b[2], 16),
b = parseInt(b[3], 16);
return "rgb(" + a + "," + c + "," + b + ")";
}
function S(a) {
function b(a, b, c) {
0 > c && (c += 1);
1 < c && --c;
return c < 1 / 6
? a + 6 * (b - a) * c
: 0.5 > c
? b
: c < 2 / 3
? a + (b - a) * (2 / 3 - c) * 6
: a;
}
var c = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a);
a = parseInt(c[1]) / 360;
var d = parseInt(c[2]) / 100,
c = parseInt(c[3]) / 100;
if (0 == d) d = c = a = c;
else {
var e = 0.5 > c ? c * (1 + d) : c + d - c * d,
k = 2 * c - e,
d = b(k, e, a + 1 / 3),
c = b(k, e, a);
a = b(k, e, a - 1 / 3);
}
return "rgb(" + 255 * d + "," + 255 * c + "," + 255 * a + ")";
}
function w(a) {
if (
(a =
/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg|rad|turn)?/.exec(
a
))
)
return a[2];
}
function T(a) {
if (-1 < a.indexOf("translate")) return "px";
if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
}
function G(a, b) {
return g.fnc(a) ? a(b.target, b.id, b.total) : a;
}
function B(a, b) {
if (b in a.style)
return (
getComputedStyle(a).getPropertyValue(
b.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()
) || "0"
);
}
function H(a, b) {
if (g.dom(a) && E(U, b)) return "transform";
if (g.dom(a) && (a.getAttribute(b) || (g.svg(a) && a[b])))
return "attribute";
if (g.dom(a) && "transform" !== b && B(a, b)) return "css";
if (null != a[b]) return "object";
}
function V(a, b) {
var c = T(b),
c = -1 < b.indexOf("scale") ? 1 : 0 + c;
a = a.style.transform;
if (!a) return c;
for (var d = [], e = [], k = [], h = /(\w+)\((.+?)\)/g; (d = h.exec(a)); )
e.push(d[1]), k.push(d[2]);
a = k.filter(function (a, c) {
return e[c] === b;
});
return a.length ? a[0] : c;
}
function I(a, b) {
switch (H(a, b)) {
case "transform":
return V(a, b);
case "css":
return B(a, b);
case "attribute":
return a.getAttribute(b);
}
return a[b] || 0;
}
function J(a, b) {
var c = /^(\*=|\+=|-=)/.exec(a);
if (!c) return a;
b = parseFloat(b);
a = parseFloat(a.replace(c[0], ""));
switch (c[0][0]) {
case "+":
return b + a;
case "-":
return b - a;
case "*":
return b * a;
}
}
function C(a) {
return g.obj(a) && a.hasOwnProperty("totalLength");
}
function W(a, b) {
function c(c) {
c = void 0 === c ? 0 : c;
return a.el.getPointAtLength(1 <= b + c ? b + c : 0);
}
var d = c(),
e = c(-1),
k = c(1);
switch (a.property) {
case "x":
return d.x;
case "y":
return d.y;
case "angle":
return (180 * Math.atan2(k.y - e.y, k.x - e.x)) / Math.PI;
}
}
function K(a, b) {
var c = /-?\d*\.?\d+/g;
a = C(a) ? a.totalLength : a;
if (g.col(a)) b = g.rgb(a) ? a : g.hex(a) ? R(a) : g.hsl(a) ? S(a) : void 0;
else {
var d = w(a);
a = d ? a.substr(0, a.length - d.length) : a;
b = b ? a + b : a;
}
b += "";
return {
original: b,
numbers: b.match(c) ? b.match(c).map(Number) : [0],
strings: b.split(c),
};
}
function X(a, b) {
return b.reduce(function (b, d, e) {
return b + a[e - 1] + d;
});
}
function L(a) {
return (a ? r(g.arr(a) ? a.map(v) : v(a)) : []).filter(function (a, c, d) {
return d.indexOf(a) === c;
});
}
function Y(a) {
var b = L(a);
return b.map(function (a, d) {
return { target: a, id: d, total: b.length };
});
}
function Z(a, b) {
var c = z(b);
if (g.arr(a)) {
var d = a.length;
2 !== d || g.obj(a[0])
? g.fnc(b.duration) || (c.duration = b.duration / d)
: (a = { value: a });
}
return v(a)
.map(function (a, c) {
c = c ? 0 : b.delay;
a = g.obj(a) && !C(a) ? a : { value: a };
g.und(a.delay) && (a.delay = c);
return a;
})
.map(function (a) {
return A(a, c);
});
}
function aa(a, b) {
var c = {},
d;
for (d in a) {
var e = G(a[d], b);
g.arr(e) &&
((e = e.map(function (a) {
return G(a, b);
})),
1 === e.length && (e = e[0]));
c[d] = e;
}
c.duration = parseFloat(c.duration);
c.delay = parseFloat(c.delay);
return c;
}
function ba(a) {
return g.arr(a) ? x.apply(this, a) : M[a];
}
function ca(a, b) {
var c;
return a.tweens.map(function (d) {
d = aa(d, b);
var e = d.value,
k = I(b.target, a.name),
h = c ? c.to.original : k,
h = g.arr(e) ? e[0] : h,
n = J(g.arr(e) ? e[1] : e, h),
k = w(n) || w(h) || w(k);
d.isPath = C(e);
d.from = K(h, k);
d.to = K(n, k);
d.start = c ? c.end : a.offset;
d.end = d.start + d.delay + d.duration;
d.easing = ba(d.easing);
d.elasticity = (1e3 - Math.min(Math.max(d.elasticity, 1), 999)) / 1e3;
g.col(d.from.original) && (d.round = 1);
return (c = d);
});
}
function da(a, b) {
return r(
a.map(function (a) {
return b.map(function (b) {
var c = H(a.target, b.name);
if (c) {
var d = ca(b, a);
b = {
type: c,
property: b.name,
animatable: a,
tweens: d,
duration: d[d.length - 1].end,
delay: d[0].delay,
};
} else b = void 0;
return b;
});
})
).filter(function (a) {
return !g.und(a);
});
}
function N(a, b, c) {
var d = "delay" === a ? Math.min : Math.max;
return b.length
? d.apply(
Math,
b.map(function (b) {
return b[a];
})
)
: c[a];
}
function ea(a) {
var b = F(fa, a),
c = F(ga, a),
d = Y(a.targets),
e = [],
g = A(b, c),
h;
for (h in a)
g.hasOwnProperty(h) ||
"targets" === h ||
e.push({ name: h, offset: g.offset, tweens: Z(a[h], c) });
a = da(d, e);
return A(b, {
animatables: d,
animations: a,
duration: N("duration", a, c),
delay: N("delay", a, c),
});
}
function m(a) {
function b() {
return (
window.Promise &&
new Promise(function (a) {
return (P = a);
})
);
}
function c(a) {
return f.reversed ? f.duration - a : a;
}
function d(a) {
for (var b = 0, c = {}, d = f.animations, e = {}; b < d.length; ) {
var g = d[b],
h = g.animatable,
n = g.tweens;
e.tween =
n.filter(function (b) {
return a < b.end;
})[0] || n[n.length - 1];
e.isPath$0 = e.tween.isPath;
e.round = e.tween.round;
e.eased = e.tween.easing(
Math.min(
Math.max(a - e.tween.start - e.tween.delay, 0),
e.tween.duration
) / e.tween.duration,
e.tween.elasticity
);
n = X(
e.tween.to.numbers.map(
(function (a) {
return function (b, c) {
c = a.isPath$0 ? 0 : a.tween.from.numbers[c];
b = c + a.eased * (b - c);
a.isPath$0 && (b = W(a.tween.value, b));
a.round && (b = Math.round(b * a.round) / a.round);
return b;
};
})(e)
),
e.tween.to.strings
);
ha[g.type](h.target, g.property, n, c, h.id);
g.currentValue = n;
b++;
e = {
isPath$0: e.isPath$0,
tween: e.tween,
eased: e.eased,
round: e.round,
};
}
if (c)
for (var k in c)
D ||
(D = B(document.body, "transform")
? "transform"
: "-webkit-transform"),
(f.animatables[k].target.style[D] = c[k].join(" "));
f.currentTime = a;
f.progress = (a / f.duration) * 100;
}
function e(a) {
if (f[a]) f[a](f);
}
function g() {
f.remaining && !0 !== f.remaining && f.remaining--;
}
function h(a) {
var h = f.duration,
k = f.offset,
m = f.delay,
O = f.currentTime,
p = f.reversed,
q = c(a),
q = Math.min(Math.max(q, 0), h);
q > k && q < h
? (d(q), !f.began && q >= m && ((f.began = !0), e("begin")), e("run"))
: (q <= k && 0 !== O && (d(0), p && g()),
q >= h && O !== h && (d(h), p || g()));
a >= h &&
(f.remaining
? ((t = n), "alternate" === f.direction && (f.reversed = !f.reversed))
: (f.pause(),
P(),
(Q = b()),
f.completed || ((f.completed = !0), e("complete"))),
(l = 0));
if (f.children)
for (a = f.children, h = 0; h < a.length; h++) a[h].seek(q);
e("update");
}
a = void 0 === a ? {} : a;
var n,
t,
l = 0,
P = null,
Q = b(),
f = ea(a);
f.reset = function () {
var a = f.direction,
b = f.loop;
f.currentTime = 0;
f.progress = 0;
f.paused = !0;
f.began = !1;
f.completed = !1;
f.reversed = "reverse" === a;
f.remaining = "alternate" === a && 1 === b ? 2 : b;
};
f.tick = function (a) {
n = a;
t || (t = n);
h((l + n - t) * m.speed);
};
f.seek = function (a) {
h(c(a));
};
f.pause = function () {
var a = p.indexOf(f);
-1 < a && p.splice(a, 1);
f.paused = !0;
};
f.play = function () {
f.paused &&
((f.paused = !1),
(t = 0),
(l = f.completed ? 0 : c(f.currentTime)),
p.push(f),
y || ia());
};
f.reverse = function () {
f.reversed = !f.reversed;
t = 0;
l = c(f.currentTime);
};
f.restart = function () {
f.pause();
f.reset();
f.play();
};
f.finished = Q;
f.reset();
f.autoplay && f.play();
return f;
}
var fa = {
update: void 0,
begin: void 0,
run: void 0,
complete: void 0,
loop: 1,
direction: "normal",
autoplay: !0,
offset: 0,
},
ga = {
duration: 1e3,
delay: 0,
easing: "easeOutElastic",
elasticity: 500,
round: 0,
},
U =
"translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY".split(
" "
),
D,
g = {
arr: function (a) {
return Array.isArray(a);
},
obj: function (a) {
return -1 < Object.prototype.toString.call(a).indexOf("Object");
},
svg: function (a) {
return a instanceof SVGElement;
},
dom: function (a) {
return a.nodeType || g.svg(a);
},
str: function (a) {
return "string" === typeof a;
},
fnc: function (a) {
return "function" === typeof a;
},
und: function (a) {
return "undefined" === typeof a;
},
hex: function (a) {
return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a);
},
rgb: function (a) {
return /^rgb/.test(a);
},
hsl: function (a) {
return /^hsl/.test(a);
},
col: function (a) {
return g.hex(a) || g.rgb(a) || g.hsl(a);
},
},
x = (function () {
function a(a, c, d) {
return (((1 - 3 * d + 3 * c) * a + (3 * d - 6 * c)) * a + 3 * c) * a;
}
return function (b, c, d, e) {
if (0 <= b && 1 >= b && 0 <= d && 1 >= d) {
var g = new Float32Array(11);
if (b !== c || d !== e)
for (var h = 0; 11 > h; ++h) g[h] = a(0.1 * h, b, d);
return function (h) {
if (b === c && d === e) return h;
if (0 === h) return 0;
if (1 === h) return 1;
for (var k = 0, l = 1; 10 !== l && g[l] <= h; ++l) k += 0.1;
--l;
var l = k + ((h - g[l]) / (g[l + 1] - g[l])) * 0.1,
n =
3 * (1 - 3 * d + 3 * b) * l * l +
2 * (3 * d - 6 * b) * l +
3 * b;
if (0.001 <= n) {
for (k = 0; 4 > k; ++k) {
n =
3 * (1 - 3 * d + 3 * b) * l * l +
2 * (3 * d - 6 * b) * l +
3 * b;
if (0 === n) break;
var m = a(l, b, d) - h,
l = l - m / n;
}
h = l;
} else if (0 === n) h = l;
else {
var l = k,
k = k + 0.1,
f = 0;
do
(m = l + (k - l) / 2),
(n = a(m, b, d) - h),
0 < n ? (k = m) : (l = m);
while (1e-7 < Math.abs(n) && 10 > ++f);
h = m;
}
return a(h, c, e);
};
}
};
})(),
M = (function () {
function a(a, b) {
return 0 === a || 1 === a
? a
: -Math.pow(2, 10 * (a - 1)) *
Math.sin(
(2 * (a - 1 - (b / (2 * Math.PI)) * Math.asin(1)) * Math.PI) / b
);
}
var b = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
c = {
In: [
[0.55, 0.085, 0.68, 0.53],
[0.55, 0.055, 0.675, 0.19],
[0.895, 0.03, 0.685, 0.22],
[0.755, 0.05, 0.855, 0.06],
[0.47, 0, 0.745, 0.715],
[0.95, 0.05, 0.795, 0.035],
[0.6, 0.04, 0.98, 0.335],
[0.6, -0.28, 0.735, 0.045],
a,
],
Out: [
[0.25, 0.46, 0.45, 0.94],
[0.215, 0.61, 0.355, 1],
[0.165, 0.84, 0.44, 1],
[0.23, 1, 0.32, 1],
[0.39, 0.575, 0.565, 1],
[0.19, 1, 0.22, 1],
[0.075, 0.82, 0.165, 1],
[0.175, 0.885, 0.32, 1.275],
function (b, c) {
return 1 - a(1 - b, c);
},
],
InOut: [
[0.455, 0.03, 0.515, 0.955],
[0.645, 0.045, 0.355, 1],
[0.77, 0, 0.175, 1],
[0.86, 0, 0.07, 1],
[0.445, 0.05, 0.55, 0.95],
[1, 0, 0, 1],
[0.785, 0.135, 0.15, 0.86],
[0.68, -0.55, 0.265, 1.55],
function (b, c) {
return 0.5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
},
],
},
d = { linear: x(0.25, 0.25, 0.75, 0.75) },
e = {},
k;
for (k in c)
(e.type = k),
c[e.type].forEach(
(function (a) {
return function (c, e) {
d["ease" + a.type + b[e]] = g.fnc(c)
? c
: x.apply($jscomp$this, c);
};
})(e)
),
(e = { type: e.type });
return d;
})(),
ha = {
css: function (a, b, c) {
return (a.style[b] = c);
},
attribute: function (a, b, c) {
return a.setAttribute(b, c);
},
object: function (a, b, c) {
return (a[b] = c);
},
transform: function (a, b, c, d, e) {
d[e] || (d[e] = []);
d[e].push(b + "(" + c + ")");
},
},
p = [],
y = 0,
ia = (function () {
function a() {
y = requestAnimationFrame(b);
}
function b(b) {
var c = p.length;
if (c) {
for (var e = 0; e < c; ) p[e] && p[e].tick(b), e++;
a();
} else cancelAnimationFrame(y), (y = 0);
}
return a;
})();
m.version = "2.0.1";
m.speed = 1;
m.running = p;
m.remove = function (a) {
a = L(a);
for (var b = p.length - 1; 0 <= b; b--)
for (var c = p[b], d = c.animations, e = d.length - 1; 0 <= e; e--)
E(a, d[e].animatable.target) && (d.splice(e, 1), d.length || c.pause());
};
m.getValue = I;
m.path = function (a, b) {
var c = g.str(a) ? u(a)[0] : a,
d = b || 100;
return function (a) {
return {
el: c,
property: a,
totalLength: c.getTotalLength() * (d / 100),
};
};
};
m.setDashoffset = function (a) {
var b = a.getTotalLength();
a.setAttribute("stroke-dasharray", b);
return b;
};
m.bezier = x;
m.easings = M;
m.timeline = function (a) {
var b = m(a);
b.duration = 0;
b.children = [];
b.add = function (a) {
v(a).forEach(function (a) {
var c = a.offset,
d = b.duration;
a.autoplay = !1;
a.offset = g.und(c) ? d : J(c, d);
a = m(a);
a.duration > d && (b.duration = a.duration);
b.children.push(a);
});
return b;
};
return b;
};
m.random = function (a, b) {
return Math.floor(Math.random() * (b - a + 1)) + a;
};
return m;
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1,201 @@
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var i,a=1,s=arguments.length;a<s;a++)for(var n in i=arguments[a])Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);return t}).apply(this,arguments)},CountUp=function(){function t(t,i,a){var s=this;this.target=t,this.endVal=i,this.options=a,this.version="2.0.7",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:""},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.count=function(t){s.startTime||(s.startTime=t);var i=t-s.startTime;s.remaining=s.duration-i,s.useEasing?s.countDown?s.frameVal=s.startVal-s.easingFn(i,0,s.startVal-s.endVal,s.duration):s.frameVal=s.easingFn(i,s.startVal,s.endVal-s.startVal,s.duration):s.countDown?s.frameVal=s.startVal-(s.startVal-s.endVal)*(i/s.duration):s.frameVal=s.startVal+(s.endVal-s.startVal)*(i/s.duration),s.countDown?s.frameVal=s.frameVal<s.endVal?s.endVal:s.frameVal:s.frameVal=s.frameVal>s.endVal?s.endVal:s.frameVal,s.frameVal=Number(s.frameVal.toFixed(s.options.decimalPlaces)),s.printValue(s.frameVal),i<s.duration?s.rAF=requestAnimationFrame(s.count):null!==s.finalEndVal?s.update(s.finalEndVal):s.callback&&s.callback()},this.formatNumber=function(t){var i,a,n,e,r,o=t<0?"-":"";if(i=Math.abs(t).toFixed(s.options.decimalPlaces),n=(a=(i+="").split("."))[0],e=a.length>1?s.options.decimal+a[1]:"",s.options.useGrouping){r="";for(var l=0,h=n.length;l<h;++l)0!==l&&l%3==0&&(r=s.options.separator+r),r=n[h-l-1]+r;n=r}return s.options.numerals&&s.options.numerals.length&&(n=n.replace(/[0-9]/g,function(t){return s.options.numerals[+t]}),e=e.replace(/[0-9]/g,function(t){return s.options.numerals[+t]})),o+s.options.prefix+n+e+s.options.suffix},this.easeOutExpo=function(t,i,a,s){return a*(1-Math.pow(2,-10*t/s))*1024/1023+i},this.options=__assign(__assign({},this.defaults),a),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(i),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof t?document.getElementById(t):t,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined"}return t.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold){this.finalEndVal=t;var a=this.countDown?1:-1;this.endVal=t+a*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},t.prototype.start=function(t){this.error||(this.callback=t,this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},t.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},t.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},t.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal||this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},t.prototype.printValue=function(t){var i=this.formattingFn(t);"INPUT"===this.el.tagName?this.el.value=i:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=i:this.el.innerHTML=i},t.prototype.ensureNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error="[CountUp] invalid start or end value: "+t,null)},t.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},t}();
var __assign =
(this && this.__assign) ||
function () {
return (__assign =
Object.assign ||
function (t) {
for (var i, a = 1, s = arguments.length; a < s; a++)
for (var n in (i = arguments[a]))
Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
return t;
}).apply(this, arguments);
},
CountUp = (function () {
function t(t, i, a) {
var s = this;
(this.target = t),
(this.endVal = i),
(this.options = a),
(this.version = "2.0.7"),
(this.defaults = {
startVal: 0,
decimalPlaces: 0,
duration: 2,
useEasing: !0,
useGrouping: !0,
smartEasingThreshold: 999,
smartEasingAmount: 333,
separator: ",",
decimal: ".",
prefix: "",
suffix: "",
}),
(this.finalEndVal = null),
(this.useEasing = !0),
(this.countDown = !1),
(this.error = ""),
(this.startVal = 0),
(this.paused = !0),
(this.count = function (t) {
s.startTime || (s.startTime = t);
var i = t - s.startTime;
(s.remaining = s.duration - i),
s.useEasing
? s.countDown
? (s.frameVal =
s.startVal -
s.easingFn(i, 0, s.startVal - s.endVal, s.duration))
: (s.frameVal = s.easingFn(
i,
s.startVal,
s.endVal - s.startVal,
s.duration
))
: s.countDown
? (s.frameVal =
s.startVal - (s.startVal - s.endVal) * (i / s.duration))
: (s.frameVal =
s.startVal + (s.endVal - s.startVal) * (i / s.duration)),
s.countDown
? (s.frameVal = s.frameVal < s.endVal ? s.endVal : s.frameVal)
: (s.frameVal = s.frameVal > s.endVal ? s.endVal : s.frameVal),
(s.frameVal = Number(s.frameVal.toFixed(s.options.decimalPlaces))),
s.printValue(s.frameVal),
i < s.duration
? (s.rAF = requestAnimationFrame(s.count))
: null !== s.finalEndVal
? s.update(s.finalEndVal)
: s.callback && s.callback();
}),
(this.formatNumber = function (t) {
var i,
a,
n,
e,
r,
o = t < 0 ? "-" : "";
if (
((i = Math.abs(t).toFixed(s.options.decimalPlaces)),
(n = (a = (i += "").split("."))[0]),
(e = a.length > 1 ? s.options.decimal + a[1] : ""),
s.options.useGrouping)
) {
r = "";
for (var l = 0, h = n.length; l < h; ++l)
0 !== l && l % 3 == 0 && (r = s.options.separator + r),
(r = n[h - l - 1] + r);
n = r;
}
return (
s.options.numerals &&
s.options.numerals.length &&
((n = n.replace(/[0-9]/g, function (t) {
return s.options.numerals[+t];
})),
(e = e.replace(/[0-9]/g, function (t) {
return s.options.numerals[+t];
}))),
o + s.options.prefix + n + e + s.options.suffix
);
}),
(this.easeOutExpo = function (t, i, a, s) {
return (a * (1 - Math.pow(2, (-10 * t) / s)) * 1024) / 1023 + i;
}),
(this.options = __assign(__assign({}, this.defaults), a)),
(this.formattingFn = this.options.formattingFn
? this.options.formattingFn
: this.formatNumber),
(this.easingFn = this.options.easingFn
? this.options.easingFn
: this.easeOutExpo),
(this.startVal = this.validateValue(this.options.startVal)),
(this.frameVal = this.startVal),
(this.endVal = this.validateValue(i)),
(this.options.decimalPlaces = Math.max(this.options.decimalPlaces)),
this.resetDuration(),
(this.options.separator = String(this.options.separator)),
(this.useEasing = this.options.useEasing),
"" === this.options.separator && (this.options.useGrouping = !1),
(this.el = "string" == typeof t ? document.getElementById(t) : t),
this.el
? this.printValue(this.startVal)
: (this.error = "[CountUp] target is null or undefined");
}
return (
(t.prototype.determineDirectionAndSmartEasing = function () {
var t = this.finalEndVal ? this.finalEndVal : this.endVal;
this.countDown = this.startVal > t;
var i = t - this.startVal;
if (Math.abs(i) > this.options.smartEasingThreshold) {
this.finalEndVal = t;
var a = this.countDown ? 1 : -1;
(this.endVal = t + a * this.options.smartEasingAmount),
(this.duration = this.duration / 2);
} else (this.endVal = t), (this.finalEndVal = null);
this.finalEndVal
? (this.useEasing = !1)
: (this.useEasing = this.options.useEasing);
}),
(t.prototype.start = function (t) {
this.error ||
((this.callback = t),
this.duration > 0
? (this.determineDirectionAndSmartEasing(),
(this.paused = !1),
(this.rAF = requestAnimationFrame(this.count)))
: this.printValue(this.endVal));
}),
(t.prototype.pauseResume = function () {
this.paused
? ((this.startTime = null),
(this.duration = this.remaining),
(this.startVal = this.frameVal),
this.determineDirectionAndSmartEasing(),
(this.rAF = requestAnimationFrame(this.count)))
: cancelAnimationFrame(this.rAF),
(this.paused = !this.paused);
}),
(t.prototype.reset = function () {
cancelAnimationFrame(this.rAF),
(this.paused = !0),
this.resetDuration(),
(this.startVal = this.validateValue(this.options.startVal)),
(this.frameVal = this.startVal),
this.printValue(this.startVal);
}),
(t.prototype.update = function (t) {
cancelAnimationFrame(this.rAF),
(this.startTime = null),
(this.endVal = this.validateValue(t)),
this.endVal !== this.frameVal &&
((this.startVal = this.frameVal),
this.finalEndVal || this.resetDuration(),
(this.finalEndVal = null),
this.determineDirectionAndSmartEasing(),
(this.rAF = requestAnimationFrame(this.count)));
}),
(t.prototype.printValue = function (t) {
var i = this.formattingFn(t);
"INPUT" === this.el.tagName
? (this.el.value = i)
: "text" === this.el.tagName || "tspan" === this.el.tagName
? (this.el.textContent = i)
: (this.el.innerHTML = i);
}),
(t.prototype.ensureNumber = function (t) {
return "number" == typeof t && !isNaN(t);
}),
(t.prototype.validateValue = function (t) {
var i = Number(t);
return this.ensureNumber(i)
? i
: ((this.error = "[CountUp] invalid start or end value: " + t), null);
}),
(t.prototype.resetDuration = function () {
(this.startTime = null),
(this.duration = 1e3 * Number(this.options.duration)),
(this.remaining = this.duration);
}),
t
);
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
var windowHeight = window.innerHeight;
document.addEventListener('resize', function() {
document.addEventListener("resize", function () {
windowHeight = window.innerHeight;
})
});
function outerHeight(el) {
var height = el.offsetHeight;
@ -43,12 +43,12 @@ function parallax (el, speedFactor, outerHeight) {
var top = element.getBoundingClientRect().top;
var height = getHeight(element);
element.style.top = -(Math.round((firstTop - pos) * speedFactor)) + "px";
element.style.top = -Math.round((firstTop - pos) * speedFactor) + "px";
});
}
document.addEventListener('scroll', update, true)
document.addEventListener('resize', update)
update()
};
document.addEventListener("scroll", update, true);
document.addEventListener("resize", update);
update();
}
parallax(".hero", -0.6);

File diff suppressed because one or more lines are too long

View File

@ -5,22 +5,17 @@
*
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
if (typeof define === "function" && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
} else if (typeof exports === "object") {
module.exports = factory();
} else {
root.PhotoSwipeUI_Default = factory();
}
})(this, function () {
"use strict";
'use strict';
var PhotoSwipeUI_Default =
function(pswp, framework) {
var PhotoSwipeUI_Default = function (pswp, framework) {
var ui = this;
var _overlayUIUpdated = false,
_controlsVisible = true,
@ -35,24 +30,21 @@ var PhotoSwipeUI_Default =
_initalCloseOnScrollValue,
_isIdle,
_listen,
_loadingIndicator,
_loadingIndicatorHidden,
_loadingIndicatorTimeout,
_galleryHasOneSlide,
_options,
_defaultUIOptions = {
barsSize: {top:44, bottom:'auto'},
closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'],
barsSize: { top: 44, bottom: "auto" },
closeElClasses: ["item", "caption", "zoom-wrap", "ui", "top-bar"],
timeToIdle: 4000,
timeToIdleOutside: 1000,
loadingIndicatorDelay: 1000, // 2s
addCaptionHTMLFn: function (item, captionEl /*, isFake */) {
if (!item.title) {
captionEl.children[0].innerHTML = '';
captionEl.children[0].innerHTML = "";
return false;
}
captionEl.children[0].innerHTML = item.title;
@ -74,37 +66,51 @@ var PhotoSwipeUI_Default =
clickToCloseNonZoomable: true,
shareButtons: [
{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+
'?url={{url}}&media={{image_url}}&description={{text}}'},
{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}
{
id: "facebook",
label: "Share on Facebook",
url: "https://www.facebook.com/sharer/sharer.php?u={{url}}",
},
{
id: "twitter",
label: "Tweet",
url: "https://twitter.com/intent/tweet?text={{text}}&url={{url}}",
},
{
id: "pinterest",
label: "Pin it",
url:
"http://www.pinterest.com/pin/create/button/" +
"?url={{url}}&media={{image_url}}&description={{text}}",
},
{
id: "download",
label: "Download image",
url: "{{raw_image_url}}",
download: true,
},
],
getImageURLForShare: function (/* shareButtonData */) {
return pswp.currItem.src || '';
return pswp.currItem.src || "";
},
getPageURLForShare: function (/* shareButtonData */) {
return window.location.href;
},
getTextForShare: function (/* shareButtonData */) {
return pswp.currItem.title || '';
return pswp.currItem.title || "";
},
indexIndicatorSep: ' / ',
fitControlsWidth: 1200
indexIndicatorSep: " / ",
fitControlsWidth: 1200,
},
_blockControlsTap,
_blockControlsTapTimeout;
var _onControlsTap = function (e) {
if (_blockControlsTap) {
return true;
}
e = e || window.event;
if (_options.timeToIdle && _options.mouseUsed && !_isIdle) {
@ -112,18 +118,19 @@ var PhotoSwipeUI_Default =
_onIdleMouseMove();
}
var target = e.target || e.srcElement,
uiElement,
clickedClass = target.getAttribute('class') || '',
clickedClass = target.getAttribute("class") || "",
found;
for (var i = 0; i < _uiElements.length; i++) {
uiElement = _uiElements[i];
if(uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name ) > -1 ) {
if (
uiElement.onTap &&
clickedClass.indexOf("pswp__" + uiElement.name) > -1
) {
uiElement.onTap();
found = true;
}
}
@ -144,42 +151,42 @@ var PhotoSwipeUI_Default =
_blockControlsTap = false;
}, tapDelay);
}
},
_fitControlsInViewport = function () {
return !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth;
return (
!pswp.likelyTouchDevice ||
_options.mouseUsed ||
screen.width > _options.fitControlsWidth
);
},
_togglePswpClass = function (el, cName, add) {
framework[ (add ? 'add' : 'remove') + 'Class' ](el, 'pswp__' + cName);
framework[(add ? "add" : "remove") + "Class"](el, "pswp__" + cName);
},
// add class when there is just one item in the gallery
// (by default it hides left/right arrows and 1ofX counter)
_countNumItems = function () {
var hasOneSlide = (_options.getNumItemsFn() === 1);
var hasOneSlide = _options.getNumItemsFn() === 1;
if (hasOneSlide !== _galleryHasOneSlide) {
_togglePswpClass(_controls, 'ui--one-slide', hasOneSlide);
_togglePswpClass(_controls, "ui--one-slide", hasOneSlide);
_galleryHasOneSlide = hasOneSlide;
}
},
_toggleShareModalClass = function () {
_togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden);
_togglePswpClass(_shareModal, "share-modal--hidden", _shareModalHidden);
},
_toggleShareModal = function () {
_shareModalHidden = !_shareModalHidden;
if (!_shareModalHidden) {
_toggleShareModalClass();
setTimeout(function () {
if (!_shareModalHidden) {
framework.addClass(_shareModal, 'pswp__share-modal--fade-in');
framework.addClass(_shareModal, "pswp__share-modal--fade-in");
}
}, 30);
} else {
framework.removeClass(_shareModal, 'pswp__share-modal--fade-in');
framework.removeClass(_shareModal, "pswp__share-modal--fade-in");
setTimeout(function () {
if (_shareModalHidden) {
_toggleShareModalClass();
@ -192,24 +199,27 @@ var PhotoSwipeUI_Default =
}
return false;
},
_openWindowPopup = function (e) {
e = e || window.event;
var target = e.target || e.srcElement;
pswp.shout('shareLinkClick', e, target);
pswp.shout("shareLinkClick", e, target);
if (!target.href) {
return false;
}
if( target.hasAttribute('download') ) {
if (target.hasAttribute("download")) {
return true;
}
window.open(target.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,'+
'location=yes,width=550,height=420,top=100,left=' +
(window.screen ? Math.round(screen.width / 2 - 275) : 100) );
window.open(
target.href,
"pswp_share",
"scrollbars=yes,resizable=yes,toolbar=no," +
"location=yes,width=550,height=420,top=100,left=" +
(window.screen ? Math.round(screen.width / 2 - 275) : 100)
);
if (!_shareModalHidden) {
_toggleShareModal();
@ -218,7 +228,7 @@ var PhotoSwipeUI_Default =
return false;
},
_updateShareURLs = function () {
var shareButtonOut = '',
var shareButtonOut = "",
shareButtonData,
shareURL,
image_url,
@ -232,27 +242,39 @@ var PhotoSwipeUI_Default =
page_url = _options.getPageURLForShare(shareButtonData);
share_text = _options.getTextForShare(shareButtonData);
shareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(page_url) )
.replace('{{image_url}}', encodeURIComponent(image_url) )
.replace('{{raw_image_url}}', image_url )
.replace('{{text}}', encodeURIComponent(share_text) );
shareURL = shareButtonData.url
.replace("{{url}}", encodeURIComponent(page_url))
.replace("{{image_url}}", encodeURIComponent(image_url))
.replace("{{raw_image_url}}", image_url)
.replace("{{text}}", encodeURIComponent(share_text));
shareButtonOut += '<a href="' + shareURL + '" target="_blank" '+
'class="pswp__share--' + shareButtonData.id + '"' +
(shareButtonData.download ? 'download' : '') + '>' +
shareButtonData.label + '</a>';
shareButtonOut +=
'<a href="' +
shareURL +
'" target="_blank" ' +
'class="pswp__share--' +
shareButtonData.id +
'"' +
(shareButtonData.download ? "download" : "") +
">" +
shareButtonData.label +
"</a>";
if (_options.parseShareButtonOut) {
shareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut);
shareButtonOut = _options.parseShareButtonOut(
shareButtonData,
shareButtonOut
);
}
}
_shareModal.children[0].innerHTML = shareButtonOut;
_shareModal.children[0].onclick = _openWindowPopup;
},
_hasCloseClass = function (target) {
for (var i = 0; i < _options.closeElClasses.length; i++) {
if( framework.hasClass(target, 'pswp__' + _options.closeElClasses[i]) ) {
if (
framework.hasClass(target, "pswp__" + _options.closeElClasses[i])
) {
return true;
}
}
@ -270,7 +292,7 @@ var PhotoSwipeUI_Default =
_onMouseLeaveWindow = function (e) {
e = e ? e : window.event;
var from = e.relatedTarget || e.toElement;
if (!from || from.nodeName === 'HTML') {
if (!from || from.nodeName === "HTML") {
clearTimeout(_idleTimer);
_idleTimer = setTimeout(function () {
ui.setIdle(true);
@ -285,52 +307,47 @@ var PhotoSwipeUI_Default =
if (_fullscrenAPI) {
framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
ui.updateFullscreen();
framework.addClass(pswp.template, 'pswp--supports-fs');
framework.addClass(pswp.template, "pswp--supports-fs");
} else {
framework.removeClass(pswp.template, 'pswp--supports-fs');
framework.removeClass(pswp.template, "pswp--supports-fs");
}
}
},
_setupLoadingIndicator = function () {
// Setup loading indicator
if (_options.preloaderEl) {
_toggleLoadingIndicator(true);
_listen('beforeChange', function() {
_listen("beforeChange", function () {
clearTimeout(_loadingIndicatorTimeout);
// display loading indicator with delay
_loadingIndicatorTimeout = setTimeout(function () {
if (pswp.currItem && pswp.currItem.loading) {
if( !pswp.allowProgressiveImg() || (pswp.currItem.img && !pswp.currItem.img.naturalWidth) ) {
if (
!pswp.allowProgressiveImg() ||
(pswp.currItem.img && !pswp.currItem.img.naturalWidth)
) {
// show preloader if progressive loading is not enabled,
// or image width is not defined yet (because of slow connection)
_toggleLoadingIndicator(false);
// items-controller.js function allowProgressiveImg
}
} else {
_toggleLoadingIndicator(true); // hide preloader
}
}, _options.loadingIndicatorDelay);
});
_listen('imageLoadComplete', function(index, item) {
_listen("imageLoadComplete", function (index, item) {
if (pswp.currItem === item) {
_toggleLoadingIndicator(true);
}
});
}
},
_toggleLoadingIndicator = function (hide) {
if (_loadingIndicatorHidden !== hide) {
_togglePswpClass(_loadingIndicator, 'preloader--active', !hide);
_togglePswpClass(_loadingIndicator, "preloader--active", !hide);
_loadingIndicatorHidden = hide;
}
},
@ -338,24 +355,26 @@ var PhotoSwipeUI_Default =
var gap = item.vGap;
if (_fitControlsInViewport()) {
var bars = _options.barsSize;
if(_options.captionEl && bars.bottom === 'auto') {
if (_options.captionEl && bars.bottom === "auto") {
if (!_fakeCaptionContainer) {
_fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake');
_fakeCaptionContainer.appendChild( framework.createEl('pswp__caption__center') );
_fakeCaptionContainer = framework.createEl(
"pswp__caption pswp__caption--fake"
);
_fakeCaptionContainer.appendChild(
framework.createEl("pswp__caption__center")
);
_controls.insertBefore(_fakeCaptionContainer, _captionContainer);
framework.addClass(_controls, 'pswp__ui--fit');
framework.addClass(_controls, "pswp__ui--fit");
}
if (_options.addCaptionHTMLFn(item, _fakeCaptionContainer, true)) {
var captionSize = _fakeCaptionContainer.clientHeight;
gap.bottom = parseInt(captionSize, 10) || 44;
} else {
gap.bottom = bars.top; // if no caption, set size of bottom gap to size of top
}
} else {
gap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom;
gap.bottom = bars.bottom === "auto" ? 0 : bars.bottom;
}
// height of top bar is static, no need to calculate it
@ -367,10 +386,9 @@ var PhotoSwipeUI_Default =
_setupIdle = function () {
// Hide controls when mouse is used
if (_options.timeToIdle) {
_listen('mouseUsed', function() {
framework.bind(document, 'mousemove', _onIdleMouseMove);
framework.bind(document, 'mouseout', _onMouseLeaveWindow);
_listen("mouseUsed", function () {
framework.bind(document, "mousemove", _onIdleMouseMove);
framework.bind(document, "mouseout", _onMouseLeaveWindow);
_idleInterval = setInterval(function () {
_idleIncrement++;
@ -382,9 +400,8 @@ var PhotoSwipeUI_Default =
}
},
_setupHidingControlsDuringGestures = function () {
// Hide controls on vertical drag
_listen('onVerticalDrag', function(now) {
_listen("onVerticalDrag", function (now) {
if (_controlsVisible && now < 0.95) {
ui.hideControls();
} else if (!_controlsVisible && now >= 0.95) {
@ -394,7 +411,7 @@ var PhotoSwipeUI_Default =
// Hide controls when pinching to close
var pinchControlsHidden;
_listen('onPinchClose' , function(now) {
_listen("onPinchClose", function (now) {
if (_controlsVisible && now < 0.9) {
ui.hideControls();
pinchControlsHidden = true;
@ -403,97 +420,91 @@ var PhotoSwipeUI_Default =
}
});
_listen('zoomGestureEnded', function() {
_listen("zoomGestureEnded", function () {
pinchControlsHidden = false;
if (pinchControlsHidden && !_controlsVisible) {
ui.showControls();
}
});
};
var _uiElements = [
{
name: 'caption',
option: 'captionEl',
name: "caption",
option: "captionEl",
onInit: function (el) {
_captionContainer = el;
}
},
},
{
name: 'share-modal',
option: 'shareEl',
name: "share-modal",
option: "shareEl",
onInit: function (el) {
_shareModal = el;
},
onTap: function () {
_toggleShareModal();
}
},
},
{
name: 'button--share',
option: 'shareEl',
name: "button--share",
option: "shareEl",
onInit: function (el) {
_shareButton = el;
},
onTap: function () {
_toggleShareModal();
}
},
},
{
name: 'button--zoom',
option: 'zoomEl',
onTap: pswp.toggleDesktopZoom
name: "button--zoom",
option: "zoomEl",
onTap: pswp.toggleDesktopZoom,
},
{
name: 'counter',
option: 'counterEl',
name: "counter",
option: "counterEl",
onInit: function (el) {
_indexIndicator = el;
}
},
},
{
name: 'button--close',
option: 'closeEl',
onTap: pswp.close
name: "button--close",
option: "closeEl",
onTap: pswp.close,
},
{
name: 'button--arrow--left',
option: 'arrowEl',
onTap: pswp.prev
name: "button--arrow--left",
option: "arrowEl",
onTap: pswp.prev,
},
{
name: 'button--arrow--right',
option: 'arrowEl',
onTap: pswp.next
name: "button--arrow--right",
option: "arrowEl",
onTap: pswp.next,
},
{
name: 'button--fs',
option: 'fullscreenEl',
name: "button--fs",
option: "fullscreenEl",
onTap: function () {
if (_fullscrenAPI.isFullscreen()) {
_fullscrenAPI.exit();
} else {
_fullscrenAPI.enter();
}
}
},
},
{
name: 'preloader',
option: 'preloaderEl',
name: "preloader",
option: "preloaderEl",
onInit: function (el) {
_loadingIndicator = el;
}
}
},
},
];
var _setupUIElements = function () {
var item,
classAttr,
uiElement;
var item, classAttr, uiElement;
var loopThroughChildElements = function (sChildren) {
if (!sChildren) {
@ -508,18 +519,18 @@ var PhotoSwipeUI_Default =
for (var a = 0; a < _uiElements.length; a++) {
uiElement = _uiElements[a];
if(classAttr.indexOf('pswp__' + uiElement.name) > -1 ) {
if (classAttr.indexOf("pswp__" + uiElement.name) > -1) {
if (_options[uiElement.option]) {
// if element is not disabled from options
if( _options[uiElement.option] ) { // if element is not disabled from options
framework.removeClass(item, 'pswp__element--disabled');
framework.removeClass(item, "pswp__element--disabled");
if (uiElement.onInit) {
uiElement.onInit(item);
}
//item.style.display = 'block';
} else {
framework.addClass(item, 'pswp__element--disabled');
framework.addClass(item, "pswp__element--disabled");
//item.style.display = 'none';
}
}
@ -528,17 +539,13 @@ var PhotoSwipeUI_Default =
};
loopThroughChildElements(_controls.children);
var topBar = framework.getChildByClass(_controls, 'pswp__top-bar');
var topBar = framework.getChildByClass(_controls, "pswp__top-bar");
if (topBar) {
loopThroughChildElements(topBar.children);
}
};
ui.init = function () {
// extend options
framework.extend(pswp.options, _defaultUIOptions, true);
@ -546,51 +553,56 @@ var PhotoSwipeUI_Default =
_options = pswp.options;
// find pswp__ui element
_controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui');
_controls = framework.getChildByClass(pswp.scrollWrap, "pswp__ui");
// create local link
_listen = pswp.listen;
_setupHidingControlsDuringGestures();
// update controls when slides change
_listen('beforeChange', ui.update);
_listen("beforeChange", ui.update);
// toggle zoom on double-tap
_listen('doubleTap', function(point) {
_listen("doubleTap", function (point) {
var initialZoomLevel = pswp.currItem.initialZoomLevel;
if (pswp.getZoomLevel() !== initialZoomLevel) {
pswp.zoomTo(initialZoomLevel, point, 333);
} else {
pswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333);
pswp.zoomTo(
_options.getDoubleTapZoom(false, pswp.currItem),
point,
333
);
}
});
// Allow text selection in caption
_listen('preventDragEvent', function(e, isDown, preventObj) {
_listen("preventDragEvent", function (e, isDown, preventObj) {
var t = e.target || e.srcElement;
if (
t &&
t.getAttribute('class') && e.type.indexOf('mouse') > -1 &&
( t.getAttribute('class').indexOf('__caption') > 0 || (/(SMALL|STRONG|EM)/i).test(t.tagName) )
t.getAttribute("class") &&
e.type.indexOf("mouse") > -1 &&
(t.getAttribute("class").indexOf("__caption") > 0 ||
/(SMALL|STRONG|EM)/i.test(t.tagName))
) {
preventObj.prevent = false;
}
});
// bind events for UI
_listen('bindEvents', function() {
framework.bind(_controls, 'pswpTap click', _onControlsTap);
framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
_listen("bindEvents", function () {
framework.bind(_controls, "pswpTap click", _onControlsTap);
framework.bind(pswp.scrollWrap, "pswpTap", ui.onGlobalTap);
if (!pswp.likelyTouchDevice) {
framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
framework.bind(pswp.scrollWrap, "mouseover", ui.onMouseOver);
}
});
// unbind events for UI
_listen('unbindEvents', function() {
_listen("unbindEvents", function () {
if (!_shareModalHidden) {
_toggleShareModal();
}
@ -598,11 +610,11 @@ var PhotoSwipeUI_Default =
if (_idleInterval) {
clearInterval(_idleInterval);
}
framework.unbind(document, 'mouseout', _onMouseLeaveWindow);
framework.unbind(document, 'mousemove', _onIdleMouseMove);
framework.unbind(_controls, 'pswpTap click', _onControlsTap);
framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
framework.unbind(document, "mouseout", _onMouseLeaveWindow);
framework.unbind(document, "mousemove", _onIdleMouseMove);
framework.unbind(_controls, "pswpTap click", _onControlsTap);
framework.unbind(pswp.scrollWrap, "pswpTap", ui.onGlobalTap);
framework.unbind(pswp.scrollWrap, "mouseover", ui.onMouseOver);
if (_fullscrenAPI) {
framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
@ -614,38 +626,36 @@ var PhotoSwipeUI_Default =
}
});
// clean up things when gallery is destroyed
_listen('destroy', function() {
_listen("destroy", function () {
if (_options.captionEl) {
if (_fakeCaptionContainer) {
_controls.removeChild(_fakeCaptionContainer);
}
framework.removeClass(_captionContainer, 'pswp__caption--empty');
framework.removeClass(_captionContainer, "pswp__caption--empty");
}
if (_shareModal) {
_shareModal.children[0].onclick = null;
}
framework.removeClass(_controls, 'pswp__ui--over-close');
framework.addClass( _controls, 'pswp__ui--hidden');
framework.removeClass(_controls, "pswp__ui--over-close");
framework.addClass(_controls, "pswp__ui--hidden");
ui.setIdle(false);
});
if (!_options.showAnimationDuration) {
framework.removeClass( _controls, 'pswp__ui--hidden');
framework.removeClass(_controls, "pswp__ui--hidden");
}
_listen('initialZoomIn', function() {
_listen("initialZoomIn", function () {
if (_options.showAnimationDuration) {
framework.removeClass( _controls, 'pswp__ui--hidden');
framework.removeClass(_controls, "pswp__ui--hidden");
}
});
_listen('initialZoomOut', function() {
framework.addClass( _controls, 'pswp__ui--hidden');
_listen("initialZoomOut", function () {
framework.addClass(_controls, "pswp__ui--hidden");
});
_listen('parseVerticalMargin', _applyNavBarGaps);
_listen("parseVerticalMargin", _applyNavBarGaps);
_setupUIElements();
@ -664,23 +674,25 @@ var PhotoSwipeUI_Default =
ui.setIdle = function (isIdle) {
_isIdle = isIdle;
_togglePswpClass(_controls, 'ui--idle', isIdle);
_togglePswpClass(_controls, "ui--idle", isIdle);
};
ui.update = function () {
// Don't update UI if it's hidden
if (_controlsVisible && pswp.currItem) {
ui.updateIndexIndicator();
if (_options.captionEl) {
_options.addCaptionHTMLFn(pswp.currItem, _captionContainer);
_togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title);
_togglePswpClass(
_captionContainer,
"caption--empty",
!pswp.currItem.title
);
}
_overlayUIUpdated = true;
} else {
_overlayUIUpdated = false;
}
@ -693,7 +705,6 @@ var PhotoSwipeUI_Default =
};
ui.updateFullscreen = function (e) {
if (e) {
// some browsers change window scroll position during the fullscreen
// so PhotoSwipe updates it just in case
@ -703,12 +714,17 @@ var PhotoSwipeUI_Default =
}
// toogle pswp--fs class on root element
framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs');
framework[(_fullscrenAPI.isFullscreen() ? "add" : "remove") + "Class"](
pswp.template,
"pswp--fs"
);
};
ui.updateIndexIndicator = function () {
if (_options.counterEl) {
_indexIndicator.innerHTML = (pswp.getCurrentIndex()+1) +
_indexIndicator.innerHTML =
pswp.getCurrentIndex() +
1 +
_options.indexIndicatorSep +
_options.getNumItemsFn();
}
@ -722,16 +738,18 @@ var PhotoSwipeUI_Default =
return;
}
if(e.detail && e.detail.pointerType === 'mouse') {
if (e.detail && e.detail.pointerType === "mouse") {
// close gallery if clicked outside of the image
if (_hasCloseClass(target)) {
pswp.close();
return;
}
if(framework.hasClass(target, 'pswp__img')) {
if(pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) {
if (framework.hasClass(target, "pswp__img")) {
if (
pswp.getZoomLevel() === 1 &&
pswp.getZoomLevel() <= pswp.currItem.fitRatio
) {
if (_options.clickToCloseNonZoomable) {
pswp.close();
}
@ -739,9 +757,7 @@ var PhotoSwipeUI_Default =
pswp.toggleDesktopZoom(e.detail.releasePoint);
}
}
} else {
// tap anywhere (except buttons) to toggle visibility of controls
if (_options.tapToToggleControls) {
if (_controlsVisible) {
@ -752,11 +768,13 @@ var PhotoSwipeUI_Default =
}
// tap to close gallery
if(_options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) ) {
if (
_options.tapToClose &&
(framework.hasClass(target, "pswp__img") || _hasCloseClass(target))
) {
pswp.close();
return;
}
}
};
ui.onMouseOver = function (e) {
@ -764,11 +782,11 @@ var PhotoSwipeUI_Default =
var target = e.target || e.srcElement;
// add class when mouse is over an element that should close the gallery
_togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target));
_togglePswpClass(_controls, "ui--over-close", _hasCloseClass(target));
};
ui.hideControls = function () {
framework.addClass(_controls,'pswp__ui--hidden');
framework.addClass(_controls, "pswp__ui--hidden");
_controlsVisible = false;
};
@ -777,51 +795,51 @@ var PhotoSwipeUI_Default =
if (!_overlayUIUpdated) {
ui.update();
}
framework.removeClass(_controls,'pswp__ui--hidden');
framework.removeClass(_controls, "pswp__ui--hidden");
};
ui.supportsFullscreen = function () {
var d = document;
return !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen);
return !!(
d.exitFullscreen ||
d.mozCancelFullScreen ||
d.webkitExitFullscreen ||
d.msExitFullscreen
);
};
ui.getFullscreenAPI = function () {
var dE = document.documentElement,
api,
tF = 'fullscreenchange';
tF = "fullscreenchange";
if (dE.requestFullscreen) {
api = {
enterK: 'requestFullscreen',
exitK: 'exitFullscreen',
elementK: 'fullscreenElement',
eventK: tF
enterK: "requestFullscreen",
exitK: "exitFullscreen",
elementK: "fullscreenElement",
eventK: tF,
};
} else if (dE.mozRequestFullScreen) {
api = {
enterK: 'mozRequestFullScreen',
exitK: 'mozCancelFullScreen',
elementK: 'mozFullScreenElement',
eventK: 'moz' + tF
enterK: "mozRequestFullScreen",
exitK: "mozCancelFullScreen",
elementK: "mozFullScreenElement",
eventK: "moz" + tF,
};
} else if (dE.webkitRequestFullscreen) {
api = {
enterK: 'webkitRequestFullscreen',
exitK: 'webkitExitFullscreen',
elementK: 'webkitFullscreenElement',
eventK: 'webkit' + tF
enterK: "webkitRequestFullscreen",
exitK: "webkitExitFullscreen",
elementK: "webkitFullscreenElement",
eventK: "webkit" + tF,
};
} else if (dE.msRequestFullscreen) {
api = {
enterK: 'msRequestFullscreen',
exitK: 'msExitFullscreen',
elementK: 'msFullscreenElement',
eventK: 'MSFullscreenChange'
enterK: "msRequestFullscreen",
exitK: "msExitFullscreen",
elementK: "msFullscreenElement",
eventK: "MSFullscreenChange",
};
}
@ -831,7 +849,7 @@ var PhotoSwipeUI_Default =
_initalCloseOnScrollValue = _options.closeOnScroll;
_options.closeOnScroll = false;
if(this.enterK === 'webkitRequestFullscreen') {
if (this.enterK === "webkitRequestFullscreen") {
pswp.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT);
} else {
return pswp.template[this.enterK]();
@ -841,18 +859,14 @@ var PhotoSwipeUI_Default =
_options.closeOnScroll = _initalCloseOnScrollValue;
return document[this.exitK]();
};
api.isFullscreen = function() { return document[this.elementK]; };
api.isFullscreen = function () {
return document[this.elementK];
};
}
return api;
};
};
return PhotoSwipeUI_Default;
});

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,120 @@
(function(h,f){"function"===typeof define&&define.amd?define([],f):"object"===typeof module&&module.exports?module.exports=f():h.Rellax=f()})(this,function(){var h=function(f,l){var b=Object.create(h.prototype),g=0,k=0,c=[],p=!1,u=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(a){setTimeout(a,1E3/60)},m=function(a,b,d){return a<=b?b:a>=d?d:a};b.options={speed:-2,center:!1};l&&
Object.keys(l).forEach(function(a){b.options[a]=l[a]});b.options.speed=m(b.options.speed,-10,10);f||(f=".rellax");var q=document.querySelectorAll(f);if(0<q.length)b.elems=q;else throw Error("The elements you're trying to select don't exist.");var v=function(a){var e=a.getAttribute("data-rellax-percentage"),d=a.getAttribute("data-rellax-speed"),c=e||b.options.center?window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop:0,f=c+a.getBoundingClientRect().top,h=a.clientHeight||
a.offsetHeight||a.scrollHeight,g=e?e:(c-f+k)/(h+k);b.options.center&&(g=.5);c=d?m(d,-10,10):b.options.speed;if(e||b.options.center)c=m(d||b.options.speed,-5,5);e=Math.round(100*c*(1-g));a=a.style.cssText;d="";0<=a.indexOf("transform")&&(d=a.indexOf("transform"),d=a.slice(d),d=(g=d.indexOf(";"))?" "+d.slice(11,g).replace(/\s/g,""):" "+d.slice(11).replace(/\s/g,""));return{base:e,top:f,height:h,speed:c,style:a,transform:d}},r=function(){var a=g;g=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||
document.body.parentNode||document.body).scrollTop;return a!=g?!0:!1},t=function(){r()&&!1===p&&n();u(t)},n=function(){for(var a=0;a<b.elems.length;a++){var e=" translate3d(0,"+(Math.round(100*c[a].speed*(1-(g-c[a].top+k)/(c[a].height+k)))-c[a].base)+"px,0)"+c[a].transform;b.elems[a].style.cssText=c[a].style+"-webkit-transform:"+e+";-moz-transform:"+e+";transform:"+e+";"}};b.destroy=function(){for(var a=0;a<b.elems.length;a++)b.elems[a].style.cssText=c[a].style;p=!0};(function(){k=window.innerHeight;
r();for(var a=0;a<b.elems.length;a++){var e=v(b.elems[a]);c.push(e)}window.addEventListener("resize",function(){n()});t();n()})();return b};return h});
(function (h, f) {
"function" === typeof define && define.amd
? define([], f)
: "object" === typeof module && module.exports
? (module.exports = f())
: (h.Rellax = f());
})(this, function () {
var h = function (f, l) {
var b = Object.create(h.prototype),
g = 0,
k = 0,
c = [],
p = !1,
u =
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame ||
function (a) {
setTimeout(a, 1e3 / 60);
},
m = function (a, b, d) {
return a <= b ? b : a >= d ? d : a;
};
b.options = { speed: -2, center: !1 };
l &&
Object.keys(l).forEach(function (a) {
b.options[a] = l[a];
});
b.options.speed = m(b.options.speed, -10, 10);
f || (f = ".rellax");
var q = document.querySelectorAll(f);
if (0 < q.length) b.elems = q;
else throw Error("The elements you're trying to select don't exist.");
var v = function (a) {
var e = a.getAttribute("data-rellax-percentage"),
d = a.getAttribute("data-rellax-speed"),
c =
e || b.options.center
? window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop
: 0,
f = c + a.getBoundingClientRect().top,
h = a.clientHeight || a.offsetHeight || a.scrollHeight,
g = e ? e : (c - f + k) / (h + k);
b.options.center && (g = 0.5);
c = d ? m(d, -10, 10) : b.options.speed;
if (e || b.options.center) c = m(d || b.options.speed, -5, 5);
e = Math.round(100 * c * (1 - g));
a = a.style.cssText;
d = "";
0 <= a.indexOf("transform") &&
((d = a.indexOf("transform")),
(d = a.slice(d)),
(d = (g = d.indexOf(";"))
? " " + d.slice(11, g).replace(/\s/g, "")
: " " + d.slice(11).replace(/\s/g, "")));
return { base: e, top: f, height: h, speed: c, style: a, transform: d };
},
r = function () {
var a = g;
g =
void 0 !== window.pageYOffset
? window.pageYOffset
: (
document.documentElement ||
document.body.parentNode ||
document.body
).scrollTop;
return a != g ? !0 : !1;
},
t = function () {
r() && !1 === p && n();
u(t);
},
n = function () {
for (var a = 0; a < b.elems.length; a++) {
var e =
" translate3d(0," +
(Math.round(
100 * c[a].speed * (1 - (g - c[a].top + k) / (c[a].height + k))
) -
c[a].base) +
"px,0)" +
c[a].transform;
b.elems[a].style.cssText =
c[a].style +
"-webkit-transform:" +
e +
";-moz-transform:" +
e +
";transform:" +
e +
";";
}
};
b.destroy = function () {
for (var a = 0; a < b.elems.length; a++)
b.elems[a].style.cssText = c[a].style;
p = !0;
};
(function () {
k = window.innerHeight;
r();
for (var a = 0; a < b.elems.length; a++) {
var e = v(b.elems[a]);
c.push(e);
}
window.addEventListener("resize", function () {
n();
});
t();
n();
})();
return b;
};
return h;
});

File diff suppressed because one or more lines are too long

View File

@ -8,17 +8,341 @@
// for parallax concepts
// ------------------------------------------
(function(q,g){"function"===typeof define&&define.amd?define([],g):"object"===typeof module&&module.exports?module.exports=g():q.Rellax=g()})("undefined"!==typeof window?window:global,function(){var q=function(g,u){function C(){if(3===a.options.breakpoints.length&&Array.isArray(a.options.breakpoints)){var f=!0,c=!0,b;a.options.breakpoints.forEach(function(a){"number"!==typeof a&&(c=!1);null!==b&&a<b&&(f=!1);b=a});if(f&&c)return}a.options.breakpoints=[576,768,1201];console.warn("Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted")}
var a=Object.create(q.prototype),l=0,v=0,m=0,n=0,d=[],w=!0,A=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(a){return setTimeout(a,1E3/60)},p=null,x=!1;try{var k=Object.defineProperty({},"passive",{get:function(){x=!0}});window.addEventListener("testPassive",null,k);window.removeEventListener("testPassive",null,k)}catch(f){}var D=window.cancelAnimationFrame||window.mozCancelAnimationFrame||
clearTimeout,E=window.transformProp||function(){var a=document.createElement("div");if(null===a.style.transform){var c=["Webkit","Moz","ms"],b;for(b in c)if(void 0!==a.style[c[b]+"Transform"])return c[b]+"Transform"}return"transform"}();a.options={speed:-2,verticalSpeed:null,horizontalSpeed:null,breakpoints:[576,768,1201],center:!1,wrapper:null,relativeToWrapper:!1,round:!0,vertical:!0,horizontal:!1,verticalScrollAxis:"y",horizontalScrollAxis:"x",callback:function(){}};u&&Object.keys(u).forEach(function(d){a.options[d]=
u[d]});u&&u.breakpoints&&C();g||(g=".rellax");k="string"===typeof g?document.querySelectorAll(g):[g];if(0<k.length){a.elems=k;if(a.options.wrapper&&!a.options.wrapper.nodeType)if(k=document.querySelector(a.options.wrapper))a.options.wrapper=k;else{console.warn("Rellax: The wrapper you're trying to use doesn't exist.");return}var F,B=function(){for(var f=0;f<d.length;f++)a.elems[f].style.cssText=d[f].style;d=[];v=window.innerHeight;n=window.innerWidth;f=a.options.breakpoints;F=n<f[0]?"xs":n>=f[0]&&n<
f[1]?"sm":n>=f[1]&&n<f[2]?"md":"lg";H();for(f=0;f<a.elems.length;f++){var c=void 0,b=a.elems[f],e=b.getAttribute("data-rellax-percentage"),y=b.getAttribute("data-rellax-speed"),t=b.getAttribute("data-rellax-xs-speed"),g=b.getAttribute("data-rellax-mobile-speed"),h=b.getAttribute("data-rellax-tablet-speed"),k=b.getAttribute("data-rellax-desktop-speed"),l=b.getAttribute("data-rellax-vertical-speed"),m=b.getAttribute("data-rellax-horizontal-speed"),p=b.getAttribute("data-rellax-vertical-scroll-axis"),
q=b.getAttribute("data-rellax-horizontal-scroll-axis"),u=b.getAttribute("data-rellax-zindex")||0,x=b.getAttribute("data-rellax-min"),A=b.getAttribute("data-rellax-max"),C=b.getAttribute("data-rellax-min-x"),D=b.getAttribute("data-rellax-max-x"),E=b.getAttribute("data-rellax-min-y"),L=b.getAttribute("data-rellax-max-y"),r=!0;t||g||h||k?c={xs:t,sm:g,md:h,lg:k}:r=!1;t=a.options.wrapper?a.options.wrapper.scrollTop:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;a.options.relativeToWrapper&&
(t=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)-a.options.wrapper.offsetTop);var z=a.options.vertical?e||a.options.center?t:0:0,I=a.options.horizontal?e||a.options.center?a.options.wrapper?a.options.wrapper.scrollLeft:window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft:0:0;t=z+b.getBoundingClientRect().top;g=b.clientHeight||b.offsetHeight||b.scrollHeight;h=I+b.getBoundingClientRect().left;k=b.clientWidth||b.offsetWidth||b.scrollWidth;
z=e?e:(z-t+v)/(g+v);e=e?e:(I-h+n)/(k+n);a.options.center&&(z=e=.5);c=r&&null!==c[F]?Number(c[F]):y?y:a.options.speed;l=l?l:a.options.verticalSpeed;m=m?m:a.options.horizontalSpeed;p=p?p:a.options.verticalScrollAxis;q=q?q:a.options.horizontalScrollAxis;y=J(e,z,c,l,m);b=b.style.cssText;r="";if(e=/transform\s*:/i.exec(b))r=b.slice(e.index),r=(e=r.indexOf(";"))?" "+r.slice(11,e).replace(/\s/g,""):" "+r.slice(11).replace(/\s/g,"");d.push({baseX:y.x,baseY:y.y,top:t,left:h,height:g,width:k,speed:c,verticalSpeed:l,
horizontalSpeed:m,verticalScrollAxis:p,horizontalScrollAxis:q,style:b,transform:r,zindex:u,min:x,max:A,minX:C,maxX:D,minY:E,maxY:L})}K();w&&(window.addEventListener("resize",B),w=!1,G())},H=function(){var d=l,c=m;l=a.options.wrapper?a.options.wrapper.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;m=a.options.wrapper?a.options.wrapper.scrollLeft:(document.documentElement||document.body.parentNode||document.body).scrollLeft||window.pageXOffset;
a.options.relativeToWrapper&&(l=((document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset)-a.options.wrapper.offsetTop);return d!=l&&a.options.vertical||c!=m&&a.options.horizontal?!0:!1},J=function(d,c,b,e,g){var f={};d=100*(g?g:b)*(1-d);c=100*(e?e:b)*(1-c);f.x=a.options.round?Math.round(d):Math.round(100*d)/100;f.y=a.options.round?Math.round(c):Math.round(100*c)/100;return f},h=function(){window.removeEventListener("resize",h);window.removeEventListener("orientationchange",
h);(a.options.wrapper?a.options.wrapper:window).removeEventListener("scroll",h);(a.options.wrapper?a.options.wrapper:document).removeEventListener("touchmove",h);p=A(G)},G=function(){H()&&!1===w?(K(),p=A(G)):(p=null,window.addEventListener("resize",h),window.addEventListener("orientationchange",h),(a.options.wrapper?a.options.wrapper:window).addEventListener("scroll",h,x?{passive:!0}:!1),(a.options.wrapper?a.options.wrapper:document).addEventListener("touchmove",h,x?{passive:!0}:!1))},K=function(){for(var f,
c=0;c<a.elems.length;c++){var b=d[c].verticalScrollAxis.toLowerCase(),e=d[c].horizontalScrollAxis.toLowerCase();f=-1!=b.indexOf("x")?l:0;b=-1!=b.indexOf("y")?l:0;var g=-1!=e.indexOf("x")?m:0;e=-1!=e.indexOf("y")?m:0;f=J((f+g-d[c].left+n)/(d[c].width+n),(b+e-d[c].top+v)/(d[c].height+v),d[c].speed,d[c].verticalSpeed,d[c].horizontalSpeed);e=f.y-d[c].baseY;b=f.x-d[c].baseX;null!==d[c].min&&(a.options.vertical&&!a.options.horizontal&&(e=e<=d[c].min?d[c].min:e),a.options.horizontal&&!a.options.vertical&&
(b=b<=d[c].min?d[c].min:b));null!=d[c].minY&&(e=e<=d[c].minY?d[c].minY:e);null!=d[c].minX&&(b=b<=d[c].minX?d[c].minX:b);null!==d[c].max&&(a.options.vertical&&!a.options.horizontal&&(e=e>=d[c].max?d[c].max:e),a.options.horizontal&&!a.options.vertical&&(b=b>=d[c].max?d[c].max:b));null!=d[c].maxY&&(e=e>=d[c].maxY?d[c].maxY:e);null!=d[c].maxX&&(b=b>=d[c].maxX?d[c].maxX:b);a.elems[c].style[E]="translate3d("+(a.options.horizontal?b:"0")+"px,"+(a.options.vertical?e:"0")+"px,"+d[c].zindex+"px) "+d[c].transform}a.options.callback(f)};
a.destroy=function(){for(var f=0;f<a.elems.length;f++)a.elems[f].style.cssText=d[f].style;w||(window.removeEventListener("resize",B),w=!0);D(p);p=null};B();a.refresh=B;return a}console.warn("Rellax: The elements you're trying to select don't exist.")};return q});
(function (q, g) {
"function" === typeof define && define.amd
? define([], g)
: "object" === typeof module && module.exports
? (module.exports = g())
: (q.Rellax = g());
})("undefined" !== typeof window ? window : global, function () {
var q = function (g, u) {
function C() {
if (
3 === a.options.breakpoints.length &&
Array.isArray(a.options.breakpoints)
) {
var f = !0,
c = !0,
b;
a.options.breakpoints.forEach(function (a) {
"number" !== typeof a && (c = !1);
null !== b && a < b && (f = !1);
b = a;
});
if (f && c) return;
}
a.options.breakpoints = [576, 768, 1201];
console.warn(
"Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted"
);
}
var a = Object.create(q.prototype),
l = 0,
v = 0,
m = 0,
n = 0,
d = [],
w = !0,
A =
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame ||
function (a) {
return setTimeout(a, 1e3 / 60);
},
p = null,
x = !1;
try {
var k = Object.defineProperty({}, "passive", {
get: function () {
x = !0;
},
});
window.addEventListener("testPassive", null, k);
window.removeEventListener("testPassive", null, k);
} catch (f) {}
var D =
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
clearTimeout,
E =
window.transformProp ||
(function () {
var a = document.createElement("div");
if (null === a.style.transform) {
var c = ["Webkit", "Moz", "ms"],
b;
for (b in c)
if (void 0 !== a.style[c[b] + "Transform"])
return c[b] + "Transform";
}
return "transform";
})();
a.options = {
speed: -2,
verticalSpeed: null,
horizontalSpeed: null,
breakpoints: [576, 768, 1201],
center: !1,
wrapper: null,
relativeToWrapper: !1,
round: !0,
vertical: !0,
horizontal: !1,
verticalScrollAxis: "y",
horizontalScrollAxis: "x",
callback: function () {},
};
u &&
Object.keys(u).forEach(function (d) {
a.options[d] = u[d];
});
u && u.breakpoints && C();
g || (g = ".rellax");
k = "string" === typeof g ? document.querySelectorAll(g) : [g];
if (0 < k.length) {
a.elems = k;
if (a.options.wrapper && !a.options.wrapper.nodeType)
if ((k = document.querySelector(a.options.wrapper)))
a.options.wrapper = k;
else {
console.warn(
"Rellax: The wrapper you're trying to use doesn't exist."
);
return;
}
var F,
B = function () {
for (var f = 0; f < d.length; f++)
a.elems[f].style.cssText = d[f].style;
d = [];
v = window.innerHeight;
n = window.innerWidth;
f = a.options.breakpoints;
F =
n < f[0]
? "xs"
: n >= f[0] && n < f[1]
? "sm"
: n >= f[1] && n < f[2]
? "md"
: "lg";
H();
for (f = 0; f < a.elems.length; f++) {
var c = void 0,
b = a.elems[f],
e = b.getAttribute("data-rellax-percentage"),
y = b.getAttribute("data-rellax-speed"),
t = b.getAttribute("data-rellax-xs-speed"),
g = b.getAttribute("data-rellax-mobile-speed"),
h = b.getAttribute("data-rellax-tablet-speed"),
k = b.getAttribute("data-rellax-desktop-speed"),
l = b.getAttribute("data-rellax-vertical-speed"),
m = b.getAttribute("data-rellax-horizontal-speed"),
p = b.getAttribute("data-rellax-vertical-scroll-axis"),
q = b.getAttribute("data-rellax-horizontal-scroll-axis"),
u = b.getAttribute("data-rellax-zindex") || 0,
x = b.getAttribute("data-rellax-min"),
A = b.getAttribute("data-rellax-max"),
C = b.getAttribute("data-rellax-min-x"),
D = b.getAttribute("data-rellax-max-x"),
E = b.getAttribute("data-rellax-min-y"),
L = b.getAttribute("data-rellax-max-y"),
r = !0;
t || g || h || k ? (c = { xs: t, sm: g, md: h, lg: k }) : (r = !1);
t = a.options.wrapper
? a.options.wrapper.scrollTop
: window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
a.options.relativeToWrapper &&
(t =
(window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop) - a.options.wrapper.offsetTop);
var z = a.options.vertical ? (e || a.options.center ? t : 0) : 0,
I = a.options.horizontal
? e || a.options.center
? a.options.wrapper
? a.options.wrapper.scrollLeft
: window.pageXOffset ||
document.documentElement.scrollLeft ||
document.body.scrollLeft
: 0
: 0;
t = z + b.getBoundingClientRect().top;
g = b.clientHeight || b.offsetHeight || b.scrollHeight;
h = I + b.getBoundingClientRect().left;
k = b.clientWidth || b.offsetWidth || b.scrollWidth;
z = e ? e : (z - t + v) / (g + v);
e = e ? e : (I - h + n) / (k + n);
a.options.center && (z = e = 0.5);
c = r && null !== c[F] ? Number(c[F]) : y ? y : a.options.speed;
l = l ? l : a.options.verticalSpeed;
m = m ? m : a.options.horizontalSpeed;
p = p ? p : a.options.verticalScrollAxis;
q = q ? q : a.options.horizontalScrollAxis;
y = J(e, z, c, l, m);
b = b.style.cssText;
r = "";
if ((e = /transform\s*:/i.exec(b)))
(r = b.slice(e.index)),
(r = (e = r.indexOf(";"))
? " " + r.slice(11, e).replace(/\s/g, "")
: " " + r.slice(11).replace(/\s/g, ""));
d.push({
baseX: y.x,
baseY: y.y,
top: t,
left: h,
height: g,
width: k,
speed: c,
verticalSpeed: l,
horizontalSpeed: m,
verticalScrollAxis: p,
horizontalScrollAxis: q,
style: b,
transform: r,
zindex: u,
min: x,
max: A,
minX: C,
maxX: D,
minY: E,
maxY: L,
});
}
K();
w && (window.addEventListener("resize", B), (w = !1), G());
},
H = function () {
var d = l,
c = m;
l = a.options.wrapper
? a.options.wrapper.scrollTop
: (
document.documentElement ||
document.body.parentNode ||
document.body
).scrollTop || window.pageYOffset;
m = a.options.wrapper
? a.options.wrapper.scrollLeft
: (
document.documentElement ||
document.body.parentNode ||
document.body
).scrollLeft || window.pageXOffset;
a.options.relativeToWrapper &&
(l =
((
document.documentElement ||
document.body.parentNode ||
document.body
).scrollTop || window.pageYOffset) - a.options.wrapper.offsetTop);
return (d != l && a.options.vertical) ||
(c != m && a.options.horizontal)
? !0
: !1;
},
J = function (d, c, b, e, g) {
var f = {};
d = 100 * (g ? g : b) * (1 - d);
c = 100 * (e ? e : b) * (1 - c);
f.x = a.options.round ? Math.round(d) : Math.round(100 * d) / 100;
f.y = a.options.round ? Math.round(c) : Math.round(100 * c) / 100;
return f;
},
h = function () {
window.removeEventListener("resize", h);
window.removeEventListener("orientationchange", h);
(a.options.wrapper ? a.options.wrapper : window).removeEventListener(
"scroll",
h
);
(a.options.wrapper
? a.options.wrapper
: document
).removeEventListener("touchmove", h);
p = A(G);
},
G = function () {
H() && !1 === w
? (K(), (p = A(G)))
: ((p = null),
window.addEventListener("resize", h),
window.addEventListener("orientationchange", h),
(a.options.wrapper ? a.options.wrapper : window).addEventListener(
"scroll",
h,
x ? { passive: !0 } : !1
),
(a.options.wrapper
? a.options.wrapper
: document
).addEventListener("touchmove", h, x ? { passive: !0 } : !1));
},
K = function () {
for (var f, c = 0; c < a.elems.length; c++) {
var b = d[c].verticalScrollAxis.toLowerCase(),
e = d[c].horizontalScrollAxis.toLowerCase();
f = -1 != b.indexOf("x") ? l : 0;
b = -1 != b.indexOf("y") ? l : 0;
var g = -1 != e.indexOf("x") ? m : 0;
e = -1 != e.indexOf("y") ? m : 0;
f = J(
(f + g - d[c].left + n) / (d[c].width + n),
(b + e - d[c].top + v) / (d[c].height + v),
d[c].speed,
d[c].verticalSpeed,
d[c].horizontalSpeed
);
e = f.y - d[c].baseY;
b = f.x - d[c].baseX;
null !== d[c].min &&
(a.options.vertical &&
!a.options.horizontal &&
(e = e <= d[c].min ? d[c].min : e),
a.options.horizontal &&
!a.options.vertical &&
(b = b <= d[c].min ? d[c].min : b));
null != d[c].minY && (e = e <= d[c].minY ? d[c].minY : e);
null != d[c].minX && (b = b <= d[c].minX ? d[c].minX : b);
null !== d[c].max &&
(a.options.vertical &&
!a.options.horizontal &&
(e = e >= d[c].max ? d[c].max : e),
a.options.horizontal &&
!a.options.vertical &&
(b = b >= d[c].max ? d[c].max : b));
null != d[c].maxY && (e = e >= d[c].maxY ? d[c].maxY : e);
null != d[c].maxX && (b = b >= d[c].maxX ? d[c].maxX : b);
a.elems[c].style[E] =
"translate3d(" +
(a.options.horizontal ? b : "0") +
"px," +
(a.options.vertical ? e : "0") +
"px," +
d[c].zindex +
"px) " +
d[c].transform;
}
a.options.callback(f);
};
a.destroy = function () {
for (var f = 0; f < a.elems.length; f++)
a.elems[f].style.cssText = d[f].style;
w || (window.removeEventListener("resize", B), (w = !0));
D(p);
p = null;
};
B();
a.refresh = B;
return a;
}
console.warn("Rellax: The elements you're trying to select don't exist.");
};
return q;
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
var VanillaTilt = (function () {
'use strict';
"use strict";
/**
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
@ -11,7 +11,9 @@ var VanillaTilt = (function () {
class VanillaTilt {
constructor(element, settings = {}) {
if (!(element instanceof Node)) {
throw ("Can't initialize VanillaTilt because " + element + " is not a Node.");
throw (
"Can't initialize VanillaTilt because " + element + " is not a Node."
);
}
this.width = null;
@ -39,8 +41,12 @@ class VanillaTilt {
this.reverse = this.settings.reverse ? -1 : 1;
this.glare = VanillaTilt.isSettingTrue(this.settings.glare);
this.glarePrerender = VanillaTilt.isSettingTrue(this.settings["glare-prerender"]);
this.fullPageListening = VanillaTilt.isSettingTrue(this.settings["full-page-listening"]);
this.glarePrerender = VanillaTilt.isSettingTrue(
this.settings["glare-prerender"]
);
this.fullPageListening = VanillaTilt.isSettingTrue(
this.settings["full-page-listening"]
);
this.gyroscope = VanillaTilt.isSettingTrue(this.settings.gyroscope);
this.gyroscopeSamples = this.settings.gyroscopeSamples;
@ -72,7 +78,9 @@ class VanillaTilt {
}
if (typeof this.settings["mouse-event-element"] === "string") {
const mouseEventElement = document.querySelector(this.settings["mouse-event-element"]);
const mouseEventElement = document.querySelector(
this.settings["mouse-event-element"]
);
if (mouseEventElement) {
return mouseEventElement;
@ -97,8 +105,14 @@ class VanillaTilt {
this.onWindowResizeBind = this.onWindowResize.bind(this);
this.onDeviceOrientationBind = this.onDeviceOrientation.bind(this);
this.elementListener.addEventListener("mouseenter", this.onMouseEnterBind);
this.elementListener.addEventListener("mouseleave", this.onMouseLeaveBind);
this.elementListener.addEventListener(
"mouseenter",
this.onMouseEnterBind
);
this.elementListener.addEventListener(
"mouseleave",
this.onMouseLeaveBind
);
this.elementListener.addEventListener("mousemove", this.onMouseMoveBind);
if (this.glare || this.fullPageListening) {
@ -106,7 +120,10 @@ class VanillaTilt {
}
if (this.gyroscope) {
window.addEventListener("deviceorientation", this.onDeviceOrientationBind);
window.addEventListener(
"deviceorientation",
this.onDeviceOrientationBind
);
}
}
@ -114,12 +131,24 @@ class VanillaTilt {
* Method remove event listeners from current this.elementListener
*/
removeEventListeners() {
this.elementListener.removeEventListener("mouseenter", this.onMouseEnterBind);
this.elementListener.removeEventListener("mouseleave", this.onMouseLeaveBind);
this.elementListener.removeEventListener("mousemove", this.onMouseMoveBind);
this.elementListener.removeEventListener(
"mouseenter",
this.onMouseEnterBind
);
this.elementListener.removeEventListener(
"mouseleave",
this.onMouseLeaveBind
);
this.elementListener.removeEventListener(
"mousemove",
this.onMouseMoveBind
);
if (this.gyroscope) {
window.removeEventListener("deviceorientation", this.onDeviceOrientationBind);
window.removeEventListener(
"deviceorientation",
this.onDeviceOrientationBind
);
}
if (this.glare || this.fullPageListening) {
@ -164,14 +193,18 @@ class VanillaTilt {
this.gyroscopeSamples -= 1;
}
const totalAngleX = this.settings.gyroscopeMaxAngleX - this.settings.gyroscopeMinAngleX;
const totalAngleY = this.settings.gyroscopeMaxAngleY - this.settings.gyroscopeMinAngleY;
const totalAngleX =
this.settings.gyroscopeMaxAngleX - this.settings.gyroscopeMinAngleX;
const totalAngleY =
this.settings.gyroscopeMaxAngleY - this.settings.gyroscopeMinAngleY;
const degreesPerPixelX = totalAngleX / this.width;
const degreesPerPixelY = totalAngleY / this.height;
const angleX = event.gamma - (this.settings.gyroscopeMinAngleX + this.gammazero);
const angleY = event.beta - (this.settings.gyroscopeMinAngleY + this.betazero);
const angleX =
event.gamma - (this.settings.gyroscopeMinAngleX + this.gammazero);
const angleY =
event.beta - (this.settings.gyroscopeMinAngleY + this.betazero);
const posX = angleX / degreesPerPixelX;
const posY = angleY / degreesPerPixelY;
@ -214,11 +247,12 @@ class VanillaTilt {
reset() {
this.event = {
clientX: this.left + this.width / 2,
clientY: this.top + this.height / 2
clientY: this.top + this.height / 2,
};
if (this.element && this.element.style) {
this.element.style.transform = `perspective(${this.settings.perspective}px) ` +
this.element.style.transform =
`perspective(${this.settings.perspective}px) ` +
`rotateX(0deg) ` +
`rotateY(0deg) ` +
`scale3d(1, 1, 1)`;
@ -229,7 +263,8 @@ class VanillaTilt {
resetGlare() {
if (this.glare) {
this.glareElement.style.transform = "rotate(180deg) translate(-50%, -50%)";
this.glareElement.style.transform =
"rotate(180deg) translate(-50%, -50%)";
this.glareElement.style.opacity = "0";
}
}
@ -243,17 +278,30 @@ class VanillaTilt {
if (this.fullPageListening) {
this.event = {
clientX: (this.settings.startX + this.settings.max) / (2 * this.settings.max) * this.clientWidth,
clientY: (this.settings.startY + this.settings.max) / (2 * this.settings.max) * this.clientHeight
clientX:
((this.settings.startX + this.settings.max) /
(2 * this.settings.max)) *
this.clientWidth,
clientY:
((this.settings.startY + this.settings.max) /
(2 * this.settings.max)) *
this.clientHeight,
};
} else {
this.event = {
clientX: this.left + ((this.settings.startX + this.settings.max) / (2 * this.settings.max) * this.width),
clientY: this.top + ((this.settings.startY + this.settings.max) / (2 * this.settings.max) * this.height)
clientX:
this.left +
((this.settings.startX + this.settings.max) /
(2 * this.settings.max)) *
this.width,
clientY:
this.top +
((this.settings.startY + this.settings.max) /
(2 * this.settings.max)) *
this.height,
};
}
let backupScale = this.settings.scale;
this.settings.scale = 1;
this.update();
@ -275,16 +323,27 @@ class VanillaTilt {
x = Math.min(Math.max(x, 0), 1);
y = Math.min(Math.max(y, 0), 1);
let tiltX = (this.reverse * (this.settings.max - x * this.settings.max * 2)).toFixed(2);
let tiltY = (this.reverse * (y * this.settings.max * 2 - this.settings.max)).toFixed(2);
let angle = Math.atan2(this.event.clientX - (this.left + this.width / 2), -(this.event.clientY - (this.top + this.height / 2))) * (180 / Math.PI);
let tiltX = (
this.reverse *
(this.settings.max - x * this.settings.max * 2)
).toFixed(2);
let tiltY = (
this.reverse *
(y * this.settings.max * 2 - this.settings.max)
).toFixed(2);
let angle =
Math.atan2(
this.event.clientX - (this.left + this.width / 2),
-(this.event.clientY - (this.top + this.height / 2))
) *
(180 / Math.PI);
return {
tiltX: tiltX,
tiltY: tiltY,
percentageX: x * 100,
percentageY: y * 100,
angle: angle
angle: angle,
};
}
@ -300,19 +359,36 @@ class VanillaTilt {
update() {
let values = this.getValues();
this.element.style.transform = "perspective(" + this.settings.perspective + "px) " +
"rotateX(" + (this.settings.axis === "x" ? 0 : values.tiltY) + "deg) " +
"rotateY(" + (this.settings.axis === "y" ? 0 : values.tiltX) + "deg) " +
"scale3d(" + this.settings.scale + ", " + this.settings.scale + ", " + this.settings.scale + ")";
this.element.style.transform =
"perspective(" +
this.settings.perspective +
"px) " +
"rotateX(" +
(this.settings.axis === "x" ? 0 : values.tiltY) +
"deg) " +
"rotateY(" +
(this.settings.axis === "y" ? 0 : values.tiltX) +
"deg) " +
"scale3d(" +
this.settings.scale +
", " +
this.settings.scale +
", " +
this.settings.scale +
")";
if (this.glare) {
this.glareElement.style.transform = `rotate(${values.angle}deg) translate(-50%, -50%)`;
this.glareElement.style.opacity = `${values.percentageY * this.settings["max-glare"] / 100}`;
this.glareElement.style.opacity = `${
(values.percentageY * this.settings["max-glare"]) / 100
}`;
}
this.element.dispatchEvent(new CustomEvent("tiltChange", {
"detail": values
}));
this.element.dispatchEvent(
new CustomEvent("tiltChange", {
detail: values,
})
);
this.updateCall = null;
}
@ -343,46 +419,48 @@ class VanillaTilt {
}
Object.assign(this.glareElementWrapper.style, {
"position": "absolute",
"top": "0",
"left": "0",
"width": "100%",
"height": "100%",
"overflow": "hidden",
"pointer-events": "none"
position: "absolute",
top: "0",
left: "0",
width: "100%",
height: "100%",
overflow: "hidden",
"pointer-events": "none",
});
Object.assign(this.glareElement.style, {
"position": "absolute",
"top": "50%",
"left": "50%",
position: "absolute",
top: "50%",
left: "50%",
"pointer-events": "none",
"background-image": `linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)`,
"width": `${this.element.offsetWidth * 2}px`,
"height": `${this.element.offsetWidth * 2}px`,
"transform": "rotate(180deg) translate(-50%, -50%)",
width: `${this.element.offsetWidth * 2}px`,
height: `${this.element.offsetWidth * 2}px`,
transform: "rotate(180deg) translate(-50%, -50%)",
"transform-origin": "0% 0%",
"opacity": "0",
opacity: "0",
});
}
updateGlareSize() {
if (this.glare) {
Object.assign(this.glareElement.style, {
"width": `${this.element.offsetWidth * 2}`,
"height": `${this.element.offsetWidth * 2}`,
width: `${this.element.offsetWidth * 2}`,
height: `${this.element.offsetWidth * 2}`,
});
}
}
updateClientSize() {
this.clientWidth = window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth;
this.clientWidth =
window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth;
this.clientHeight = window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight;
this.clientHeight =
window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight;
}
onWindowResize() {
@ -392,8 +470,10 @@ class VanillaTilt {
setTransition() {
clearTimeout(this.transitionTimeout);
this.element.style.transition = this.settings.speed + "ms " + this.settings.easing;
if (this.glare) this.glareElement.style.transition = `opacity ${this.settings.speed}ms ${this.settings.easing}`;
this.element.style.transition =
this.settings.speed + "ms " + this.settings.easing;
if (this.glare)
this.glareElement.style.transition = `opacity ${this.settings.speed}ms ${this.settings.easing}`;
this.transitionTimeout = setTimeout(() => {
this.element.style.transition = "";
@ -401,7 +481,6 @@ class VanillaTilt {
this.glareElement.style.transition = "";
}
}, this.settings.speed);
}
/**
@ -449,7 +528,7 @@ class VanillaTilt {
gyroscopeMaxAngleX: 45,
gyroscopeMinAngleY: -45,
gyroscopeMaxAngleY: 45,
gyroscopeSamples: 10
gyroscopeSamples: 10,
};
let newSettings = {};
@ -463,7 +542,6 @@ class VanillaTilt {
} catch (e) {
newSettings[property] = attribute;
}
} else {
newSettings[property] = defaultSettings[property];
}
@ -504,5 +582,4 @@ if (typeof document !== "undefined") {
}
return VanillaTilt;
}());
})();

View File

@ -8,291 +8,533 @@
*
*/
(function (t, e) {
"object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.Typed = e() : t.Typed = e()
"object" == typeof exports && "object" == typeof module
? (module.exports = e())
: "function" == typeof define && define.amd
? define([], e)
: "object" == typeof exports
? (exports.Typed = e())
: (t.Typed = e());
})(this, function () {
return function(t) {
return (function (t) {
function e(n) {
if (s[n]) return s[n].exports;
var i = s[n] = {
var i = (s[n] = {
exports: {},
id: n,
loaded: !1
};
return t[n].call(i.exports, i, i.exports, e), i.loaded = !0, i.exports
loaded: !1,
});
return t[n].call(i.exports, i, i.exports, e), (i.loaded = !0), i.exports;
}
var s = {};
return e.m = t, e.c = s, e.p = "", e(0)
}([function(t, e, s) {
return (e.m = t), (e.c = s), (e.p = ""), e(0);
})([
function (t, e, s) {
"use strict";
function n(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
}
Object.defineProperty(e, "__esModule", {
value: !0
value: !0,
});
var i = function() {
var i = (function () {
function t(t, e) {
for (var s = 0; s < e.length; s++) {
var n = e[s];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
return function (e, s, n) {
return s && t(e.prototype, s), n && t(e, n), e
}
}(),
return s && t(e.prototype, s), n && t(e, n), e;
};
})(),
r = s(1),
o = s(3),
a = function() {
a = (function () {
function t(e, s) {
n(this, t), r.initializer.load(this, s, e), this.begin()
n(this, t), r.initializer.load(this, s, e), this.begin();
}
return i(t, [{
return (
i(t, [
{
key: "toggle",
value: function () {
this.pause.status ? this.start() : this.stop()
}
}, {
this.pause.status ? this.start() : this.stop();
},
},
{
key: "stop",
value: function () {
this.typingComplete || this.pause.status || (this.toggleBlinking(!0), this.pause.status = !0, this.options.onStop(this.arrayPos, this))
}
}, {
this.typingComplete ||
this.pause.status ||
(this.toggleBlinking(!0),
(this.pause.status = !0),
this.options.onStop(this.arrayPos, this));
},
},
{
key: "start",
value: function () {
this.typingComplete || this.pause.status && (this.pause.status = !1, this.pause.typewrite ? this.typewrite(this.pause.curString, this.pause.curStrPos) : this.backspace(this.pause.curString, this.pause.curStrPos), this.options.onStart(this.arrayPos, this))
}
}, {
this.typingComplete ||
(this.pause.status &&
((this.pause.status = !1),
this.pause.typewrite
? this.typewrite(
this.pause.curString,
this.pause.curStrPos
)
: this.backspace(
this.pause.curString,
this.pause.curStrPos
),
this.options.onStart(this.arrayPos, this)));
},
},
{
key: "destroy",
value: function () {
this.reset(!1), this.options.onDestroy(this)
}
}, {
this.reset(!1), this.options.onDestroy(this);
},
},
{
key: "reset",
value: function () {
var t = arguments.length <= 0 || void 0 === arguments[0] || arguments[0];
clearInterval(this.timeout), this.replaceText(""), this.cursor && this.cursor.parentNode && (this.cursor.parentNode.removeChild(this.cursor), this.cursor = null), this.strPos = 0, this.arrayPos = 0, this.curLoop = 0, t && (this.insertCursor(), this.options.onReset(this), this.begin())
}
}, {
var t =
arguments.length <= 0 ||
void 0 === arguments[0] ||
arguments[0];
clearInterval(this.timeout),
this.replaceText(""),
this.cursor &&
this.cursor.parentNode &&
(this.cursor.parentNode.removeChild(this.cursor),
(this.cursor = null)),
(this.strPos = 0),
(this.arrayPos = 0),
(this.curLoop = 0),
t &&
(this.insertCursor(),
this.options.onReset(this),
this.begin());
},
},
{
key: "begin",
value: function () {
var t = this;
this.options.onBegin(this), this.typingComplete = !1, this.shuffleStringsIfNeeded(this), this.insertCursor(), this.bindInputFocusEvents && this.bindFocusEvents(), this.timeout = setTimeout(function() {
t.currentElContent && 0 !== t.currentElContent.length ? t.backspace(t.currentElContent, t.currentElContent.length) : t.typewrite(t.strings[t.sequence[t.arrayPos]], t.strPos)
}, this.startDelay)
}
}, {
this.options.onBegin(this),
(this.typingComplete = !1),
this.shuffleStringsIfNeeded(this),
this.insertCursor(),
this.bindInputFocusEvents && this.bindFocusEvents(),
(this.timeout = setTimeout(function () {
t.currentElContent && 0 !== t.currentElContent.length
? t.backspace(
t.currentElContent,
t.currentElContent.length
)
: t.typewrite(
t.strings[t.sequence[t.arrayPos]],
t.strPos
);
}, this.startDelay));
},
},
{
key: "typewrite",
value: function (t, e) {
var s = this;
this.fadeOut && this.el.classList.contains(this.fadeOutClass) && (this.el.classList.remove(this.fadeOutClass), this.cursor && this.cursor.classList.remove(this.fadeOutClass));
this.fadeOut &&
this.el.classList.contains(this.fadeOutClass) &&
(this.el.classList.remove(this.fadeOutClass),
this.cursor &&
this.cursor.classList.remove(this.fadeOutClass));
var n = this.humanizer(this.typeSpeed),
i = 1;
return this.pause.status === !0 ? void this.setPauseStatus(t, e, !0) : void(this.timeout = setTimeout(function() {
return this.pause.status === !0
? void this.setPauseStatus(t, e, !0)
: void (this.timeout = setTimeout(function () {
e = o.htmlParser.typeHtmlChars(t, e, s);
var n = 0,
r = t.substr(e);
if ("^" === r.charAt(0) && /^\^\d+/.test(r)) {
var a = 1;
r = /\d+/.exec(r)[0], a += r.length, n = parseInt(r), s.temporaryPause = !0, s.options.onTypingPaused(s.arrayPos, s), t = t.substring(0, e) + t.substring(e + a), s.toggleBlinking(!0)
(r = /\d+/.exec(r)[0]),
(a += r.length),
(n = parseInt(r)),
(s.temporaryPause = !0),
s.options.onTypingPaused(s.arrayPos, s),
(t = t.substring(0, e) + t.substring(e + a)),
s.toggleBlinking(!0);
}
if ("`" === r.charAt(0)) {
for (;
"`" !== t.substr(e + i).charAt(0) && (i++, !(e + i > t.length)););
for (
;
"`" !== t.substr(e + i).charAt(0) &&
(i++, !(e + i > t.length));
);
var u = t.substring(0, e),
l = t.substring(u.length + 1, e + i),
c = t.substring(e + i + 1);
t = u + l + c, i--
(t = u + l + c), i--;
}
s.timeout = setTimeout(function () {
s.toggleBlinking(!1), e >= t.length ? s.doneTyping(t, e) : s.keepTyping(t, e, i), s.temporaryPause && (s.temporaryPause = !1, s.options.onTypingResumed(s.arrayPos, s))
}, n)
}, n))
}
}, {
s.toggleBlinking(!1),
e >= t.length
? s.doneTyping(t, e)
: s.keepTyping(t, e, i),
s.temporaryPause &&
((s.temporaryPause = !1),
s.options.onTypingResumed(s.arrayPos, s));
}, n);
}, n));
},
},
{
key: "keepTyping",
value: function (t, e, s) {
0 === e && (this.toggleBlinking(!1), this.options.preStringTyped(this.arrayPos, this)), e += s;
0 === e &&
(this.toggleBlinking(!1),
this.options.preStringTyped(this.arrayPos, this)),
(e += s);
var n = t.substr(0, e);
this.replaceText(n), this.typewrite(t, e)
}
}, {
this.replaceText(n), this.typewrite(t, e);
},
},
{
key: "doneTyping",
value: function (t, e) {
var s = this;
this.options.onStringTyped(this.arrayPos, this), this.toggleBlinking(!0), this.arrayPos === this.strings.length - 1 && (this.complete(), this.loop === !1 || this.curLoop === this.loopCount) || (this.timeout = setTimeout(function() {
s.backspace(t, e)
}, this.backDelay))
}
}, {
this.options.onStringTyped(this.arrayPos, this),
this.toggleBlinking(!0),
(this.arrayPos === this.strings.length - 1 &&
(this.complete(),
this.loop === !1 || this.curLoop === this.loopCount)) ||
(this.timeout = setTimeout(function () {
s.backspace(t, e);
}, this.backDelay));
},
},
{
key: "backspace",
value: function (t, e) {
var s = this;
if (this.pause.status === !0) return void this.setPauseStatus(t, e, !0);
if (this.pause.status === !0)
return void this.setPauseStatus(t, e, !0);
if (this.fadeOut) return this.initFadeOut();
this.toggleBlinking(!1);
var n = this.humanizer(this.backSpeed);
this.timeout = setTimeout(function () {
e = o.htmlParser.backSpaceHtmlChars(t, e, s);
var n = t.substr(0, e);
if (s.replaceText(n), s.smartBackspace) {
if ((s.replaceText(n), s.smartBackspace)) {
var i = s.strings[s.arrayPos + 1];
i && n === i.substr(0, e) ? s.stopNum = e : s.stopNum = 0
i && n === i.substr(0, e)
? (s.stopNum = e)
: (s.stopNum = 0);
}
e > s.stopNum ? (e--, s.backspace(t, e)) : e <= s.stopNum && (s.arrayPos++, s.arrayPos === s.strings.length ? (s.arrayPos = 0, s.options.onLastStringBackspaced(), s.shuffleStringsIfNeeded(), s.begin()) : s.typewrite(s.strings[s.sequence[s.arrayPos]], e))
}, n)
}
}, {
e > s.stopNum
? (e--, s.backspace(t, e))
: e <= s.stopNum &&
(s.arrayPos++,
s.arrayPos === s.strings.length
? ((s.arrayPos = 0),
s.options.onLastStringBackspaced(),
s.shuffleStringsIfNeeded(),
s.begin())
: s.typewrite(s.strings[s.sequence[s.arrayPos]], e));
}, n);
},
},
{
key: "complete",
value: function () {
this.options.onComplete(this), this.loop ? this.curLoop++ : this.typingComplete = !0
}
}, {
this.options.onComplete(this),
this.loop ? this.curLoop++ : (this.typingComplete = !0);
},
},
{
key: "setPauseStatus",
value: function (t, e, s) {
this.pause.typewrite = s, this.pause.curString = t, this.pause.curStrPos = e
}
}, {
(this.pause.typewrite = s),
(this.pause.curString = t),
(this.pause.curStrPos = e);
},
},
{
key: "toggleBlinking",
value: function (t) {
this.cursor && (this.pause.status || this.cursorBlinking !== t && (this.cursorBlinking = t, t ? this.cursor.classList.add("typed-cursor--blink") : this.cursor.classList.remove("typed-cursor--blink")))
}
}, {
this.cursor &&
(this.pause.status ||
(this.cursorBlinking !== t &&
((this.cursorBlinking = t),
t
? this.cursor.classList.add("typed-cursor--blink")
: this.cursor.classList.remove(
"typed-cursor--blink"
))));
},
},
{
key: "humanizer",
value: function (t) {
return Math.round(Math.random() * t / 2) + t
}
}, {
return Math.round((Math.random() * t) / 2) + t;
},
},
{
key: "shuffleStringsIfNeeded",
value: function () {
this.shuffle && (this.sequence = this.sequence.sort(function() {
return Math.random() - .5
}))
}
}, {
this.shuffle &&
(this.sequence = this.sequence.sort(function () {
return Math.random() - 0.5;
}));
},
},
{
key: "initFadeOut",
value: function () {
var t = this;
return this.el.className += " " + this.fadeOutClass, this.cursor && (this.cursor.className += " " + this.fadeOutClass), setTimeout(function() {
t.arrayPos++, t.replaceText(""), t.strings.length > t.arrayPos ? t.typewrite(t.strings[t.sequence[t.arrayPos]], 0) : (t.typewrite(t.strings[0], 0), t.arrayPos = 0)
return (
(this.el.className += " " + this.fadeOutClass),
this.cursor &&
(this.cursor.className += " " + this.fadeOutClass),
setTimeout(function () {
t.arrayPos++,
t.replaceText(""),
t.strings.length > t.arrayPos
? t.typewrite(t.strings[t.sequence[t.arrayPos]], 0)
: (t.typewrite(t.strings[0], 0), (t.arrayPos = 0));
}, this.fadeOutDelay)
}
}, {
);
},
},
{
key: "replaceText",
value: function (t) {
this.attr ? this.el.setAttribute(this.attr, t) : this.isInput ? this.el.value = t : "html" === this.contentType ? this.el.innerHTML = t : this.el.textContent = t
}
}, {
this.attr
? this.el.setAttribute(this.attr, t)
: this.isInput
? (this.el.value = t)
: "html" === this.contentType
? (this.el.innerHTML = t)
: (this.el.textContent = t);
},
},
{
key: "bindFocusEvents",
value: function () {
var t = this;
this.isInput && (this.el.addEventListener("focus", function(e) {
t.stop()
}), this.el.addEventListener("blur", function(e) {
t.el.value && 0 !== t.el.value.length || t.start()
}))
}
}, {
this.isInput &&
(this.el.addEventListener("focus", function (e) {
t.stop();
}),
this.el.addEventListener("blur", function (e) {
(t.el.value && 0 !== t.el.value.length) || t.start();
}));
},
},
{
key: "insertCursor",
value: function () {
this.showCursor && (this.cursor || (this.cursor = document.createElement("span"), this.cursor.className = "typed-cursor", this.cursor.innerHTML = this.cursorChar, this.el.parentNode && this.el.parentNode.insertBefore(this.cursor, this.el.nextSibling)))
}
}]), t
}();
e["default"] = a, t.exports = e["default"]
}, function(t, e, s) {
this.showCursor &&
(this.cursor ||
((this.cursor = document.createElement("span")),
(this.cursor.className = "typed-cursor"),
(this.cursor.innerHTML = this.cursorChar),
this.el.parentNode &&
this.el.parentNode.insertBefore(
this.cursor,
this.el.nextSibling
)));
},
},
]),
t
);
})();
(e["default"] = a), (t.exports = e["default"]);
},
function (t, e, s) {
"use strict";
function n(t) {
return t && t.__esModule ? t : {
"default": t
}
return t && t.__esModule
? t
: {
default: t,
};
}
function i(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
}
Object.defineProperty(e, "__esModule", {
value: !0
value: !0,
});
var r = Object.assign || function(t) {
var r =
Object.assign ||
function (t) {
for (var e = 1; e < arguments.length; e++) {
var s = arguments[e];
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n])
for (var n in s)
Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]);
}
return t
return t;
},
o = function() {
o = (function () {
function t(t, e) {
for (var s = 0; s < e.length; s++) {
var n = e[s];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
return function (e, s, n) {
return s && t(e.prototype, s), n && t(e, n), e
}
}(),
return s && t(e.prototype, s), n && t(e, n), e;
};
})(),
a = s(2),
u = n(a),
l = function() {
l = (function () {
function t() {
i(this, t)
i(this, t);
}
return o(t, [{
return (
o(t, [
{
key: "load",
value: function (t, e, s) {
if ("string" == typeof s ? t.el = document.querySelector(s) : t.el = s, t.options = r({}, u["default"], e), t.isInput = "input" === t.el.tagName.toLowerCase(), t.attr = t.options.attr, t.bindInputFocusEvents = t.options.bindInputFocusEvents, t.showCursor = !t.isInput && t.options.showCursor, t.cursorChar = t.options.cursorChar, t.cursorBlinking = !0, t.elContent = t.attr ? t.el.getAttribute(t.attr) : t.el.textContent, t.contentType = t.options.contentType, t.typeSpeed = t.options.typeSpeed, t.startDelay = t.options.startDelay, t.backSpeed = t.options.backSpeed, t.smartBackspace = t.options.smartBackspace, t.backDelay = t.options.backDelay, t.fadeOut = t.options.fadeOut, t.fadeOutClass = t.options.fadeOutClass, t.fadeOutDelay = t.options.fadeOutDelay, t.isPaused = !1, t.strings = t.options.strings.map(function(t) {
return t.trim()
}), "string" == typeof t.options.stringsElement ? t.stringsElement = document.querySelector(t.options.stringsElement) : t.stringsElement = t.options.stringsElement, t.stringsElement) {
t.strings = [], t.stringsElement.style.display = "none";
var n = Array.prototype.slice.apply(t.stringsElement.children),
if (
("string" == typeof s
? (t.el = document.querySelector(s))
: (t.el = s),
(t.options = r({}, u["default"], e)),
(t.isInput = "input" === t.el.tagName.toLowerCase()),
(t.attr = t.options.attr),
(t.bindInputFocusEvents = t.options.bindInputFocusEvents),
(t.showCursor = !t.isInput && t.options.showCursor),
(t.cursorChar = t.options.cursorChar),
(t.cursorBlinking = !0),
(t.elContent = t.attr
? t.el.getAttribute(t.attr)
: t.el.textContent),
(t.contentType = t.options.contentType),
(t.typeSpeed = t.options.typeSpeed),
(t.startDelay = t.options.startDelay),
(t.backSpeed = t.options.backSpeed),
(t.smartBackspace = t.options.smartBackspace),
(t.backDelay = t.options.backDelay),
(t.fadeOut = t.options.fadeOut),
(t.fadeOutClass = t.options.fadeOutClass),
(t.fadeOutDelay = t.options.fadeOutDelay),
(t.isPaused = !1),
(t.strings = t.options.strings.map(function (t) {
return t.trim();
})),
"string" == typeof t.options.stringsElement
? (t.stringsElement = document.querySelector(
t.options.stringsElement
))
: (t.stringsElement = t.options.stringsElement),
t.stringsElement)
) {
(t.strings = []), (t.stringsElement.style.display = "none");
var n = Array.prototype.slice.apply(
t.stringsElement.children
),
i = n.length;
if (i)
for (var o = 0; o < i; o += 1) {
var a = n[o];
t.strings.push(a.innerHTML.trim())
t.strings.push(a.innerHTML.trim());
}
}
t.strPos = 0, t.arrayPos = 0, t.stopNum = 0, t.loop = t.options.loop, t.loopCount = t.options.loopCount, t.curLoop = 0, t.shuffle = t.options.shuffle, t.sequence = [], t.pause = {
(t.strPos = 0),
(t.arrayPos = 0),
(t.stopNum = 0),
(t.loop = t.options.loop),
(t.loopCount = t.options.loopCount),
(t.curLoop = 0),
(t.shuffle = t.options.shuffle),
(t.sequence = []),
(t.pause = {
status: !1,
typewrite: !0,
curString: "",
curStrPos: 0
}, t.typingComplete = !1;
curStrPos: 0,
}),
(t.typingComplete = !1);
for (var o in t.strings) t.sequence[o] = o;
t.currentElContent = this.getCurrentElContent(t), t.autoInsertCss = t.options.autoInsertCss, this.appendAnimationCss(t)
}
}, {
(t.currentElContent = this.getCurrentElContent(t)),
(t.autoInsertCss = t.options.autoInsertCss),
this.appendAnimationCss(t);
},
},
{
key: "getCurrentElContent",
value: function (t) {
var e = "";
return e = t.attr ? t.el.getAttribute(t.attr) : t.isInput ? t.el.value : "html" === t.contentType ? t.el.innerHTML : t.el.textContent
}
}, {
return (e = t.attr
? t.el.getAttribute(t.attr)
: t.isInput
? t.el.value
: "html" === t.contentType
? t.el.innerHTML
: t.el.textContent);
},
},
{
key: "appendAnimationCss",
value: function (t) {
var e = "data-typed-js-css";
if (t.autoInsertCss && (t.showCursor || t.fadeOut) && !document.querySelector("[" + e + "]")) {
if (
t.autoInsertCss &&
(t.showCursor || t.fadeOut) &&
!document.querySelector("[" + e + "]")
) {
var s = document.createElement("style");
s.type = "text/css", s.setAttribute(e, !0);
(s.type = "text/css"), s.setAttribute(e, !0);
var n = "";
t.showCursor && (n += "\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n "), t.fadeOut && (n += "\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n "), 0 !== s.length && (s.innerHTML = n, document.body.appendChild(s))
t.showCursor &&
(n +=
"\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n "),
t.fadeOut &&
(n +=
"\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n "),
0 !== s.length &&
((s.innerHTML = n), document.body.appendChild(s));
}
}
}]), t
}();
},
},
]),
t
);
})();
e["default"] = l;
var c = new l;
e.initializer = c
}, function(t, e) {
var c = new l();
e.initializer = c;
},
function (t, e) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
value: !0,
});
var s = {
strings: ["These are the default values...", "You know what you should do?", "Use your own!", "Have a great day!"],
strings: [
"These are the default values...",
"You know what you should do?",
"Use your own!",
"Have a great day!",
],
stringsElement: null,
typeSpeed: 0,
startDelay: 0,
@ -321,61 +563,82 @@
onReset: function (t) {},
onStop: function (t, e) {},
onStart: function (t, e) {},
onDestroy: function(t) {}
onDestroy: function (t) {},
};
e["default"] = s, t.exports = e["default"]
}, function(t, e) {
(e["default"] = s), (t.exports = e["default"]);
},
function (t, e) {
"use strict";
function s(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function");
}
Object.defineProperty(e, "__esModule", {
value: !0
value: !0,
});
var n = function() {
var n = (function () {
function t(t, e) {
for (var s = 0; s < e.length; s++) {
var n = e[s];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
(n.enumerable = n.enumerable || !1),
(n.configurable = !0),
"value" in n && (n.writable = !0),
Object.defineProperty(t, n.key, n);
}
}
return function (e, s, n) {
return s && t(e.prototype, s), n && t(e, n), e
}
}(),
i = function() {
return s && t(e.prototype, s), n && t(e, n), e;
};
})(),
i = (function () {
function t() {
s(this, t)
s(this, t);
}
return n(t, [{
return (
n(t, [
{
key: "typeHtmlChars",
value: function (t, e, s) {
if ("html" !== s.contentType) return e;
var n = t.substr(e).charAt(0);
if ("<" === n || "&" === n) {
var i = "";
for (i = "<" === n ? ">" : ";"; t.substr(e + 1).charAt(0) !== i && (e++, !(e + 1 > t.length)););
e++
for (
i = "<" === n ? ">" : ";";
t.substr(e + 1).charAt(0) !== i &&
(e++, !(e + 1 > t.length));
);
e++;
}
return e
}
}, {
return e;
},
},
{
key: "backSpaceHtmlChars",
value: function (t, e, s) {
if ("html" !== s.contentType) return e;
var n = t.substr(e).charAt(0);
if (">" === n || ";" === n) {
var i = "";
for (i = ">" === n ? "<" : "&"; t.substr(e - 1).charAt(0) !== i && (e--, !(e < 0)););
e--
for (
i = ">" === n ? "<" : "&";
t.substr(e - 1).charAt(0) !== i && (e--, !(e < 0));
);
e--;
}
return e
}
}]), t
}();
return e;
},
},
]),
t
);
})();
e["default"] = i;
var r = new i;
e.htmlParser = r
}])
var r = new i();
e.htmlParser = r;
},
]);
});

View File

@ -3,7 +3,7 @@
// =========================================================
//
// * Product Page: https://www.creative-tim.com/product/material-kit
// * Copyright 2022 Creative Tim (https://www.creative-tim.com)
// * Copyright 2023 Creative Tim (https://www.creative-tim.com)
//
// Coded by www.creative-tim.com
//

View File

@ -1,6 +1,10 @@
@each $state, $value in $theme-gradient-colors {
.alert-#{$state} {
@include gradient-directional(nth($value, 1) 0%, nth($value, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth($value, 1) 0%,
nth($value, -1) 100%,
$deg: 195deg
);
}
}

View File

@ -13,7 +13,7 @@
border-radius: $border-radius-pill;
height: $avatar-height;
width: $avatar-width;
transition: all .2s ease-in-out;
transition: all 0.2s ease-in-out;
img {
width: 100%;
@ -30,14 +30,12 @@
margin-left: $avatar-content-margin;
}
&.avatar-raised {
margin-top: -$avatar-height * 0.5;
}
&.avatar-scale-up:hover {
transform: scale(1.2);
}
}
@ -48,7 +46,6 @@
}
}
// Avatar size variations
.avatar-xxl {
@ -118,6 +115,5 @@
.avatar + .avatar {
margin-left: $avatar-group-double;
}
}

View File

@ -9,7 +9,6 @@
color: $white;
}
}
}
.breadcrumb-dark {
@ -38,7 +37,6 @@
}
}
// Links
.breadcrumb-links {

View File

@ -167,7 +167,7 @@
@include hover {
&:not(.active) {
background-color: transparent;
opacity: .75;
opacity: 0.75;
box-shadow: none;
color: $value;
}
@ -176,8 +176,8 @@
}
.btn-outline-white {
border-color: rgba($white, .75);
background: rgba($white, .1);
border-color: rgba($white, 0.75);
background: rgba($white, 0.1);
}
@each $color, $value in $btn-font-colors {

View File

@ -56,5 +56,5 @@
}
}
@import 'cards/card-background';
@import 'cards/card-rotate';
@import "cards/card-background";
@import "cards/card-rotate";

View File

@ -94,7 +94,11 @@
}
.bg-gradient-dark {
background-image: linear-gradient(195deg, $dark-gradient-dark, $dark-gradient-state-dark) !important;
background-image: linear-gradient(
195deg,
$dark-gradient-dark,
$dark-gradient-state-dark
) !important;
}
.dropdown {
@ -129,7 +133,7 @@
p {
color: $white !important;
opacity: .6;
opacity: 0.6;
}
}
@ -140,16 +144,24 @@
.swal2-html-container {
color: $white !important;
opacity: .6;
opacity: 0.6;
}
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6,
a:not(.dropdown-item):not(.choices__item):not(.leaflet-control-zoom-in):not(.leaflet-control-zoom-out):not(.btn):not(.nav-link):not(.fixed-plugin-button),
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6,
a:not(.dropdown-item):not(.choices__item):not(.leaflet-control-zoom-in):not(
.leaflet-control-zoom-out
):not(.btn):not(.nav-link):not(.fixed-plugin-button),
.table thead tr th,
.kanban-title-board {
color: $white !important;
@ -183,7 +195,7 @@
.accordion-button {
border-color: $dark-version-border-color !important;
color: $white;
opacity: .8;
opacity: 0.8;
}
}
@ -226,7 +238,7 @@
p {
color: $white !important;
opacity: .6;
opacity: 0.6;
}
}
@ -248,7 +260,6 @@
border-color: $fc-theme-standard-dark-border-color;
}
// Datatable changes
.dataTable-sorter::after {
border-bottom-color: $white;
@ -263,7 +274,8 @@
stroke: $light;
}
.ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill{
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
fill: $light;
}

View File

@ -66,7 +66,7 @@
&.dropdown-hover {
&:after {
content: '';
content: "";
position: absolute;
left: 0;
bottom: $dropdown-hover-after-bottom-pos;
@ -99,7 +99,8 @@
}
.dropdown-item {
transition: background-color $dropdown-transition-time, color $dropdown-transition-time;
transition: background-color $dropdown-transition-time,
color $dropdown-transition-time;
}
}
@ -201,12 +202,10 @@
}
}
.dropdown.nav-item .dropdown-menu-animation {
display: block;
height: 0;
transition: all .35s ease;
transition: all 0.35s ease;
padding-top: 0 !important;
padding-bottom: 0 !important;
opacity: 0;
@ -237,7 +236,7 @@
left: 0;
top: 0;
z-index: -1;
transition: left .35s ease;
transition: left 0.35s ease;
}
&.dropdown-menu-end {
right: 0 !important;

View File

@ -22,7 +22,7 @@
width: $fixed-plugin-card-width;
border-radius: 0;
padding: 0 10px;
transition: .2s ease;
transition: 0.2s ease;
z-index: $fixed-plugin-card-z-index;
}

View File

@ -32,8 +32,6 @@
border-right: 0;
}
&.focused {
box-shadow: $input-focus-box-shadow;
}
@ -43,7 +41,6 @@
}
}
.form-group {
margin-bottom: 1rem;
}

View File

@ -1,18 +1,29 @@
@each $prop, $value in $theme-gradient-colors {
.bg-gradient-#{$prop} {
@include gradient-directional(nth($value, 1) 0%, nth($value, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth($value, 1) 0%,
nth($value, -1) 100%,
$deg: 195deg
);
}
}
@each $prop, $value in $theme-colors {
.bg-gradient-faded-#{$prop} {
background-image: radial-gradient(370px circle at 80% 50%,rgba($value, .6) 0,darken($value, 10%) 100%)
background-image: radial-gradient(
370px circle at 80% 50%,
rgba($value, 0.6) 0,
darken($value, 10%) 100%
);
}
}
@each $prop, $value in $theme-colors {
.bg-gradient-faded-#{$prop}-vertical {
background-image: radial-gradient(200px circle at 50% 70%, rgba($value, .3) 0, $value 100%);
background-image: radial-gradient(
200px circle at 50% 70%,
rgba($value, 0.3) 0,
$value 100%
);
}
}

View File

@ -1,5 +1,5 @@
.material-icons {
font-family: 'Material Icons Round';
font-family: "Material Icons Round";
font-weight: normal;
font-style: normal;
font-size: 20px; /* Preferred icon size */
@ -20,7 +20,7 @@
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
font-feature-settings: "liga";
}
.nav.nav-pills {

View File

@ -38,7 +38,7 @@ html {
.navbar-blur {
-webkit-backdrop-filter: $blur-backdrop-filter;
backdrop-filter: $blur-backdrop-filter;
background-color: rgba($white, .58) !important;
background-color: rgba($white, 0.58) !important;
}
.blur-section {
@ -46,7 +46,11 @@ html {
backdrop-filter: $blur-backdrop-filter;
&.blur-gradient-primary {
@include gradient-directional(rgba($primary-gradient, .95) 0%, rgba($primary-gradient-state, .95) 100%, $deg: 195deg);
@include gradient-directional(
rgba($primary-gradient, 0.95) 0%,
rgba($primary-gradient-state, 0.95) 100%,
$deg: 195deg
);
}
}
@ -179,7 +183,6 @@ hr.horizontal {
z-index: $zindex-sticky;
}
// moving waves animation
.waves {
position: $waves-position;
@ -283,7 +286,6 @@ hr.horizontal {
}
}
// Background Sizes
.bg-cover {
background-size: cover;
@ -301,7 +303,6 @@ hr.horizontal {
opacity: $mask-opacity;
}
// Cursor Pointer Class
.cursor-pointer {
cursor: pointer;
@ -309,7 +310,7 @@ hr.horizontal {
// Translate 50% Class
.transform-translate-50 {
transform: translate(0,-50%)
transform: translate(0, -50%);
}
// VR Pages
@ -344,8 +345,6 @@ hr.horizontal {
&:focus {
background-image: $input-background-image;
}
}
&.choices__list--dropdown {

View File

@ -107,7 +107,7 @@
z-index: 1 !important;
.nav-link {
color: $white;
transition: .2s ease;
transition: 0.2s ease;
border-radius: $nav-pills-link-border-radius;
&.active {
color: $white;

View File

@ -84,7 +84,8 @@
min-height: 100%;
padding-left: 0;
padding-right: 0; // Target IE 10 & 11
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
min-height: none;
height: 100%;
}
@ -165,7 +166,11 @@
& + .collapsing {
.nav-item.active {
.nav-link.active {
@include gradient-directional(nth(#{$value}, 1) 0%, nth(#{$value}, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth(#{$value}, 1) 0%,
nth(#{$value}, -1) 100%,
$deg: 195deg
);
}
}
.nav-item {
@ -174,7 +179,11 @@
& + .collapse {
.nav-item {
.nav-link.active {
@include gradient-directional(nth(#{$value}, 1) 0%, nth(#{$value}, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth(#{$value}, 1) 0%,
nth(#{$value}, -1) 100%,
$deg: 195deg
);
}
}
}
@ -372,7 +381,11 @@ body:not(.dark-version) {
& + .collapsing {
.nav-item.active {
.nav-link.active {
@include gradient-directional(nth($rose, 1) 0%, nth($rose, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth($rose, 1) 0%,
nth($rose, -1) 100%,
$deg: 195deg
);
span {
color: $white;
}
@ -384,7 +397,11 @@ body:not(.dark-version) {
& + .collapse {
.nav-item {
.nav-link.active {
@include gradient-directional(nth($rose, 1) 0%, nth($rose, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth($rose, 1) 0%,
nth($rose, -1) 100%,
$deg: 195deg
);
}
}
}
@ -395,7 +412,8 @@ body:not(.dark-version) {
}
.navbar-main {
transition: box-shadow $transition-base-time ease-in, background-color $transition-base-time ease-in;
transition: box-shadow $transition-base-time ease-in,
background-color $transition-base-time ease-in;
&.fixed-top {
width: calc(100% - (#{$navbar-vertical-open-width} + #{$spacer * 1.5} * 3));
@ -414,7 +432,7 @@ body:not(.dark-version) {
font-variant: normal;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
font-family: 'Font Awesome 5 Free';
font-family: "Font Awesome 5 Free";
font-weight: 700;
content: "\f107";
margin-left: auto;

View File

@ -20,14 +20,14 @@
&.navbar-transparent {
.nav-link {
&, i {
&,
i {
color: $white;
}
&:hover,
&:focus {
color: rgba($white, .75);
color: rgba($white, 0.75);
}
}
@ -46,8 +46,7 @@
&.navbar-dark {
.navbar-collapse.show,
.navbar-collapse.collapsing
{
.navbar-collapse.collapsing {
.dropdown-header.text-dark {
color: $white !important;
}
@ -163,7 +162,6 @@
flex-direction: row;
}
}
}
.navbar-collapse {

View File

@ -40,7 +40,6 @@
}
}
// Colors
.pagination {
@each $name, $value in $theme-gradient-colors {
@ -49,7 +48,11 @@
&,
&:focus,
&:hover {
@include gradient-directional(nth($value, 1) 0%, nth($value, -1) 100%, $deg: 195deg);
@include gradient-directional(
nth($value, 1) 0%,
nth($value, -1) 100%,
$deg: 195deg
);
border: none;
}
}

View File

@ -3,13 +3,15 @@
.ripple {
display: block;
position: absolute;
background: rgba($white, .3);
background: rgba($white, 0.3);
border-radius: 100%;
transform: scale(0);
animation: ripple 0.65s linear;
}
@keyframes ripple {
100% {opacity: 0; transform: scale(2.5);}
100% {
opacity: 0;
transform: scale(2.5);
}
}

View File

@ -110,14 +110,18 @@
border-bottom-left-radius: 0;
}
& > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
&
> :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(
.valid-feedback
):not(.invalid-tooltip):not(.invalid-feedback) {
margin-right: -1px;
border-top-left-radius: $input-border-radius;
border-bottom-left-radius: $input-border-radius;
}
&:not(.has-validation) > .dropdown-toggle:nth-last-child(n + 3),
&:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
&:not(.has-validation)
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
border-top-right-radius: $input-border-radius;
border-bottom-right-radius: $input-border-radius;
}

View File

@ -2,14 +2,13 @@
// Timeline
//
.timeline {
position: relative;
// Axis
&:before {
content: '';
content: "";
position: absolute;
top: 0;
left: $timeline-left;
@ -24,8 +23,6 @@
}
}
// Timeline blocks
.timeline-block {
@ -65,13 +62,12 @@
font-weight: $font-weight-bold;
z-index: 1;
svg, i {
svg,
i {
line-height: $timeline-step-line-height;
}
}
// Timeline content and body
.timeline-content {
position: relative;
@ -87,7 +83,6 @@
}
}
@include media-breakpoint-up(lg) {
.timeline {
&:before {
@ -101,7 +96,6 @@
}
.timeline-content {
width: 38%;
}

View File

@ -1,9 +1,9 @@
.bs-tooltip-auto[x-placement^=right] .tooltip-arrow,
.bs-tooltip-auto[x-placement^="right"] .tooltip-arrow,
.bs-tooltip-right .tooltip-arrow {
left: $tooltip-arrow-left;
}
.bs-tooltip-auto[x-placement^=left] .tooltip-arrow,
.bs-tooltip-auto[x-placement^="left"] .tooltip-arrow,
.bs-tooltip-left .tooltip-arrow {
right: $tooltip-arrow-right;
}

View File

@ -7,7 +7,8 @@ body {
line-height: $p-line-height;
}
h1, .h1 {
h1,
.h1 {
font-size: $h1-font-size;
line-height: $h1-line-height;
letter-spacing: $btn-letter-spacing;
@ -17,7 +18,8 @@ h1, .h1 {
}
}
h2, .h2 {
h2,
.h2 {
font-size: $h2-font-size;
line-height: $h2-line-height;
letter-spacing: $letter-wider;
@ -27,7 +29,8 @@ h2, .h2 {
}
}
h3, .h3 {
h3,
.h3 {
font-size: $h3-font-size;
line-height: $h3-line-height;
@ -36,7 +39,8 @@ h3, .h3 {
}
}
h4, .h4 {
h4,
.h4 {
font-size: $h4-font-size;
line-height: $h4-line-height;
@ -45,7 +49,8 @@ h4, .h4 {
}
}
h5, .h5 {
h5,
.h5 {
font-size: $h5-font-size;
line-height: $h5-line-height;
@ -54,12 +59,14 @@ h5, .h5 {
}
}
h6, .h6 {
h6,
.h6 {
font-size: $h6-font-size;
line-height: $h6-line-height;
}
p, .p {
p,
.p {
font-size: $font-size-base;
font-weight: $p-font-weight;
line-height: $p-line-height;
@ -71,23 +78,33 @@ p, .p {
line-height: $lead-line-height;
}
h1, .h1,
h2, .h2,
h3, .h3 {
h1,
.h1,
h2,
.h2,
h3,
.h3 {
font-weight: $font-weight-bold;
font-family: $font-family-roboto-slab;
}
h4, .h4,
h5, .h5,
h6, .h6 {
h4,
.h4,
h5,
.h5,
h6,
.h6 {
font-weight: $font-weight-bold;
}
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4 {
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
letter-spacing: $letter-tighter;
}
@ -103,7 +120,8 @@ a {
line-height: $text-xs-line-height;
}
p, .p {
p,
.p {
@include font-size($p-font-size);
}
.lead {
@ -223,11 +241,11 @@ p {
}
.text-black-50 {
color: rgba($black, .5) !important;
color: rgba($black, 0.5) !important;
}
.text-white-50 {
color: rgba($white, .5) !important;
color: rgba($white, 0.5) !important;
}
.text-decoration-none {
@ -272,7 +290,6 @@ p {
font-weight: $font-weight-bolder;
}
// Font Size
.text-2xl {

View File

@ -5,54 +5,62 @@
$utilities: (
// scss-docs-start utils-vertical-align
"align": (
"align":
(
property: vertical-align,
class: align,
values: baseline top middle bottom text-bottom text-top
values: baseline top middle bottom text-bottom text-top,
),
// scss-docs-end utils-vertical-align
// scss-docs-start utils-float
"float": (
"float":
(
responsive: true,
property: float,
values: (
start: left,
end: right,
none: none,
)
),
),
// scss-docs-end utils-float
// scss-docs-start utils-overflow
"overflow": (
"overflow":
(
property: overflow,
values: auto hidden visible scroll,
),
// scss-docs-end utils-overflow
// scss-docs-start utils-overflow-x
"overflow-x": (
"overflow-x":
(
property: overflow-x,
class: overflow-x,
values: auto hidden visible scroll,
),
// scss-docs-end utils-overflow-x
// scss-docs-start utils-overflow-y
"overflow-y": (
"overflow-y":
(
property: overflow-y,
class: overflow-y,
values: auto hidden visible scroll,
),
// scss-docs-end utils-overflow-y
// scss-docs-start utils-display
"display": (
"display":
(
responsive: true,
print: true,
property: display,
class: d,
values: inline inline-block block grid table table-row table-cell flex inline-flex none
values: inline inline-block block grid table table-row table-cell flex
inline-flex none,
),
// scss-docs-end utils-display
// scss-docs-start utils-shadow
"shadow": (
"shadow":
(
property: box-shadow,
class: shadow,
values: (
@ -61,10 +69,11 @@ $utilities: (
lg: $box-shadow-lg,
xl: $box-shadow-xl,
none: none,
)
),
),
// scss-docs-start utils-colored-shadow
"colored-shadow": (
"colored-shadow":
(
property: box-shadow,
class: shadow,
values: (
@ -76,31 +85,32 @@ $utilities: (
danger: $box-shadow-danger,
dark: $box-shadow-dark,
light: $box-shadow-light,
)
),
),
// scss-docs-end utils-colored-shadow
// scss-docs-start utils-position
"position": (
"position":
(
property: position,
values: static relative absolute fixed sticky
values: static relative absolute fixed sticky,
),
"top": (
property: top,
values: $position-values
values: $position-values,
),
"bottom": (
property: bottom,
values: $position-values
values: $position-values,
),
"start": (
property: left,
class: start,
values: $position-values
values: $position-values,
),
"end": (
property: right,
class: end,
values: $position-values
values: $position-values,
),
"translate-middle": (
property: transform,
@ -109,30 +119,32 @@ $utilities: (
null: translate(-50%, -50%),
x: translateX(-50%),
y: translateY(-50%),
)
),
),
//Scale
"transform": (
"transform":
(
property: transform,
class: transform-scale,
responsive: true,
values: (
5: scale(.5),
6: scale(.6),
7: scale(.7),
8: scale(.8),
9: scale(.9),
5: scale(0.5),
6: scale(0.6),
7: scale(0.7),
8: scale(0.8),
9: scale(0.9),
10: scale(1),
)
),
),
// scss-docs-end utils-position
// scss-docs-start utils-borders
"border": (
"border":
(
property: border,
values: (
null: $border-width solid $border-color,
0: 0,
)
),
),
"border-top": (
property: border-top,
@ -140,7 +152,7 @@ $utilities: (
values: (
null: $border-width solid $border-color,
0: 0,
)
),
),
"border-end": (
property: border-right,
@ -149,7 +161,7 @@ $utilities: (
values: (
null: $border-width solid $border-color,
0: 0,
)
),
),
"border-bottom": (
property: border-bottom,
@ -157,7 +169,7 @@ $utilities: (
values: (
null: $border-width solid $border-color,
0: 0,
)
),
),
"border-start": (
property: border-left,
@ -166,41 +178,54 @@ $utilities: (
values: (
null: $border-width solid $border-color,
0: 0,
)
),
),
"border-color": (
property: border-color,
class: border,
values: map-merge($theme-colors, ("white": $white))
values:
map-merge(
$theme-colors,
(
"white": $white,
)
),
),
"border-width": (
property: border-width,
class: border,
values: $border-widths
values: $border-widths,
),
// scss-docs-end utils-borders
// Sizing utilities
// scss-docs-start utils-sizing
"width": (
"width":
(
property: width,
responsive: true,
class: w,
values: $width
values: $width,
),
"max-width": (
property: max-width,
class: mw,
values: (100: 100%)
values: (
100: 100%,
),
),
"viewport-width": (
property: width,
class: vw,
values: (100: 100vw)
values: (
100: 100vw,
),
),
"min-viewport-width": (
property: min-width,
class: min-vw,
values: (100: 100vw)
values: (
100: 100vw,
),
),
"height": (
property: height,
@ -210,18 +235,22 @@ $utilities: (
50: 50%,
75: 75%,
100: 100%,
auto: auto
)
auto: auto,
),
),
"max-height": (
property: max-height,
class: mh,
values: (100: 100%)
values: (
100: 100%,
),
),
"viewport-height": (
property: height,
class: vh,
values: (100: 100vh)
values: (
100: 100vh,
),
),
"min-viewport-height": (
property: min-height,
@ -239,22 +268,25 @@ $utilities: (
85: $section-height-85-min-height,
90: $section-height-90-min-height,
95: $section-height-95-min-height,
100: 100vh
)
100: 100vh,
),
),
// scss-docs-end utils-sizing
// Flex utilities
// scss-docs-start utils-flex
"flex": (
"flex":
(
responsive: true,
property: flex,
values: (fill: 1 1 auto)
values: (
fill: 1 1 auto,
),
),
"flex-direction": (
responsive: true,
property: flex-direction,
class: flex,
values: row column row-reverse column-reverse
values: row column row-reverse column-reverse,
),
"flex-grow": (
responsive: true,
@ -263,7 +295,7 @@ $utilities: (
values: (
grow-0: 0,
grow-1: 1,
)
),
),
"flex-shrink": (
responsive: true,
@ -272,19 +304,19 @@ $utilities: (
values: (
shrink-0: 0,
shrink-1: 1,
)
),
),
"flex-wrap": (
responsive: true,
property: flex-wrap,
class: flex,
values: wrap nowrap wrap-reverse
values: wrap nowrap wrap-reverse,
),
"gap": (
responsive: true,
property: gap,
class: gap,
values: $spacers
values: $spacers,
),
"justify-content": (
responsive: true,
@ -296,7 +328,7 @@ $utilities: (
between: space-between,
around: space-around,
evenly: space-evenly,
)
),
),
"align-items": (
responsive: true,
@ -307,7 +339,7 @@ $utilities: (
center: center,
baseline: baseline,
stretch: stretch,
)
),
),
"align-content": (
responsive: true,
@ -319,7 +351,7 @@ $utilities: (
between: space-between,
around: space-around,
stretch: stretch,
)
),
),
"align-self": (
responsive: true,
@ -331,7 +363,7 @@ $utilities: (
center: center,
baseline: baseline,
stretch: stretch,
)
),
),
"order": (
responsive: true,
@ -350,152 +382,200 @@ $utilities: (
// scss-docs-end utils-flex
// Margin utilities
// scss-docs-start utils-spacing
"margin": (
"margin":
(
responsive: true,
property: margin,
class: m,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-x": (
responsive: true,
property: margin-right margin-left,
class: mx,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-y": (
responsive: true,
property: margin-top margin-bottom,
class: my,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-top": (
responsive: true,
property: margin-top,
class: mt,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-end": (
responsive: true,
property: margin-right,
class: me,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-bottom": (
responsive: true,
property: margin-bottom,
class: mb,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-start": (
responsive: true,
property: margin-left,
class: ms,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
// Negative margin utilities
"negative-margin": (
"negative-margin":
(
responsive: true,
property: margin,
class: m,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-x": (
responsive: true,
property: margin-right margin-left,
class: mx,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-y": (
responsive: true,
property: margin-top margin-bottom,
class: my,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-top": (
responsive: true,
property: margin-top,
class: mt,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-end": (
responsive: true,
property: margin-right,
class: me,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-bottom": (
responsive: true,
property: margin-bottom,
class: mb,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-start": (
responsive: true,
property: margin-left,
class: ms,
values: $negative-spacers
values: $negative-spacers,
),
// Padding utilities
"padding": (
"padding":
(
responsive: true,
property: padding,
class: p,
values: $spacers
values: $spacers,
),
"padding-x": (
responsive: true,
property: padding-right padding-left,
class: px,
values: $spacers
values: $spacers,
),
"padding-y": (
responsive: true,
property: padding-top padding-bottom,
class: py,
values: $spacers
values: $spacers,
),
"padding-top": (
responsive: true,
property: padding-top,
class: pt,
values: $spacers
values: $spacers,
),
"padding-end": (
responsive: true,
property: padding-right,
class: pe,
values: $spacers
values: $spacers,
),
"padding-bottom": (
responsive: true,
property: padding-bottom,
class: pb,
values: $spacers
values: $spacers,
),
"padding-start": (
responsive: true,
property: padding-left,
class: ps,
values: $spacers
values: $spacers,
),
// scss-docs-end utils-spacing
// Text
// scss-docs-start utils-text
"font-family": (
"font-family":
(
property: font-family,
class: font,
values: (monospace: var(--#{$prefix}font-monospace))
values: (
monospace: var(--#{$prefix}font-monospace),
),
),
"font-size": (
rfs: true,
property: font-size,
class: fs,
values: $font-sizes
values: $font-sizes,
),
"font-style": (
property: font-style,
class: fst,
values: italic normal
values: italic normal,
),
"font-weight": (
property: font-weight,
@ -505,8 +585,8 @@ $utilities: (
lighter: $font-weight-lighter,
normal: $font-weight-normal,
bold: $font-weight-bold,
bolder: $font-weight-bolder
)
bolder: $font-weight-bolder,
),
),
"line-height": (
property: line-height,
@ -516,7 +596,7 @@ $utilities: (
sm: $line-height-sm,
base: $line-height-base,
lg: $line-height-lg,
)
),
),
"text-align": (
responsive: true,
@ -526,16 +606,16 @@ $utilities: (
start: left,
end: right,
center: center,
)
),
),
"text-decoration": (
property: text-decoration,
values: none underline line-through
values: none underline line-through,
),
"text-transform": (
property: text-transform,
class: text,
values: lowercase uppercase capitalize
values: lowercase uppercase capitalize,
),
"white-space": (
property: white-space,
@ -543,38 +623,44 @@ $utilities: (
values: (
wrap: normal,
nowrap: nowrap,
)
),
),
"word-wrap": (
property: word-wrap word-break,
class: text,
values: (break: break-word),
rtl: false
values: (
break: break-word,
),
rtl: false,
),
// scss-docs-end utils-text
// scss-docs-start utils-color
"color": (
"color":
(
property: color,
class: text,
values: map-merge(
values:
map-merge(
$theme-colors,
(
"white": $white,
"body": $body-color,
"rose": $rose,
"muted": $text-muted,
"black-50": rgba($black, .5),
"white-50": rgba($white, .5),
"black-50": rgba($black, 0.5),
"white-50": rgba($white, 0.5),
"reset": inherit,
)
)
),
),
// scss-docs-end utils-color
// scss-docs-start utils-bg-color
"background-color": (
"background-color":
(
property: background-color,
class: bg,
values: map-merge(
values:
map-merge(
$theme-colors,
(
"body": $body-bg,
@ -590,18 +676,22 @@ $utilities: (
"gray-800": $gray-800,
"gray-900": $gray-900,
)
)
),
),
// scss-docs-end utils-bg-color
"gradient": (
"gradient":
(
property: background-image,
class: bg,
values: (gradient: var(--#{$prefix}gradient))
values: (
gradient: var(--#{$prefix}gradient),
),
),
// scss-docs-start utils-interaction
"user-select": (
"user-select":
(
property: user-select,
values: all auto none
values: all auto none,
),
"pointer-events": (
property: pointer-events,
@ -610,7 +700,8 @@ $utilities: (
),
// scss-docs-end utils-interaction
// scss-docs-start utils-border-radius
"rounded": (
"rounded":
(
property: border-radius,
class: rounded,
values: (
@ -620,79 +711,92 @@ $utilities: (
2: $border-radius,
3: $border-radius-lg,
circle: 50%,
pill: $border-radius-pill
)
pill: $border-radius-pill,
),
),
"rounded-top": (
property: border-top-left-radius border-top-right-radius,
class: rounded-top,
values: (null: $border-radius)
values: (
null: $border-radius,
),
),
"rounded-end": (
property: border-top-right-radius border-bottom-right-radius,
class: rounded-end,
values: (null: $border-radius)
values: (
null: $border-radius,
),
),
"rounded-bottom": (
property: border-bottom-right-radius border-bottom-left-radius,
class: rounded-bottom,
values: (null: $border-radius)
values: (
null: $border-radius,
),
),
"rounded-start": (
property: border-bottom-left-radius border-top-left-radius,
class: rounded-start,
values: (null: $border-radius)
values: (
null: $border-radius,
),
),
// scss-docs-end utils-border-radius
// scss-docs-start utils-visibility
"visibility": (
"visibility":
(
property: visibility,
class: null,
values: (
visible: visible,
invisible: hidden,
)
),
),
// Opacity utilities
"opacity": (
"opacity":
(
property: opacity,
values: (
0: 0,
1: .1,
2: .2,
3: .3,
4: .4,
5: .5,
6: .6,
7: .7,
8: .8,
9: .9,
10: 1
1: 0.1,
2: 0.2,
3: 0.3,
4: 0.4,
5: 0.5,
6: 0.6,
7: 0.7,
8: 0.8,
9: 0.9,
10: 1,
),
),
// Z-index utilities
"z-index": (
"z-index":
(
property: z-index,
values: (
0: 0,
1: 1,
2: 2,
3: 3
3: 3,
),
),
// Letter spacing utilities
"letter-spacing": (
"letter-spacing":
(
property: letter-spacing,
values: (
1: 1px,
2: 2px,
3: 3px,
4: 4px,
5: 5px
5: 5px,
),
),
// Border radius utilities
"border-top-left-radius": (
"border-top-left-radius":
(
property: border-top-left-radius,
class: border-radius-top-start,
responsive: true,
@ -705,8 +809,8 @@ $utilities: (
xl: $border-radius-xl,
2xl: $border-radius-2xl,
circle: 50%,
pill: $border-radius-pill
)
pill: $border-radius-pill,
),
),
"border-top-right-radius": (
property: border-top-right-radius,
@ -721,8 +825,8 @@ $utilities: (
xl: $border-radius-xl,
2xl: $border-radius-2xl,
circle: 50%,
pill: $border-radius-pill
)
pill: $border-radius-pill,
),
),
"border-bottom-left-radius": (
property: border-bottom-left-radius,
@ -737,8 +841,8 @@ $utilities: (
xl: $border-radius-xl,
2xl: $border-radius-2xl,
circle: 50%,
pill: $border-radius-pill
)
pill: $border-radius-pill,
),
),
"border-bottom-right-radius": (
property: border-bottom-right-radius,
@ -753,11 +857,12 @@ $utilities: (
xl: $border-radius-xl,
2xl: $border-radius-2xl,
circle: 50%,
pill: $border-radius-pill
)
pill: $border-radius-pill,
),
),
// Max Height Values
"max-height-px": (
"max-height-px":
(
property: max-height,
class: max-height,
values: (
@ -769,11 +874,12 @@ $utilities: (
300: $max-height-300,
400: $max-height-400,
500: $max-height-500,
600: $max-height-600
)
600: $max-height-600,
),
),
// Max Height Values vh
"max-height-vh": (
"max-height-vh":
(
property: max-height,
class: max-height-vh,
values: (
@ -787,10 +893,11 @@ $utilities: (
80: $max-height-vh-80,
90: $max-height-vh-90,
100: $max-height-vh-100,
)
),
),
// Min Height Values
"min-height-px": (
"min-height-px":
(
property: min-height,
class: min-height,
values: (
@ -802,11 +909,12 @@ $utilities: (
300: $min-height-300,
400: $min-height-400,
500: $min-height-500,
600: $min-height-600
)
600: $min-height-600,
),
),
// Height Values
"height-px": (
"height-px":
(
property: height,
class: height,
values: (
@ -815,11 +923,12 @@ $utilities: (
300: $height-300,
400: $height-400,
500: $height-500,
600: $height-600
)
600: $height-600,
),
),
// Max Width Values
"max-width-px": (
"max-width-px":
(
property: max-width,
class: max-width,
values: (
@ -827,7 +936,7 @@ $utilities: (
200: $max-width-200,
300: $max-width-300,
400: $max-width-400,
500: $max-width-500
)
500: $max-width-500,
),
)
);

View File

@ -49,7 +49,7 @@ $colors: (
"cyan": $cyan,
"white": $white,
"gray": $gray-600,
"gray-dark": $gray-800
"gray-dark": $gray-800,
) !default;
// scss-docs-end colors-map
@ -72,7 +72,7 @@ $theme-colors: (
"danger": $danger,
"light": $light,
"dark": $dark,
"white": $white
"white": $white,
) !default;
// scss-docs-end theme-colors-map
@ -108,36 +108,36 @@ $dark-gradient-state-dark: #1a2035 !default;
$theme-gradient-colors: (
"primary": (
$primary-gradient,
$primary-gradient-state
$primary-gradient-state,
),
"secondary": (
$secondary-gradient,
$secondary-gradient-state
$secondary-gradient-state,
),
"success": (
$success-gradient,
$success-gradient-state
$success-gradient-state,
),
"info": (
$info-gradient,
$info-gradient-state
$info-gradient-state,
),
"warning": (
$warning-gradient,
$warning-gradient-state
$warning-gradient-state,
),
"danger": (
$danger-gradient,
$danger-gradient-state
$danger-gradient-state,
),
"light": (
$light-gradient,
$light-gradient-state
$light-gradient-state,
),
"dark": (
$dark-gradient,
$dark-gradient-state
)
$dark-gradient-state,
),
) !default;
// Set a specific jump point for requesting color jumps
@ -310,7 +310,7 @@ $spacers: (
9: $spacer * 10,
10: $spacer * 12,
11: $spacer * 14,
12: $spacer * 16
12: $spacer * 16,
) !default;
$negative-spacers: if(
@ -336,7 +336,7 @@ $position-values: (
9: 9%,
10: 10%,
50: 50%,
100: 100%
100: 100%,
) !default;
// Body
@ -379,7 +379,7 @@ $grid-breakpoints: (
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1400px
xxl: 1400px,
) !default;
// scss-docs-end grid-breakpoints
@ -396,7 +396,7 @@ $container-max-widths: (
md: 720px,
lg: 960px,
xl: 1140px,
xxl: 1320px
xxl: 1320px,
) !default;
// scss-docs-end container-max-widths
@ -437,7 +437,7 @@ $border-widths: (
2: 2px,
3: 3px,
4: 4px,
5: 5px
5: 5px,
) !default;
$rounded-pill: 50rem !default;
@ -489,7 +489,7 @@ $aspect-ratios: (
"1x1": 100%,
"4x3": calc(3 / 4 * 100%),
"16x9": calc(9 / 16 * 100%),
"21x9": calc(9 / 21 * 100%)
"21x9": calc(9 / 21 * 100%),
) !default;
// scss-docs-end aspect-ratios
// stylelint-enable function-disallowed-list
@ -588,7 +588,7 @@ $display-font-sizes: (
3: 4rem,
4: 3.5rem,
5: 3rem,
6: 2.5rem
6: 2.5rem,
) !default;
$display-font-weight: 300 !default;
@ -737,7 +737,7 @@ $table-variants: (
"warning": shift-color($warning, $table-bg-scale),
"danger": shift-color($danger, $table-bg-scale),
"light": $light,
"dark": $dark
"dark": $dark,
) !default;
// scss-docs-end table-variables
@ -882,7 +882,7 @@ $btn-font-colors: map-merge(
"success": $btn-success-font-color,
"warning": $btn-warning-font-color,
"dark": $btn-dark-font-color,
"light": $btn-light-font-color
"light": $btn-light-font-color,
),
$btn-font-colors
);
@ -1190,12 +1190,12 @@ $form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.o
$form-validation-states: (
"valid": (
"color": $form-feedback-valid-color,
"icon": $form-feedback-icon-valid
"icon": $form-feedback-icon-valid,
),
"invalid": (
"color": $form-feedback-invalid-color,
"icon": $form-feedback-icon-invalid
)
"icon": $form-feedback-icon-invalid,
),
) !default;
// scss-docs-end form-validation-states

View File

@ -19,7 +19,9 @@
--#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
--#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
--#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
--#{$prefix}accordion-btn-active-icon: #{escape-svg(
$accordion-button-active-icon
)};
--#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color};
--#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
--#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
@ -34,7 +36,8 @@
display: flex;
align-items: center;
width: 100%;
padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
padding: var(--#{$prefix}accordion-btn-padding-y)
var(--#{$prefix}accordion-btn-padding-x);
@include font-size($font-size-base);
color: var(--#{$prefix}accordion-btn-color);
text-align: left; // Reset button style
@ -47,7 +50,8 @@
&:not(.collapsed) {
color: var(--#{$prefix}accordion-active-color);
background-color: var(--#{$prefix}accordion-active-bg);
box-shadow: inset 0 calc(var(--#{$prefix}accordion-border-width) * -1) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
box-shadow: inset 0 calc(var(--#{$prefix}accordion-border-width) * -1) 0
var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
&::after {
background-image: var(--#{$prefix}accordion-btn-active-icon);
@ -87,13 +91,16 @@
.accordion-item {
color: var(--#{$prefix}accordion-color);
background-color: var(--#{$prefix}accordion-bg);
border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
border: var(--#{$prefix}accordion-border-width) solid
var(--#{$prefix}accordion-border-color);
&:first-of-type {
@include border-top-radius(var(--#{$prefix}accordion-border-radius));
.accordion-button {
@include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
@include border-top-radius(
var(--#{$prefix}accordion-inner-border-radius)
);
}
}
@ -107,7 +114,9 @@
.accordion-button {
&.collapsed {
@include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
@include border-bottom-radius(
var(--#{$prefix}accordion-inner-border-radius)
);
}
}
@ -118,10 +127,10 @@
}
.accordion-body {
padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
padding: var(--#{$prefix}accordion-body-padding-y)
var(--#{$prefix}accordion-body-padding-x);
}
// Flush accordion items
//
// Remove borders and border-radius to keep accordion items edge-to-edge.
@ -136,8 +145,12 @@
border-left: 0;
@include border-radius(0);
&:first-child { border-top: 0; }
&:last-child { border-bottom: 0; }
&:first-child {
border-top: 0;
}
&:last-child {
border-bottom: 0;
}
.accordion-button {
@include border-radius(0);

View File

@ -20,7 +20,10 @@
color: var(--#{$prefix}alert-color);
background-color: var(--#{$prefix}alert-bg);
border: var(--#{$prefix}alert-border);
border-radius: var(--#{$prefix}alert-border-radius, 0); // stylelint-disable-line property-disallowed-list
border-radius: var(
--#{$prefix}alert-border-radius,
0
); // stylelint-disable-line property-disallowed-list
}
// Headings for larger alerts
@ -34,7 +37,6 @@
font-weight: $alert-link-font-weight;
}
// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
@ -52,7 +54,6 @@
}
}
// scss-docs-start alert-modifiers
// Generate contextual modifier classes for colorizing the alert.
@ -62,7 +63,11 @@
$alert-color: shift-color($value, $alert-color-scale);
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
$alert-color: mix(
$value,
color-contrast($alert-background),
abs($alert-color-scale)
);
}
.alert-#{$state} {
@include alert-variant($alert-background, $alert-border, $alert-color);

View File

@ -24,7 +24,10 @@
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: var(--#{$prefix}badge-border-radius, 0); // stylelint-disable-line property-disallowed-list
border-radius: var(
--#{$prefix}badge-border-radius,
0
); // stylelint-disable-line property-disallowed-list
@include gradient-bg();
// Empty badges collapse automatically

View File

@ -15,7 +15,8 @@
display: flex;
flex-wrap: wrap;
padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x);
padding: var(--#{$prefix}breadcrumb-padding-y)
var(--#{$prefix}breadcrumb-padding-x);
margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom);
@include font-size(var(--#{$prefix}breadcrumb-font-size));
list-style: none;
@ -32,7 +33,14 @@
float: left; // Suppress inline spacings and underlining of the separator
padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
color: var(--#{$prefix}breadcrumb-divider-color);
content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
content: var(
--#{$prefix}breadcrumb-divider,
escape-svg($breadcrumb-divider)
)
#{"/* rtl:"} var(
--#{$prefix}breadcrumb-divider,
escape-svg($breadcrumb-divider-flipped)
) #{"*/"};
}
}

View File

@ -64,17 +64,20 @@
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-sm > .btn { @extend .btn-sm; }
.btn-group-lg > .btn { @extend .btn-lg; }
.btn-group-sm > .btn {
@extend .btn-sm;
}
.btn-group-lg > .btn {
@extend .btn-lg;
}
//
// Split button dropdowns
//
.dropdown-toggle-split {
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;
padding-right: $btn-padding-x * 0.75;
padding-left: $btn-padding-x * 0.75;
&::after,
.dropup &::after,
@ -88,16 +91,15 @@
}
.btn-sm + .dropdown-toggle-split {
padding-right: $btn-padding-x-sm * .75;
padding-left: $btn-padding-x-sm * .75;
padding-right: $btn-padding-x-sm * 0.75;
padding-left: $btn-padding-x-sm * 0.75;
}
.btn-lg + .dropdown-toggle-split {
padding-right: $btn-padding-x-lg * .75;
padding-left: $btn-padding-x-lg * .75;
padding-right: $btn-padding-x-lg * 0.75;
padding-left: $btn-padding-x-lg * 0.75;
}
// The clickable button for toggling the menu
// Set the same inset shadow as the :active state
.btn-group.show .dropdown-toggle {
@ -109,7 +111,6 @@
}
}
//
// Vertical button groups
//

View File

@ -19,7 +19,7 @@
--#{$prefix}btn-border-radius: #{$btn-border-radius};
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
--#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity};
--#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
--#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), 0.5);
// scss-docs-end btn-css-vars
display: inline-block;
@ -35,7 +35,8 @@
vertical-align: middle;
cursor: if($enable-button-pointers, pointer, null);
user-select: none;
border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color);
border: var(--#{$prefix}btn-border-width) solid
var(--#{$prefix}btn-border-color);
@include border-radius(var(--#{$prefix}btn-border-radius));
@include gradient-bg(var(--#{$prefix}btn-bg));
@include box-shadow(var(--#{$prefix}btn-box-shadow));
@ -56,7 +57,8 @@
outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
box-shadow: var(--#{$prefix}btn-box-shadow),
var(--#{$prefix}btn-focus-box-shadow);
} @else {
box-shadow: var(--#{$prefix}btn-focus-box-shadow);
}
@ -77,7 +79,8 @@
&:focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
box-shadow: var(--#{$prefix}btn-active-shadow),
var(--#{$prefix}btn-focus-box-shadow);
} @else {
box-shadow: var(--#{$prefix}btn-focus-box-shadow);
}
@ -97,7 +100,6 @@
}
}
//
// Alternate buttons
//
@ -116,7 +118,6 @@
}
// scss-docs-end btn-variant-loops
//
// Link buttons
//
@ -144,15 +145,24 @@
// No need for an active state here
}
//
// Button Sizes
//
.btn-lg {
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
@include button-size(
$btn-padding-y-lg,
$btn-padding-x-lg,
$btn-font-size-lg,
$btn-border-radius-lg
);
}
.btn-sm {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
@include button-size(
$btn-padding-y-sm,
$btn-padding-x-sm,
$btn-font-size-sm,
$btn-border-radius-sm
);
}

View File

@ -31,7 +31,8 @@
word-wrap: break-word;
background-color: var(--#{$prefix}card-bg);
background-clip: border-box;
border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
border: var(--#{$prefix}card-border-width) solid
var(--#{$prefix}card-border-color);
@include border-radius(var(--#{$prefix}card-border-radius));
@include box-shadow(var(--#{$prefix}card-box-shadow));
@ -76,7 +77,9 @@
}
.card-subtitle {
margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
margin-top: calc(
-0.5 * var(--#{$prefix}card-title-spacer-y)
); // stylelint-disable-line function-disallowed-list
margin-bottom: 0;
}
@ -99,37 +102,52 @@
//
.card-header {
padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
padding: var(--#{$prefix}card-cap-padding-y)
var(--#{$prefix}card-cap-padding-x);
margin-bottom: 0; // Removes the default margin-bottom of <hN>
color: var(--#{$prefix}card-cap-color);
background-color: var(--#{$prefix}card-cap-bg);
border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
border-bottom: var(--#{$prefix}card-border-width) solid
var(--#{$prefix}card-border-color);
&:first-child {
@include border-radius(var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius) 0 0);
@include border-radius(
var(--#{$prefix}card-inner-border-radius)
var(--#{$prefix}card-inner-border-radius) 0 0
);
}
}
.card-footer {
padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
padding: var(--#{$prefix}card-cap-padding-y)
var(--#{$prefix}card-cap-padding-x);
color: var(--#{$prefix}card-cap-color);
background-color: var(--#{$prefix}card-cap-bg);
border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
border-top: var(--#{$prefix}card-border-width) solid
var(--#{$prefix}card-border-color);
&:last-child {
@include border-radius(0 0 var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius));
@include border-radius(
0 0 var(--#{$prefix}card-inner-border-radius)
var(--#{$prefix}card-inner-border-radius)
);
}
}
//
// Header navs
//
.card-header-tabs {
margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-right: calc(
-0.5 * var(--#{$prefix}card-cap-padding-x)
); // stylelint-disable-line function-disallowed-list
margin-bottom: calc(
-1 * var(--#{$prefix}card-cap-padding-y)
); // stylelint-disable-line function-disallowed-list
margin-left: calc(
-0.5 * var(--#{$prefix}card-cap-padding-x)
); // stylelint-disable-line function-disallowed-list
border-bottom: 0;
.nav-link.active {
@ -139,8 +157,12 @@
}
.card-header-pills {
margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-right: calc(
-0.5 * var(--#{$prefix}card-cap-padding-x)
); // stylelint-disable-line function-disallowed-list
margin-left: calc(
-0.5 * var(--#{$prefix}card-cap-padding-x)
); // stylelint-disable-line function-disallowed-list
}
// Card image
@ -170,7 +192,6 @@
@include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
}
//
// Card groups
//

View File

@ -55,7 +55,6 @@
/* rtl:end:ignore */
//
// Alternate transitions
//
@ -82,7 +81,6 @@
}
}
//
// Left/right controls for nav
//
@ -117,11 +115,19 @@
}
.carousel-control-prev {
left: 0;
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
background-image: if(
$enable-gradients,
linear-gradient(90deg, rgba($black, 0.25), rgba($black, 0.001)),
null
);
}
.carousel-control-next {
right: 0;
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
background-image: if(
$enable-gradients,
linear-gradient(270deg, rgba($black, 0.25), rgba($black, 0.001)),
null
);
}
// Icons for within
@ -195,16 +201,15 @@
}
}
// Optional captions
//
//
.carousel-caption {
position: absolute;
right: (100% - $carousel-caption-width) * .5;
right: (100% - $carousel-caption-width) * 0.5;
bottom: $carousel-caption-spacer;
left: (100% - $carousel-caption-width) * .5;
left: (100% - $carousel-caption-width) * 0.5;
padding-top: $carousel-caption-padding-y;
padding-bottom: $carousel-caption-padding-y;
color: $carousel-caption-color;

View File

@ -9,7 +9,8 @@
height: $btn-close-height;
padding: $btn-close-padding-y $btn-close-padding-x;
color: $btn-close-color;
background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
background: transparent escape-svg($btn-close-bg) center / $btn-close-width
auto no-repeat; // include transparent for button elements
border: 0; // for button elements
@include border-radius();
opacity: $btn-close-opacity;

View File

@ -49,7 +49,8 @@
z-index: $zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
min-width: var(--#{$prefix}dropdown-min-width);
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
padding: var(--#{$prefix}dropdown-padding-y)
var(--#{$prefix}dropdown-padding-x);
margin: 0; // Override default margin of ul
@include font-size(var(--#{$prefix}dropdown-font-size));
color: var(--#{$prefix}dropdown-color);
@ -57,7 +58,8 @@
list-style: none;
background-color: var(--#{$prefix}dropdown-bg);
background-clip: padding-box;
border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
border: var(--#{$prefix}dropdown-border-width) solid
var(--#{$prefix}dropdown-border-color);
@include border-radius(var(--#{$prefix}dropdown-border-radius));
@include box-shadow(var(--#{$prefix}dropdown-box-shadow));
@ -146,7 +148,6 @@
}
}
// Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider {
height: 0;
@ -162,7 +163,8 @@
.dropdown-item {
display: block;
width: 100%; // For `<button>`s
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
padding: var(--#{$prefix}dropdown-item-padding-y)
var(--#{$prefix}dropdown-item-padding-x);
clear: both;
font-weight: $font-weight-normal;
color: var(--#{$prefix}dropdown-link-color);
@ -180,7 +182,9 @@
}
&:last-child {
@include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
@include border-bottom-radius(
var(--#{$prefix}dropdown-inner-border-radius)
);
}
}
@ -215,7 +219,8 @@
// Dropdown section headers
.dropdown-header {
display: block;
padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
padding: var(--#{$prefix}dropdown-header-padding-y)
var(--#{$prefix}dropdown-header-padding-x);
margin-bottom: 0; // for use with heading elements
@include font-size($font-size-sm);
color: var(--#{$prefix}dropdown-header-color);
@ -225,7 +230,8 @@
// Dropdown text
.dropdown-item-text {
display: block;
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
padding: var(--#{$prefix}dropdown-item-padding-y)
var(--#{$prefix}dropdown-item-padding-x);
color: var(--#{$prefix}dropdown-link-color);
}

View File

@ -40,11 +40,21 @@
// stylelint-disable scss/dollar-variable-pattern
@function rgba-css-var($identifier, $target) {
@if $identifier == "body" and $target == "bg" {
@return rgba(var(--#{$prefix}#{$identifier}-bg-rgb), var(--#{$prefix}#{$target}-opacity));
} @if $identifier == "body" and $target == "text" {
@return rgba(var(--#{$prefix}#{$identifier}-color-rgb), var(--#{$prefix}#{$target}-opacity));
@return rgba(
var(--#{$prefix}#{$identifier}-bg-rgb),
var(--#{$prefix}#{$target}-opacity)
);
}
@if $identifier == "body" and $target == "text" {
@return rgba(
var(--#{$prefix}#{$identifier}-color-rgb),
var(--#{$prefix}#{$target}-opacity)
);
} @else {
@return rgba(var(--#{$prefix}#{$identifier}-rgb), var(--#{$prefix}#{$target}-opacity));
@return rgba(
var(--#{$prefix}#{$identifier}-rgb),
var(--#{$prefix}#{$target}-opacity)
);
}
}
@ -55,10 +65,18 @@
// allow to pass the $key and $value of the map as an function argument
$_args: ();
@each $arg in $args {
$_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
$_args: append(
$_args,
if($arg == "$key", $key, if($arg == "$value", $value, $arg))
);
}
$_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
$_map: map-merge(
$_map,
(
$key: call(get-function($func), $_args...),
)
);
}
@return $_map;
@ -90,7 +108,12 @@
$result: ();
@each $key, $value in $map {
@if (index($values, $key) != null) {
$result: map-merge($result, ($key: $value));
$result: map-merge(
$result,
(
$key: $value,
)
);
}
}
@return $result;
@ -118,7 +141,12 @@
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
@return str-slice($string, 1, $index - 1) + $replace +
str-replace(
str-slice($string, $index + str-length($search)),
$search,
$replace
);
}
@return $string;
@ -148,9 +176,37 @@
// A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
// stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
$_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
$_luminance-list: 0.0008 0.001 0.0011 0.0013 0.0015 0.0017 0.002 0.0022 0.0025
0.0027 0.003 0.0033 0.0037 0.004 0.0044 0.0048 0.0052 0.0056 0.006 0.0065
0.007 0.0075 0.008 0.0086 0.0091 0.0097 0.0103 0.011 0.0116 0.0123 0.013
0.0137 0.0144 0.0152 0.016 0.0168 0.0176 0.0185 0.0194 0.0203 0.0212 0.0222
0.0232 0.0242 0.0252 0.0262 0.0273 0.0284 0.0296 0.0307 0.0319 0.0331 0.0343
0.0356 0.0369 0.0382 0.0395 0.0409 0.0423 0.0437 0.0452 0.0467 0.0482 0.0497
0.0513 0.0529 0.0545 0.0561 0.0578 0.0595 0.0612 0.063 0.0648 0.0666 0.0685
0.0704 0.0723 0.0742 0.0762 0.0782 0.0802 0.0823 0.0844 0.0865 0.0887 0.0908
0.0931 0.0953 0.0976 0.0999 0.1022 0.1046 0.107 0.1095 0.1119 0.1144 0.117
0.1195 0.1221 0.1248 0.1274 0.1301 0.1329 0.1356 0.1384 0.1413 0.1441 0.147
0.15 0.1529 0.1559 0.159 0.162 0.1651 0.1683 0.1714 0.1746 0.1779 0.1812
0.1845 0.1878 0.1912 0.1946 0.1981 0.2016 0.2051 0.2086 0.2122 0.2159 0.2195
0.2232 0.227 0.2307 0.2346 0.2384 0.2423 0.2462 0.2502 0.2542 0.2582 0.2623
0.2664 0.2705 0.2747 0.2789 0.2831 0.2874 0.2918 0.2961 0.3005 0.305 0.3095
0.314 0.3185 0.3231 0.3278 0.3325 0.3372 0.3419 0.3467 0.3515 0.3564 0.3613
0.3663 0.3712 0.3763 0.3813 0.3864 0.3916 0.3968 0.402 0.4072 0.4125 0.4179
0.4233 0.4287 0.4342 0.4397 0.4452 0.4508 0.4564 0.4621 0.4678 0.4735 0.4793
0.4851 0.491 0.4969 0.5029 0.5089 0.5149 0.521 0.5271 0.5333 0.5395 0.5457
0.552 0.5583 0.5647 0.5711 0.5776 0.5841 0.5906 0.5972 0.6038 0.6105 0.6172
0.624 0.6308 0.6376 0.6445 0.6514 0.6584 0.6654 0.6724 0.6795 0.6867 0.6939
0.7011 0.7084 0.7157 0.7231 0.7305 0.7379 0.7454 0.7529 0.7605 0.7682 0.7758
0.7835 0.7913 0.7991 0.807 0.8148 0.8228 0.8308 0.8388 0.8469 0.855 0.8632
0.8714 0.8796 0.8879 0.8963 0.9047 0.9131 0.9216 0.9301 0.9387 0.9473 0.956
0.9647 0.9734 0.9823 0.9911 1;
@function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
@function color-contrast(
$background,
$color-contrast-dark: $color-contrast-dark,
$color-contrast-light: $color-contrast-light,
$min-contrast-ratio: $min-contrast-ratio
) {
$foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
$max-ratio: 0;
$max-ratio-color: null;
@ -174,7 +230,11 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
$l1: luminance($background);
$l2: luminance(opaque($background, $foreground));
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
@return if(
$l1 > $l2,
divide($l1 + 0.05, $l2 + 0.05),
divide($l2 + 0.05, $l1 + 0.05)
);
}
// Return WCAG2.0 relative luminance
@ -184,15 +244,25 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
$rgb: (
"r": red($color),
"g": green($color),
"b": blue($color)
"b": blue($color),
);
@each $name, $value in $rgb {
$value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
$rgb: map-merge($rgb, ($name: $value));
$value: if(
divide($value, 255) < 0.03928,
divide(divide($value, 255), 12.92),
nth($_luminance-list, $value + 1)
);
$rgb: map-merge(
$rgb,
(
$name: $value,
)
);
}
@return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
@return (map-get($rgb, "r") * 0.2126) + (map-get($rgb, "g") * 0.7152) +
(map-get($rgb, "b") * 0.0722);
}
// Return opaque color
@ -214,7 +284,11 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
// Shade the color if the weight is positive, else tint it
@function shift-color($color, $weight) {
@return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
@return if(
$weight > 0,
shade-color($color, $weight),
tint-color($color, -$weight)
);
}
// scss-docs-end color-functions
@ -228,11 +302,20 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
@return $value1;
}
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@if type-of($value1) ==
number and
type-of($value2) ==
number and
comparable($value1, $value2)
{
@return $value1 + $value2;
}
@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
@return if(
$return-calc == true,
calc(#{$value1} + #{$value2}),
$value1 + unquote(" + ") + $value2
);
}
@function subtract($value1, $value2, $return-calc: true) {
@ -248,7 +331,12 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
@return $value1;
}
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@if type-of($value1) ==
number and
type-of($value2) ==
number and
comparable($value1, $value2)
{
@return $value1 - $value2;
}
@ -256,11 +344,19 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
$value2: unquote("(") + $value2 + unquote(")");
}
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
@return if(
$return-calc == true,
calc(#{$value1} - #{$value2}),
$value1 + unquote(" - ") + $value2
);
}
@function divide($dividend, $divisor, $precision: 10) {
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
$sign: if(
$dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0,
1,
-1
);
$dividend: abs($dividend);
$divisor: abs($divisor);
@if $dividend == 0 {
@ -279,7 +375,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
$quotient: $quotient + 1;
}
$result: $result * 10 + $quotient;
$factor: $factor * .1;
$factor: $factor * 0.1;
$remainder: $remainder * 10;
$precision: $precision - 1;
@if ($precision < 0 and $remainder >= $divisor * 5) {
@ -293,9 +389,11 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
"px": 1px,
"rem": 1rem,
"em": 1em,
"%": 1%
"%": 1%,
);
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
@if (
$dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)
) {
$result: $result * map-get($unit-map, $dividend-unit);
}
@return $result;

View File

@ -16,14 +16,16 @@
.grid {
display: grid;
grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);
grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);
grid-template-columns: repeat(
var(--#{$prefix}columns, #{$grid-columns}),
1fr
);
gap: var(--#{$prefix}gap, #{$grid-gutter-width});
@include make-cssgrid();
}
}
// Columns
//
// Common styles for small and large grid columns

View File

@ -9,7 +9,6 @@
@include img-fluid();
}
// Image thumbnails
.img-thumbnail {
padding: $thumbnail-padding;
@ -32,7 +31,7 @@
}
.figure-img {
margin-bottom: $spacer * .5;
margin-bottom: $spacer * 0.5;
line-height: 1;
}

View File

@ -75,11 +75,13 @@
.list-group-item {
position: relative;
display: block;
padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
padding: var(--#{$prefix}list-group-item-padding-y)
var(--#{$prefix}list-group-item-padding-x);
color: var(--#{$prefix}list-group-color);
text-decoration: if($link-decoration == none, null, none);
background-color: var(--#{$prefix}list-group-bg);
border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);
border: var(--#{$prefix}list-group-border-width) solid
var(--#{$prefix}list-group-border-color);
&:first-child {
@include border-top-radius(inherit);
@ -108,7 +110,9 @@
border-top-width: 0;
&.active {
margin-top: calc(var(--#{$prefix}list-group-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-top: calc(
var(--#{$prefix}list-group-border-width) * -1
); // stylelint-disable-line function-disallowed-list
border-top-width: var(--#{$prefix}list-group-border-width);
}
}
@ -127,12 +131,16 @@
> .list-group-item {
&:first-child {
@include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
@include border-bottom-start-radius(
var(--#{$prefix}list-group-border-radius)
);
@include border-top-end-radius(0);
}
&:last-child {
@include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
@include border-top-end-radius(
var(--#{$prefix}list-group-border-radius)
);
@include border-bottom-start-radius(0);
}
@ -145,7 +153,9 @@
border-left-width: 0;
&.active {
margin-left: calc(var(--#{$prefix}list-group-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-left: calc(
var(--#{$prefix}list-group-border-width) * -1
); // stylelint-disable-line function-disallowed-list
border-left-width: var(--#{$prefix}list-group-border-width);
}
}
@ -154,7 +164,6 @@
}
}
// Flush list items
//
// Remove borders and border-radius to keep list group items edge-to-edge. Most
@ -172,7 +181,6 @@
}
}
// scss-docs-start list-group-modifiers
// List group contextual variants
//
@ -182,10 +190,21 @@
@each $state, $value in $theme-colors {
$list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
$list-group-variant-color: shift-color($value, $list-group-item-color-scale);
@if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
$list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
@if (
contrast-ratio($list-group-variant-bg, $list-group-variant-color) <
$min-contrast-ratio
) {
$list-group-variant-color: mix(
$value,
color-contrast($list-group-variant-bg),
abs($list-group-item-color-scale)
);
}
@include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
@include list-group-item-variant(
$state,
$list-group-variant-bg,
$list-group-variant-color
);
}
// scss-docs-end list-group-modifiers

View File

@ -21,10 +21,15 @@ $utilities-text: map-merge(
(
"black": to-rgb($black),
"white": to-rgb($white),
"body": to-rgb($body-color)
"body": to-rgb($body-color),
)
) !default;
$utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
$utilities-text-colors: map-loop(
$utilities-text,
rgba-css-var,
"$key",
"text"
) !default;
// scss-docs-end utilities-text-colors
// scss-docs-start utilities-bg-colors
@ -33,22 +38,36 @@ $utilities-bg: map-merge(
(
"black": to-rgb($black),
"white": to-rgb($white),
"body": to-rgb($body-bg)
"body": to-rgb($body-bg),
)
) !default;
$utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
$utilities-bg-colors: map-loop(
$utilities-bg,
rgba-css-var,
"$key",
"bg"
) !default;
// scss-docs-end utilities-bg-colors
// scss-docs-start utilities-border-colors
$utilities-border: map-merge(
$utilities-colors,
(
"white": to-rgb($white)
"white": to-rgb($white),
)
) !default;
$utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
$utilities-border-colors: map-loop(
$utilities-border,
rgba-css-var,
"$key",
"border"
) !default;
// scss-docs-end utilities-border-colors
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
$negative-spacers: if(
$enable-negative-margins,
negativify-map($spacers),
null
) !default;
$gutters: $spacers !default;

View File

@ -5,7 +5,6 @@
// .modal-dialog - positioning shell for the actual modal
// .modal-content - actual modal w/ bg and corners and stuff
// Container that the modal scrolls within
.modal {
// scss-docs-start modal-css-vars
@ -102,7 +101,8 @@
pointer-events: auto;
background-color: var(--#{$prefix}modal-bg);
background-clip: padding-box;
border: var(--#{$prefix}modal-border-width) solid var(--#{$prefix}modal-border-color);
border: var(--#{$prefix}modal-border-width) solid
var(--#{$prefix}modal-border-color);
@include border-radius(var(--#{$prefix}modal-border-radius));
@include box-shadow(var(--#{$prefix}modal-box-shadow));
// Remove focus outline from opened modal
@ -117,7 +117,11 @@
--#{$prefix}backdrop-opacity: #{$modal-backdrop-opacity};
// scss-docs-end modal-backdrop-css-vars
@include overlay-backdrop(var(--#{$prefix}backdrop-zindex), var(--#{$prefix}backdrop-bg), var(--#{$prefix}backdrop-opacity));
@include overlay-backdrop(
var(--#{$prefix}backdrop-zindex),
var(--#{$prefix}backdrop-bg),
var(--#{$prefix}backdrop-opacity)
);
}
// Modal header
@ -128,12 +132,16 @@
align-items: center;
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
padding: var(--#{$prefix}modal-header-padding);
border-bottom: var(--#{$prefix}modal-header-border-width) solid var(--#{$prefix}modal-header-border-color);
border-bottom: var(--#{$prefix}modal-header-border-width) solid
var(--#{$prefix}modal-header-border-color);
@include border-top-radius(var(--#{$prefix}modal-inner-border-radius));
.btn-close {
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
margin: calc(var(--#{$prefix}modal-header-padding-y) * -.5) calc(var(--#{$prefix}modal-header-padding-x) * -.5) calc(var(--#{$prefix}modal-header-padding-y) * -.5) auto;
padding: calc(var(--#{$prefix}modal-header-padding-y) * 0.5)
calc(var(--#{$prefix}modal-header-padding-x) * 0.5);
margin: calc(var(--#{$prefix}modal-header-padding-y) * -0.5)
calc(var(--#{$prefix}modal-header-padding-x) * -0.5)
calc(var(--#{$prefix}modal-header-padding-y) * -0.5) auto;
}
}
@ -160,16 +168,21 @@
flex-wrap: wrap;
align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
padding: calc(var(--#{$prefix}modal-padding) - var(--#{$prefix}modal-footer-gap) * .5);
padding: calc(
var(--#{$prefix}modal-padding) - var(--#{$prefix}modal-footer-gap) * 0.5
);
background-color: var(--#{$prefix}modal-footer-bg);
border-top: var(--#{$prefix}modal-footer-border-width) solid var(--#{$prefix}modal-footer-border-color);
border-top: var(--#{$prefix}modal-footer-border-width) solid
var(--#{$prefix}modal-footer-border-color);
@include border-bottom-radius(var(--#{$prefix}modal-inner-border-radius));
// Place margin between footer elements
// This solution is far from ideal because of the universal selector usage,
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
> * {
margin: calc(var(--#{$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
margin: calc(
var(--#{$prefix}modal-footer-gap) * 0.5
); // Todo in v6: replace with gap on parent class
}
}

View File

@ -23,7 +23,8 @@
.nav-link {
display: block;
padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
padding: var(--#{$prefix}nav-link-padding-y)
var(--#{$prefix}nav-link-padding-x);
@include font-size(var(--#{$prefix}nav-link-font-size));
font-weight: var(--#{$prefix}nav-link-font-weight);
color: var(--#{$prefix}nav-link-color);
@ -59,10 +60,13 @@
--#{$prefix}nav-tabs-link-active-border-color: #{$nav-tabs-link-active-border-color};
// scss-docs-end nav-tabs-css-vars
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid
var(--#{$prefix}nav-tabs-border-color);
.nav-link {
margin-bottom: calc(var(--#{$prefix}nav-tabs-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-bottom: calc(
var(--#{$prefix}nav-tabs-border-width) * -1
); // stylelint-disable-line function-disallowed-list
background: none;
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
@ -91,13 +95,14 @@
.dropdown-menu {
// Make dropdown border overlap tab border
margin-top: calc(var(--#{$prefix}nav-tabs-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-top: calc(
var(--#{$prefix}nav-tabs-border-width) * -1
); // stylelint-disable-line function-disallowed-list
// Remove the top rounded corners here since there is a hard edge above the menu
@include border-top-radius(0);
}
}
//
// Pills
//
@ -128,7 +133,6 @@
}
}
//
// Justified variants
//
@ -157,7 +161,6 @@
}
}
// Tabbable tabs
//
// Hide tabbable panes to start, show them when `.active`

View File

@ -5,7 +5,11 @@
.navbar {
// scss-docs-start navbar-css-vars
--#{$prefix}navbar-padding-x: #{if($navbar-padding-x == null, 0, $navbar-padding-x)};
--#{$prefix}navbar-padding-x: #{if(
$navbar-padding-x == null,
0,
$navbar-padding-x
)};
--#{$prefix}navbar-padding-y: #{$navbar-padding-y};
--#{$prefix}navbar-color: #{$navbar-light-color};
--#{$prefix}navbar-hover-color: #{$navbar-light-hover-color};
@ -20,7 +24,9 @@
--#{$prefix}navbar-toggler-padding-y: #{$navbar-toggler-padding-y};
--#{$prefix}navbar-toggler-padding-x: #{$navbar-toggler-padding-x};
--#{$prefix}navbar-toggler-font-size: #{$navbar-toggler-font-size};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-light-toggler-icon-bg)};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg(
$navbar-light-toggler-icon-bg
)};
--#{$prefix}navbar-toggler-border-color: #{$navbar-light-toggler-border-color};
--#{$prefix}navbar-toggler-border-radius: #{$navbar-toggler-border-radius};
--#{$prefix}navbar-toggler-focus-width: #{$navbar-toggler-focus-width};
@ -57,7 +63,6 @@
}
}
// Navbar brand
//
// Used for brand, project, or site names.
@ -78,7 +83,6 @@
}
}
// Navbar nav
//
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
@ -108,7 +112,6 @@
}
}
// Navbar text
//
//
@ -125,7 +128,6 @@
}
}
// Responsive navbar
//
// Custom styles for responsive collapsing and toggling of navbar contents.
@ -144,12 +146,14 @@
// Button for toggling the navbar when in its collapsed state
.navbar-toggler {
padding: var(--#{$prefix}navbar-toggler-padding-y) var(--#{$prefix}navbar-toggler-padding-x);
padding: var(--#{$prefix}navbar-toggler-padding-y)
var(--#{$prefix}navbar-toggler-padding-x);
@include font-size(var(--#{$prefix}navbar-toggler-font-size));
line-height: 1;
color: var(--#{$prefix}navbar-color);
background-color: transparent; // remove default button style
border: var(--#{$prefix}border-width) solid var(--#{$prefix}navbar-toggler-border-color); // remove default button style
border: var(--#{$prefix}border-width) solid
var(--#{$prefix}navbar-toggler-border-color); // remove default button style
@include border-radius(var(--#{$prefix}navbar-toggler-border-radius));
@include transition(var(--#{$prefix}navbar-toggler-transition));

View File

@ -58,7 +58,8 @@
top: 0;
left: 0;
width: var(--#{$prefix}offcanvas-width);
border-right: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
border-right: var(--#{$prefix}offcanvas-border-width) solid
var(--#{$prefix}offcanvas-border-color);
transform: translateX(-100%);
}
@ -66,7 +67,8 @@
top: 0;
right: 0;
width: var(--#{$prefix}offcanvas-width);
border-left: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
border-left: var(--#{$prefix}offcanvas-border-width) solid
var(--#{$prefix}offcanvas-border-color);
transform: translateX(100%);
}
@ -76,7 +78,8 @@
left: 0;
height: var(--#{$prefix}offcanvas-height);
max-height: 100%;
border-bottom: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
border-bottom: var(--#{$prefix}offcanvas-border-width) solid
var(--#{$prefix}offcanvas-border-color);
transform: translateY(-100%);
}
@ -85,7 +88,8 @@
left: 0;
height: var(--#{$prefix}offcanvas-height);
max-height: 100%;
border-top: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
border-top: var(--#{$prefix}offcanvas-border-width) solid
var(--#{$prefix}offcanvas-border-color);
transform: translateY(100%);
}
}
@ -114,20 +118,26 @@
}
.offcanvas-backdrop {
@include overlay-backdrop($zindex-offcanvas-backdrop, $offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
@include overlay-backdrop(
$zindex-offcanvas-backdrop,
$offcanvas-backdrop-bg,
$offcanvas-backdrop-opacity
);
}
.offcanvas-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
padding: var(--#{$prefix}offcanvas-padding-y)
var(--#{$prefix}offcanvas-padding-x);
.btn-close {
padding: calc(var(--#{$prefix}offcanvas-padding-y) * .5) calc(var(--#{$prefix}offcanvas-padding-x) * .5);
margin-top: calc(var(--#{$prefix}offcanvas-padding-y) * -.5);
margin-right: calc(var(--#{$prefix}offcanvas-padding-x) * -.5);
margin-bottom: calc(var(--#{$prefix}offcanvas-padding-y) * -.5);
padding: calc(var(--#{$prefix}offcanvas-padding-y) * 0.5)
calc(var(--#{$prefix}offcanvas-padding-x) * 0.5);
margin-top: calc(var(--#{$prefix}offcanvas-padding-y) * -0.5);
margin-right: calc(var(--#{$prefix}offcanvas-padding-x) * -0.5);
margin-bottom: calc(var(--#{$prefix}offcanvas-padding-y) * -0.5);
}
}
@ -138,6 +148,7 @@
.offcanvas-body {
flex-grow: 1;
padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
padding: var(--#{$prefix}offcanvas-padding-y)
var(--#{$prefix}offcanvas-padding-x);
overflow-y: auto;
}

View File

@ -31,12 +31,14 @@
.page-link {
position: relative;
display: block;
padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
padding: var(--#{$prefix}pagination-padding-y)
var(--#{$prefix}pagination-padding-x);
@include font-size(var(--#{$prefix}pagination-font-size));
color: var(--#{$prefix}pagination-color);
text-decoration: if($link-decoration == none, null, none);
background-color: var(--#{$prefix}pagination-bg);
border: var(--#{$prefix}pagination-border-width) solid var(--#{$prefix}pagination-border-color);
border: var(--#{$prefix}pagination-border-width) solid
var(--#{$prefix}pagination-border-color);
@include transition($pagination-transition);
&:hover {
@ -97,15 +99,24 @@
}
}
//
// Sizing
//
.pagination-lg {
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
@include pagination-size(
$pagination-padding-y-lg,
$pagination-padding-x-lg,
$font-size-lg,
$pagination-border-radius-lg
);
}
.pagination-sm {
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
@include pagination-size(
$pagination-padding-y-sm,
$pagination-padding-x-sm,
$font-size-sm,
$pagination-border-radius-sm
);
}

View File

@ -14,11 +14,11 @@
// Sizing
.placeholder-xs {
min-height: .6em;
min-height: 0.6em;
}
.placeholder-sm {
min-height: .8em;
min-height: 0.8em;
}
.placeholder-lg {
@ -39,7 +39,12 @@
}
.placeholder-wave {
mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
mask-image: linear-gradient(
130deg,
$black 55%,
rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%,
$black 95%
);
mask-size: 200% 100%;
animation: placeholder-wave 2s linear infinite;
}

View File

@ -35,7 +35,8 @@
word-wrap: break-word;
background-color: var(--#{$prefix}popover-bg);
background-clip: padding-box;
border: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
border: var(--#{$prefix}popover-border-width) solid
var(--#{$prefix}popover-border-color);
@include border-radius(var(--#{$prefix}popover-border-radius));
@include box-shadow(var(--#{$prefix}popover-box-shadow));
@ -58,11 +59,15 @@
.bs-popover-top {
> .popover-arrow {
bottom: calc((var(--#{$prefix}popover-arrow-height) * -1) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
bottom: calc(
(var(--#{$prefix}popover-arrow-height) * -1) -
var(--#{$prefix}popover-border-width)
); // stylelint-disable-line function-disallowed-list
&::before,
&::after {
border-width: var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-width: var(--#{$prefix}popover-arrow-height)
calc(var(--#{$prefix}popover-arrow-width) * 0.5) 0; // stylelint-disable-line function-disallowed-list
}
&::before {
@ -80,13 +85,18 @@
/* rtl:begin:ignore */
.bs-popover-end {
> .popover-arrow {
left: calc((var(--#{$prefix}popover-arrow-height) * -1) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
left: calc(
(var(--#{$prefix}popover-arrow-height) * -1) -
var(--#{$prefix}popover-border-width)
); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}popover-arrow-height);
height: var(--#{$prefix}popover-arrow-width);
&::before,
&::after {
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-width: calc(var(--#{$prefix}popover-arrow-width) * 0.5)
var(--#{$prefix}popover-arrow-height)
calc(var(--#{$prefix}popover-arrow-width) * 0.5) 0; // stylelint-disable-line function-disallowed-list
}
&::before {
@ -105,11 +115,15 @@
.bs-popover-bottom {
> .popover-arrow {
top: calc((var(--#{$prefix}popover-arrow-height) * -1) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
top: calc(
(var(--#{$prefix}popover-arrow-height) * -1) -
var(--#{$prefix}popover-border-width)
); // stylelint-disable-line function-disallowed-list
&::before,
&::after {
border-width: 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
border-width: 0 calc(var(--#{$prefix}popover-arrow-width) * 0.5)
var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
}
&::before {
@ -130,22 +144,30 @@
left: 50%;
display: block;
width: var(--#{$prefix}popover-arrow-width);
margin-left: calc(var(--#{$prefix}popover-arrow-width) * -.5); // stylelint-disable-line function-disallowed-list
margin-left: calc(
var(--#{$prefix}popover-arrow-width) * -0.5
); // stylelint-disable-line function-disallowed-list
content: "";
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-header-bg);
border-bottom: var(--#{$prefix}popover-border-width) solid
var(--#{$prefix}popover-header-bg);
}
}
/* rtl:begin:ignore */
.bs-popover-start {
> .popover-arrow {
right: calc((var(--#{$prefix}popover-arrow-height) * -1) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
right: calc(
(var(--#{$prefix}popover-arrow-height) * -1) -
var(--#{$prefix}popover-border-width)
); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}popover-arrow-height);
height: var(--#{$prefix}popover-arrow-width);
&::before,
&::after {
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
border-width: calc(var(--#{$prefix}popover-arrow-width) * 0.5) 0
calc(var(--#{$prefix}popover-arrow-width) * 0.5)
var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
}
&::before {
@ -179,12 +201,14 @@
// Offset the popover to account for the popover arrow
.popover-header {
padding: var(--#{$prefix}popover-header-padding-y) var(--#{$prefix}popover-header-padding-x);
padding: var(--#{$prefix}popover-header-padding-y)
var(--#{$prefix}popover-header-padding-x);
margin-bottom: 0; // Reset the default from Reboot
@include font-size(var(--#{$prefix}popover-header-font-size));
color: var(--#{$prefix}popover-header-color);
background-color: var(--#{$prefix}popover-header-bg);
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
border-bottom: var(--#{$prefix}popover-border-width) solid
var(--#{$prefix}popover-border-color);
@include border-top-radius(var(--#{$prefix}popover-inner-border-radius));
&:empty {
@ -193,6 +217,7 @@
}
.popover-body {
padding: var(--#{$prefix}popover-body-padding-y) var(--#{$prefix}popover-body-padding-x);
padding: var(--#{$prefix}popover-body-padding-y)
var(--#{$prefix}popover-body-padding-x);
color: var(--#{$prefix}popover-body-color);
}

View File

@ -3,7 +3,9 @@
// scss-docs-start progress-keyframes
@if $enable-transitions {
@keyframes progress-bar-stripes {
0% { background-position-x: $progress-height; }
0% {
background-position-x: $progress-height;
}
}
}
// scss-docs-end progress-keyframes
@ -43,7 +45,8 @@
.progress-bar-striped {
@include gradient-striped();
background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
background-size: var(--#{$prefix}progress-height)
var(--#{$prefix}progress-height);
}
@if $enable-transitions {

View File

@ -1,6 +1,5 @@
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
// Reboot
//
// Normalization of HTML elements, manually forked from Normalize.css to remove
@ -8,7 +7,6 @@
//
// Normalize is licensed MIT. https://github.com/necolas/normalize.css
// Document
//
// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
@ -19,7 +17,6 @@
box-sizing: border-box;
}
// Root
//
// Ability to the value of the root font sizes, affecting the value of `rem`.
@ -37,7 +34,6 @@
}
}
// Body
//
// 1. Remove the margin in all browsers.
@ -60,7 +56,6 @@ body {
}
// scss-docs-end reboot-body-rules
// Content grouping
//
// 1. Reset Firefox's gray color
@ -73,7 +68,6 @@ hr {
opacity: $hr-opacity;
}
// Typography
//
// 1. Remove top margins from headings
@ -120,7 +114,6 @@ h6 {
@include font-size($h6-font-size);
}
// Reset margins on paragraphs
//
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
@ -131,7 +124,6 @@ p {
margin-bottom: $paragraph-margin-bottom;
}
// Abbreviations
//
// 1. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
@ -144,7 +136,6 @@ abbr[title] {
text-decoration-skip-ink: none; // 3
}
// Address
address {
@ -153,7 +144,6 @@ address {
line-height: inherit;
}
// Lists
ol,
@ -182,18 +172,16 @@ dt {
// 1. Undo browser default
dd {
margin-bottom: .5rem;
margin-bottom: 0.5rem;
margin-left: 0; // 1
}
// Blockquote
blockquote {
margin: 0 0 1rem;
}
// Strong
//
// Add the correct font weight in Chrome, Edge, and Safari
@ -203,7 +191,6 @@ strong {
font-weight: $font-weight-bolder;
}
// Small
//
// Add the correct font size in all browsers
@ -212,7 +199,6 @@ small {
@include font-size($small-font-size);
}
// Mark
mark {
@ -220,7 +206,6 @@ mark {
background-color: var(--#{$prefix}highlight-bg);
}
// Sub and Sup
//
// Prevent `sub` and `sup` elements from affecting the line height in
@ -234,9 +219,12 @@ sup {
vertical-align: baseline;
}
sub { bottom: -.25em; }
sup { top: -.5em; }
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
// Links
@ -263,7 +251,6 @@ a:not([href]):not([class]) {
}
}
// Code
pre,
@ -319,7 +306,6 @@ kbd {
}
}
// Figures
//
// Apply a consistent margin strategy (matches our type styles).
@ -328,7 +314,6 @@ figure {
margin: 0 0 1rem;
}
// Images and content
img,
@ -336,7 +321,6 @@ svg {
vertical-align: middle;
}
// Tables
//
// Prevent double borders
@ -374,7 +358,6 @@ th {
border-width: 0;
}
// Forms
//
// 1. Allow labels to use `margin` for spacing.
@ -439,7 +422,9 @@ select {
// Remove the dropdown arrow only from text type inputs built with datalists in Chrome.
// See https://stackoverflow.com/a/54997118
[list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not([type="time"])::-webkit-calendar-picker-indicator {
[list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not(
[type="week"]
):not([type="time"])::-webkit-calendar-picker-indicator {
display: none !important;
}
@ -561,7 +546,6 @@ legend {
padding: 0;
}
// 1. Inherit font family and line height for file input buttons
// 2. Correct the inability to style clickable types in iOS and Safari.
@ -591,7 +575,6 @@ summary {
cursor: pointer;
}
// Progress
//
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
@ -600,7 +583,6 @@ progress {
vertical-align: baseline;
}
// Hidden attribute
//
// Always hide an element with the `hidden` HTML attribute.

View File

@ -10,12 +10,15 @@
vertical-align: var(--#{$prefix}spinner-vertical-align);
// stylelint-disable-next-line property-disallowed-list
border-radius: 50%;
animation: var(--#{$prefix}spinner-animation-speed) linear infinite var(--#{$prefix}spinner-animation-name);
animation: var(--#{$prefix}spinner-animation-speed) linear infinite
var(--#{$prefix}spinner-animation-name);
}
// scss-docs-start spinner-border-keyframes
@keyframes spinner-border {
to { transform: rotate(360deg) #{"/* rtl:ignore */"}; }
to {
transform: rotate(360deg) #{"/* rtl:ignore */"};
}
}
// scss-docs-end spinner-border-keyframes

View File

@ -53,7 +53,6 @@
caption-side: top;
}
//
// Condensed table w/ half padding
//
@ -65,7 +64,6 @@
}
}
// Border versions
//
// Add or remove borders all around the table and between all the columns.
@ -137,7 +135,6 @@
}
}
// Table variants
//
// Table variants set the table cell backgrounds, border colors

View File

@ -23,7 +23,8 @@
pointer-events: auto;
background-color: var(--#{$prefix}toast-bg);
background-clip: padding-box;
border: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-border-color);
border: var(--#{$prefix}toast-border-width) solid
var(--#{$prefix}toast-border-color);
box-shadow: var(--#{$prefix}toast-box-shadow);
@include border-radius(var(--#{$prefix}toast-border-radius));
@ -55,11 +56,18 @@
color: var(--#{$prefix}toast-header-color);
background-color: var(--#{$prefix}toast-header-bg);
background-clip: padding-box;
border-bottom: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-header-border-color);
@include border-top-radius(calc(var(--#{$prefix}toast-border-radius) - var(--#{$prefix}toast-border-width)));
border-bottom: var(--#{$prefix}toast-border-width) solid
var(--#{$prefix}toast-header-border-color);
@include border-top-radius(
calc(
var(--#{$prefix}toast-border-radius) - var(--#{$prefix}toast-border-width)
)
);
.btn-close {
margin-right: calc(var(--#{$prefix}toast-padding-x) * -.5); // stylelint-disable-line function-disallowed-list
margin-right: calc(
var(--#{$prefix}toast-padding-x) * -0.5
); // stylelint-disable-line function-disallowed-list
margin-left: var(--#{$prefix}toast-padding-x);
}
}

View File

@ -30,7 +30,9 @@
word-wrap: break-word;
opacity: 0;
&.show { opacity: var(--#{$prefix}tooltip-opacity); }
&.show {
opacity: var(--#{$prefix}tooltip-opacity);
}
.tooltip-arrow {
display: block;
@ -51,7 +53,8 @@
&::before {
top: -1px;
border-width: var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-width: var(--#{$prefix}tooltip-arrow-height)
calc(var(--#{$prefix}tooltip-arrow-width) * 0.5) 0; // stylelint-disable-line function-disallowed-list
border-top-color: var(--#{$prefix}tooltip-bg);
}
}
@ -64,7 +67,9 @@
&::before {
right: -1px;
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * 0.5)
var(--#{$prefix}tooltip-arrow-height)
calc(var(--#{$prefix}tooltip-arrow-width) * 0.5) 0; // stylelint-disable-line function-disallowed-list
border-right-color: var(--#{$prefix}tooltip-bg);
}
}
@ -76,7 +81,8 @@
&::before {
bottom: -1px;
border-width: 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-width: 0 calc(var(--#{$prefix}tooltip-arrow-width) * 0.5)
var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-bottom-color: var(--#{$prefix}tooltip-bg);
}
}
@ -89,7 +95,9 @@
&::before {
left: -1px;
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * 0.5) 0
calc(var(--#{$prefix}tooltip-arrow-width) * 0.5)
var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-left-color: var(--#{$prefix}tooltip-bg);
}
}
@ -118,5 +126,8 @@
color: var(--#{$prefix}tooltip-color);
text-align: center;
background-color: var(--#{$prefix}tooltip-bg);
border-radius: var(--#{$prefix}tooltip-border-radius, 0); // stylelint-disable-line property-disallowed-list
border-radius: var(
--#{$prefix}tooltip-border-radius,
0
); // stylelint-disable-line property-disallowed-list
}

View File

@ -25,7 +25,6 @@
@extend h6;
}
.lead {
@include font-size($lead-font-size);
font-weight: $lead-font-weight;
@ -71,7 +70,6 @@
}
}
//
// Misc
//

View File

@ -5,53 +5,60 @@ $utilities: () !default;
$utilities: map-merge(
(
// scss-docs-start utils-vertical-align
"align": (
"align":
(
property: vertical-align,
class: align,
values: baseline top middle bottom text-bottom text-top
values: baseline top middle bottom text-bottom text-top,
),
// scss-docs-end utils-vertical-align
// scss-docs-start utils-float
"float": (
"float":
(
responsive: true,
property: float,
values: (
start: left,
end: right,
none: none,
)
),
),
// scss-docs-end utils-float
// Opacity utilities
// scss-docs-start utils-opacity
"opacity": (
"opacity":
(
property: opacity,
values: (
0: 0,
25: .25,
50: .5,
75: .75,
25: 0.25,
50: 0.5,
75: 0.75,
100: 1,
)
),
),
// scss-docs-end utils-opacity
// scss-docs-start utils-overflow
"overflow": (
"overflow":
(
property: overflow,
values: auto hidden visible scroll,
),
// scss-docs-end utils-overflow
// scss-docs-start utils-display
"display": (
"display":
(
responsive: true,
print: true,
property: display,
class: d,
values: inline inline-block block grid table table-row table-cell flex inline-flex none
values: inline inline-block block grid table table-row table-cell flex
inline-flex none,
),
// scss-docs-end utils-display
// scss-docs-start utils-shadow
"shadow": (
"shadow":
(
property: box-shadow,
class: shadow,
values: (
@ -59,31 +66,32 @@ $utilities: map-merge(
sm: $box-shadow-sm,
lg: $box-shadow-lg,
none: none,
)
),
),
// scss-docs-end utils-shadow
// scss-docs-start utils-position
"position": (
"position":
(
property: position,
values: static relative absolute fixed sticky
values: static relative absolute fixed sticky,
),
"top": (
property: top,
values: $position-values
values: $position-values,
),
"bottom": (
property: bottom,
values: $position-values
values: $position-values,
),
"start": (
property: left,
class: start,
values: $position-values
values: $position-values,
),
"end": (
property: right,
class: end,
values: $position-values
values: $position-values,
),
"translate-middle": (
property: transform,
@ -92,76 +100,83 @@ $utilities: map-merge(
null: translate(-50%, -50%),
x: translateX(-50%),
y: translateY(-50%),
)
),
),
// scss-docs-end utils-position
// scss-docs-start utils-borders
"border": (
"border":
(
property: border,
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style)
var(--#{$prefix}border-color),
0: 0,
)
),
),
"border-top": (
property: border-top,
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style)
var(--#{$prefix}border-color),
0: 0,
)
),
),
"border-end": (
property: border-right,
class: border-end,
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style)
var(--#{$prefix}border-color),
0: 0,
)
),
),
"border-bottom": (
property: border-bottom,
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style)
var(--#{$prefix}border-color),
0: 0,
)
),
),
"border-start": (
property: border-left,
class: border-start,
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style)
var(--#{$prefix}border-color),
0: 0,
)
),
),
"border-color": (
property: border-color,
class: border,
local-vars: (
"border-opacity": 1
"border-opacity": 1,
),
values: $utilities-border-colors
values: $utilities-border-colors,
),
"border-width": (
css-var: true,
css-variable-name: border-width,
class: border,
values: $border-widths
values: $border-widths,
),
"border-opacity": (
css-var: true,
class: border-opacity,
values: (
10: .1,
25: .25,
50: .5,
75: .75,
100: 1
)
10: 0.1,
25: 0.25,
50: 0.5,
75: 0.75,
100: 1,
),
),
// scss-docs-end utils-borders
// Sizing utilities
// scss-docs-start utils-sizing
"width": (
"width":
(
property: width,
class: w,
values: (
@ -169,23 +184,29 @@ $utilities: map-merge(
50: 50%,
75: 75%,
100: 100%,
auto: auto
)
auto: auto,
),
),
"max-width": (
property: max-width,
class: mw,
values: (100: 100%)
values: (
100: 100%,
),
),
"viewport-width": (
property: width,
class: vw,
values: (100: 100vw)
values: (
100: 100vw,
),
),
"min-viewport-width": (
property: min-width,
class: min-vw,
values: (100: 100vw)
values: (
100: 100vw,
),
),
"height": (
property: height,
@ -195,37 +216,46 @@ $utilities: map-merge(
50: 50%,
75: 75%,
100: 100%,
auto: auto
)
auto: auto,
),
),
"max-height": (
property: max-height,
class: mh,
values: (100: 100%)
values: (
100: 100%,
),
),
"viewport-height": (
property: height,
class: vh,
values: (100: 100vh)
values: (
100: 100vh,
),
),
"min-viewport-height": (
property: min-height,
class: min-vh,
values: (100: 100vh)
values: (
100: 100vh,
),
),
// scss-docs-end utils-sizing
// Flex utilities
// scss-docs-start utils-flex
"flex": (
"flex":
(
responsive: true,
property: flex,
values: (fill: 1 1 auto)
values: (
fill: 1 1 auto,
),
),
"flex-direction": (
responsive: true,
property: flex-direction,
class: flex,
values: row column row-reverse column-reverse
values: row column row-reverse column-reverse,
),
"flex-grow": (
responsive: true,
@ -234,7 +264,7 @@ $utilities: map-merge(
values: (
grow-0: 0,
grow-1: 1,
)
),
),
"flex-shrink": (
responsive: true,
@ -243,13 +273,13 @@ $utilities: map-merge(
values: (
shrink-0: 0,
shrink-1: 1,
)
),
),
"flex-wrap": (
responsive: true,
property: flex-wrap,
class: flex,
values: wrap nowrap wrap-reverse
values: wrap nowrap wrap-reverse,
),
"justify-content": (
responsive: true,
@ -261,7 +291,7 @@ $utilities: map-merge(
between: space-between,
around: space-around,
evenly: space-evenly,
)
),
),
"align-items": (
responsive: true,
@ -272,7 +302,7 @@ $utilities: map-merge(
center: center,
baseline: baseline,
stretch: stretch,
)
),
),
"align-content": (
responsive: true,
@ -284,7 +314,7 @@ $utilities: map-merge(
between: space-between,
around: space-around,
stretch: stretch,
)
),
),
"align-self": (
responsive: true,
@ -296,7 +326,7 @@ $utilities: map-merge(
center: center,
baseline: baseline,
stretch: stretch,
)
),
),
"order": (
responsive: true,
@ -315,159 +345,208 @@ $utilities: map-merge(
// scss-docs-end utils-flex
// Margin utilities
// scss-docs-start utils-spacing
"margin": (
"margin":
(
responsive: true,
property: margin,
class: m,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-x": (
responsive: true,
property: margin-right margin-left,
class: mx,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-y": (
responsive: true,
property: margin-top margin-bottom,
class: my,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-top": (
responsive: true,
property: margin-top,
class: mt,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-end": (
responsive: true,
property: margin-right,
class: me,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-bottom": (
responsive: true,
property: margin-bottom,
class: mb,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
"margin-start": (
responsive: true,
property: margin-left,
class: ms,
values: map-merge($spacers, (auto: auto))
values:
map-merge(
$spacers,
(
auto: auto,
)
),
),
// Negative margin utilities
"negative-margin": (
"negative-margin":
(
responsive: true,
property: margin,
class: m,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-x": (
responsive: true,
property: margin-right margin-left,
class: mx,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-y": (
responsive: true,
property: margin-top margin-bottom,
class: my,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-top": (
responsive: true,
property: margin-top,
class: mt,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-end": (
responsive: true,
property: margin-right,
class: me,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-bottom": (
responsive: true,
property: margin-bottom,
class: mb,
values: $negative-spacers
values: $negative-spacers,
),
"negative-margin-start": (
responsive: true,
property: margin-left,
class: ms,
values: $negative-spacers
values: $negative-spacers,
),
// Padding utilities
"padding": (
"padding":
(
responsive: true,
property: padding,
class: p,
values: $spacers
values: $spacers,
),
"padding-x": (
responsive: true,
property: padding-right padding-left,
class: px,
values: $spacers
values: $spacers,
),
"padding-y": (
responsive: true,
property: padding-top padding-bottom,
class: py,
values: $spacers
values: $spacers,
),
"padding-top": (
responsive: true,
property: padding-top,
class: pt,
values: $spacers
values: $spacers,
),
"padding-end": (
responsive: true,
property: padding-right,
class: pe,
values: $spacers
values: $spacers,
),
"padding-bottom": (
responsive: true,
property: padding-bottom,
class: pb,
values: $spacers
values: $spacers,
),
"padding-start": (
responsive: true,
property: padding-left,
class: ps,
values: $spacers
values: $spacers,
),
// Gap utility
"gap": (
"gap":
(
responsive: true,
property: gap,
class: gap,
values: $spacers
values: $spacers,
),
// scss-docs-end utils-spacing
// Text
// scss-docs-start utils-text
"font-family": (
"font-family":
(
property: font-family,
class: font,
values: (monospace: var(--#{$prefix}font-monospace))
values: (
monospace: var(--#{$prefix}font-monospace),
),
),
"font-size": (
rfs: true,
property: font-size,
class: fs,
values: $font-sizes
values: $font-sizes,
),
"font-style": (
property: font-style,
class: fst,
values: italic normal
values: italic normal,
),
"font-weight": (
property: font-weight,
@ -478,8 +557,8 @@ $utilities: map-merge(
normal: $font-weight-normal,
bold: $font-weight-bold,
semibold: $font-weight-semibold,
bolder: $font-weight-bolder
)
bolder: $font-weight-bolder,
),
),
"line-height": (
property: line-height,
@ -489,7 +568,7 @@ $utilities: map-merge(
sm: $line-height-sm,
base: $line-height-base,
lg: $line-height-lg,
)
),
),
"text-align": (
responsive: true,
@ -499,16 +578,16 @@ $utilities: map-merge(
start: left,
end: right,
center: center,
)
),
),
"text-decoration": (
property: text-decoration,
values: none underline line-through
values: none underline line-through,
),
"text-transform": (
property: text-transform,
class: text,
values: lowercase uppercase capitalize
values: lowercase uppercase capitalize,
),
"white-space": (
property: white-space,
@ -516,78 +595,90 @@ $utilities: map-merge(
values: (
wrap: normal,
nowrap: nowrap,
)
),
),
"word-wrap": (
property: word-wrap word-break,
class: text,
values: (break: break-word),
rtl: false
values: (
break: break-word,
),
rtl: false,
),
// scss-docs-end utils-text
// scss-docs-start utils-color
"color": (
"color":
(
property: color,
class: text,
local-vars: (
"text-opacity": 1
"text-opacity": 1,
),
values: map-merge(
values:
map-merge(
$utilities-text-colors,
(
"muted": $text-muted,
"black-50": rgba($black, .5), // deprecated
"white-50": rgba($white, .5), // deprecated
"black-50": rgba($black, 0.5),
// deprecated
"white-50": rgba($white, 0.5),
// deprecated
"reset": inherit,
)
)
),
),
"text-opacity": (
css-var: true,
class: text-opacity,
values: (
25: .25,
50: .5,
75: .75,
100: 1
)
25: 0.25,
50: 0.5,
75: 0.75,
100: 1,
),
),
// scss-docs-end utils-color
// scss-docs-start utils-bg-color
"background-color": (
"background-color":
(
property: background-color,
class: bg,
local-vars: (
"bg-opacity": 1
"bg-opacity": 1,
),
values: map-merge(
values:
map-merge(
$utilities-bg-colors,
(
"transparent": transparent
)
"transparent": transparent,
)
),
),
"bg-opacity": (
css-var: true,
class: bg-opacity,
values: (
10: .1,
25: .25,
50: .5,
75: .75,
100: 1
)
10: 0.1,
25: 0.25,
50: 0.5,
75: 0.75,
100: 1,
),
),
// scss-docs-end utils-bg-color
"gradient": (
"gradient":
(
property: background-image,
class: bg,
values: (gradient: var(--#{$prefix}gradient))
values: (
gradient: var(--#{$prefix}gradient),
),
),
// scss-docs-start utils-interaction
"user-select": (
"user-select":
(
property: user-select,
values: all auto none
values: all auto none,
),
"pointer-events": (
property: pointer-events,
@ -596,7 +687,8 @@ $utilities: map-merge(
),
// scss-docs-end utils-interaction
// scss-docs-start utils-border-radius
"rounded": (
"rounded":
(
property: border-radius,
class: rounded,
values: (
@ -608,38 +700,47 @@ $utilities: map-merge(
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-2xl),
circle: 50%,
pill: var(--#{$prefix}border-radius-pill)
)
pill: var(--#{$prefix}border-radius-pill),
),
),
"rounded-top": (
property: border-top-left-radius border-top-right-radius,
class: rounded-top,
values: (null: var(--#{$prefix}border-radius))
values: (
null: var(--#{$prefix}border-radius),
),
),
"rounded-end": (
property: border-top-right-radius border-bottom-right-radius,
class: rounded-end,
values: (null: var(--#{$prefix}border-radius))
values: (
null: var(--#{$prefix}border-radius),
),
),
"rounded-bottom": (
property: border-bottom-right-radius border-bottom-left-radius,
class: rounded-bottom,
values: (null: var(--#{$prefix}border-radius))
values: (
null: var(--#{$prefix}border-radius),
),
),
"rounded-start": (
property: border-bottom-left-radius border-top-left-radius,
class: rounded-start,
values: (null: var(--#{$prefix}border-radius))
values: (
null: var(--#{$prefix}border-radius),
),
),
// scss-docs-end utils-border-radius
// scss-docs-start utils-visibility
"visibility": (
"visibility":
(
property: visibility,
class: null,
values: (
visible: visible,
invisible: hidden,
)
),
)
// scss-docs-end utils-visibility
),

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@ $utilities: map-get-multiple(
"padding-top",
"padding-end",
"padding-bottom",
"padding-start",
"padding-start"
)
);

View File

@ -29,7 +29,7 @@
.form-check-input {
width: $form-check-input-width;
height: $form-check-input-width;
margin-top: ($line-height-base - $form-check-input-width) * .5; // line-height minus check height
margin-top: ($line-height-base - $form-check-input-width) * 0.5; // line-height minus check height
vertical-align: top;
background-color: $form-check-input-bg;
background-repeat: no-repeat;
@ -65,7 +65,8 @@
&[type="checkbox"] {
@if $enable-gradients {
background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$prefix}gradient);
background-image: escape-svg($form-check-input-checked-bg-image),
var(--#{$prefix}gradient);
} @else {
background-image: escape-svg($form-check-input-checked-bg-image);
}
@ -73,7 +74,8 @@
&[type="radio"] {
@if $enable-gradients {
background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$prefix}gradient);
background-image: escape-svg($form-check-radio-checked-bg-image),
var(--#{$prefix}gradient);
} @else {
background-image: escape-svg($form-check-radio-checked-bg-image);
}
@ -85,7 +87,8 @@
border-color: $form-check-input-indeterminate-border-color;
@if $enable-gradients {
background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$prefix}gradient);
background-image: escape-svg($form-check-input-indeterminate-bg-image),
var(--#{$prefix}gradient);
} @else {
background-image: escape-svg($form-check-input-indeterminate-bg-image);
}
@ -136,7 +139,8 @@
background-position: $form-switch-checked-bg-position;
@if $enable-gradients {
background-image: escape-svg($form-switch-checked-bg-image), var(--#{$prefix}gradient);
background-image: escape-svg($form-switch-checked-bg-image),
var(--#{$prefix}gradient);
} @else {
background-image: escape-svg($form-switch-checked-bg-image);
}

View File

@ -49,7 +49,11 @@
// TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
&::-webkit-date-and-time-value {
// Multiply line-height by 1em if it has no unit
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
height: if(
unit($input-line-height) == "",
$input-line-height * 1em,
$input-line-height
);
}
// Placeholder
@ -178,12 +182,20 @@ textarea {
}
&::-moz-color-swatch {
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
height: if(
unit($input-line-height) == "",
$input-line-height * 1em,
$input-line-height
);
@include border-radius($input-border-radius);
}
&::-webkit-color-swatch {
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
height: if(
unit($input-line-height) == "",
$input-line-height * 1em,
$input-line-height
);
@include border-radius($input-border-radius);
}
}

View File

@ -6,7 +6,10 @@
.form-range {
width: 100%;
height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
height: add(
$form-range-thumb-height,
$form-range-thumb-focus-box-shadow-width * 2
);
padding: 0; // Need to reset padding
background-color: transparent;
appearance: none;
@ -16,8 +19,12 @@
// Pseudo-elements must be split across multiple rulesets to have an effect.
// No box-shadow() mixin for focus accessibility.
&::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
&::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
&::-webkit-slider-thumb {
box-shadow: $form-range-thumb-focus-box-shadow;
}
&::-moz-range-thumb {
box-shadow: $form-range-thumb-focus-box-shadow;
}
}
&::-moz-focus-outer {
@ -27,7 +34,7 @@
&::-webkit-slider-thumb {
width: $form-range-thumb-width;
height: $form-range-thumb-height;
margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
margin-top: ($form-range-track-height - $form-range-thumb-height) * 0.5; // Webkit specific
@include gradient-bg($form-range-thumb-bg);
border: $form-range-thumb-border;
@include border-radius($form-range-thumb-border-radius);

View File

@ -6,8 +6,12 @@
.form-select {
display: block;
width: 100%;
padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
-moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
padding: $form-select-padding-y $form-select-indicator-padding
$form-select-padding-y $form-select-padding-x;
-moz-padding-start: subtract(
$form-select-padding-x,
3px
); // See https://github.com/twbs/bootstrap/issues/32636
font-family: $form-select-font-family;
@include font-size($form-select-font-size);
font-weight: $form-select-font-weight;
@ -28,7 +32,10 @@
border-color: $form-select-focus-border-color;
outline: 0;
@if $enable-shadows {
@include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
@include box-shadow(
$form-select-box-shadow,
$form-select-focus-box-shadow
);
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $form-select-focus-box-shadow;

Some files were not shown because too many files have changed in this diff Show More