UNPKG

1.49 kBJavaScriptView Raw
1import {
2 component_styles_default
3} from "./chunk.7IGWJVQF.js";
4import {
5 r
6} from "./chunk.WWAD5WF4.js";
7
8// src/components/progress-bar/progress-bar.styles.ts
9var progress_bar_styles_default = r`
10 ${component_styles_default}
11
12 :host {
13 --height: 1rem;
14 --track-color: var(--sl-color-neutral-200);
15 --indicator-color: var(--sl-color-primary-600);
16 --label-color: var(--sl-color-neutral-0);
17
18 display: block;
19 }
20
21 .progress-bar {
22 position: relative;
23 background-color: var(--track-color);
24 height: var(--height);
25 border-radius: var(--sl-border-radius-pill);
26 box-shadow: inset var(--sl-shadow-small);
27 overflow: hidden;
28 }
29
30 .progress-bar__indicator {
31 height: 100%;
32 font-family: var(--sl-font-sans);
33 font-size: 12px;
34 font-weight: var(--sl-font-weight-normal);
35 background-color: var(--indicator-color);
36 color: var(--label-color);
37 text-align: center;
38 line-height: var(--height);
39 white-space: nowrap;
40 overflow: hidden;
41 transition: 400ms width, 400ms background-color;
42 user-select: none;
43 }
44
45 /* Indeterminate */
46 .progress-bar--indeterminate .progress-bar__indicator {
47 position: absolute;
48 animation: indeterminate 2.5s infinite cubic-bezier(0.37, 0, 0.63, 1);
49 }
50
51 @keyframes indeterminate {
52 0% {
53 inset-inline-start: -50%;
54 width: 50%;
55 }
56 75%,
57 100% {
58 inset-inline-start: 100%;
59 width: 50%;
60 }
61 }
62`;
63
64export {
65 progress_bar_styles_default
66};