@jjlmoya/utils-health 1.20.0 → 1.21.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/package.json +1 -1
- package/src/category/index.ts +2 -1
- package/src/entries.ts +3 -1
- package/src/index.ts +1 -0
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/caloricDeficitCalculator/bibliography.astro +14 -0
- package/src/tool/caloricDeficitCalculator/bibliography.ts +24 -0
- package/src/tool/caloricDeficitCalculator/caloric-deficit-calculator.css +448 -0
- package/src/tool/caloricDeficitCalculator/client.ts +228 -0
- package/src/tool/caloricDeficitCalculator/component.astro +153 -0
- package/src/tool/caloricDeficitCalculator/entry.ts +27 -0
- package/src/tool/caloricDeficitCalculator/i18n/de.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/en.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/es.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/fr.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/id.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/it.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/ja.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/ko.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/nl.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/pl.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/pt.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/ru.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/sv.ts +381 -0
- package/src/tool/caloricDeficitCalculator/i18n/tr.ts +343 -0
- package/src/tool/caloricDeficitCalculator/i18n/zh.ts +343 -0
- package/src/tool/caloricDeficitCalculator/index.ts +12 -0
- package/src/tool/caloricDeficitCalculator/logic.ts +86 -0
- package/src/tool/caloricDeficitCalculator/model.ts +117 -0
- package/src/tool/caloricDeficitCalculator/seo.astro +15 -0
- package/src/tool/caloricDeficitCalculator/timeline.ts +132 -0
- package/src/tool/caloricDeficitCalculator/ui.ts +72 -0
- package/src/tools.ts +2 -1
package/package.json
CHANGED
package/src/category/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { daltonismSimulator } from '../tool/daltonismSimulator/entry';
|
|
|
5
5
|
import { tinnitusReliever } from '../tool/tinnitusReliever/entry';
|
|
6
6
|
import { breathingVisualizer } from '../tool/breathingVisualizer/entry';
|
|
7
7
|
import { caffeineTracker } from '../tool/caffeineTracker/entry';
|
|
8
|
+
import { caloricDeficitCalculator } from '../tool/caloricDeficitCalculator/entry';
|
|
8
9
|
import { dailyProteinCalculator } from '../tool/dailyProteinCalculator/entry';
|
|
9
10
|
import { waterPurifier } from '../tool/waterPurifier/entry';
|
|
10
11
|
import { digestionStopwatch } from '../tool/digestionStopwatch/entry';
|
|
@@ -17,7 +18,7 @@ import { metabolicAgeCalculator } from '../tool/metabolicAgeCalculator/entry';
|
|
|
17
18
|
|
|
18
19
|
export const healthCategory: HealthCategoryEntry = {
|
|
19
20
|
icon: 'mdi:heart-pulse',
|
|
20
|
-
tools: [bmiCalculator, bodyAdiposityIndexCalculator, leanBodyMassCalculator, metabolicAgeCalculator, dailyProteinCalculator, daltonismSimulator, tinnitusReliever, breathingVisualizer, caffeineTracker, waterPurifier, digestionStopwatch, binauralTuner, pelliRobsonTest, peripheralVisionTrainer, epworthSleepinessScale],
|
|
21
|
+
tools: [bmiCalculator, bodyAdiposityIndexCalculator, leanBodyMassCalculator, metabolicAgeCalculator, caloricDeficitCalculator, dailyProteinCalculator, daltonismSimulator, tinnitusReliever, breathingVisualizer, caffeineTracker, waterPurifier, digestionStopwatch, binauralTuner, pelliRobsonTest, peripheralVisionTrainer, epworthSleepinessScale],
|
|
21
22
|
i18n: {
|
|
22
23
|
en: () => import('./i18n/en').then((m) => m.content),
|
|
23
24
|
es: () => import('./i18n/es').then((m) => m.content),
|
package/src/entries.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { bmiCalculator } from './tool/bmiCalculator/entry';
|
|
|
4
4
|
export { bodyAdiposityIndexCalculator } from './tool/bodyAdiposityIndexCalculator/entry';
|
|
5
5
|
export { breathingVisualizer } from './tool/breathingVisualizer/entry';
|
|
6
6
|
export { caffeineTracker } from './tool/caffeineTracker/entry';
|
|
7
|
+
export { caloricDeficitCalculator } from './tool/caloricDeficitCalculator/entry';
|
|
7
8
|
export { dailyProteinCalculator } from './tool/dailyProteinCalculator/entry';
|
|
8
9
|
export { daltonismSimulator } from './tool/daltonismSimulator/entry';
|
|
9
10
|
export { digestionStopwatch } from './tool/digestionStopwatch/entry';
|
|
@@ -25,6 +26,7 @@ import { bmiCalculator } from './tool/bmiCalculator/entry';
|
|
|
25
26
|
import { bodyAdiposityIndexCalculator } from './tool/bodyAdiposityIndexCalculator/entry';
|
|
26
27
|
import { breathingVisualizer } from './tool/breathingVisualizer/entry';
|
|
27
28
|
import { caffeineTracker } from './tool/caffeineTracker/entry';
|
|
29
|
+
import { caloricDeficitCalculator } from './tool/caloricDeficitCalculator/entry';
|
|
28
30
|
import { dailyProteinCalculator } from './tool/dailyProteinCalculator/entry';
|
|
29
31
|
import { daltonismSimulator } from './tool/daltonismSimulator/entry';
|
|
30
32
|
import { digestionStopwatch } from './tool/digestionStopwatch/entry';
|
|
@@ -39,4 +41,4 @@ import { screenDecompressionTime } from './tool/screenDecompressionTime/entry';
|
|
|
39
41
|
import { tinnitusReliever } from './tool/tinnitusReliever/entry';
|
|
40
42
|
import { ubeCalculator } from './tool/ubeCalculator/entry';
|
|
41
43
|
import { waterPurifier } from './tool/waterPurifier/entry';
|
|
42
|
-
export const ALL_ENTRIES = [binauralTuner, bloodUnitConverter, bmiCalculator, bodyAdiposityIndexCalculator, breathingVisualizer, caffeineTracker, dailyProteinCalculator, daltonismSimulator, digestionStopwatch, epworthSleepinessScale, hydrationCalculator, leanBodyMassCalculator, metabolicAgeCalculator, pelliRobsonTest, peripheralVisionTrainer, readingDistanceCalculator, screenDecompressionTime, tinnitusReliever, ubeCalculator, waterPurifier];
|
|
44
|
+
export const ALL_ENTRIES = [binauralTuner, bloodUnitConverter, bmiCalculator, bodyAdiposityIndexCalculator, breathingVisualizer, caffeineTracker, caloricDeficitCalculator, dailyProteinCalculator, daltonismSimulator, digestionStopwatch, epworthSleepinessScale, hydrationCalculator, leanBodyMassCalculator, metabolicAgeCalculator, pelliRobsonTest, peripheralVisionTrainer, readingDistanceCalculator, screenDecompressionTime, tinnitusReliever, ubeCalculator, waterPurifier];
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './tool/daltonismSimulator';
|
|
|
3
3
|
export * from './tool/tinnitusReliever';
|
|
4
4
|
export * from './tool/breathingVisualizer';
|
|
5
5
|
export * from './tool/caffeineTracker';
|
|
6
|
+
export * from './tool/caloricDeficitCalculator';
|
|
6
7
|
export * from './tool/waterPurifier';
|
|
7
8
|
export * from './tool/digestionStopwatch';
|
|
8
9
|
export * from './tool/binauralTuner';
|
|
@@ -4,8 +4,8 @@ import { healthCategory } from '../data';
|
|
|
4
4
|
|
|
5
5
|
describe('Tool Validation Suite', () => {
|
|
6
6
|
describe('Library Registration', () => {
|
|
7
|
-
it('should have
|
|
8
|
-
expect(ALL_TOOLS.length).toBe(
|
|
7
|
+
it('should have 21 tools in ALL_TOOLS', () => {
|
|
8
|
+
expect(ALL_TOOLS.length).toBe(21);
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
it('healthCategory should be defined', () => {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { caloricDeficitCalculator } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'en' } = Astro.props;
|
|
11
|
+
const content = await caloricDeficitCalculator.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <Bibliography links={content.bibliography} />}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BibliographyEntry } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const bibliography: BibliographyEntry[] = [
|
|
4
|
+
{
|
|
5
|
+
name: 'Hall KD. et al.: Quantification of the effect of energy imbalance on bodyweight',
|
|
6
|
+
url: 'https://doi.org/10.1016/S0140-6736(11)60812-X',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'Mifflin MD. et al.: A new predictive equation for resting energy expenditure in healthy individuals',
|
|
10
|
+
url: 'https://doi.org/10.1093/ajcn/51.2.241',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'NIH National Institute of Diabetes and Digestive and Kidney Diseases: Body Weight Planner',
|
|
14
|
+
url: 'https://www.niddk.nih.gov/bwp',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'CDC: Losing weight',
|
|
18
|
+
url: 'https://www.cdc.gov/healthy-weight-growth/losing-weight/index.html',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Wikipedia: Basal metabolic rate',
|
|
22
|
+
url: 'https://en.wikipedia.org/wiki/Basal_metabolic_rate',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
.cdc {
|
|
2
|
+
--cdc-bg: #f7f8f4;
|
|
3
|
+
--cdc-panel: #fff;
|
|
4
|
+
--cdc-soft: #f0f3ee;
|
|
5
|
+
--cdc-ink: #202322;
|
|
6
|
+
--cdc-muted: #69706b;
|
|
7
|
+
--cdc-line: rgba(32, 35, 34, 0.12);
|
|
8
|
+
--cdc-green: #2f7d68;
|
|
9
|
+
--cdc-red: #bf5d52;
|
|
10
|
+
--cdc-amber: #b98235;
|
|
11
|
+
--cdc-blue: #4e6f91;
|
|
12
|
+
--cdc-shadow: 0 18px 38px rgba(42, 48, 45, 0.08);
|
|
13
|
+
|
|
14
|
+
background: var(--cdc-bg);
|
|
15
|
+
border: 1px solid var(--cdc-line);
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
color: #202322;
|
|
18
|
+
padding: 0.85rem;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.theme-dark .cdc {
|
|
23
|
+
--cdc-bg: #171715;
|
|
24
|
+
--cdc-panel: #22211e;
|
|
25
|
+
--cdc-soft: #2b2925;
|
|
26
|
+
--cdc-ink: #edeae3;
|
|
27
|
+
--cdc-muted: #b8b1a5;
|
|
28
|
+
--cdc-line: rgba(237, 234, 227, 0.14);
|
|
29
|
+
--cdc-green: #8aa899;
|
|
30
|
+
--cdc-red: #b9867d;
|
|
31
|
+
--cdc-amber: #c0a06a;
|
|
32
|
+
--cdc-blue: #93a6b7;
|
|
33
|
+
--cdc-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
|
|
34
|
+
|
|
35
|
+
color: #edeae3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cdc__grid {
|
|
39
|
+
display: grid;
|
|
40
|
+
gap: 1rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cdc__balance,
|
|
44
|
+
.cdc__controls,
|
|
45
|
+
.cdc__timeline {
|
|
46
|
+
background: var(--cdc-panel);
|
|
47
|
+
border: 1px solid var(--cdc-line);
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
padding: 1rem;
|
|
50
|
+
box-shadow: var(--cdc-shadow);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.cdc__scale {
|
|
54
|
+
min-height: 190px;
|
|
55
|
+
display: grid;
|
|
56
|
+
place-items: center;
|
|
57
|
+
position: relative;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.cdc__beam {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-columns: 1fr 1fr;
|
|
64
|
+
gap: 1.2rem;
|
|
65
|
+
width: min(100%, 520px);
|
|
66
|
+
transform-origin: center;
|
|
67
|
+
transition: transform 220ms ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.cdc__pan {
|
|
71
|
+
min-height: 118px;
|
|
72
|
+
border: 2px solid var(--cdc-line);
|
|
73
|
+
border-radius: 8px;
|
|
74
|
+
display: grid;
|
|
75
|
+
align-content: center;
|
|
76
|
+
justify-items: center;
|
|
77
|
+
gap: 0.25rem;
|
|
78
|
+
box-shadow: 0 12px 26px rgba(0, 0, 0, 0.06);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.cdc__pan svg {
|
|
82
|
+
width: 2rem;
|
|
83
|
+
height: 2rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cdc__pan--in {
|
|
87
|
+
background: color-mix(in srgb, var(--cdc-green) 10%, var(--cdc-panel));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cdc__pan--out {
|
|
91
|
+
background: color-mix(in srgb, var(--cdc-red) 10%, var(--cdc-panel));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.cdc__pan span,
|
|
95
|
+
.cdc__metrics span,
|
|
96
|
+
.cdc__hero-metric span,
|
|
97
|
+
.cdc__timeline-head span,
|
|
98
|
+
.cdc__timeline-foot,
|
|
99
|
+
.cdc__label {
|
|
100
|
+
color: var(--cdc-muted);
|
|
101
|
+
font-size: 0.82rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cdc__pan strong {
|
|
105
|
+
font-size: clamp(1.4rem, 5vw, 2rem);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.cdc__stand {
|
|
109
|
+
width: 64px;
|
|
110
|
+
height: 64px;
|
|
111
|
+
border-left: 5px solid var(--cdc-line);
|
|
112
|
+
border-bottom: 5px solid var(--cdc-line);
|
|
113
|
+
transform: rotate(45deg);
|
|
114
|
+
position: absolute;
|
|
115
|
+
bottom: 0.4rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.cdc__hero-metric {
|
|
119
|
+
display: grid;
|
|
120
|
+
gap: 0.1rem;
|
|
121
|
+
margin: 0.5rem 0 1rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.cdc__hero-metric strong {
|
|
125
|
+
font-size: clamp(2.2rem, 9vw, 4.5rem);
|
|
126
|
+
line-height: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.cdc__metrics {
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
132
|
+
gap: 0.6rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cdc__metrics div {
|
|
136
|
+
border: 1px solid var(--cdc-line);
|
|
137
|
+
border-radius: 8px;
|
|
138
|
+
padding: 0.75rem;
|
|
139
|
+
display: grid;
|
|
140
|
+
gap: 0.2rem;
|
|
141
|
+
background: var(--cdc-soft);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.cdc__alert {
|
|
145
|
+
display: grid;
|
|
146
|
+
grid-template-columns: auto 1fr;
|
|
147
|
+
gap: 0.75rem;
|
|
148
|
+
align-items: start;
|
|
149
|
+
margin-top: 0.9rem;
|
|
150
|
+
border-radius: 8px;
|
|
151
|
+
padding: 0.85rem;
|
|
152
|
+
border: 1px solid var(--cdc-line);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.cdc__alert p {
|
|
156
|
+
margin: 0.15rem 0 0;
|
|
157
|
+
color: var(--cdc-muted);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.cdc__alert svg {
|
|
161
|
+
width: 1.5rem;
|
|
162
|
+
height: 1.5rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.cdc__alert--ok { background: color-mix(in srgb, var(--cdc-green) 12%, transparent); }
|
|
166
|
+
.cdc__alert--warning { background: color-mix(in srgb, var(--cdc-amber) 14%, transparent); }
|
|
167
|
+
.cdc__alert--danger { background: color-mix(in srgb, var(--cdc-red) 13%, transparent); }
|
|
168
|
+
.cdc__alert--info { background: color-mix(in srgb, var(--cdc-blue) 11%, transparent); }
|
|
169
|
+
|
|
170
|
+
.cdc__controls {
|
|
171
|
+
display: grid;
|
|
172
|
+
gap: 1.1rem;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.cdc__topline,
|
|
176
|
+
.cdc__two,
|
|
177
|
+
.cdc__manual {
|
|
178
|
+
display: grid;
|
|
179
|
+
gap: 0.85rem;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.cdc__topline {
|
|
183
|
+
background: var(--cdc-soft);
|
|
184
|
+
border: 1px solid var(--cdc-line);
|
|
185
|
+
border-radius: 8px;
|
|
186
|
+
padding: 0.75rem;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.cdc__control-group {
|
|
190
|
+
display: grid;
|
|
191
|
+
gap: 0.65rem;
|
|
192
|
+
border-top: 1px solid var(--cdc-line);
|
|
193
|
+
padding-top: 1.1rem;
|
|
194
|
+
margin-top: 0.1rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.cdc__seg,
|
|
198
|
+
.cdc__chips {
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-wrap: wrap;
|
|
201
|
+
gap: 0.5rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.cdc__seg-btn,
|
|
205
|
+
.cdc__chip {
|
|
206
|
+
min-height: 40px;
|
|
207
|
+
border: 1px solid var(--cdc-line);
|
|
208
|
+
border-radius: 8px;
|
|
209
|
+
background: var(--cdc-soft);
|
|
210
|
+
color: var(--cdc-ink);
|
|
211
|
+
padding: 0.5rem 0.82rem;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
font-weight: 650;
|
|
214
|
+
transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.cdc__seg-btn:hover,
|
|
218
|
+
.cdc__chip:hover {
|
|
219
|
+
border-color: color-mix(in srgb, var(--cdc-ink) 34%, var(--cdc-line));
|
|
220
|
+
transform: translateY(-1px);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.cdc__seg-btn--active,
|
|
224
|
+
.cdc__chip--active {
|
|
225
|
+
background: var(--cdc-ink);
|
|
226
|
+
border-color: var(--cdc-ink);
|
|
227
|
+
color: var(--cdc-bg);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.cdc__field {
|
|
231
|
+
display: grid;
|
|
232
|
+
gap: 0.55rem;
|
|
233
|
+
background: var(--cdc-soft);
|
|
234
|
+
border: 1px solid var(--cdc-line);
|
|
235
|
+
border-radius: 8px;
|
|
236
|
+
padding: 0.75rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.cdc__field label {
|
|
240
|
+
display: flex;
|
|
241
|
+
justify-content: space-between;
|
|
242
|
+
gap: 1rem;
|
|
243
|
+
align-items: baseline;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.cdc__field b,
|
|
247
|
+
.cdc__label {
|
|
248
|
+
color: var(--cdc-ink);
|
|
249
|
+
font-weight: 800;
|
|
250
|
+
letter-spacing: 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.cdc__field output {
|
|
254
|
+
color: var(--cdc-muted);
|
|
255
|
+
font-weight: 750;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.cdc__field--calculated output {
|
|
259
|
+
color: var(--cdc-blue);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.cdc__field--calculated .cdc__range {
|
|
263
|
+
accent-color: var(--cdc-blue);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.cdc__range {
|
|
267
|
+
width: 100%;
|
|
268
|
+
accent-color: var(--cdc-green);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.cdc__field--deficit .cdc__range {
|
|
272
|
+
accent-color: var(--cdc-red);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.cdc__timeline {
|
|
276
|
+
margin-top: 1rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.cdc__timeline-head,
|
|
280
|
+
.cdc__timeline-foot {
|
|
281
|
+
display: flex;
|
|
282
|
+
justify-content: space-between;
|
|
283
|
+
gap: 1rem;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.cdc__timeline-head strong {
|
|
287
|
+
font-size: 1.4rem;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.cdc__track {
|
|
291
|
+
height: 22px;
|
|
292
|
+
border: 1px solid var(--cdc-line);
|
|
293
|
+
border-radius: 999px;
|
|
294
|
+
margin: 0.7rem 0;
|
|
295
|
+
position: relative;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
background: var(--cdc-soft);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.cdc__track-fill {
|
|
301
|
+
height: 100%;
|
|
302
|
+
border-radius: inherit;
|
|
303
|
+
background: linear-gradient(90deg, var(--cdc-green), var(--cdc-blue), var(--cdc-amber));
|
|
304
|
+
transition: width 220ms ease;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.cdc__track-pin {
|
|
308
|
+
width: 18px;
|
|
309
|
+
height: 18px;
|
|
310
|
+
background: var(--cdc-panel);
|
|
311
|
+
border: 3px solid var(--cdc-ink);
|
|
312
|
+
border-radius: 50%;
|
|
313
|
+
position: absolute;
|
|
314
|
+
top: 1px;
|
|
315
|
+
transform: translateX(-50%);
|
|
316
|
+
transition: left 220ms ease;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.cdc__timeline-actions {
|
|
320
|
+
display: flex;
|
|
321
|
+
flex-wrap: wrap;
|
|
322
|
+
gap: 0.55rem;
|
|
323
|
+
margin-top: 0.85rem;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.cdc__action-btn {
|
|
327
|
+
min-height: 40px;
|
|
328
|
+
border: 1px solid var(--cdc-ink);
|
|
329
|
+
border-radius: 8px;
|
|
330
|
+
background: var(--cdc-ink);
|
|
331
|
+
color: var(--cdc-panel);
|
|
332
|
+
padding: 0.55rem 0.9rem;
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
font-weight: 700;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.cdc__action-btn--ghost {
|
|
338
|
+
background: transparent;
|
|
339
|
+
color: var(--cdc-ink);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.cdc__action-btn:disabled {
|
|
343
|
+
cursor: not-allowed;
|
|
344
|
+
opacity: 0.45;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.cdc__plan-cards {
|
|
348
|
+
display: grid;
|
|
349
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
350
|
+
gap: 0.6rem;
|
|
351
|
+
margin-top: 0.85rem;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.cdc__plan-cards div {
|
|
355
|
+
border: 1px solid var(--cdc-line);
|
|
356
|
+
border-radius: 8px;
|
|
357
|
+
padding: 0.7rem;
|
|
358
|
+
display: grid;
|
|
359
|
+
gap: 0.2rem;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.cdc__plan-cards span,
|
|
363
|
+
.cdc__checkin small,
|
|
364
|
+
.cdc__timeline-empty {
|
|
365
|
+
color: var(--cdc-muted);
|
|
366
|
+
font-size: 0.82rem;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.cdc__plan-cards strong {
|
|
370
|
+
font-size: 1rem;
|
|
371
|
+
line-height: 1.15;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.cdc__timeline-empty {
|
|
375
|
+
margin: 0.85rem 0 0;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.cdc__checkins {
|
|
379
|
+
display: grid;
|
|
380
|
+
gap: 0.5rem;
|
|
381
|
+
margin-top: 0.85rem;
|
|
382
|
+
max-height: 360px;
|
|
383
|
+
overflow: auto;
|
|
384
|
+
padding-right: 0.2rem;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.cdc__checkin {
|
|
388
|
+
display: grid;
|
|
389
|
+
grid-template-columns: auto minmax(72px, 0.8fr) minmax(120px, 1fr) minmax(92px, 0.7fr);
|
|
390
|
+
gap: 0.55rem;
|
|
391
|
+
align-items: center;
|
|
392
|
+
border: 1px solid var(--cdc-line);
|
|
393
|
+
border-radius: 8px;
|
|
394
|
+
background: color-mix(in srgb, var(--cdc-panel) 82%, transparent);
|
|
395
|
+
padding: 0.55rem;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.cdc__checkin--done {
|
|
399
|
+
border-color: color-mix(in srgb, var(--cdc-green) 52%, var(--cdc-line));
|
|
400
|
+
background: color-mix(in srgb, var(--cdc-green) 10%, var(--cdc-panel));
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.cdc__checkin input[type="checkbox"] {
|
|
404
|
+
width: 20px;
|
|
405
|
+
height: 20px;
|
|
406
|
+
accent-color: var(--cdc-green);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.cdc__checkin input[type="number"] {
|
|
410
|
+
min-width: 0;
|
|
411
|
+
width: 100%;
|
|
412
|
+
border: 1px solid var(--cdc-line);
|
|
413
|
+
border-radius: 8px;
|
|
414
|
+
background: var(--cdc-panel);
|
|
415
|
+
color: var(--cdc-ink);
|
|
416
|
+
padding: 0.45rem;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@media (min-width: 760px) {
|
|
420
|
+
.cdc {
|
|
421
|
+
padding: 1.25rem;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.cdc__grid {
|
|
425
|
+
grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
|
|
426
|
+
align-items: stretch;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.cdc__two,
|
|
430
|
+
.cdc__topline {
|
|
431
|
+
grid-template-columns: 1fr 1fr;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@media (max-width: 560px) {
|
|
436
|
+
.cdc__plan-cards {
|
|
437
|
+
grid-template-columns: 1fr;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.cdc__checkin {
|
|
441
|
+
grid-template-columns: auto 1fr;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.cdc__checkin small,
|
|
445
|
+
.cdc__checkin input[type="number"] {
|
|
446
|
+
grid-column: 2;
|
|
447
|
+
}
|
|
448
|
+
}
|