vaadin-lumo-stylespackage.mixins.loader.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-webcomponents Show documentation
Show all versions of vaadin-webcomponents Show documentation
Mvnpm composite: Vaadin webcomponents
The newest version!
/**
* @license
* Copyright (c) 2022 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import '../color.js';
import '../sizing.js';
import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
const loader = css`
[part~='loader'] {
box-sizing: border-box;
width: var(--lumo-icon-size-s);
height: var(--lumo-icon-size-s);
border: 2px solid transparent;
border-color: var(--lumo-primary-color-10pct) var(--lumo-primary-color-10pct) var(--lumo-primary-color)
var(--lumo-primary-color);
border-radius: calc(0.5 * var(--lumo-icon-size-s));
opacity: 0;
pointer-events: none;
}
:host(:not([loading])) [part~='loader'] {
display: none;
}
:host([loading]) [part~='loader'] {
animation:
1s linear infinite lumo-loader-rotate,
0.3s 0.1s lumo-loader-fade-in both;
}
@keyframes lumo-loader-fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes lumo-loader-rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
`;
export { loader };