vanilla-breeze 0.2.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/custom-elements.json +11251 -18739
- package/dist/cdn/components/icon-wc.js +2 -2
- package/dist/cdn/components/manifest.json +2 -146
- package/dist/cdn/components/settings-panel.js +3 -3
- package/dist/cdn/components/theme-picker.js +12 -12
- package/dist/cdn/packs/journal.effects.css +2 -0
- package/dist/cdn/packs/journal.full.css +2 -0
- package/dist/cdn/packs/manifest.json +11 -21
- package/dist/cdn/packs/ui.full.js +4 -4
- 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 +406 -0
- package/dist/cdn/themes/journal.css +2 -0
- package/dist/cdn/themes/journal.tokens.json +583 -0
- 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/manifest.json +7 -0
- 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 +17 -17
- package/dist/cdn/vanilla-breeze-extras.js +36 -222
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +232 -2608
- package/package.json +2 -3
- 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,402 +0,0 @@
|
|
|
1
|
-
var v=`
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
font-family: var(--user-persona-font, var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
|
|
5
|
-
--_bg: var(--user-persona-bg, var(--color-surface, #ffffff));
|
|
6
|
-
--_text: var(--user-persona-text, var(--color-text, #1a1a1a));
|
|
7
|
-
--_border: var(--user-persona-border, var(--color-border, #e0e0e0));
|
|
8
|
-
--_muted: var(--user-persona-muted, var(--color-text-muted, #666));
|
|
9
|
-
--_accent: var(--user-persona-accent, var(--color-interactive, #0066cc));
|
|
10
|
-
--_card-bg: var(--user-persona-card-bg, var(--color-surface-raised, #f8f9fa));
|
|
11
|
-
--_radius: var(--user-persona-radius, var(--radius-xl, 1rem));
|
|
12
|
-
--_avatar-size: var(--user-persona-avatar-size, 80px);
|
|
13
|
-
--_goals: var(--user-persona-goals, #22c55e);
|
|
14
|
-
--_frustrations: var(--user-persona-frustrations, #ef4444);
|
|
15
|
-
--_behaviors: var(--user-persona-behaviors, #8b5cf6);
|
|
16
|
-
--_stories: var(--user-persona-stories, #3b82f6);
|
|
17
|
-
--_shadow: var(--user-persona-shadow, var(--shadow-md));
|
|
18
|
-
--_space-2xs: var(--user-persona-space-2xs, var(--size-2xs, 0.25rem));
|
|
19
|
-
--_space-xs: var(--user-persona-space-xs, var(--size-xs, 0.5rem));
|
|
20
|
-
--_space-s: var(--user-persona-space-s, var(--size-s, 0.75rem));
|
|
21
|
-
--_space-m: var(--user-persona-space-m, var(--size-m, 1rem));
|
|
22
|
-
--_space-l: var(--user-persona-space-l, var(--size-l, 1.5rem));
|
|
23
|
-
--_font-xs: var(--user-persona-font-xs, var(--font-size-xs, 0.75rem));
|
|
24
|
-
--_font-sm: var(--user-persona-font-sm, var(--font-size-sm, 0.875rem));
|
|
25
|
-
--_font-md: var(--user-persona-font-md, var(--font-size-md, 1rem));
|
|
26
|
-
--_font-2xl: var(--user-persona-font-2xl, var(--font-size-2xl, 1.5rem));
|
|
27
|
-
--_radius-m: var(--user-persona-radius-m, var(--radius-m, 0.5rem));
|
|
28
|
-
--_radius-l: var(--user-persona-radius-l, var(--radius-l, 0.75rem));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.persona-card {
|
|
32
|
-
background: var(--_bg);
|
|
33
|
-
border: 1px solid var(--_border);
|
|
34
|
-
border-radius: var(--_radius);
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
box-shadow: var(--_shadow);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.persona-header {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
gap: var(--_space-l);
|
|
43
|
-
padding: var(--_space-l);
|
|
44
|
-
background: var(--_card-bg);
|
|
45
|
-
border-bottom: 1px solid var(--_border);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([compact]) .persona-header {
|
|
49
|
-
padding: var(--_space-m);
|
|
50
|
-
gap: var(--_space-m);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.avatar {
|
|
54
|
-
width: var(--_avatar-size);
|
|
55
|
-
height: var(--_avatar-size);
|
|
56
|
-
border-radius: 50%;
|
|
57
|
-
display: flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
font-size: 28px;
|
|
61
|
-
font-weight: 600;
|
|
62
|
-
color: white;
|
|
63
|
-
flex-shrink: 0;
|
|
64
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
:host([compact]) .avatar {
|
|
68
|
-
width: 56px;
|
|
69
|
-
height: 56px;
|
|
70
|
-
font-size: 20px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.header-info {
|
|
74
|
-
flex: 1;
|
|
75
|
-
min-width: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.persona-name {
|
|
79
|
-
font-size: var(--_font-2xl);
|
|
80
|
-
font-weight: 700;
|
|
81
|
-
color: var(--_text);
|
|
82
|
-
margin: 0 0 var(--_space-2xs) 0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:host([compact]) .persona-name {
|
|
86
|
-
font-size: 18px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.persona-role {
|
|
90
|
-
font-size: var(--_font-md);
|
|
91
|
-
color: var(--_accent);
|
|
92
|
-
font-weight: 500;
|
|
93
|
-
margin: 0;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host([compact]) .persona-role {
|
|
97
|
-
font-size: var(--_font-sm);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.persona-meta {
|
|
101
|
-
display: flex;
|
|
102
|
-
gap: var(--_space-m);
|
|
103
|
-
margin-top: var(--_space-xs);
|
|
104
|
-
flex-wrap: wrap;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.meta-item {
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
gap: 6px;
|
|
111
|
-
font-size: 13px;
|
|
112
|
-
color: var(--_muted);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.meta-item svg {
|
|
116
|
-
width: 14px;
|
|
117
|
-
height: 14px;
|
|
118
|
-
fill: currentColor;
|
|
119
|
-
opacity: 0.7;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.persona-quote {
|
|
123
|
-
padding: 20px var(--_space-l);
|
|
124
|
-
background: var(--_card-bg);
|
|
125
|
-
border-bottom: 1px solid var(--_border);
|
|
126
|
-
position: relative;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([compact]) .persona-quote {
|
|
130
|
-
padding: var(--_space-m);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.quote-mark {
|
|
134
|
-
position: absolute;
|
|
135
|
-
top: 12px;
|
|
136
|
-
left: 16px;
|
|
137
|
-
font-size: 48px;
|
|
138
|
-
line-height: 1;
|
|
139
|
-
color: var(--_accent);
|
|
140
|
-
opacity: 0.2;
|
|
141
|
-
font-family: Georgia, serif;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.quote-text {
|
|
145
|
-
font-size: var(--_font-md);
|
|
146
|
-
font-style: italic;
|
|
147
|
-
color: var(--_text);
|
|
148
|
-
line-height: 1.6;
|
|
149
|
-
margin: 0;
|
|
150
|
-
padding-left: var(--_space-l);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
:host([compact]) .quote-text {
|
|
154
|
-
font-size: var(--_font-sm);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.persona-body {
|
|
158
|
-
padding: var(--_space-l);
|
|
159
|
-
display: grid;
|
|
160
|
-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
161
|
-
gap: var(--_space-l);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:host([compact]) .persona-body {
|
|
165
|
-
padding: var(--_space-m);
|
|
166
|
-
gap: var(--_space-m);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.section {
|
|
170
|
-
background: var(--_card-bg);
|
|
171
|
-
border-radius: var(--_radius-l);
|
|
172
|
-
padding: var(--_space-m);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.section-header {
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
gap: var(--_space-xs);
|
|
179
|
-
margin-bottom: var(--_space-s);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.section-icon {
|
|
183
|
-
width: 28px;
|
|
184
|
-
height: 28px;
|
|
185
|
-
border-radius: var(--_radius-m);
|
|
186
|
-
display: flex;
|
|
187
|
-
align-items: center;
|
|
188
|
-
justify-content: center;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.section-icon svg {
|
|
192
|
-
width: 16px;
|
|
193
|
-
height: 16px;
|
|
194
|
-
fill: white;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.section-icon.bio { background: var(--_accent); }
|
|
198
|
-
.section-icon.goals { background: var(--_goals); }
|
|
199
|
-
.section-icon.frustrations { background: var(--_frustrations); }
|
|
200
|
-
.section-icon.behaviors { background: var(--_behaviors); }
|
|
201
|
-
.section-icon.stories { background: var(--_stories); }
|
|
202
|
-
|
|
203
|
-
/* Stories section \u2014 auto-rendered list of related <user-story> elements */
|
|
204
|
-
.section-count {
|
|
205
|
-
margin-inline-start: var(--_space-2xs);
|
|
206
|
-
padding: 0.05em 0.5ch;
|
|
207
|
-
border-radius: 999px;
|
|
208
|
-
background: var(--color-surface-raised, oklch(95% 0 0));
|
|
209
|
-
color: var(--color-text-muted);
|
|
210
|
-
font-size: 0.75em;
|
|
211
|
-
font-weight: 600;
|
|
212
|
-
}
|
|
213
|
-
.story-list {
|
|
214
|
-
list-style: none;
|
|
215
|
-
margin: 0;
|
|
216
|
-
padding: 0;
|
|
217
|
-
display: grid;
|
|
218
|
-
gap: var(--_space-2xs);
|
|
219
|
-
}
|
|
220
|
-
.story-item {
|
|
221
|
-
display: flex;
|
|
222
|
-
align-items: center;
|
|
223
|
-
gap: var(--_space-s);
|
|
224
|
-
padding-block: var(--_space-2xs);
|
|
225
|
-
border-block-end: 1px solid var(--color-border-muted, var(--color-border, #e5e7eb));
|
|
226
|
-
}
|
|
227
|
-
.story-item:last-child { border-block-end: none; }
|
|
228
|
-
.story-item a {
|
|
229
|
-
color: var(--color-interactive, currentColor);
|
|
230
|
-
text-decoration: none;
|
|
231
|
-
flex: 1;
|
|
232
|
-
}
|
|
233
|
-
.story-item a:hover { text-decoration: underline; }
|
|
234
|
-
.story-meta {
|
|
235
|
-
font-size: var(--_font-xs);
|
|
236
|
-
color: var(--color-text-muted);
|
|
237
|
-
text-transform: uppercase;
|
|
238
|
-
letter-spacing: 0.05em;
|
|
239
|
-
padding: 0 0.5ch;
|
|
240
|
-
border: 1px solid var(--color-border-muted, var(--color-border, #e5e7eb));
|
|
241
|
-
border-radius: var(--_radius-m);
|
|
242
|
-
}
|
|
243
|
-
.empty-stories {
|
|
244
|
-
margin: 0;
|
|
245
|
-
color: var(--color-text-muted);
|
|
246
|
-
font-style: italic;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.section-title {
|
|
250
|
-
font-size: var(--_font-sm);
|
|
251
|
-
font-weight: 600;
|
|
252
|
-
color: var(--_text);
|
|
253
|
-
text-transform: uppercase;
|
|
254
|
-
letter-spacing: 0.5px;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.section-content {
|
|
258
|
-
color: var(--_text);
|
|
259
|
-
font-size: var(--_font-sm);
|
|
260
|
-
line-height: 1.6;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.section-content ::slotted(ul),
|
|
264
|
-
.section-content ::slotted(ol) {
|
|
265
|
-
margin: 0;
|
|
266
|
-
padding-left: 20px;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.section-content ::slotted(li) {
|
|
270
|
-
margin-bottom: var(--_space-xs);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.section-content ::slotted(p) {
|
|
274
|
-
margin: 0;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
@media (max-width: 600px) {
|
|
278
|
-
.persona-header {
|
|
279
|
-
flex-direction: column;
|
|
280
|
-
text-align: center;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.persona-meta {
|
|
284
|
-
justify-content: center;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.persona-body {
|
|
288
|
-
grid-template-columns: 1fr;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
@media (prefers-reduced-motion: reduce) {
|
|
293
|
-
* {
|
|
294
|
-
transition: none !important;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
`;var O=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function g(r,e,t={}){let o=t.priority??10,i={impl:e,bundle:t.bundle,contract:t.contract,priority:o},s=f.get(r);if(customElements.get(r)){if(!s||s.priority>=o){s&&s.priority===o&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=o){s.priority===o&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${s.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}f.set(r,i),customElements.define(r,e)}function a(r){return String(r).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function b(r){return r.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)}function y(r){let e=0;for(let o=0;o<r.length;o++)e=r.charCodeAt(o)+((e<<5)-e);return`hsl(${(e%360+360)%360}, 65%, 55%)`}var d={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"/>'},L={says:{label:"Says",icon:d.messageCircle,color:"#3b82f6"},thinks:{label:"Thinks",icon:d.lightbulb,color:"#8b5cf6"},does:{label:"Does",icon:d.wrench,color:"#f59e0b"},feels:{label:"Feels",icon:d.heart,color:"#ef4444"}};var _="https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait",p=[32,64,128,256,512];function S(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);return e}function w(r){let e=p[0],t=Math.abs(r-e);for(let o=1;o<p.length;o++){let i=Math.abs(r-p[o]);i<t&&(e=p[o],t=i)}return e}function x(r,e=128){let t=S(String(r)),o=(t%100+100)%100,i=(t>>>16&1)===0?"female":"male",s=w(e);return`${_}/${i}/${s}/${o}.jpg`}function u(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);return e}var k=["Sarah Chen","Marcus Johnson","Aisha Patel","James O'Brien","Yuki Tanaka","Elena Rodriguez","David Kim","Fatima Al-Hassan","Lucas Silva","Priya Sharma","Noah Williams","Mei Lin","Carlos Mendez","Amara Osei","Henrik Larsson","Zara Ahmed"],C=["Product Manager","UX Designer","Frontend Developer","Data Analyst","Marketing Lead","QA Engineer","DevOps Lead","Content Strategist","Startup Founder","IT Director","Customer Success Lead","Research Scientist"],A=["San Francisco, CA","Austin, TX","London, UK","Toronto, CA","Berlin, DE","Tokyo, JP","Sydney, AU","S\xE3o Paulo, BR"],M=["I need tools that help me stay organized without slowing me down.","The dashboard is where I live \u2014 it has to be fast and reliable.","I want to understand the data, not fight the interface.","If it takes more than two clicks, I\u2019ll find another way.","Collaboration shouldn\u2019t mean endless notification noise.","I just want it to work the way I expect it to.","Give me the big picture first, then let me drill into details.","Accessibility isn\u2019t a nice-to-have \u2014 it\u2019s how I use the web."],$=["Streamline daily workflows","Reduce context-switching","Stay aligned with the team","Make data-driven decisions quickly","Ship features on a predictable cadence","Automate repetitive tasks","Improve onboarding experience","Keep documentation up to date"],z=["Too many disconnected tools","Slow page loads break focus","Unclear ownership of tasks","Settings that reset unexpectedly","Notifications that bury important updates","Poor mobile experience","Inconsistent design across features","No offline support"],q=["Checks dashboards every morning","Prefers keyboard shortcuts over mouse","Skims docs, reads deeply only when stuck","Shares screenshots in Slack","Batches email to twice a day","Tests features in incognito first","Bookmarks frequently used reports","Uses dark mode exclusively"],h=class extends HTMLElement{static get observedAttributes(){return["role","age","location","avatar","compact","src","data-list-stories","id"]}#e=new Map;#t=null;constructor(){super(),this.attachShadow({mode:"open"})}relatedStories(){if(!this.id)return[];let e=this.getRootNode(),t=e.querySelectorAll?e:document;return Array.from(t.querySelectorAll(`user-story[persona-id="${E(this.id)}"]`))}#a(){for(let e of[...this.children]){let t=e.getAttribute("slot");t&&!this.getAttribute(t)&&this.#e.set(t,e.textContent.trim())}}_resolve(e){return this.getAttribute(e)||this.#e.get(e)||""}get data(){return{name:this.personaName,role:this.personaRole||void 0,age:this.age||void 0,location:this.location||void 0,avatar:this.avatar||void 0,quote:this.quote||void 0,bio:this.#e.get("bio")||void 0,goals:this.#e.get("goals")||void 0,frustrations:this.#e.get("frustrations")||void 0,behaviors:this.#e.get("behaviors")||void 0}}set data(e){!e||typeof e!="object"||(this._applyData(e),this.shadowRoot&&this.#s(),this.dispatchEvent(new CustomEvent("user-persona:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0,composed:!0})))}_applyData(e){for(let t of["role","age","location","avatar"])e[t]&&this.setAttribute(t,String(e[t]));if(e.name&&!this.querySelector('[slot="name"]')){let t=document.createElement("h2");t.slot="name",t.textContent=String(e.name),this.appendChild(t)}if(e.quote&&!this.querySelector('[slot="quote"]')){let t=document.createElement("p");t.slot="quote",t.textContent=String(e.quote),this.appendChild(t)}for(let t of["bio","goals","frustrations","behaviors"])e[t]&&this.#e.set(t,String(e[t]))}async _loadSrc(e){if(e)try{let t=await fetch(e);if(!t.ok)throw new Error(`HTTP ${t.status}`);let o=await t.json();this._applyData(o),this.#s()}catch(t){console.warn(`[user-persona] Failed to load src="${e}":`,t)}}connectedCallback(){this.#a(),this.hasAttribute("data-mock")?this.#n():this.hasAttribute("src")&&this._loadSrc(this.getAttribute("src")),this.#s(),this.#o(),this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent("persona-ready",{bubbles:!0,composed:!0,detail:{name:this.personaName,role:this.personaRole}}))}disconnectedCallback(){this.removeAttribute("data-upgraded"),this.#t?.disconnect(),this.#t=null}#o(){if(!this.hasAttribute("data-list-stories")||!this.id){this.#t?.disconnect(),this.#t=null;return}this.#t||(this.#t=new MutationObserver(()=>this.#i()),this.#t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["persona-id"]}))}#i(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector("[data-stories-section]");e&&(e.outerHTML=this.#r())}#r(){if(!this.hasAttribute("data-list-stories")||!this.id)return"";let e=this.relatedStories();return`
|
|
298
|
-
<section class="section" part="section-stories" data-stories-section>
|
|
299
|
-
<div class="section-header">
|
|
300
|
-
<div class="section-icon stories" aria-hidden="true">
|
|
301
|
-
<svg viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>
|
|
302
|
-
</div>
|
|
303
|
-
<span class="section-title">Stories <span class="section-count">${e.length}</span></span>
|
|
304
|
-
</div>
|
|
305
|
-
<div class="section-content">
|
|
306
|
-
${e.length===0?'<p class="empty-stories">No user stories reference this persona yet.</p>':`<ul class="story-list">${e.map(t=>{let o=t.id||t.getAttribute("story-id")||"",i=t.querySelector('[slot="action"]')?.textContent?.trim()||t.getAttribute("action")||t.id||"untitled",s=t.getAttribute("priority")||"",n=t.getAttribute("status")||"";return`<li class="story-item" data-priority="${a(s)}" data-status="${a(n)}">${o?`<a href="#${a(o)}">${a(i)}</a>`:`<span>${a(i)}</span>`}${s?`<span class="story-meta">${a(s)}</span>`:""}${n?`<span class="story-meta">${a(n)}</span>`:""}</li>`}).join("")}</ul>`}
|
|
307
|
-
</div>
|
|
308
|
-
</section>
|
|
309
|
-
`}attributeChangedCallback(e,t,o){if(!(t===o||!this.shadowRoot)){if(e==="src"&&this.isConnected){this._loadSrc(o);return}(e==="data-list-stories"||e==="id")&&this.#o(),this.#s()}}get personaName(){return this.querySelector('[slot="name"]')?.textContent?.trim()||this.#e.get("name")||"Unnamed Persona"}get personaRole(){return this.getAttribute("role")||""}get age(){return this.getAttribute("age")||""}get location(){return this.getAttribute("location")||""}get avatar(){return this.getAttribute("avatar")||""}get quote(){return this.querySelector('[slot="quote"]')?.textContent?.trim()||this.#e.get("quote")||""}get compact(){return this.hasAttribute("compact")}#n(){let e=this.dataset.seed||this.dataset.mock||String(Date.now()),t=s=>s[(u(e+s.length)%s.length+s.length)%s.length],o=(s,n)=>{let c=[];for(let l=0;l<n;l++)c.push(s[(u(e+l+s.length)%s.length+s.length)%s.length]);return[...new Set(c)]};if(!this.querySelector('[slot="name"]')){let s=document.createElement("h2");s.slot="name",s.textContent=t(k),this.appendChild(s)}if(this.getAttribute("role")||this.setAttribute("role",t(C)),this.getAttribute("age")||this.setAttribute("age",String(25+(u(e)%30+30)%30)),this.getAttribute("location")||this.setAttribute("location",t(A)),!this.getAttribute("avatar")){let s=this.querySelector('[slot="name"]')?.textContent?.trim()||"Persona";this.setAttribute("avatar",x(s,256))}if(!this.querySelector('[slot="quote"]')){let s=document.createElement("p");s.slot="quote",s.textContent=t(M),this.appendChild(s)}let i=(s,n)=>{if(this.querySelector(`[slot="${s}"]`))return;let c=document.createElement("ul");c.setAttribute("slot",s);for(let l of n){let m=document.createElement("li");m.textContent=l,c.appendChild(m)}this.appendChild(c)};i("goals",o($,3)),i("frustrations",o(z,3)),i("behaviors",o(q,3))}#s(){let e=this.personaName,t=this.personaRole,o=this.age,i=this.location,s=this.avatar,n=this.quote,c=y(e),l=s?`background:url(${a(s)}) center/cover`:`background:${c}`;this.shadowRoot.innerHTML=`
|
|
310
|
-
<style>${v}</style>
|
|
311
|
-
|
|
312
|
-
<article class="persona-card" part="card" role="article"
|
|
313
|
-
aria-label="User persona: ${a(e)}">
|
|
314
|
-
|
|
315
|
-
<header class="persona-header" part="header">
|
|
316
|
-
<div class="avatar" part="avatar" style="${l}"
|
|
317
|
-
role="img" aria-label="Avatar for ${a(e)}">
|
|
318
|
-
${s?"":a(b(e))}
|
|
319
|
-
</div>
|
|
320
|
-
<div class="header-info">
|
|
321
|
-
<div class="persona-name-wrap" part="name">
|
|
322
|
-
<slot name="name"><h2 class="persona-name-fallback">${a(e)}</h2></slot>
|
|
323
|
-
</div>
|
|
324
|
-
${t?`<p class="persona-role" part="role">${a(t)}</p>`:""}
|
|
325
|
-
<div class="persona-meta" part="meta">
|
|
326
|
-
${o?`
|
|
327
|
-
<span class="meta-item">
|
|
328
|
-
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>
|
|
329
|
-
${a(o)} years old
|
|
330
|
-
</span>
|
|
331
|
-
`:""}
|
|
332
|
-
${i?`
|
|
333
|
-
<span class="meta-item">
|
|
334
|
-
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>
|
|
335
|
-
${a(i)}
|
|
336
|
-
</span>
|
|
337
|
-
`:""}
|
|
338
|
-
</div>
|
|
339
|
-
</div>
|
|
340
|
-
</header>
|
|
341
|
-
|
|
342
|
-
${n||this.querySelector('[slot="quote"]')?`
|
|
343
|
-
<div class="persona-quote" part="quote">
|
|
344
|
-
<span class="quote-mark" aria-hidden="true">“</span>
|
|
345
|
-
<div class="quote-text-wrap"><slot name="quote"><p class="quote-text">${a(n)}</p></slot></div>
|
|
346
|
-
</div>
|
|
347
|
-
`:""}
|
|
348
|
-
|
|
349
|
-
<div class="persona-body" part="body">
|
|
350
|
-
<div class="section" part="section-bio">
|
|
351
|
-
<div class="section-header">
|
|
352
|
-
<div class="section-icon bio" aria-hidden="true">
|
|
353
|
-
<svg viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
|
354
|
-
</div>
|
|
355
|
-
<span class="section-title">Background</span>
|
|
356
|
-
</div>
|
|
357
|
-
<div class="section-content">
|
|
358
|
-
<slot name="bio">No background information provided.</slot>
|
|
359
|
-
</div>
|
|
360
|
-
</div>
|
|
361
|
-
|
|
362
|
-
<div class="section" part="section-goals">
|
|
363
|
-
<div class="section-header">
|
|
364
|
-
<div class="section-icon goals" aria-hidden="true">
|
|
365
|
-
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
|
|
366
|
-
</div>
|
|
367
|
-
<span class="section-title">Goals</span>
|
|
368
|
-
</div>
|
|
369
|
-
<div class="section-content">
|
|
370
|
-
<slot name="goals">No goals specified.</slot>
|
|
371
|
-
</div>
|
|
372
|
-
</div>
|
|
373
|
-
|
|
374
|
-
<div class="section" part="section-frustrations">
|
|
375
|
-
<div class="section-header">
|
|
376
|
-
<div class="section-icon frustrations" aria-hidden="true">
|
|
377
|
-
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>
|
|
378
|
-
</div>
|
|
379
|
-
<span class="section-title">Frustrations</span>
|
|
380
|
-
</div>
|
|
381
|
-
<div class="section-content">
|
|
382
|
-
<slot name="frustrations">No frustrations listed.</slot>
|
|
383
|
-
</div>
|
|
384
|
-
</div>
|
|
385
|
-
|
|
386
|
-
<div class="section" part="section-behaviors">
|
|
387
|
-
<div class="section-header">
|
|
388
|
-
<div class="section-icon behaviors" aria-hidden="true">
|
|
389
|
-
<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>
|
|
390
|
-
</div>
|
|
391
|
-
<span class="section-title">Behaviors</span>
|
|
392
|
-
</div>
|
|
393
|
-
<div class="section-content">
|
|
394
|
-
<slot name="behaviors">No behaviors documented.</slot>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
|
|
398
|
-
${this.#r()}
|
|
399
|
-
</div>
|
|
400
|
-
</article>
|
|
401
|
-
`}};function E(r){return typeof CSS<"u"&&CSS.escape?CSS.escape(String(r)):String(r).replace(/["\\]/g,"\\$&")}g("user-persona",h);export{h as UserPersona};
|
|
402
|
-
//# sourceMappingURL=user-persona.js.map
|