@profpowell/vb-project-planning 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -0
  3. package/dist/vb-project-planning.css +1603 -0
  4. package/dist/vb-project-planning.js +11138 -0
  5. package/dist/vb-project-planning.min.css +1 -0
  6. package/dist/vb-project-planning.min.js +3312 -0
  7. package/package.json +80 -0
  8. package/src/index.css +14 -0
  9. package/src/index.js +26 -0
  10. package/src/lib/bundle-registry.js +156 -0
  11. package/src/lib/diff-by-key.js +86 -0
  12. package/src/lib/portrait-url.js +87 -0
  13. package/src/lib/vb-collection.js +122 -0
  14. package/src/lib/vb-element.js +96 -0
  15. package/src/lib/vb-store.js +200 -0
  16. package/src/lib/vb-view-transition.js +44 -0
  17. package/src/utils/copy-init.js +287 -0
  18. package/src/web-components/_ux-base.js +106 -0
  19. package/src/web-components/adr-wc/README.md +77 -0
  20. package/src/web-components/adr-wc/api.json +26 -0
  21. package/src/web-components/adr-wc/logic.js +376 -0
  22. package/src/web-components/adr-wc/static.html +17 -0
  23. package/src/web-components/adr-wc/styles.js +338 -0
  24. package/src/web-components/burndown-chart/api.json +74 -0
  25. package/src/web-components/burndown-chart/logic.js +198 -0
  26. package/src/web-components/burndown-chart/static.html +31 -0
  27. package/src/web-components/burndown-chart/styles.css +59 -0
  28. package/src/web-components/capacity-plan/_capacity-utils.js +56 -0
  29. package/src/web-components/capacity-plan/api.json +20 -0
  30. package/src/web-components/capacity-plan/logic.js +222 -0
  31. package/src/web-components/capacity-plan/static.html +24 -0
  32. package/src/web-components/capacity-plan/styles.css +84 -0
  33. package/src/web-components/empathy-map/api.json +31 -0
  34. package/src/web-components/empathy-map/logic.js +502 -0
  35. package/src/web-components/empathy-map/static.html +32 -0
  36. package/src/web-components/empathy-map/styles.js +534 -0
  37. package/src/web-components/gantt-chart/README.md +91 -0
  38. package/src/web-components/gantt-chart/api.json +20 -0
  39. package/src/web-components/gantt-chart/logic.js +812 -0
  40. package/src/web-components/gantt-chart/static.html +60 -0
  41. package/src/web-components/gantt-chart/styles.css +391 -0
  42. package/src/web-components/impact-effort/api.json +21 -0
  43. package/src/web-components/impact-effort/logic.js +392 -0
  44. package/src/web-components/impact-effort/static.html +23 -0
  45. package/src/web-components/impact-effort/styles.css +193 -0
  46. package/src/web-components/iron-triangle/_capacity.js +83 -0
  47. package/src/web-components/iron-triangle/_triangle-geometry.js +322 -0
  48. package/src/web-components/iron-triangle/api.json +26 -0
  49. package/src/web-components/iron-triangle/logic.js +474 -0
  50. package/src/web-components/iron-triangle/static.html +28 -0
  51. package/src/web-components/iron-triangle/styles.css +158 -0
  52. package/src/web-components/kanban-board/api.json +24 -0
  53. package/src/web-components/kanban-board/logic.js +698 -0
  54. package/src/web-components/kanban-board/static.html +20 -0
  55. package/src/web-components/kanban-board/styles.css +242 -0
  56. package/src/web-components/product-roadmap/api.json +118 -0
  57. package/src/web-components/product-roadmap/logic.js +460 -0
  58. package/src/web-components/product-roadmap/static.html +44 -0
  59. package/src/web-components/product-roadmap/styles.css +158 -0
  60. package/src/web-components/quadrant-grid/api.json +125 -0
  61. package/src/web-components/quadrant-grid/logic.js +397 -0
  62. package/src/web-components/quadrant-grid/static.html +49 -0
  63. package/src/web-components/quadrant-grid/styles.css +184 -0
  64. package/src/web-components/quality-target/_quality-utils.js +460 -0
  65. package/src/web-components/quality-target/api.json +30 -0
  66. package/src/web-components/quality-target/logic.js +516 -0
  67. package/src/web-components/quality-target/static.html +22 -0
  68. package/src/web-components/quality-target/styles.css +203 -0
  69. package/src/web-components/requirement-card/api.json +25 -0
  70. package/src/web-components/requirement-card/logic.js +166 -0
  71. package/src/web-components/requirement-card/static.html +36 -0
  72. package/src/web-components/requirement-card/styles.js +114 -0
  73. package/src/web-components/review-surface/README.md +178 -0
  74. package/src/web-components/review-surface/api.json +30 -0
  75. package/src/web-components/review-surface/logic.js +807 -0
  76. package/src/web-components/review-surface/static.html +33 -0
  77. package/src/web-components/review-surface/styles.js +459 -0
  78. package/src/web-components/risk-register/api.json +47 -0
  79. package/src/web-components/risk-register/logic.js +180 -0
  80. package/src/web-components/risk-register/static.html +46 -0
  81. package/src/web-components/risk-register/styles.css +37 -0
  82. package/src/web-components/story-map/api.json +22 -0
  83. package/src/web-components/story-map/logic.js +445 -0
  84. package/src/web-components/story-map/static.html +35 -0
  85. package/src/web-components/story-map/styles.css +169 -0
  86. package/src/web-components/traceability-matrix/api.json +84 -0
  87. package/src/web-components/traceability-matrix/logic.js +243 -0
  88. package/src/web-components/traceability-matrix/static.html +41 -0
  89. package/src/web-components/traceability-matrix/styles.css +94 -0
  90. package/src/web-components/user-journey/api.json +84 -0
  91. package/src/web-components/user-journey/logic.js +368 -0
  92. package/src/web-components/user-journey/static.html +14 -0
  93. package/src/web-components/user-journey/styles.js +317 -0
  94. package/src/web-components/user-persona/api.json +35 -0
  95. package/src/web-components/user-persona/logic.js +502 -0
  96. package/src/web-components/user-persona/static.html +20 -0
  97. package/src/web-components/user-persona/styles.js +299 -0
  98. package/src/web-components/user-story/api.json +35 -0
  99. package/src/web-components/user-story/logic.js +567 -0
  100. package/src/web-components/user-story/static.html +27 -0
  101. package/src/web-components/user-story/styles.js +332 -0
  102. package/src/web-components/work-item/README.md +85 -0
  103. package/src/web-components/work-item/api.json +30 -0
  104. package/src/web-components/work-item/logic.js +414 -0
  105. package/src/web-components/work-item/static.html +24 -0
  106. package/src/web-components/work-item/styles.js +376 -0
@@ -0,0 +1,376 @@
1
+ /**
2
+ * Shadow DOM styles for <work-item>
3
+ *
4
+ * 3-tier token pattern:
5
+ * var(--work-item-*, var(--color-*, fallback))
6
+ *
7
+ * Sibling component to user-story — shares visual language
8
+ * but displays engineering work (tasks, bugs, chores, spikes)
9
+ * instead of agile stories.
10
+ */
11
+ const styles = `
12
+ :host {
13
+ --_bg: var(--work-item-bg, var(--color-surface, #ffffff));
14
+ --_text: var(--work-item-text, var(--color-text, #1a1a1a));
15
+ --_muted: var(--work-item-muted, var(--color-text-muted, #666));
16
+ --_border: var(--work-item-border, var(--color-border, #e0e0e0));
17
+ --_accent: var(--work-item-accent, var(--color-interactive, #0066cc));
18
+ --_card-bg: var(--work-item-card-bg, var(--color-surface-raised, #f8f9fa));
19
+ --_highlight: var(--work-item-highlight, color-mix(in srgb, var(--_accent) 8%, transparent));
20
+ --_radius: var(--work-item-radius, var(--radius-l, 0.75rem));
21
+ --_shadow: var(--work-item-shadow, var(--shadow-sm));
22
+ --_shadow-hover: var(--work-item-shadow-hover, var(--shadow-md));
23
+ --_duration: var(--work-item-duration, var(--duration-normal, 200ms));
24
+ --_ease: var(--work-item-ease, var(--ease-default, ease));
25
+ --_space-2xs: var(--work-item-space-2xs, var(--size-2xs, 0.25rem));
26
+ --_space-xs: var(--work-item-space-xs, var(--size-xs, 0.5rem));
27
+ --_space-s: var(--work-item-space-s, var(--size-s, 0.75rem));
28
+ --_space-m: var(--work-item-space-m, var(--size-m, 1rem));
29
+ --_font-xs: var(--work-item-font-xs, var(--font-size-xs, 0.75rem));
30
+ --_font-sm: var(--work-item-font-sm, var(--font-size-sm, 0.875rem));
31
+ --_font-md: var(--work-item-font-md, var(--font-size-md, 1rem));
32
+ --_font-lg: var(--work-item-font-lg, var(--font-size-lg, 1.125rem));
33
+ --_font-mono: var(--work-item-font-mono, var(--font-mono, ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace));
34
+ --_radius-s: var(--work-item-radius-s, var(--radius-s, 0.25rem));
35
+ --_radius-full: var(--work-item-radius-full, var(--radius-full, 9999px));
36
+
37
+ display: block;
38
+ font-family: var(--work-item-font, var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
39
+ }
40
+
41
+ *, *::before, *::after { box-sizing: border-box; margin: 0; }
42
+
43
+ /* ── Card ──────────────────────────────────────────── */
44
+ .wi-card {
45
+ background: var(--_bg);
46
+ border: 1px solid var(--_border);
47
+ border-radius: var(--_radius);
48
+ overflow: hidden;
49
+ box-shadow: var(--_shadow);
50
+ transition: box-shadow var(--_duration) var(--_ease);
51
+ }
52
+
53
+ .wi-card:hover {
54
+ box-shadow: var(--_shadow-hover);
55
+ }
56
+
57
+ /* ── Header ────────────────────────────────────────── */
58
+ .wi-header {
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: space-between;
62
+ padding: var(--_space-s) var(--_space-m);
63
+ background: var(--_card-bg);
64
+ border-block-end: 1px solid var(--_border);
65
+ gap: var(--_space-s);
66
+ flex-wrap: wrap;
67
+ }
68
+
69
+ .wi-meta {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: var(--_space-xs);
73
+ flex-wrap: wrap;
74
+ min-width: 0;
75
+ }
76
+
77
+ .wi-id {
78
+ font-size: var(--_font-xs);
79
+ font-weight: 600;
80
+ color: var(--_muted);
81
+ font-family: var(--_font-mono);
82
+ }
83
+
84
+ /* ── Type badge ────────────────────────────────────── */
85
+ .wi-type {
86
+ display: inline-flex;
87
+ align-items: center;
88
+ gap: 4px;
89
+ font-size: 11px;
90
+ font-weight: 600;
91
+ padding: 3px 8px;
92
+ border-radius: var(--_radius-s);
93
+ text-transform: capitalize;
94
+ }
95
+
96
+ .wi-type svg {
97
+ width: 12px;
98
+ height: 12px;
99
+ }
100
+
101
+ /* Type colors — driven by VB theme tokens, with color-mix surfaces so the
102
+ pill background shifts with the active theme. */
103
+ .wi-type[data-type="task"] { color: var(--color-info, #3b82f6); background: color-mix(in oklch, var(--color-info, #3b82f6) 12%, transparent); }
104
+ .wi-type[data-type="bug"] { color: var(--color-error, #dc2626); background: color-mix(in oklch, var(--color-error, #dc2626) 12%, transparent); }
105
+ .wi-type[data-type="chore"] { color: var(--color-text-muted, #6b7280); background: color-mix(in oklch, var(--color-text-muted, #6b7280) 12%, transparent); }
106
+ .wi-type[data-type="spike"] { color: var(--color-accent, #8b5cf6); background: color-mix(in oklch, var(--color-accent, #8b5cf6) 12%, transparent); }
107
+ .wi-type[data-type="feature"] { color: var(--color-success, #059669); background: color-mix(in oklch, var(--color-success, #059669) 12%, transparent); }
108
+
109
+ /* ── Badges ────────────────────────────────────────── */
110
+ .wi-badges {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: var(--_space-xs);
114
+ }
115
+
116
+ .wi-priority,
117
+ .wi-status {
118
+ font-size: 11px;
119
+ padding: 4px 10px;
120
+ border-radius: var(--_radius-full);
121
+ font-weight: 600;
122
+ text-transform: uppercase;
123
+ letter-spacing: 0.3px;
124
+ }
125
+
126
+ .wi-estimate {
127
+ width: 28px;
128
+ height: 28px;
129
+ border-radius: var(--_radius-full);
130
+ background: var(--_accent);
131
+ color: white;
132
+ font-size: var(--_font-xs);
133
+ font-weight: 700;
134
+ display: flex;
135
+ align-items: center;
136
+ justify-content: center;
137
+ }
138
+
139
+ /* ── Body ──────────────────────────────────────────── */
140
+ .wi-body {
141
+ padding: 16px 20px;
142
+ }
143
+
144
+ .wi-title-wrap {
145
+ margin-block-end: var(--_space-xs);
146
+ }
147
+
148
+ .wi-title-wrap:last-child {
149
+ margin-block-end: 0;
150
+ }
151
+
152
+ ::slotted([slot="title"]) {
153
+ font-size: var(--_font-lg) !important;
154
+ font-weight: 700 !important;
155
+ color: var(--_text) !important;
156
+ line-height: 1.4 !important;
157
+ margin: 0 !important;
158
+ }
159
+
160
+ .wi-title-fallback {
161
+ font-size: var(--_font-lg);
162
+ font-weight: 700;
163
+ color: var(--_text);
164
+ line-height: 1.4;
165
+ }
166
+
167
+ .wi-title:last-child {
168
+ margin-block-end: 0;
169
+ }
170
+
171
+ /* ── Assignee ──────────────────────────────────────── */
172
+ .wi-assignee {
173
+ display: inline-flex;
174
+ align-items: center;
175
+ gap: 5px;
176
+ font-size: var(--_font-xs);
177
+ color: var(--_muted);
178
+ margin-block-start: var(--_space-xs);
179
+ }
180
+
181
+ .wi-assignee__avatar {
182
+ width: 20px;
183
+ height: 20px;
184
+ border-radius: var(--_radius-full);
185
+ font-size: 9px;
186
+ font-weight: 700;
187
+ display: flex;
188
+ align-items: center;
189
+ justify-content: center;
190
+ color: var(--color-text-inverted, #fff);
191
+ flex-shrink: 0;
192
+ }
193
+
194
+ /* ── Linked stories ────────────────────────────────── */
195
+ .wi-links {
196
+ display: flex;
197
+ flex-wrap: wrap;
198
+ gap: 4px;
199
+ margin-block-start: var(--_space-s);
200
+ }
201
+
202
+ .wi-link {
203
+ display: inline-flex;
204
+ align-items: center;
205
+ gap: 3px;
206
+ font-size: 11px;
207
+ font-weight: 500;
208
+ padding: 2px 8px;
209
+ border-radius: var(--_radius-s);
210
+ background: var(--_highlight);
211
+ color: var(--_accent);
212
+ text-decoration: none;
213
+ }
214
+
215
+ .wi-link:hover {
216
+ text-decoration: underline;
217
+ }
218
+
219
+ .wi-link svg {
220
+ width: 11px;
221
+ height: 11px;
222
+ }
223
+
224
+ /* ── Sections ──────────────────────────────────────── */
225
+ .wi-sections {
226
+ border-block-start: 1px solid var(--_border);
227
+ }
228
+
229
+ .wi-section {
230
+ padding: 14px 20px;
231
+ border-block-end: 1px solid var(--_border);
232
+ }
233
+
234
+ .wi-section:last-child {
235
+ border-block-end: none;
236
+ }
237
+
238
+ .wi-section-header {
239
+ display: flex;
240
+ align-items: center;
241
+ gap: var(--_space-xs);
242
+ margin-block-end: var(--_space-s);
243
+ }
244
+
245
+ .wi-section-icon {
246
+ width: 22px;
247
+ height: 22px;
248
+ border-radius: 5px;
249
+ display: flex;
250
+ align-items: center;
251
+ justify-content: center;
252
+ }
253
+
254
+ .wi-section-icon svg {
255
+ width: 13px;
256
+ height: 13px;
257
+ fill: var(--color-text-inverted, #fff);
258
+ }
259
+
260
+ .wi-section-icon.description { background: var(--color-info, #3b82f6); }
261
+ .wi-section-icon.checklist { background: var(--color-success, #22c55e); }
262
+ .wi-section-icon.notes { background: var(--color-warning, #f59e0b); }
263
+
264
+ .wi-section-title {
265
+ font-size: var(--_font-xs);
266
+ font-weight: 600;
267
+ color: var(--_muted);
268
+ text-transform: uppercase;
269
+ letter-spacing: 0.5px;
270
+ }
271
+
272
+ .wi-section-content {
273
+ color: var(--_text);
274
+ font-size: var(--_font-sm);
275
+ line-height: 1.6;
276
+ }
277
+
278
+ .wi-section-content ::slotted(ul),
279
+ .wi-section-content ::slotted(ol) {
280
+ margin: 0;
281
+ padding-inline-start: 20px;
282
+ }
283
+
284
+ .wi-section-content ::slotted(p) {
285
+ margin: 0;
286
+ }
287
+
288
+ .slot-fallback {
289
+ color: var(--_muted);
290
+ font-style: italic;
291
+ }
292
+
293
+ /* ── Minimal detail ────────────────────────────────── */
294
+ .wi-card--minimal {
295
+ padding: var(--_space-xs);
296
+ cursor: pointer;
297
+ }
298
+
299
+ .wi-card--minimal:hover {
300
+ box-shadow: var(--_shadow-hover);
301
+ }
302
+
303
+ .wi-card--minimal:focus-visible {
304
+ outline: 2px solid var(--_accent);
305
+ outline-offset: 2px;
306
+ }
307
+
308
+ .wi-card--minimal .wi-header { display: none; }
309
+ .wi-card--minimal .wi-sections { display: none; }
310
+ .wi-card--minimal .wi-links { display: none; }
311
+ .wi-card--minimal .wi-assignee { display: none; }
312
+
313
+ .wi-card--minimal .wi-body {
314
+ padding: var(--_space-xs) var(--_space-s);
315
+ }
316
+
317
+ .wi-card--minimal .wi-title-fallback,
318
+ .wi-card--minimal ::slotted([slot="title"]) {
319
+ font-size: var(--_font-sm) !important;
320
+ font-weight: 600 !important;
321
+ }
322
+
323
+ .wi-card--minimal .wi-id {
324
+ display: block;
325
+ margin-block-end: var(--_space-2xs);
326
+ }
327
+
328
+ .wi-card--minimal .wi-type {
329
+ font-size: 10px;
330
+ padding: 2px 6px;
331
+ }
332
+
333
+ /* ── Compact detail — hide empty sections ──────────── */
334
+ .wi-card--compact .wi-section[data-empty] {
335
+ display: none;
336
+ }
337
+
338
+ .wi-card--compact .slot-fallback {
339
+ display: none;
340
+ }
341
+
342
+ .wi-card--compact .wi-body {
343
+ padding: var(--_space-s) var(--_space-m);
344
+ }
345
+
346
+ /* ── Responsive ────────────────────────────────────── */
347
+ @media (max-width: 480px) {
348
+ .wi-header {
349
+ flex-direction: column;
350
+ align-items: flex-start;
351
+ }
352
+
353
+ .wi-badges {
354
+ width: 100%;
355
+ justify-content: flex-start;
356
+ }
357
+ }
358
+
359
+ @media (prefers-reduced-motion: reduce) {
360
+ .wi-card {
361
+ transition: none;
362
+ }
363
+ }
364
+
365
+ @media print {
366
+ .wi-card {
367
+ box-shadow: none;
368
+ break-inside: avoid;
369
+ }
370
+ }
371
+
372
+ .state-msg { padding: var(--_space-m); font-size: var(--_font-sm); color: var(--_muted); font-style: italic; }
373
+ .state-msg--error { color: var(--color-error-text, var(--color-error, #dc2626)); }
374
+ `;
375
+
376
+ export { styles };