@skillre/dsh-plugin-work-dashboard 0.0.0-stage → 0.9.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/LICENSE +21 -0
- package/README.en.md +259 -0
- package/README.md +371 -2
- package/UNINSTALL.md +7 -0
- package/compatibility.json +195 -0
- package/cordis.patch.yml +24 -0
- package/docs/DESIGN-0.3.md +122 -0
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/docs/PLAN-0.7-0.9.md +230 -0
- package/docs/preview.svg +254 -0
- package/docs/preview.zh.svg +254 -0
- package/icon.svg +17 -0
- package/lib/blockers.d.ts +45 -0
- package/lib/blockers.js +160 -0
- package/lib/client/api.d.ts +42 -0
- package/lib/client/api.js +45 -0
- package/lib/client/contracts.d.ts +94 -0
- package/lib/client/contracts.js +21 -0
- package/lib/client/css/base.d.ts +31 -0
- package/lib/client/css/base.js +461 -0
- package/lib/client/css/blockers.d.ts +18 -0
- package/lib/client/css/blockers.js +196 -0
- package/lib/client/css/charts.d.ts +14 -0
- package/lib/client/css/charts.js +191 -0
- package/lib/client/css/detail.d.ts +21 -0
- package/lib/client/css/detail.js +423 -0
- package/lib/client/css/insights.d.ts +27 -0
- package/lib/client/css/insights.js +660 -0
- package/lib/client/css/overview.d.ts +23 -0
- package/lib/client/css/overview.js +327 -0
- package/lib/client/css/summary.d.ts +13 -0
- package/lib/client/css/summary.js +187 -0
- package/lib/client/format.d.ts +57 -0
- package/lib/client/format.js +96 -0
- package/lib/client/preferences.d.ts +56 -0
- package/lib/client/preferences.js +118 -0
- package/lib/client/styles.d.ts +17 -0
- package/lib/client/styles.js +24 -0
- package/lib/client/text.d.ts +32 -0
- package/lib/client/text.js +1112 -0
- package/lib/client/view-contract.d.ts +118 -0
- package/lib/client/view-contract.js +28 -0
- package/lib/client.js +6599 -0
- package/lib/config.d.ts +61 -0
- package/lib/config.js +67 -0
- package/lib/form.d.ts +218 -0
- package/lib/form.js +1075 -0
- package/lib/gap.d.ts +60 -0
- package/lib/gap.js +227 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.js +159 -0
- package/lib/repo.d.ts +124 -0
- package/lib/repo.js +407 -0
- package/lib/risks.d.ts +24 -0
- package/lib/risks.js +85 -0
- package/lib/skill.d.ts +94 -0
- package/lib/skill.js +220 -0
- package/lib/store.d.ts +63 -0
- package/lib/store.js +505 -0
- package/lib/timeline.d.ts +23 -0
- package/lib/timeline.js +93 -0
- package/lib/transport.d.ts +67 -0
- package/lib/transport.js +131 -0
- package/lib/types.d.ts +701 -0
- package/lib/types.js +78 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +117 -4
- package/skills/poc-export/SKILL.md +81 -0
- package/skills/poc-export/scripts/export-form.mjs +654 -0
- package/skills/poc-ledger/SKILL.md +171 -0
- package/skills/poc-submit/SKILL.md +186 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overview styles: the portfolio band and the three project readings.
|
|
3
|
+
*
|
|
4
|
+
* Three decisions drive this sheet:
|
|
5
|
+
*
|
|
6
|
+
* 1. **The band is one instrument, not six cards.** It gets one container with
|
|
7
|
+
* internal dividers, so the eye reads it as a single dashboard rather than
|
|
8
|
+
* six unrelated widgets. A card grid with gaps between every figure was the
|
|
9
|
+
* failure mode of the previous stat strip.
|
|
10
|
+
* 2. **Cards carry the reading order.** Name → stage → money → latest progress →
|
|
11
|
+
* four dimensions → gaps. The gap badge sits top-right because it is the
|
|
12
|
+
* reason to open the card at all; everything else is context for it.
|
|
13
|
+
* 3. **Selection is visible from the keyboard.** The shell moves a cursor with
|
|
14
|
+
* the arrow keys, so a selected card and a selected row both have to be
|
|
15
|
+
* unmistakable — a ring, not a background tint, because the background is
|
|
16
|
+
* already doing hover duty.
|
|
17
|
+
*
|
|
18
|
+
* Class prefixes owned here: `.pf-` (band), `.pcard-`, `.pboard-`, `.ptable-`,
|
|
19
|
+
* plus the shared `.panel` / `.workspace-grid` / `.project-row` atoms this
|
|
20
|
+
* surface defines because nothing else uses them. The blocker rail that used to
|
|
21
|
+
* live here moved to `css/blockers.ts` when it grew its own source filters.
|
|
22
|
+
*/
|
|
23
|
+
export const OVERVIEW_CSS = `
|
|
24
|
+
/* ---------- layout ---------- */
|
|
25
|
+
.wd-shell .workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
|
|
26
|
+
@media (max-width: 1180px) { .wd-shell .workspace-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
27
|
+
.wd-shell .primary-column, .wd-shell .secondary-column { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
|
|
28
|
+
.wd-shell .panel {
|
|
29
|
+
border: 1px solid var(--wd-hairline); border-radius: 12px;
|
|
30
|
+
background: var(--wd-surface); overflow: hidden;
|
|
31
|
+
box-shadow: var(--wd-shadow-1);
|
|
32
|
+
}
|
|
33
|
+
.wd-shell .panel-header {
|
|
34
|
+
display: flex; align-items: baseline; gap: 9px;
|
|
35
|
+
padding: 12px 18px 10px;
|
|
36
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
37
|
+
background: linear-gradient(180deg, var(--wd-surface) 0%, var(--wd-inset) 150%);
|
|
38
|
+
}
|
|
39
|
+
.wd-shell .panel-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; letter-spacing: -.005em; }
|
|
40
|
+
.wd-shell .panel-kicker {
|
|
41
|
+
margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary);
|
|
42
|
+
font-variant-numeric: tabular-nums;
|
|
43
|
+
padding: 1px 8px; border-radius: 20px;
|
|
44
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
45
|
+
}
|
|
46
|
+
.wd-shell .panel-body { padding: 0; }
|
|
47
|
+
.wd-shell .panel-body.padded { padding: 13px 18px; }
|
|
48
|
+
/* A one-line caption between the panel header and its body: used by the blocker
|
|
49
|
+
panel to state "12 of 30 projects blocked" before the list itself. */
|
|
50
|
+
.wd-shell .panel-note {
|
|
51
|
+
padding: 8px 18px 0;
|
|
52
|
+
font-size: 11px; line-height: 16px;
|
|
53
|
+
color: var(--dsw-alias-label-tertiary);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ---------- portfolio band ---------- */
|
|
57
|
+
.wd-shell .pf-band {
|
|
58
|
+
margin-bottom: 14px;
|
|
59
|
+
border: 1px solid var(--wd-hairline); border-radius: 12px;
|
|
60
|
+
background: var(--wd-surface);
|
|
61
|
+
box-shadow: var(--wd-shadow-1);
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
.wd-shell .pf-band-head {
|
|
65
|
+
display: flex; align-items: baseline; gap: 10px;
|
|
66
|
+
padding: 9px 16px 8px;
|
|
67
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
68
|
+
background: linear-gradient(180deg, var(--wd-surface) 0%, var(--wd-inset) 150%);
|
|
69
|
+
}
|
|
70
|
+
.wd-shell .pf-band-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; }
|
|
71
|
+
.wd-shell .pf-band-note { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
72
|
+
.wd-shell .pf-grid {
|
|
73
|
+
display: grid;
|
|
74
|
+
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
75
|
+
gap: 1px;
|
|
76
|
+
background: var(--wd-hairline);
|
|
77
|
+
}
|
|
78
|
+
@media (max-width: 1280px) { .wd-shell .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
|
|
79
|
+
@media (max-width: 860px) { .wd-shell .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
80
|
+
@media (max-width: 560px) { .wd-shell .pf-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
81
|
+
/* Two strips, four blocks each. The band is context: it answers "where does the
|
|
82
|
+
money sit" in about a third of the screen, then gets out of the way. An eight-column
|
|
83
|
+
grid lets two wide figures and four list figures share exactly two rows. */
|
|
84
|
+
.wd-shell .pf-block {
|
|
85
|
+
padding: 8px 12px 9px;
|
|
86
|
+
background: var(--wd-surface);
|
|
87
|
+
min-height: 0;
|
|
88
|
+
justify-content: flex-start;
|
|
89
|
+
}
|
|
90
|
+
.wd-shell .pf-block[data-span="4"] { grid-column: span 4; }
|
|
91
|
+
.wd-shell .pf-block[data-span="2"] { grid-column: span 2; }
|
|
92
|
+
@media (max-width: 1280px) {
|
|
93
|
+
.wd-shell .pf-block[data-span="4"] { grid-column: span 4; }
|
|
94
|
+
.wd-shell .pf-block[data-span="2"] { grid-column: span 2; }
|
|
95
|
+
}
|
|
96
|
+
@media (max-width: 860px) {
|
|
97
|
+
.wd-shell .pf-block[data-span="4"], .wd-shell .pf-block[data-span="2"] { grid-column: span 2; }
|
|
98
|
+
}
|
|
99
|
+
@media (max-width: 560px) {
|
|
100
|
+
.wd-shell .pf-block[data-span="4"], .wd-shell .pf-block[data-span="2"] { grid-column: span 1; }
|
|
101
|
+
}
|
|
102
|
+
@media (max-width: 720px) { .wd-shell .pf-block-wide { grid-column: span 1; } }
|
|
103
|
+
.wd-shell .pf-radials { display: flex; gap: 8px; justify-content: space-between; padding: 2px 2px 0; }
|
|
104
|
+
/* Four rows fit exactly; the cap only protects against a deployment with many
|
|
105
|
+
more orgs than this one, where the strip must not grow the band. */
|
|
106
|
+
.wd-shell .pf-block[data-span="2"] .barlist { max-height: 168px; overflow: auto; scrollbar-width: thin; }
|
|
107
|
+
.wd-shell .pf-collapse {
|
|
108
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
109
|
+
padding: 1px 7px; border-radius: 6px;
|
|
110
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-inset);
|
|
111
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
112
|
+
cursor: pointer; font-family: inherit; white-space: nowrap;
|
|
113
|
+
}
|
|
114
|
+
.wd-shell .pf-collapse:hover { color: var(--wd-text); background: var(--wd-surface); }
|
|
115
|
+
.wd-shell .pf-band[data-collapsed="true"] .pf-grid { display: none; }
|
|
116
|
+
.wd-shell .pf-note {
|
|
117
|
+
margin: 5px 0 0; font-size: 10px; line-height: 15px;
|
|
118
|
+
color: var(--dsw-alias-label-tertiary);
|
|
119
|
+
overflow-wrap: anywhere;
|
|
120
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
121
|
+
}
|
|
122
|
+
.wd-shell .pf-note[data-tone="amber"] { color: var(--wd-amber); }
|
|
123
|
+
|
|
124
|
+
/* A secondary figure nested inside a band block: same box, quieter rules, so it
|
|
125
|
+
reads as a detail of the chart above it rather than a seventh figure. */
|
|
126
|
+
.wd-shell .pf-subfigure {
|
|
127
|
+
margin-top: 9px; padding-top: 9px;
|
|
128
|
+
border-top: 1px dashed var(--wd-hairline);
|
|
129
|
+
display: flex; flex-direction: column; gap: 6px;
|
|
130
|
+
}
|
|
131
|
+
.wd-shell .pf-subfigure-label {
|
|
132
|
+
font-size: 10px; line-height: 14px; letter-spacing: .05em;
|
|
133
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ---------- project cards ---------- */
|
|
137
|
+
.wd-shell .pcard-grid {
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
|
|
140
|
+
gap: 12px; padding: 14px;
|
|
141
|
+
}
|
|
142
|
+
.wd-shell .pcard {
|
|
143
|
+
display: flex; flex-direction: column; gap: 9px;
|
|
144
|
+
padding: 13px 14px 11px;
|
|
145
|
+
border: 1px solid var(--wd-hairline); border-radius: 10px;
|
|
146
|
+
background: var(--wd-surface);
|
|
147
|
+
cursor: pointer; min-width: 0;
|
|
148
|
+
transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
|
|
149
|
+
}
|
|
150
|
+
.wd-shell .pcard:hover { box-shadow: var(--wd-shadow-2); border-color: var(--dsw-alias-border-l2); transform: translateY(-1px); }
|
|
151
|
+
.wd-shell .pcard:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }
|
|
152
|
+
.wd-shell .pcard[data-selected="true"] {
|
|
153
|
+
border-color: var(--wd-primary);
|
|
154
|
+
box-shadow: 0 0 0 3px var(--wd-primary-soft), var(--wd-shadow-2);
|
|
155
|
+
}
|
|
156
|
+
.wd-shell .pcard[data-closed="true"] { opacity: .82; }
|
|
157
|
+
.wd-shell .pcard-head { display: flex; align-items: flex-start; gap: 8px; }
|
|
158
|
+
.wd-shell .pcard-title-block { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
|
|
159
|
+
.wd-shell .pcard-name {
|
|
160
|
+
font-size: 13.5px; line-height: 19px; font-weight: 650;
|
|
161
|
+
letter-spacing: -.005em; overflow-wrap: anywhere;
|
|
162
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
163
|
+
}
|
|
164
|
+
.wd-shell .pcard-id {
|
|
165
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
166
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
167
|
+
}
|
|
168
|
+
.wd-shell .pcard-badge {
|
|
169
|
+
flex: none; padding: 1px 7px; border-radius: 20px;
|
|
170
|
+
font-size: 10px; line-height: 15px; font-weight: 650; white-space: nowrap;
|
|
171
|
+
}
|
|
172
|
+
.wd-shell .pcard-badge[data-tone="red"] { background: var(--wd-red-soft); color: var(--wd-red); }
|
|
173
|
+
.wd-shell .pcard-badge[data-tone="amber"] { background: var(--wd-amber-soft); color: var(--wd-amber); }
|
|
174
|
+
.wd-shell .pcard-stage { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
175
|
+
.wd-shell .pcard-stage-pill { flex: none; }
|
|
176
|
+
.wd-shell .pcard-stage .rail-mini { flex: 1 1 auto; }
|
|
177
|
+
.wd-shell .pcard-meta { display: flex; align-items: baseline; gap: 8px; }
|
|
178
|
+
.wd-shell .pcard-org {
|
|
179
|
+
flex: 1 1 auto; min-width: 0;
|
|
180
|
+
font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
181
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
182
|
+
}
|
|
183
|
+
.wd-shell .pcard-amount {
|
|
184
|
+
flex: none; font-size: 12.5px; font-weight: 650;
|
|
185
|
+
font-variant-numeric: tabular-nums; color: var(--wd-amber);
|
|
186
|
+
}
|
|
187
|
+
.wd-shell .pcard-unit { margin-left: 2px; font-size: 9.5px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }
|
|
188
|
+
.wd-shell .pcard-progress {
|
|
189
|
+
display: flex; flex-direction: column; gap: 1px;
|
|
190
|
+
padding: 7px 9px; border-radius: 8px;
|
|
191
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
192
|
+
}
|
|
193
|
+
.wd-shell .pcard-progress-label {
|
|
194
|
+
font-size: 9.5px; line-height: 14px; letter-spacing: .05em;
|
|
195
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
196
|
+
}
|
|
197
|
+
.wd-shell .pcard-progress-copy {
|
|
198
|
+
font-size: 11.5px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
199
|
+
overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
200
|
+
}
|
|
201
|
+
.wd-shell .pcard-progress-meta {
|
|
202
|
+
margin-top: 1px; font-size: 9.5px; line-height: 14px;
|
|
203
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
204
|
+
}
|
|
205
|
+
.wd-shell .pcard-dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
|
|
206
|
+
.wd-shell .pcard-dim {
|
|
207
|
+
display: flex; flex-direction: column; align-items: center; gap: 1px;
|
|
208
|
+
padding: 3px 2px; border-radius: 6px; min-width: 0;
|
|
209
|
+
background: var(--wd-red-soft);
|
|
210
|
+
}
|
|
211
|
+
.wd-shell .pcard-dim[data-present="true"] { background: var(--wd-green-soft); }
|
|
212
|
+
.wd-shell .pcard-dim-mark { font-size: 10.5px; line-height: 14px; font-weight: 650; color: var(--wd-red); }
|
|
213
|
+
.wd-shell .pcard-dim[data-present="true"] .pcard-dim-mark { color: var(--wd-green); }
|
|
214
|
+
.wd-shell .pcard-dim-label {
|
|
215
|
+
font-size: 8.5px; line-height: 12px; color: var(--dsw-alias-label-tertiary);
|
|
216
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
|
|
217
|
+
}
|
|
218
|
+
.wd-shell .pcard-foot { display: flex; align-items: center; gap: 8px; }
|
|
219
|
+
.wd-shell .pcard-since { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
220
|
+
.wd-shell .pcard-open { margin-left: auto; font-size: 10.5px; color: var(--wd-primary); font-weight: 600; }
|
|
221
|
+
|
|
222
|
+
/* ---------- board ---------- */
|
|
223
|
+
.wd-shell .pboard {
|
|
224
|
+
display: flex; gap: 10px; padding: 14px;
|
|
225
|
+
overflow-x: auto; overscroll-behavior-x: contain;
|
|
226
|
+
align-items: stretch;
|
|
227
|
+
}
|
|
228
|
+
.wd-shell .pboard-column {
|
|
229
|
+
flex: 1 1 0; min-width: 176px; max-width: 300px;
|
|
230
|
+
display: flex; flex-direction: column; gap: 8px;
|
|
231
|
+
padding: 10px 9px 12px; border-radius: 10px;
|
|
232
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
233
|
+
}
|
|
234
|
+
.wd-shell .pboard-column[data-empty="true"] { background: transparent; border-style: dashed; }
|
|
235
|
+
.wd-shell .pboard-column-head { display: flex; flex-direction: column; gap: 3px; }
|
|
236
|
+
.wd-shell .pboard-column-label { font-size: 11.5px; line-height: 16px; font-weight: 650; color: var(--dsw-alias-label-secondary); }
|
|
237
|
+
.wd-shell .pboard-column-count {
|
|
238
|
+
font-size: 9.5px; line-height: 14px;
|
|
239
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
240
|
+
}
|
|
241
|
+
.wd-shell .pboard-column-body { display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; }
|
|
242
|
+
.wd-shell .pboard-card {
|
|
243
|
+
display: flex; flex-direction: column; gap: 3px;
|
|
244
|
+
padding: 9px 10px; border-radius: 8px; width: 100%; text-align: left;
|
|
245
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-surface);
|
|
246
|
+
cursor: pointer; font-family: inherit;
|
|
247
|
+
box-shadow: var(--wd-shadow-1);
|
|
248
|
+
transition: box-shadow .14s ease, border-color .14s ease;
|
|
249
|
+
}
|
|
250
|
+
.wd-shell .pboard-card:hover { box-shadow: var(--wd-shadow-2); border-color: var(--dsw-alias-border-l2); }
|
|
251
|
+
.wd-shell .pboard-card[data-high="true"] { border-left: 3px solid var(--wd-red); }
|
|
252
|
+
.wd-shell .pboard-card-name {
|
|
253
|
+
font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--dsw-alias-label-primary);
|
|
254
|
+
overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
255
|
+
}
|
|
256
|
+
.wd-shell .pboard-card-meta { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
257
|
+
.wd-shell .pboard-card-owner { font-variant-numeric: normal; }
|
|
258
|
+
.wd-shell .pboard-card-progress {
|
|
259
|
+
font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-secondary);
|
|
260
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
261
|
+
}
|
|
262
|
+
.wd-shell .pboard-card-gap { font-size: 9.5px; line-height: 14px; font-weight: 650; color: var(--wd-red); }
|
|
263
|
+
.wd-shell .pboard-empty {
|
|
264
|
+
padding: 16px 8px; text-align: center;
|
|
265
|
+
font-size: 10.5px; line-height: 16px; color: var(--dsw-alias-label-tertiary);
|
|
266
|
+
border: 1px dashed var(--wd-hairline); border-radius: 8px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* ---------- table ---------- */
|
|
270
|
+
.wd-shell .project-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
|
271
|
+
.wd-shell .table-head th {
|
|
272
|
+
position: sticky; top: 0; z-index: 1;
|
|
273
|
+
padding: 8px 12px; text-align: left; white-space: nowrap;
|
|
274
|
+
font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
|
|
275
|
+
color: var(--dsw-alias-label-tertiary);
|
|
276
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
277
|
+
background: var(--wd-inset);
|
|
278
|
+
}
|
|
279
|
+
.wd-shell .table-head th:first-child { padding-left: 16px; }
|
|
280
|
+
.wd-shell .table-head th:last-child { padding-right: 16px; }
|
|
281
|
+
.wd-shell .ptable-sort {
|
|
282
|
+
display: inline-flex; align-items: center; gap: 3px;
|
|
283
|
+
padding: 0; border: 0; background: transparent; cursor: pointer;
|
|
284
|
+
font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
|
|
285
|
+
text-transform: uppercase; color: inherit; white-space: nowrap;
|
|
286
|
+
}
|
|
287
|
+
.wd-shell .ptable-sort:hover { color: var(--wd-text); }
|
|
288
|
+
.wd-shell .ptable-sort[data-active="true"] { color: var(--wd-primary); }
|
|
289
|
+
.wd-shell .ptable-sort-arrow { font-size: 9.5px; }
|
|
290
|
+
.wd-shell .project-row { border-bottom: 1px solid var(--wd-hairline); cursor: pointer; transition: background .1s ease; }
|
|
291
|
+
.wd-shell .project-row:last-child { border-bottom: 0; }
|
|
292
|
+
.wd-shell .project-row:hover { background: var(--wd-inset); }
|
|
293
|
+
.wd-shell .project-row[data-selected="true"] { background: var(--wd-primary-soft); }
|
|
294
|
+
.wd-shell .project-row:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: -2px; }
|
|
295
|
+
.wd-shell .project-row td { padding: 10px 12px; vertical-align: middle; }
|
|
296
|
+
.wd-shell .project-row td:first-child { padding-left: 16px; }
|
|
297
|
+
.wd-shell .project-row td:last-child { padding-right: 16px; text-align: right; }
|
|
298
|
+
.wd-shell .project-name {
|
|
299
|
+
font-size: 12.5px; line-height: 18px; font-weight: 600;
|
|
300
|
+
display: block; overflow-wrap: anywhere; letter-spacing: -.005em;
|
|
301
|
+
}
|
|
302
|
+
.wd-shell .project-id {
|
|
303
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
304
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
305
|
+
display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
306
|
+
}
|
|
307
|
+
.wd-shell .project-org { display: block; font-size: 11.5px; line-height: 17px; font-weight: 550; overflow-wrap: anywhere; }
|
|
308
|
+
.wd-shell .project-meta { font-size: 10.5px; line-height: 16px; color: var(--dsw-alias-label-secondary); }
|
|
309
|
+
.wd-shell .progress-summary {
|
|
310
|
+
font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
311
|
+
overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
312
|
+
}
|
|
313
|
+
.wd-shell .ptable-stage { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
|
|
314
|
+
.wd-shell .ptable-amount { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
|
|
315
|
+
.wd-shell .amount-cell { display: block; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12px; }
|
|
316
|
+
.wd-shell .gap-cell { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
|
|
317
|
+
.wd-shell .gap-count { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12.5px; }
|
|
318
|
+
.wd-shell .gap-count[data-level="high"] { color: var(--wd-red); }
|
|
319
|
+
.wd-shell .gap-count[data-level="medium"] { color: var(--wd-amber); }
|
|
320
|
+
.wd-shell .gap-count[data-level="none"] { color: var(--wd-green); }
|
|
321
|
+
.wd-shell .row-actions { display: flex; gap: 5px; justify-content: flex-end; }
|
|
322
|
+
.wd-shell .gap-copy { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
323
|
+
|
|
324
|
+
@media (prefers-reduced-motion: reduce) {
|
|
325
|
+
.wd-shell .pcard, .wd-shell .pboard-card, .wd-shell .project-row { transition: none; }
|
|
326
|
+
}
|
|
327
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KPI strip, budget panel and in-stage progress styles.
|
|
3
|
+
*
|
|
4
|
+
* Three figures with one shared constraint: they are all READ-FIRST surfaces, so
|
|
5
|
+
* they use numbers at display size (17–22px) and labels at 10.5–11.5px. The
|
|
6
|
+
* earlier surfaces rendered every number at 10px, which made a portfolio of
|
|
7
|
+
* thirty projects read like a log file.
|
|
8
|
+
*
|
|
9
|
+
* Colour vocabulary is the same everywhere: green = justified/approved, amber =
|
|
10
|
+
* waiting, red = a gap that costs money, blue = neutral information. Nothing
|
|
11
|
+
* here introduces a fifth judgement colour.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SUMMARY_CSS = "\n/* ---------- KPI strip ---------- */\n.wd-shell .kpi-strip {\n border: 1px solid var(--wd-hairline); border-radius: 12px;\n background: var(--wd-surface); box-shadow: var(--wd-shadow-1);\n margin-bottom: 16px; overflow: hidden;\n}\n.wd-shell .kpi-cells {\n display: grid;\n grid-template-columns: repeat(5, minmax(0, 1fr));\n}\n@media (max-width: 1180px) { .wd-shell .kpi-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n@media (max-width: 720px) { .wd-shell .kpi-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n\n.wd-shell .kpi-cell {\n display: flex; flex-direction: column; gap: 2px;\n padding: 12px 16px;\n border-right: 1px solid var(--wd-hairline);\n min-width: 0;\n}\n.wd-shell .kpi-cell:last-child { border-right: 0; }\n/* A hairline above the value carries the tone, so the number itself stays the\n same ink on every cell: five differently-coloured numbers would read as five\n different kinds of number. */\n.wd-shell .kpi-label {\n font-size: 10.5px; line-height: 15px; letter-spacing: .05em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;\n white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\n}\n.wd-shell .kpi-value {\n font-size: 21px; line-height: 28px; font-weight: 650;\n color: var(--wd-text); font-variant-numeric: tabular-nums;\n letter-spacing: -.01em;\n}\n.wd-shell .kpi-cell[data-tone=\"red\"] .kpi-value { color: var(--wd-red); }\n.wd-shell .kpi-cell[data-tone=\"green\"] .kpi-value { color: var(--wd-green); }\n.wd-shell .kpi-cell[data-tone=\"amber\"] .kpi-value { color: var(--wd-amber); }\n.wd-shell .kpi-note {\n font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\n}\n\n.wd-shell .kpi-stages {\n display: flex; align-items: center; gap: 10px;\n padding: 9px 16px;\n border-top: 1px solid var(--wd-hairline);\n background: var(--wd-inset);\n flex-wrap: wrap;\n}\n.wd-shell .kpi-stages-label {\n flex: none; font-size: 10.5px; line-height: 15px; letter-spacing: .05em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .kpi-stage-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }\n.wd-shell .kpi-stage-chip {\n display: inline-flex; align-items: center; gap: 5px;\n height: 24px; padding: 0 9px;\n border: 1px solid var(--wd-hairline); border-radius: 20px;\n background: var(--wd-surface); color: var(--dsw-alias-label-secondary);\n font-size: 11px; line-height: 16px; cursor: pointer; white-space: nowrap;\n transition: background .12s ease, border-color .12s ease, color .12s ease;\n}\n.wd-shell .kpi-stage-chip:hover:not([disabled]) { background: var(--wd-canvas); color: var(--wd-text); }\n.wd-shell .kpi-stage-chip[data-active=\"true\"] {\n background: var(--wd-primary-soft); border-color: var(--wd-primary);\n color: var(--wd-primary); font-weight: 600;\n}\n/* A zero bucket stays visible but muted: its existence is information (\"nothing\n reached G3\"), and hiding it would make the funnel look shorter than it is. */\n.wd-shell .kpi-stage-chip[data-zero=\"true\"] { opacity: .5; }\n.wd-shell .kpi-stage-count {\n font-size: 10.5px; font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary); font-weight: 500;\n}\n.wd-shell .kpi-stage-chip[data-active=\"true\"] .kpi-stage-count { color: var(--wd-primary); }\n.wd-shell .kpi-stages-summary {\n margin-left: auto; font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\n}\n@media (max-width: 900px) { .wd-shell .kpi-stages-summary { display: none; } }\n\n/* ---------- budget panel ---------- */\n.wd-shell .budget-panel {\n border: 1px solid var(--wd-hairline); border-radius: 12px;\n background: var(--wd-surface); box-shadow: var(--wd-shadow-1);\n padding: 13px 16px 14px;\n display: flex; flex-direction: column; gap: 11px;\n}\n.wd-shell .budget-head { display: flex; align-items: baseline; gap: 9px; }\n.wd-shell .budget-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; }\n.wd-shell .budget-note { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .budget-total { display: flex; align-items: baseline; gap: 8px; }\n.wd-shell .budget-total-label {\n font-size: 10.5px; line-height: 15px; letter-spacing: .05em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .budget-total-value {\n font-size: 22px; line-height: 30px; font-weight: 650; color: var(--wd-text);\n font-variant-numeric: tabular-nums; letter-spacing: -.01em;\n}\n.wd-shell .budget-total-unit { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .budget-bar {\n display: flex; height: 8px; border-radius: 5px; overflow: hidden;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .budget-bar-segment { height: 100%; }\n.wd-shell .budget-bar-segment[data-tone=\"green\"] { background: var(--wd-green); }\n.wd-shell .budget-bar-segment[data-tone=\"amber\"] { background: var(--wd-amber); }\n.wd-shell .budget-rows { margin: 0; display: flex; flex-direction: column; gap: 5px; }\n.wd-shell .budget-row { display: flex; align-items: baseline; gap: 8px; }\n.wd-shell .budget-row-label {\n flex: none; width: 82px; font-size: 11.5px; line-height: 17px; font-weight: 600;\n color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .budget-row[data-tone=\"green\"] .budget-row-label { color: var(--wd-green); }\n.wd-shell .budget-row[data-tone=\"amber\"] .budget-row-label { color: var(--wd-amber); }\n.wd-shell .budget-row[data-tone=\"red\"] .budget-row-label { color: var(--wd-red); }\n.wd-shell .budget-row-value {\n margin: 0; font-size: 11.5px; line-height: 17px;\n color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .budget-warning {\n margin: 0; padding: 7px 10px;\n border-radius: 8px; background: var(--wd-red-soft); color: var(--wd-red);\n font-size: 11.5px; line-height: 17px;\n}\n.wd-shell .budget-empty {\n margin: 0; padding: 16px 4px; text-align: center;\n font-size: 12px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .budget-orgs { display: flex; flex-direction: column; gap: 5px; }\n.wd-shell .budget-orgs-label {\n font-size: 10.5px; line-height: 15px; letter-spacing: .05em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .budget-org-row {\n display: grid; grid-template-columns: minmax(0, 1fr) 74px 34px;\n align-items: center; gap: 8px;\n}\n.wd-shell .budget-org-name {\n font-size: 11.5px; line-height: 17px; color: var(--wd-text);\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n}\n.wd-shell .budget-org-system { margin-left: 5px; font-size: 10px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .budget-org-value {\n font-size: 10.5px; line-height: 15px; text-align: right;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .budget-concentration {\n margin: 0; font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* ---------- in-stage progress ---------- */\n.wd-shell .stage-progress { display: flex; flex-direction: column; gap: 4px; }\n.wd-shell .stage-progress-row {\n display: grid; grid-template-columns: 68px minmax(0, 1fr) 82px;\n align-items: center; gap: 8px;\n}\n.wd-shell .stage-progress-label {\n font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);\n white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\n}\n.wd-shell .stage-progress-value {\n font-size: 10.5px; line-height: 15px; text-align: right;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .stage-progress-empty {\n grid-column: 2 / -1; font-size: 10.5px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .stage-progress-row[data-empty=\"true\"] { opacity: .7; }\n";
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KPI strip, budget panel and in-stage progress styles.
|
|
3
|
+
*
|
|
4
|
+
* Three figures with one shared constraint: they are all READ-FIRST surfaces, so
|
|
5
|
+
* they use numbers at display size (17–22px) and labels at 10.5–11.5px. The
|
|
6
|
+
* earlier surfaces rendered every number at 10px, which made a portfolio of
|
|
7
|
+
* thirty projects read like a log file.
|
|
8
|
+
*
|
|
9
|
+
* Colour vocabulary is the same everywhere: green = justified/approved, amber =
|
|
10
|
+
* waiting, red = a gap that costs money, blue = neutral information. Nothing
|
|
11
|
+
* here introduces a fifth judgement colour.
|
|
12
|
+
*/
|
|
13
|
+
export const SUMMARY_CSS = `
|
|
14
|
+
/* ---------- KPI strip ---------- */
|
|
15
|
+
.wd-shell .kpi-strip {
|
|
16
|
+
border: 1px solid var(--wd-hairline); border-radius: 12px;
|
|
17
|
+
background: var(--wd-surface); box-shadow: var(--wd-shadow-1);
|
|
18
|
+
margin-bottom: 16px; overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
.wd-shell .kpi-cells {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
23
|
+
}
|
|
24
|
+
@media (max-width: 1180px) { .wd-shell .kpi-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
|
|
25
|
+
@media (max-width: 720px) { .wd-shell .kpi-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
26
|
+
|
|
27
|
+
.wd-shell .kpi-cell {
|
|
28
|
+
display: flex; flex-direction: column; gap: 2px;
|
|
29
|
+
padding: 12px 16px;
|
|
30
|
+
border-right: 1px solid var(--wd-hairline);
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
.wd-shell .kpi-cell:last-child { border-right: 0; }
|
|
34
|
+
/* A hairline above the value carries the tone, so the number itself stays the
|
|
35
|
+
same ink on every cell: five differently-coloured numbers would read as five
|
|
36
|
+
different kinds of number. */
|
|
37
|
+
.wd-shell .kpi-label {
|
|
38
|
+
font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
|
|
39
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
40
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
41
|
+
}
|
|
42
|
+
.wd-shell .kpi-value {
|
|
43
|
+
font-size: 21px; line-height: 28px; font-weight: 650;
|
|
44
|
+
color: var(--wd-text); font-variant-numeric: tabular-nums;
|
|
45
|
+
letter-spacing: -.01em;
|
|
46
|
+
}
|
|
47
|
+
.wd-shell .kpi-cell[data-tone="red"] .kpi-value { color: var(--wd-red); }
|
|
48
|
+
.wd-shell .kpi-cell[data-tone="green"] .kpi-value { color: var(--wd-green); }
|
|
49
|
+
.wd-shell .kpi-cell[data-tone="amber"] .kpi-value { color: var(--wd-amber); }
|
|
50
|
+
.wd-shell .kpi-note {
|
|
51
|
+
font-size: 10.5px; line-height: 15px;
|
|
52
|
+
color: var(--dsw-alias-label-tertiary);
|
|
53
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.wd-shell .kpi-stages {
|
|
57
|
+
display: flex; align-items: center; gap: 10px;
|
|
58
|
+
padding: 9px 16px;
|
|
59
|
+
border-top: 1px solid var(--wd-hairline);
|
|
60
|
+
background: var(--wd-inset);
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
}
|
|
63
|
+
.wd-shell .kpi-stages-label {
|
|
64
|
+
flex: none; font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
|
|
65
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
66
|
+
}
|
|
67
|
+
.wd-shell .kpi-stage-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
|
|
68
|
+
.wd-shell .kpi-stage-chip {
|
|
69
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
70
|
+
height: 24px; padding: 0 9px;
|
|
71
|
+
border: 1px solid var(--wd-hairline); border-radius: 20px;
|
|
72
|
+
background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
|
|
73
|
+
font-size: 11px; line-height: 16px; cursor: pointer; white-space: nowrap;
|
|
74
|
+
transition: background .12s ease, border-color .12s ease, color .12s ease;
|
|
75
|
+
}
|
|
76
|
+
.wd-shell .kpi-stage-chip:hover:not([disabled]) { background: var(--wd-canvas); color: var(--wd-text); }
|
|
77
|
+
.wd-shell .kpi-stage-chip[data-active="true"] {
|
|
78
|
+
background: var(--wd-primary-soft); border-color: var(--wd-primary);
|
|
79
|
+
color: var(--wd-primary); font-weight: 600;
|
|
80
|
+
}
|
|
81
|
+
/* A zero bucket stays visible but muted: its existence is information ("nothing
|
|
82
|
+
reached G3"), and hiding it would make the funnel look shorter than it is. */
|
|
83
|
+
.wd-shell .kpi-stage-chip[data-zero="true"] { opacity: .5; }
|
|
84
|
+
.wd-shell .kpi-stage-count {
|
|
85
|
+
font-size: 10.5px; font-variant-numeric: tabular-nums;
|
|
86
|
+
color: var(--dsw-alias-label-tertiary); font-weight: 500;
|
|
87
|
+
}
|
|
88
|
+
.wd-shell .kpi-stage-chip[data-active="true"] .kpi-stage-count { color: var(--wd-primary); }
|
|
89
|
+
.wd-shell .kpi-stages-summary {
|
|
90
|
+
margin-left: auto; font-size: 10.5px; line-height: 15px;
|
|
91
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
92
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
93
|
+
}
|
|
94
|
+
@media (max-width: 900px) { .wd-shell .kpi-stages-summary { display: none; } }
|
|
95
|
+
|
|
96
|
+
/* ---------- budget panel ---------- */
|
|
97
|
+
.wd-shell .budget-panel {
|
|
98
|
+
border: 1px solid var(--wd-hairline); border-radius: 12px;
|
|
99
|
+
background: var(--wd-surface); box-shadow: var(--wd-shadow-1);
|
|
100
|
+
padding: 13px 16px 14px;
|
|
101
|
+
display: flex; flex-direction: column; gap: 11px;
|
|
102
|
+
}
|
|
103
|
+
.wd-shell .budget-head { display: flex; align-items: baseline; gap: 9px; }
|
|
104
|
+
.wd-shell .budget-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; }
|
|
105
|
+
.wd-shell .budget-note { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
|
|
106
|
+
.wd-shell .budget-total { display: flex; align-items: baseline; gap: 8px; }
|
|
107
|
+
.wd-shell .budget-total-label {
|
|
108
|
+
font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
|
|
109
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
.wd-shell .budget-total-value {
|
|
112
|
+
font-size: 22px; line-height: 30px; font-weight: 650; color: var(--wd-text);
|
|
113
|
+
font-variant-numeric: tabular-nums; letter-spacing: -.01em;
|
|
114
|
+
}
|
|
115
|
+
.wd-shell .budget-total-unit { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }
|
|
116
|
+
.wd-shell .budget-bar {
|
|
117
|
+
display: flex; height: 8px; border-radius: 5px; overflow: hidden;
|
|
118
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
119
|
+
}
|
|
120
|
+
.wd-shell .budget-bar-segment { height: 100%; }
|
|
121
|
+
.wd-shell .budget-bar-segment[data-tone="green"] { background: var(--wd-green); }
|
|
122
|
+
.wd-shell .budget-bar-segment[data-tone="amber"] { background: var(--wd-amber); }
|
|
123
|
+
.wd-shell .budget-rows { margin: 0; display: flex; flex-direction: column; gap: 5px; }
|
|
124
|
+
.wd-shell .budget-row { display: flex; align-items: baseline; gap: 8px; }
|
|
125
|
+
.wd-shell .budget-row-label {
|
|
126
|
+
flex: none; width: 82px; font-size: 11.5px; line-height: 17px; font-weight: 600;
|
|
127
|
+
color: var(--dsw-alias-label-secondary);
|
|
128
|
+
}
|
|
129
|
+
.wd-shell .budget-row[data-tone="green"] .budget-row-label { color: var(--wd-green); }
|
|
130
|
+
.wd-shell .budget-row[data-tone="amber"] .budget-row-label { color: var(--wd-amber); }
|
|
131
|
+
.wd-shell .budget-row[data-tone="red"] .budget-row-label { color: var(--wd-red); }
|
|
132
|
+
.wd-shell .budget-row-value {
|
|
133
|
+
margin: 0; font-size: 11.5px; line-height: 17px;
|
|
134
|
+
color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums;
|
|
135
|
+
}
|
|
136
|
+
.wd-shell .budget-warning {
|
|
137
|
+
margin: 0; padding: 7px 10px;
|
|
138
|
+
border-radius: 8px; background: var(--wd-red-soft); color: var(--wd-red);
|
|
139
|
+
font-size: 11.5px; line-height: 17px;
|
|
140
|
+
}
|
|
141
|
+
.wd-shell .budget-empty {
|
|
142
|
+
margin: 0; padding: 16px 4px; text-align: center;
|
|
143
|
+
font-size: 12px; color: var(--dsw-alias-label-tertiary);
|
|
144
|
+
}
|
|
145
|
+
.wd-shell .budget-orgs { display: flex; flex-direction: column; gap: 5px; }
|
|
146
|
+
.wd-shell .budget-orgs-label {
|
|
147
|
+
font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
|
|
148
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
149
|
+
}
|
|
150
|
+
.wd-shell .budget-org-row {
|
|
151
|
+
display: grid; grid-template-columns: minmax(0, 1fr) 74px 34px;
|
|
152
|
+
align-items: center; gap: 8px;
|
|
153
|
+
}
|
|
154
|
+
.wd-shell .budget-org-name {
|
|
155
|
+
font-size: 11.5px; line-height: 17px; color: var(--wd-text);
|
|
156
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
157
|
+
}
|
|
158
|
+
.wd-shell .budget-org-system { margin-left: 5px; font-size: 10px; color: var(--dsw-alias-label-tertiary); }
|
|
159
|
+
.wd-shell .budget-org-value {
|
|
160
|
+
font-size: 10.5px; line-height: 15px; text-align: right;
|
|
161
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
162
|
+
}
|
|
163
|
+
.wd-shell .budget-concentration {
|
|
164
|
+
margin: 0; font-size: 10.5px; line-height: 15px;
|
|
165
|
+
color: var(--dsw-alias-label-tertiary);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* ---------- in-stage progress ---------- */
|
|
169
|
+
.wd-shell .stage-progress { display: flex; flex-direction: column; gap: 4px; }
|
|
170
|
+
.wd-shell .stage-progress-row {
|
|
171
|
+
display: grid; grid-template-columns: 68px minmax(0, 1fr) 82px;
|
|
172
|
+
align-items: center; gap: 8px;
|
|
173
|
+
}
|
|
174
|
+
.wd-shell .stage-progress-label {
|
|
175
|
+
font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
176
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
177
|
+
}
|
|
178
|
+
.wd-shell .stage-progress-value {
|
|
179
|
+
font-size: 10.5px; line-height: 15px; text-align: right;
|
|
180
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
181
|
+
}
|
|
182
|
+
.wd-shell .stage-progress-empty {
|
|
183
|
+
grid-column: 2 / -1; font-size: 10.5px; line-height: 15px;
|
|
184
|
+
color: var(--dsw-alias-label-tertiary);
|
|
185
|
+
}
|
|
186
|
+
.wd-shell .stage-progress-row[data-empty="true"] { opacity: .7; }
|
|
187
|
+
`;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared display formatters.
|
|
3
|
+
*
|
|
4
|
+
* `formatWan` and `formatDate` had three copies each (overview, detail,
|
|
5
|
+
* insights), and `stageLabel` had two. Identical copies are not a style problem:
|
|
6
|
+
* three `formatDate` bodies meant three places to fix a timezone bug, and they
|
|
7
|
+
* had already drifted — the insights copy accepted `''` where the detail copy
|
|
8
|
+
* accepted `null`. One module, one behaviour.
|
|
9
|
+
*
|
|
10
|
+
* Everything here is pure and locale-explicit: the caller passes the active
|
|
11
|
+
* locale, so the result never depends on ambient state (and a replay or a test
|
|
12
|
+
* renders the same string as the live page).
|
|
13
|
+
*/
|
|
14
|
+
import type { Translate } from './text.js';
|
|
15
|
+
/**
|
|
16
|
+
* Format a 万元 figure with thousands separators.
|
|
17
|
+
*
|
|
18
|
+
* Rounds to one decimal: the ledger stores whole 万元, so a decimal only ever
|
|
19
|
+
* appears from an average, and two decimals would imply a precision the data
|
|
20
|
+
* does not have.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatWan(value: number): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format a ledger date for the active locale.
|
|
25
|
+
*
|
|
26
|
+
* The ledger stores calendar dates, not instants, so a bare `new Date('2026-11-01')`
|
|
27
|
+
* parses as UTC midnight and prints the previous day west of Greenwich. The
|
|
28
|
+
* string is therefore read as local midnight. Anything that is not a calendar
|
|
29
|
+
* date is returned verbatim: showing the raw value is honest, and inventing a
|
|
30
|
+
* parse would hide a hand-edited typo.
|
|
31
|
+
*
|
|
32
|
+
* @param value the raw field, `null`, or `''`
|
|
33
|
+
* @param locale the active locale id
|
|
34
|
+
* @param fallback what to return for an absent value; defaults to `''`
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatDate(value: string | null, locale: string, fallback?: string): string;
|
|
37
|
+
/** Format an ISO instant (not a calendar date) as `HH:MM` for the status bar. */
|
|
38
|
+
export declare function clockOf(value: string | null, locale: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* The dictionary label for a raw stage bucket key.
|
|
41
|
+
*
|
|
42
|
+
* Accepts the two sentinels `closed` / `unknown` alongside the five gate ids,
|
|
43
|
+
* because every stage-shaped surface (funnel, board column, filter chip) has to
|
|
44
|
+
* render all seven. An unrecognized value falls through unchanged rather than
|
|
45
|
+
* disappearing.
|
|
46
|
+
*/
|
|
47
|
+
export declare function stageLabel(t: Translate, key: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* A stage bucket key for one project: `closed` wins over the normalized stage.
|
|
50
|
+
*
|
|
51
|
+
* Kept here rather than inline so the funnel, the board and the blocker list
|
|
52
|
+
* bucket a project identically.
|
|
53
|
+
*/
|
|
54
|
+
export declare function stageBucketKey(project: {
|
|
55
|
+
closed: boolean;
|
|
56
|
+
stage: string | null;
|
|
57
|
+
}): string;
|