@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,310 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/PaymentMethodForm.json",
4
+ "title": "PaymentMethodForm",
5
+ "description": "Form-participating composite for capturing a payment method —\ncard number, expiry, CVC, name on card, billing address (optional),\nand country. The form chrome + structured validation + a single\nnormalized emit event; it does NOT integrate with Stripe Elements\nor a tokenization SDK directly (consumer responsibility).\n\nEach sub-field is a <field-ui> wrapper around an <input-ui> (or\n<select-ui> for country). Card number is Luhn-validated; expiry is\nparsed as MM/YY with month + year bounds; CVC is 3-4 digits.\nBrand detection (visa / mastercard / amex / discover) runs against\na small regex map and surfaces via the `change` event detail.\n\nForm value is a JSON-encoded payload of normalized field values\nserialized through ElementInternals under [name] (default\n\"paymentMethod\"). On submit, the host fires\n`submit-payment-method` with a flat detail\n`{ token, last4, brand, expMonth, expYear, name, country }`.\n`token` is a synthetic local-mode token (sha-like opaque string);\nconsumers integrating with a real processor handle tokenization\nin their own submit listener using `last4` / `brand` / etc.\n\nSpec: .claude/docs/specs/implementation-ready/SPEC-009-payment-method-form.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
+ "required": {
17
+ "description": "Form-validation gate. When set, an empty composite fails\ncheckValidity() with \"Payment method required.\".\n",
18
+ "type": "boolean",
19
+ "default": false
20
+ },
21
+ "autofocus": {
22
+ "description": "When set, the first sub-field (Name on card) receives focus on\nfirst connect. Convention parity with native form elements.\n",
23
+ "type": "boolean",
24
+ "default": false
25
+ },
26
+ "component": {
27
+ "const": "PaymentMethodForm"
28
+ },
29
+ "countries": {
30
+ "description": "Allowed billing countries, ISO 3166-1 alpha-2 codes. Drives\nthe <select-ui> dropdown's options. Empty array uses a\ndefault short list (US, CA, GB, DE, FR, AU).\n",
31
+ "$ref": "common_types.json#/$defs/DynamicStringList"
32
+ },
33
+ "default-country": {
34
+ "description": "Default selected country (ISO 3166-1 alpha-2). Falls back to\nthe first entry in `countries` (or \"US\" when empty).\n",
35
+ "type": "string",
36
+ "default": "US"
37
+ },
38
+ "disabled": {
39
+ "description": "Forwarded to every sub-control. Pointer-events:none on the\ncomposite host as a belt-and-suspenders.\n",
40
+ "$ref": "common_types.json#/$defs/DynamicBoolean"
41
+ },
42
+ "error": {
43
+ "description": "Externally-set error message (e.g. server-rejected card). When\nnon-empty, the composite renders an <alert-ui variant=\"danger\">\nat the top of the form and sets aria-invalid=true on the host.\n",
44
+ "$ref": "common_types.json#/$defs/DynamicString"
45
+ },
46
+ "name": {
47
+ "description": "Form field name. The composite's serialized form value lives\nunder this key in any wrapping <form>. Defaults to\n\"paymentMethod\".\n",
48
+ "type": "string",
49
+ "default": "paymentMethod"
50
+ },
51
+ "prefill": {
52
+ "description": "JSON-encoded prefill payload `{last4, brand, expMonth, expYear,\nname, country}`. When set, the summary row renders with the\nsaved-card chrome and the rest of the form is hidden behind an\n\"Edit card\" button. Useful for \"update saved payment method\"\nflows.\n",
53
+ "type": "string",
54
+ "default": ""
55
+ },
56
+ "require-billing-address": {
57
+ "description": "When set, renders the billing-address sub-fields (address line\n1, optional line 2, postal code). When unset, only postal code\n+ country are collected for the address-verification check.\n",
58
+ "type": "boolean",
59
+ "default": false
60
+ },
61
+ "tokenizing": {
62
+ "description": "tokenize() in flight — set internally by the composite (and\ncleared on settle), same read-only-externally convention as\n`value`. Declared here (mirroring the `states:` entry below) so\nthe in-flight visual state is representable in authored/generated\nmarkup for documentation and storyboard fixtures.\n",
63
+ "type": "boolean",
64
+ "default": false
65
+ },
66
+ "value": {
67
+ "description": "Resolved payment-method token. Read-only externally — the\ncomposite writes it after a successful tokenize() call. Setting\nthis to a non-empty string is treated as \"prefilled from a\nsaved payment method\" and renders the form in\nread-only-summary mode (last4 + brand + expiry shown).\n",
68
+ "$ref": "common_types.json#/$defs/DynamicString"
69
+ }
70
+ },
71
+ "required": [
72
+ "component"
73
+ ],
74
+ "unevaluatedProperties": false,
75
+ "x-adiaui": {
76
+ "anti_patterns": [
77
+ {
78
+ "fix": "<payment-method-form-ui name=\"paymentMethod\" required></payment-method-form-ui>\n",
79
+ "why": "Raw card digits in `value`. The composite's value is the\ntokenized output, never the input. Raw digits leak through\nreflection back to the attribute and end up in DOM snapshots /\nbrowser history / analytics.\n",
80
+ "wrong": "<payment-method-form-ui value=\"4242 4242 4242 4242\"></payment-method-form-ui>\n"
81
+ },
82
+ {
83
+ "fix": "<payment-method-form-ui aria-label=\"Card details\"></payment-method-form-ui>\n",
84
+ "why": "PaymentMethodForm IS itself a labeled field group; nesting in\nField duplicates the label and breaks the internal grid\nlayout. Field's auto-id stamping confuses the composite's\nfirst-focusable lookup.\n",
85
+ "wrong": "<field-ui label=\"Card details\">\n <payment-method-form-ui></payment-method-form-ui>\n</field-ui>\n"
86
+ },
87
+ {
88
+ "fix": "<form>\n <payment-method-form-ui id=\"pm\"></payment-method-form-ui>\n <button-ui type=\"submit\" text=\"Save\"></button-ui>\n</form>\n<script>\n form.addEventListener('submit', async (e) => {\n e.preventDefault();\n const detail = await pm.tokenize();\n // Hand `detail.last4` / `detail.brand` to your processor SDK\n // to mint a real token; POST the resulting token to /charge.\n });\n</script>\n",
89
+ "why": "Posting the form's serialized token directly to /charge skips\ntokenization — the synthetic local-mode token is opaque but\nNOT a real payment token. A real processor must mint the\ntoken before the charge call.\n",
90
+ "wrong": "<form>\n <payment-method-form-ui></payment-method-form-ui>\n <button-ui type=\"submit\" text=\"Save\"></button-ui>\n</form>\n<script>\n form.addEventListener('submit', (e) => fetch('/charge', { body: new FormData(form) }));\n</script>\n"
91
+ }
92
+ ],
93
+ "category": "input",
94
+ "composes": [
95
+ "field-ui",
96
+ "input-ui",
97
+ "select-ui",
98
+ "alert-ui",
99
+ "icon-ui",
100
+ "button-ui"
101
+ ],
102
+ "events": {
103
+ "change": {
104
+ "description": "Fired on every sub-field input. Detail carries a snapshot of\nthe current form validity + detected card brand. Bubbles.\n",
105
+ "detail": {
106
+ "brand": {
107
+ "description": "Detected brand (`visa` / `mastercard` / `amex` / `discover` / `unknown`).",
108
+ "type": "string"
109
+ },
110
+ "valid": {
111
+ "description": "Whether the form currently passes all constraints.",
112
+ "type": "boolean"
113
+ }
114
+ }
115
+ },
116
+ "payment-method-error": {
117
+ "description": "Fired when tokenize() fails — either constraint validation\nsurfaced one or more field errors, or a Luhn / expiry / CVC\ncheck failed. Bubbles.\n",
118
+ "detail": {
119
+ "code": {
120
+ "description": "Error code — one of `validation-failed`, `card-invalid`, `expired`, `cvc-invalid`.",
121
+ "type": "string"
122
+ },
123
+ "field": {
124
+ "description": "Field name that surfaced the error (`cardNumber` / `expiry` / `cvc` / `name` / `postalCode` / `country` / null).",
125
+ "type": "string"
126
+ },
127
+ "message": {
128
+ "description": "Human-readable error message.",
129
+ "type": "string"
130
+ }
131
+ }
132
+ },
133
+ "submit-payment-method": {
134
+ "description": "Fired when tokenize() resolves — either via an outer <form>\nsubmission or an explicit tokenize() call. Detail carries the\nnormalized payload that downstream code POSTs to the billing\nservice. Bubbles.\n",
135
+ "detail": {
136
+ "brand": {
137
+ "description": "Detected brand — `visa`, `mastercard`, `amex`, `discover`, or `unknown`.",
138
+ "type": "string"
139
+ },
140
+ "country": {
141
+ "description": "ISO 3166-1 alpha-2 billing country.",
142
+ "type": "string"
143
+ },
144
+ "expMonth": {
145
+ "description": "Expiry month (1-12).",
146
+ "type": "integer"
147
+ },
148
+ "expYear": {
149
+ "description": "Expiry year (4-digit).",
150
+ "type": "integer"
151
+ },
152
+ "last4": {
153
+ "description": "Last 4 digits of the card number.",
154
+ "type": "string"
155
+ },
156
+ "name": {
157
+ "description": "Name on card.",
158
+ "type": "string"
159
+ },
160
+ "token": {
161
+ "description": "Synthetic local-mode token (sha-like opaque string).",
162
+ "type": "string"
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "examples": [
168
+ {
169
+ "description": "Empty form, all sub-fields visible, required.",
170
+ "a2ui": "[\n {\n \"id\": \"pm-1\",\n \"component\": \"PaymentMethodForm\",\n \"name\": \"paymentMethod\",\n \"required\": true\n }\n]\n",
171
+ "name": "default"
172
+ },
173
+ {
174
+ "description": "Edit-saved-card flow — summary row renders with the saved\ncard; \"Edit card\" CTA reveals the full form.\n",
175
+ "a2ui": "[\n {\n \"id\": \"pm-2\",\n \"component\": \"PaymentMethodForm\",\n \"name\": \"paymentMethod\",\n \"prefill\": \"{\\\"last4\\\":\\\"4242\\\",\\\"brand\\\":\\\"visa\\\",\\\"expMonth\\\":12,\\\"expYear\\\":2027,\\\"name\\\":\\\"Pat Doe\\\",\\\"country\\\":\\\"US\\\"}\"\n }\n]\n",
176
+ "name": "prefilled-saved-card"
177
+ },
178
+ {
179
+ "description": "Full form including billing address lines + postal + country.\n",
180
+ "a2ui": "[\n {\n \"id\": \"pm-3\",\n \"component\": \"PaymentMethodForm\",\n \"name\": \"paymentMethod\",\n \"requireBillingAddress\": true,\n \"countries\": [\"US\", \"CA\", \"GB\", \"DE\"]\n }\n]\n",
181
+ "name": "with-billing-address"
182
+ }
183
+ ],
184
+ "keywords": [
185
+ "payment-method",
186
+ "card",
187
+ "billing",
188
+ "checkout",
189
+ "card-capture",
190
+ "payment",
191
+ "credit-card",
192
+ "debit-card",
193
+ "save-payment-method",
194
+ "update-payment-method",
195
+ "add-card"
196
+ ],
197
+ "name": "UIPaymentMethodForm",
198
+ "related": [
199
+ "Form",
200
+ "Field",
201
+ "Input",
202
+ "Select",
203
+ "Alert",
204
+ "PlanPicker",
205
+ "Button"
206
+ ],
207
+ "slots": {
208
+ "legal": {
209
+ "description": "Optional content rendered below the form fields — typically a\nterms-of-storage acknowledgement string with link(s).\n"
210
+ }
211
+ },
212
+ "states": [
213
+ {
214
+ "description": "Default; ready for input.",
215
+ "name": "idle"
216
+ },
217
+ {
218
+ "description": "tokenize() in flight.",
219
+ "attribute": "tokenizing",
220
+ "name": "tokenizing"
221
+ },
222
+ {
223
+ "description": "A field-level or host-level error is present.",
224
+ "attribute": "error",
225
+ "name": "error"
226
+ },
227
+ {
228
+ "description": "A saved payment method is displayed; form is hidden.",
229
+ "attribute": "prefilled",
230
+ "name": "prefilled"
231
+ },
232
+ {
233
+ "description": "All sub-fields non-interactive.",
234
+ "attribute": "disabled",
235
+ "name": "disabled"
236
+ }
237
+ ],
238
+ "status": "experimental",
239
+ "synonyms": {
240
+ "billing": [
241
+ "billing-info",
242
+ "payment-method",
243
+ "card"
244
+ ],
245
+ "card": [
246
+ "payment-card",
247
+ "credit-card",
248
+ "debit-card"
249
+ ],
250
+ "payment-method": [
251
+ "card",
252
+ "card-on-file",
253
+ "billing"
254
+ ]
255
+ },
256
+ "tag": "payment-method-form-ui",
257
+ "tokens": {
258
+ "--payment-method-form-alert-mb": {
259
+ "description": "Margin-block-end on the host-level error alert.",
260
+ "default": "var(--a-space-3)"
261
+ },
262
+ "--payment-method-form-brand-icon-size": {
263
+ "description": "Inline brand-badge icon size in the card-number suffix.",
264
+ "default": "1.25em"
265
+ },
266
+ "--payment-method-form-disabled-opacity": {
267
+ "description": "Opacity applied to the host when [disabled].",
268
+ "default": "var(--a-opacity-disabled, 0.5)"
269
+ },
270
+ "--payment-method-form-gap": {
271
+ "description": "Gap between rows of the form grid.",
272
+ "default": "var(--a-space-3)"
273
+ },
274
+ "--payment-method-form-grid-template": {
275
+ "description": "Grid-template-areas for the field layout. Defaults to a\n4-row template — name spans both columns, card number spans\nboth, expiry + cvc share row 3, country + postal share row 4.\nAddress rows append when `require-billing-address` is set.\n",
276
+ "default": "\"name name\" \"card card\" \"expiry cvc\" \"country postal\""
277
+ },
278
+ "--payment-method-form-legal-fg": {
279
+ "description": "Foreground color of the slotted legal copy.",
280
+ "default": "var(--a-fg-muted)"
281
+ },
282
+ "--payment-method-form-legal-size": {
283
+ "description": "Font size of the slotted legal copy.",
284
+ "default": "var(--a-text-xs, 0.75rem)"
285
+ },
286
+ "--payment-method-form-summary-bg": {
287
+ "description": "Background of the saved-card summary row.",
288
+ "default": "var(--a-bg-muted)"
289
+ },
290
+ "--payment-method-form-summary-border": {
291
+ "description": "Border on the saved-card summary row.",
292
+ "default": "1px solid var(--a-border)"
293
+ },
294
+ "--payment-method-form-summary-px": {
295
+ "description": "Horizontal padding inside the saved-card summary row.",
296
+ "default": "var(--a-space-4)"
297
+ },
298
+ "--payment-method-form-summary-py": {
299
+ "description": "Vertical padding inside the saved-card summary row.",
300
+ "default": "var(--a-space-3)"
301
+ },
302
+ "--payment-method-form-summary-radius": {
303
+ "description": "Corner radius on the saved-card summary row.",
304
+ "default": "var(--a-radius-md)"
305
+ }
306
+ },
307
+ "traits": [],
308
+ "version": 1
309
+ }
310
+ }