@adia-ai/web-components 0.8.6 → 0.8.8

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 (108) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +3 -3
  3. package/dist/host.min.css +1 -1
  4. package/dist/host.sheet.js +1 -1
  5. package/dist/theme-provider.min.js +2 -2
  6. package/dist/web-components.min.css +1 -1
  7. package/dist/web-components.min.js +1 -1
  8. package/dist/web-components.sheet.js +1 -1
  9. package/package.json +2 -1
  10. package/patterns/access-requests/access-requests.examples.html +132 -0
  11. package/patterns/access-requests/access-requests.html +60 -0
  12. package/patterns/admin-keys-and-export/admin-keys-and-export.examples.html +236 -0
  13. package/patterns/admin-keys-and-export/admin-keys-and-export.html +64 -0
  14. package/patterns/admin-shell/admin-shell.examples.html +327 -0
  15. package/patterns/admin-shell/admin-shell.html +44 -0
  16. package/patterns/agent-cost/agent-cost.examples.html +111 -0
  17. package/patterns/agent-cost/agent-cost.html +62 -0
  18. package/patterns/agent-memory/agent-memory.examples.html +155 -0
  19. package/patterns/agent-memory/agent-memory.html +64 -0
  20. package/patterns/agent-prompt-library/agent-prompt-library.examples.html +181 -0
  21. package/patterns/agent-prompt-library/agent-prompt-library.html +64 -0
  22. package/patterns/agent-tool-call/agent-tool-call.examples.html +123 -0
  23. package/patterns/agent-tool-call/agent-tool-call.html +60 -0
  24. package/patterns/alert-dialog/alert-dialog.examples.html +105 -0
  25. package/patterns/alert-dialog/alert-dialog.html +57 -0
  26. package/patterns/app-nav/app-nav.examples.html +421 -0
  27. package/patterns/app-nav/app-nav.html +50 -0
  28. package/patterns/approvals/approvals.examples.html +131 -0
  29. package/patterns/approvals/approvals.html +58 -0
  30. package/patterns/audit-log/audit-log.examples.html +74 -0
  31. package/patterns/audit-log/audit-log.examples.js +60 -0
  32. package/patterns/audit-log/audit-log.html +63 -0
  33. package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +89 -0
  34. package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.js +69 -0
  35. package/patterns/bulk-action-toolbar/bulk-action-toolbar.html +62 -0
  36. package/patterns/changelog-feed/changelog-feed.examples.html +151 -0
  37. package/patterns/changelog-feed/changelog-feed.html +57 -0
  38. package/patterns/chart-in-card/chart-in-card.examples.html +193 -0
  39. package/patterns/chart-in-card/chart-in-card.examples.js +46 -0
  40. package/patterns/chart-in-card/chart-in-card.html +66 -0
  41. package/patterns/chat-shell/chat-shell.examples.html +129 -0
  42. package/patterns/chat-shell/chat-shell.html +46 -0
  43. package/patterns/comments-and-collaboration/comments-and-collaboration.examples.html +241 -0
  44. package/patterns/comments-and-collaboration/comments-and-collaboration.html +66 -0
  45. package/patterns/component-tokens/component-tokens.examples.html +483 -0
  46. package/patterns/component-tokens/component-tokens.html +42 -0
  47. package/patterns/conversion-funnel/conversion-funnel.examples.html +158 -0
  48. package/patterns/conversion-funnel/conversion-funnel.examples.js +4 -0
  49. package/patterns/conversion-funnel/conversion-funnel.html +64 -0
  50. package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html +196 -0
  51. package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.html +58 -0
  52. package/patterns/diff-review/diff-review.examples.html +147 -0
  53. package/patterns/diff-review/diff-review.html +56 -0
  54. package/patterns/editor-shell/editor-shell.examples.html +139 -0
  55. package/patterns/editor-shell/editor-shell.html +62 -0
  56. package/patterns/export-flow/export-flow.examples.html +152 -0
  57. package/patterns/export-flow/export-flow.examples.js +37 -0
  58. package/patterns/export-flow/export-flow.html +65 -0
  59. package/patterns/filter-bar/filter-bar.examples.html +116 -0
  60. package/patterns/filter-bar/filter-bar.examples.js +23 -0
  61. package/patterns/filter-bar/filter-bar.html +70 -0
  62. package/patterns/form-drawer/form-drawer.examples.html +210 -0
  63. package/patterns/form-drawer/form-drawer.html +64 -0
  64. package/patterns/form-system/form-system.examples.html +383 -0
  65. package/patterns/form-system/form-system.html +48 -0
  66. package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.examples.html +189 -0
  67. package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.html +64 -0
  68. package/patterns/inline-dialog/inline-dialog.examples.html +143 -0
  69. package/patterns/inline-dialog/inline-dialog.html +59 -0
  70. package/patterns/kanban-board/kanban-board.examples.html +224 -0
  71. package/patterns/kanban-board/kanban-board.html +58 -0
  72. package/patterns/layout/layout.examples.html +365 -0
  73. package/patterns/layout/layout.html +54 -0
  74. package/patterns/marketing-engagement/marketing-engagement.examples.html +280 -0
  75. package/patterns/marketing-engagement/marketing-engagement.html +64 -0
  76. package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.examples.html +213 -0
  77. package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.html +58 -0
  78. package/patterns/overview/overview.examples.html +119 -0
  79. package/patterns/overview/overview.html +42 -0
  80. package/patterns/permissions-matrix/permissions-matrix.examples.html +91 -0
  81. package/patterns/permissions-matrix/permissions-matrix.examples.js +28 -0
  82. package/patterns/permissions-matrix/permissions-matrix.html +56 -0
  83. package/patterns/permissions-role-picker/permissions-role-picker.examples.html +81 -0
  84. package/patterns/permissions-role-picker/permissions-role-picker.html +56 -0
  85. package/patterns/permissions-sharing/permissions-sharing.examples.html +175 -0
  86. package/patterns/permissions-sharing/permissions-sharing.html +66 -0
  87. package/patterns/profile-public-and-verification/profile-public-and-verification.examples.html +227 -0
  88. package/patterns/profile-public-and-verification/profile-public-and-verification.html +70 -0
  89. package/patterns/record-detail-drawer/record-detail-drawer.examples.html +164 -0
  90. package/patterns/record-detail-drawer/record-detail-drawer.html +64 -0
  91. package/patterns/responsive-shell-sidebar/README.md +37 -0
  92. package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.css +39 -0
  93. package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.examples.html +208 -0
  94. package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.html +47 -0
  95. package/patterns/retention-cohort/retention-cohort.examples.html +149 -0
  96. package/patterns/retention-cohort/retention-cohort.examples.js +37 -0
  97. package/patterns/retention-cohort/retention-cohort.html +62 -0
  98. package/patterns/search-discovery/search-discovery.examples.html +263 -0
  99. package/patterns/search-discovery/search-discovery.html +58 -0
  100. package/patterns/system-banners/system-banners.examples.html +150 -0
  101. package/patterns/system-banners/system-banners.html +52 -0
  102. package/patterns/timezone-selector/timezone-selector.examples.html +82 -0
  103. package/patterns/timezone-selector/timezone-selector.examples.js +72 -0
  104. package/patterns/timezone-selector/timezone-selector.html +57 -0
  105. package/patterns/wizard-drawer/wizard-drawer.examples.html +144 -0
  106. package/patterns/wizard-drawer/wizard-drawer.examples.js +33 -0
  107. package/patterns/wizard-drawer/wizard-drawer.html +72 -0
  108. package/styles/type/roles.css +8 -8
@@ -0,0 +1,280 @@
1
+ <header>
2
+ <div>
3
+ <h1>Marketing &amp; engagement</h1>
4
+ <div data-actions>
5
+ <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">stat-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui>
6
+ </div>
7
+ </div>
8
+ <p>Three adjacent marketing-side surfaces: hero/CTA blocks (14c) for landing pages, referral and invite flows (14f) for word-of-mouth growth, and achievement/milestone moments (14g) for ongoing engagement. All compose existing primitives — heroes are layout-heavy card-ui, referrals are field-ui + tag-ui status, achievements are tag-ui + stat-ui + progress-ui.</p>
9
+ </header>
10
+
11
+ <section data-section data-property="when-to-use">
12
+ <h2 variant="section">When to use</h2>
13
+ <p data-note>
14
+ Hero/CTA: top-of-page block on any marketing or landing page
15
+ where the goal is "do this one thing". Referral: when growth
16
+ benefits from existing users inviting others (paid plans,
17
+ workspaces, social products). Achievements: when ongoing
18
+ engagement needs a non-monetary reward — streaks, completion
19
+ badges, level-ups.
20
+ </p>
21
+ </section>
22
+
23
+ <section data-section data-property="hero-simple">
24
+ <h2 variant="section">Hero — title + subtitle + CTA</h2>
25
+ <p data-note>The minimal hero. Centered display headline, subtitle, primary CTA + secondary "Learn more" ghost. No supporting image — works when the headline carries the weight.</p>
26
+ <div data-artifact-container>
27
+ <div data-artifact-item data-artifact-label="simple hero">
28
+ <card-ui data-chunk="hero-cta-simple" raw>
29
+ <section bleed>
30
+ <col-ui gap="3" align="center" padding="10">
31
+ <tag-ui size="sm" variant="muted">v0.0.27 — out today</tag-ui>
32
+ <text-ui variant="display" strong>Generative UI, deterministically.</text-ui>
33
+ <text-ui variant="deck" color="subtle">AdiaUI emits A2UI JSON the runtime renders into Light-DOM web components. No model, no surprise.</text-ui>
34
+ <row-ui gap="2">
35
+ <button-ui text="Get started" variant="primary" size="lg"></button-ui>
36
+ <button-ui text="See demos" variant="ghost" size="lg" icon-trailing="arrow-right"></button-ui>
37
+ </row-ui>
38
+ </col-ui>
39
+ </section>
40
+ </card-ui>
41
+ </div>
42
+ </div>
43
+ </section>
44
+
45
+ <section data-section data-property="hero-split">
46
+ <h2 variant="section">Hero — split with visual</h2>
47
+ <p data-note>Two-column hero. Headline + subtitle + CTA on the left, supporting visual on the right. The visual is a placeholder card here; in production it's a screenshot, animation, or video poster.</p>
48
+ <div data-artifact-container>
49
+ <div data-artifact-item data-artifact-label="split hero">
50
+ <card-ui data-chunk="hero-cta-split" raw>
51
+ <section bleed>
52
+ <grid-ui columns="2" gap="6" align="center" padding="8">
53
+ <col-ui gap="4" align="start">
54
+ <tag-ui size="sm" variant="muted">For teams</tag-ui>
55
+ <text-ui variant="display" strong>Ship UI as fast as your model thinks.</text-ui>
56
+ <text-ui variant="deck" color="subtle">A2UI is a typed JSON protocol your agent emits and the runtime renders. No React rebuild for every prompt.</text-ui>
57
+ <row-ui gap="2">
58
+ <button-ui text="Start free" variant="primary"></button-ui>
59
+ <button-ui text="Talk to sales" variant="ghost" icon-trailing="arrow-right"></button-ui>
60
+ </row-ui>
61
+ <row-ui gap="6">
62
+ <stat-ui label="Components" value="94"></stat-ui>
63
+ <stat-ui label="Chunks" value="755"></stat-ui>
64
+ <stat-ui label="Cost ratio" value="0.18×"></stat-ui>
65
+ </row-ui>
66
+ </col-ui>
67
+ <card-ui variant="soft">
68
+ <section bleed>
69
+ <col-ui align="center" justify="center" padding="10">
70
+ <text-ui color="subtle">[ Product visual ]</text-ui>
71
+ </col-ui>
72
+ </section>
73
+ </card-ui>
74
+ </grid-ui>
75
+ </section>
76
+ </card-ui>
77
+ </div>
78
+ </div>
79
+ </section>
80
+
81
+ <section data-section data-property="referral-link">
82
+ <h2 variant="section">Referral — share link</h2>
83
+ <p data-note>Read-only input prefilled with the user's referral URL + Copy button. Below it: per-channel share buttons (email, X, LinkedIn). Reward copy describes what referrer + referee get ("$10 credit each").</p>
84
+ <div data-artifact-container>
85
+ <div data-artifact-item data-artifact-label="referral share link">
86
+ <card-ui data-chunk="referral-share-link">
87
+ <header>
88
+ <span slot="heading" variant="section">Invite a friend, both get $10</span>
89
+ <text-ui slot="description" color="subtle">When they sign up and verify, $10 in credit lands in both your accounts.</text-ui>
90
+ </header>
91
+ <section>
92
+ <col-ui gap="3">
93
+ <field-ui label="Your referral link">
94
+ <input-ui name="referral_url" value="adia.ai/r/kim-A4F92" readonly icon-trailing="copy"></input-ui>
95
+ </field-ui>
96
+ <row-ui gap="2">
97
+ <button-ui text="Copy link" variant="primary" icon-leading="copy"></button-ui>
98
+ <button-ui text="Email" variant="ghost" icon-leading="envelope"></button-ui>
99
+ <button-ui text="X" variant="ghost"></button-ui>
100
+ <button-ui text="LinkedIn" variant="ghost"></button-ui>
101
+ </row-ui>
102
+ </col-ui>
103
+ </section>
104
+ </card-ui>
105
+ </div>
106
+ </div>
107
+ </section>
108
+
109
+ <section data-section data-property="referral-status">
110
+ <h2 variant="section">Referral — status</h2>
111
+ <p data-note>The user's referral history. Stats grid (referrals sent / converted / credits earned), then a list of per-referral rows with avatar + status tag. Pending = invite sent, no signup; Joined = signed up, no verify; Verified = credit earned.</p>
112
+ <div data-artifact-container>
113
+ <div data-artifact-item data-artifact-label="referral status">
114
+ <card-ui data-chunk="referral-status">
115
+ <header>
116
+ <span slot="heading" variant="section">Your referrals</span>
117
+ <text-ui slot="description" color="subtle">$30 credit earned · 3 friends joined</text-ui>
118
+ </header>
119
+ <section>
120
+ <col-ui gap="4">
121
+ <grid-ui columns="3" gap="3">
122
+ <stat-ui label="Sent" value="7"></stat-ui>
123
+ <stat-ui label="Joined" value="3"></stat-ui>
124
+ <stat-ui label="Credit earned" value="$30"></stat-ui>
125
+ </grid-ui>
126
+ <list-ui divider contained>
127
+ <list-item-ui text="Avery Chen">
128
+ <avatar-ui slot="icon" size="sm" text="Avery Chen"></avatar-ui>
129
+ <span slot="description">avery@example.com · 5 days ago</span>
130
+ <tag-ui slot="action" size="sm" variant="success">Verified · $10</tag-ui>
131
+ </list-item-ui>
132
+ <list-item-ui text="Jordan Lee">
133
+ <avatar-ui slot="icon" size="sm" text="Jordan Lee"></avatar-ui>
134
+ <span slot="description">jordan@example.com · 2 weeks ago</span>
135
+ <tag-ui slot="action" size="sm" variant="success">Verified · $10</tag-ui>
136
+ </list-item-ui>
137
+ <list-item-ui text="Sam Park">
138
+ <avatar-ui slot="icon" size="sm" text="Sam Park"></avatar-ui>
139
+ <span slot="description">sam@example.com · 3 weeks ago</span>
140
+ <tag-ui slot="action" size="sm">Joined</tag-ui>
141
+ </list-item-ui>
142
+ <list-item-ui text="riley@example.com">
143
+ <avatar-ui slot="icon" size="sm" text="riley@example.com"></avatar-ui>
144
+ <span slot="description">Sent 1 month ago</span>
145
+ <tag-ui slot="action" size="sm" variant="muted">Pending</tag-ui>
146
+ </list-item-ui>
147
+ </list-ui>
148
+ </col-ui>
149
+ </section>
150
+ </card-ui>
151
+ </div>
152
+ </div>
153
+ </section>
154
+
155
+ <section data-section data-property="achievement-badges">
156
+ <h2 variant="section">Achievements — earned badges</h2>
157
+ <p data-note>Grid of earned + locked badges. Each card shows the icon, name, description, and earn-date. Earned badges carry the date as a <code>success</code> tag; locked badges show progress as a <code>muted</code> tag and live in a <code>ghost</code> card so they read as quieter without raw opacity.</p>
158
+ <div data-artifact-container>
159
+ <div data-artifact-item data-artifact-label="achievement badges">
160
+ <card-ui data-chunk="achievement-badges">
161
+ <header>
162
+ <span slot="heading" variant="section">Achievements</span>
163
+ <text-ui slot="description" color="subtle">5 of 12 unlocked</text-ui>
164
+ </header>
165
+ <section>
166
+ <grid-ui columns="3" gap="3">
167
+ <card-ui variant="outlined">
168
+ <section bleed>
169
+ <col-ui align="center" gap="2" padding="4">
170
+ <text-ui variant="display">🚀</text-ui>
171
+ <text-ui strong>First launch</text-ui>
172
+ <text-ui variant="caption" color="subtle">Shipped your first prompt</text-ui>
173
+ <tag-ui size="sm" variant="success">Apr 12</tag-ui>
174
+ </col-ui>
175
+ </section>
176
+ </card-ui>
177
+ <card-ui variant="outlined">
178
+ <section bleed>
179
+ <col-ui align="center" gap="2" padding="4">
180
+ <text-ui variant="display">🔥</text-ui>
181
+ <text-ui strong>7-day streak</text-ui>
182
+ <text-ui variant="caption" color="subtle">A week of daily use</text-ui>
183
+ <tag-ui size="sm" variant="success">Apr 19</tag-ui>
184
+ </col-ui>
185
+ </section>
186
+ </card-ui>
187
+ <card-ui variant="outlined">
188
+ <section bleed>
189
+ <col-ui align="center" gap="2" padding="4">
190
+ <text-ui variant="display">🎨</text-ui>
191
+ <text-ui strong>Theme artist</text-ui>
192
+ <text-ui variant="caption" color="subtle">Created 3 custom themes</text-ui>
193
+ <tag-ui size="sm" variant="success">Apr 22</tag-ui>
194
+ </col-ui>
195
+ </section>
196
+ </card-ui>
197
+ <card-ui variant="ghost">
198
+ <section bleed>
199
+ <col-ui align="center" gap="2" padding="4">
200
+ <text-ui variant="display" color="subtle">🏗️</text-ui>
201
+ <text-ui color="subtle" strong>Builder</text-ui>
202
+ <text-ui variant="caption" color="subtle">Ship 10 prompts</text-ui>
203
+ <tag-ui size="sm" variant="muted">7 of 10</tag-ui>
204
+ </col-ui>
205
+ </section>
206
+ </card-ui>
207
+ <card-ui variant="ghost">
208
+ <section bleed>
209
+ <col-ui align="center" gap="2" padding="4">
210
+ <text-ui variant="display" color="subtle">🌟</text-ui>
211
+ <text-ui color="subtle" strong>30-day streak</text-ui>
212
+ <text-ui variant="caption" color="subtle">A month of daily use</text-ui>
213
+ <tag-ui size="sm" variant="muted">12 of 30</tag-ui>
214
+ </col-ui>
215
+ </section>
216
+ </card-ui>
217
+ <card-ui variant="ghost">
218
+ <section bleed>
219
+ <col-ui align="center" gap="2" padding="4">
220
+ <text-ui variant="display" color="subtle">🤝</text-ui>
221
+ <text-ui color="subtle" strong>Connector</text-ui>
222
+ <text-ui variant="caption" color="subtle">Refer 5 friends</text-ui>
223
+ <tag-ui size="sm" variant="muted">3 of 5</tag-ui>
224
+ </col-ui>
225
+ </section>
226
+ </card-ui>
227
+ </grid-ui>
228
+ </section>
229
+ </card-ui>
230
+ </div>
231
+ </div>
232
+ </section>
233
+
234
+ <section data-section data-property="achievement-unlock">
235
+ <h2 variant="section">Achievements — unlock moment</h2>
236
+ <p data-note>The just-earned achievement card — usually appears as a toast or modal moment. Big icon, "You earned…" header, description, and a CTA to share or keep going. This is the dopamine hit; don't make it dismissive.</p>
237
+ <div data-artifact-container>
238
+ <div data-artifact-item data-artifact-label="achievement unlock">
239
+ <card-ui data-chunk="achievement-unlock">
240
+ <section>
241
+ <col-ui gap="3" align="center" padding="6">
242
+ <text-ui variant="display">🔥</text-ui>
243
+ <tag-ui size="sm" variant="primary">Achievement unlocked</tag-ui>
244
+ <text-ui variant="display" strong>7-day streak</text-ui>
245
+ <text-ui color="subtle">A full week of daily use. You've shipped 14 prompts and 23 chunks since you started.</text-ui>
246
+ </col-ui>
247
+ </section>
248
+ <footer divider>
249
+ <button-ui slot="action" text="Keep going" variant="ghost"></button-ui>
250
+ <button-ui slot="action" text="Share" variant="primary" icon-leading="share-network"></button-ui>
251
+ </footer>
252
+ </card-ui>
253
+ </div>
254
+ </div>
255
+ </section>
256
+
257
+ <section data-section data-property="composition">
258
+ <h2 variant="section">Composition rules</h2>
259
+ <ul>
260
+ <li><strong>Hero CTA is one primary action, not three</strong> — "Get started" + "See demos" (ghost) is the maximum. Three primaries means none — the user reads ambivalence.</li>
261
+ <li><strong>Hero kicker tag is for new/version/audience badges</strong> — "v0.0.27 out today" or "For teams" reads as a slim eyebrow above the headline. Skip the tag if there's no signal.</li>
262
+ <li><strong>Referral copy leads with the symmetrical reward</strong> — "Both get $10" beats "Get $10 when they sign up". Symmetry signals trust; one-sided rewards trigger spam reflex.</li>
263
+ <li><strong>Referral statuses are 3-state</strong> — Pending (link sent, no signup) · Joined (signed up, not verified) · Verified (credit earned). Anything else is collapsing distinct states into noise.</li>
264
+ <li><strong>Achievement badges show locked + earned together</strong> — locked badges with progress hints ("7 of 10") drive engagement; hiding them removes the goalpost. Use <code>variant="ghost"</code> on locked cards + <code>color="subtle"</code> on the icon — communicates state without raw opacity hacks.</li>
265
+ <li><strong>Don't auto-advance the unlock modal</strong> — the moment is the reward; let the user dismiss when ready. Auto-dismiss erases the dopamine hit.</li>
266
+ <li><strong>Streaks reset honestly</strong> — "You broke your 7-day streak" is honest; "You earned a 6-day streak" is patronizing. The product respects the user when it doesn't hide the loss.</li>
267
+ <li><strong>Achievements are private by default, shareable by choice</strong> — auto-posting "Kim earned 7-day streak" to a feed feels like surveillance. The Share button is the consent.</li>
268
+ </ul>
269
+ </section>
270
+
271
+ <section data-section data-property="cross-references">
272
+ <h2 variant="section">See also</h2>
273
+ <ul>
274
+ <li><a href="/site/components/card">card-ui</a> · <a href="/site/components/button">button-ui</a> · <a href="/site/components/tag">tag-ui</a> — primitives.</li>
275
+ <li><a href="/site/components/stat">stat-ui</a> — referral metrics.</li>
276
+ <li><a href="/site/components/field">field-ui</a> · <a href="/site/components/input">input-ui</a> — referral link field.</li>
277
+ <li><a href="/site/patterns/system-banners">system-banners</a> — adjacent (announcement banners are sibling marketing-promo surfaces).</li>
278
+ <li><a href="/site/patterns/profile-public-and-verification">profile-public-and-verification</a> — adjacent (achievements often surface on the public profile).</li>
279
+ </ul>
280
+ </section>
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" theme="auto">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Marketing &amp; engagement (pattern) — AdiaUI</title>
7
+
8
+ <!-- Token base -->
9
+ <link rel="stylesheet" href="../../styles/resets.css">
10
+ <link rel="stylesheet" href="../../styles/tokens.css">
11
+
12
+ <!-- Component CSS — primitives this pattern composes -->
13
+ <link rel="stylesheet" href="../../components/avatar/avatar.css">
14
+ <link rel="stylesheet" href="../../components/button/button.css">
15
+ <link rel="stylesheet" href="../../components/card/card.css">
16
+ <link rel="stylesheet" href="../../components/col/col.css">
17
+ <link rel="stylesheet" href="../../components/field/field.css">
18
+ <link rel="stylesheet" href="../../components/grid/grid.css">
19
+ <link rel="stylesheet" href="../../components/input/input.css">
20
+ <link rel="stylesheet" href="../../components/list/list.css">
21
+ <link rel="stylesheet" href="../../components/row/row.css">
22
+ <link rel="stylesheet" href="../../components/stat/stat.css">
23
+ <link rel="stylesheet" href="../../components/tag/tag.css">
24
+ <link rel="stylesheet" href="../../components/text/text.css">
25
+
26
+ <!-- Component JS -->
27
+ <script type="module" src="../../components/avatar/avatar.js"></script>
28
+ <script type="module" src="../../components/button/button.js"></script>
29
+ <script type="module" src="../../components/card/card.js"></script>
30
+ <script type="module" src="../../components/col/col.js"></script>
31
+ <script type="module" src="../../components/field/field.js"></script>
32
+ <script type="module" src="../../components/grid/grid.js"></script>
33
+ <script type="module" src="../../components/input/input.js"></script>
34
+ <script type="module" src="../../components/list/list.js"></script>
35
+ <script type="module" src="../../components/row/row.js"></script>
36
+ <script type="module" src="../../components/stat/stat.js"></script>
37
+ <script type="module" src="../../components/tag/tag.js"></script>
38
+ <script type="module" src="../../components/text/text.js"></script>
39
+
40
+ <style>
41
+ :where(html, body) { margin: 0; min-height: 100vh; background: var(--md-sys-color-neutral-background); color: var(--md-sys-color-neutral-on-surface); font-family: var(--a-font-family); }
42
+ main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
43
+ </style>
44
+ </head>
45
+ <body>
46
+
47
+ <main id="demo-root">
48
+ <p>Loading examples…</p>
49
+ </main>
50
+
51
+ <script type="module">
52
+ const root = document.getElementById('demo-root');
53
+ try {
54
+ const res = await fetch('./marketing-engagement.examples.html');
55
+ if (!res.ok) throw new Error(`fetch failed (${res.status})`);
56
+ root.innerHTML = await res.text();
57
+ } catch (err) {
58
+ root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load marketing-engagement.examples.html — ${err.message}</p>`;
59
+ console.error('[marketing-engagement.html]', err);
60
+ }
61
+ </script>
62
+
63
+ </body>
64
+ </html>
@@ -0,0 +1,213 @@
1
+ <header>
2
+ <div>
3
+ <h1>Bell menu &amp; digest preview</h1>
4
+ <div data-actions>
5
+ <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">empty-state-ui</tag-ui> <tag-ui size="sm">avatar-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">row-ui</tag-ui> <tag-ui size="sm">col-ui</tag-ui>
6
+ </div>
7
+ </div>
8
+ <p>Two adjacent notification surfaces: the bell-icon popover that opens from the app shell (15d) and the email-digest preview that shows a user what their daily/weekly summary will contain (15e). Both compose existing primitives — `menu-ui` + per-row `list-item-ui` shapes.</p>
9
+ </header>
10
+
11
+ <section data-section data-property="when-to-use">
12
+ <h2 variant="section">When to use</h2>
13
+ <p data-note>
14
+ Bell menu: the ambient affordance — a small popover the user
15
+ glances at when the bell icon shows an unread count. Distinct
16
+ from the full notifications feed (15a) which is a dedicated
17
+ page and from toasts (08e) which are transient.
18
+ Digest preview: the in-app preview of what a scheduled email
19
+ will contain — used inside notification-prefs (15c) so the
20
+ user can validate the digest before committing.
21
+ </p>
22
+ </section>
23
+
24
+ <section data-section data-property="bell-empty">
25
+ <h2 variant="section">Bell menu — empty</h2>
26
+ <p data-note>Default state when there are no unread notifications. Uses an empty-state-ui in the menu body so the popover doesn't feel broken; "View all" footer links to the full feed.</p>
27
+ <div data-artifact-container>
28
+ <div data-artifact-item data-artifact-label="bell menu empty">
29
+ <card-ui data-chunk="bell-menu-empty" style="max-width: 360px;" data-shape="popover">
30
+ <header>
31
+ <text-ui slot="heading" strong>Notifications</text-ui>
32
+ </header>
33
+ <section>
34
+ <empty-state-ui
35
+ icon="bell-slash"
36
+ size="sm"
37
+ heading="All caught up"
38
+ description="No new notifications since you last checked."
39
+ ></empty-state-ui>
40
+ </section>
41
+ <footer divider>
42
+ <row-ui gap="2" align="center" justify="space-between" style="width: 100%;">
43
+ <text-ui size="sm">View all activity</text-ui>
44
+ <icon-ui name="arrow-right" size="sm"></icon-ui>
45
+ </row-ui>
46
+ </footer>
47
+ </card-ui>
48
+ </div>
49
+ </div>
50
+ </section>
51
+
52
+ <section data-section data-property="bell-unread">
53
+ <h2 variant="section">Bell menu — unread items</h2>
54
+ <p data-note>Each row carries an avatar (or icon for system events), a one-line summary, a timestamp, and a small unread-dot. Clicking a row marks it read and navigates to the source. "Mark all read" + "View all activity" in the footer.</p>
55
+ <div data-artifact-container>
56
+ <div data-artifact-item data-artifact-label="bell menu with unread">
57
+ <card-ui data-chunk="bell-menu-unread" style="max-width: 380px;" data-shape="popover">
58
+ <header>
59
+ <row-ui slot="heading" align="center" gap="2">
60
+ <text-ui strong>Notifications</text-ui>
61
+ <tag-ui size="sm" variant="primary">3 new</tag-ui>
62
+ </row-ui>
63
+ </header>
64
+ <section>
65
+ <col-ui gap="2">
66
+ <row-ui gap="2" align="start">
67
+ <avatar-ui size="sm" text="Avery Chen"></avatar-ui>
68
+ <col-ui gap="0" style="flex: 1;">
69
+ <text-ui><strong>Avery Chen</strong> commented on your PR</text-ui>
70
+ <text-ui color="subtle" size="sm">"OKLCH ramp comment" · 4 minutes ago</text-ui>
71
+ </col-ui>
72
+ <span aria-label="Unread" style="flex-shrink: 0; display: inline-block; width: 8px; height: 8px; margin-block-start: 0.4rem; border-radius: 50%; background: var(--a-primary-strong);"></span>
73
+ </row-ui>
74
+ <row-ui gap="2" align="start">
75
+ <avatar-ui size="sm" text="Jordan Lee"></avatar-ui>
76
+ <col-ui gap="0" style="flex: 1;">
77
+ <text-ui><strong>Jordan Lee</strong> assigned you a task</text-ui>
78
+ <text-ui color="subtle" size="sm">"Audit kanban accessibility" · 1 hour ago</text-ui>
79
+ </col-ui>
80
+ <span aria-label="Unread" style="flex-shrink: 0; display: inline-block; width: 8px; height: 8px; margin-block-start: 0.4rem; border-radius: 50%; background: var(--a-primary-strong);"></span>
81
+ </row-ui>
82
+ <row-ui gap="2" align="start">
83
+ <icon-ui name="check-circle" size="sm"></icon-ui>
84
+ <col-ui gap="0" style="flex: 1;">
85
+ <text-ui>Build #4823 succeeded on <strong>main</strong></text-ui>
86
+ <text-ui color="subtle" size="sm">2 hours ago</text-ui>
87
+ </col-ui>
88
+ <span aria-label="Unread" style="flex-shrink: 0; display: inline-block; width: 8px; height: 8px; margin-block-start: 0.4rem; border-radius: 50%; background: var(--a-primary-strong);"></span>
89
+ </row-ui>
90
+ <row-ui gap="2" align="start">
91
+ <avatar-ui size="sm" text="Sam Park"></avatar-ui>
92
+ <col-ui gap="0" style="flex: 1;">
93
+ <text-ui><strong>Sam Park</strong> mentioned you</text-ui>
94
+ <text-ui color="subtle" size="sm">"#design — auth review" · yesterday</text-ui>
95
+ </col-ui>
96
+ </row-ui>
97
+ <row-ui gap="2" align="start">
98
+ <icon-ui name="warning" size="sm"></icon-ui>
99
+ <col-ui gap="0" style="flex: 1;">
100
+ <text-ui>Storage 80% full</text-ui>
101
+ <text-ui color="subtle" size="sm">2 days ago · Workspace</text-ui>
102
+ </col-ui>
103
+ </row-ui>
104
+ </col-ui>
105
+ </section>
106
+ <footer divider>
107
+ <row-ui gap="2" align="center" justify="space-between" style="width: 100%;">
108
+ <row-ui gap="1" align="center">
109
+ <icon-ui name="check" size="sm"></icon-ui>
110
+ <text-ui size="sm">Mark all as read</text-ui>
111
+ </row-ui>
112
+ <row-ui gap="1" align="center">
113
+ <text-ui size="sm">View all activity</text-ui>
114
+ <icon-ui name="arrow-right" size="sm"></icon-ui>
115
+ </row-ui>
116
+ </row-ui>
117
+ </footer>
118
+ </card-ui>
119
+ </div>
120
+ </div>
121
+ </section>
122
+
123
+ <section data-section data-property="digest-preview">
124
+ <h2 variant="section">Email digest preview</h2>
125
+ <p data-note>The in-app rendering of the digest email — frequency header, "What's in this digest" summary, sectioned content. Used inside notification prefs so the user can see exactly what a daily/weekly digest will look like before opting in.</p>
126
+ <div data-artifact-container>
127
+ <div data-artifact-item data-artifact-label="email digest preview">
128
+ <card-ui data-chunk="digest-email-preview" style="max-width: 640px;">
129
+ <header>
130
+ <span slot="heading" variant="section">Weekly digest preview</span>
131
+ <text-ui slot="description" color="subtle">This is what your Monday morning email will contain</text-ui>
132
+ <button-ui slot="action" text="Send test" variant="ghost" size="sm" icon-leading="paper-plane-tilt"></button-ui>
133
+ </header>
134
+ <section>
135
+ <col-ui gap="4">
136
+ <col-ui gap="1">
137
+ <text-ui strong>Hi Kim,</text-ui>
138
+ <text-ui>Here's what happened in <strong>Adia AI</strong> this week.</text-ui>
139
+ </col-ui>
140
+ <col-ui gap="2">
141
+ <text-ui strong size="sm" color="subtle">Mentions · 4</text-ui>
142
+ <col-ui gap="2">
143
+ <row-ui gap="2" align="start">
144
+ <avatar-ui size="xs" text="Avery Chen"></avatar-ui>
145
+ <col-ui gap="0" style="flex: 1;">
146
+ <text-ui>Avery on "OKLCH ramp comment"</text-ui>
147
+ <text-ui color="subtle" size="sm">"Should we use chrome or data scale here?" · Tuesday</text-ui>
148
+ </col-ui>
149
+ </row-ui>
150
+ <row-ui gap="2" align="start">
151
+ <avatar-ui size="xs" text="Jordan Lee"></avatar-ui>
152
+ <col-ui gap="0" style="flex: 1;">
153
+ <text-ui>Jordan on "Auth flow rebuild"</text-ui>
154
+ <text-ui color="subtle" size="sm">"Nominating for review" · Wednesday</text-ui>
155
+ </col-ui>
156
+ </row-ui>
157
+ </col-ui>
158
+ </col-ui>
159
+ <col-ui gap="2">
160
+ <text-ui strong size="sm" color="subtle">Activity · 12</text-ui>
161
+ <col-ui gap="2">
162
+ <col-ui gap="0">
163
+ <text-ui>3 PRs merged</text-ui>
164
+ <text-ui color="subtle" size="sm">v0.0.26 hotfix, attribute-API migration sweep, INDEX update</text-ui>
165
+ </col-ui>
166
+ <col-ui gap="0">
167
+ <text-ui>9 issues closed</text-ui>
168
+ <text-ui color="subtle" size="sm">5 by you, 4 by team</text-ui>
169
+ </col-ui>
170
+ </col-ui>
171
+ </col-ui>
172
+ <col-ui gap="2">
173
+ <text-ui strong size="sm" color="subtle">Coming up</text-ui>
174
+ <row-ui gap="2" align="start">
175
+ <icon-ui name="calendar" size="sm"></icon-ui>
176
+ <col-ui gap="0" style="flex: 1;">
177
+ <text-ui>Design review — Tuesday 2pm</text-ui>
178
+ <text-ui color="subtle" size="sm">v0.0.27 cut planning</text-ui>
179
+ </col-ui>
180
+ </row-ui>
181
+ </col-ui>
182
+ </col-ui>
183
+ </section>
184
+ <footer divider>
185
+ <text-ui slot="description" color="subtle" size="sm">Delivered Mondays at 8am · <a href="#">Manage preferences</a></text-ui>
186
+ </footer>
187
+ </card-ui>
188
+ </div>
189
+ </div>
190
+ </section>
191
+
192
+ <section data-section data-property="composition">
193
+ <h2 variant="section">Composition rules</h2>
194
+ <ul>
195
+ <li><strong>Unread dot, not unread badge</strong> — a small primary-tinted dot on the trailing edge of the row reads as "new" without screaming. Per-row badges with counts are noise on a glance-surface.</li>
196
+ <li><strong>Cap the menu at ~5–7 rows</strong> — anything more is a feed, not a glance. Older items live in the full activity surface (15a) reachable via "View all".</li>
197
+ <li><strong>Empty state is mandatory</strong> — bare "No notifications" text reads as broken. The empty-state-ui treatment (icon + heading + description) is the difference between "system is working and there's nothing to show" vs. "did the page fail to load?".</li>
198
+ <li><strong>Mark-all-read goes in the footer</strong> — destructive-ish actions (clearing the unread state across many items) live below a divider, not inline with row clicks.</li>
199
+ <li><strong>Digest previews use the same components as the email</strong> — the in-app preview should be visually faithful to what the email renders. Don't render a different layout for the preview.</li>
200
+ <li><strong>"Send test" on the digest preview</strong> — let the user fire one to themselves before committing to a recurring schedule. The preview is a confidence check; the test is the proof.</li>
201
+ <li><strong>Frequency lives in the header</strong> — "Weekly digest", "Monday 8am". Without that anchor, users don't know if the preview is "what I'd see today" or "the standard shape".</li>
202
+ </ul>
203
+ </section>
204
+
205
+ <section data-section data-property="cross-references">
206
+ <h2 variant="section">See also</h2>
207
+ <ul>
208
+ <li><a href="/site/components/menu">menu-ui</a> · <a href="/site/components/empty-state">empty-state-ui</a> — bell-menu primitives.</li>
209
+ <li><a href="/site/components/list">list-ui</a> · <a href="/site/components/list-item">list-item-ui</a> — digest section anatomy.</li>
210
+ <li><a href="/site/patterns/comments-and-collaboration">comments-and-collaboration</a> — what mentions in the bell menu link to.</li>
211
+ <li><a href="/site/components/avatar">avatar-ui</a> — actor identity in both surfaces.</li>
212
+ </ul>
213
+ </section>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" theme="auto">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Bell menu &amp; digest preview (pattern) — AdiaUI</title>
7
+
8
+ <!-- Token base -->
9
+ <link rel="stylesheet" href="../../styles/resets.css">
10
+ <link rel="stylesheet" href="../../styles/tokens.css">
11
+
12
+ <!-- Component CSS — primitives this pattern composes -->
13
+ <link rel="stylesheet" href="../../components/avatar/avatar.css">
14
+ <link rel="stylesheet" href="../../components/button/button.css">
15
+ <link rel="stylesheet" href="../../components/card/card.css">
16
+ <link rel="stylesheet" href="../../components/col/col.css">
17
+ <link rel="stylesheet" href="../../components/empty-state/empty-state.css">
18
+ <link rel="stylesheet" href="../../components/icon/icon.css">
19
+ <link rel="stylesheet" href="../../components/row/row.css">
20
+ <link rel="stylesheet" href="../../components/tag/tag.css">
21
+ <link rel="stylesheet" href="../../components/text/text.css">
22
+
23
+ <!-- Component JS -->
24
+ <script type="module" src="../../components/avatar/avatar.js"></script>
25
+ <script type="module" src="../../components/button/button.js"></script>
26
+ <script type="module" src="../../components/card/card.js"></script>
27
+ <script type="module" src="../../components/col/col.js"></script>
28
+ <script type="module" src="../../components/empty-state/empty-state.js"></script>
29
+ <script type="module" src="../../components/icon/icon.js"></script>
30
+ <script type="module" src="../../components/row/row.js"></script>
31
+ <script type="module" src="../../components/tag/tag.js"></script>
32
+ <script type="module" src="../../components/text/text.js"></script>
33
+
34
+ <style>
35
+ :where(html, body) { margin: 0; min-height: 100vh; background: var(--md-sys-color-neutral-background); color: var(--md-sys-color-neutral-on-surface); font-family: var(--a-font-family); }
36
+ main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
37
+ </style>
38
+ </head>
39
+ <body>
40
+
41
+ <main id="demo-root">
42
+ <p>Loading examples…</p>
43
+ </main>
44
+
45
+ <script type="module">
46
+ const root = document.getElementById('demo-root');
47
+ try {
48
+ const res = await fetch('./notifications-bell-and-digest.examples.html');
49
+ if (!res.ok) throw new Error(`fetch failed (${res.status})`);
50
+ root.innerHTML = await res.text();
51
+ } catch (err) {
52
+ root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load notifications-bell-and-digest.examples.html — ${err.message}</p>`;
53
+ console.error('[notifications-bell-and-digest.html]', err);
54
+ }
55
+ </script>
56
+
57
+ </body>
58
+ </html>