@adia-ai/web-modules 0.8.36 → 0.8.37

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 (89) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +3 -3
  3. package/agent-admin/admin-roster/admin-roster.js +1 -1
  4. package/agent-admin/admin-settings/admin-settings.js +1 -1
  5. package/agent-admin/agent-admin/agent-admin.js +1 -1
  6. package/billing/billing-overview/billing-overview.a2ui.json +281 -0
  7. package/billing/billing-overview/billing-overview.class.js +838 -0
  8. package/billing/billing-overview/billing-overview.css +223 -0
  9. package/billing/billing-overview/billing-overview.js +16 -0
  10. package/billing/billing-overview/billing-overview.yaml +441 -0
  11. package/billing/index.js +21 -0
  12. package/billing/invoice-detail/invoice-detail.a2ui.json +276 -0
  13. package/billing/invoice-detail/invoice-detail.class.js +711 -0
  14. package/billing/invoice-detail/invoice-detail.css +305 -0
  15. package/billing/invoice-detail/invoice-detail.js +16 -0
  16. package/billing/invoice-detail/invoice-detail.yaml +411 -0
  17. package/billing/invoice-history/invoice-history.a2ui.json +315 -0
  18. package/billing/invoice-history/invoice-history.class.js +672 -0
  19. package/billing/invoice-history/invoice-history.css +130 -0
  20. package/billing/invoice-history/invoice-history.js +16 -0
  21. package/billing/invoice-history/invoice-history.yaml +398 -0
  22. package/billing/payment-method-form/payment-method-form.a2ui.json +310 -0
  23. package/billing/payment-method-form/payment-method-form.class.js +886 -0
  24. package/billing/payment-method-form/payment-method-form.css +149 -0
  25. package/billing/payment-method-form/payment-method-form.js +16 -0
  26. package/billing/payment-method-form/payment-method-form.yaml +430 -0
  27. package/billing/payment-method-list/payment-method-list.a2ui.json +283 -0
  28. package/billing/payment-method-list/payment-method-list.class.js +705 -0
  29. package/billing/payment-method-list/payment-method-list.css +128 -0
  30. package/billing/payment-method-list/payment-method-list.js +16 -0
  31. package/billing/payment-method-list/payment-method-list.yaml +355 -0
  32. package/billing/plan-picker/plan-picker.a2ui.json +349 -0
  33. package/billing/plan-picker/plan-picker.class.js +635 -0
  34. package/billing/plan-picker/plan-picker.css +227 -0
  35. package/billing/plan-picker/plan-picker.js +16 -0
  36. package/billing/plan-picker/plan-picker.yaml +453 -0
  37. package/chat/README.md +1 -1
  38. package/chat/chat-composer/chat-composer.js +2 -2
  39. package/chat/chat-empty/chat-empty.js +2 -2
  40. package/chat/chat-shell/chat-shell.js +4 -4
  41. package/chat/chat-sidebar/chat-sidebar.js +2 -2
  42. package/chat/chat-surfaces/chat-surfaces.js +2 -2
  43. package/chat/chat-thread/chat-thread.js +2 -2
  44. package/dashboard/dashboard-layout/dashboard-layout.a2ui.json +254 -0
  45. package/dashboard/dashboard-layout/dashboard-layout.css +190 -0
  46. package/dashboard/dashboard-layout/dashboard-layout.js +289 -0
  47. package/dashboard/dashboard-layout/dashboard-layout.yaml +374 -0
  48. package/dashboard/date-range-selector/date-range-selector.a2ui.json +236 -0
  49. package/dashboard/date-range-selector/date-range-selector.css +84 -0
  50. package/dashboard/date-range-selector/date-range-selector.js +686 -0
  51. package/dashboard/date-range-selector/date-range-selector.yaml +358 -0
  52. package/dashboard/index.js +14 -0
  53. package/dist/everything.min.js +1 -1
  54. package/editor/editor-canvas/editor-canvas.js +2 -2
  55. package/editor/editor-shell/editor-shell.js +2 -2
  56. package/editor/editor-sidebar/editor-sidebar.js +2 -2
  57. package/editor/editor-toolbar/editor-toolbar.js +2 -2
  58. package/feedback/confirm-dialog/confirm-dialog.a2ui.json +206 -0
  59. package/feedback/confirm-dialog/confirm-dialog.css +157 -0
  60. package/feedback/confirm-dialog/confirm-dialog.js +383 -0
  61. package/feedback/confirm-dialog/confirm-dialog.yaml +297 -0
  62. package/feedback/index.js +10 -0
  63. package/form/form-popover/form-popover.js +1 -1
  64. package/generative/index.d.ts +1 -1
  65. package/generative/index.js +2 -2
  66. package/onboarding/index.js +1 -0
  67. package/onboarding/onboarding-checklist/onboarding-checklist.a2ui.json +263 -0
  68. package/onboarding/onboarding-checklist/onboarding-checklist.css +157 -0
  69. package/onboarding/onboarding-checklist/onboarding-checklist.js +428 -0
  70. package/onboarding/onboarding-checklist/onboarding-checklist.yaml +236 -0
  71. package/package.json +99 -6
  72. package/runtime/a2ui-root/a2ui-root.js +3 -3
  73. package/runtime/gen-root/gen-root.js +5 -5
  74. package/settings/index.js +12 -0
  75. package/settings/integrations-page/integrations-page.a2ui.json +274 -0
  76. package/settings/integrations-page/integrations-page.css +177 -0
  77. package/settings/integrations-page/integrations-page.d.ts +77 -0
  78. package/settings/integrations-page/integrations-page.js +413 -0
  79. package/settings/integrations-page/integrations-page.yaml +317 -0
  80. package/settings/notification-preferences/notification-preferences.a2ui.json +245 -0
  81. package/settings/notification-preferences/notification-preferences.css +204 -0
  82. package/settings/notification-preferences/notification-preferences.js +622 -0
  83. package/settings/notification-preferences/notification-preferences.yaml +358 -0
  84. package/shell/admin-command/admin-command.js +2 -2
  85. package/shell/admin-shell/admin-shell.js +2 -2
  86. package/shell/admin-sidebar/admin-sidebar.js +2 -2
  87. package/shell/embed-shell/embed-shell.js +3 -3
  88. package/simple/simple-shell/simple-shell.js +1 -1
  89. package/theme/theme-panel/theme-panel.js +2 -2
@@ -0,0 +1,411 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
3
+ name: UIInvoiceDetail
4
+ tag: invoice-detail-ui
5
+ status: experimental
6
+ component: InvoiceDetail
7
+ category: container
8
+ version: 1
9
+ description: |
10
+ Module-tier page composite that renders a single invoice — header
11
+ (number + status badge + dates), line-items table, totals block,
12
+ customer + remit-to blocks, and a slot-driven action toolbar.
13
+ The canonical invoice layout shared by billing-enabled products
14
+ so totals math, status-badge color mapping, and action-toolbar
15
+ order do not drift across surfaces.
16
+
17
+ Data-driven via the `invoice` property OR a `data-stream-src`
18
+ endpoint. The composite stamps a six-region skeleton once on
19
+ first connect — header · meta · parties · lines · totals ·
20
+ footer — then mutates per-region nodes via id-keyed in-place
21
+ diff on every property change. The status badge color maps
22
+ from `invoice.status` (paid → success, past-due → warning,
23
+ void → muted, open/draft → default). Action buttons are
24
+ consumer-slotted into `header-actions` per spec OD-002 (always
25
+ slot, never stamp a default toolbar).
26
+
27
+ Print-friendly: an internal `@media print` branch hides the
28
+ action toolbar + zeroes the page padding. The composite is a
29
+ display surface — extends UIElement, not UIFormElement.
30
+
31
+ Spec: .claude/docs/specs/implementation-ready/SPEC-007-invoice-detail-page.md.
32
+
33
+ # Per ADR-0027 — composites do NOT auto-import the primitives they
34
+ # stamp in connected()/render(). The consumer (or this primitive's
35
+ # .html demo shell) must explicitly side-effect-import each one.
36
+ composes:
37
+ - card-ui
38
+ - table-ui
39
+ - stat-ui
40
+ - tag-ui
41
+ - button-ui
42
+ - text-ui
43
+ - icon-ui
44
+ - empty-state-ui
45
+
46
+ props:
47
+ invoice:
48
+ description: |
49
+ The invoice record. Source of truth for the rendered page.
50
+ Shape: {number, status, issuedAt, dueAt, customer:{name,email},
51
+ remitTo?:{name,address?}, lines:[{description,qty,unitAmount,
52
+ amount}], subtotal, tax, discount?, total, currency,
53
+ notes?:string}. Null + no data-stream-src renders the empty
54
+ state.
55
+ type: object
56
+ default: null
57
+ dynamic: true
58
+ required: true
59
+
60
+ status:
61
+ description: |
62
+ Mirrors invoice.status. Drives the status badge `variant`
63
+ mapping (paid → success, past-due → warning, void → muted,
64
+ open/draft → default). When set independently of `invoice`,
65
+ the host status reflection wins for CSS — useful when the
66
+ host wraps an invoice without a status field.
67
+ type: string
68
+ default: "draft"
69
+ enum:
70
+ - draft
71
+ - open
72
+ - paid
73
+ - past-due
74
+ - void
75
+ reflect: true
76
+ dynamic: true
77
+
78
+ currency:
79
+ description: |
80
+ ISO 4217 currency code for amount formatting via
81
+ Intl.NumberFormat. Overridable per-record via invoice.currency.
82
+ type: string
83
+ default: "USD"
84
+ reflect: true
85
+
86
+ density:
87
+ description: |
88
+ Line-items table row density. `compact` for tightly-packed
89
+ invoices with many line items; `standard` for typical invoices.
90
+ Forwarded to the embedded <table-ui density>.
91
+ type: string
92
+ default: "standard"
93
+ enum:
94
+ - compact
95
+ - standard
96
+ reflect: true
97
+
98
+ loading:
99
+ description: |
100
+ Renders skeleton placeholders for header + line-items + totals
101
+ while a data-stream-src fetch is in flight. Sets aria-busy
102
+ on the host. Data updates suppressed while [loading] is set.
103
+ type: boolean
104
+ default: false
105
+ reflect: true
106
+ dynamic: true
107
+
108
+ printable:
109
+ description: |
110
+ Includes the @media print branch — hides the action toolbar
111
+ and zeroes page padding so the printed output is invoice-only.
112
+ Set [printable] to false on screens where the invoice is
113
+ embedded inside a larger surface and printing should not be
114
+ a first-class action.
115
+ type: boolean
116
+ default: true
117
+ reflect: true
118
+
119
+ locale:
120
+ description: |
121
+ Locale for Intl.NumberFormat (amounts) and Intl.DateTimeFormat
122
+ (issued/due). Defaults to document.documentElement.lang (or
123
+ "en-US" when absent).
124
+ type: string
125
+ default: ""
126
+
127
+ data-stream-src:
128
+ description: |
129
+ Optional endpoint returning the invoice record (universal
130
+ data-stream-* trait). On successful load, `invoice` is
131
+ replaced and a `load` event fires; on failure an `error`
132
+ event fires.
133
+ type: string
134
+ default: ""
135
+ attribute: data-stream-src
136
+
137
+ events:
138
+ invoice-action:
139
+ description: |
140
+ Fired when a header-action button carrying
141
+ [data-invoice-action] is activated. Consumers wire this to
142
+ download / send / pay / void flows. Bubbles.
143
+ detail:
144
+ action:
145
+ type: string
146
+ description: The data-invoice-action value (download, send, pay, etc.).
147
+ invoiceNumber:
148
+ type: string
149
+ description: invoice.number at the time of activation.
150
+
151
+ line-item-click:
152
+ description: |
153
+ Fired when a line-item row is clicked. Bubbles.
154
+ detail:
155
+ index:
156
+ type: integer
157
+ description: 0-based row index within invoice.lines.
158
+ lineItem:
159
+ type: object
160
+ description: The clicked invoice.lines[index] record.
161
+
162
+ load:
163
+ description: |
164
+ Fired when a data-stream-src fetch resolves and the invoice
165
+ record is populated. Bubbles.
166
+ detail:
167
+ invoiceNumber:
168
+ type: string
169
+ description: The loaded invoice.number.
170
+
171
+ error:
172
+ description: |
173
+ Fired when a data-stream-src fetch fails OR when the host is
174
+ asked to print but window.print is unavailable. Bubbles.
175
+ detail:
176
+ reason:
177
+ type: string
178
+ description: One of `fetch-failed`, `print-unavailable`.
179
+
180
+ slots:
181
+ header-actions:
182
+ description: |
183
+ Action toolbar slotted into the top-right of the invoice
184
+ header — Download, Send, Pay, etc. Consumer-owned per
185
+ SPEC-007 OD-002 (the composite NEVER stamps a default
186
+ toolbar; action sets vary too much across products).
187
+ Buttons carrying [data-invoice-action] dispatch the host's
188
+ `invoice-action` event on activation.
189
+
190
+ customer-block:
191
+ description: |
192
+ Override the default customer block. When unset, the composite
193
+ renders a default block from invoice.customer.
194
+
195
+ remit-to-block:
196
+ description: |
197
+ Override the default remit-to block. When unset, the composite
198
+ renders a default block from invoice.remitTo if present.
199
+
200
+ footer:
201
+ description: |
202
+ Optional content below the totals — payment instructions,
203
+ terms, fine print.
204
+
205
+ states:
206
+ - name: idle
207
+ description: Default — invoice rendered, ready for interaction.
208
+ - name: loading
209
+ description: A data-stream-src fetch is in flight.
210
+ attribute: loading
211
+ - name: empty
212
+ description: No invoice + no data-stream-src.
213
+ attribute: empty
214
+ - name: error
215
+ description: Last data-stream-src fetch failed.
216
+ attribute: error
217
+
218
+ traits: []
219
+
220
+ tokens:
221
+ --invoice-detail-bg:
222
+ description: Host page background. Defaults to transparent.
223
+ default: transparent
224
+ --invoice-detail-page-padding:
225
+ description: Inset around the invoice content area.
226
+ default: var(--a-space-5)
227
+ --invoice-detail-section-gap:
228
+ description: Vertical gap between header, parties, lines, totals.
229
+ default: var(--a-space-5)
230
+ --invoice-detail-totals-width:
231
+ description: |
232
+ Width of the right-aligned totals stack. Clamps to 100% on
233
+ narrow viewports.
234
+ default: min(360px, 100%)
235
+ --invoice-detail-status-badge-radius:
236
+ description: Status badge corner radius.
237
+ default: var(--a-radius-md)
238
+ --invoice-detail-meta-fg:
239
+ description: Color for the secondary header metadata (issued / due).
240
+ default: var(--a-fg-muted)
241
+ --invoice-detail-amount-fg:
242
+ description: Color for monetary amounts in the totals stack.
243
+ default: var(--a-fg)
244
+ --invoice-detail-total-size:
245
+ description: Font size for the grand total line.
246
+ default: var(--a-text-2xl, 1.5rem)
247
+ --invoice-detail-total-weight:
248
+ description: Font weight for the grand total line.
249
+ default: var(--a-weight-bold, 700)
250
+ --invoice-detail-line-amount-align:
251
+ description: |
252
+ Text-align for the rightmost amount column in the lines table.
253
+ `end` for typical right-aligned numerics.
254
+ default: end
255
+
256
+ requiredIcons:
257
+ - receipt
258
+
259
+ a2ui:
260
+ rules:
261
+ - >-
262
+ InvoiceDetail MUST set `invoice` OR `data-stream-src`. Neither
263
+ produces the empty state but cannot be the submission state for
264
+ a billing surface.
265
+ - >-
266
+ invoice.lines[] MUST contain at least one row with `description`,
267
+ `qty`, `unitAmount`, `amount`. Empty lines arrays render the
268
+ lines table empty-state row, not the host empty state.
269
+ - >-
270
+ invoice.total MUST equal subtotal + tax − (discount or 0). The
271
+ composite renders the host-supplied total verbatim; consumers
272
+ are authoritative on rounding rules per locale (SPEC-007 OD-001).
273
+ - >-
274
+ invoice.status MUST be one of draft / open / paid / past-due /
275
+ void. Unknown statuses render the default badge variant + a
276
+ one-shot console.warn.
277
+ - >-
278
+ InvoiceDetail MUST NOT be nested inside Modal or Drawer.
279
+ Invoices are routes, not modals — Modal traps focus + clips
280
+ on long content; the composite is designed for full-page
281
+ layout. Use `<a href="/invoices/{number}">` instead.
282
+ - >-
283
+ Slot ALL header actions explicitly via `slot="header-actions"`
284
+ — the composite NEVER stamps a default toolbar (SPEC-007
285
+ OD-002). Action sets vary across products; default is too
286
+ opinionated.
287
+
288
+ anti_patterns:
289
+ - wrong: |
290
+ {"component": "InvoiceDetail", "lines": [...]}
291
+ why: |
292
+ Line items belong on `invoice.lines`, not the host. Without
293
+ the wrapping `invoice` object, totals + currency are unwired
294
+ and the composite renders the empty state.
295
+ fix: |
296
+ {"component": "InvoiceDetail", "invoice":
297
+ {"lines": [...], "subtotal": 24, "total": 24.5, "currency": "USD"}}
298
+ - wrong: |
299
+ {"component": "Modal", "children":
300
+ [{"component": "InvoiceDetail", "invoice": {...}}]}
301
+ why: |
302
+ Invoices are routes, not modals. Modal traps focus + clips
303
+ on long content; the composite is designed for full-page
304
+ layout.
305
+ fix: |
306
+ Open the invoice via <a href="/invoices/INV-001234"> route
307
+ navigation; render the InvoiceDetail composite on that route.
308
+ - wrong: |
309
+ <invoice-detail-ui status="settled"></invoice-detail-ui>
310
+ why: |
311
+ `settled` is not in the status enum. Unknown statuses fall
312
+ back to the default badge variant; the consumer surface
313
+ loses the semantic color mapping.
314
+ fix: |
315
+ <invoice-detail-ui status="paid"></invoice-detail-ui>
316
+
317
+ examples:
318
+ - name: paid-invoice
319
+ description: A paid invoice with two line items + slotted actions.
320
+ a2ui: |
321
+ [
322
+ {
323
+ "id": "inv-paid",
324
+ "component": "InvoiceDetail",
325
+ "status": "paid",
326
+ "currency": "USD",
327
+ "invoice": {
328
+ "number": "INV-001234",
329
+ "status": "paid",
330
+ "issuedAt": "2026-05-01",
331
+ "dueAt": "2026-05-15",
332
+ "customer": {"name": "Acme Co.", "email": "billing@acme.test"},
333
+ "lines": [
334
+ {"description": "Pro plan — May", "qty": 1, "unitAmount": 24.00, "amount": 24.00},
335
+ {"description": "Add-on — Audit log retention", "qty": 1, "unitAmount": 0.50, "amount": 0.50}
336
+ ],
337
+ "subtotal": 24.50,
338
+ "tax": 0,
339
+ "total": 24.50,
340
+ "currency": "USD"
341
+ },
342
+ "children": ["btn-download"]
343
+ },
344
+ {"id": "btn-download", "component": "Button",
345
+ "text": "Download", "slot": "header-actions"}
346
+ ]
347
+ - name: open-invoice
348
+ description: Open invoice awaiting payment + Pay CTA.
349
+ a2ui: |
350
+ [
351
+ {
352
+ "id": "inv-open",
353
+ "component": "InvoiceDetail",
354
+ "status": "open",
355
+ "currency": "USD",
356
+ "invoice": {
357
+ "number": "INV-001235",
358
+ "status": "open",
359
+ "issuedAt": "2026-05-10",
360
+ "dueAt": "2026-05-24",
361
+ "customer": {"name": "Globex Corp.", "email": "ap@globex.test"},
362
+ "lines": [
363
+ {"description": "Team seats × 5", "qty": 5, "unitAmount": 10.00, "amount": 50.00}
364
+ ],
365
+ "subtotal": 50.00,
366
+ "tax": 5.00,
367
+ "total": 55.00,
368
+ "currency": "USD"
369
+ },
370
+ "children": ["btn-pay-open"]
371
+ },
372
+ {"id": "btn-pay-open", "component": "Button",
373
+ "text": "Pay $55", "variant": "primary",
374
+ "slot": "header-actions"}
375
+ ]
376
+
377
+ keywords:
378
+ - invoice
379
+ - invoice-detail
380
+ - billing
381
+ - receipt
382
+ - bill
383
+ - statement
384
+ - payment
385
+ - line-items
386
+ - charges
387
+ - totals
388
+ - paid
389
+ - past-due
390
+ - void
391
+
392
+ synonyms:
393
+ invoice:
394
+ - bill
395
+ - receipt
396
+ - statement
397
+ payment:
398
+ - charge
399
+ - billing
400
+ line-items:
401
+ - charges
402
+ - entries
403
+
404
+ related:
405
+ - Card
406
+ - Table
407
+ - Stat
408
+ - Tag
409
+ - Button
410
+ - EmptyState
411
+ - PlanPicker