purifier-card 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/styles.js DELETED
@@ -1,254 +0,0 @@
1
- import { css, unsafeCSS } from 'lit-element';
2
- import workingImg from './images/purifier-working.gif';
3
- import standbyImg from './images/purifier-standby.png';
4
-
5
- export default css`
6
- :host {
7
- display: flex;
8
- flex: 1;
9
- flex-direction: column;
10
- }
11
-
12
- ha-card {
13
- flex-direction: column;
14
- flex: 1;
15
- position: relative;
16
- padding: 0px;
17
- border-radius: 4px;
18
- overflow: hidden;
19
- }
20
-
21
- .fill-gap {
22
- flex-grow: 1;
23
- }
24
-
25
- .preview {
26
- background-color: var(--primary-color);
27
- overflow: hidden;
28
- position: relative;
29
- }
30
-
31
- .header {
32
- display: flex;
33
- justify-content: space-between;
34
- color: var(--text-primary-color);
35
- }
36
-
37
- .preset-mode ha-icon {
38
- display: inline-block;
39
- }
40
-
41
- .more-info {
42
- color: var(--text-primary-color);
43
- }
44
-
45
- .controls {
46
- display: flex;
47
- justify-content: center;
48
- }
49
-
50
- .slider {
51
- height: 100%;
52
- width: 100%;
53
- position: relative;
54
- max-width: 250px;
55
- min-width: 100px;
56
- }
57
-
58
- .slider-center {
59
- position: absolute;
60
- width: calc(100% - 90px);
61
- height: calc(100% - 10px);
62
- box-sizing: border-box;
63
- border-radius: 100%;
64
- left: 45px;
65
- top: 20px;
66
- text-align: center;
67
- overflow-wrap: break-word;
68
- pointer-events: none;
69
- }
70
-
71
- .slider-content {
72
- position: absolute;
73
- transform: translate(-50%, -50%);
74
- width: 100%;
75
- top: 50%;
76
- left: 50%;
77
- }
78
-
79
- .slider-value {
80
- position: absolute;
81
- bottom: 0;
82
- left: 0;
83
- width: 100%;
84
- transform: translateY(-50%);
85
- font-size: 16px;
86
- color: var(--text-primary-color);
87
- }
88
-
89
- .image {
90
- background: center / contain no-repeat;
91
- }
92
-
93
- .image.working {
94
- background-image: url(${unsafeCSS(workingImg)});
95
- }
96
-
97
- .image.standby {
98
- background-image: url(${unsafeCSS(standbyImg)});
99
- }
100
-
101
- .image.compact {
102
- background-image: none;
103
- height: auto;
104
- }
105
-
106
- .preview.not-available {
107
- filter: grayscale(1);
108
- }
109
-
110
- .number-off {
111
- opacity: 0.2;
112
- }
113
-
114
- .current-aqi {
115
- font-size: 48px;
116
- font-weight: bold;
117
- line-height: 48px;
118
- padding: 5px 10px;
119
- border-radius: 4px;
120
- background: rgba(0, 0, 0, 0.6);
121
- color: var(--text-primary-color);
122
- }
123
-
124
- .current-aqi sup {
125
- font-size: 16px;
126
- line-height: 16px;
127
- font-weight: normal;
128
- }
129
-
130
- .state {
131
- display: flex;
132
- align-items: center;
133
- justify-content: center;
134
- }
135
-
136
- .state-text {
137
- color: var(--text-primary-color);
138
- white-space: nowrap;
139
- text-overflow: ellipsis;
140
- overflow: hidden;
141
- margin-left: calc(20px + 9px); /* size + margin of spinner */
142
- }
143
-
144
- .state ha-circular-progress {
145
- --mdc-theme-primary: var(
146
- --card-background-color
147
- ); /* hack to override the color */
148
- min-width: 24px;
149
- width: 24px;
150
- height: 24px;
151
- margin-left: 9px;
152
- }
153
-
154
- .friendly-name {
155
- text-align: center;
156
- font-weight: bold;
157
- color: var(--text-primary-color);
158
- font-size: 16px;
159
- }
160
-
161
- .not-available {
162
- text-align: center;
163
- color: var(--text-primary-color);
164
- font-size: 16px;
165
- }
166
-
167
- .metadata {
168
- margin: 10px auto;
169
- }
170
-
171
- .stats {
172
- border-top: 1px solid rgba(255, 255, 255, 0.2);
173
- display: flex;
174
- flex-direction: row;
175
- justify-content: space-evenly;
176
- color: var(--text-primary-color);
177
- }
178
-
179
- .stats-block {
180
- margin: 10px 0px;
181
- text-align: center;
182
- border-right: 1px solid rgba(255, 255, 255, 0.2);
183
- flex-grow: 1;
184
- }
185
-
186
- .stats-block:last-child {
187
- border: 0px;
188
- }
189
-
190
- .stats-value {
191
- font-size: 20px;
192
- font-weight: bold;
193
- }
194
-
195
- ha-icon {
196
- display: flex;
197
- color: #fff;
198
- }
199
-
200
- .toolbar {
201
- background: var(--lovelace-background, var(--primary-background-color));
202
- min-height: 30px;
203
- display: flex;
204
- flex-direction: row;
205
- flex-flow: row wrap;
206
- flex-wrap: wrap;
207
- justify-content: space-evenly;
208
- }
209
-
210
- .toolbar ha-icon-button {
211
- color: var(--primary-color);
212
- flex-direction: column;
213
- width: 44px;
214
- height: 44px;
215
- --mdc-icon-button-size: 44px;
216
- margin: 5px 0;
217
- opacity: 0.5;
218
- }
219
-
220
- .toolbar ha-icon-button.active {
221
- opacity: 1;
222
- }
223
-
224
- .toolbar ha-icon-button:first-child {
225
- margin-left: 5px;
226
- }
227
-
228
- .toolbar ha-icon-button:last-child {
229
- margin-right: 5px;
230
- }
231
-
232
- .toolbar paper-button {
233
- color: var(--primary-color);
234
- flex-direction: column;
235
- margin-right: 10px;
236
- padding: 15px 10px;
237
- cursor: pointer;
238
- }
239
-
240
- .toolbar ha-icon-button:active,
241
- .toolbar paper-button:active {
242
- opacity: 0.4;
243
- background: rgba(0, 0, 0, 0.1);
244
- }
245
-
246
- .toolbar paper-button {
247
- color: var(--primary-color);
248
- flex-direction: row;
249
- }
250
-
251
- .toolbar ha-icon {
252
- color: var(--primary-color);
253
- }
254
- `;