@adarsh.nishad/activityual-ui 0.0.0-stage → 0.2.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/README.md +210 -2
- package/dist/activity-card.d.ts +43 -0
- package/dist/activity-card.js +302 -0
- package/dist/button.d.ts +32 -0
- package/dist/button.js +184 -0
- package/dist/card.d.ts +16 -0
- package/dist/card.js +99 -0
- package/dist/chart-panel.d.ts +26 -0
- package/dist/chart-panel.js +247 -0
- package/dist/confirm-dialog.d.ts +35 -0
- package/dist/confirm-dialog.js +140 -0
- package/dist/empty-state.d.ts +25 -0
- package/dist/empty-state.js +95 -0
- package/dist/form-field.d.ts +40 -0
- package/dist/form-field.js +144 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/progress-ring.d.ts +23 -0
- package/dist/progress-ring.js +124 -0
- package/dist/recommendation-banner.d.ts +31 -0
- package/dist/recommendation-banner.js +192 -0
- package/dist/stat-card.d.ts +27 -0
- package/dist/stat-card.js +137 -0
- package/dist/status-pill.d.ts +16 -0
- package/dist/status-pill.js +96 -0
- package/dist/streak-badge.d.ts +19 -0
- package/dist/streak-badge.js +89 -0
- package/dist/tokens.d.ts +174 -0
- package/dist/tokens.js +125 -0
- package/package.json +38 -4
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualRecommendationBanner extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.activityTitle = '';
|
|
6
|
+
this.suggestedTime = '';
|
|
7
|
+
this.reason = '';
|
|
8
|
+
this.sampleSize = 0;
|
|
9
|
+
this.status = 'available';
|
|
10
|
+
this.generatedAt = '';
|
|
11
|
+
}
|
|
12
|
+
static { this.properties = {
|
|
13
|
+
activityTitle: { type: String },
|
|
14
|
+
suggestedTime: { type: String },
|
|
15
|
+
reason: { type: String },
|
|
16
|
+
sampleSize: { type: Number },
|
|
17
|
+
status: { type: String },
|
|
18
|
+
generatedAt: { type: String }
|
|
19
|
+
}; }
|
|
20
|
+
static { this.styles = css `
|
|
21
|
+
:host {
|
|
22
|
+
display: block;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.banner {
|
|
27
|
+
background: linear-gradient(145deg, rgba(42, 42, 42, 0.65) 0%, rgba(24, 24, 24, 0.8) 100%);
|
|
28
|
+
backdrop-filter: blur(20px);
|
|
29
|
+
-webkit-backdrop-filter: blur(20px);
|
|
30
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
31
|
+
border-left: 3px solid #ff4305;
|
|
32
|
+
border-radius: 16px;
|
|
33
|
+
padding: 1.25rem 1.5rem;
|
|
34
|
+
box-shadow:
|
|
35
|
+
0 10px 28px -4px rgba(0, 0, 0, 0.45),
|
|
36
|
+
0 0 16px rgba(255, 67, 5, 0.08);
|
|
37
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
38
|
+
position: relative;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.insufficient {
|
|
44
|
+
border-left: 3px solid #555555;
|
|
45
|
+
border-style: dashed;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.header {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
margin-bottom: 0.65rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.badge {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 0.4rem;
|
|
59
|
+
font-size: 10px;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
letter-spacing: 0.05em;
|
|
63
|
+
padding: 0.2rem 0.65rem;
|
|
64
|
+
border-radius: 9999px;
|
|
65
|
+
background: rgba(255, 67, 5, 0.12);
|
|
66
|
+
color: #ff4305;
|
|
67
|
+
border: 1px solid rgba(255, 67, 5, 0.25);
|
|
68
|
+
font-family: 'JetBrains Mono', monospace;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sample-tag {
|
|
72
|
+
font-size: 10.5px;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
background: rgba(255, 255, 255, 0.05);
|
|
75
|
+
color: #a5a5a5;
|
|
76
|
+
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
77
|
+
padding: 0.15rem 0.55rem;
|
|
78
|
+
border-radius: 9999px;
|
|
79
|
+
font-family: 'JetBrains Mono', monospace;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.title {
|
|
83
|
+
font-size: 15px;
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
letter-spacing: -0.015em;
|
|
86
|
+
color: #f5f5f5;
|
|
87
|
+
margin: 0 0 0.4rem 0;
|
|
88
|
+
line-height: 1.3;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.explanation {
|
|
92
|
+
font-size: 12.5px;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
color: #a5a5a5;
|
|
95
|
+
margin: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.time-pod {
|
|
99
|
+
margin-top: 0.85rem;
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 0.65rem;
|
|
103
|
+
padding: 0.4rem 0.85rem;
|
|
104
|
+
border-radius: 9999px;
|
|
105
|
+
background: #252525;
|
|
106
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
107
|
+
color: #ffffff;
|
|
108
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.time-label {
|
|
112
|
+
font-size: 10px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
text-transform: uppercase;
|
|
115
|
+
letter-spacing: 0.04em;
|
|
116
|
+
color: #ff4305;
|
|
117
|
+
font-family: 'JetBrains Mono', monospace;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.time-val {
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
font-weight: 700;
|
|
123
|
+
color: #ffffff;
|
|
124
|
+
font-family: 'JetBrains Mono', monospace;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.footer {
|
|
128
|
+
margin-top: 0.85rem;
|
|
129
|
+
font-size: 10.5px;
|
|
130
|
+
color: #707070;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: space-between;
|
|
134
|
+
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
|
135
|
+
padding-top: 0.65rem;
|
|
136
|
+
font-family: 'JetBrains Mono', monospace;
|
|
137
|
+
}
|
|
138
|
+
`; }
|
|
139
|
+
render() {
|
|
140
|
+
if (this.status === 'insufficient_history') {
|
|
141
|
+
return html `
|
|
142
|
+
<div class="banner insufficient">
|
|
143
|
+
<div class="header">
|
|
144
|
+
<span class="badge" style="background: rgba(255,255,255,0.06); color: #a5a5a5; border-color: rgba(255,255,255,0.1);">
|
|
145
|
+
Gathering Data
|
|
146
|
+
</span>
|
|
147
|
+
<span class="sample-tag">${this.sampleSize} / 5 records</span>
|
|
148
|
+
</div>
|
|
149
|
+
<h3 class="title">Personalized Rhythm Learning</h3>
|
|
150
|
+
<p class="explanation">
|
|
151
|
+
Activityual needs at least 5 records of <strong>${this.activityTitle}</strong>
|
|
152
|
+
before computing personalized circadian timing recommendations. Keep tracking!
|
|
153
|
+
</p>
|
|
154
|
+
</div>
|
|
155
|
+
`;
|
|
156
|
+
}
|
|
157
|
+
return html `
|
|
158
|
+
<div class="banner">
|
|
159
|
+
<div class="header">
|
|
160
|
+
<span class="badge">Optimization Suggestion</span>
|
|
161
|
+
${this.sampleSize > 0
|
|
162
|
+
? html `<span class="sample-tag">${this.sampleSize} data points evaluated</span>`
|
|
163
|
+
: ''}
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<h3 class="title">Shift "${this.activityTitle}" schedule</h3>
|
|
167
|
+
<p class="explanation">${this.reason}</p>
|
|
168
|
+
|
|
169
|
+
${this.suggestedTime
|
|
170
|
+
? html `
|
|
171
|
+
<div class="time-pod">
|
|
172
|
+
<span class="time-label">Recommended Time</span>
|
|
173
|
+
<span class="time-val">${this.suggestedTime}</span>
|
|
174
|
+
</div>
|
|
175
|
+
`
|
|
176
|
+
: ''}
|
|
177
|
+
|
|
178
|
+
${this.generatedAt
|
|
179
|
+
? html `
|
|
180
|
+
<div class="footer">
|
|
181
|
+
<span>Model: Activityual Circadian v2</span>
|
|
182
|
+
<span>Updated: ${new Date(this.generatedAt).toLocaleDateString()}</span>
|
|
183
|
+
</div>
|
|
184
|
+
`
|
|
185
|
+
: ''}
|
|
186
|
+
</div>
|
|
187
|
+
`;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (!customElements.get('activityual-recommendation-banner')) {
|
|
191
|
+
customElements.define('activityual-recommendation-banner', ActivityualRecommendationBanner);
|
|
192
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ActivityualStatCard extends LitElement {
|
|
3
|
+
static properties: {
|
|
4
|
+
title: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
value: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
subtitle: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
delta: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
deltaType: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
title: string;
|
|
21
|
+
value: string;
|
|
22
|
+
subtitle: string;
|
|
23
|
+
delta: string;
|
|
24
|
+
deltaType: 'positive' | 'negative' | 'neutral';
|
|
25
|
+
static styles: import("lit").CSSResult;
|
|
26
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualStatCard extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.title = '';
|
|
6
|
+
this.value = '0';
|
|
7
|
+
this.subtitle = '';
|
|
8
|
+
this.delta = '';
|
|
9
|
+
this.deltaType = 'neutral';
|
|
10
|
+
}
|
|
11
|
+
static { this.properties = {
|
|
12
|
+
title: { type: String },
|
|
13
|
+
value: { type: String },
|
|
14
|
+
subtitle: { type: String },
|
|
15
|
+
delta: { type: String },
|
|
16
|
+
deltaType: { type: String }
|
|
17
|
+
}; }
|
|
18
|
+
static { this.styles = css `
|
|
19
|
+
:host {
|
|
20
|
+
display: block;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.stat-card {
|
|
25
|
+
background: linear-gradient(145deg, rgba(42, 42, 42, 0.65) 0%, rgba(24, 24, 24, 0.8) 100%);
|
|
26
|
+
backdrop-filter: blur(20px);
|
|
27
|
+
-webkit-backdrop-filter: blur(20px);
|
|
28
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
29
|
+
border-radius: 16px;
|
|
30
|
+
padding: 1.15rem 1.35rem;
|
|
31
|
+
box-shadow:
|
|
32
|
+
0 10px 28px -4px rgba(0, 0, 0, 0.45),
|
|
33
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
34
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 0.45rem;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
transition: all 0.2s ease;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.stat-card:hover {
|
|
43
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
44
|
+
background: linear-gradient(145deg, rgba(48, 48, 48, 0.75) 0%, rgba(28, 28, 28, 0.88) 100%);
|
|
45
|
+
transform: translateY(-1px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.header {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.title {
|
|
55
|
+
font-size: 11px;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
text-transform: uppercase;
|
|
58
|
+
letter-spacing: 0.05em;
|
|
59
|
+
color: #a5a5a5;
|
|
60
|
+
font-family: 'JetBrains Mono', monospace;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.value-row {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: baseline;
|
|
66
|
+
gap: 0.65rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.value {
|
|
70
|
+
font-size: 28px;
|
|
71
|
+
font-weight: 700;
|
|
72
|
+
letter-spacing: -0.03em;
|
|
73
|
+
color: #f5f5f5;
|
|
74
|
+
line-height: 1.1;
|
|
75
|
+
font-family: 'JetBrains Mono', monospace;
|
|
76
|
+
font-variant-numeric: tabular-nums;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.delta-pill {
|
|
80
|
+
font-size: 10.5px;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
padding: 0.2rem 0.55rem;
|
|
83
|
+
border-radius: 9999px;
|
|
84
|
+
line-height: 1;
|
|
85
|
+
font-family: 'JetBrains Mono', monospace;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.delta-positive {
|
|
89
|
+
background: rgba(37, 211, 102, 0.12);
|
|
90
|
+
color: #25d366;
|
|
91
|
+
border: 1px solid rgba(37, 211, 102, 0.25);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.delta-negative {
|
|
95
|
+
background: rgba(255, 52, 52, 0.12);
|
|
96
|
+
color: #ff3434;
|
|
97
|
+
border: 1px solid rgba(255, 52, 52, 0.25);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.delta-neutral {
|
|
101
|
+
background: rgba(255, 255, 255, 0.06);
|
|
102
|
+
color: #a5a5a5;
|
|
103
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.subtitle {
|
|
107
|
+
font-size: 11.5px;
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
color: #707070;
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
112
|
+
`; }
|
|
113
|
+
render() {
|
|
114
|
+
return html `
|
|
115
|
+
<div class="stat-card">
|
|
116
|
+
<div class="header">
|
|
117
|
+
<span class="title">${this.title}</span>
|
|
118
|
+
<slot name="icon"></slot>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="value-row">
|
|
121
|
+
<span class="value">${this.value}</span>
|
|
122
|
+
${this.delta
|
|
123
|
+
? html `
|
|
124
|
+
<span class="delta-pill delta-${this.deltaType}">
|
|
125
|
+
${this.delta}
|
|
126
|
+
</span>
|
|
127
|
+
`
|
|
128
|
+
: ''}
|
|
129
|
+
</div>
|
|
130
|
+
${this.subtitle ? html `<p class="subtitle">${this.subtitle}</p>` : ''}
|
|
131
|
+
</div>
|
|
132
|
+
`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (!customElements.get('activityual-stat-card')) {
|
|
136
|
+
customElements.define('activityual-stat-card', ActivityualStatCard);
|
|
137
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type OccurrenceStatus = 'done' | 'missed' | 'pending';
|
|
3
|
+
export declare class ActivityualStatusPill extends LitElement {
|
|
4
|
+
static properties: {
|
|
5
|
+
status: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
status: OccurrenceStatus;
|
|
13
|
+
size: 'sm' | 'md';
|
|
14
|
+
static styles: import("lit").CSSResult;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualStatusPill extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.status = 'pending';
|
|
6
|
+
this.size = 'md';
|
|
7
|
+
}
|
|
8
|
+
static { this.properties = {
|
|
9
|
+
status: { type: String },
|
|
10
|
+
size: { type: String }
|
|
11
|
+
}; }
|
|
12
|
+
static { this.styles = css `
|
|
13
|
+
:host {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pill {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 0.35rem;
|
|
22
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
text-transform: uppercase;
|
|
25
|
+
letter-spacing: 0.04em;
|
|
26
|
+
border-radius: 9999px;
|
|
27
|
+
user-select: none;
|
|
28
|
+
transition: all 0.2s ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sm {
|
|
32
|
+
height: 22px;
|
|
33
|
+
padding: 0 8px;
|
|
34
|
+
font-size: 9.5px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.md {
|
|
38
|
+
height: 26px;
|
|
39
|
+
padding: 0 10px;
|
|
40
|
+
font-size: 10.5px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* DONE: Vaulto Financial Positive Emerald */
|
|
44
|
+
.done {
|
|
45
|
+
background: rgba(37, 211, 102, 0.12);
|
|
46
|
+
color: #25d366;
|
|
47
|
+
border: 1px solid rgba(37, 211, 102, 0.25);
|
|
48
|
+
box-shadow: 0 0 8px rgba(37, 211, 102, 0.15);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* MISSED: Vaulto Financial Negative Red */
|
|
52
|
+
.missed {
|
|
53
|
+
background: rgba(255, 52, 52, 0.12);
|
|
54
|
+
color: #ff3434;
|
|
55
|
+
border: 1px solid rgba(255, 52, 52, 0.25);
|
|
56
|
+
box-shadow: 0 0 8px rgba(255, 52, 52, 0.15);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* PENDING: Warm Amber */
|
|
60
|
+
.pending {
|
|
61
|
+
background: rgba(245, 158, 11, 0.12);
|
|
62
|
+
color: #f59e0b;
|
|
63
|
+
border: 1px solid rgba(245, 158, 11, 0.2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.icon {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
font-size: 11px;
|
|
71
|
+
line-height: 1;
|
|
72
|
+
font-weight: 800;
|
|
73
|
+
}
|
|
74
|
+
`; }
|
|
75
|
+
render() {
|
|
76
|
+
let iconMarkup = html `<span class="icon" aria-hidden="true">○</span>`;
|
|
77
|
+
let label = 'PENDING';
|
|
78
|
+
if (this.status === 'done') {
|
|
79
|
+
iconMarkup = html `<span class="icon" aria-hidden="true">✓</span>`;
|
|
80
|
+
label = 'DONE';
|
|
81
|
+
}
|
|
82
|
+
else if (this.status === 'missed') {
|
|
83
|
+
iconMarkup = html `<span class="icon" aria-hidden="true">✕</span>`;
|
|
84
|
+
label = 'MISSED';
|
|
85
|
+
}
|
|
86
|
+
return html `
|
|
87
|
+
<span class="pill ${this.status} ${this.size}" role="status" aria-label="Status: ${label}">
|
|
88
|
+
${iconMarkup}
|
|
89
|
+
<span>${label}</span>
|
|
90
|
+
</span>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (!customElements.get('activityual-status-pill')) {
|
|
95
|
+
customElements.define('activityual-status-pill', ActivityualStatusPill);
|
|
96
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ActivityualStreakBadge extends LitElement {
|
|
3
|
+
static properties: {
|
|
4
|
+
count: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
};
|
|
7
|
+
label: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
highlight: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
count: number;
|
|
15
|
+
label: string;
|
|
16
|
+
highlight: boolean;
|
|
17
|
+
static styles: import("lit").CSSResult;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualStreakBadge extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.count = 0;
|
|
6
|
+
this.label = 'Days';
|
|
7
|
+
this.highlight = false;
|
|
8
|
+
}
|
|
9
|
+
static { this.properties = {
|
|
10
|
+
count: { type: Number },
|
|
11
|
+
label: { type: String },
|
|
12
|
+
highlight: { type: Boolean }
|
|
13
|
+
}; }
|
|
14
|
+
static { this.styles = css `
|
|
15
|
+
:host {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.badge {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 0.6rem;
|
|
24
|
+
padding: 0.45rem 0.8rem;
|
|
25
|
+
border-radius: 12px;
|
|
26
|
+
background: linear-gradient(145deg, rgba(42, 42, 42, 0.65) 0%, rgba(24, 24, 24, 0.8) 100%);
|
|
27
|
+
backdrop-filter: blur(16px);
|
|
28
|
+
-webkit-backdrop-filter: blur(16px);
|
|
29
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
30
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
|
|
31
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
32
|
+
user-select: none;
|
|
33
|
+
transition: all 0.2s ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.icon-frame {
|
|
37
|
+
width: 28px;
|
|
38
|
+
height: 28px;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
background: rgba(255, 67, 5, 0.12);
|
|
41
|
+
border: 1px solid rgba(255, 67, 5, 0.25);
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
color: #ff4305;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
box-shadow: 0 0 10px rgba(255, 67, 5, 0.2);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.text-group {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.count {
|
|
56
|
+
font-size: 13px;
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
color: #f5f5f5;
|
|
59
|
+
line-height: 1;
|
|
60
|
+
font-variant-numeric: tabular-nums;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.label {
|
|
64
|
+
font-size: 10px;
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
color: #a5a5a5;
|
|
67
|
+
margin-top: 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.highlight {
|
|
71
|
+
border-color: rgba(255, 67, 5, 0.35);
|
|
72
|
+
box-shadow: 0 0 14px rgba(255, 67, 5, 0.2);
|
|
73
|
+
}
|
|
74
|
+
`; }
|
|
75
|
+
render() {
|
|
76
|
+
return html `
|
|
77
|
+
<div class="badge ${this.highlight ? 'highlight' : ''}" role="status" aria-label="${this.count} ${this.label} Streak">
|
|
78
|
+
<div class="icon-frame" aria-hidden="true">🔥</div>
|
|
79
|
+
<div class="text-group">
|
|
80
|
+
<span class="count">${this.count} ${this.label}</span>
|
|
81
|
+
<span class="label">Active Flow Streak</span>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (!customElements.get('activityual-streak-badge')) {
|
|
88
|
+
customElements.define('activityual-streak-badge', ActivityualStreakBadge);
|
|
89
|
+
}
|