1
1
import { css , html , LitElement } from 'lit' ;
2
2
import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
3
3
import { property } from 'lit/decorators.js' ;
4
- import {
5
- InterfaceLookDefaultValue ,
6
- InterfaceLookType ,
7
- } from '@umbraco-ui/uui-base/lib/types' ;
8
4
9
5
const clamp = ( num : number , min : number , max : number ) =>
10
6
Math . min ( Math . max ( num , min ) , max ) ;
@@ -23,6 +19,7 @@ export class UUILoaderBarElement extends LitElement {
23
19
width: 100%;
24
20
height: 4px;
25
21
overflow: hidden;
22
+ color: var(--uui-color-primary);
26
23
}
27
24
28
25
#bar,
@@ -74,58 +71,11 @@ export class UUILoaderBarElement extends LitElement {
74
71
transform-origin: 175% 0%;
75
72
}
76
73
}
77
-
78
- /* Looks */
79
- :host([look='primary']) {
80
- color: var(--uui-look-primary-surface);
81
- }
82
- :host([look='secondary']) {
83
- color: var(--uui-look-secondary-contrast);
84
- }
85
- :host([look='secondary']) #bar-background,
86
- :host([look='secondary']) #bar {
87
- background: var(--uui-look-secondary-surface);
88
- }
89
-
90
- :host([look='outline']) {
91
- color: var(--uui-look-outline-contrast);
92
- outline: 1px solid var(--uui-look-outline-border);
93
- }
94
- :host([look='outline']) #bar-background {
95
- opacity: 0;
96
- }
97
-
98
- :host([look='placeholder']) {
99
- color: var(--uui-look-placeholder-surface);
100
- color: var(--uui-look-outline-contrast);
101
- outline: 1px dashed var(--uui-look-outline-border);
102
- }
103
- :host([look='placeholder']) #bar-background {
104
- opacity: 0;
105
- }
106
-
107
- :host([look='positive']) {
108
- color: var(--uui-look-positive-surface);
109
- }
110
- :host([look='warning']) {
111
- color: var(--uui-look-warning-surface);
112
- }
113
- :host([look='danger']) {
114
- color: var(--uui-look-danger-surface);
115
- }
116
74
` ,
117
75
] ;
118
76
119
77
private _progress = 0 ;
120
78
121
- /**
122
- * Defines the look of the tag.
123
- * @type {string }
124
- * @attr
125
- */
126
- @property ( { type : String , reflect : true } )
127
- public look : InterfaceLookType = InterfaceLookDefaultValue ;
128
-
129
79
/**
130
80
* Set this to a number between 0 and 100 to reflect the progress of some operation. When the value is left at 0 loader will looped animation
131
81
* @type {number }
0 commit comments