@adia-ai/web-modules 0.8.35 → 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.
- package/CHANGELOG.md +22 -0
- package/README.md +3 -3
- package/agent-admin/admin-roster/admin-roster.js +1 -1
- package/agent-admin/admin-settings/admin-settings.js +1 -1
- package/agent-admin/agent-admin/agent-admin.js +1 -1
- package/billing/billing-overview/billing-overview.a2ui.json +281 -0
- package/billing/billing-overview/billing-overview.class.js +838 -0
- package/billing/billing-overview/billing-overview.css +223 -0
- package/billing/billing-overview/billing-overview.js +16 -0
- package/billing/billing-overview/billing-overview.yaml +441 -0
- package/billing/index.js +21 -0
- package/billing/invoice-detail/invoice-detail.a2ui.json +276 -0
- package/billing/invoice-detail/invoice-detail.class.js +711 -0
- package/billing/invoice-detail/invoice-detail.css +305 -0
- package/billing/invoice-detail/invoice-detail.js +16 -0
- package/billing/invoice-detail/invoice-detail.yaml +411 -0
- package/billing/invoice-history/invoice-history.a2ui.json +315 -0
- package/billing/invoice-history/invoice-history.class.js +672 -0
- package/billing/invoice-history/invoice-history.css +130 -0
- package/billing/invoice-history/invoice-history.js +16 -0
- package/billing/invoice-history/invoice-history.yaml +398 -0
- package/billing/payment-method-form/payment-method-form.a2ui.json +310 -0
- package/billing/payment-method-form/payment-method-form.class.js +886 -0
- package/billing/payment-method-form/payment-method-form.css +149 -0
- package/billing/payment-method-form/payment-method-form.js +16 -0
- package/billing/payment-method-form/payment-method-form.yaml +430 -0
- package/billing/payment-method-list/payment-method-list.a2ui.json +283 -0
- package/billing/payment-method-list/payment-method-list.class.js +705 -0
- package/billing/payment-method-list/payment-method-list.css +128 -0
- package/billing/payment-method-list/payment-method-list.js +16 -0
- package/billing/payment-method-list/payment-method-list.yaml +355 -0
- package/billing/plan-picker/plan-picker.a2ui.json +349 -0
- package/billing/plan-picker/plan-picker.class.js +635 -0
- package/billing/plan-picker/plan-picker.css +227 -0
- package/billing/plan-picker/plan-picker.js +16 -0
- package/billing/plan-picker/plan-picker.yaml +453 -0
- package/chat/README.md +1 -1
- package/chat/chat-composer/chat-composer.js +2 -2
- package/chat/chat-empty/chat-empty.js +2 -2
- package/chat/chat-shell/chat-shell.js +4 -4
- package/chat/chat-sidebar/chat-sidebar.js +2 -2
- package/chat/chat-surfaces/chat-surfaces.js +2 -2
- package/chat/chat-thread/chat-thread.js +2 -2
- package/dashboard/dashboard-layout/dashboard-layout.a2ui.json +254 -0
- package/dashboard/dashboard-layout/dashboard-layout.css +190 -0
- package/dashboard/dashboard-layout/dashboard-layout.js +289 -0
- package/dashboard/dashboard-layout/dashboard-layout.yaml +374 -0
- package/dashboard/date-range-selector/date-range-selector.a2ui.json +236 -0
- package/dashboard/date-range-selector/date-range-selector.css +84 -0
- package/dashboard/date-range-selector/date-range-selector.js +686 -0
- package/dashboard/date-range-selector/date-range-selector.yaml +358 -0
- package/dashboard/index.js +14 -0
- package/dist/everything.min.js +1 -1
- package/editor/editor-canvas/editor-canvas.js +2 -2
- package/editor/editor-shell/editor-shell.js +2 -2
- package/editor/editor-sidebar/editor-sidebar.js +2 -2
- package/editor/editor-toolbar/editor-toolbar.js +2 -2
- package/feedback/confirm-dialog/confirm-dialog.a2ui.json +206 -0
- package/feedback/confirm-dialog/confirm-dialog.css +157 -0
- package/feedback/confirm-dialog/confirm-dialog.js +383 -0
- package/feedback/confirm-dialog/confirm-dialog.yaml +297 -0
- package/feedback/index.js +10 -0
- package/form/form-popover/form-popover.js +1 -1
- package/generative/index.d.ts +1 -1
- package/generative/index.js +2 -2
- package/onboarding/index.js +1 -0
- package/onboarding/onboarding-checklist/onboarding-checklist.a2ui.json +263 -0
- package/onboarding/onboarding-checklist/onboarding-checklist.css +157 -0
- package/onboarding/onboarding-checklist/onboarding-checklist.js +428 -0
- package/onboarding/onboarding-checklist/onboarding-checklist.yaml +236 -0
- package/package.json +99 -6
- package/runtime/a2ui-root/a2ui-root.js +3 -3
- package/runtime/gen-root/gen-root.js +5 -5
- package/settings/index.js +12 -0
- package/settings/integrations-page/integrations-page.a2ui.json +274 -0
- package/settings/integrations-page/integrations-page.css +177 -0
- package/settings/integrations-page/integrations-page.d.ts +77 -0
- package/settings/integrations-page/integrations-page.js +413 -0
- package/settings/integrations-page/integrations-page.yaml +317 -0
- package/settings/notification-preferences/notification-preferences.a2ui.json +245 -0
- package/settings/notification-preferences/notification-preferences.css +204 -0
- package/settings/notification-preferences/notification-preferences.js +622 -0
- package/settings/notification-preferences/notification-preferences.yaml +358 -0
- package/shell/admin-command/admin-command.js +2 -2
- package/shell/admin-shell/admin-shell.js +2 -2
- package/shell/admin-sidebar/admin-sidebar.js +2 -2
- package/shell/embed-shell/embed-shell.js +3 -3
- package/simple/simple-shell/simple-shell.js +1 -1
- package/theme/theme-panel/theme-panel.js +2 -2
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/InvoiceDetail.json",
|
|
4
|
+
"title": "InvoiceDetail",
|
|
5
|
+
"description": "Module-tier page composite that renders a single invoice — header\n(number + status badge + dates), line-items table, totals block,\ncustomer + remit-to blocks, and a slot-driven action toolbar.\nThe canonical invoice layout shared by billing-enabled products\nso totals math, status-badge color mapping, and action-toolbar\norder do not drift across surfaces.\n\nData-driven via the `invoice` property OR a `data-stream-src`\nendpoint. The composite stamps a six-region skeleton once on\nfirst connect — header · meta · parties · lines · totals ·\nfooter — then mutates per-region nodes via id-keyed in-place\ndiff on every property change. The status badge color maps\nfrom `invoice.status` (paid → success, past-due → warning,\nvoid → muted, open/draft → default). Action buttons are\nconsumer-slotted into `header-actions` per spec OD-002 (always\nslot, never stamp a default toolbar).\n\nPrint-friendly: an internal `@media print` branch hides the\naction toolbar + zeroes the page padding. The composite is a\ndisplay surface — extends UIElement, not UIFormElement.\n\nSpec: .claude/docs/specs/implementation-ready/SPEC-007-invoice-detail-page.md.\n",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"component": {
|
|
17
|
+
"const": "InvoiceDetail"
|
|
18
|
+
},
|
|
19
|
+
"currency": {
|
|
20
|
+
"description": "ISO 4217 currency code for amount formatting via\nIntl.NumberFormat. Overridable per-record via invoice.currency.\n",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "USD"
|
|
23
|
+
},
|
|
24
|
+
"data-stream-src": {
|
|
25
|
+
"description": "Optional endpoint returning the invoice record (universal\ndata-stream-* trait). On successful load, `invoice` is\nreplaced and a `load` event fires; on failure an `error`\nevent fires.\n",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"density": {
|
|
30
|
+
"description": "Line-items table row density. `compact` for tightly-packed\ninvoices with many line items; `standard` for typical invoices.\nForwarded to the embedded <table-ui density>.\n",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"compact",
|
|
34
|
+
"standard"
|
|
35
|
+
],
|
|
36
|
+
"default": "standard"
|
|
37
|
+
},
|
|
38
|
+
"invoice": {
|
|
39
|
+
"description": "The invoice record. Source of truth for the rendered page.\nShape: {number, status, issuedAt, dueAt, customer:{name,email},\nremitTo?:{name,address?}, lines:[{description,qty,unitAmount,\namount}], subtotal, tax, discount?, total, currency,\nnotes?:string}. Null + no data-stream-src renders the empty\nstate.\n",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"default": null
|
|
42
|
+
},
|
|
43
|
+
"loading": {
|
|
44
|
+
"description": "Renders skeleton placeholders for header + line-items + totals\nwhile a data-stream-src fetch is in flight. Sets aria-busy\non the host. Data updates suppressed while [loading] is set.\n",
|
|
45
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
46
|
+
},
|
|
47
|
+
"locale": {
|
|
48
|
+
"description": "Locale for Intl.NumberFormat (amounts) and Intl.DateTimeFormat\n(issued/due). Defaults to document.documentElement.lang (or\n\"en-US\" when absent).\n",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"default": ""
|
|
51
|
+
},
|
|
52
|
+
"printable": {
|
|
53
|
+
"description": "Includes the @media print branch — hides the action toolbar\nand zeroes page padding so the printed output is invoice-only.\nSet [printable] to false on screens where the invoice is\nembedded inside a larger surface and printing should not be\na first-class action.\n",
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"default": true
|
|
56
|
+
},
|
|
57
|
+
"status": {
|
|
58
|
+
"description": "Mirrors invoice.status. Drives the status badge `variant`\nmapping (paid → success, past-due → warning, void → muted,\nopen/draft → default). When set independently of `invoice`,\nthe host status reflection wins for CSS — useful when the\nhost wraps an invoice without a status field.\n",
|
|
59
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": [
|
|
63
|
+
"component",
|
|
64
|
+
"invoice"
|
|
65
|
+
],
|
|
66
|
+
"unevaluatedProperties": false,
|
|
67
|
+
"x-adiaui": {
|
|
68
|
+
"anti_patterns": [
|
|
69
|
+
{
|
|
70
|
+
"fix": "{\"component\": \"InvoiceDetail\", \"invoice\":\n {\"lines\": [...], \"subtotal\": 24, \"total\": 24.5, \"currency\": \"USD\"}}\n",
|
|
71
|
+
"why": "Line items belong on `invoice.lines`, not the host. Without\nthe wrapping `invoice` object, totals + currency are unwired\nand the composite renders the empty state.\n",
|
|
72
|
+
"wrong": "{\"component\": \"InvoiceDetail\", \"lines\": [...]}\n"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"fix": "Open the invoice via <a href=\"/invoices/INV-001234\"> route\nnavigation; render the InvoiceDetail composite on that route.\n",
|
|
76
|
+
"why": "Invoices are routes, not modals. Modal traps focus + clips\non long content; the composite is designed for full-page\nlayout.\n",
|
|
77
|
+
"wrong": "{\"component\": \"Modal\", \"children\":\n [{\"component\": \"InvoiceDetail\", \"invoice\": {...}}]}\n"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"fix": "<invoice-detail-ui status=\"paid\"></invoice-detail-ui>\n",
|
|
81
|
+
"why": "`settled` is not in the status enum. Unknown statuses fall\nback to the default badge variant; the consumer surface\nloses the semantic color mapping.\n",
|
|
82
|
+
"wrong": "<invoice-detail-ui status=\"settled\"></invoice-detail-ui>\n"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"category": "container",
|
|
86
|
+
"composes": [
|
|
87
|
+
"card-ui",
|
|
88
|
+
"table-ui",
|
|
89
|
+
"stat-ui",
|
|
90
|
+
"tag-ui",
|
|
91
|
+
"button-ui",
|
|
92
|
+
"text-ui",
|
|
93
|
+
"icon-ui",
|
|
94
|
+
"empty-state-ui"
|
|
95
|
+
],
|
|
96
|
+
"events": {
|
|
97
|
+
"error": {
|
|
98
|
+
"description": "Fired when a data-stream-src fetch fails OR when the host is\nasked to print but window.print is unavailable. Bubbles.\n",
|
|
99
|
+
"detail": {
|
|
100
|
+
"reason": {
|
|
101
|
+
"description": "One of `fetch-failed`, `print-unavailable`.",
|
|
102
|
+
"type": "string"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"invoice-action": {
|
|
107
|
+
"description": "Fired when a header-action button carrying\n[data-invoice-action] is activated. Consumers wire this to\ndownload / send / pay / void flows. Bubbles.\n",
|
|
108
|
+
"detail": {
|
|
109
|
+
"action": {
|
|
110
|
+
"description": "The data-invoice-action value (download, send, pay, etc.).",
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"invoiceNumber": {
|
|
114
|
+
"description": "invoice.number at the time of activation.",
|
|
115
|
+
"type": "string"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"line-item-click": {
|
|
120
|
+
"description": "Fired when a line-item row is clicked. Bubbles.\n",
|
|
121
|
+
"detail": {
|
|
122
|
+
"index": {
|
|
123
|
+
"description": "0-based row index within invoice.lines.",
|
|
124
|
+
"type": "integer"
|
|
125
|
+
},
|
|
126
|
+
"lineItem": {
|
|
127
|
+
"description": "The clicked invoice.lines[index] record.",
|
|
128
|
+
"type": "object"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"load": {
|
|
133
|
+
"description": "Fired when a data-stream-src fetch resolves and the invoice\nrecord is populated. Bubbles.\n",
|
|
134
|
+
"detail": {
|
|
135
|
+
"invoiceNumber": {
|
|
136
|
+
"description": "The loaded invoice.number.",
|
|
137
|
+
"type": "string"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"examples": [
|
|
143
|
+
{
|
|
144
|
+
"description": "A paid invoice with two line items + slotted actions.",
|
|
145
|
+
"a2ui": "[\n {\n \"id\": \"inv-paid\",\n \"component\": \"InvoiceDetail\",\n \"status\": \"paid\",\n \"currency\": \"USD\",\n \"invoice\": {\n \"number\": \"INV-001234\",\n \"status\": \"paid\",\n \"issuedAt\": \"2026-05-01\",\n \"dueAt\": \"2026-05-15\",\n \"customer\": {\"name\": \"Acme Co.\", \"email\": \"billing@acme.test\"},\n \"lines\": [\n {\"description\": \"Pro plan — May\", \"qty\": 1, \"unitAmount\": 24.00, \"amount\": 24.00},\n {\"description\": \"Add-on — Audit log retention\", \"qty\": 1, \"unitAmount\": 0.50, \"amount\": 0.50}\n ],\n \"subtotal\": 24.50,\n \"tax\": 0,\n \"total\": 24.50,\n \"currency\": \"USD\"\n },\n \"children\": [\"btn-download\"]\n },\n {\"id\": \"btn-download\", \"component\": \"Button\",\n \"text\": \"Download\", \"slot\": \"header-actions\"}\n]\n",
|
|
146
|
+
"name": "paid-invoice"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"description": "Open invoice awaiting payment + Pay CTA.",
|
|
150
|
+
"a2ui": "[\n {\n \"id\": \"inv-open\",\n \"component\": \"InvoiceDetail\",\n \"status\": \"open\",\n \"currency\": \"USD\",\n \"invoice\": {\n \"number\": \"INV-001235\",\n \"status\": \"open\",\n \"issuedAt\": \"2026-05-10\",\n \"dueAt\": \"2026-05-24\",\n \"customer\": {\"name\": \"Globex Corp.\", \"email\": \"ap@globex.test\"},\n \"lines\": [\n {\"description\": \"Team seats × 5\", \"qty\": 5, \"unitAmount\": 10.00, \"amount\": 50.00}\n ],\n \"subtotal\": 50.00,\n \"tax\": 5.00,\n \"total\": 55.00,\n \"currency\": \"USD\"\n },\n \"children\": [\"btn-pay-open\"]\n },\n {\"id\": \"btn-pay-open\", \"component\": \"Button\",\n \"text\": \"Pay $55\", \"variant\": \"primary\",\n \"slot\": \"header-actions\"}\n]\n",
|
|
151
|
+
"name": "open-invoice"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"keywords": [
|
|
155
|
+
"invoice",
|
|
156
|
+
"invoice-detail",
|
|
157
|
+
"billing",
|
|
158
|
+
"receipt",
|
|
159
|
+
"bill",
|
|
160
|
+
"statement",
|
|
161
|
+
"payment",
|
|
162
|
+
"line-items",
|
|
163
|
+
"charges",
|
|
164
|
+
"totals",
|
|
165
|
+
"paid",
|
|
166
|
+
"past-due",
|
|
167
|
+
"void"
|
|
168
|
+
],
|
|
169
|
+
"name": "UIInvoiceDetail",
|
|
170
|
+
"related": [
|
|
171
|
+
"Card",
|
|
172
|
+
"Table",
|
|
173
|
+
"Stat",
|
|
174
|
+
"Tag",
|
|
175
|
+
"Button",
|
|
176
|
+
"EmptyState",
|
|
177
|
+
"PlanPicker"
|
|
178
|
+
],
|
|
179
|
+
"slots": {
|
|
180
|
+
"customer-block": {
|
|
181
|
+
"description": "Override the default customer block. When unset, the composite\nrenders a default block from invoice.customer.\n"
|
|
182
|
+
},
|
|
183
|
+
"footer": {
|
|
184
|
+
"description": "Optional content below the totals — payment instructions,\nterms, fine print.\n"
|
|
185
|
+
},
|
|
186
|
+
"header-actions": {
|
|
187
|
+
"description": "Action toolbar slotted into the top-right of the invoice\nheader — Download, Send, Pay, etc. Consumer-owned per\nSPEC-007 OD-002 (the composite NEVER stamps a default\ntoolbar; action sets vary too much across products).\nButtons carrying [data-invoice-action] dispatch the host's\n`invoice-action` event on activation.\n"
|
|
188
|
+
},
|
|
189
|
+
"remit-to-block": {
|
|
190
|
+
"description": "Override the default remit-to block. When unset, the composite\nrenders a default block from invoice.remitTo if present.\n"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"states": [
|
|
194
|
+
{
|
|
195
|
+
"description": "Default — invoice rendered, ready for interaction.",
|
|
196
|
+
"name": "idle"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"description": "A data-stream-src fetch is in flight.",
|
|
200
|
+
"attribute": "loading",
|
|
201
|
+
"name": "loading"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"description": "No invoice + no data-stream-src.",
|
|
205
|
+
"attribute": "empty",
|
|
206
|
+
"name": "empty"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"description": "Last data-stream-src fetch failed.",
|
|
210
|
+
"attribute": "error",
|
|
211
|
+
"name": "error"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"status": "experimental",
|
|
215
|
+
"synonyms": {
|
|
216
|
+
"invoice": [
|
|
217
|
+
"bill",
|
|
218
|
+
"receipt",
|
|
219
|
+
"statement"
|
|
220
|
+
],
|
|
221
|
+
"line-items": [
|
|
222
|
+
"charges",
|
|
223
|
+
"entries"
|
|
224
|
+
],
|
|
225
|
+
"payment": [
|
|
226
|
+
"charge",
|
|
227
|
+
"billing"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"tag": "invoice-detail-ui",
|
|
231
|
+
"tokens": {
|
|
232
|
+
"--invoice-detail-amount-fg": {
|
|
233
|
+
"description": "Color for monetary amounts in the totals stack.",
|
|
234
|
+
"default": "var(--a-fg)"
|
|
235
|
+
},
|
|
236
|
+
"--invoice-detail-bg": {
|
|
237
|
+
"description": "Host page background. Defaults to transparent.",
|
|
238
|
+
"default": "transparent"
|
|
239
|
+
},
|
|
240
|
+
"--invoice-detail-line-amount-align": {
|
|
241
|
+
"description": "Text-align for the rightmost amount column in the lines table.\n`end` for typical right-aligned numerics.\n",
|
|
242
|
+
"default": "end"
|
|
243
|
+
},
|
|
244
|
+
"--invoice-detail-meta-fg": {
|
|
245
|
+
"description": "Color for the secondary header metadata (issued / due).",
|
|
246
|
+
"default": "var(--a-fg-muted)"
|
|
247
|
+
},
|
|
248
|
+
"--invoice-detail-page-padding": {
|
|
249
|
+
"description": "Inset around the invoice content area.",
|
|
250
|
+
"default": "var(--a-space-5)"
|
|
251
|
+
},
|
|
252
|
+
"--invoice-detail-section-gap": {
|
|
253
|
+
"description": "Vertical gap between header, parties, lines, totals.",
|
|
254
|
+
"default": "var(--a-space-5)"
|
|
255
|
+
},
|
|
256
|
+
"--invoice-detail-status-badge-radius": {
|
|
257
|
+
"description": "Status badge corner radius.",
|
|
258
|
+
"default": "var(--a-radius-md)"
|
|
259
|
+
},
|
|
260
|
+
"--invoice-detail-total-size": {
|
|
261
|
+
"description": "Font size for the grand total line.",
|
|
262
|
+
"default": "var(--a-text-2xl, 1.5rem)"
|
|
263
|
+
},
|
|
264
|
+
"--invoice-detail-total-weight": {
|
|
265
|
+
"description": "Font weight for the grand total line.",
|
|
266
|
+
"default": "var(--a-weight-bold, 700)"
|
|
267
|
+
},
|
|
268
|
+
"--invoice-detail-totals-width": {
|
|
269
|
+
"description": "Width of the right-aligned totals stack. Clamps to 100% on\nnarrow viewports.\n",
|
|
270
|
+
"default": "min(360px, 100%)"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"traits": [],
|
|
274
|
+
"version": 1
|
|
275
|
+
}
|
|
276
|
+
}
|