@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
package/dist/button.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
export class ActivityualButton extends LitElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.variant = 'primary';
|
|
6
|
+
this.size = 'md';
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
this.loading = false;
|
|
9
|
+
this.type = 'button';
|
|
10
|
+
}
|
|
11
|
+
static { this.properties = {
|
|
12
|
+
variant: { type: String },
|
|
13
|
+
size: { type: String },
|
|
14
|
+
disabled: { type: Boolean, reflect: true },
|
|
15
|
+
loading: { type: Boolean, reflect: true },
|
|
16
|
+
type: { type: String }
|
|
17
|
+
}; }
|
|
18
|
+
static { this.styles = css `
|
|
19
|
+
:host {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
button {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
gap: 0.5rem;
|
|
29
|
+
font-family: Inter, 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
letter-spacing: -0.01em;
|
|
32
|
+
border-radius: 9999px;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
width: 100%;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
outline: none;
|
|
39
|
+
user-select: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
button:focus-visible {
|
|
43
|
+
box-shadow: 0 0 0 2px rgba(255, 67, 5, 0.4);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Sizes */
|
|
47
|
+
button.sm {
|
|
48
|
+
height: 30px;
|
|
49
|
+
padding: 0 12px;
|
|
50
|
+
font-size: 11px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
button.md {
|
|
54
|
+
height: 36px;
|
|
55
|
+
padding: 0 16px;
|
|
56
|
+
font-size: 12px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
button.lg {
|
|
60
|
+
height: 42px;
|
|
61
|
+
padding: 0 22px;
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Primary: Vaulto solid vibrant orange */
|
|
66
|
+
button.primary,
|
|
67
|
+
button.amber {
|
|
68
|
+
background: #ff4305;
|
|
69
|
+
color: #ffffff;
|
|
70
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
71
|
+
box-shadow:
|
|
72
|
+
0 4px 14px rgba(255, 67, 5, 0.35),
|
|
73
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
74
|
+
}
|
|
75
|
+
button.primary:hover:not(:disabled),
|
|
76
|
+
button.amber:hover:not(:disabled) {
|
|
77
|
+
background: #e93b00;
|
|
78
|
+
transform: translateY(-1px);
|
|
79
|
+
box-shadow:
|
|
80
|
+
0 6px 18px rgba(255, 67, 5, 0.45),
|
|
81
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.3);
|
|
82
|
+
}
|
|
83
|
+
button.primary:active:not(:disabled),
|
|
84
|
+
button.amber:active:not(:disabled) {
|
|
85
|
+
transform: translateY(1px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Secondary: Vaulto dark translucent obsidian */
|
|
89
|
+
button.secondary,
|
|
90
|
+
button.charcoal {
|
|
91
|
+
background: rgba(255, 255, 255, 0.05);
|
|
92
|
+
color: #f5f5f5;
|
|
93
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
94
|
+
backdrop-filter: blur(12px);
|
|
95
|
+
-webkit-backdrop-filter: blur(12px);
|
|
96
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
97
|
+
}
|
|
98
|
+
button.secondary:hover:not(:disabled),
|
|
99
|
+
button.charcoal:hover:not(:disabled) {
|
|
100
|
+
background: rgba(255, 255, 255, 0.09);
|
|
101
|
+
border-color: rgba(255, 255, 255, 0.14);
|
|
102
|
+
transform: translateY(-1px);
|
|
103
|
+
}
|
|
104
|
+
button.secondary:active:not(:disabled),
|
|
105
|
+
button.charcoal:active:not(:disabled) {
|
|
106
|
+
transform: translateY(1px);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Ghost */
|
|
110
|
+
button.ghost {
|
|
111
|
+
background: transparent;
|
|
112
|
+
color: #a5a5a5;
|
|
113
|
+
border: 1px solid transparent;
|
|
114
|
+
}
|
|
115
|
+
button.ghost:hover:not(:disabled) {
|
|
116
|
+
background: rgba(255, 255, 255, 0.05);
|
|
117
|
+
color: #ffffff;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Danger */
|
|
121
|
+
button.danger {
|
|
122
|
+
background: #ff3434;
|
|
123
|
+
color: #ffffff;
|
|
124
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
125
|
+
box-shadow: 0 4px 14px rgba(255, 52, 52, 0.35);
|
|
126
|
+
}
|
|
127
|
+
button.danger:hover:not(:disabled) {
|
|
128
|
+
background: #e02020;
|
|
129
|
+
transform: translateY(-1px);
|
|
130
|
+
box-shadow: 0 6px 18px rgba(255, 52, 52, 0.45);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
button:disabled {
|
|
134
|
+
opacity: 0.35;
|
|
135
|
+
cursor: not-allowed;
|
|
136
|
+
transform: none !important;
|
|
137
|
+
box-shadow: none !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.spinner {
|
|
141
|
+
width: 14px;
|
|
142
|
+
height: 14px;
|
|
143
|
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
border-top-color: currentColor;
|
|
146
|
+
animation: spin 0.8s linear infinite;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@keyframes spin {
|
|
150
|
+
to {
|
|
151
|
+
transform: rotate(360deg);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
`; }
|
|
155
|
+
handleClick(e) {
|
|
156
|
+
if (this.disabled || this.loading) {
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
e.stopPropagation();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (this.type === 'submit') {
|
|
162
|
+
const form = this.closest('form');
|
|
163
|
+
if (form) {
|
|
164
|
+
form.requestSubmit();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
render() {
|
|
169
|
+
return html `
|
|
170
|
+
<button
|
|
171
|
+
class="${this.variant} ${this.size}"
|
|
172
|
+
?disabled="${this.disabled || this.loading}"
|
|
173
|
+
type="${this.type}"
|
|
174
|
+
@click="${this.handleClick}"
|
|
175
|
+
>
|
|
176
|
+
${this.loading ? html `<span class="spinner" aria-hidden="true"></span>` : ''}
|
|
177
|
+
<slot></slot>
|
|
178
|
+
</button>
|
|
179
|
+
`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (!customElements.get('activityual-button')) {
|
|
183
|
+
customElements.define('activityual-button', ActivityualButton);
|
|
184
|
+
}
|
package/dist/card.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type CardVariant = 'default' | 'amber' | 'inset' | 'shell';
|
|
3
|
+
export declare class ActivityualCard extends LitElement {
|
|
4
|
+
static properties: {
|
|
5
|
+
variant: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
padding: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
variant: CardVariant;
|
|
13
|
+
padding: 'none' | 'sm' | 'md' | 'lg';
|
|
14
|
+
static styles: import("lit").CSSResult;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
}
|
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
|
+
}
|