Skip to content

Commit ac4d436

Browse files
committed
reverted looks. now uses primary color as default
1 parent fc89109 commit ac4d436

File tree

2 files changed

+3
-66
lines changed

2 files changed

+3
-66
lines changed

packages/uui-loader-bar/lib/uui-loader-bar.element.ts

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { css, html, LitElement } from 'lit';
22
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
33
import { property } from 'lit/decorators.js';
4-
import {
5-
InterfaceLookDefaultValue,
6-
InterfaceLookType,
7-
} from '@umbraco-ui/uui-base/lib/types';
84

95
const clamp = (num: number, min: number, max: number) =>
106
Math.min(Math.max(num, min), max);
@@ -23,6 +19,7 @@ export class UUILoaderBarElement extends LitElement {
2319
width: 100%;
2420
height: 4px;
2521
overflow: hidden;
22+
color: var(--uui-color-primary);
2623
}
2724
2825
#bar,
@@ -74,58 +71,11 @@ export class UUILoaderBarElement extends LitElement {
7471
transform-origin: 175% 0%;
7572
}
7673
}
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-
}
11674
`,
11775
];
11876

11977
private _progress = 0;
12078

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-
12979
/**
13080
* 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
13181
* @type {number}

packages/uui-loader-bar/lib/uui-loader-bar.story.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@ export default {
1212
progress: 0,
1313
},
1414
argTypes: {
15-
look: {
16-
options: [
17-
'',
18-
'primary',
19-
'secondary',
20-
'outline',
21-
'placeholder',
22-
'positive',
23-
'warning',
24-
'danger',
25-
],
26-
control: { type: 'select' },
27-
},
2815
progress: { control: { type: 'range', min: 0, max: 100, step: 1 } },
2916
animationDuration: {
3017
control: { type: 'number', min: 0, max: 100 },
@@ -40,12 +27,12 @@ const Template: Story = props =>
4027
<uui-loader-bar
4128
progress=${props.progress}
4229
animationDuration=${props.animationDuration}
43-
.look=${props.look}></uui-loader-bar>
30+
style=${props.color ? 'color: ' + props.color : ''}></uui-loader-bar>
4431
`;
4532

4633
export const AAAOverview = Template.bind({});
4734
AAAOverview.storyName = 'Overview';
48-
AAAOverview.args = { color: 'black' };
35+
AAAOverview.args = { color: '' };
4936
AAAOverview.argTypes = {
5037
color: { table: { category: 'inline styling' } },
5138
};

0 commit comments

Comments
 (0)