@skillre/dsh-plugin-work-dashboard 0.0.0-stage → 0.6.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 +253 -0
- package/README.md +347 -2
- package/UNINSTALL.md +7 -0
- package/compatibility.json +155 -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/preview.svg +254 -0
- package/docs/preview.zh.svg +254 -0
- package/icon.svg +17 -0
- package/lib/client/api.d.ts +35 -0
- package/lib/client/api.js +44 -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 +422 -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 +399 -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 +22 -0
- package/lib/client/css/overview.js +338 -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 +22 -0
- package/lib/client/text.d.ts +32 -0
- package/lib/client/text.js +934 -0
- package/lib/client/view-contract.d.ts +110 -0
- package/lib/client/view-contract.js +28 -0
- package/lib/client.js +5389 -0
- package/lib/config.d.ts +61 -0
- package/lib/config.js +67 -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 +130 -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 +494 -0
- package/lib/timeline.d.ts +23 -0
- package/lib/timeline.js +93 -0
- package/lib/transport.d.ts +61 -0
- package/lib/transport.js +121 -0
- package/lib/types.d.ts +612 -0
- package/lib/types.js +62 -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,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell styles: the frame, the page chrome, the toolbar, and shared atoms.
|
|
3
|
+
*
|
|
4
|
+
* Design goals, in the order that drove the decisions:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Depth through layering, not decoration.** Three surface levels
|
|
7
|
+
* (canvas → card → inset) with a single soft shadow ramp. A flat page reads
|
|
8
|
+
* "unstyled"; three tones read "designed" without adding visual noise.
|
|
9
|
+
* 2. **One accent, used sparingly.** The brand blue marks only the current
|
|
10
|
+
* selection, the active view and the primary action. Status colour
|
|
11
|
+
* (green/amber/red) is reserved for judgement — never for chrome.
|
|
12
|
+
* 3. **Density with air.** The ledger is data-heavy, so rows stay compact, but
|
|
13
|
+
* every section gets a real gap and a real heading hierarchy. Cramped and
|
|
14
|
+
* airy are both failures; the target is "scannable at 1440".
|
|
15
|
+
* 4. **Theme-native.** The frame uses `--dsw-alias-*` tokens so light and dark
|
|
16
|
+
* both work. The ledger's own palette (blue/green/amber/red from DESIGN.md)
|
|
17
|
+
* is literal, with dark-theme variants that stay legible.
|
|
18
|
+
* 5. **Chrome is one column.** Header, search, toolbar, body and footer share
|
|
19
|
+
* the same 32px gutter and the same stack, so the page reads as one
|
|
20
|
+
* instrument rather than a table wedged between two bars.
|
|
21
|
+
*
|
|
22
|
+
* This sheet owns ONLY the frame: `.page-*`, `.module-*`, `.toolbar-*`,
|
|
23
|
+
* `.filter-*`, `.view-*`, `.sort-*`, `.search-*`, `.btn`, `.empty-*`,
|
|
24
|
+
* `.failure`, `.modal-*`, and the shared `.chip` / `.status-pill` atoms.
|
|
25
|
+
* Charts, overview, detail and insights each ship their own sheet beside their
|
|
26
|
+
* component, and `styles.ts` concatenates all of them.
|
|
27
|
+
*
|
|
28
|
+
* Everything is scoped under `.wd-shell`, and the sheet lives in a `<style>`
|
|
29
|
+
* element React removes on unmount, so nothing leaks into product DOM.
|
|
30
|
+
*/
|
|
31
|
+
export const BASE_CSS = `
|
|
32
|
+
.wd-shell {
|
|
33
|
+
/* Brand + status palette (DESIGN.md), with soft tints derived from each. */
|
|
34
|
+
--wd-primary: #2864E8;
|
|
35
|
+
--wd-primary-deep: #1B4FC2;
|
|
36
|
+
--wd-primary-soft: rgba(40, 100, 232, .09);
|
|
37
|
+
--wd-primary-ring: rgba(40, 100, 232, .26);
|
|
38
|
+
--wd-text: #192638;
|
|
39
|
+
--wd-bg: #F5F7FB;
|
|
40
|
+
--wd-border: #E6EBF2;
|
|
41
|
+
--wd-green: #218568;
|
|
42
|
+
--wd-amber: #B77919;
|
|
43
|
+
--wd-red: #C0392B;
|
|
44
|
+
--wd-slate: #5A6A80;
|
|
45
|
+
--wd-green-soft: rgba(33, 133, 104, .10);
|
|
46
|
+
--wd-amber-soft: rgba(183, 121, 25, .11);
|
|
47
|
+
--wd-red-soft: rgba(192, 57, 43, .10);
|
|
48
|
+
--wd-slate-soft: rgba(90, 106, 128, .10);
|
|
49
|
+
|
|
50
|
+
/* Surface ramp: canvas → card → inset. */
|
|
51
|
+
--wd-canvas: #F5F7FB;
|
|
52
|
+
--wd-surface: #FFFFFF;
|
|
53
|
+
--wd-inset: #F7F9FC;
|
|
54
|
+
--wd-hairline: #E6EBF2;
|
|
55
|
+
|
|
56
|
+
/* One shadow ramp; three steps is enough for any depth in this UI. */
|
|
57
|
+
--wd-shadow-1: 0 1px 2px rgba(20, 32, 52, .05);
|
|
58
|
+
--wd-shadow-2: 0 2px 6px rgba(20, 32, 52, .07), 0 1px 2px rgba(20, 32, 52, .04);
|
|
59
|
+
--wd-shadow-3: 0 10px 30px rgba(20, 32, 52, .12), 0 2px 8px rgba(20, 32, 52, .06);
|
|
60
|
+
|
|
61
|
+
height: 100%;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
background: var(--wd-canvas);
|
|
66
|
+
color: var(--wd-text);
|
|
67
|
+
font-family: 'Avenir Next', 'PingFang SC', system-ui, -apple-system, sans-serif;
|
|
68
|
+
font-size: 13px;
|
|
69
|
+
line-height: 20px;
|
|
70
|
+
-webkit-font-smoothing: antialiased;
|
|
71
|
+
}
|
|
72
|
+
body[data-ds-dark-theme] .wd-shell {
|
|
73
|
+
--wd-text: #E8EDF5;
|
|
74
|
+
--wd-bg: #14181F;
|
|
75
|
+
--wd-border: #2A3341;
|
|
76
|
+
--wd-green: #4FC59B;
|
|
77
|
+
--wd-amber: #E0A94A;
|
|
78
|
+
--wd-red: #F07A6B;
|
|
79
|
+
--wd-slate: #97A6BA;
|
|
80
|
+
--wd-primary: #6E9BFF;
|
|
81
|
+
--wd-primary-deep: #8DB0FF;
|
|
82
|
+
--wd-primary-soft: rgba(110, 155, 255, .14);
|
|
83
|
+
--wd-primary-ring: rgba(110, 155, 255, .32);
|
|
84
|
+
--wd-green-soft: rgba(79, 197, 155, .14);
|
|
85
|
+
--wd-amber-soft: rgba(224, 169, 74, .16);
|
|
86
|
+
--wd-red-soft: rgba(240, 122, 107, .14);
|
|
87
|
+
--wd-slate-soft: rgba(151, 166, 186, .14);
|
|
88
|
+
--wd-canvas: #14181F;
|
|
89
|
+
--wd-surface: #1B2029;
|
|
90
|
+
--wd-inset: #222834;
|
|
91
|
+
--wd-hairline: #2A3341;
|
|
92
|
+
--wd-shadow-1: 0 1px 2px rgba(0, 0, 0, .28);
|
|
93
|
+
--wd-shadow-2: 0 2px 8px rgba(0, 0, 0, .34), 0 1px 2px rgba(0, 0, 0, .24);
|
|
94
|
+
--wd-shadow-3: 0 12px 34px rgba(0, 0, 0, .48), 0 2px 8px rgba(0, 0, 0, .3);
|
|
95
|
+
}
|
|
96
|
+
.wd-shell *, .wd-shell *::before, .wd-shell *::after { box-sizing: border-box; }
|
|
97
|
+
.wd-shell button, .wd-shell input, .wd-shell select { font: inherit; color: inherit; }
|
|
98
|
+
.wd-shell:focus { outline: none; }
|
|
99
|
+
|
|
100
|
+
/* ---------- shell: rail + canvas ---------- */
|
|
101
|
+
.wd-shell .page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
|
|
102
|
+
|
|
103
|
+
.wd-shell .module-rail {
|
|
104
|
+
flex: 0 0 auto;
|
|
105
|
+
display: flex; align-items: center; gap: 6px;
|
|
106
|
+
padding: 10px 32px 0;
|
|
107
|
+
}
|
|
108
|
+
.wd-shell .module-tab {
|
|
109
|
+
display: inline-flex; align-items: center; gap: 7px;
|
|
110
|
+
height: 30px; padding: 0 12px;
|
|
111
|
+
border: 1px solid transparent; border-radius: 8px 8px 0 0;
|
|
112
|
+
background: transparent; color: var(--dsw-alias-label-secondary);
|
|
113
|
+
cursor: pointer; font-size: 12.5px; font-weight: 500;
|
|
114
|
+
border-bottom: 0; position: relative; top: 1px;
|
|
115
|
+
}
|
|
116
|
+
.wd-shell .module-tab[data-active="true"] {
|
|
117
|
+
background: var(--wd-surface); color: var(--wd-text);
|
|
118
|
+
border-color: var(--wd-hairline); font-weight: 600;
|
|
119
|
+
}
|
|
120
|
+
.wd-shell .module-tab:not([data-active="true"]):hover { background: var(--wd-primary-soft); color: var(--wd-text); }
|
|
121
|
+
.wd-shell .module-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-primary); flex: none; }
|
|
122
|
+
.wd-shell .module-tab[data-active="false"] .module-tab-dot { background: var(--wd-slate); opacity: .55; }
|
|
123
|
+
.wd-shell .module-rail-hint { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
|
|
124
|
+
|
|
125
|
+
/* ---------- page header ---------- */
|
|
126
|
+
.wd-shell .page-header {
|
|
127
|
+
flex: 0 0 auto;
|
|
128
|
+
display: flex; align-items: flex-start; gap: 16px;
|
|
129
|
+
padding: 14px 28px 12px;
|
|
130
|
+
background: var(--wd-surface);
|
|
131
|
+
border: 1px solid var(--wd-hairline);
|
|
132
|
+
box-shadow: var(--wd-shadow-1);
|
|
133
|
+
position: relative; z-index: 2;
|
|
134
|
+
}
|
|
135
|
+
.wd-shell .page-header-text { flex: 1 1 auto; min-width: 0; }
|
|
136
|
+
.wd-shell .page-eyebrow {
|
|
137
|
+
display: flex; align-items: center; gap: 6px;
|
|
138
|
+
font-size: 11px; line-height: 16px; letter-spacing: .06em;
|
|
139
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary);
|
|
140
|
+
margin: 0 0 3px;
|
|
141
|
+
}
|
|
142
|
+
.wd-shell .page-title {
|
|
143
|
+
margin: 0; font-size: 19px; line-height: 25px; font-weight: 650;
|
|
144
|
+
letter-spacing: -.01em; display: flex; align-items: center; gap: 10px;
|
|
145
|
+
}
|
|
146
|
+
.wd-shell .page-subtitle { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); }
|
|
147
|
+
.wd-shell .page-source {
|
|
148
|
+
margin: 4px 0 0; font-size: 10.5px; line-height: 15px;
|
|
149
|
+
color: var(--dsw-alias-label-tertiary);
|
|
150
|
+
display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
|
|
151
|
+
}
|
|
152
|
+
.wd-shell .page-source code {
|
|
153
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
|
|
154
|
+
padding: 2px 7px; border-radius: 5px;
|
|
155
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
156
|
+
}
|
|
157
|
+
.wd-shell .header-actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
|
|
158
|
+
.wd-shell .page-body {
|
|
159
|
+
flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;
|
|
160
|
+
padding: 16px 28px 36px;
|
|
161
|
+
}
|
|
162
|
+
.wd-shell .detail-body {
|
|
163
|
+
flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;
|
|
164
|
+
padding: 0;
|
|
165
|
+
}
|
|
166
|
+
.wd-shell .page-footer {
|
|
167
|
+
flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
|
|
168
|
+
padding: 8px 32px; min-height: 32px;
|
|
169
|
+
border-top: 1px solid var(--wd-hairline);
|
|
170
|
+
background: var(--wd-surface);
|
|
171
|
+
font-size: 11.5px; color: var(--dsw-alias-label-tertiary);
|
|
172
|
+
}
|
|
173
|
+
.wd-shell .page-footer .spacer { flex: 1 1 auto; }
|
|
174
|
+
|
|
175
|
+
/* ---------- search (inside the toolbar) ---------- */
|
|
176
|
+
.wd-shell .search-box {
|
|
177
|
+
position: relative; display: flex; align-items: center;
|
|
178
|
+
width: min(300px, 100%); flex: 0 1 300px;
|
|
179
|
+
height: 28px; padding: 0 9px 0 27px;
|
|
180
|
+
border: 1px solid var(--wd-hairline); border-radius: 9px;
|
|
181
|
+
background: var(--wd-inset);
|
|
182
|
+
transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;
|
|
183
|
+
}
|
|
184
|
+
.wd-shell .search-box:focus-within {
|
|
185
|
+
border-color: var(--wd-primary); background: var(--wd-surface);
|
|
186
|
+
box-shadow: 0 0 0 3px var(--wd-primary-soft);
|
|
187
|
+
}
|
|
188
|
+
.wd-shell .search-glyph {
|
|
189
|
+
position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
|
|
190
|
+
font-size: 14px; line-height: 1; color: var(--dsw-alias-label-tertiary);
|
|
191
|
+
pointer-events: none;
|
|
192
|
+
}
|
|
193
|
+
.wd-shell .search-input {
|
|
194
|
+
flex: 1 1 auto; min-width: 0; height: 100%;
|
|
195
|
+
border: 0; background: transparent; outline: none;
|
|
196
|
+
font-size: 12.5px;
|
|
197
|
+
}
|
|
198
|
+
.wd-shell .search-input::placeholder { color: var(--dsw-alias-label-tertiary); }
|
|
199
|
+
.wd-shell .search-input::-webkit-search-cancel-button { display: none; }
|
|
200
|
+
.wd-shell .search-clear {
|
|
201
|
+
flex: none; width: 18px; height: 18px; border-radius: 50%;
|
|
202
|
+
border: 0; background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);
|
|
203
|
+
font-size: 12px; line-height: 1; cursor: pointer;
|
|
204
|
+
display: flex; align-items: center; justify-content: center;
|
|
205
|
+
}
|
|
206
|
+
.wd-shell .search-clear:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }
|
|
207
|
+
.wd-shell .footer-hint { font-size: 10px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }
|
|
208
|
+
|
|
209
|
+
/* ---------- toolbar ---------- */
|
|
210
|
+
.wd-shell .toolbar {
|
|
211
|
+
flex: 0 0 auto;
|
|
212
|
+
display: flex; flex-direction: column; gap: 6px;
|
|
213
|
+
padding: 8px 28px 9px;
|
|
214
|
+
background: var(--wd-surface);
|
|
215
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
216
|
+
box-shadow: var(--wd-shadow-1);
|
|
217
|
+
position: relative; z-index: 1;
|
|
218
|
+
}
|
|
219
|
+
.wd-shell .toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }
|
|
220
|
+
/* The filter strip is ONE scrolling line. Wrapping it onto three lines cost the
|
|
221
|
+
project list most of the first screen, which is the opposite of the point. */
|
|
222
|
+
.wd-shell .toolbar-row-filters {
|
|
223
|
+
gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
|
|
224
|
+
padding-bottom: 2px; scrollbar-width: thin;
|
|
225
|
+
}
|
|
226
|
+
.wd-shell .toolbar-row-filters .toolbar-group { flex: none; }
|
|
227
|
+
.wd-shell .toolbar-group { display: flex; align-items: center; gap: 7px; min-width: 0; }
|
|
228
|
+
.wd-shell .toolbar-group-label {
|
|
229
|
+
flex: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
|
|
230
|
+
color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
231
|
+
}
|
|
232
|
+
.wd-shell .chip-scroll { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; }
|
|
233
|
+
.wd-shell .filter-chip {
|
|
234
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
235
|
+
height: 24px; padding: 0 9px;
|
|
236
|
+
border: 1px solid var(--wd-hairline); border-radius: 20px;
|
|
237
|
+
background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
|
|
238
|
+
font-size: 11.5px; cursor: pointer; white-space: nowrap;
|
|
239
|
+
transition: background .12s ease, border-color .12s ease, color .12s ease;
|
|
240
|
+
}
|
|
241
|
+
.wd-shell .filter-chip:hover:not([disabled]) { background: var(--wd-inset); color: var(--wd-text); }
|
|
242
|
+
.wd-shell .filter-chip[data-active="true"] {
|
|
243
|
+
background: var(--wd-primary-soft); border-color: var(--wd-primary);
|
|
244
|
+
color: var(--wd-primary); font-weight: 600;
|
|
245
|
+
}
|
|
246
|
+
.wd-shell .filter-chip[disabled] { opacity: .4; cursor: default; }
|
|
247
|
+
.wd-shell .filter-chip-count {
|
|
248
|
+
font-size: 10px; font-variant-numeric: tabular-nums;
|
|
249
|
+
color: var(--dsw-alias-label-tertiary); font-weight: 500;
|
|
250
|
+
}
|
|
251
|
+
.wd-shell .filter-chip[data-active="true"] .filter-chip-count { color: var(--wd-primary); }
|
|
252
|
+
.wd-shell .view-switch {
|
|
253
|
+
display: inline-flex; align-items: center; padding: 2px;
|
|
254
|
+
border: 1px solid var(--wd-hairline); border-radius: 9px;
|
|
255
|
+
background: var(--wd-inset); gap: 2px;
|
|
256
|
+
}
|
|
257
|
+
.wd-shell .view-switch-btn {
|
|
258
|
+
height: 24px; padding: 0 11px; border: 0; border-radius: 7px;
|
|
259
|
+
background: transparent; color: var(--dsw-alias-label-secondary);
|
|
260
|
+
font-size: 11.5px; cursor: pointer; white-space: nowrap;
|
|
261
|
+
transition: background .12s ease, color .12s ease, box-shadow .12s ease;
|
|
262
|
+
}
|
|
263
|
+
.wd-shell .view-switch-btn:hover:not([data-active="true"]) { color: var(--wd-text); }
|
|
264
|
+
.wd-shell .view-switch-btn[data-active="true"] {
|
|
265
|
+
background: var(--wd-surface); color: var(--wd-text); font-weight: 600;
|
|
266
|
+
box-shadow: var(--wd-shadow-1);
|
|
267
|
+
}
|
|
268
|
+
.wd-shell .sort-switch { display: inline-flex; align-items: center; gap: 4px; }
|
|
269
|
+
.wd-shell .sort-select {
|
|
270
|
+
height: 26px; padding: 0 8px; border-radius: 7px;
|
|
271
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-surface);
|
|
272
|
+
color: var(--dsw-alias-label-secondary); font-size: 11.5px; cursor: pointer;
|
|
273
|
+
}
|
|
274
|
+
.wd-shell .sort-select:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }
|
|
275
|
+
.wd-shell .toolbar-result { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
276
|
+
|
|
277
|
+
/* ---------- buttons ---------- */
|
|
278
|
+
.wd-shell .btn {
|
|
279
|
+
height: 30px; padding: 0 12px;
|
|
280
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
281
|
+
border-radius: 8px; border: 1px solid var(--wd-hairline);
|
|
282
|
+
background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
|
|
283
|
+
cursor: pointer; white-space: nowrap; font-size: 12.5px;
|
|
284
|
+
transition: background .13s ease, border-color .13s ease, box-shadow .13s ease, transform .06s ease;
|
|
285
|
+
box-shadow: var(--wd-shadow-1);
|
|
286
|
+
}
|
|
287
|
+
.wd-shell .btn:hover:not([disabled]) {
|
|
288
|
+
background: var(--wd-inset); color: var(--wd-text);
|
|
289
|
+
border-color: var(--dsw-alias-border-l2); box-shadow: var(--wd-shadow-2);
|
|
290
|
+
}
|
|
291
|
+
.wd-shell .btn:active:not([disabled]) { transform: translateY(1px); box-shadow: var(--wd-shadow-1); }
|
|
292
|
+
.wd-shell .btn:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 2px; }
|
|
293
|
+
.wd-shell .btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
|
|
294
|
+
.wd-shell .btn-primary {
|
|
295
|
+
background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);
|
|
296
|
+
border-color: transparent; color: #fff; font-weight: 550;
|
|
297
|
+
box-shadow: 0 1px 2px rgba(40, 100, 232, .3), 0 4px 12px rgba(40, 100, 232, .18);
|
|
298
|
+
}
|
|
299
|
+
.wd-shell .btn-primary:hover:not([disabled]) {
|
|
300
|
+
background: linear-gradient(180deg, var(--wd-primary) 0%, var(--wd-primary-deep) 100%);
|
|
301
|
+
color: #fff; filter: brightness(1.07);
|
|
302
|
+
box-shadow: 0 2px 4px rgba(40, 100, 232, .32), 0 8px 20px rgba(40, 100, 232, .22);
|
|
303
|
+
}
|
|
304
|
+
.wd-shell .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
|
|
305
|
+
.wd-shell .btn-ghost:hover:not([disabled]) { background: var(--wd-inset); box-shadow: none; }
|
|
306
|
+
.wd-shell .btn-small { height: 25px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
|
|
307
|
+
.wd-shell .btn-icon { width: 26px; padding: 0; justify-content: center; font-size: 12px; }
|
|
308
|
+
|
|
309
|
+
/* ---------- shared atoms ---------- */
|
|
310
|
+
.wd-shell .chip {
|
|
311
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
312
|
+
padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 18px;
|
|
313
|
+
background: var(--wd-inset); color: var(--dsw-alias-label-secondary);
|
|
314
|
+
border: 1px solid var(--wd-hairline);
|
|
315
|
+
}
|
|
316
|
+
.wd-shell .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
317
|
+
.wd-shell .chip-button { border: 0; cursor: pointer; font-family: inherit; }
|
|
318
|
+
.wd-shell .chip-button:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }
|
|
319
|
+
.wd-shell .status-pill {
|
|
320
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
321
|
+
height: 21px; padding: 0 9px; border-radius: 20px;
|
|
322
|
+
font-size: 11px; font-weight: 550; white-space: nowrap;
|
|
323
|
+
background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);
|
|
324
|
+
}
|
|
325
|
+
.wd-shell .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-slate); flex: none; }
|
|
326
|
+
.wd-shell .tone-blue { background: var(--wd-primary-soft); color: var(--wd-primary); }
|
|
327
|
+
.wd-shell .tone-blue .status-dot { background: var(--wd-primary); }
|
|
328
|
+
.wd-shell .tone-green { background: var(--wd-green-soft); color: var(--wd-green); }
|
|
329
|
+
.wd-shell .tone-green .status-dot { background: var(--wd-green); }
|
|
330
|
+
.wd-shell .tone-amber { background: var(--wd-amber-soft); color: var(--wd-amber); }
|
|
331
|
+
.wd-shell .tone-amber .status-dot { background: var(--wd-amber); }
|
|
332
|
+
.wd-shell .tone-red { background: var(--wd-red-soft); color: var(--wd-red); }
|
|
333
|
+
.wd-shell .tone-red .status-dot { background: var(--wd-red); }
|
|
334
|
+
.wd-shell .tone-slate { background: var(--wd-slate-soft); color: var(--wd-slate); }
|
|
335
|
+
.wd-shell .tone-slate .status-dot { background: var(--wd-slate); }
|
|
336
|
+
.wd-shell .is-muted { color: var(--dsw-alias-label-tertiary); font-style: italic; }
|
|
337
|
+
.wd-shell .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
|
|
338
|
+
.wd-shell .prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }
|
|
339
|
+
|
|
340
|
+
/* ---------- empty / failure ---------- */
|
|
341
|
+
.wd-shell .empty-state {
|
|
342
|
+
margin: 0 auto; max-width: 440px; padding: 56px 24px;
|
|
343
|
+
text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px;
|
|
344
|
+
}
|
|
345
|
+
.wd-shell .empty-icon {
|
|
346
|
+
width: 76px; height: 76px; border-radius: 18px;
|
|
347
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-surface);
|
|
348
|
+
display: flex; align-items: center; justify-content: center;
|
|
349
|
+
color: var(--dsw-alias-label-tertiary); margin-bottom: 10px;
|
|
350
|
+
box-shadow: var(--wd-shadow-2);
|
|
351
|
+
}
|
|
352
|
+
.wd-shell .empty-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 650; }
|
|
353
|
+
.wd-shell .empty-copy { margin: 0 0 12px; font-size: 12.5px; line-height: 19px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
354
|
+
.wd-shell .empty-meta { margin-top: 16px; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
|
|
355
|
+
.wd-shell .failure {
|
|
356
|
+
border: 1px solid var(--wd-red-soft); border-radius: 10px;
|
|
357
|
+
background: var(--wd-red-soft); padding: 13px 15px;
|
|
358
|
+
display: flex; align-items: flex-start; gap: 11px;
|
|
359
|
+
border-left: 3px solid var(--wd-red);
|
|
360
|
+
}
|
|
361
|
+
.wd-shell .failure-text { min-width: 0; flex: 1 1 auto; }
|
|
362
|
+
.wd-shell .failure-title { font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-red); }
|
|
363
|
+
.wd-shell .failure-reason { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
364
|
+
.wd-shell .spinner {
|
|
365
|
+
display: inline-block; width: 12px; height: 12px;
|
|
366
|
+
border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
|
|
367
|
+
animation: wd-spin .9s linear infinite; opacity: .8;
|
|
368
|
+
}
|
|
369
|
+
@keyframes wd-spin { to { transform: rotate(360deg); } }
|
|
370
|
+
|
|
371
|
+
/* ---------- settings modal ---------- */
|
|
372
|
+
.wd-shell .modal-overlay {
|
|
373
|
+
position: fixed; inset: 0; z-index: 40;
|
|
374
|
+
display: flex; align-items: center; justify-content: center; padding: 24px;
|
|
375
|
+
background: rgba(12, 18, 28, .46);
|
|
376
|
+
backdrop-filter: blur(2px);
|
|
377
|
+
}
|
|
378
|
+
.wd-shell .modal {
|
|
379
|
+
width: min(452px, 100%); max-height: 86vh;
|
|
380
|
+
display: flex; flex-direction: column;
|
|
381
|
+
border-radius: 14px; border: 1px solid var(--dsw-alias-border-l2);
|
|
382
|
+
background: var(--wd-surface);
|
|
383
|
+
box-shadow: var(--wd-shadow-3);
|
|
384
|
+
overflow: hidden;
|
|
385
|
+
}
|
|
386
|
+
.wd-shell .modal-header { display: flex; align-items: center; gap: 9px; padding: 15px 19px; border-bottom: 1px solid var(--wd-hairline); }
|
|
387
|
+
.wd-shell .modal-title { margin: 0; font-size: 14.5px; line-height: 21px; font-weight: 650; }
|
|
388
|
+
.wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }
|
|
389
|
+
.wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }
|
|
390
|
+
.wd-shell .modal-footer .spacer { flex: 1 1 auto; }
|
|
391
|
+
.wd-shell .checkbox-row {
|
|
392
|
+
display: flex; align-items: center; gap: 10px;
|
|
393
|
+
padding: 9px 11px; border-radius: 8px; cursor: pointer;
|
|
394
|
+
border: 1px solid transparent; transition: background .11s ease, border-color .11s ease;
|
|
395
|
+
}
|
|
396
|
+
.wd-shell .checkbox-row:hover { background: var(--wd-inset); }
|
|
397
|
+
.wd-shell .checkbox-row[data-selected="true"] { border-color: var(--wd-hairline); background: var(--wd-inset); }
|
|
398
|
+
.wd-shell .checkbox-row input[type="radio"] { accent-color: var(--wd-primary); flex: none; margin: 0; }
|
|
399
|
+
.wd-shell .field { display: flex; flex-direction: column; gap: 5px; }
|
|
400
|
+
.wd-shell .field-label { font-size: 12px; color: var(--dsw-alias-label-secondary); }
|
|
401
|
+
.wd-shell .input {
|
|
402
|
+
height: 30px; width: 94px; padding: 0 10px; border-radius: 8px;
|
|
403
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-surface);
|
|
404
|
+
color: var(--wd-text); font-variant-numeric: tabular-nums;
|
|
405
|
+
}
|
|
406
|
+
.wd-shell .input:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }
|
|
407
|
+
.wd-shell .form-error { margin: 2px 0 0; font-size: 11.5px; color: var(--wd-red); }
|
|
408
|
+
.wd-shell .inline-field { display: flex; align-items: center; gap: 9px; padding: 4px 11px 4px 35px; }
|
|
409
|
+
.wd-shell .helper-box {
|
|
410
|
+
margin-top: 7px; padding: 9px 11px; border-radius: 8px;
|
|
411
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
412
|
+
font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* ---------- sidebar glyph ---------- */
|
|
416
|
+
.wd-glyph { display: block; }
|
|
417
|
+
|
|
418
|
+
@media (prefers-reduced-motion: reduce) {
|
|
419
|
+
.wd-shell .spinner { animation-duration: 2.4s; }
|
|
420
|
+
.wd-shell .btn, .wd-shell .filter-chip, .wd-shell .search-box, .wd-shell .view-switch-btn { transition: none; }
|
|
421
|
+
}
|
|
422
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart styles.
|
|
3
|
+
*
|
|
4
|
+
* Kept beside `charts.tsx` rather than in the page sheet so a chart's geometry
|
|
5
|
+
* and its paint rules stay one unit: the primitives read CSS custom properties
|
|
6
|
+
* for colour and set `flex-grow` / `width` inline for magnitude, so there is
|
|
7
|
+
* exactly one place per figure where size is decided.
|
|
8
|
+
*
|
|
9
|
+
* Every tone maps onto the shared `--wd-*` palette. Nothing here introduces a
|
|
10
|
+
* new semantic colour; a chart may only use primary / green / amber / red /
|
|
11
|
+
* slate and their soft variants, which is what keeps charts and badges
|
|
12
|
+
* speaking the same language.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CHARTS_CSS = "\n/* ---------- shared chart chrome ---------- */\n.wd-shell .chart-sr {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;\n}\n.wd-shell .chart-empty {\n display: flex; align-items: center; justify-content: center;\n min-height: 44px; border-radius: 8px;\n border: 1px dashed var(--wd-hairline);\n color: var(--dsw-alias-label-tertiary); font-size: 11.5px;\n}\n.wd-shell .chart-block { display: flex; flex-direction: column; gap: 9px; min-width: 0; }\n.wd-shell .chart-block-head { display: flex; align-items: baseline; gap: 8px; }\n.wd-shell .chart-block-title { margin: 0; font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.wd-shell .chart-block-note { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n\n/* ---------- stacked segment bar ---------- */\n.wd-shell .segbar { display: flex; flex-direction: column; gap: 6px; }\n.wd-shell .segbar-track {\n display: flex; width: 100%; height: 26px; overflow: hidden;\n border-radius: 7px; border: 1px solid var(--wd-hairline);\n background: var(--wd-inset);\n}\n.wd-shell .segbar-seg {\n display: flex; align-items: center; justify-content: center; gap: 5px;\n min-width: 3px; padding: 0 6px; overflow: hidden;\n font-size: 10.5px; font-weight: 600; white-space: nowrap;\n color: var(--dsw-alias-label-primary);\n background: var(--wd-slate-soft);\n border: 0; border-right: 1px solid rgba(255, 255, 255, .35);\n transition: filter .12s ease;\n}\n.wd-shell .segbar-seg:last-child { border-right: 0; }\n.wd-shell .segbar-seg[data-tone=\"blue\"] { background: var(--wd-primary-soft); color: var(--wd-primary-deep); }\n.wd-shell .segbar-seg[data-tone=\"green\"] { background: var(--wd-green-soft); color: var(--wd-green); }\n.wd-shell .segbar-seg[data-tone=\"amber\"] { background: var(--wd-amber-soft); color: var(--wd-amber); }\n.wd-shell .segbar-seg[data-tone=\"red\"] { background: var(--wd-red-soft); color: var(--wd-red); }\n.wd-shell .segbar-button { cursor: pointer; font-family: inherit; }\n.wd-shell .segbar-button:hover { filter: brightness(.96); }\n.wd-shell .segbar-seg[data-active=\"true\"] { box-shadow: inset 0 0 0 2px var(--wd-primary); }\n.wd-shell .segbar-label { overflow: hidden; text-overflow: ellipsis; }\n.wd-shell .segbar-value { font-variant-numeric: tabular-nums; font-weight: 650; }\n\n/* ---------- vertical columns ---------- */\n.wd-shell .columns { display: flex; align-items: flex-end; gap: 7px; }\n.wd-shell .columns-cell {\n flex: 1 1 0; min-width: 0;\n display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;\n padding: 0; border: 0; background: transparent; font-family: inherit;\n cursor: default;\n}\n.wd-shell .columns-cell[data-empty=\"true\"] { opacity: .42; }\n.wd-shell .columns-cell[data-active=\"true\"] .columns-fill { box-shadow: 0 0 0 2px var(--wd-primary-ring); }\n.wd-shell .columns-value { font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--dsw-alias-label-secondary); }\n.wd-shell .columns-fill {\n width: 100%; max-width: 40px; border-radius: 5px 5px 2px 2px;\n background: var(--wd-slate-soft); min-height: 3px;\n transition: filter .12s ease;\n}\n.wd-shell .columns-fill[data-tone=\"blue\"] { background: var(--wd-primary); opacity: .82; }\n.wd-shell .columns-fill[data-tone=\"green\"] { background: var(--wd-green); opacity: .82; }\n.wd-shell .columns-fill[data-tone=\"amber\"] { background: var(--wd-amber); opacity: .82; }\n.wd-shell .columns-fill[data-tone=\"red\"] { background: var(--wd-red); opacity: .82; }\n.wd-shell .columns-fill[data-tone=\"slate\"] { background: var(--wd-slate); opacity: .55; }\n.wd-shell .columns-label { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }\n\n/* ---------- donut ---------- */\n.wd-shell .donut { display: flex; align-items: center; gap: 14px; }\n.wd-shell .donut-figure { position: relative; flex: none; width: 84px; height: 84px; }\n.wd-shell .donut-svg { width: 84px; height: 84px; display: block; }\n.wd-shell .donut-ring { fill: none; stroke: var(--wd-hairline); stroke-width: 11; }\n.wd-shell .donut-slice { fill: none; stroke-width: 11; stroke-linecap: butt; }\n.wd-shell .donut-slice[data-tone=\"blue\"] { stroke: var(--wd-primary); }\n.wd-shell .donut-slice[data-tone=\"green\"] { stroke: var(--wd-green); }\n.wd-shell .donut-slice[data-tone=\"amber\"] { stroke: var(--wd-amber); }\n.wd-shell .donut-slice[data-tone=\"red\"] { stroke: var(--wd-red); }\n.wd-shell .donut-slice[data-tone=\"slate\"] { stroke: var(--wd-slate); }\n.wd-shell .donut-center {\n position: absolute; inset: 0; display: flex; flex-direction: column;\n align-items: center; justify-content: center; gap: 1px; pointer-events: none;\n}\n.wd-shell .donut-center-value { font-size: 16px; line-height: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }\n.wd-shell .donut-center-label { font-size: 9.5px; line-height: 13px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }\n.wd-shell .donut-legend-row {\n display: flex; align-items: center; gap: 7px; width: 100%;\n padding: 2px 5px; border: 0; border-radius: 6px; background: transparent;\n font-family: inherit; font-size: 11px; color: var(--dsw-alias-label-secondary);\n text-align: left; cursor: default;\n}\n.wd-shell .donut-legend-button { cursor: pointer; }\n.wd-shell .donut-legend-button:hover { background: var(--wd-inset); }\n.wd-shell .donut-legend-row[data-active=\"true\"] { background: var(--wd-primary-soft); color: var(--wd-primary-deep); }\n.wd-shell .donut-dot { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--wd-slate); }\n.wd-shell .donut-dot[data-tone=\"blue\"] { background: var(--wd-primary); }\n.wd-shell .donut-dot[data-tone=\"green\"] { background: var(--wd-green); }\n.wd-shell .donut-dot[data-tone=\"amber\"] { background: var(--wd-amber); }\n.wd-shell .donut-dot[data-tone=\"red\"] { background: var(--wd-red); }\n.wd-shell .donut-legend-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.wd-shell .donut-legend-value { flex: none; font-variant-numeric: tabular-nums; font-weight: 650; }\n\n/* ---------- horizontal bar list ---------- */\n.wd-shell .barlist { display: flex; flex-direction: column; gap: 2px; }\n.wd-shell .barlist-row {\n display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(40px, 1fr) 46px;\n align-items: center; gap: 9px; width: 100%;\n padding: 4px 6px; border: 0; border-radius: 6px; background: transparent;\n font-family: inherit; text-align: left; cursor: default;\n}\n.wd-shell .barlist-button { cursor: pointer; }\n.wd-shell .barlist-button:hover { background: var(--wd-inset); }\n.wd-shell .barlist-row[data-active=\"true\"] { background: var(--wd-primary-soft); }\n.wd-shell .barlist-text { display: flex; flex-direction: column; min-width: 0; }\n.wd-shell .barlist-label { font-size: 11.5px; line-height: 16px; color: var(--dsw-alias-label-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.wd-shell .barlist-note { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.wd-shell .barlist-track { height: 7px; border-radius: 4px; background: var(--wd-inset); overflow: hidden; }\n.wd-shell .barlist-fill { display: block; height: 100%; border-radius: 4px; background: var(--wd-slate); opacity: .7; }\n.wd-shell .barlist-fill[data-tone=\"blue\"] { background: var(--wd-primary); opacity: .9; }\n.wd-shell .barlist-fill[data-tone=\"green\"] { background: var(--wd-green); opacity: .9; }\n.wd-shell .barlist-fill[data-tone=\"amber\"] { background: var(--wd-amber); opacity: .9; }\n.wd-shell .barlist-fill[data-tone=\"red\"] { background: var(--wd-red); opacity: .9; }\n.wd-shell .barlist-value { font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; color: var(--dsw-alias-label-secondary); }\n\n/* ---------- radial meter ---------- */\n.wd-shell .radial { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }\n.wd-shell .radial-figure { position: relative; width: 58px; height: 58px; }\n.wd-shell .radial-figure svg { width: 58px; height: 58px; display: block; }\n.wd-shell .radial-track { fill: none; stroke: var(--wd-hairline); stroke-width: 6; }\n.wd-shell .radial-fill { fill: none; stroke-width: 6; stroke-linecap: round; }\n.wd-shell .radial-fill[data-tone=\"blue\"] { stroke: var(--wd-primary); }\n.wd-shell .radial-fill[data-tone=\"green\"] { stroke: var(--wd-green); }\n.wd-shell .radial-fill[data-tone=\"amber\"] { stroke: var(--wd-amber); }\n.wd-shell .radial-fill[data-tone=\"red\"] { stroke: var(--wd-red); }\n.wd-shell .radial-fill[data-tone=\"slate\"] { stroke: var(--wd-slate); }\n.wd-shell .radial-value {\n position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;\n font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;\n}\n.wd-shell .radial-label { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-secondary); white-space: nowrap; }\n.wd-shell .radial-note { font-size: 9.5px; line-height: 13px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n\n/* ---------- spark bars ---------- */\n.wd-shell .spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; }\n.wd-shell .spark-cell { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; height: 100%; }\n.wd-shell .spark-bar { width: 100%; max-width: 16px; border-radius: 3px 3px 1px 1px; background: var(--wd-primary); opacity: .78; min-height: 3px; }\n.wd-shell .spark-bar[data-empty=\"true\"] { background: var(--wd-hairline); opacity: 1; }\n.wd-shell .spark-month { font-size: 9px; line-height: 12px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n\n/* ---------- mini stage rail ---------- */\n.wd-shell .rail-mini { display: flex; align-items: center; gap: 3px; }\n.wd-shell .rail-mini-tick { width: 100%; max-width: 18px; height: 4px; border-radius: 2px; background: var(--wd-hairline); }\n.wd-shell .rail-mini-tick[data-done=\"true\"] { background: var(--wd-green); }\n.wd-shell .rail-mini-tick[data-current=\"true\"] { background: var(--wd-primary); box-shadow: 0 0 0 2px var(--wd-primary-ring); }\n\n/* ---------- inline meter ---------- */\n.wd-shell .inline-meter { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--wd-hairline); overflow: hidden; }\n.wd-shell .inline-meter-fill { display: block; height: 100%; border-radius: 2px; background: var(--wd-primary); }\n.wd-shell .inline-meter-fill[data-tone=\"green\"] { background: var(--wd-green); }\n.wd-shell .inline-meter-fill[data-tone=\"amber\"] { background: var(--wd-amber); }\n.wd-shell .inline-meter-fill[data-tone=\"red\"] { background: var(--wd-red); }\n.wd-shell .inline-meter-fill[data-tone=\"slate\"] { background: var(--wd-slate); }\n\n/* ---------- legend ---------- */\n.wd-shell .legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }\n.wd-shell .legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .legend-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--wd-slate); }\n.wd-shell .legend-dot[data-tone=\"blue\"] { background: var(--wd-primary); }\n.wd-shell .legend-dot[data-tone=\"green\"] { background: var(--wd-green); }\n.wd-shell .legend-dot[data-tone=\"amber\"] { background: var(--wd-amber); }\n.wd-shell .legend-dot[data-tone=\"red\"] { background: var(--wd-red); }\n.wd-shell .legend-label { color: var(--dsw-alias-label-secondary); }\n.wd-shell .legend-value { font-variant-numeric: tabular-nums; font-weight: 600; }\n\n@media (prefers-reduced-motion: reduce) {\n .wd-shell .segbar-seg, .wd-shell .columns-fill { transition: none; }\n}\n";
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart styles.
|
|
3
|
+
*
|
|
4
|
+
* Kept beside `charts.tsx` rather than in the page sheet so a chart's geometry
|
|
5
|
+
* and its paint rules stay one unit: the primitives read CSS custom properties
|
|
6
|
+
* for colour and set `flex-grow` / `width` inline for magnitude, so there is
|
|
7
|
+
* exactly one place per figure where size is decided.
|
|
8
|
+
*
|
|
9
|
+
* Every tone maps onto the shared `--wd-*` palette. Nothing here introduces a
|
|
10
|
+
* new semantic colour; a chart may only use primary / green / amber / red /
|
|
11
|
+
* slate and their soft variants, which is what keeps charts and badges
|
|
12
|
+
* speaking the same language.
|
|
13
|
+
*/
|
|
14
|
+
export const CHARTS_CSS = `
|
|
15
|
+
/* ---------- shared chart chrome ---------- */
|
|
16
|
+
.wd-shell .chart-sr {
|
|
17
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
18
|
+
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
|
|
19
|
+
}
|
|
20
|
+
.wd-shell .chart-empty {
|
|
21
|
+
display: flex; align-items: center; justify-content: center;
|
|
22
|
+
min-height: 44px; border-radius: 8px;
|
|
23
|
+
border: 1px dashed var(--wd-hairline);
|
|
24
|
+
color: var(--dsw-alias-label-tertiary); font-size: 11.5px;
|
|
25
|
+
}
|
|
26
|
+
.wd-shell .chart-block { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
|
|
27
|
+
.wd-shell .chart-block-head { display: flex; align-items: baseline; gap: 8px; }
|
|
28
|
+
.wd-shell .chart-block-title { margin: 0; font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--dsw-alias-label-secondary); }
|
|
29
|
+
.wd-shell .chart-block-note { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
30
|
+
|
|
31
|
+
/* ---------- stacked segment bar ---------- */
|
|
32
|
+
.wd-shell .segbar { display: flex; flex-direction: column; gap: 6px; }
|
|
33
|
+
.wd-shell .segbar-track {
|
|
34
|
+
display: flex; width: 100%; height: 26px; overflow: hidden;
|
|
35
|
+
border-radius: 7px; border: 1px solid var(--wd-hairline);
|
|
36
|
+
background: var(--wd-inset);
|
|
37
|
+
}
|
|
38
|
+
.wd-shell .segbar-seg {
|
|
39
|
+
display: flex; align-items: center; justify-content: center; gap: 5px;
|
|
40
|
+
min-width: 3px; padding: 0 6px; overflow: hidden;
|
|
41
|
+
font-size: 10.5px; font-weight: 600; white-space: nowrap;
|
|
42
|
+
color: var(--dsw-alias-label-primary);
|
|
43
|
+
background: var(--wd-slate-soft);
|
|
44
|
+
border: 0; border-right: 1px solid rgba(255, 255, 255, .35);
|
|
45
|
+
transition: filter .12s ease;
|
|
46
|
+
}
|
|
47
|
+
.wd-shell .segbar-seg:last-child { border-right: 0; }
|
|
48
|
+
.wd-shell .segbar-seg[data-tone="blue"] { background: var(--wd-primary-soft); color: var(--wd-primary-deep); }
|
|
49
|
+
.wd-shell .segbar-seg[data-tone="green"] { background: var(--wd-green-soft); color: var(--wd-green); }
|
|
50
|
+
.wd-shell .segbar-seg[data-tone="amber"] { background: var(--wd-amber-soft); color: var(--wd-amber); }
|
|
51
|
+
.wd-shell .segbar-seg[data-tone="red"] { background: var(--wd-red-soft); color: var(--wd-red); }
|
|
52
|
+
.wd-shell .segbar-button { cursor: pointer; font-family: inherit; }
|
|
53
|
+
.wd-shell .segbar-button:hover { filter: brightness(.96); }
|
|
54
|
+
.wd-shell .segbar-seg[data-active="true"] { box-shadow: inset 0 0 0 2px var(--wd-primary); }
|
|
55
|
+
.wd-shell .segbar-label { overflow: hidden; text-overflow: ellipsis; }
|
|
56
|
+
.wd-shell .segbar-value { font-variant-numeric: tabular-nums; font-weight: 650; }
|
|
57
|
+
|
|
58
|
+
/* ---------- vertical columns ---------- */
|
|
59
|
+
.wd-shell .columns { display: flex; align-items: flex-end; gap: 7px; }
|
|
60
|
+
.wd-shell .columns-cell {
|
|
61
|
+
flex: 1 1 0; min-width: 0;
|
|
62
|
+
display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
|
|
63
|
+
padding: 0; border: 0; background: transparent; font-family: inherit;
|
|
64
|
+
cursor: default;
|
|
65
|
+
}
|
|
66
|
+
.wd-shell .columns-cell[data-empty="true"] { opacity: .42; }
|
|
67
|
+
.wd-shell .columns-cell[data-active="true"] .columns-fill { box-shadow: 0 0 0 2px var(--wd-primary-ring); }
|
|
68
|
+
.wd-shell .columns-value { font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--dsw-alias-label-secondary); }
|
|
69
|
+
.wd-shell .columns-fill {
|
|
70
|
+
width: 100%; max-width: 40px; border-radius: 5px 5px 2px 2px;
|
|
71
|
+
background: var(--wd-slate-soft); min-height: 3px;
|
|
72
|
+
transition: filter .12s ease;
|
|
73
|
+
}
|
|
74
|
+
.wd-shell .columns-fill[data-tone="blue"] { background: var(--wd-primary); opacity: .82; }
|
|
75
|
+
.wd-shell .columns-fill[data-tone="green"] { background: var(--wd-green); opacity: .82; }
|
|
76
|
+
.wd-shell .columns-fill[data-tone="amber"] { background: var(--wd-amber); opacity: .82; }
|
|
77
|
+
.wd-shell .columns-fill[data-tone="red"] { background: var(--wd-red); opacity: .82; }
|
|
78
|
+
.wd-shell .columns-fill[data-tone="slate"] { background: var(--wd-slate); opacity: .55; }
|
|
79
|
+
.wd-shell .columns-label { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; }
|
|
80
|
+
|
|
81
|
+
/* ---------- donut ---------- */
|
|
82
|
+
.wd-shell .donut { display: flex; align-items: center; gap: 14px; }
|
|
83
|
+
.wd-shell .donut-figure { position: relative; flex: none; width: 84px; height: 84px; }
|
|
84
|
+
.wd-shell .donut-svg { width: 84px; height: 84px; display: block; }
|
|
85
|
+
.wd-shell .donut-ring { fill: none; stroke: var(--wd-hairline); stroke-width: 11; }
|
|
86
|
+
.wd-shell .donut-slice { fill: none; stroke-width: 11; stroke-linecap: butt; }
|
|
87
|
+
.wd-shell .donut-slice[data-tone="blue"] { stroke: var(--wd-primary); }
|
|
88
|
+
.wd-shell .donut-slice[data-tone="green"] { stroke: var(--wd-green); }
|
|
89
|
+
.wd-shell .donut-slice[data-tone="amber"] { stroke: var(--wd-amber); }
|
|
90
|
+
.wd-shell .donut-slice[data-tone="red"] { stroke: var(--wd-red); }
|
|
91
|
+
.wd-shell .donut-slice[data-tone="slate"] { stroke: var(--wd-slate); }
|
|
92
|
+
.wd-shell .donut-center {
|
|
93
|
+
position: absolute; inset: 0; display: flex; flex-direction: column;
|
|
94
|
+
align-items: center; justify-content: center; gap: 1px; pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
.wd-shell .donut-center-value { font-size: 16px; line-height: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
|
|
97
|
+
.wd-shell .donut-center-label { font-size: 9.5px; line-height: 13px; color: var(--dsw-alias-label-tertiary); }
|
|
98
|
+
.wd-shell .donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
|
|
99
|
+
.wd-shell .donut-legend-row {
|
|
100
|
+
display: flex; align-items: center; gap: 7px; width: 100%;
|
|
101
|
+
padding: 2px 5px; border: 0; border-radius: 6px; background: transparent;
|
|
102
|
+
font-family: inherit; font-size: 11px; color: var(--dsw-alias-label-secondary);
|
|
103
|
+
text-align: left; cursor: default;
|
|
104
|
+
}
|
|
105
|
+
.wd-shell .donut-legend-button { cursor: pointer; }
|
|
106
|
+
.wd-shell .donut-legend-button:hover { background: var(--wd-inset); }
|
|
107
|
+
.wd-shell .donut-legend-row[data-active="true"] { background: var(--wd-primary-soft); color: var(--wd-primary-deep); }
|
|
108
|
+
.wd-shell .donut-dot { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--wd-slate); }
|
|
109
|
+
.wd-shell .donut-dot[data-tone="blue"] { background: var(--wd-primary); }
|
|
110
|
+
.wd-shell .donut-dot[data-tone="green"] { background: var(--wd-green); }
|
|
111
|
+
.wd-shell .donut-dot[data-tone="amber"] { background: var(--wd-amber); }
|
|
112
|
+
.wd-shell .donut-dot[data-tone="red"] { background: var(--wd-red); }
|
|
113
|
+
.wd-shell .donut-legend-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
114
|
+
.wd-shell .donut-legend-value { flex: none; font-variant-numeric: tabular-nums; font-weight: 650; }
|
|
115
|
+
|
|
116
|
+
/* ---------- horizontal bar list ---------- */
|
|
117
|
+
.wd-shell .barlist { display: flex; flex-direction: column; gap: 2px; }
|
|
118
|
+
.wd-shell .barlist-row {
|
|
119
|
+
display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(40px, 1fr) 46px;
|
|
120
|
+
align-items: center; gap: 9px; width: 100%;
|
|
121
|
+
padding: 4px 6px; border: 0; border-radius: 6px; background: transparent;
|
|
122
|
+
font-family: inherit; text-align: left; cursor: default;
|
|
123
|
+
}
|
|
124
|
+
.wd-shell .barlist-button { cursor: pointer; }
|
|
125
|
+
.wd-shell .barlist-button:hover { background: var(--wd-inset); }
|
|
126
|
+
.wd-shell .barlist-row[data-active="true"] { background: var(--wd-primary-soft); }
|
|
127
|
+
.wd-shell .barlist-text { display: flex; flex-direction: column; min-width: 0; }
|
|
128
|
+
.wd-shell .barlist-label { font-size: 11.5px; line-height: 16px; color: var(--dsw-alias-label-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
129
|
+
.wd-shell .barlist-note { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
130
|
+
.wd-shell .barlist-track { height: 7px; border-radius: 4px; background: var(--wd-inset); overflow: hidden; }
|
|
131
|
+
.wd-shell .barlist-fill { display: block; height: 100%; border-radius: 4px; background: var(--wd-slate); opacity: .7; }
|
|
132
|
+
.wd-shell .barlist-fill[data-tone="blue"] { background: var(--wd-primary); opacity: .9; }
|
|
133
|
+
.wd-shell .barlist-fill[data-tone="green"] { background: var(--wd-green); opacity: .9; }
|
|
134
|
+
.wd-shell .barlist-fill[data-tone="amber"] { background: var(--wd-amber); opacity: .9; }
|
|
135
|
+
.wd-shell .barlist-fill[data-tone="red"] { background: var(--wd-red); opacity: .9; }
|
|
136
|
+
.wd-shell .barlist-value { font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; color: var(--dsw-alias-label-secondary); }
|
|
137
|
+
|
|
138
|
+
/* ---------- radial meter ---------- */
|
|
139
|
+
.wd-shell .radial { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
|
|
140
|
+
.wd-shell .radial-figure { position: relative; width: 58px; height: 58px; }
|
|
141
|
+
.wd-shell .radial-figure svg { width: 58px; height: 58px; display: block; }
|
|
142
|
+
.wd-shell .radial-track { fill: none; stroke: var(--wd-hairline); stroke-width: 6; }
|
|
143
|
+
.wd-shell .radial-fill { fill: none; stroke-width: 6; stroke-linecap: round; }
|
|
144
|
+
.wd-shell .radial-fill[data-tone="blue"] { stroke: var(--wd-primary); }
|
|
145
|
+
.wd-shell .radial-fill[data-tone="green"] { stroke: var(--wd-green); }
|
|
146
|
+
.wd-shell .radial-fill[data-tone="amber"] { stroke: var(--wd-amber); }
|
|
147
|
+
.wd-shell .radial-fill[data-tone="red"] { stroke: var(--wd-red); }
|
|
148
|
+
.wd-shell .radial-fill[data-tone="slate"] { stroke: var(--wd-slate); }
|
|
149
|
+
.wd-shell .radial-value {
|
|
150
|
+
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
|
151
|
+
font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;
|
|
152
|
+
}
|
|
153
|
+
.wd-shell .radial-label { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-secondary); white-space: nowrap; }
|
|
154
|
+
.wd-shell .radial-note { font-size: 9.5px; line-height: 13px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
155
|
+
|
|
156
|
+
/* ---------- spark bars ---------- */
|
|
157
|
+
.wd-shell .spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; }
|
|
158
|
+
.wd-shell .spark-cell { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; height: 100%; }
|
|
159
|
+
.wd-shell .spark-bar { width: 100%; max-width: 16px; border-radius: 3px 3px 1px 1px; background: var(--wd-primary); opacity: .78; min-height: 3px; }
|
|
160
|
+
.wd-shell .spark-bar[data-empty="true"] { background: var(--wd-hairline); opacity: 1; }
|
|
161
|
+
.wd-shell .spark-month { font-size: 9px; line-height: 12px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
162
|
+
|
|
163
|
+
/* ---------- mini stage rail ---------- */
|
|
164
|
+
.wd-shell .rail-mini { display: flex; align-items: center; gap: 3px; }
|
|
165
|
+
.wd-shell .rail-mini-tick { width: 100%; max-width: 18px; height: 4px; border-radius: 2px; background: var(--wd-hairline); }
|
|
166
|
+
.wd-shell .rail-mini-tick[data-done="true"] { background: var(--wd-green); }
|
|
167
|
+
.wd-shell .rail-mini-tick[data-current="true"] { background: var(--wd-primary); box-shadow: 0 0 0 2px var(--wd-primary-ring); }
|
|
168
|
+
|
|
169
|
+
/* ---------- inline meter ---------- */
|
|
170
|
+
.wd-shell .inline-meter { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--wd-hairline); overflow: hidden; }
|
|
171
|
+
.wd-shell .inline-meter-fill { display: block; height: 100%; border-radius: 2px; background: var(--wd-primary); }
|
|
172
|
+
.wd-shell .inline-meter-fill[data-tone="green"] { background: var(--wd-green); }
|
|
173
|
+
.wd-shell .inline-meter-fill[data-tone="amber"] { background: var(--wd-amber); }
|
|
174
|
+
.wd-shell .inline-meter-fill[data-tone="red"] { background: var(--wd-red); }
|
|
175
|
+
.wd-shell .inline-meter-fill[data-tone="slate"] { background: var(--wd-slate); }
|
|
176
|
+
|
|
177
|
+
/* ---------- legend ---------- */
|
|
178
|
+
.wd-shell .legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
|
|
179
|
+
.wd-shell .legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
|
|
180
|
+
.wd-shell .legend-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--wd-slate); }
|
|
181
|
+
.wd-shell .legend-dot[data-tone="blue"] { background: var(--wd-primary); }
|
|
182
|
+
.wd-shell .legend-dot[data-tone="green"] { background: var(--wd-green); }
|
|
183
|
+
.wd-shell .legend-dot[data-tone="amber"] { background: var(--wd-amber); }
|
|
184
|
+
.wd-shell .legend-dot[data-tone="red"] { background: var(--wd-red); }
|
|
185
|
+
.wd-shell .legend-label { color: var(--dsw-alias-label-secondary); }
|
|
186
|
+
.wd-shell .legend-value { font-variant-numeric: tabular-nums; font-weight: 600; }
|
|
187
|
+
|
|
188
|
+
@media (prefers-reduced-motion: reduce) {
|
|
189
|
+
.wd-shell .segbar-seg, .wd-shell .columns-fill { transition: none; }
|
|
190
|
+
}
|
|
191
|
+
`;
|