@adia-ai/web-modules 0.8.36 → 0.8.38
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 +25 -0
- package/README.md +4 -4
- 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 +2 -2
- 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 +6 -6
- package/chat/chat-sidebar/chat-sidebar.js +2 -2
- package/chat/chat-surfaces/chat-surfaces.js +3 -3
- 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/chat/chat-shell.min.js +1 -1
- package/dist/everything.min.js +121 -102
- 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,283 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/PaymentMethodList.json",
|
|
4
|
+
"title": "PaymentMethodList",
|
|
5
|
+
"description": "Compound billing primitive that renders the user's saved payment\nmethods (cards, bank accounts, wallets) as a vertical list with one\nrow designated as the default. Each row shows a brand mark, the\nlast-4 / account identifier, an optional expiry, and per-row actions\n(set-default / edit / remove). A trailing \"Add payment method\" CTA\nemits `add` so consumers can route the consumer flow.\n\nDefault is a strict 1-of-N radiogroup — exactly one row carries the\ndefault state when the list is non-empty. The primitive does NOT\nmutate the data source; all changes flow as events (`change`,\n`add`, `remove`, `select`) and the consumer applies the side\neffect against their billing API.\n\nSpec: .claude/docs/specs/implementation-ready/SPEC-010-payment-method-list.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
|
+
"add-icon": {
|
|
17
|
+
"description": "Phosphor icon name for the add CTA.",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"default": "plus"
|
|
20
|
+
},
|
|
21
|
+
"add-label": {
|
|
22
|
+
"description": "Label for the trailing add CTA.",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default": "Add payment method"
|
|
25
|
+
},
|
|
26
|
+
"component": {
|
|
27
|
+
"const": "PaymentMethodList"
|
|
28
|
+
},
|
|
29
|
+
"disabled": {
|
|
30
|
+
"description": "Block all interaction; rows remain visible.",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false
|
|
33
|
+
},
|
|
34
|
+
"methods": {
|
|
35
|
+
"description": "Array of saved payment-method records. Source of truth for the\nrendered rows. Shape per record:\n{id, brand, last4?, expiry?, holder?, type, default?, status?}.\nEmpty array renders the empty-state.\n",
|
|
36
|
+
"$ref": "common_types.json#/$defs/DynamicStringList"
|
|
37
|
+
},
|
|
38
|
+
"name": {
|
|
39
|
+
"description": "Form field name for the default-method id. Serialized via\nElementInternals; mirrors UIFormElement conventions.\n",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"default": ""
|
|
42
|
+
},
|
|
43
|
+
"no-add": {
|
|
44
|
+
"description": "Hide the trailing \"Add payment method\" CTA (read-only flow,\ncheckout drawer, etc.).\n",
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"default": false
|
|
47
|
+
},
|
|
48
|
+
"no-remove": {
|
|
49
|
+
"description": "Hide per-row remove buttons.",
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"default": false
|
|
52
|
+
},
|
|
53
|
+
"value": {
|
|
54
|
+
"description": "Id of the row currently marked default (the form value). When\nboth `value` and `methods[].default` are set, `value` wins and\nthe primitive emits `change` to reconcile.\n",
|
|
55
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"component"
|
|
60
|
+
],
|
|
61
|
+
"unevaluatedProperties": false,
|
|
62
|
+
"x-adiaui": {
|
|
63
|
+
"anti_patterns": [
|
|
64
|
+
{
|
|
65
|
+
"fix": "<payment-method-list-ui methods='[\n {\"id\":\"pm_1\",\"default\":true},\n {\"id\":\"pm_2\"}\n]'></payment-method-list-ui>\n",
|
|
66
|
+
"why": "Two rows marked default. The primitive clears all but the first\nand emits a corrective `change` event; this is wasted round-trips.\nSource of truth should mark exactly one row.\n",
|
|
67
|
+
"wrong": "<payment-method-list-ui methods='[\n {\"id\":\"pm_1\",\"default\":true},\n {\"id\":\"pm_2\",\"default\":true}\n]'></payment-method-list-ui>\n"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"fix": "<payment-method-list-ui methods=\"...\"></payment-method-list-ui>\n",
|
|
71
|
+
"why": "Reinvents 1-of-N default semantics. Drops radiogroup a11y.\nRe-derives the brand-icon dictionary per consumer.\n",
|
|
72
|
+
"wrong": "A <col-ui> of bespoke <card-ui> rows with manual radio markup\nand a per-row \"make default\" button.\n"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"fix": "<payment-method-list-ui methods='[{\"id\":\"pm_1\",\"brand\":\"discover\",\"type\":\"card\"}]'>\n</payment-method-list-ui>\n",
|
|
76
|
+
"why": "\"discover-it\" is a card product, not a brand from the enumerated\nset. The primitive renders the generic credit-card fallback.\n",
|
|
77
|
+
"wrong": "<payment-method-list-ui methods='[{\"id\":\"pm_1\",\"brand\":\"discover-it\",\"type\":\"card\"}]'>\n</payment-method-list-ui>\n"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"category": "input",
|
|
81
|
+
"composes": [
|
|
82
|
+
"card-ui",
|
|
83
|
+
"button-ui",
|
|
84
|
+
"icon-ui",
|
|
85
|
+
"tag-ui",
|
|
86
|
+
"text-ui",
|
|
87
|
+
"empty-state-ui"
|
|
88
|
+
],
|
|
89
|
+
"events": {
|
|
90
|
+
"add": {
|
|
91
|
+
"description": "Fired when the user activates the trailing add CTA. Consumer\nroutes to its add-method flow (drawer / modal / page). Bubbles.\n"
|
|
92
|
+
},
|
|
93
|
+
"change": {
|
|
94
|
+
"description": "Fired when the default method changes — via row activation or\nprogrammatic value set. Bubbles.\n",
|
|
95
|
+
"detail": {
|
|
96
|
+
"method": {
|
|
97
|
+
"description": "The full method record now marked default.",
|
|
98
|
+
"type": "object"
|
|
99
|
+
},
|
|
100
|
+
"previous": {
|
|
101
|
+
"description": "Id of the previous default (empty string when none).",
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"value": {
|
|
105
|
+
"description": "Id of the new default.",
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"remove": {
|
|
111
|
+
"description": "Fired when the user activates a row's remove affordance. Consumer\nremoves the method on its end and writes back via `.remove(id)`\nor by mutating `methods`. Bubbles.\n",
|
|
112
|
+
"detail": {
|
|
113
|
+
"id": {
|
|
114
|
+
"description": "Method id targeted for removal.",
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"method": {
|
|
118
|
+
"description": "The full method record.",
|
|
119
|
+
"type": "object"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"select": {
|
|
124
|
+
"description": "Fired when the user activates a row without changing the default\n(e.g. an \"Edit\" action). Bubbles.\n",
|
|
125
|
+
"detail": {
|
|
126
|
+
"id": {
|
|
127
|
+
"description": "Method id.",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"method": {
|
|
131
|
+
"description": "The full method record.",
|
|
132
|
+
"type": "object"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"examples": [
|
|
138
|
+
{
|
|
139
|
+
"description": "Saved payment methods in a billing settings panel.",
|
|
140
|
+
"a2ui": "[\n {\n \"id\": \"pml-settings\",\n \"component\": \"PaymentMethodList\",\n \"name\": \"default-method\",\n \"value\": \"pm_1\",\n \"methods\": [\n {\"id\":\"pm_1\",\"brand\":\"visa\",\"last4\":\"4242\",\"expiry\":\"2027-05-01\",\"holder\":\"Ada Lovelace\",\"type\":\"card\",\"default\":true},\n {\"id\":\"pm_2\",\"brand\":\"mastercard\",\"last4\":\"0009\",\"expiry\":\"2026-06-01\",\"holder\":\"Ada Lovelace\",\"type\":\"card\"},\n {\"id\":\"pm_3\",\"brand\":\"ach\",\"last4\":\"6789\",\"holder\":\"Chase ••6789\",\"type\":\"bank\"}\n ]\n }\n]\n",
|
|
141
|
+
"name": "settings-list"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"description": "Checkout-drawer picker — no add CTA; read-only-ish.",
|
|
145
|
+
"a2ui": "[\n {\n \"id\": \"pml-checkout\",\n \"component\": \"PaymentMethodList\",\n \"name\": \"checkout-method\",\n \"noAdd\": true,\n \"methods\": [\n {\"id\":\"pm_1\",\"brand\":\"visa\",\"last4\":\"4242\",\"expiry\":\"2027-05-01\",\"type\":\"card\",\"default\":true},\n {\"id\":\"pm_2\",\"brand\":\"mastercard\",\"last4\":\"0009\",\"expiry\":\"2026-06-01\",\"type\":\"card\"}\n ]\n }\n]\n",
|
|
146
|
+
"name": "checkout-drawer"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"keywords": [
|
|
150
|
+
"payment-method",
|
|
151
|
+
"payment-methods",
|
|
152
|
+
"saved-cards",
|
|
153
|
+
"billing",
|
|
154
|
+
"cards",
|
|
155
|
+
"payment-card",
|
|
156
|
+
"credit-card",
|
|
157
|
+
"default-card",
|
|
158
|
+
"wallet",
|
|
159
|
+
"bank-account",
|
|
160
|
+
"ach",
|
|
161
|
+
"method-list"
|
|
162
|
+
],
|
|
163
|
+
"name": "PaymentMethodList",
|
|
164
|
+
"related": [
|
|
165
|
+
"PlanPicker",
|
|
166
|
+
"Card",
|
|
167
|
+
"Button",
|
|
168
|
+
"Tag",
|
|
169
|
+
"Icon",
|
|
170
|
+
"EmptyState"
|
|
171
|
+
],
|
|
172
|
+
"slots": {
|
|
173
|
+
"add": {
|
|
174
|
+
"description": "Custom add-CTA replacement. When absent the primitive stamps a\ndefault `<button-ui variant=\"outline\" icon=\"plus\">`. Hidden\nentirely when `[no-add]` is set.\n"
|
|
175
|
+
},
|
|
176
|
+
"empty": {
|
|
177
|
+
"description": "Custom empty-state shown when `methods` is empty. Falls back to a\ndefault <empty-state-ui icon=\"credit-card\"> when omitted.\n"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"states": [
|
|
181
|
+
{
|
|
182
|
+
"description": "Default — rows rendered, ready for interaction.",
|
|
183
|
+
"name": "idle"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"description": "No methods to render.",
|
|
187
|
+
"attribute": "empty",
|
|
188
|
+
"name": "empty"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"description": "All rows non-interactive.",
|
|
192
|
+
"attribute": "disabled",
|
|
193
|
+
"name": "disabled"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"status": "experimental",
|
|
197
|
+
"synonyms": {
|
|
198
|
+
"card": [
|
|
199
|
+
"credit-card",
|
|
200
|
+
"debit-card",
|
|
201
|
+
"payment-method"
|
|
202
|
+
],
|
|
203
|
+
"payment": [
|
|
204
|
+
"billing",
|
|
205
|
+
"charge"
|
|
206
|
+
],
|
|
207
|
+
"saved": [
|
|
208
|
+
"stored"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"tag": "payment-method-list-ui",
|
|
212
|
+
"tokens": {
|
|
213
|
+
"--payment-method-list-add-justify": {
|
|
214
|
+
"description": "Justification of the trailing add CTA row.",
|
|
215
|
+
"default": "flex-start"
|
|
216
|
+
},
|
|
217
|
+
"--payment-method-list-bg": {
|
|
218
|
+
"description": "Host background. Defaults to transparent.",
|
|
219
|
+
"default": "transparent"
|
|
220
|
+
},
|
|
221
|
+
"--payment-method-list-brand-frame": {
|
|
222
|
+
"description": "Brand-mark frame background.",
|
|
223
|
+
"default": "var(--a-bg-strong)"
|
|
224
|
+
},
|
|
225
|
+
"--payment-method-list-brand-radius": {
|
|
226
|
+
"description": "Brand-mark frame radius.",
|
|
227
|
+
"default": "var(--a-radius-md)"
|
|
228
|
+
},
|
|
229
|
+
"--payment-method-list-brand-size": {
|
|
230
|
+
"description": "Brand-mark frame size.",
|
|
231
|
+
"default": "2.5rem"
|
|
232
|
+
},
|
|
233
|
+
"--payment-method-list-disabled-opacity": {
|
|
234
|
+
"description": "Opacity applied when the host is disabled.",
|
|
235
|
+
"default": 0.5
|
|
236
|
+
},
|
|
237
|
+
"--payment-method-list-gap": {
|
|
238
|
+
"description": "Gap between rows.",
|
|
239
|
+
"default": "var(--a-space-2)"
|
|
240
|
+
},
|
|
241
|
+
"--payment-method-list-row-bg": {
|
|
242
|
+
"description": "Default row background.",
|
|
243
|
+
"default": "var(--a-bg)"
|
|
244
|
+
},
|
|
245
|
+
"--payment-method-list-row-bg-default": {
|
|
246
|
+
"description": "Background tint applied to the default row.",
|
|
247
|
+
"default": "var(--md-sys-color-primary-container)"
|
|
248
|
+
},
|
|
249
|
+
"--payment-method-list-row-bg-hover": {
|
|
250
|
+
"description": "Row hover background.",
|
|
251
|
+
"default": "var(--a-bg-muted)"
|
|
252
|
+
},
|
|
253
|
+
"--payment-method-list-row-border": {
|
|
254
|
+
"description": "Row border.",
|
|
255
|
+
"default": "1px solid var(--a-border-subtle)"
|
|
256
|
+
},
|
|
257
|
+
"--payment-method-list-row-border-default": {
|
|
258
|
+
"description": "Border on the default row.",
|
|
259
|
+
"default": "1px solid var(--md-sys-color-primary)"
|
|
260
|
+
},
|
|
261
|
+
"--payment-method-list-row-gap": {
|
|
262
|
+
"description": "Gap between brand mark, meta, and actions cells.",
|
|
263
|
+
"default": "var(--a-space-3)"
|
|
264
|
+
},
|
|
265
|
+
"--payment-method-list-row-px": {
|
|
266
|
+
"description": "Row horizontal padding.",
|
|
267
|
+
"default": "var(--a-space-4)"
|
|
268
|
+
},
|
|
269
|
+
"--payment-method-list-row-py": {
|
|
270
|
+
"description": "Row vertical padding.",
|
|
271
|
+
"default": "var(--a-space-3)"
|
|
272
|
+
},
|
|
273
|
+
"--payment-method-list-row-radius": {
|
|
274
|
+
"description": "Row corner radius.",
|
|
275
|
+
"default": "var(--a-radius-lg)"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"traits": [
|
|
279
|
+
"focusable"
|
|
280
|
+
],
|
|
281
|
+
"version": 1
|
|
282
|
+
}
|
|
283
|
+
}
|