vanilla-breeze 0.3.0 → 0.3.1
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/dist/cdn/components/settings-panel.js +1 -1
- package/dist/cdn/themes/8bit.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999.tokens.json +1 -1
- package/dist/cdn/themes/anthropic.tokens.json +1 -1
- package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
- package/dist/cdn/themes/art-deco.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus.tokens.json +1 -1
- package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
- package/dist/cdn/themes/brutalist.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
- package/dist/cdn/themes/classic-dark.tokens.json +1 -1
- package/dist/cdn/themes/classic.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism.tokens.json +1 -1
- package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
- package/dist/cdn/themes/clinical.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +1 -1
- package/dist/cdn/themes/cyber.tokens.json +1 -1
- package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
- package/dist/cdn/themes/dawn.tokens.json +1 -1
- package/dist/cdn/themes/dracula.tokens.json +1 -1
- package/dist/cdn/themes/dusk.tokens.json +1 -1
- package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
- package/dist/cdn/themes/editorial.tokens.json +1 -1
- package/dist/cdn/themes/financial-dark.tokens.json +1 -1
- package/dist/cdn/themes/financial.tokens.json +1 -1
- package/dist/cdn/themes/genai.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
- package/dist/cdn/themes/government-dark.tokens.json +1 -1
- package/dist/cdn/themes/government.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox.tokens.json +1 -1
- package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
- package/dist/cdn/themes/high-noon.tokens.json +1 -1
- package/dist/cdn/themes/ibm.tokens.json +1 -1
- package/dist/cdn/themes/journal-dark.tokens.json +1 -1
- package/dist/cdn/themes/journal.tokens.json +1 -1
- package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
- package/dist/cdn/themes/kawaii.tokens.json +1 -1
- package/dist/cdn/themes/magna-dark.tokens.json +1 -1
- package/dist/cdn/themes/magna.tokens.json +1 -1
- package/dist/cdn/themes/mcdonalds.tokens.json +1 -1
- package/dist/cdn/themes/midnight.tokens.json +1 -1
- package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
- package/dist/cdn/themes/minimal.tokens.json +1 -1
- package/dist/cdn/themes/modern-dark.tokens.json +1 -1
- package/dist/cdn/themes/modern.tokens.json +1 -1
- package/dist/cdn/themes/nes-dark.tokens.json +1 -1
- package/dist/cdn/themes/nes.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism.tokens.json +1 -1
- package/dist/cdn/themes/nord-dark.tokens.json +1 -1
- package/dist/cdn/themes/nord.tokens.json +1 -1
- package/dist/cdn/themes/organic-dark.tokens.json +1 -1
- package/dist/cdn/themes/organic.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine.tokens.json +1 -1
- package/dist/cdn/themes/rough-dark.tokens.json +1 -1
- package/dist/cdn/themes/rough.tokens.json +1 -1
- package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
- package/dist/cdn/themes/solarized.tokens.json +1 -1
- package/dist/cdn/themes/starbucks.tokens.json +1 -1
- package/dist/cdn/themes/startup-dark.tokens.json +1 -1
- package/dist/cdn/themes/startup.tokens.json +1 -1
- package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
- package/dist/cdn/themes/super2026.tokens.json +1 -1
- package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
- package/dist/cdn/themes/swiss.tokens.json +1 -1
- package/dist/cdn/themes/terminal.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave.tokens.json +1 -1
- package/dist/cdn/themes/win9x-dark.tokens.json +1 -1
- package/dist/cdn/themes/win9x.tokens.json +1 -1
- package/dist/cdn/vanilla-breeze-core.js +1 -1
- package/dist/cdn/vanilla-breeze.js +1 -1
- package/package.json +1 -1
- package/dist/cdn/components/accessibility-specimen.js +0 -11
- package/dist/cdn/components/adr-wc.js +0 -403
- package/dist/cdn/components/breakpoint-specimen.js +0 -26
- package/dist/cdn/components/burndown-chart.js +0 -2
- package/dist/cdn/components/capacity-plan.js +0 -25
- package/dist/cdn/components/color-palette.js +0 -16
- package/dist/cdn/components/component-sampler.js +0 -45
- package/dist/cdn/components/empathy-map.js +0 -582
- package/dist/cdn/components/font-pairer.js +0 -108
- package/dist/cdn/components/gantt-chart.js +0 -2
- package/dist/cdn/components/gradient-builder.js +0 -52
- package/dist/cdn/components/impact-effort.js +0 -2
- package/dist/cdn/components/iron-triangle.js +0 -2
- package/dist/cdn/components/kanban-board.js +0 -2
- package/dist/cdn/components/layout-specimen.js +0 -35
- package/dist/cdn/components/motion-specimen.js +0 -21
- package/dist/cdn/components/palette-generator.js +0 -15
- package/dist/cdn/components/product-roadmap.js +0 -3
- package/dist/cdn/components/quadrant-grid.js +0 -3
- package/dist/cdn/components/quality-target.js +0 -12
- package/dist/cdn/components/requirement-card.js +0 -122
- package/dist/cdn/components/review-surface.js +0 -535
- package/dist/cdn/components/risk-register.js +0 -25
- package/dist/cdn/components/semantic-palette.js +0 -30
- package/dist/cdn/components/spacing-specimen.js +0 -6
- package/dist/cdn/components/story-map.js +0 -2
- package/dist/cdn/components/theme-catalog.js +0 -28
- package/dist/cdn/components/theme-export.js +0 -26
- package/dist/cdn/components/theme-import.js +0 -44
- package/dist/cdn/components/token-specimen.js +0 -26
- package/dist/cdn/components/traceability-matrix.js +0 -3
- package/dist/cdn/components/type-specimen.js +0 -19
- package/dist/cdn/components/user-journey.js +0 -366
- package/dist/cdn/components/user-persona.js +0 -402
- package/dist/cdn/components/user-story.js +0 -411
- package/dist/cdn/components/work-item.js +0 -447
- package/dist/cdn/packs/design-system.full.css +0 -2
- package/dist/cdn/packs/design-system.full.js +0 -175
- package/dist/cdn/packs/ux-planning.full.css +0 -2
- package/dist/cdn/packs/ux-planning.full.js +0 -3160
|
@@ -1,582 +0,0 @@
|
|
|
1
|
-
var _=`
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
font-family: var(--_font-sans);
|
|
5
|
-
line-height: 1.6;
|
|
6
|
-
color: var(--_text);
|
|
7
|
-
container-type: inline-size;
|
|
8
|
-
|
|
9
|
-
--_bg: var(--empathy-map-bg, var(--color-surface, #ffffff));
|
|
10
|
-
--_card: var(--empathy-map-card, var(--color-surface-raised, #f8f9fa));
|
|
11
|
-
--_border: var(--empathy-map-border, var(--color-border, #e0e0e0));
|
|
12
|
-
--_muted: var(--empathy-map-muted, var(--color-text-muted, #666666));
|
|
13
|
-
--_text: var(--empathy-map-text, var(--color-text, #1a1a1a));
|
|
14
|
-
--_radius: var(--empathy-map-radius, var(--radius-xl, 1rem));
|
|
15
|
-
--_accent: var(--empathy-map-accent, var(--color-interactive, var(--color-primary, #0066cc)));
|
|
16
|
-
--_link: var(--empathy-map-link, var(--color-interactive, var(--color-primary, #6366f1)));
|
|
17
|
-
--_primary: var(--empathy-map-primary, var(--color-primary, #6366f1));
|
|
18
|
-
--_accent-bar: var(--empathy-map-accent-bar, var(--color-accent, #8b5cf6));
|
|
19
|
-
--_says: var(--empathy-map-says, var(--color-info, #3b82f6));
|
|
20
|
-
--_thinks: var(--empathy-map-thinks, var(--color-accent, #8b5cf6));
|
|
21
|
-
--_does: var(--empathy-map-does, var(--color-warning, #f59e0b));
|
|
22
|
-
--_feels: var(--empathy-map-feels, var(--color-error, #ef4444));
|
|
23
|
-
--_says-bg: color-mix(in oklch, var(--_says) 16%, var(--_card));
|
|
24
|
-
--_thinks-bg: color-mix(in oklch, var(--_thinks) 16%, var(--_card));
|
|
25
|
-
--_does-bg: color-mix(in oklch, var(--_does) 16%, var(--_card));
|
|
26
|
-
--_feels-bg: color-mix(in oklch, var(--_feels) 16%, var(--_card));
|
|
27
|
-
--_chip-type-bg: color-mix(in oklch, var(--_accent-bar) 18%, var(--_card));
|
|
28
|
-
--_chip-type-fg: var(--_accent-bar);
|
|
29
|
-
--_font-sans: var(--empathy-map-font, var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
|
|
30
|
-
--_font-xs: var(--empathy-map-font-xs, var(--font-size-xs, 0.75rem));
|
|
31
|
-
--_font-sm: var(--empathy-map-font-sm, var(--font-size-sm, 0.875rem));
|
|
32
|
-
--_font-md: var(--empathy-map-font-md, var(--font-size-md, 1rem));
|
|
33
|
-
--_font-xl: var(--empathy-map-font-xl, var(--font-size-xl, 1.25rem));
|
|
34
|
-
--_space-2xs: var(--empathy-map-space-2xs, var(--size-2xs, 0.25rem));
|
|
35
|
-
--_space-xs: var(--empathy-map-space-xs, var(--size-xs, 0.5rem));
|
|
36
|
-
--_space-s: var(--empathy-map-space-s, var(--size-s, 0.75rem));
|
|
37
|
-
--_space-m: var(--empathy-map-space-m, var(--size-m, 1rem));
|
|
38
|
-
--_space-l: var(--empathy-map-space-l, var(--size-l, 1.5rem));
|
|
39
|
-
--_radius-m: var(--empathy-map-radius-m, var(--radius-m, 0.5rem));
|
|
40
|
-
--_radius-full: var(--empathy-map-radius-full, var(--radius-full, 9999px));
|
|
41
|
-
--_duration: var(--empathy-map-duration, var(--duration-normal, 200ms));
|
|
42
|
-
--_duration-fast: var(--empathy-map-duration-fast, var(--duration-fast, 100ms));
|
|
43
|
-
--_ease: var(--empathy-map-ease, var(--ease-default, ease));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
*, *::before, *::after { box-sizing: border-box; margin: 0; }
|
|
47
|
-
|
|
48
|
-
/* \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
49
|
-
.empathy-map {
|
|
50
|
-
background: var(--_card);
|
|
51
|
-
border: 1px solid var(--_border);
|
|
52
|
-
border-radius: var(--_radius);
|
|
53
|
-
overflow: hidden;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
57
|
-
.empathy-map__header {
|
|
58
|
-
padding: 20px 24px 16px 28px;
|
|
59
|
-
border-block-end: 1px solid var(--_border);
|
|
60
|
-
position: relative;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Left accent bar */
|
|
64
|
-
.empathy-map__header::before {
|
|
65
|
-
content: '';
|
|
66
|
-
position: absolute;
|
|
67
|
-
inset-block: 0;
|
|
68
|
-
inset-inline-start: 0;
|
|
69
|
-
width: 4px;
|
|
70
|
-
background: linear-gradient(135deg, var(--_primary), var(--_accent-bar));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.empathy-map__header-top {
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: flex-start;
|
|
76
|
-
justify-content: space-between;
|
|
77
|
-
gap: var(--_space-s);
|
|
78
|
-
flex-wrap: wrap;
|
|
79
|
-
margin-block-end: var(--_space-xs);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.empathy-map__chips {
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-wrap: wrap;
|
|
85
|
-
align-items: center;
|
|
86
|
-
gap: 6px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* \u2500\u2500 Chips \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
90
|
-
.chip {
|
|
91
|
-
display: inline-block;
|
|
92
|
-
font-size: 11px;
|
|
93
|
-
font-weight: 700;
|
|
94
|
-
letter-spacing: 0.05em;
|
|
95
|
-
padding: 2px 9px;
|
|
96
|
-
border-radius: var(--_radius-full);
|
|
97
|
-
text-decoration: none;
|
|
98
|
-
line-height: 1.6;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.chip--type {
|
|
102
|
-
color: var(--_chip-type-fg);
|
|
103
|
-
background: var(--_chip-type-bg);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* \u2500\u2500 Persona ref \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
107
|
-
.persona-ref {
|
|
108
|
-
display: inline-flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
gap: 4px;
|
|
111
|
-
font-size: 13px;
|
|
112
|
-
font-weight: 600;
|
|
113
|
-
color: var(--_muted);
|
|
114
|
-
text-decoration: none;
|
|
115
|
-
white-space: nowrap;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.persona-ref svg {
|
|
119
|
-
width: 14px;
|
|
120
|
-
height: 14px;
|
|
121
|
-
flex-shrink: 0;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
a.persona-ref:hover { color: var(--_link); text-decoration: underline; }
|
|
125
|
-
|
|
126
|
-
/* \u2500\u2500 Title & summary (slotted content) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
127
|
-
.empathy-map__title-wrap {
|
|
128
|
-
margin-block-end: var(--_space-2xs);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.empathy-map__title {
|
|
132
|
-
font-size: var(--_font-xl);
|
|
133
|
-
font-weight: 700;
|
|
134
|
-
color: var(--_text);
|
|
135
|
-
margin: 0;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
::slotted([slot="title"]) {
|
|
139
|
-
font-size: var(--_font-xl) !important;
|
|
140
|
-
font-weight: 700 !important;
|
|
141
|
-
color: var(--_text) !important;
|
|
142
|
-
margin: 0 !important;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.empathy-map__summary-wrap {
|
|
146
|
-
max-width: 72ch;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
::slotted([slot="summary"]) {
|
|
150
|
-
font-size: var(--_font-sm) !important;
|
|
151
|
-
color: var(--_muted) !important;
|
|
152
|
-
margin: 0 !important;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* \u2500\u2500 Grid \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
156
|
-
.empathy-map__grid {
|
|
157
|
-
display: grid;
|
|
158
|
-
grid-template-columns: 1fr 1fr;
|
|
159
|
-
gap: 1px;
|
|
160
|
-
background: var(--_border);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/* \u2500\u2500 Quadrant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
164
|
-
.quadrant {
|
|
165
|
-
background: var(--_card);
|
|
166
|
-
padding: 0;
|
|
167
|
-
position: relative;
|
|
168
|
-
display: grid;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.quadrant::before {
|
|
172
|
-
content: '';
|
|
173
|
-
position: absolute;
|
|
174
|
-
inset-block-start: 0;
|
|
175
|
-
inset-inline: 0;
|
|
176
|
-
height: 3px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.quadrant--says::before { background: var(--_says); }
|
|
180
|
-
.quadrant--thinks::before { background: var(--_thinks); }
|
|
181
|
-
.quadrant--does::before { background: var(--_does); }
|
|
182
|
-
.quadrant--feels::before { background: var(--_feels); }
|
|
183
|
-
|
|
184
|
-
.quadrant__inner {
|
|
185
|
-
display: grid;
|
|
186
|
-
padding: 16px 20px;
|
|
187
|
-
padding-block-start: 19px; /* 16 + 3px top border */
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* \u2500\u2500 Quadrant header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
191
|
-
.quadrant__header {
|
|
192
|
-
display: flex;
|
|
193
|
-
align-items: center;
|
|
194
|
-
gap: 10px;
|
|
195
|
-
margin-block-end: var(--_space-s);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.quadrant__icon {
|
|
199
|
-
display: flex;
|
|
200
|
-
align-items: center;
|
|
201
|
-
justify-content: center;
|
|
202
|
-
width: 32px;
|
|
203
|
-
height: 32px;
|
|
204
|
-
border-radius: var(--_radius-m);
|
|
205
|
-
flex-shrink: 0;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.quadrant__icon svg {
|
|
209
|
-
width: 16px;
|
|
210
|
-
height: 16px;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.quadrant--says .quadrant__icon { background: var(--_says-bg); color: var(--_says); }
|
|
214
|
-
.quadrant--thinks .quadrant__icon { background: var(--_thinks-bg); color: var(--_thinks); }
|
|
215
|
-
.quadrant--does .quadrant__icon { background: var(--_does-bg); color: var(--_does); }
|
|
216
|
-
.quadrant--feels .quadrant__icon { background: var(--_feels-bg); color: var(--_feels); }
|
|
217
|
-
|
|
218
|
-
.quadrant__label {
|
|
219
|
-
font-size: 13px;
|
|
220
|
-
font-weight: 700;
|
|
221
|
-
text-transform: uppercase;
|
|
222
|
-
letter-spacing: 0.06em;
|
|
223
|
-
color: var(--_muted);
|
|
224
|
-
flex: 1;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/* \u2500\u2500 Quadrant content / faces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
228
|
-
.quadrant__face {
|
|
229
|
-
grid-area: 1 / 1;
|
|
230
|
-
transition: opacity var(--_duration) var(--_ease), transform var(--_duration) var(--_ease);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.quadrant__face--front {
|
|
234
|
-
opacity: 1;
|
|
235
|
-
transform: scale(1);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.quadrant__face--back {
|
|
239
|
-
opacity: 0;
|
|
240
|
-
transform: scale(0.95);
|
|
241
|
-
pointer-events: none;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
[data-editing] .quadrant__face--front {
|
|
245
|
-
opacity: 0;
|
|
246
|
-
transform: scale(0.95);
|
|
247
|
-
pointer-events: none;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
[data-editing] .quadrant__face--back {
|
|
251
|
-
opacity: 1;
|
|
252
|
-
transform: scale(1);
|
|
253
|
-
pointer-events: auto;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.quadrant__content {
|
|
257
|
-
font-size: 14px;
|
|
258
|
-
line-height: 1.55;
|
|
259
|
-
color: var(--_text);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.quadrant__content p {
|
|
263
|
-
margin-block: 0 6px;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.quadrant__content p:last-child {
|
|
267
|
-
margin-block-end: 0;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/* \u2500\u2500 Slot fallback / placeholder \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
271
|
-
.placeholder {
|
|
272
|
-
font-size: 13px;
|
|
273
|
-
color: var(--_muted);
|
|
274
|
-
font-style: italic;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
::slotted(ul),
|
|
278
|
-
::slotted(ol) {
|
|
279
|
-
margin: 0;
|
|
280
|
-
padding-inline-start: 1.4em;
|
|
281
|
-
font-size: 14px;
|
|
282
|
-
line-height: 1.55;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/* \u2500\u2500 Emotion tags \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
286
|
-
.emotion-tag {
|
|
287
|
-
display: inline-block;
|
|
288
|
-
font-size: 12px;
|
|
289
|
-
font-weight: 600;
|
|
290
|
-
padding: 2px 10px;
|
|
291
|
-
border-radius: var(--_radius-full);
|
|
292
|
-
margin-block-end: 6px;
|
|
293
|
-
margin-inline-end: 4px;
|
|
294
|
-
background: color-mix(in srgb, var(--ec, #94a3b8) 15%, transparent);
|
|
295
|
-
color: var(--ec, #94a3b8);
|
|
296
|
-
border: 1px solid color-mix(in srgb, var(--ec, #94a3b8) 30%, transparent);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/* \u2500\u2500 Edit / Done buttons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
300
|
-
.quadrant__edit-btn,
|
|
301
|
-
.quadrant__done-btn {
|
|
302
|
-
display: inline-flex;
|
|
303
|
-
align-items: center;
|
|
304
|
-
justify-content: center;
|
|
305
|
-
width: 28px;
|
|
306
|
-
height: 28px;
|
|
307
|
-
border: 1px solid var(--_border);
|
|
308
|
-
border-radius: 6px;
|
|
309
|
-
background: var(--_bg);
|
|
310
|
-
color: var(--_muted);
|
|
311
|
-
cursor: pointer;
|
|
312
|
-
line-height: 1;
|
|
313
|
-
padding: 0;
|
|
314
|
-
flex-shrink: 0;
|
|
315
|
-
transition: background var(--_duration-fast) var(--_ease), color var(--_duration-fast) var(--_ease);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.quadrant__edit-btn svg,
|
|
319
|
-
.quadrant__done-btn svg {
|
|
320
|
-
width: 14px;
|
|
321
|
-
height: 14px;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.quadrant__edit-btn:hover,
|
|
325
|
-
.quadrant__done-btn:hover {
|
|
326
|
-
background: var(--_border);
|
|
327
|
-
color: var(--_text);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.quadrant__done-btn {
|
|
331
|
-
margin-block-start: 8px;
|
|
332
|
-
width: auto;
|
|
333
|
-
padding: 0 12px;
|
|
334
|
-
font-size: 12px;
|
|
335
|
-
font-weight: 600;
|
|
336
|
-
gap: 4px;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/* \u2500\u2500 Editor textarea \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
340
|
-
.quadrant__editor {
|
|
341
|
-
width: 100%;
|
|
342
|
-
min-height: 100px;
|
|
343
|
-
padding: 10px 12px;
|
|
344
|
-
border: 1px solid var(--_border);
|
|
345
|
-
border-radius: var(--_radius-m);
|
|
346
|
-
font-family: inherit;
|
|
347
|
-
font-size: 13px;
|
|
348
|
-
line-height: 1.55;
|
|
349
|
-
color: var(--_text);
|
|
350
|
-
background: var(--_bg);
|
|
351
|
-
resize: vertical;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.quadrant__editor:focus {
|
|
355
|
-
outline: 2px solid var(--_accent);
|
|
356
|
-
outline-offset: -1px;
|
|
357
|
-
border-color: var(--_accent);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/* \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
361
|
-
.empathy-map__footer {
|
|
362
|
-
display: flex;
|
|
363
|
-
gap: 1px;
|
|
364
|
-
background: var(--_border);
|
|
365
|
-
border-block-start: 1px solid var(--_border);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.summary-row {
|
|
369
|
-
flex: 1;
|
|
370
|
-
background: var(--_card);
|
|
371
|
-
padding: 16px 20px;
|
|
372
|
-
display: flex;
|
|
373
|
-
align-items: flex-start;
|
|
374
|
-
gap: 10px;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.summary-row__icon {
|
|
378
|
-
line-height: 1;
|
|
379
|
-
flex-shrink: 0;
|
|
380
|
-
margin-block-start: 2px;
|
|
381
|
-
color: var(--_muted);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.summary-row__icon svg {
|
|
385
|
-
width: 18px;
|
|
386
|
-
height: 18px;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.summary-row__body {
|
|
390
|
-
flex: 1;
|
|
391
|
-
min-width: 0;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.summary-row__label {
|
|
395
|
-
font-size: 11px;
|
|
396
|
-
font-weight: 700;
|
|
397
|
-
text-transform: uppercase;
|
|
398
|
-
letter-spacing: 0.06em;
|
|
399
|
-
color: var(--_muted);
|
|
400
|
-
margin-block-end: 4px;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.summary-row__content {
|
|
404
|
-
font-size: 14px;
|
|
405
|
-
line-height: 1.55;
|
|
406
|
-
color: var(--_text);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.summary-row__content p {
|
|
410
|
-
margin-block: 0 4px;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.summary-row__content p:last-child {
|
|
414
|
-
margin-block-end: 0;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/* \u2500\u2500 Compact variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
418
|
-
:host([compact]) .empathy-map__header {
|
|
419
|
-
padding: 14px 18px 12px 22px;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
:host([compact]) .empathy-map__title {
|
|
423
|
-
font-size: 16px;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
:host([compact]) .empathy-map__summary {
|
|
427
|
-
font-size: 12px;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
:host([compact]) .quadrant__inner {
|
|
431
|
-
padding: 12px 14px;
|
|
432
|
-
padding-block-start: 15px;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
:host([compact]) .quadrant__icon {
|
|
436
|
-
width: 26px;
|
|
437
|
-
height: 26px;
|
|
438
|
-
font-size: 13px;
|
|
439
|
-
border-radius: 6px;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
:host([compact]) .quadrant__label {
|
|
443
|
-
font-size: 11px;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
:host([compact]) .quadrant__content {
|
|
447
|
-
font-size: 12px;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
:host([compact]) .summary-row {
|
|
451
|
-
padding: 12px 14px;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
:host([compact]) .summary-row__content {
|
|
455
|
-
font-size: 12px;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
459
|
-
@container (max-width: 500px) {
|
|
460
|
-
.empathy-map__grid {
|
|
461
|
-
grid-template-columns: 1fr;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
.empathy-map__header {
|
|
465
|
-
padding: 14px 16px 12px 20px;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.empathy-map__title {
|
|
469
|
-
font-size: 17px;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.empathy-map__footer {
|
|
473
|
-
flex-direction: column;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/* \u2500\u2500 Motion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
478
|
-
@media (prefers-reduced-motion: reduce) {
|
|
479
|
-
.quadrant__face {
|
|
480
|
-
transition: none;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.quadrant__edit-btn,
|
|
484
|
-
.quadrant__done-btn {
|
|
485
|
-
transition: none;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/* \u2500\u2500 Print \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
490
|
-
@media print {
|
|
491
|
-
.empathy-map {
|
|
492
|
-
break-inside: avoid;
|
|
493
|
-
border-color: var(--_border);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.quadrant__edit-btn,
|
|
497
|
-
.quadrant__done-btn {
|
|
498
|
-
display: none;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.quadrant__face--back {
|
|
502
|
-
display: none;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
.empathy-map__footer {
|
|
506
|
-
flex-direction: column;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/* \u2500\u2500 Utility \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
511
|
-
.state-msg { padding: var(--_space-l); font-size: var(--_font-sm); color: var(--_muted); font-style: italic; }
|
|
512
|
-
.state-msg--error { color: var(--color-error-text, var(--color-error, #dc2626)); }
|
|
513
|
-
code { font-family: var(--font-mono, Monaco, Menlo, monospace); font-size: 0.88em; }
|
|
514
|
-
`;var E=window.matchMedia("(prefers-reduced-motion: reduce)");var g=new Map;function y(o,t,e={}){let a=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:a},n=g.get(o);if(customElements.get(o)){if(!n||n.priority>=a){n&&n.priority===a&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=a){n.priority===a&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}g.set(o,r),customElements.define(o,t)}var k=0;function x(o,t,e="vb-vt"){if(!o?.isConnected||typeof document>"u"||!("startViewTransition"in document)||matchMedia("(prefers-reduced-motion: reduce)").matches)return t(),null;let a=`${e}-${++k}`;o.style.viewTransitionName=a;let r=document.startViewTransition(t);return r.finished.finally(()=>{o.style.viewTransitionName===a&&(o.style.viewTransitionName="")}),r}function c(o){return String(o).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function p(o){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${o}</svg>`}var l={user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',pencil:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>',check:'<path d="M20 6 9 17l-5-5"/>',target:'<circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/>',alertTriangle:'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',messageCircle:'<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"/>',lightbulb:'<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/>',wrench:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z"/>',heart:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/>',mapPin:'<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/><circle cx="12" cy="10" r="3"/>',checkCircle:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/>',send:'<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/>'},f={says:{label:"Says",icon:l.messageCircle,color:"#3b82f6"},thinks:{label:"Thinks",icon:l.lightbulb,color:"#8b5cf6"},does:{label:"Does",icon:l.wrench,color:"#f59e0b"},feels:{label:"Feels",icon:l.heart,color:"#ef4444"}},q={delighted:{emoji:"\u{1F604}",score:.95,color:"#16a34a"},satisfied:{emoji:"\u{1F60A}",score:.8,color:"#22c55e"},hopeful:{emoji:"\u{1F642}",score:.68,color:"#84cc16"},curious:{emoji:"\u{1F914}",score:.55,color:"#eab308"},neutral:{emoji:"\u{1F610}",score:.5,color:"#94a3b8"},uncertain:{emoji:"\u{1F615}",score:.4,color:"#f97316"},confused:{emoji:"\u{1F635}",score:.3,color:"#fb923c"},frustrated:{emoji:"\u{1F624}",score:.18,color:"#ef4444"},angry:{emoji:"\u{1F620}",score:.05,color:"#dc2626"}};var b=["says","thinks","does","feels"],v=class extends HTMLElement{static get observedAttributes(){return["persona","persona-id","src","editable","compact"]}#t=new Map;constructor(){super(),this.attachShadow({mode:"open"}),this.__quadrants=null,this.__goals=null,this.__painPoints=null,this._editingQuadrants=new Set}get quadrants(){return this.__quadrants}set quadrants(t){this.__quadrants=t,this.isConnected&&this._render()}get goals(){return this.__goals}set goals(t){this.__goals=t,this.isConnected&&this._render()}get painPoints(){return this.__painPoints}set painPoints(t){this.__painPoints=t,this.isConnected&&this._render()}#e(){for(let t of this.children){let e=t.getAttribute("slot");e&&this.#t.set(e,t.textContent.trim())}}_resolve(t){return this.getAttribute(t)||this.#t.get(t)||""}connectedCallback(){this.#e(),this.setAttribute("data-upgraded",""),this.hasAttribute("src")?this._loadSrc(this.getAttribute("src")):this._render()}disconnectedCallback(){this.removeAttribute("data-upgraded")}attributeChangedCallback(t){this.isConnected&&(t==="src"?this._loadSrc(this.getAttribute("src")):this._render())}get data(){let t=this.querySelector('[slot="title"]'),e=this.querySelector('[slot="summary"]');return{persona:this.getAttribute("persona")||void 0,personaId:this.getAttribute("persona-id")||void 0,title:t?.textContent?.trim()||void 0,summary:e?.textContent?.trim()||void 0,quadrants:this.__quadrants||void 0,goals:this.__goals||void 0,painPoints:this.__painPoints||void 0}}set data(t){if(!(!t||typeof t!="object")){if(t.persona&&this.setAttribute("persona",String(t.persona)),t.personaId&&this.setAttribute("persona-id",String(t.personaId)),t.title&&!this.querySelector('[slot="title"]')){let e=document.createElement("h2");e.slot="title",e.textContent=t.title,this.appendChild(e)}if(t.summary&&!this.querySelector('[slot="summary"]')){let e=document.createElement("p");e.slot="summary",e.textContent=t.summary,this.appendChild(e)}t.quadrants!=null&&(this.__quadrants=t.quadrants),t.goals!=null&&(this.__goals=t.goals),t.painPoints!=null&&(this.__painPoints=t.painPoints),this.isConnected&&this._render(),this.dispatchEvent(new CustomEvent("empathy-map:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0,composed:!0}))}}editQuadrant(t){b.includes(t)&&this.hasAttribute("editable")&&this._openEdit(t)}closeQuadrant(t){b.includes(t)&&this._closeEdit(t)}async _loadSrc(t){if(!(!t||!this.shadowRoot)){this.shadowRoot.innerHTML=`<style>${_}</style><div class="state-msg">Loading\u2026</div>`;try{let e=await fetch(t);if(!e.ok)throw new Error(`HTTP ${e.status}`);let a=await e.json();if(a.persona&&this.setAttribute("persona",a.persona),a.personaId&&this.setAttribute("persona-id",a.personaId),a.title&&!this.querySelector('[slot="title"]')){let r=document.createElement("h2");r.slot="title",r.textContent=a.title,this.appendChild(r)}if(a.summary&&!this.querySelector('[slot="summary"]')){let r=document.createElement("p");r.slot="summary",r.textContent=a.summary,this.appendChild(r)}this.__quadrants=a.quadrants||null,this.__goals=a.goals||null,this.__painPoints=a.painPoints||null,this._render()}catch(e){if(!this.shadowRoot)return;let a=e instanceof Error?e.message:String(e);this.shadowRoot.innerHTML=`<style>${_}</style><div class="state-msg state-msg--error">Could not load empathy map: ${c(a)}</div>`}}}_render(){let t=this._resolve("persona")||"",e=this._resolve("persona-id")||"",a=this.hasAttribute("compact"),r=this.hasAttribute("editable"),n=!!this.querySelector('[slot="title"]')||this.#t.has("title"),i=!!this.querySelector('[slot="summary"]')||this.#t.has("summary"),d=this.__goals?.length||this.querySelector('[slot="goals"]'),s=this.__painPoints?.length||this.querySelector('[slot="pain-points"]'),m=`<style>${_}</style>
|
|
515
|
-
<article class="empathy-map${a?" empathy-map--compact":""}">
|
|
516
|
-
|
|
517
|
-
<header class="empathy-map__header">
|
|
518
|
-
<div class="empathy-map__header-top">
|
|
519
|
-
<div class="empathy-map__chips">
|
|
520
|
-
<span class="chip chip--type">Empathy Map</span>
|
|
521
|
-
</div>
|
|
522
|
-
${t?`
|
|
523
|
-
<div class="empathy-map__persona">
|
|
524
|
-
${e?`<a class="persona-ref" href="#${c(e)}">${p(l.user)} ${c(t)}</a>`:`<span class="persona-ref">${p(l.user)} ${c(t)}</span>`}
|
|
525
|
-
</div>`:""}
|
|
526
|
-
</div>
|
|
527
|
-
<div class="empathy-map__title-wrap">
|
|
528
|
-
<slot name="title"><h2 class="empathy-map__title">Empathy Map</h2></slot>
|
|
529
|
-
</div>
|
|
530
|
-
${i?'<div class="empathy-map__summary-wrap"><slot name="summary"></slot></div>':""}
|
|
531
|
-
</header>
|
|
532
|
-
|
|
533
|
-
<div class="empathy-map__grid">
|
|
534
|
-
${b.map(h=>this._renderQuadrant(h,r)).join("")}
|
|
535
|
-
</div>
|
|
536
|
-
|
|
537
|
-
${d||s?`
|
|
538
|
-
<footer class="empathy-map__footer">
|
|
539
|
-
${this._renderSummaryRow("goals",p(l.target),"Goals")}
|
|
540
|
-
${this._renderSummaryRow("pain-points",p(l.alertTriangle),"Pain Points")}
|
|
541
|
-
</footer>
|
|
542
|
-
`:""}
|
|
543
|
-
|
|
544
|
-
</article>`,u=()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=m,r&&this._bindEditListeners())};this.shadowRoot?.querySelector("article")?x(this,u,"em-vt"):u(),this.dispatchEvent(new CustomEvent("empathy-map:ready",{bubbles:!0,composed:!0,detail:{title:this.querySelector('[slot="title"]')?.textContent?.trim()||"Empathy Map",persona:t}}))}_renderQuadrant(t,e){let a=f[t],r=this.__quadrants?.[t],n=this._editingQuadrants.has(t),i=r&&r.length?t==="feels"?r.map(s=>this._renderEmotion(s)).join(""):r.map(s=>`<p>${c(s)}</p>`).join(""):`<slot name="${t}"><p class="placeholder">Add ${a.label.toLowerCase()} items\u2026</p></slot>`,d=r?.length?r.join(`
|
|
545
|
-
`):"";return`
|
|
546
|
-
<section class="quadrant quadrant--${t}"${n?" data-editing":""}>
|
|
547
|
-
<div class="quadrant__inner">
|
|
548
|
-
<div class="quadrant__header">
|
|
549
|
-
<div class="quadrant__icon" aria-hidden="true">${p(a.icon)}</div>
|
|
550
|
-
<span class="quadrant__label">${a.label}</span>
|
|
551
|
-
${e?`<button class="quadrant__edit-btn" data-quadrant="${t}"
|
|
552
|
-
aria-label="Edit ${a.label}" title="Edit ${a.label}">${p(l.pencil)}</button>`:""}
|
|
553
|
-
</div>
|
|
554
|
-
<div class="quadrant__faces">
|
|
555
|
-
<div class="quadrant__face quadrant__face--front"${n?" inert":""}>
|
|
556
|
-
<div class="quadrant__content">
|
|
557
|
-
${i}
|
|
558
|
-
</div>
|
|
559
|
-
</div>
|
|
560
|
-
${e?`
|
|
561
|
-
<div class="quadrant__face quadrant__face--back"${n?"":" inert"}>
|
|
562
|
-
<textarea class="quadrant__editor" data-quadrant="${t}"
|
|
563
|
-
placeholder="One item per line\u2026"
|
|
564
|
-
aria-label="Edit ${a.label} items">${c(d)}</textarea>
|
|
565
|
-
<button class="quadrant__done-btn" data-quadrant="${t}"
|
|
566
|
-
aria-label="Done editing ${a.label}">${p(l.check)} Done</button>
|
|
567
|
-
</div>
|
|
568
|
-
`:""}
|
|
569
|
-
</div>
|
|
570
|
-
</div>
|
|
571
|
-
</section>`}_renderEmotion(t){let e=t.toLowerCase().trim(),a=q[e];return a?`<span class="emotion-tag" style="--ec:${a.color}"><span role="img" aria-label="${c(t)}">${a.emoji}</span> ${c(t)}</span>`:`<p>${c(t)}</p>`}_renderSummaryRow(t,e,a){let n=(t==="pain-points"?"painPoints":t)==="painPoints"?this.__painPoints:this.__goals,i=n?.length?n.map(d=>`<p>${c(d)}</p>`).join(""):`<slot name="${t}"><p class="placeholder">No ${a.toLowerCase()} specified.</p></slot>`;return`
|
|
572
|
-
<div class="summary-row">
|
|
573
|
-
<span class="summary-row__icon" aria-hidden="true">${e}</span>
|
|
574
|
-
<div class="summary-row__body">
|
|
575
|
-
<div class="summary-row__label">${a}</div>
|
|
576
|
-
<div class="summary-row__content">${i}</div>
|
|
577
|
-
</div>
|
|
578
|
-
</div>`}_bindEditListeners(){let t=this.shadowRoot;t&&(t.querySelectorAll(".quadrant__edit-btn").forEach(e=>{e.addEventListener("click",()=>{let a=e.dataset.quadrant;a&&this._openEdit(a)})}),t.querySelectorAll(".quadrant__done-btn").forEach(e=>{e.addEventListener("click",()=>{let a=e.dataset.quadrant;a&&this._closeEdit(a)})}),t.querySelectorAll(".quadrant__editor").forEach(e=>{let a=e;a.addEventListener("keydown",r=>{let n=r;if(n.key==="Escape"){n.preventDefault();let i=a.dataset.quadrant;i&&this._closeEdit(i)}})}))}_openEdit(t){this._editingQuadrants.add(t);let e=this.shadowRoot?.querySelector(`.quadrant--${t}`);if(!e)return;e.setAttribute("data-editing","");let a=e.querySelector(".quadrant__face--front"),r=e.querySelector(".quadrant__face--back");a&&a.setAttribute("inert",""),r&&r.removeAttribute("inert");let n=e.querySelector(".quadrant__editor");if(n){let i=this.__quadrants?.[t];if(i?.length)n.value=i.join(`
|
|
579
|
-
`);else{let d=e.querySelector(`slot[name="${t}"]`);if(d){let s=d.assignedElements();if(s.length){let m=[];s.forEach(u=>{let h=u.querySelectorAll("li");h.length?h.forEach(w=>m.push(w.textContent?.trim()??"")):m.push(u.textContent?.trim()??"")}),n.value=m.filter(Boolean).join(`
|
|
580
|
-
`)}}}n.focus()}}_closeEdit(t){let e=this.shadowRoot?.querySelector(`.quadrant--${t}`);if(!e)return;let a=e.querySelector(".quadrant__editor");if(a){let i=a.value.split(`
|
|
581
|
-
`).map(s=>s.trim()).filter(Boolean);this.__quadrants||(this.__quadrants={}),this.__quadrants[t]=i;let d=e.querySelector(".quadrant__content");if(d)if(i.length)d.innerHTML=t==="feels"?i.map(s=>this._renderEmotion(s)).join(""):i.map(s=>`<p>${c(s)}</p>`).join("");else{let s=f[t];d.innerHTML=`<p class="placeholder">Add ${s.label.toLowerCase()} items\u2026</p>`}}this._editingQuadrants.delete(t),e.removeAttribute("data-editing");let r=e.querySelector(".quadrant__face--front"),n=e.querySelector(".quadrant__face--back");r&&r.removeAttribute("inert"),n&&n.setAttribute("inert",""),this.dispatchEvent(new CustomEvent("empathy-map:update",{bubbles:!0,composed:!0,detail:{quadrant:t,items:this.__quadrants?.[t]||[]}}))}};y("empathy-map",v);export{v as EmpathyMap};
|
|
582
|
-
//# sourceMappingURL=empathy-map.js.map
|