@adarsh.nishad/activityual-ui 0.0.0-stage → 0.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/README.md +105 -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 +35 -4
package/dist/card.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualCard extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.variant = 'default';
|
|
6
|
+
this.padding = 'md';
|
|
7
|
+
}
|
|
8
|
+
static { this.properties = {
|
|
9
|
+
variant: { type: String },
|
|
10
|
+
padding: { type: String }
|
|
11
|
+
}; }
|
|
12
|
+
static { this.styles = css `
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.card {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
border-radius: 1rem;
|
|
21
|
+
position: relative;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
24
|
+
color: #f5f5f5;
|
|
25
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Padding options */
|
|
29
|
+
.pad-none {
|
|
30
|
+
padding: 0;
|
|
31
|
+
}
|
|
32
|
+
.pad-sm {
|
|
33
|
+
padding: 1rem;
|
|
34
|
+
}
|
|
35
|
+
.pad-md {
|
|
36
|
+
padding: 1.25rem 1.5rem;
|
|
37
|
+
}
|
|
38
|
+
.pad-lg {
|
|
39
|
+
padding: 1.75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Vaulto Obsidian Glass Card */
|
|
43
|
+
.default {
|
|
44
|
+
background: linear-gradient(145deg, rgba(42, 42, 42, 0.65) 0%, rgba(24, 24, 24, 0.8) 100%);
|
|
45
|
+
backdrop-filter: blur(20px);
|
|
46
|
+
-webkit-backdrop-filter: blur(20px);
|
|
47
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
48
|
+
box-shadow:
|
|
49
|
+
0 10px 28px -4px rgba(0, 0, 0, 0.45),
|
|
50
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.default:hover {
|
|
54
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
55
|
+
background: linear-gradient(145deg, rgba(48, 48, 48, 0.75) 0%, rgba(28, 28, 28, 0.88) 100%);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Signature Accent Card (Vaulto Subtle Obsidian Orange Sheen) */
|
|
59
|
+
.amber {
|
|
60
|
+
background: linear-gradient(145deg, rgba(45, 30, 24, 0.7) 0%, rgba(24, 20, 18, 0.85) 100%);
|
|
61
|
+
color: #ffffff;
|
|
62
|
+
border: 1px solid rgba(255, 67, 5, 0.3);
|
|
63
|
+
box-shadow:
|
|
64
|
+
0 10px 28px -4px rgba(0, 0, 0, 0.5),
|
|
65
|
+
inset 0 1px 0 rgba(255, 67, 5, 0.25),
|
|
66
|
+
0 0 20px rgba(255, 67, 5, 0.1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Inset well */
|
|
70
|
+
.inset {
|
|
71
|
+
background: #121212;
|
|
72
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
73
|
+
border-radius: 9999px;
|
|
74
|
+
box-shadow:
|
|
75
|
+
inset 0 2px 4px rgba(0, 0, 0, 0.5),
|
|
76
|
+
0 1px 1px rgba(255, 255, 255, 0.02);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Shell enclosure */
|
|
80
|
+
.shell {
|
|
81
|
+
background: rgba(8, 8, 8, 0.98);
|
|
82
|
+
backdrop-filter: blur(32px);
|
|
83
|
+
-webkit-backdrop-filter: blur(32px);
|
|
84
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
85
|
+
border-radius: 1.25rem;
|
|
86
|
+
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
|
|
87
|
+
}
|
|
88
|
+
`; }
|
|
89
|
+
render() {
|
|
90
|
+
return html `
|
|
91
|
+
<div class="card ${this.variant} pad-${this.padding}">
|
|
92
|
+
<slot></slot>
|
|
93
|
+
</div>
|
|
94
|
+
`;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (!customElements.get('activityual-card')) {
|
|
98
|
+
customElements.define('activityual-card', ActivityualCard);
|
|
99
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export interface ChartBarData {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
target?: number;
|
|
6
|
+
highlight?: boolean;
|
|
7
|
+
status?: 'done' | 'missed' | 'pending';
|
|
8
|
+
}
|
|
9
|
+
export declare class ActivityualChartPanel extends LitElement {
|
|
10
|
+
static properties: {
|
|
11
|
+
title: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
subtitle: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
};
|
|
17
|
+
data: {
|
|
18
|
+
type: ArrayConstructor;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
title: string;
|
|
22
|
+
subtitle: string;
|
|
23
|
+
data: ChartBarData[];
|
|
24
|
+
static styles: import("lit").CSSResult;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualChartPanel extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.title = 'Weekly Consistency & Rhythm';
|
|
6
|
+
this.subtitle = 'Daily completions mapped against target baseline';
|
|
7
|
+
this.data = [];
|
|
8
|
+
}
|
|
9
|
+
static { this.properties = {
|
|
10
|
+
title: { type: String },
|
|
11
|
+
subtitle: { type: String },
|
|
12
|
+
data: { type: Array }
|
|
13
|
+
}; }
|
|
14
|
+
static { this.styles = css `
|
|
15
|
+
:host {
|
|
16
|
+
display: block;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.panel {
|
|
21
|
+
background: linear-gradient(145deg, rgba(42, 42, 42, 0.65) 0%, rgba(24, 24, 24, 0.8) 100%);
|
|
22
|
+
backdrop-filter: blur(20px);
|
|
23
|
+
-webkit-backdrop-filter: blur(20px);
|
|
24
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
25
|
+
border-radius: 16px;
|
|
26
|
+
padding: 1.25rem 1.5rem;
|
|
27
|
+
box-shadow:
|
|
28
|
+
0 10px 28px -4px rgba(0, 0, 0, 0.45),
|
|
29
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
30
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.header {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
margin-bottom: 1.25rem;
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.title {
|
|
44
|
+
font-size: 15px;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
color: #f5f5f5;
|
|
47
|
+
margin: 0;
|
|
48
|
+
letter-spacing: -0.01em;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.subtitle {
|
|
52
|
+
font-size: 11.5px;
|
|
53
|
+
color: #707070;
|
|
54
|
+
margin-top: 2px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.chart-stage {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: flex-end;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
height: 150px;
|
|
62
|
+
padding: 0 0.5rem;
|
|
63
|
+
gap: 0.75rem;
|
|
64
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
65
|
+
padding-bottom: 0.5rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bar-col {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
align-items: center;
|
|
72
|
+
flex: 1;
|
|
73
|
+
height: 100%;
|
|
74
|
+
justify-content: flex-end;
|
|
75
|
+
gap: 0.5rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.bar-stem {
|
|
79
|
+
width: 100%;
|
|
80
|
+
max-width: 34px;
|
|
81
|
+
background: rgba(255, 255, 255, 0.03);
|
|
82
|
+
border-radius: 9999px;
|
|
83
|
+
position: relative;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: flex-start;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
padding-top: 6px;
|
|
88
|
+
transition: all 0.3s ease;
|
|
89
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
90
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.bar-stem:hover {
|
|
94
|
+
transform: scaleY(1.02);
|
|
95
|
+
border-color: rgba(255, 67, 5, 0.3);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.bar-fill {
|
|
99
|
+
position: absolute;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
left: 0;
|
|
102
|
+
right: 0;
|
|
103
|
+
border-radius: 9999px;
|
|
104
|
+
background: #333333;
|
|
105
|
+
transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Active day highlight in Vaulto red/orange gradient */
|
|
109
|
+
.highlight-col .bar-fill {
|
|
110
|
+
background: linear-gradient(180deg, #ff4305 0%, #ff3434 100%);
|
|
111
|
+
box-shadow: 0 0 14px rgba(255, 67, 5, 0.35);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bar-fill.done {
|
|
115
|
+
background: linear-gradient(180deg, #25d366 0%, #1ea852 100%);
|
|
116
|
+
box-shadow: 0 0 10px rgba(37, 211, 102, 0.3);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.bar-fill.missed {
|
|
120
|
+
background: linear-gradient(180deg, #ff3434 0%, #d32f2f 100%);
|
|
121
|
+
box-shadow: 0 0 10px rgba(255, 52, 52, 0.3);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.bar-val {
|
|
125
|
+
position: relative;
|
|
126
|
+
z-index: 10;
|
|
127
|
+
font-size: 10px;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
color: #f5f5f5;
|
|
130
|
+
line-height: 1;
|
|
131
|
+
font-family: 'JetBrains Mono', monospace;
|
|
132
|
+
font-variant-numeric: tabular-nums;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.bar-label {
|
|
136
|
+
font-size: 11px;
|
|
137
|
+
font-weight: 500;
|
|
138
|
+
color: #707070;
|
|
139
|
+
font-family: 'JetBrains Mono', monospace;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.highlight-col .bar-label {
|
|
143
|
+
color: #f5f5f5;
|
|
144
|
+
font-weight: 700;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.highlight-col .bar-stem {
|
|
148
|
+
border-color: rgba(255, 67, 5, 0.35);
|
|
149
|
+
box-shadow: 0 0 14px rgba(255, 67, 5, 0.2);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.footer {
|
|
153
|
+
margin-top: 0.85rem;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
font-size: 11px;
|
|
158
|
+
color: #707070;
|
|
159
|
+
font-family: 'JetBrains Mono', monospace;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.legend {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
gap: 1rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.legend-item {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 0.35rem;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.legend-dot {
|
|
175
|
+
width: 7px;
|
|
176
|
+
height: 7px;
|
|
177
|
+
border-radius: 50%;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.dot-actual {
|
|
181
|
+
background: #ff4305;
|
|
182
|
+
box-shadow: 0 0 6px rgba(255, 67, 5, 0.5);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.dot-benchmark {
|
|
186
|
+
background: rgba(255, 255, 255, 0.2);
|
|
187
|
+
}
|
|
188
|
+
`; }
|
|
189
|
+
render() {
|
|
190
|
+
// Default weekly mockup data if none passed
|
|
191
|
+
const displayData = this.data.length > 0 ? this.data : [
|
|
192
|
+
{ label: 'Sun', value: 45, status: 'done' },
|
|
193
|
+
{ label: 'Mon', value: 70, status: 'done' },
|
|
194
|
+
{ label: 'Tue', value: 60, status: 'done' },
|
|
195
|
+
{ label: 'Wed', value: 92, highlight: true, status: 'done' },
|
|
196
|
+
{ label: 'Thu', value: 55, status: 'pending' },
|
|
197
|
+
{ label: 'Fri', value: 75, status: 'done' },
|
|
198
|
+
{ label: 'Sat', value: 65, status: 'done' }
|
|
199
|
+
];
|
|
200
|
+
return html `
|
|
201
|
+
<div class="panel">
|
|
202
|
+
<div class="header">
|
|
203
|
+
<div>
|
|
204
|
+
<h3 class="title">${this.title}</h3>
|
|
205
|
+
${this.subtitle ? html `<p class="subtitle">${this.subtitle}</p>` : ''}
|
|
206
|
+
</div>
|
|
207
|
+
<slot name="action"></slot>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<div class="chart-stage" role="img" aria-label="${this.title}">
|
|
211
|
+
${displayData.map((bar) => {
|
|
212
|
+
const heightPct = Math.min(Math.max(bar.value, 0), 100);
|
|
213
|
+
return html `
|
|
214
|
+
<div class="bar-col ${bar.highlight ? 'highlight-col' : ''}">
|
|
215
|
+
<div class="bar-stem" style="height: 100%;">
|
|
216
|
+
<div
|
|
217
|
+
class="bar-fill ${bar.status || ''}"
|
|
218
|
+
style="height: ${heightPct}%;"
|
|
219
|
+
></div>
|
|
220
|
+
<span class="bar-val">${bar.value}%</span>
|
|
221
|
+
</div>
|
|
222
|
+
<span class="bar-label">${bar.label}</span>
|
|
223
|
+
</div>
|
|
224
|
+
`;
|
|
225
|
+
})}
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<div class="footer">
|
|
229
|
+
<div class="legend">
|
|
230
|
+
<span class="legend-item">
|
|
231
|
+
<span class="legend-dot dot-actual"></span>
|
|
232
|
+
<span>Peak Flow</span>
|
|
233
|
+
</span>
|
|
234
|
+
<span class="legend-item">
|
|
235
|
+
<span class="legend-dot dot-benchmark"></span>
|
|
236
|
+
<span>Target Rhythm</span>
|
|
237
|
+
</span>
|
|
238
|
+
</div>
|
|
239
|
+
<span>Baseline: 80% Target</span>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
`;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (!customElements.get('activityual-chart-panel')) {
|
|
246
|
+
customElements.define('activityual-chart-panel', ActivityualChartPanel);
|
|
247
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import './button.js';
|
|
3
|
+
export declare class ActivityualConfirmDialog extends LitElement {
|
|
4
|
+
static properties: {
|
|
5
|
+
open: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
reflect: boolean;
|
|
8
|
+
};
|
|
9
|
+
title: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
message: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
confirmText: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
cancelText: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
danger: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
open: boolean;
|
|
26
|
+
title: string;
|
|
27
|
+
message: string;
|
|
28
|
+
confirmText: string;
|
|
29
|
+
cancelText: string;
|
|
30
|
+
danger: boolean;
|
|
31
|
+
static styles: import("lit").CSSResult;
|
|
32
|
+
handleConfirm(): void;
|
|
33
|
+
handleCancel(): void;
|
|
34
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
import './button.js';
|
|
3
|
+
export class ActivityualConfirmDialog extends LitElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.open = false;
|
|
7
|
+
this.title = 'Confirm Action';
|
|
8
|
+
this.message = 'Are you sure you want to proceed?';
|
|
9
|
+
this.confirmText = 'Confirm';
|
|
10
|
+
this.cancelText = 'Cancel';
|
|
11
|
+
this.danger = false;
|
|
12
|
+
}
|
|
13
|
+
static { this.properties = {
|
|
14
|
+
open: { type: Boolean, reflect: true },
|
|
15
|
+
title: { type: String },
|
|
16
|
+
message: { type: String },
|
|
17
|
+
confirmText: { type: String },
|
|
18
|
+
cancelText: { type: String },
|
|
19
|
+
danger: { type: Boolean }
|
|
20
|
+
}; }
|
|
21
|
+
static { this.styles = css `
|
|
22
|
+
:host {
|
|
23
|
+
display: contents;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.backdrop {
|
|
27
|
+
position: fixed;
|
|
28
|
+
inset: 0;
|
|
29
|
+
background: rgba(8, 8, 8, 0.82);
|
|
30
|
+
backdrop-filter: blur(20px);
|
|
31
|
+
-webkit-backdrop-filter: blur(20px);
|
|
32
|
+
z-index: 999;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
padding: 1.5rem;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
animation: fadeIn 0.2s ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dialog {
|
|
42
|
+
background: linear-gradient(145deg, rgba(38, 38, 38, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
|
|
43
|
+
backdrop-filter: blur(28px);
|
|
44
|
+
-webkit-backdrop-filter: blur(28px);
|
|
45
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
46
|
+
border-radius: 16px;
|
|
47
|
+
padding: 1.75rem;
|
|
48
|
+
max-width: 420px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
box-shadow:
|
|
51
|
+
0 25px 60px -15px rgba(0, 0, 0, 0.8),
|
|
52
|
+
0 0 0 1px rgba(255, 255, 255, 0.05) inset;
|
|
53
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.title {
|
|
59
|
+
font-size: 16px;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
color: #f5f5f5;
|
|
62
|
+
margin: 0 0 0.4rem 0;
|
|
63
|
+
letter-spacing: -0.01em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.message {
|
|
67
|
+
font-size: 12.5px;
|
|
68
|
+
color: #a5a5a5;
|
|
69
|
+
line-height: 1.5;
|
|
70
|
+
margin: 0 0 1.25rem 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.actions {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: flex-end;
|
|
77
|
+
gap: 0.65rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes fadeIn {
|
|
81
|
+
from {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
}
|
|
84
|
+
to {
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes slideUp {
|
|
90
|
+
from {
|
|
91
|
+
opacity: 0;
|
|
92
|
+
transform: translateY(10px) scale(0.98);
|
|
93
|
+
}
|
|
94
|
+
to {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
transform: translateY(0) scale(1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`; }
|
|
100
|
+
handleConfirm() {
|
|
101
|
+
this.dispatchEvent(new CustomEvent('confirm', { bubbles: true, composed: true }));
|
|
102
|
+
this.open = false;
|
|
103
|
+
}
|
|
104
|
+
handleCancel() {
|
|
105
|
+
this.dispatchEvent(new CustomEvent('cancel', { bubbles: true, composed: true }));
|
|
106
|
+
this.open = false;
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
if (!this.open)
|
|
110
|
+
return html ``;
|
|
111
|
+
return html `
|
|
112
|
+
<div
|
|
113
|
+
class="backdrop"
|
|
114
|
+
@click="${(e) => {
|
|
115
|
+
if (e.target === e.currentTarget)
|
|
116
|
+
this.handleCancel();
|
|
117
|
+
}}"
|
|
118
|
+
>
|
|
119
|
+
<div class="dialog" role="dialog" aria-modal="true" aria-labelledby="dialog-title">
|
|
120
|
+
<h3 class="title" id="dialog-title">${this.title}</h3>
|
|
121
|
+
<p class="message">${this.message}</p>
|
|
122
|
+
<div class="actions">
|
|
123
|
+
<activityual-button variant="secondary" @click="${this.handleCancel}">
|
|
124
|
+
${this.cancelText}
|
|
125
|
+
</activityual-button>
|
|
126
|
+
<activityual-button
|
|
127
|
+
variant="${this.danger ? 'danger' : 'primary'}"
|
|
128
|
+
@click="${this.handleConfirm}"
|
|
129
|
+
>
|
|
130
|
+
${this.confirmText}
|
|
131
|
+
</activityual-button>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (!customElements.get('activityual-confirm-dialog')) {
|
|
139
|
+
customElements.define('activityual-confirm-dialog', ActivityualConfirmDialog);
|
|
140
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import './button.js';
|
|
3
|
+
export declare class ActivityualEmptyState extends LitElement {
|
|
4
|
+
static properties: {
|
|
5
|
+
title: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
message: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
actionText: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
icon: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
title: string;
|
|
19
|
+
message: string;
|
|
20
|
+
actionText: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
static styles: import("lit").CSSResult;
|
|
23
|
+
handleAction(): void;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
import './button.js';
|
|
3
|
+
export class ActivityualEmptyState extends LitElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.title = 'No habits tracked yet';
|
|
7
|
+
this.message = 'Start by creating your first daily ritual to build momentum.';
|
|
8
|
+
this.actionText = 'Create Habit';
|
|
9
|
+
this.icon = '🌱';
|
|
10
|
+
}
|
|
11
|
+
static { this.properties = {
|
|
12
|
+
title: { type: String },
|
|
13
|
+
message: { type: String },
|
|
14
|
+
actionText: { type: String },
|
|
15
|
+
icon: { type: String }
|
|
16
|
+
}; }
|
|
17
|
+
static { this.styles = css `
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.empty-box {
|
|
24
|
+
background: linear-gradient(145deg, rgba(38, 38, 38, 0.5) 0%, rgba(20, 20, 20, 0.7) 100%);
|
|
25
|
+
backdrop-filter: blur(16px);
|
|
26
|
+
-webkit-backdrop-filter: blur(16px);
|
|
27
|
+
border: 1px dashed rgba(255, 255, 255, 0.12);
|
|
28
|
+
border-radius: 16px;
|
|
29
|
+
padding: 2.5rem 1.75rem;
|
|
30
|
+
text-align: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
gap: 0.85rem;
|
|
36
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.icon-pod {
|
|
41
|
+
width: 52px;
|
|
42
|
+
height: 52px;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
background: rgba(255, 67, 5, 0.12);
|
|
45
|
+
border: 1px solid rgba(255, 67, 5, 0.25);
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
font-size: 24px;
|
|
50
|
+
margin-bottom: 0.25rem;
|
|
51
|
+
box-shadow: 0 0 16px rgba(255, 67, 5, 0.18);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.title {
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
color: #f5f5f5;
|
|
58
|
+
margin: 0;
|
|
59
|
+
letter-spacing: -0.01em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.message {
|
|
63
|
+
font-size: 12.5px;
|
|
64
|
+
color: #a5a5a5;
|
|
65
|
+
max-width: 360px;
|
|
66
|
+
line-height: 1.5;
|
|
67
|
+
margin: 0 0 0.5rem 0;
|
|
68
|
+
}
|
|
69
|
+
`; }
|
|
70
|
+
handleAction() {
|
|
71
|
+
this.dispatchEvent(new CustomEvent('action-click', {
|
|
72
|
+
bubbles: true,
|
|
73
|
+
composed: true
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
return html `
|
|
78
|
+
<div class="empty-box">
|
|
79
|
+
<div class="icon-pod" aria-hidden="true">${this.icon}</div>
|
|
80
|
+
<h3 class="title">${this.title}</h3>
|
|
81
|
+
<p class="message">${this.message}</p>
|
|
82
|
+
${this.actionText
|
|
83
|
+
? html `
|
|
84
|
+
<activityual-button variant="primary" @click="${this.handleAction}">
|
|
85
|
+
+ ${this.actionText}
|
|
86
|
+
</activityual-button>
|
|
87
|
+
`
|
|
88
|
+
: ''}
|
|
89
|
+
</div>
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (!customElements.get('activityual-empty-state')) {
|
|
94
|
+
customElements.define('activityual-empty-state', ActivityualEmptyState);
|
|
95
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ActivityualFormField extends LitElement {
|
|
3
|
+
static properties: {
|
|
4
|
+
label: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
name: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
type: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
value: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
placeholder: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
error: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
required: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
disabled: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
label: string;
|
|
30
|
+
name: string;
|
|
31
|
+
type: string;
|
|
32
|
+
value: string;
|
|
33
|
+
placeholder: string;
|
|
34
|
+
error: string;
|
|
35
|
+
required: boolean;
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
static styles: import("lit").CSSResult;
|
|
38
|
+
handleInput(e: Event): void;
|
|
39
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
40
|
+
}
|