@polyxd/a2ui 0.1.1 → 0.2.1
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/catalog/catalog.json +1413 -78
- package/dist/mapping.d.ts +1 -1
- package/dist/mapping.js +11 -0
- package/dist/mapping.js.map +1 -1
- package/package.json +2 -2
package/catalog/catalog.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"title": "Polyxd catalog",
|
|
6
6
|
"description": "Polyxd semantic components as an A2UI v1.0 catalog. Every component is a faithful projection of the Polyxd component with the same name and props. Generated from @polyxd/spec components/*.json by @polyxd/a2ui (npm run build:catalog).",
|
|
7
7
|
"catalogId": "https://polyxd.com/catalog/0.1/a2ui",
|
|
8
|
-
"instructions": "# Polyxd catalog for A2UI\n\nSemantic components for just-in-time interfaces. The renderer maps each one onto its own native, design-system components and tokens. Pick components by meaning, not by look. Never send colours, sizes or fonts.\n\n## Rules for every surface\n\n1. The top-level component has `\"id\": \"root\"`. Children are referenced by id (flat adjacency list), never nested inline.\n2. Data always comes from the host through JSON Pointer bindings `{\"path\": \"/...\"}`. Never invent data or pre-format numbers and dates into strings. Set `format` instead.\n3. Inside a templated list (`Collection.items`), relative paths such as `{\"path\": \"title\"}` resolve against the current item. Absolute paths start with `/`.\n4. Actions are declared capability intents: `{\"event\": {\"name\": \"transfer.confirm\", \"context\": {...}}}`. Use `{\"functionCall\": {\"call\": \"dismiss\" | \"back\" | \"next\"}}` for navigation the renderer handles itself.\n5. At most one primary action is visible at a time. A Form's submit and a Steps finish count as primary.\n6. Destructive or consequential actions go through `Confirm`.\n7. Components carry their own roles and names. Use `accessibility` only to add to them.\n\n## Components\n\n### Action\n\nA button that triggers a host capability.\n\n- **Use when:**\n - Anything the user can do that isn't typing or choosing\n- **Don't use when:**\n - Navigating between views: use Views\n - Confirming something destructive: wrap in Confirm\n- **Rendering:**\n - At most one primary action visible at a time\n - danger tone uses color.action.danger.*\n- **Accessibility** (role: button):\n - Label describes the outcome\n - Target at least size.target.min\n - Disabled actions explain why nearby\n- **Agents:** Activate by label.\n\n### ActionBar\n\nThe set of actions for a surface or section; the renderer places it where that platform expects.\n\n- **Use when:**\n - Two or more actions that apply to the whole surface or section\n- **Don't use when:**\n - A single action inline with content: use Action directly\n- **Rendering:**\n - Web: bottom of the section, primary last on desktop and first on mobile stacks\n - iOS/Android: toolbar or bottom bar on compact screens\n- **Accessibility** (role: toolbar / group):\n - Order in the accessibility tree is order of importance\n- **Agents:** Actions are listed together.\n\n### Card\n\nOne self-contained entity (an account, an order, a place), optionally actionable as a whole.\n\n- **Use when:**\n - Items in a Collection that each represent an entity\n - A single entity summary in a larger surface\n- **Don't use when:**\n - Plain grouping: use Group\n - Tabular data with many attributes: use Table\n- **Rendering:**\n - If 'action' is set, the whole card opens it; controls in children (e.g. a habit's done Toggle) sit above that target and act on their own\n - Uses surface.raised and radius.default\n - 'progress' renders a progress bar with its label or percentage\n- **Accessibility** (role: article (or link/button when it has an action)):\n - Title is the accessible name\n - When actionable, the title is the card's one link; controls inside it (a Toggle, an Action) stay separate targets with their own names\n- **Agents:** Activate the card by its title; use controls inside it by their own labels.\n\n### Chart\n\nA visual summary of data, always paired with a text summary.\n\n- **Use when:**\n - A trend, comparison, share or spread matters more than exact values\n- **Don't use when:**\n - Exact values matter most: use Table or Metric\n - A single number: use Metric\n- **Rendering:**\n - trend → line, comparison → bar, composition → stacked bar (pie only for ≤ 4 parts), distribution → histogram\n - Series colors use color.data.categorical.N in order\n- **Accessibility** (role: img (figure) with the summary as description, plus a data-table alternative):\n - 'summary' states the takeaway in words\n - Series are distinguishable without color (labels, markers)\n - The underlying data is available as a table\n- **Agents:** Reads the summary, and the data through the table alternative.\n\n### Choice\n\nPick one or several options from a known set. The renderer chooses the control.\n\n- **Use when:**\n - Any choice from a known set of options\n- **Don't use when:**\n - On/off setting: use Toggle\n - Picking between rich entities by comparing attributes: use Comparison\n- **Rendering:**\n - single, 2–4 short options → segmented control or radios\n - single, 5–10 → radios (or select on compact screens)\n - single, > 10 → searchable select\n - multiple, ≤ 10 → checkboxes; > 10 → searchable multi-select\n - Option order comes from host data or remembers the last order used\n- **Accessibility** (role: radiogroup / group of checkboxes / listbox / combobox (depends on rendering)):\n - Visible group label\n - Every option has a text label\n- **Agents:** Select options by label.\n\n### Collection\n\nA list of items from host data, each rendered with the same template.\n\n- **Use when:**\n - Browsing a set of similar entities\n - Search results\n- **Don't use when:**\n - Attributes compared across items: use Table or Comparison\n - Choosing an option in a form: use Choice\n- **Rendering:**\n - Long lists are virtualized by the renderer\n - Items keep their order from host data\n - grid: 2 columns on phones, more as width allows; list: one item per row\n - auto: grid when the item template is a Card with media, otherwise list\n - 'timeline' marks each item on a line, newest first, for activity feeds\n- **Accessibility** (role: list / listitem (listbox when selectable)):\n - Announces the item count\n - An empty state is provided\n- **Agents:** Items are enumerated with their titles; each item exposes its own actions.\n\n### Comparison\n\nCompare a few options across the same attributes, and choose one.\n\n- **Use when:**\n - Choosing between 2–4 plans, products, routes or offers\n- **Don't use when:**\n - More than ~5 items: use Table with sorting\n - No decision needed: use Table\n- **Rendering:**\n - Wide: items as columns; compact: one card per item with the same attribute order\n - Best values per attribute are marked when 'better' is set\n - Exactly one item may be recommended; its badge carries recommendedReason\n - Attributes with the same group sit under one heading\n - Boolean values render as a check or a dash with text alternatives ('Included' / 'Not included')\n - On compact surfaces the recommended item comes first\n- **Accessibility** (role: table (items as columns on wide screens) or list of cards):\n - Attribute names are headers\n - 'better' is conveyed in text, not only color\n- **Agents:** Reads attributes per item; choose actions are named with the item title.\n\n### Confirm\n\nAsks the user to confirm a consequential or destructive action, showing what will happen.\n\n- **Use when:**\n - Moving money, deleting data, sending on someone's behalf, anything irreversible\n- **Don't use when:**\n - Routine reversible actions (prefer undo)\n - Information only: use Status\n- **Rendering:**\n - destructive uses color.action.danger.*\n - Capabilities with high risk level must use Confirm (enforced by the verifier)\n - the consequence sits directly above the confirm button\n - amount and subject lead the dialog when set\n - consequences render as an icon list, two columns on wide surfaces\n- **Accessibility** (role: alertdialog):\n - Focus starts on the least destructive option\n - Confirm label repeats the action verb\n - Escape cancels\n- **Agents:** Reads title and consequence; confirm and cancel are named buttons.\n\n### DateInput\n\nA date, time, date-time or date range.\n\n- **Use when:**\n - Any date or time entry\n- **Don't use when:**\n - Relative choices like 'This month / Last month': use Choice\n- **Rendering:**\n - Memorable dates (birthdays) use separate day/month/year fields; near dates use a calendar\n- **Accessibility** (role: group of spinbuttons or a date picker dialog):\n - Typing the date is always possible, not only picking from a calendar\n- **Agents:** Fill by label with an ISO date.\n\n### DetailList\n\nLabel/value pairs describing one thing (a summary, a receipt, a review step).\n\n- **Use when:**\n - Reviewing before submitting\n - Showing the attributes of one entity\n - Receipts\n - Fees, prices and totals before someone commits (variant 'receipt')\n- **Don't use when:**\n - Many entities with the same attributes: use Table\n - Comparing entities: use Comparison\n- **Rendering:**\n - Keeps the item order stable across generations (keys are remembered)\n - receipt: values right-aligned in tabular figures, the total row emphasised; people read amounts from the right\n - 'grid' lays fields out in columns by width, label above value\n- **Accessibility** (role: list of term/definition pairs (dl)):\n - Label and value are programmatically associated\n- **Agents:** Read each label with its value.\n\n### Disclosure\n\nProgressive disclosure: secondary content hidden behind a toggle.\n\n- **Use when:**\n - Details most people don't need (fees breakdown, advanced options, help text)\n- **Don't use when:**\n - Content everyone needs to complete the task\n - Primary navigation\n- **Rendering:**\n - Never hide required inputs or the primary action inside a closed Disclosure\n- **Accessibility** (role: button (aria-expanded) + region):\n - Summary is a button with expanded state\n - Hidden content is not in the tab order while closed\n- **Agents:** Expand by the summary text; state is exposed as expanded/collapsed.\n\n### FilterPanel\n\nFilters for a list of results, with the result count.\n\n- **Use when:**\n - Browsing results people narrow by several attributes\n - More than two filters, or filters that take space (ranges, long lists)\n- **Don't use when:**\n - One or two quick filters: put a Choice (chips) above the results\n - Filling in information: use Form\n- **Rendering:**\n - Wide: filters in a sidebar beside the results\n - Compact: a 'Filters · n' button opens a bottom sheet whose action says 'Show n results'\n - Active filters show as removable chips above the results\n - Filters apply as they change (no separate Apply on wide)\n- **Accessibility** (role: region (filters) plus the results):\n - The result count is announced politely when it changes\n - Each active filter can be removed with a named button ('Remove filter: Desk')\n- **Agents:** Set filter inputs by label; read the result count; remove filters by their Remove buttons.\n\n### Form\n\nCollects inputs and submits them together.\n\n- **Use when:**\n - Any set of inputs that are submitted together\n- **Don't use when:**\n - Settings that apply immediately: use Toggles with actions\n - Several distinct stages: use Steps\n- **Rendering:**\n - One column; labels above fields\n - Submit is the primary action; cancel is secondary\n - Submit context is built from the form's input bindings\n - 'horizontal' becomes stacked on compact surfaces\n - 'aside' sits beside the form on wide surfaces; on compact ones it comes first, before the fields, so people read what they are agreeing to\n- **Accessibility** (role: form):\n - Submit is a real submit button\n - On submit errors, focus moves to an error summary that links to each field\n- **Agents:** Fill fields by label, then activate the submit button by its label.\n\n### Group\n\nVisually groups closely related items without a heading (proximity).\n\n- **Use when:**\n - A few items that belong together (a key figure and its caption, several metrics)\n- **Don't use when:**\n - The group needs a heading: use Section\n - Choosing between items: use Choice or Comparison\n- **Rendering:**\n - 'inline' collapses to a stack below the compact breakpoint\n - Gap uses space.stack.default or space.inline.default\n- **Accessibility** (role: group):\n - Has an accessible name when it contains interactive items\n- **Agents:** Treated as one unit when its label is present.\n\n### Media\n\nAn image supplied by the host.\n\n- **Use when:**\n - Photos or illustrations that help identify something (a product, a place, a person)\n- **Don't use when:**\n - Decoration with no information\n - Icons for actions (renderer supplies those)\n- **Rendering:**\n - Images never convey information that is not also in text\n- **Accessibility** (role: img):\n - Has alt text unless decorative (then hidden from assistive technology)\n- **Agents:** Reads the alt text.\n\n### Metric\n\nA key figure with a label, and optionally its change.\n\n- **Use when:**\n - One to four headline numbers the user asked about\n- **Don't use when:**\n - Many numbers: use Table or DetailList\n - Trends over time: use Chart\n- **Rendering:**\n - Value uses type.numeric.display\n - Change uses color.data.positive / negative according to 'favorable'\n- **Accessibility** (role: group (label + value)):\n - Change direction is conveyed in text as well as color\n - Screen readers read label, value and change as one sentence\n- **Agents:** Read label and value.\n\n### Navigation\n\nThe product's main navigation.\n\n- **Use when:**\n - Software with sections people move between (B2B apps, dashboards)\n - Only when the host doesn't already provide navigation\n- **Don't use when:**\n - Steps of one task: use Steps\n - Sections of one record: use Views\n - A surface embedded in a host that has its own navigation\n- **Rendering:**\n - Wide: a side navigation with grouped items\n - Compact: a menu button that opens the navigation\n - Badges sit at the end of their item\n- **Accessibility** (role: navigation):\n - The current item carries aria-current=\"page\"\n - Badges say what they count ('12 overdue')\n- **Agents:** Move between sections by activating items by their labels.\n\n### RangeInput\n\nA number, or a range between two numbers, within known bounds.\n\n- **Use when:**\n - Approximate values within a range (budget cap, volume)\n - A price or date range for filtering (mode 'range')\n- **Don't use when:**\n - Exact values: use TextInput with kind 'number' or 'currency'\n- **Rendering:**\n - Shows min, max and the current formatted value\n - mode 'range' shows two thumbs and min/max fields that stay in sync\n- **Accessibility** (role: slider):\n - Current value is shown as text\n - Keyboard arrows change the value by step\n- **Agents:** Set the value directly by label.\n\n### Section\n\nA titled region of the surface that groups related content under a heading.\n\n- **Use when:**\n - The surface has two or more distinct topics (e.g. 'Recipient' and 'Amount')\n - Content would otherwise exceed one screen and needs signposting\n- **Don't use when:**\n - Only one topic: put content directly under the root\n - Visual grouping without a heading: use Group\n- **Rendering:**\n - Heading level follows nesting depth, never chosen by the model\n - Spacing between sections uses space.stack.section\n- **Accessibility** (role: region (with heading)):\n - Title is rendered as a real heading; nesting depth sets the heading level\n - Title is the region's accessible name\n- **Agents:** Navigate by heading; the title names the region.\n\n### Status\n\nFeedback about state: info, success, warning, error, empty or loading.\n\n- **Use when:**\n - Results of an action\n - Empty collections\n - Errors with a way to recover\n - Loading states\n - 'undo': after a reversible action ran, say what happened and offer Undo instead of asking first\n- **Don't use when:**\n - Validation errors on a field: inputs show their own errors\n - Confirmation before acting: use Confirm\n- **Rendering:**\n - error and warning use color.status.* tokens and an icon\n - empty states explain why and what to do next\n - loading shows a skeleton when layout is known, otherwise a progress indicator\n - 'undo' renders as a snackbar at the bottom of the surface, announced politely, with the Undo action\n - Empty states may carry an ActionBar: one primary and one secondary action\n - 'inline' renders a bordered notice with its action on the right\n- **Accessibility** (role: status or alert (live region)):\n - success/info/loading are polite live regions; error is assertive\n - Meaning is in text, not only color or icon\n- **Agents:** Reads the title and message; the recovery action is exposed.\n\n### Steps\n\nA task split into ordered steps with visible progress.\n\n- **Use when:**\n - Tasks with dependent stages or too many inputs for one view (checkout, onboarding)\n- **Don't use when:**\n - Independent views: use Views\n - Under ~6 inputs: a single Form\n- **Rendering:**\n - Renderer provides Back (ui.back) and Next (ui.next); the last step shows 'finish'\n - Each step validates before moving on\n- **Accessibility** (role: group with step progress (aria-current on the current step)):\n - Current step and total are announced\n - Back never loses entered data\n- **Agents:** Reads 'step N of M'; next/back are exposed as buttons.\n\n### Table\n\nTabular data: many items sharing the same attributes.\n\n- **Use when:**\n - Scanning or comparing many rows by several attributes\n - Records people scan, sort, select and act on in bulk (B2B lists)\n- **Don't use when:**\n - One entity: use DetailList\n - A few entities where the user must choose: use Comparison\n- **Rendering:**\n - On compact screens, rows become stacked cards with label/value pairs\n - Alignment follows the column format, never chosen by the model\n - Numbers and currency are right-aligned with tabular figures; 'status' renders as a tag using 'tones'\n - On compact surfaces the table becomes a list of rows: the entity, the key fields in one line, and the status\n - Selection replaces the toolbar with the bulk-action bar while rows are selected\n - Paging shows rows per page, the range and the total\n- **Accessibility** (role: table with caption and column headers):\n - Has a caption\n - Column headers are real header cells\n - Numeric columns are right-aligned by format\n - Sortable headers carry aria-sort and say what sorting does\n - The select-all checkbox is mixed when some rows are selected\n - The bulk-action bar names how many rows are selected, announced politely\n - Each row's action menu is named after its row\n- **Agents:** Read by row and column headers; rows with rowAction are activatable. Sort by activating a column header; select rows by their checkboxes; act in bulk from the bar that appears.\n\n### Text\n\nA run of text.\n\n- **Use when:**\n - Explanations, instructions, messages\n- **Don't use when:**\n - Headings: use Section title\n - Label/value pairs: use DetailList\n - Key figures: use Metric\n- **Rendering:**\n - 'supporting' uses color.text.muted\n - No inline styling; emphasis comes from structure\n- **Accessibility** (role: text):\n - Body text is at least 16px (type.body.default)\n - Line length is capped by measure.max\n- **Agents:** Read as text.\n\n### TextInput\n\nA single text-like value: text, number, email, phone, currency, search or long text.\n\n- **Use when:**\n - Free-form values the user types\n- **Don't use when:**\n - A value from a known set: use Choice\n - Dates: use DateInput\n - Secrets (passwords, card numbers): not generated; hosts provide their own secure flows\n- **Rendering:**\n - Width suggests expected length\n - Errors appear after the user leaves the field or submits, not while typing\n - kind 'search' renders as a pill search field with an icon; the label stays as its accessible name\n - size 'hero' renders a large centred amount with the currency symbol dimmed\n- **Accessibility** (role: textbox / searchbox / spinbutton):\n - Visible label, never placeholder-only\n - Help and errors are associated with the field\n - Kind sets the right keyboard and autocomplete\n- **Agents:** Fill by label.\n\n### Toggle\n\nAn on/off setting.\n\n- **Use when:**\n - Settings that take effect immediately\n - A single yes/no inside a form\n- **Don't use when:**\n - Choosing between named options: use Choice\n- **Rendering:**\n - With 'action' it renders as a switch; inside a Form without action, as a checkbox\n- **Accessibility** (role: switch (immediate) / checkbox (in a form)):\n - Label says what 'on' means\n- **Agents:** Toggle by label; state is exposed as on/off.\n\n### Views\n\nSwitch between alternative views of the same subject (tabs).\n\n- **Use when:**\n - 2–6 peer views of the same data (Overview / Transactions / Settings)\n- **Don't use when:**\n - Sequential steps: use Steps\n - Filtering one list: use Choice\n- **Rendering:**\n - More than 4 views on compact screens become a menu or scrollable tabs\n - Counts sit beside their labels and are part of the tab's accessible name\n- **Accessibility** (role: tablist / tab / tabpanel):\n - Each tab has a visible label\n - Arrow keys move between tabs\n- **Agents:** Select a view by its label.\n",
|
|
8
|
+
"instructions": "# Polyxd catalog for A2UI\n\nSemantic components for just-in-time interfaces. The renderer maps each one onto its own native, design-system components and tokens. Pick components by meaning, not by look. Never send colours, sizes or fonts.\n\n## Rules for every surface\n\n1. The top-level component has `\"id\": \"root\"`. Children are referenced by id (flat adjacency list), never nested inline.\n2. Data always comes from the host through JSON Pointer bindings `{\"path\": \"/...\"}`. Never invent data or pre-format numbers and dates into strings. Set `format` instead.\n3. Inside a templated list (`Collection.items`), relative paths such as `{\"path\": \"title\"}` resolve against the current item. Absolute paths start with `/`.\n4. Actions are declared capability intents: `{\"event\": {\"name\": \"transfer.confirm\", \"context\": {...}}}`. Use `{\"functionCall\": {\"call\": \"dismiss\" | \"back\" | \"next\"}}` for navigation the renderer handles itself.\n5. At most one primary action is visible at a time. A Form's submit and a Steps finish count as primary.\n6. Destructive or consequential actions go through `Confirm`.\n7. Components carry their own roles and names. Use `accessibility` only to add to them.\n\n## Components\n\n### Action\n\nA button that triggers a host capability.\n\n- **Use when:**\n - Anything the user can do that isn't typing or choosing\n- **Don't use when:**\n - Navigating between views: use Views\n - Confirming something destructive: wrap in Confirm\n- **Rendering:**\n - At most one primary action visible at a time\n - danger tone uses color.action.danger.*\n - 'description' sits under the label in type.body.small, muted; the button's accessible description\n - ui.copy is handled by the renderer: it copies 'copy' (or the context's 'text') and announces 'Copied' politely\n - 'shortcut' shows as a keyboard hint (kbd) beside the label, with mod written as ⌘ or Ctrl for the platform; it fires only while focus is inside the surface, never over the host page, and never on a disabled action\n- **Accessibility** (role: button):\n - Label describes the outcome\n - Target at least size.target.min\n - Disabled actions explain why nearby\n - A shortcut is a hint, never the only way: the button itself stays clickable and focusable\n- **Agents:** Activate by label.\n\n### ActionBar\n\nThe set of actions for a surface or section; the renderer places it where that platform expects.\n\n- **Use when:**\n - Two or more actions that apply to the whole surface or section\n- **Don't use when:**\n - A single action inline with content: use Action directly\n- **Rendering:**\n - Web: bottom of the section, primary last on desktop and first on mobile stacks\n - iOS/Android: toolbar or bottom bar on compact screens\n- **Accessibility** (role: toolbar / group):\n - Order in the accessibility tree is order of importance\n- **Agents:** Actions are listed together.\n\n### ActionMenu\n\nSecondary actions behind one control: an overflow menu, a dropdown, a split button or a context menu.\n\n- **Use when:**\n - Three or more secondary actions on a row, a card or a page header\n - One usual action with rarer alternatives (split: 'Save' with 'Save as draft')\n - Actions that belong to the thing under the pointer (context)\n- **Don't use when:**\n - One or two actions: use Action or ActionBar, where they are visible\n - The main thing to do on the surface: never hidden in a menu\n - Navigation between views: use Views or Navigation\n- **Rendering:**\n - The menu uses color.surface.overlay with elevation.overlay and radius.default; items are size.control.default tall with space.inset.default\n - A danger-toned Action shows in color.status.danger.emphasis after a divider\n - The overflow control is an icon-only button at size.target.min with the label as its accessible name; a dropdown shows the label with a chevron\n - A split's two parts share one outline; the menu part is at least size.target.min wide\n- **Accessibility** (role: a menu button (aria-haspopup, aria-expanded) opening a menu of menuitems; a split's main part is a plain button):\n - Every action is reachable by keyboard: arrows move, Enter activates, Escape closes and returns focus\n - An overflow control is named for what it holds ('More actions for Acme Corp'), never just '…'\n - A context menu's actions are also reachable another way (an overflow control), since right-click and long-press aren't discoverable\n- **Agents:** Opens the menu by its name and activates an action by its label.\n\n### Card\n\nOne self-contained entity (an account, an order, a place), optionally actionable as a whole.\n\n- **Use when:**\n - Items in a Collection that each represent an entity\n - A single entity summary in a larger surface\n- **Don't use when:**\n - Plain grouping: use Group\n - Tabular data with many attributes: use Table\n- **Rendering:**\n - If 'action' is set, the whole card opens it; controls in children (e.g. a habit's done Toggle) sit above that target and act on their own\n - Uses surface.raised and radius.default\n - 'progress' renders a progress bar with its label or percentage\n- **Accessibility** (role: article (or link/button when it has an action)):\n - Title is the accessible name\n - When actionable, the title is the card's one link; controls inside it (a Toggle, an Action) stay separate targets with their own names\n- **Agents:** Activate the card by its title; use controls inside it by their own labels.\n\n### Chart\n\nA visual summary of data, always paired with a text summary.\n\n- **Use when:**\n - A trend, comparison, share or spread matters more than exact values\n- **Don't use when:**\n - Exact values matter most: use Table or Metric\n - A single number: use Metric\n- **Rendering:**\n - trend → line, comparison → bar, composition → stacked bar (pie only for ≤ 4 parts), distribution → histogram\n - relationship → scatter (x is a measure too), flow → stacked flows from each x value to each series, hierarchy → treemap of the first series, matrix → heatmap of x values by series, range → bars from the first series to the second\n - Series colors use color.data.categorical.N in order; a matrix shades one color by value and prints the value in each cell\n- **Accessibility** (role: img (figure) with the summary as description, plus a data-table alternative):\n - 'summary' states the takeaway in words\n - Series are distinguishable without color (labels, markers)\n - The underlying data is available as a table\n- **Agents:** Reads the summary, and the data through the table alternative.\n\n### Choice\n\nPick one or several options from a known set. The renderer chooses the control.\n\n- **Use when:**\n - Any choice from a known set of options\n- **Don't use when:**\n - On/off setting: use Toggle\n - Picking between rich entities by comparing attributes: use Comparison\n- **Rendering:**\n - single, 2–4 short options → segmented control or radios\n - single, 5–10 → radios (or select on compact screens)\n - single, > 10 → searchable select\n - multiple, ≤ 10 → checkboxes; > 10 → searchable multi-select\n - Option order comes from host data or remembers the last order used\n- **Accessibility** (role: radiogroup / group of checkboxes / listbox / combobox (depends on rendering)):\n - Visible group label\n - Every option has a text label\n- **Agents:** Select options by label.\n\n### Code\n\nCode, a command or preformatted text, shown as written and copyable.\n\n- **Use when:**\n - A command to run, a snippet to paste, an identifier to copy\n - Structured text whose spacing matters\n- **Don't use when:**\n - Prose: use Text\n - Something the person types: use TextInput\n- **Rendering:**\n - type.mono at type.body.small on color.surface.subtle, with radius.control\n - Overflow scrolls sideways unless wrap is set; never clipped\n - The copy control sits in the top-right corner and says 'Copied' for two seconds after use\n- **Accessibility** (role: region named by the label, holding a code element; the copy control is a button named 'Copy <label>'):\n - Text is real text: selectable and read by screen readers line by line\n - Copying is announced ('Copied')\n - A secret is masked with the same length, with a 'Show' control\n- **Agents:** Reads the text verbatim; can activate Copy.\n\n### CodeInput\n\nA one-time code or PIN, typed into one box per character.\n\n- **Use when:**\n - A verification code from email or SMS\n - A PIN or a short recovery code\n- **Don't use when:**\n - A password: the host's own sign-in flow, never a generated screen\n - Any text longer than twelve characters: use TextInput\n- **Rendering:**\n - Boxes are size.control.large squares with radius.control, type.heading.small, centred, in type.mono\n - The active box shows color.border.focus; a filled box shows color.border.strong\n - Boxes are grouped in threes or fours by a wider gap past six characters\n- **Accessibility** (role: a group named by the label; one text input per character, each named 'Digit N of M'):\n - Typing moves focus forward; Backspace moves it back; pasting the whole code fills every box\n - The numeric kind opens the numeric keyboard and accepts autofill of one-time codes\n - Errors are said against the group, not one box\n- **Agents:** Reads the label and length; enters the code.\n\n### Collection\n\nA list of items from host data, each rendered with the same template.\n\n- **Use when:**\n - Browsing a set of similar entities\n - Search results\n- **Don't use when:**\n - Attributes compared across items: use Table or Comparison\n - Choosing an option in a form: use Choice\n- **Rendering:**\n - Long lists are virtualized by the renderer\n - Items keep their order from host data\n - grid: 2 columns on phones, more as width allows; list: one item per row\n - auto: grid when the item template is a Card with media, otherwise list\n - 'timeline' marks each item on a line, newest first, for activity feeds\n - 'carousel' scrolls horizontally with snap points, Previous and Next buttons and an 'N of M' readout; every item stays reachable by keyboard\n - 'calendar' is a month grid with the items on their days; Previous and Next move a month at a time\n - Paging shows items per page, the range and the total, as a Table does\n - Selection shows the bulk-action bar, naming how many items are selected, while any are\n - reorderable: a drag handle per item, plus Move up / Move down buttons; the new order is written to 'order'\n- **Accessibility** (role: list / listitem (listbox when selectable)):\n - Announces the item count\n - An empty state is provided\n- **Agents:** Items are enumerated with their titles; each item exposes its own actions.\n\n### ColorInput\n\nPick a colour: from swatches the host offers, or any colour.\n\n- **Use when:**\n - A colour for a label, a tag, a calendar, a theme\n - Choosing from a set of brand colours\n- **Don't use when:**\n - A choice that happens to be shown as colours (a plan, a size): use Choice\n- **Rendering:**\n - Swatches are size.control.default squares with radius.control and a 1px color.border.default ring; the chosen one shows color.border.focus\n - The free picker is the platform's, with the text value beside it in type.mono\n- **Accessibility** (role: swatches are a radiogroup of radios named by their labels; the free picker is a native color input plus a text field for the value):\n - Every swatch has a name; colour alone is never the only identification\n - The value is editable as text, so it can be typed and read\n - The chosen colour is shown beside its text value\n- **Agents:** Reads the swatch names; picks one by name or types a value.\n\n### Comparison\n\nCompare a few options across the same attributes, and choose one.\n\n- **Use when:**\n - Choosing between 2–4 plans, products, routes or offers\n- **Don't use when:**\n - More than ~5 items: use Table with sorting\n - No decision needed: use Table\n- **Rendering:**\n - Wide: items as columns; compact: one card per item with the same attribute order\n - Best values per attribute are marked when 'better' is set\n - Exactly one item may be recommended; its badge carries recommendedReason\n - Attributes with the same group sit under one heading\n - Boolean values render as a check or a dash with text alternatives ('Included' / 'Not included')\n - On compact surfaces the recommended item comes first\n- **Accessibility** (role: table (items as columns on wide screens) or list of cards):\n - Attribute names are headers\n - 'better' is conveyed in text, not only color\n- **Agents:** Reads attributes per item; choose actions are named with the item title.\n\n### Confirm\n\nAsks the user to confirm a consequential or destructive action, showing what will happen.\n\n- **Use when:**\n - Moving money, deleting data, sending on someone's behalf, anything irreversible\n- **Don't use when:**\n - Routine reversible actions (prefer undo)\n - Information only: use Status\n- **Rendering:**\n - destructive uses color.action.danger.*\n - Capabilities with high risk level must use Confirm (enforced by the verifier)\n - the consequence sits directly above the confirm button\n - amount and subject lead the dialog when set\n - consequences render as an icon list, two columns on wide surfaces\n- **Accessibility** (role: alertdialog):\n - Focus starts on the least destructive option\n - Confirm label repeats the action verb\n - Escape cancels\n- **Agents:** Reads title and consequence; confirm and cancel are named buttons.\n\n### DateInput\n\nA date, time, date-time or date range.\n\n- **Use when:**\n - Any date or time entry\n- **Don't use when:**\n - Relative choices like 'This month / Last month': use Choice\n- **Rendering:**\n - Memorable dates (birthdays) use separate day/month/year fields; near dates use a calendar\n - 'month' and 'year' take only that part; the year field is typed, four digits\n - multiple: each chosen date becomes a chip with a remove control; the field adds another\n- **Accessibility** (role: group of spinbuttons or a date picker dialog):\n - Typing the date is always possible, not only picking from a calendar\n- **Agents:** Fill by label with an ISO date.\n\n### DetailList\n\nLabel/value pairs describing one thing (a summary, a receipt, a review step).\n\n- **Use when:**\n - Reviewing before submitting\n - Showing the attributes of one entity\n - Receipts\n - Fees, prices and totals before someone commits (variant 'receipt')\n- **Don't use when:**\n - Many entities with the same attributes: use Table\n - Comparing entities: use Comparison\n- **Rendering:**\n - Keeps the item order stable across generations (keys are remembered)\n - receipt: values right-aligned in tabular figures, the total row emphasised; people read amounts from the right\n - 'grid' lays fields out in columns by width, label above value\n - rowAction: each row ends with a 'Change' link whose accessible name includes the row's label; the total row has none\n- **Accessibility** (role: list of term/definition pairs (dl)):\n - Label and value are programmatically associated\n- **Agents:** Read each label with its value.\n\n### Disclosure\n\nProgressive disclosure: secondary content hidden behind a toggle.\n\n- **Use when:**\n - Details most people don't need (fees breakdown, advanced options, help text)\n- **Don't use when:**\n - Content everyone needs to complete the task\n - Primary navigation\n- **Rendering:**\n - Never hide required inputs or the primary action inside a closed Disclosure\n- **Accessibility** (role: button (aria-expanded) + region):\n - Summary is a button with expanded state\n - Hidden content is not in the tab order while closed\n- **Agents:** Expand by the summary text; state is exposed as expanded/collapsed.\n\n### FileInput\n\nChoose or drop files to attach or upload.\n\n- **Use when:**\n - Attaching a document, a receipt, a photo\n - Importing a file the product reads\n- **Don't use when:**\n - Taking a photo with the camera: the host's own flow\n - Pasting text: use TextInput\n- **Rendering:**\n - A dashed drop zone on color.surface.subtle with radius.control, the chooser control inside it\n - Each chosen file shows name, size and a remove control; a progress bar while the host uploads\n - Refusals use color.status.danger text under the zone\n- **Accessibility** (role: a native file input, labelled; the drop zone is a large target for the same input):\n - Keyboard opens the chooser; drag-and-drop is an addition, never the only way\n - Chosen files are listed as text with a 'Remove <name>' button each\n - Type and size limits are said before choosing and in any refusal\n- **Agents:** Reads the label and limits; attaches files through the host.\n\n### FilterPanel\n\nFilters for a list of results, with the result count.\n\n- **Use when:**\n - Browsing results people narrow by several attributes\n - More than two filters, or filters that take space (ranges, long lists)\n- **Don't use when:**\n - One or two quick filters: put a Choice (chips) above the results\n - Filling in information: use Form\n- **Rendering:**\n - Wide: filters in a sidebar beside the results\n - Compact: a 'Filters · n' button opens a bottom sheet whose action says 'Show n results'\n - Active filters show as removable chips above the results\n - Filters apply as they change (no separate Apply on wide)\n- **Accessibility** (role: region (filters) plus the results):\n - The result count is announced politely when it changes\n - Each active filter can be removed with a named button ('Remove filter: Desk')\n- **Agents:** Set filter inputs by label; read the result count; remove filters by their Remove buttons.\n\n### Form\n\nCollects inputs and submits them together.\n\n- **Use when:**\n - Any set of inputs that are submitted together\n- **Don't use when:**\n - Settings that apply immediately: use Toggles with actions\n - Several distinct stages: use Steps\n- **Rendering:**\n - One column; labels above fields\n - Submit is the primary action; cancel is secondary\n - Submit context is built from the form's input bindings\n - 'horizontal' becomes stacked on compact surfaces\n - 'aside' sits beside the form on wide surfaces; on compact ones it comes first, before the fields, so people read what they are agreeing to\n- **Accessibility** (role: form):\n - Submit is a real submit button\n - On submit errors, focus moves to an error summary that links to each field\n- **Agents:** Fill fields by label, then activate the submit button by its label.\n\n### Group\n\nVisually groups closely related items without a heading (proximity).\n\n- **Use when:**\n - A few items that belong together (a key figure and its caption, several metrics)\n- **Don't use when:**\n - The group needs a heading: use Section\n - Choosing between items: use Choice or Comparison\n- **Rendering:**\n - 'inline' collapses to a stack below the compact breakpoint\n - Gap uses space.stack.default or space.inline.default\n- **Accessibility** (role: group):\n - Has an accessible name when it contains interactive items\n- **Agents:** Treated as one unit when its label is present.\n\n### Identity\n\nA person, team or organisation: picture, name and details, or several of them together.\n\n- **Use when:**\n - Who something belongs to, was sent by or is assigned to\n - The recipient on a payment, the owner on a record, the members on a team\n - A list of people where the face helps recognition\n- **Don't use when:**\n - Choosing a person from a list: use Choice with avatarPath\n - A person's full record: use Card or DetailList\n- **Rendering:**\n - Initials come from the name's first letters, on a neutral surface with color.text.default; a pack may derive a stable colour from the name\n - Sizes: small 24px, default 40px, large 64px; the name uses type.body.default or type.heading.small for large\n - A group overlaps pictures by a quarter, with a '+N' tag for the rest\n - Images are never stretched; missing images fall back to initials, never to a broken image\n- **Accessibility** (role: group named by the name; the picture is decorative and the name is text):\n - The name is real text, never only an image or initials\n - A group's accessible name lists the first names and how many more\n - With an action, the whole element is one button or link named by the name\n- **Agents:** Reads the name and detail; a group exposes every member's name.\n\n### Media\n\nAn image, video, audio clip, gallery or QR code supplied by the host.\n\n- **Use when:**\n - Photos or illustrations that help identify something (a product, a place, a person)\n - A recording people play, or a code they scan\n- **Don't use when:**\n - Decoration with no information\n - Icons for actions (renderer supplies those)\n- **Rendering:**\n - Images never convey information that is not also in text\n - 'video' shows 'poster' until played; 'audio' is a compact player; both put 'transcript' under a disclosure\n - 'gallery' is a grid of the items' images, each with its own alt text\n - 'qr' is drawn on a canvas at a size that scans from a phone, with the alt as its accessible name\n- **Accessibility** (role: img (video / audio players, list for a gallery)):\n - Has alt text unless decorative (then hidden from assistive technology)\n - Video and audio have native controls and offer a transcript\n - A QR code's alt says what scanning it does\n- **Agents:** Reads the alt text; a gallery's images by their own alt text; a QR code's value.\n\n### Metric\n\nA key figure with a label, and optionally its change.\n\n- **Use when:**\n - One to four headline numbers the user asked about\n- **Don't use when:**\n - Many numbers: use Table or DetailList\n - Trends over time: use Chart\n- **Rendering:**\n - Value uses type.numeric.display\n - Change uses color.data.positive / negative according to 'favorable'\n- **Accessibility** (role: group (label + value)):\n - Change direction is conveyed in text as well as color\n - Screen readers read label, value and change as one sentence\n- **Agents:** Read label and value.\n\n### Navigation\n\nThe product's main navigation.\n\n- **Use when:**\n - Software with sections people move between (B2B apps, dashboards)\n - Only when the host doesn't already provide navigation\n- **Don't use when:**\n - Steps of one task: use Steps\n - Sections of one record: use Views\n - A surface embedded in a host that has its own navigation\n- **Rendering:**\n - Wide: a side navigation with grouped items\n - Compact: a menu button that opens the navigation\n - Badges sit at the end of their item\n - 'breadcrumb' is an ordered trail ending with the current item (aria-current=\"page\"), never behind a menu button\n - 'nested' shows each group as an expandable section; the group holding the current item starts open\n - 'toc' lists the page's sections as anchors, the section in view highlighted\n - 'local' lays the items out as tabs, the current one marked\n- **Accessibility** (role: navigation):\n - The current item carries aria-current=\"page\"\n - Badges say what they count ('12 overdue')\n- **Agents:** Move between sections by activating items by their labels.\n\n### Panel\n\nContent over the current view: a dialog, a drawer, a bottom sheet or a popover, opened from an action and dismissed to return.\n\n- **Use when:**\n - A short task on top of the page: edit one thing, pick one thing, see one record\n - Detail the person asked for that shouldn't replace where they are\n - A small set of options next to the control that opened them (popover)\n- **Don't use when:**\n - Confirming a consequential action: use Confirm, which is a dialog with the right words and order\n - A whole flow of several steps: use Steps on its own surface\n - Passing feedback: use Status\n- **Rendering:**\n - A backdrop of color.surface.inverse at opacity.overlay for modal kinds\n - dialog: max 560px on desktop, full width with space.inset.default on phones; drawer: 420px from the end edge; sheet: from the bottom with radius.large on the top corners; popover: color.surface.overlay with elevation.overlay and an arrow\n - The title is type.heading.medium with the close control at the end of the header\n - The action bar sits in a footer; on phones it is fixed to the bottom, full width\n - Motion uses motion.duration.default and motion.easing.standard; reduced motion fades instead\n- **Accessibility** (role: dialog (aria-modal for dialog, drawer and sheet) named by the title; popover is a non-modal dialog):\n - Focus moves into the panel on open and back to the opener on close\n - Tab stays inside a modal panel; Escape dismisses a dismissible one\n - The page behind a modal panel is inert\n - A sheet can be dismissed by dragging down as well as by the close control\n- **Agents:** Opens, reads the content and closes it by name; the footer actions are exposed like any ActionBar.\n\n### Progress\n\nHow far along something is, or how much of a bounded amount is used: a bar, a ring or a meter.\n\n- **Use when:**\n - A task that takes time, with a known share done\n - How much of a quota, budget or capacity is used\n - Progress towards a goal (pages read, steps walked)\n- **Don't use when:**\n - A number the person came to see: use Metric\n - Steps of a task the person moves through: use Steps\n - A short wait with nothing to measure: Status 'loading'\n- **Rendering:**\n - The track uses color.surface.subtle; the fill uses color.action.primary.background, or color.status.<tone>.emphasis for a toned meter\n - Height is size.control.small / 3 for a bar; a ring is size.control.default across\n - Readout in tabular figures, type.body.small, after the label\n - The bar's length means the fraction: never used for an amount with no bound\n- **Accessibility** (role: progressbar (bar, ring) or meter, named by the label, with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext):\n - The readout is real text next to the graphic, never only the fill\n - A meter's tone is also said in text ('nearly full'), not only shown by colour\n - Indeterminate progress has no value attributes and is announced as busy\n- **Agents:** Reads label, value and max as text.\n\n### RangeInput\n\nA number, or a range between two numbers, within known bounds.\n\n- **Use when:**\n - Approximate values within a range (budget cap, volume)\n - A price or date range for filtering (mode 'range')\n- **Don't use when:**\n - Exact values: use TextInput with kind 'number' or 'currency'\n- **Rendering:**\n - Shows min, max and the current formatted value\n - mode 'range' shows two thumbs and min/max fields that stay in sync\n- **Accessibility** (role: slider):\n - Current value is shown as text\n - Keyboard arrows change the value by step\n- **Agents:** Set the value directly by label.\n\n### Rating\n\nA score out of N: given by the person, or shown as others gave it.\n\n- **Use when:**\n - Asking how something went, out of five\n - Showing a product's or place's rating with the count behind it\n- **Don't use when:**\n - A number within bounds that isn't a score: use RangeInput\n - Yes or no: use Toggle or Choice\n- **Rendering:**\n - Filled shapes use color.status.warning.emphasis; empty ones use color.border.default\n - The readout ('4.6') is shown after the shapes in tabular figures, with the count in color.text.muted\n - A rating that can be given shows the label above, like every input\n- **Accessibility** (role: radiogroup of radios named '1 star' to 'N stars' when it can be given; an image named '4.6 out of 5' when read-only):\n - Every star is a real control at size.target.min when the person can rate\n - The current value is announced; half values are said as such\n - Read-only ratings carry the score as text, not only as filled shapes\n- **Agents:** Reads the score and the count; sets a score by choosing '<n> stars'.\n\n### Section\n\nA titled region of the surface that groups related content under a heading.\n\n- **Use when:**\n - The surface has two or more distinct topics (e.g. 'Recipient' and 'Amount')\n - Content would otherwise exceed one screen and needs signposting\n- **Don't use when:**\n - Only one topic: put content directly under the root\n - Visual grouping without a heading: use Group\n- **Rendering:**\n - Heading level follows nesting depth, never chosen by the model\n - Spacing between sections uses space.stack.section\n- **Accessibility** (role: region (with heading)):\n - Title is rendered as a real heading; nesting depth sets the heading level\n - Title is the region's accessible name\n- **Agents:** Navigate by heading; the title names the region.\n\n### Status\n\nFeedback about state: info, success, warning, error, empty or loading.\n\n- **Use when:**\n - Results of an action\n - Empty collections\n - Errors with a way to recover\n - Loading states\n - 'undo': after a reversible action ran, say what happened and offer Undo instead of asking first\n- **Don't use when:**\n - Validation errors on a field: inputs show their own errors\n - Confirmation before acting: use Confirm\n- **Rendering:**\n - error and warning use color.status.* tokens and an icon\n - empty states explain why and what to do next\n - loading shows a skeleton when layout is known, otherwise a progress indicator\n - 'undo' renders as a snackbar at the bottom of the surface, announced politely, with the Undo action\n - Empty states may carry an ActionBar: one primary and one secondary action\n - 'inline' renders a bordered notice with its action on the right\n- **Accessibility** (role: status or alert (live region)):\n - success/info/loading are polite live regions; error is assertive\n - Meaning is in text, not only color or icon\n- **Agents:** Reads the title and message; the recovery action is exposed.\n\n### Steps\n\nA task split into ordered steps with visible progress.\n\n- **Use when:**\n - Tasks with dependent stages or too many inputs for one view (checkout, onboarding)\n- **Don't use when:**\n - Independent views: use Views\n - Under ~6 inputs: a single Form\n- **Rendering:**\n - Renderer provides Back (ui.back) and Next (ui.next); the last step shows 'finish'\n - Each step validates before moving on\n - 'tasklist' is a list of tasks with a status tag each (GOV.UK task list); a task opens its content in place, and 'finish' follows the list, saying how many are done\n - 'guide' shows every step's title and content in a numbered list, with 'finish' after the last\n- **Accessibility** (role: group with step progress (aria-current on the current step)):\n - Current step and total are announced\n - Back never loses entered data\n- **Agents:** Reads 'step N of M'; next/back are exposed as buttons.\n\n### Table\n\nTabular data: many items sharing the same attributes.\n\n- **Use when:**\n - Scanning or comparing many rows by several attributes\n - Records people scan, sort, select and act on in bulk (B2B lists)\n- **Don't use when:**\n - One entity: use DetailList\n - A few entities where the user must choose: use Comparison\n- **Rendering:**\n - On compact screens, rows become stacked cards with label/value pairs\n - Alignment follows the column format, never chosen by the model\n - Numbers and currency are right-aligned with tabular figures; 'status' renders as a tag using 'tones'\n - On compact surfaces the table becomes a list of rows: the entity, the key fields in one line, and the status\n - Selection replaces the toolbar with the bulk-action bar while rows are selected\n - Paging shows rows per page, the range and the total\n - expandable: each row starts with a toggle (aria-expanded) named after the row; the open row's 'detail' spans the table beneath it\n- **Accessibility** (role: table with caption and column headers):\n - Has a caption\n - Column headers are real header cells\n - Numeric columns are right-aligned by format\n - Sortable headers carry aria-sort and say what sorting does\n - The select-all checkbox is mixed when some rows are selected\n - The bulk-action bar names how many rows are selected, announced politely\n - Each row's action menu is named after its row\n- **Agents:** Read by row and column headers; rows with rowAction are activatable. Sort by activating a column header; select rows by their checkboxes; act in bulk from the bar that appears.\n\n### Tag\n\nA short label, status or count attached to something else.\n\n- **Use when:**\n - The state of a record, next to its name: 'Past due', 'Draft', 'Live'\n - A category or label a thing carries\n - How many of something, on a navigation item or a section heading\n - Chosen items a person can take off again\n- **Don't use when:**\n - A whole sentence of feedback: use Status\n - Something the person switches on or off: use Toggle\n - A metric the person came for: use Metric\n- **Rendering:**\n - status uses color.status.<tone>.background and .foreground; label and count use neutral tokens\n - count is set in tabular figures\n - A tag never wraps: long labels are truncated with the full text on hover and in the accessible name\n - Fits inline with text and in a Card header; radius.small unless the pack sets a pill\n- **Accessibility** (role: text; for 'count', the label is the accessible name of the number; for a removable tag, a button named 'Remove <label>'):\n - Tone is conveyed by the label, never only by colour\n - A count reads as '<label>: <count>' to a screen reader\n - The remove control is at least size.target.min and named for what it removes\n- **Agents:** Reads label, tone and count; can activate the remove control by its name.\n\n### Text\n\nA run of text.\n\n- **Use when:**\n - Explanations, instructions, messages\n- **Don't use when:**\n - Headings: use Section title\n - Label/value pairs: use DetailList\n - Key figures: use Metric\n- **Rendering:**\n - 'supporting' uses color.text.muted\n - No inline styling; emphasis comes from structure\n - 'rich' renders only the four markup forms, as real elements; anything else, including HTML, is shown as typed, and only http, https, mailto and tel links are live\n - 'list' renders a ul or ol; entries are shown as text, or by 'itemPath' when they are objects\n - 'quote' is a blockquote, the cite on its own line after it\n - format 'color' shows a swatch of the value beside it; 'bytes' shows a size like 1.2 MB\n- **Accessibility** (role: text):\n - Body text is at least 16px (type.body.default)\n - Line length is capped by measure.max\n- **Agents:** Read as text.\n\n### TextInput\n\nA single text-like value: text, number, email, phone, currency, search or long text.\n\n- **Use when:**\n - Free-form values the user types\n- **Don't use when:**\n - A value from a known set: use Choice\n - Dates: use DateInput\n - Secrets (passwords, card numbers): not generated; hosts provide their own secure flows\n- **Rendering:**\n - Width suggests expected length\n - Errors appear after the user leaves the field or submits, not while typing\n - kind 'search' renders as a pill search field with an icon; the label stays as its accessible name\n - size 'hero' renders a large centred amount with the currency symbol dimmed\n - 'suggestions' and 'mentions' are comboboxes: the list opens as you type, arrow keys move through it, Enter takes an option, Escape closes it\n - 'richtext' is an editable area with Bold, Italic and List controls; the value is text with **bold**, *italic* and '- ' items\n - 'tags' shows each value as a chip with a remove control; Enter or a comma adds what was typed, Backspace in an empty field removes the last chip; the value is a list of strings\n - 'code' uses type.numeric (monospace) and turns off autocorrect, autocapitalize and spellcheck\n - 'masked' fills the mask's literal characters as you type and stores the text as shown\n - 'inline' renders the value as text with an Edit control; Enter saves, Escape restores the previous value\n- **Accessibility** (role: textbox / searchbox / spinbutton):\n - Visible label, never placeholder-only\n - Help and errors are associated with the field\n - Kind sets the right keyboard and autocomplete\n- **Agents:** Fill by label.\n\n### Toggle\n\nAn on/off setting.\n\n- **Use when:**\n - Settings that take effect immediately\n - A single yes/no inside a form\n- **Don't use when:**\n - Choosing between named options: use Choice\n- **Rendering:**\n - With 'action' it renders as a switch; inside a Form without action, as a checkbox\n- **Accessibility** (role: switch (immediate) / checkbox (in a form)):\n - Label says what 'on' means\n- **Agents:** Toggle by label; state is exposed as on/off.\n\n### Tree\n\nA hierarchy people expand, browse and pick from: folders, an org chart, nested categories.\n\n- **Use when:**\n - Things that contain things: folders and files, an organisation, nested categories\n - Picking a place in a hierarchy (move to folder, choose a category)\n- **Don't use when:**\n - A flat list, however long: use Collection or Table\n - Nested navigation of the product itself: use Navigation\n - Progressive disclosure of one section: use Disclosure\n- **Rendering:**\n - Indent per level uses space.inline.default; the expander is a chevron at size.target.min\n - Leaves have no expander and align with siblings' labels\n - Selection uses color.selection.background; the focused node shows color.border.focus\n - Beyond 200 nodes the renderer virtualises rows\n- **Accessibility** (role: tree with treeitem nodes; aria-expanded on nodes with children, aria-selected when selectable):\n - Arrow keys move and expand; Home and End jump; typing jumps to a label\n - Level and position are exposed (aria-level, aria-setsize, aria-posinset)\n - Expanded state is announced; selection is announced\n- **Agents:** Reads every node by label and level; expands a node by name and selects or activates one by name.\n\n### Views\n\nSwitch between alternative views of the same subject (tabs).\n\n- **Use when:**\n - 2–6 peer views of the same data (Overview / Transactions / Settings)\n- **Don't use when:**\n - Sequential steps: use Steps\n - Filtering one list: use Choice\n- **Rendering:**\n - More than 4 views on compact screens become a menu or scrollable tabs\n - Counts sit beside their labels and are part of the tab's accessible name\n- **Accessibility** (role: tablist / tab / tabpanel):\n - Each tab has a visible label\n - Arrow keys move between tabs\n- **Agents:** Select a view by its label.\n",
|
|
9
9
|
"components": {
|
|
10
10
|
"Action": {
|
|
11
11
|
"type": "object",
|
|
@@ -42,6 +42,19 @@
|
|
|
42
42
|
},
|
|
43
43
|
"disabled": {
|
|
44
44
|
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
45
|
+
},
|
|
46
|
+
"description": {
|
|
47
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
48
|
+
"description": "A second line under the label saying what the action does, for menu-like actions"
|
|
49
|
+
},
|
|
50
|
+
"copy": {
|
|
51
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
52
|
+
"description": "For the renderer action ui.copy: the text put on the clipboard; otherwise the action context's 'text' is copied"
|
|
53
|
+
},
|
|
54
|
+
"shortcut": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^((mod|ctrl|alt|shift)\\+){0,3}([a-z0-9]|enter|escape|space|tab|backspace|delete|arrowup|arrowdown|arrowleft|arrowright|home|end|f[1-9]|f1[0-2]|slash|comma|period)$",
|
|
57
|
+
"description": "Keyboard shortcut that triggers the action while the surface has focus, e.g. \"mod+enter\" or \"shift+d\". 'mod' is Command on Apple platforms and Control elsewhere. The renderer shows the hint beside the label and never binds it outside the surface."
|
|
45
58
|
}
|
|
46
59
|
},
|
|
47
60
|
"required": [
|
|
@@ -96,6 +109,61 @@
|
|
|
96
109
|
}
|
|
97
110
|
}
|
|
98
111
|
},
|
|
112
|
+
"ActionMenu": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"description": "Secondary actions behind one control: an overflow menu, a dropdown, a split button or a context menu.",
|
|
115
|
+
"properties": {
|
|
116
|
+
"component": {
|
|
117
|
+
"const": "ActionMenu"
|
|
118
|
+
},
|
|
119
|
+
"visible": {
|
|
120
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
121
|
+
"description": "Hide the component when false"
|
|
122
|
+
},
|
|
123
|
+
"label": {
|
|
124
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
125
|
+
"description": "The control's name: 'More actions' for an overflow, or the verb for a dropdown ('Export')"
|
|
126
|
+
},
|
|
127
|
+
"kind": {
|
|
128
|
+
"enum": [
|
|
129
|
+
"overflow",
|
|
130
|
+
"dropdown",
|
|
131
|
+
"split",
|
|
132
|
+
"context"
|
|
133
|
+
],
|
|
134
|
+
"default": "overflow",
|
|
135
|
+
"description": "'overflow' is the '…' control; 'dropdown' is a labelled button that opens the menu; 'split' pairs a primary action with a menu of alternatives; 'context' opens on right-click or long-press of the component it belongs to"
|
|
136
|
+
},
|
|
137
|
+
"children": {
|
|
138
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
139
|
+
"type": "array",
|
|
140
|
+
"minItems": 1,
|
|
141
|
+
"description": "The Actions in the menu, in order; a danger-toned one goes last and is separated"
|
|
142
|
+
},
|
|
143
|
+
"primary": {
|
|
144
|
+
"$ref": "common_types.json#/$defs/ComponentId",
|
|
145
|
+
"description": "For 'split': the Action that runs when the main part is pressed"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"required": [
|
|
149
|
+
"component",
|
|
150
|
+
"label",
|
|
151
|
+
"children"
|
|
152
|
+
],
|
|
153
|
+
"allowedChildren": [
|
|
154
|
+
"Action"
|
|
155
|
+
],
|
|
156
|
+
"metadata": {
|
|
157
|
+
"extensions": {
|
|
158
|
+
"com_polyxd": {
|
|
159
|
+
"category": "action",
|
|
160
|
+
"target": "custom",
|
|
161
|
+
"basicAnalog": "Column of Button",
|
|
162
|
+
"why": "A column of buttons is not a menu: it loses the single trigger, its accessible name, the split primary and the context kind."
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
99
167
|
"Card": {
|
|
100
168
|
"type": "object",
|
|
101
169
|
"description": "One self-contained entity (an account, an order, a place), optionally actionable as a whole.",
|
|
@@ -186,11 +254,17 @@
|
|
|
186
254
|
"allowedChildren": [
|
|
187
255
|
"Action",
|
|
188
256
|
"ActionBar",
|
|
257
|
+
"ActionMenu",
|
|
258
|
+
"Code",
|
|
189
259
|
"DetailList",
|
|
190
260
|
"Group",
|
|
261
|
+
"Identity",
|
|
191
262
|
"Media",
|
|
192
263
|
"Metric",
|
|
264
|
+
"Progress",
|
|
265
|
+
"Rating",
|
|
193
266
|
"Status",
|
|
267
|
+
"Tag",
|
|
194
268
|
"Text",
|
|
195
269
|
"Toggle"
|
|
196
270
|
],
|
|
@@ -221,9 +295,14 @@
|
|
|
221
295
|
"trend",
|
|
222
296
|
"comparison",
|
|
223
297
|
"composition",
|
|
224
|
-
"distribution"
|
|
298
|
+
"distribution",
|
|
299
|
+
"relationship",
|
|
300
|
+
"flow",
|
|
301
|
+
"hierarchy",
|
|
302
|
+
"matrix",
|
|
303
|
+
"range"
|
|
225
304
|
],
|
|
226
|
-
"description": "What the chart should communicate; the renderer picks the chart type"
|
|
305
|
+
"description": "What the chart should communicate; the renderer picks the chart type. 'relationship' between two measures; 'flow' of amounts from each x value into the series; 'hierarchy' of parts by size; 'matrix' of x values against series; 'range' from the first series to the second"
|
|
227
306
|
},
|
|
228
307
|
"data": {
|
|
229
308
|
"type": "object",
|
|
@@ -278,7 +357,9 @@
|
|
|
278
357
|
"time",
|
|
279
358
|
"datetime",
|
|
280
359
|
"relativeTime",
|
|
281
|
-
"duration"
|
|
360
|
+
"duration",
|
|
361
|
+
"color",
|
|
362
|
+
"bytes"
|
|
282
363
|
]
|
|
283
364
|
},
|
|
284
365
|
"currency": {
|
|
@@ -337,7 +418,9 @@
|
|
|
337
418
|
"time",
|
|
338
419
|
"datetime",
|
|
339
420
|
"relativeTime",
|
|
340
|
-
"duration"
|
|
421
|
+
"duration",
|
|
422
|
+
"color",
|
|
423
|
+
"bytes"
|
|
341
424
|
]
|
|
342
425
|
},
|
|
343
426
|
"currency": {
|
|
@@ -517,6 +600,132 @@
|
|
|
517
600
|
}
|
|
518
601
|
}
|
|
519
602
|
},
|
|
603
|
+
"Code": {
|
|
604
|
+
"type": "object",
|
|
605
|
+
"description": "Code, a command or preformatted text, shown as written and copyable.",
|
|
606
|
+
"properties": {
|
|
607
|
+
"component": {
|
|
608
|
+
"const": "Code"
|
|
609
|
+
},
|
|
610
|
+
"visible": {
|
|
611
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
612
|
+
"description": "Hide the component when false"
|
|
613
|
+
},
|
|
614
|
+
"text": {
|
|
615
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
616
|
+
"description": "The code itself, usually bound to host data (an API key, a command, a snippet)"
|
|
617
|
+
},
|
|
618
|
+
"label": {
|
|
619
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
620
|
+
"description": "What it is, shown above: 'Install', 'Your API key'"
|
|
621
|
+
},
|
|
622
|
+
"language": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"description": "A language name for highlighting, when the renderer has it: 'bash', 'json', 'ts'"
|
|
625
|
+
},
|
|
626
|
+
"copyable": {
|
|
627
|
+
"type": "boolean",
|
|
628
|
+
"default": true,
|
|
629
|
+
"description": "A Copy control beside it"
|
|
630
|
+
},
|
|
631
|
+
"wrap": {
|
|
632
|
+
"type": "boolean",
|
|
633
|
+
"default": false,
|
|
634
|
+
"description": "Wrap long lines instead of scrolling sideways"
|
|
635
|
+
},
|
|
636
|
+
"secret": {
|
|
637
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
638
|
+
"default": false,
|
|
639
|
+
"description": "Masked until revealed: a key shown once"
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
"required": [
|
|
643
|
+
"component",
|
|
644
|
+
"text"
|
|
645
|
+
],
|
|
646
|
+
"metadata": {
|
|
647
|
+
"extensions": {
|
|
648
|
+
"com_polyxd": {
|
|
649
|
+
"category": "content",
|
|
650
|
+
"target": "custom",
|
|
651
|
+
"basicAnalog": "Text",
|
|
652
|
+
"why": "Text loses preformatting, the language, the copy control and the secret mask."
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"CodeInput": {
|
|
658
|
+
"type": "object",
|
|
659
|
+
"description": "A one-time code or PIN, typed into one box per character.",
|
|
660
|
+
"properties": {
|
|
661
|
+
"component": {
|
|
662
|
+
"const": "CodeInput"
|
|
663
|
+
},
|
|
664
|
+
"visible": {
|
|
665
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
666
|
+
"description": "Hide the component when false"
|
|
667
|
+
},
|
|
668
|
+
"label": {
|
|
669
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
670
|
+
"description": "'Enter the code we emailed you'"
|
|
671
|
+
},
|
|
672
|
+
"value": {
|
|
673
|
+
"type": "object",
|
|
674
|
+
"required": [
|
|
675
|
+
"path"
|
|
676
|
+
],
|
|
677
|
+
"properties": {
|
|
678
|
+
"path": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
681
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"additionalProperties": false,
|
|
685
|
+
"description": "The code so far in host data, as a string"
|
|
686
|
+
},
|
|
687
|
+
"length": {
|
|
688
|
+
"type": "integer",
|
|
689
|
+
"minimum": 4,
|
|
690
|
+
"maximum": 12,
|
|
691
|
+
"default": 6
|
|
692
|
+
},
|
|
693
|
+
"kind": {
|
|
694
|
+
"enum": [
|
|
695
|
+
"numeric",
|
|
696
|
+
"alphanumeric"
|
|
697
|
+
],
|
|
698
|
+
"default": "numeric"
|
|
699
|
+
},
|
|
700
|
+
"help": {
|
|
701
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
702
|
+
"description": "Where the code came from and how long it lasts"
|
|
703
|
+
},
|
|
704
|
+
"required": {
|
|
705
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
706
|
+
"default": true
|
|
707
|
+
},
|
|
708
|
+
"action": {
|
|
709
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
710
|
+
"description": "Runs when every character is in, so the person needn't press a button; context binds to value"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"required": [
|
|
714
|
+
"component",
|
|
715
|
+
"label",
|
|
716
|
+
"value"
|
|
717
|
+
],
|
|
718
|
+
"metadata": {
|
|
719
|
+
"extensions": {
|
|
720
|
+
"com_polyxd": {
|
|
721
|
+
"category": "input",
|
|
722
|
+
"target": "custom",
|
|
723
|
+
"basicAnalog": "TextField",
|
|
724
|
+
"why": "TextField loses the one-box-per-character entry, the length, the numeric kind and the complete action."
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
},
|
|
520
729
|
"Collection": {
|
|
521
730
|
"type": "object",
|
|
522
731
|
"description": "A list of items from host data, each rendered with the same template.",
|
|
@@ -569,10 +778,97 @@
|
|
|
569
778
|
"auto",
|
|
570
779
|
"list",
|
|
571
780
|
"grid",
|
|
572
|
-
"timeline"
|
|
781
|
+
"timeline",
|
|
782
|
+
"carousel",
|
|
783
|
+
"calendar"
|
|
573
784
|
],
|
|
574
785
|
"default": "auto",
|
|
575
|
-
"description": "'grid' for visual items (products, books); 'list' for rows; 'timeline' for dated activity; 'auto' lets the renderer choose from the item template"
|
|
786
|
+
"description": "'grid' for visual items (products, books); 'list' for rows; 'timeline' for dated activity; 'carousel' for a row people page through; 'calendar' places items on a month grid by 'datePath'; 'auto' lets the renderer choose from the item template"
|
|
787
|
+
},
|
|
788
|
+
"datePath": {
|
|
789
|
+
"type": "string",
|
|
790
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
791
|
+
"description": "For 'calendar': relative path in each item to the ISO date that places it"
|
|
792
|
+
},
|
|
793
|
+
"page": {
|
|
794
|
+
"type": "object",
|
|
795
|
+
"properties": {
|
|
796
|
+
"index": {
|
|
797
|
+
"type": "object",
|
|
798
|
+
"required": [
|
|
799
|
+
"path"
|
|
800
|
+
],
|
|
801
|
+
"properties": {
|
|
802
|
+
"path": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
805
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"additionalProperties": false,
|
|
809
|
+
"description": "1-based page number in host data"
|
|
810
|
+
},
|
|
811
|
+
"size": {
|
|
812
|
+
"type": "object",
|
|
813
|
+
"required": [
|
|
814
|
+
"path"
|
|
815
|
+
],
|
|
816
|
+
"properties": {
|
|
817
|
+
"path": {
|
|
818
|
+
"type": "string",
|
|
819
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
820
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
"additionalProperties": false,
|
|
824
|
+
"description": "A value read from (and, for inputs, written to) host data. Data always comes from the host; the model never invents it."
|
|
825
|
+
},
|
|
826
|
+
"total": {
|
|
827
|
+
"type": "object",
|
|
828
|
+
"required": [
|
|
829
|
+
"path"
|
|
830
|
+
],
|
|
831
|
+
"properties": {
|
|
832
|
+
"path": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
835
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"additionalProperties": false,
|
|
839
|
+
"description": "Total number of items, all pages"
|
|
840
|
+
},
|
|
841
|
+
"action": {
|
|
842
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
843
|
+
"description": "Sent when someone changes page or page size"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"additionalProperties": false,
|
|
847
|
+
"description": "Paging state, owned by the host"
|
|
848
|
+
},
|
|
849
|
+
"bulkActions": {
|
|
850
|
+
"$ref": "common_types.json#/$defs/ComponentId",
|
|
851
|
+
"description": "ActionBar shown while items are selected (selection 'multiple')"
|
|
852
|
+
},
|
|
853
|
+
"reorderable": {
|
|
854
|
+
"type": "boolean",
|
|
855
|
+
"default": false,
|
|
856
|
+
"description": "People can drag items, or move them with the keyboard, into a new order"
|
|
857
|
+
},
|
|
858
|
+
"order": {
|
|
859
|
+
"type": "object",
|
|
860
|
+
"required": [
|
|
861
|
+
"path"
|
|
862
|
+
],
|
|
863
|
+
"properties": {
|
|
864
|
+
"path": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
867
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
"additionalProperties": false,
|
|
871
|
+
"description": "Item values (ids) in the order people put them, written when reorderable"
|
|
576
872
|
}
|
|
577
873
|
},
|
|
578
874
|
"required": [
|
|
@@ -591,18 +887,21 @@
|
|
|
591
887
|
}
|
|
592
888
|
}
|
|
593
889
|
},
|
|
594
|
-
"
|
|
890
|
+
"ColorInput": {
|
|
595
891
|
"type": "object",
|
|
596
|
-
"description": "
|
|
892
|
+
"description": "Pick a colour: from swatches the host offers, or any colour.",
|
|
597
893
|
"properties": {
|
|
598
894
|
"component": {
|
|
599
|
-
"const": "
|
|
895
|
+
"const": "ColorInput"
|
|
600
896
|
},
|
|
601
897
|
"visible": {
|
|
602
898
|
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
603
899
|
"description": "Hide the component when false"
|
|
604
900
|
},
|
|
605
|
-
"
|
|
901
|
+
"label": {
|
|
902
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
903
|
+
},
|
|
904
|
+
"value": {
|
|
606
905
|
"type": "object",
|
|
607
906
|
"required": [
|
|
608
907
|
"path"
|
|
@@ -615,38 +914,179 @@
|
|
|
615
914
|
}
|
|
616
915
|
},
|
|
617
916
|
"additionalProperties": false,
|
|
618
|
-
"description": "
|
|
619
|
-
},
|
|
620
|
-
"itemTitle": {
|
|
621
|
-
"type": "string",
|
|
622
|
-
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
623
|
-
"description": "Relative path to each item's name"
|
|
917
|
+
"description": "The colour in host data, as CSS text in the chosen format"
|
|
624
918
|
},
|
|
625
|
-
"
|
|
626
|
-
"
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
919
|
+
"swatches": {
|
|
920
|
+
"oneOf": [
|
|
921
|
+
{
|
|
922
|
+
"type": "array",
|
|
923
|
+
"minItems": 2,
|
|
924
|
+
"items": {
|
|
925
|
+
"type": "object",
|
|
926
|
+
"required": [
|
|
927
|
+
"value",
|
|
928
|
+
"label"
|
|
929
|
+
],
|
|
930
|
+
"properties": {
|
|
931
|
+
"value": {
|
|
932
|
+
"type": [
|
|
933
|
+
"string",
|
|
934
|
+
"number",
|
|
935
|
+
"boolean"
|
|
936
|
+
]
|
|
937
|
+
},
|
|
938
|
+
"label": {
|
|
939
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
940
|
+
},
|
|
941
|
+
"description": {
|
|
942
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
"additionalProperties": false
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"type": "object",
|
|
950
|
+
"required": [
|
|
951
|
+
"path",
|
|
952
|
+
"valuePath",
|
|
953
|
+
"labelPath"
|
|
954
|
+
],
|
|
955
|
+
"properties": {
|
|
956
|
+
"path": {
|
|
957
|
+
"type": "string",
|
|
958
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
959
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
960
|
+
},
|
|
961
|
+
"valuePath": {
|
|
962
|
+
"type": "string",
|
|
963
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
964
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
965
|
+
},
|
|
966
|
+
"labelPath": {
|
|
967
|
+
"type": "string",
|
|
968
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
969
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
970
|
+
},
|
|
971
|
+
"descriptionPath": {
|
|
972
|
+
"type": "string",
|
|
973
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
974
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
975
|
+
},
|
|
976
|
+
"avatarPath": {
|
|
977
|
+
"type": "string",
|
|
978
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
979
|
+
"description": "Initials or a media reference per option: renders people and places with a face"
|
|
980
|
+
},
|
|
981
|
+
"imagePath": {
|
|
982
|
+
"type": "string",
|
|
983
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
984
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
985
|
+
},
|
|
986
|
+
"recentPath": {
|
|
987
|
+
"type": "string",
|
|
988
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
989
|
+
"description": "Boolean per option: shown in a 'Recent' row above the full list"
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
"additionalProperties": false
|
|
993
|
+
}
|
|
994
|
+
],
|
|
995
|
+
"description": "Named colours to pick from (value is the colour, label its name); without them the full picker shows"
|
|
996
|
+
},
|
|
997
|
+
"format": {
|
|
998
|
+
"enum": [
|
|
999
|
+
"hex",
|
|
1000
|
+
"rgb",
|
|
1001
|
+
"hsl"
|
|
1002
|
+
],
|
|
1003
|
+
"default": "hex"
|
|
1004
|
+
},
|
|
1005
|
+
"alpha": {
|
|
1006
|
+
"type": "boolean",
|
|
1007
|
+
"default": false,
|
|
1008
|
+
"description": "Let the person set opacity too"
|
|
1009
|
+
},
|
|
1010
|
+
"help": {
|
|
1011
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1012
|
+
},
|
|
1013
|
+
"required": {
|
|
1014
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1015
|
+
"default": false
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
"required": [
|
|
1019
|
+
"component",
|
|
1020
|
+
"label",
|
|
1021
|
+
"value"
|
|
1022
|
+
],
|
|
1023
|
+
"metadata": {
|
|
1024
|
+
"extensions": {
|
|
1025
|
+
"com_polyxd": {
|
|
1026
|
+
"category": "input",
|
|
1027
|
+
"target": "custom",
|
|
1028
|
+
"basicAnalog": "none",
|
|
1029
|
+
"why": "Basic has no colour input; swatches with names and the format would be lost."
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
"Comparison": {
|
|
1035
|
+
"type": "object",
|
|
1036
|
+
"description": "Compare a few options across the same attributes, and choose one.",
|
|
1037
|
+
"properties": {
|
|
1038
|
+
"component": {
|
|
1039
|
+
"const": "Comparison"
|
|
1040
|
+
},
|
|
1041
|
+
"visible": {
|
|
1042
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1043
|
+
"description": "Hide the component when false"
|
|
1044
|
+
},
|
|
1045
|
+
"items": {
|
|
1046
|
+
"type": "object",
|
|
1047
|
+
"required": [
|
|
1048
|
+
"path"
|
|
1049
|
+
],
|
|
1050
|
+
"properties": {
|
|
1051
|
+
"path": {
|
|
1052
|
+
"type": "string",
|
|
1053
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1054
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"additionalProperties": false,
|
|
1058
|
+
"description": "Array of options in host data (2–4 recommended)"
|
|
1059
|
+
},
|
|
1060
|
+
"itemTitle": {
|
|
1061
|
+
"type": "string",
|
|
1062
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1063
|
+
"description": "Relative path to each item's name"
|
|
1064
|
+
},
|
|
1065
|
+
"attributes": {
|
|
1066
|
+
"type": "array",
|
|
1067
|
+
"minItems": 1,
|
|
1068
|
+
"maxItems": 8,
|
|
1069
|
+
"items": {
|
|
1070
|
+
"type": "object",
|
|
1071
|
+
"required": [
|
|
1072
|
+
"key",
|
|
1073
|
+
"label",
|
|
1074
|
+
"path"
|
|
1075
|
+
],
|
|
1076
|
+
"properties": {
|
|
1077
|
+
"key": {
|
|
1078
|
+
"type": "string",
|
|
1079
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$",
|
|
1080
|
+
"description": "Stable semantic key (e.g. 'fee', 'recipient.name'). The same thing gets the same key across generations; interface memory uses it to keep placement, order and labels consistent."
|
|
1081
|
+
},
|
|
1082
|
+
"label": {
|
|
1083
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1084
|
+
},
|
|
1085
|
+
"path": {
|
|
1086
|
+
"type": "string",
|
|
1087
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1088
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
1089
|
+
},
|
|
650
1090
|
"format": {
|
|
651
1091
|
"type": "object",
|
|
652
1092
|
"required": [
|
|
@@ -663,7 +1103,9 @@
|
|
|
663
1103
|
"time",
|
|
664
1104
|
"datetime",
|
|
665
1105
|
"relativeTime",
|
|
666
|
-
"duration"
|
|
1106
|
+
"duration",
|
|
1107
|
+
"color",
|
|
1108
|
+
"bytes"
|
|
667
1109
|
]
|
|
668
1110
|
},
|
|
669
1111
|
"currency": {
|
|
@@ -847,7 +1289,9 @@
|
|
|
847
1289
|
"time",
|
|
848
1290
|
"datetime",
|
|
849
1291
|
"relativeTime",
|
|
850
|
-
"duration"
|
|
1292
|
+
"duration",
|
|
1293
|
+
"color",
|
|
1294
|
+
"bytes"
|
|
851
1295
|
]
|
|
852
1296
|
},
|
|
853
1297
|
"currency": {
|
|
@@ -975,9 +1419,17 @@
|
|
|
975
1419
|
"date",
|
|
976
1420
|
"time",
|
|
977
1421
|
"datetime",
|
|
978
|
-
"dateRange"
|
|
1422
|
+
"dateRange",
|
|
1423
|
+
"month",
|
|
1424
|
+
"year"
|
|
979
1425
|
],
|
|
980
|
-
"default": "date"
|
|
1426
|
+
"default": "date",
|
|
1427
|
+
"description": "'month' stores YYYY-MM and 'year' stores YYYY"
|
|
1428
|
+
},
|
|
1429
|
+
"multiple": {
|
|
1430
|
+
"type": "boolean",
|
|
1431
|
+
"default": false,
|
|
1432
|
+
"description": "Several dates rather than one; the value is a list"
|
|
981
1433
|
},
|
|
982
1434
|
"min": {
|
|
983
1435
|
"$ref": "common_types.json#/$defs/DynamicString"
|
|
@@ -1057,7 +1509,9 @@
|
|
|
1057
1509
|
"time",
|
|
1058
1510
|
"datetime",
|
|
1059
1511
|
"relativeTime",
|
|
1060
|
-
"duration"
|
|
1512
|
+
"duration",
|
|
1513
|
+
"color",
|
|
1514
|
+
"bytes"
|
|
1061
1515
|
]
|
|
1062
1516
|
},
|
|
1063
1517
|
"currency": {
|
|
@@ -1099,6 +1553,10 @@
|
|
|
1099
1553
|
],
|
|
1100
1554
|
"default": "rows",
|
|
1101
1555
|
"description": "'grid' packs many short fields into columns (record pages); 'rows' keeps one per line"
|
|
1556
|
+
},
|
|
1557
|
+
"rowAction": {
|
|
1558
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
1559
|
+
"description": "Offered per row as a 'Change' link named after the row (GOV.UK summary list); the row's key is sent as 'key' with the context"
|
|
1102
1560
|
}
|
|
1103
1561
|
},
|
|
1104
1562
|
"required": [
|
|
@@ -1158,6 +1616,76 @@
|
|
|
1158
1616
|
}
|
|
1159
1617
|
}
|
|
1160
1618
|
},
|
|
1619
|
+
"FileInput": {
|
|
1620
|
+
"type": "object",
|
|
1621
|
+
"description": "Choose or drop files to attach or upload.",
|
|
1622
|
+
"properties": {
|
|
1623
|
+
"component": {
|
|
1624
|
+
"const": "FileInput"
|
|
1625
|
+
},
|
|
1626
|
+
"visible": {
|
|
1627
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1628
|
+
"description": "Hide the component when false"
|
|
1629
|
+
},
|
|
1630
|
+
"label": {
|
|
1631
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
1632
|
+
},
|
|
1633
|
+
"value": {
|
|
1634
|
+
"type": "object",
|
|
1635
|
+
"required": [
|
|
1636
|
+
"path"
|
|
1637
|
+
],
|
|
1638
|
+
"properties": {
|
|
1639
|
+
"path": {
|
|
1640
|
+
"type": "string",
|
|
1641
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1642
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
"additionalProperties": false,
|
|
1646
|
+
"description": "The chosen files in host data: a list of { name, size, type, ref }, written by the renderer; the host uploads them"
|
|
1647
|
+
},
|
|
1648
|
+
"accept": {
|
|
1649
|
+
"type": "array",
|
|
1650
|
+
"items": {
|
|
1651
|
+
"type": "string"
|
|
1652
|
+
},
|
|
1653
|
+
"description": "Allowed types as extensions or MIME types: ['.pdf', 'image/*']"
|
|
1654
|
+
},
|
|
1655
|
+
"multiple": {
|
|
1656
|
+
"type": "boolean",
|
|
1657
|
+
"default": false
|
|
1658
|
+
},
|
|
1659
|
+
"maxSize": {
|
|
1660
|
+
"type": "integer",
|
|
1661
|
+
"minimum": 1,
|
|
1662
|
+
"description": "Largest file, in bytes; the renderer refuses larger ones with a message"
|
|
1663
|
+
},
|
|
1664
|
+
"help": {
|
|
1665
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1666
|
+
"description": "What to attach and why; the accepted types and size are said by the renderer"
|
|
1667
|
+
},
|
|
1668
|
+
"required": {
|
|
1669
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1670
|
+
"default": false
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
"required": [
|
|
1674
|
+
"component",
|
|
1675
|
+
"label",
|
|
1676
|
+
"value"
|
|
1677
|
+
],
|
|
1678
|
+
"metadata": {
|
|
1679
|
+
"extensions": {
|
|
1680
|
+
"com_polyxd": {
|
|
1681
|
+
"category": "input",
|
|
1682
|
+
"target": "custom",
|
|
1683
|
+
"basicAnalog": "none",
|
|
1684
|
+
"why": "Basic has no file input; the accepted types, size limit and multiple flag have no home."
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1161
1689
|
"FilterPanel": {
|
|
1162
1690
|
"type": "object",
|
|
1163
1691
|
"description": "Filters for a list of results, with the result count.",
|
|
@@ -1211,8 +1739,10 @@
|
|
|
1211
1739
|
"allowedChildren": [
|
|
1212
1740
|
"Choice",
|
|
1213
1741
|
"Collection",
|
|
1742
|
+
"ColorInput",
|
|
1214
1743
|
"DateInput",
|
|
1215
1744
|
"RangeInput",
|
|
1745
|
+
"Rating",
|
|
1216
1746
|
"Table",
|
|
1217
1747
|
"TextInput",
|
|
1218
1748
|
"Toggle"
|
|
@@ -1353,35 +1883,128 @@
|
|
|
1353
1883
|
}
|
|
1354
1884
|
}
|
|
1355
1885
|
},
|
|
1356
|
-
"
|
|
1886
|
+
"Identity": {
|
|
1357
1887
|
"type": "object",
|
|
1358
|
-
"description": "
|
|
1888
|
+
"description": "A person, team or organisation: picture, name and details, or several of them together.",
|
|
1359
1889
|
"properties": {
|
|
1360
1890
|
"component": {
|
|
1361
|
-
"const": "
|
|
1891
|
+
"const": "Identity"
|
|
1362
1892
|
},
|
|
1363
1893
|
"visible": {
|
|
1364
1894
|
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1365
1895
|
"description": "Hide the component when false"
|
|
1366
1896
|
},
|
|
1367
|
-
"
|
|
1897
|
+
"name": {
|
|
1898
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1899
|
+
"description": "Always bound to host data: a name is never invented"
|
|
1900
|
+
},
|
|
1901
|
+
"detail": {
|
|
1902
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1903
|
+
"description": "One line under the name: a role, an email, a team, a status"
|
|
1904
|
+
},
|
|
1905
|
+
"image": {
|
|
1906
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1907
|
+
"description": "A media reference from host data, resolved by the host as Media's is; initials from the name are shown without one"
|
|
1908
|
+
},
|
|
1909
|
+
"kind": {
|
|
1910
|
+
"enum": [
|
|
1911
|
+
"person",
|
|
1912
|
+
"team",
|
|
1913
|
+
"organization"
|
|
1914
|
+
],
|
|
1915
|
+
"default": "person",
|
|
1916
|
+
"description": "A person's picture is round; a team's or organisation's is square"
|
|
1917
|
+
},
|
|
1918
|
+
"size": {
|
|
1919
|
+
"enum": [
|
|
1920
|
+
"small",
|
|
1921
|
+
"default",
|
|
1922
|
+
"large"
|
|
1923
|
+
],
|
|
1924
|
+
"default": "default"
|
|
1925
|
+
},
|
|
1926
|
+
"action": {
|
|
1927
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
1928
|
+
"description": "Activating the identity as a whole, e.g. open the person's record"
|
|
1929
|
+
},
|
|
1930
|
+
"group": {
|
|
1368
1931
|
"type": "object",
|
|
1369
1932
|
"required": [
|
|
1370
|
-
"path"
|
|
1933
|
+
"path",
|
|
1934
|
+
"namePath"
|
|
1371
1935
|
],
|
|
1372
1936
|
"properties": {
|
|
1373
1937
|
"path": {
|
|
1374
1938
|
"type": "string",
|
|
1375
1939
|
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1376
|
-
"description": "
|
|
1940
|
+
"description": "A list of people in host data, shown as overlapping pictures with a '+N' for the rest"
|
|
1941
|
+
},
|
|
1942
|
+
"namePath": {
|
|
1943
|
+
"type": "string",
|
|
1944
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1945
|
+
"description": "Relative to each entry"
|
|
1946
|
+
},
|
|
1947
|
+
"imagePath": {
|
|
1948
|
+
"type": "string",
|
|
1949
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1950
|
+
"description": "Relative to each entry"
|
|
1951
|
+
},
|
|
1952
|
+
"max": {
|
|
1953
|
+
"type": "integer",
|
|
1954
|
+
"minimum": 1,
|
|
1955
|
+
"maximum": 8,
|
|
1956
|
+
"default": 4,
|
|
1957
|
+
"description": "Pictures shown before '+N'"
|
|
1377
1958
|
}
|
|
1378
1959
|
},
|
|
1379
1960
|
"additionalProperties": false,
|
|
1380
|
-
"description": "
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1961
|
+
"description": "Several identities as one element ('Rhea, Tom and 3 others'). name is then the group's accessible summary"
|
|
1962
|
+
}
|
|
1963
|
+
},
|
|
1964
|
+
"required": [
|
|
1965
|
+
"component",
|
|
1966
|
+
"name"
|
|
1967
|
+
],
|
|
1968
|
+
"metadata": {
|
|
1969
|
+
"extensions": {
|
|
1970
|
+
"com_polyxd": {
|
|
1971
|
+
"category": "content",
|
|
1972
|
+
"target": "custom",
|
|
1973
|
+
"basicAnalog": "Row of Image + Text",
|
|
1974
|
+
"why": "Row is layout; it loses the person/team kind, the initials fallback, the group's '+N' and the activation."
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
"Media": {
|
|
1980
|
+
"type": "object",
|
|
1981
|
+
"description": "An image, video, audio clip, gallery or QR code supplied by the host.",
|
|
1982
|
+
"properties": {
|
|
1983
|
+
"component": {
|
|
1984
|
+
"const": "Media"
|
|
1985
|
+
},
|
|
1986
|
+
"visible": {
|
|
1987
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
1988
|
+
"description": "Hide the component when false"
|
|
1989
|
+
},
|
|
1990
|
+
"src": {
|
|
1991
|
+
"type": "object",
|
|
1992
|
+
"required": [
|
|
1993
|
+
"path"
|
|
1994
|
+
],
|
|
1995
|
+
"properties": {
|
|
1996
|
+
"path": {
|
|
1997
|
+
"type": "string",
|
|
1998
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
1999
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
"additionalProperties": false,
|
|
2003
|
+
"description": "Image, video or audio reference in host data; generated UI never contains URLs"
|
|
2004
|
+
},
|
|
2005
|
+
"alt": {
|
|
1383
2006
|
"$ref": "common_types.json#/$defs/DynamicString",
|
|
1384
|
-
"description": "Required unless decorative"
|
|
2007
|
+
"description": "Required unless decorative. For a gallery it names the set; for a QR code it says what the code opens"
|
|
1385
2008
|
},
|
|
1386
2009
|
"decorative": {
|
|
1387
2010
|
"type": "boolean",
|
|
@@ -1395,11 +2018,58 @@
|
|
|
1395
2018
|
"auto"
|
|
1396
2019
|
],
|
|
1397
2020
|
"default": "auto"
|
|
2021
|
+
},
|
|
2022
|
+
"kind": {
|
|
2023
|
+
"enum": [
|
|
2024
|
+
"image",
|
|
2025
|
+
"video",
|
|
2026
|
+
"audio",
|
|
2027
|
+
"gallery",
|
|
2028
|
+
"qr"
|
|
2029
|
+
],
|
|
2030
|
+
"default": "image",
|
|
2031
|
+
"description": "'video' and 'audio' play with native controls; 'gallery' is several images from 'items'; 'qr' encodes 'value' as a QR code"
|
|
2032
|
+
},
|
|
2033
|
+
"poster": {
|
|
2034
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2035
|
+
"description": "For 'video': media reference for the frame shown before play"
|
|
2036
|
+
},
|
|
2037
|
+
"transcript": {
|
|
2038
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2039
|
+
"description": "For 'video' and 'audio': the words, offered under the player"
|
|
2040
|
+
},
|
|
2041
|
+
"items": {
|
|
2042
|
+
"type": "object",
|
|
2043
|
+
"required": [
|
|
2044
|
+
"path"
|
|
2045
|
+
],
|
|
2046
|
+
"properties": {
|
|
2047
|
+
"path": {
|
|
2048
|
+
"type": "string",
|
|
2049
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
2050
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
2051
|
+
}
|
|
2052
|
+
},
|
|
2053
|
+
"additionalProperties": false,
|
|
2054
|
+
"description": "For 'gallery': array of images in host data"
|
|
2055
|
+
},
|
|
2056
|
+
"imagePath": {
|
|
2057
|
+
"type": "string",
|
|
2058
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
2059
|
+
"description": "For 'gallery': relative path in each item to its image reference"
|
|
2060
|
+
},
|
|
2061
|
+
"altPath": {
|
|
2062
|
+
"type": "string",
|
|
2063
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
2064
|
+
"description": "For 'gallery': relative path in each item to its alt text"
|
|
2065
|
+
},
|
|
2066
|
+
"value": {
|
|
2067
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2068
|
+
"description": "For 'qr': the text encoded, e.g. a payment link from host data"
|
|
1398
2069
|
}
|
|
1399
2070
|
},
|
|
1400
2071
|
"required": [
|
|
1401
|
-
"component"
|
|
1402
|
-
"src"
|
|
2072
|
+
"component"
|
|
1403
2073
|
],
|
|
1404
2074
|
"metadata": {
|
|
1405
2075
|
"extensions": {
|
|
@@ -1457,7 +2127,9 @@
|
|
|
1457
2127
|
"time",
|
|
1458
2128
|
"datetime",
|
|
1459
2129
|
"relativeTime",
|
|
1460
|
-
"duration"
|
|
2130
|
+
"duration",
|
|
2131
|
+
"color",
|
|
2132
|
+
"bytes"
|
|
1461
2133
|
]
|
|
1462
2134
|
},
|
|
1463
2135
|
"currency": {
|
|
@@ -1510,7 +2182,9 @@
|
|
|
1510
2182
|
"time",
|
|
1511
2183
|
"datetime",
|
|
1512
2184
|
"relativeTime",
|
|
1513
|
-
"duration"
|
|
2185
|
+
"duration",
|
|
2186
|
+
"color",
|
|
2187
|
+
"bytes"
|
|
1514
2188
|
]
|
|
1515
2189
|
},
|
|
1516
2190
|
"currency": {
|
|
@@ -1651,6 +2325,17 @@
|
|
|
1651
2325
|
},
|
|
1652
2326
|
"additionalProperties": false,
|
|
1653
2327
|
"description": "Key of the current item in host data"
|
|
2328
|
+
},
|
|
2329
|
+
"kind": {
|
|
2330
|
+
"enum": [
|
|
2331
|
+
"main",
|
|
2332
|
+
"breadcrumb",
|
|
2333
|
+
"nested",
|
|
2334
|
+
"toc",
|
|
2335
|
+
"local"
|
|
2336
|
+
],
|
|
2337
|
+
"default": "main",
|
|
2338
|
+
"description": "'main' is the product's sections; 'breadcrumb' the ordered trail to here; 'nested' groups that expand; 'toc' the sections of this page (items link to anchors named by their keys); 'local' the sections of one area, as tabs"
|
|
1654
2339
|
}
|
|
1655
2340
|
},
|
|
1656
2341
|
"required": [
|
|
@@ -1669,6 +2354,222 @@
|
|
|
1669
2354
|
}
|
|
1670
2355
|
}
|
|
1671
2356
|
},
|
|
2357
|
+
"Panel": {
|
|
2358
|
+
"type": "object",
|
|
2359
|
+
"description": "Content over the current view: a dialog, a drawer, a bottom sheet or a popover, opened from an action and dismissed to return.",
|
|
2360
|
+
"properties": {
|
|
2361
|
+
"component": {
|
|
2362
|
+
"const": "Panel"
|
|
2363
|
+
},
|
|
2364
|
+
"visible": {
|
|
2365
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2366
|
+
"description": "Hide the component when false"
|
|
2367
|
+
},
|
|
2368
|
+
"kind": {
|
|
2369
|
+
"enum": [
|
|
2370
|
+
"dialog",
|
|
2371
|
+
"drawer",
|
|
2372
|
+
"sheet",
|
|
2373
|
+
"popover"
|
|
2374
|
+
],
|
|
2375
|
+
"default": "dialog",
|
|
2376
|
+
"description": "'dialog' centres and blocks; 'drawer' slides from the side for a form or a record; 'sheet' rises from the bottom on phones; 'popover' floats by its opener for a small choice"
|
|
2377
|
+
},
|
|
2378
|
+
"title": {
|
|
2379
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
2380
|
+
},
|
|
2381
|
+
"children": {
|
|
2382
|
+
"$ref": "common_types.json#/$defs/ChildList",
|
|
2383
|
+
"type": "array",
|
|
2384
|
+
"minItems": 1,
|
|
2385
|
+
"description": "What the panel holds"
|
|
2386
|
+
},
|
|
2387
|
+
"actions": {
|
|
2388
|
+
"$ref": "common_types.json#/$defs/ComponentId",
|
|
2389
|
+
"description": "An ActionBar in the panel's footer: its primary action and a Cancel"
|
|
2390
|
+
},
|
|
2391
|
+
"open": {
|
|
2392
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2393
|
+
"description": "Bound to host data: true shows the panel; the renderer writes false on dismiss. Open when absent"
|
|
2394
|
+
},
|
|
2395
|
+
"dismissible": {
|
|
2396
|
+
"type": "boolean",
|
|
2397
|
+
"default": true,
|
|
2398
|
+
"description": "Escape, the close control and the backdrop dismiss it; false for a panel that must be completed"
|
|
2399
|
+
},
|
|
2400
|
+
"size": {
|
|
2401
|
+
"enum": [
|
|
2402
|
+
"small",
|
|
2403
|
+
"default",
|
|
2404
|
+
"large"
|
|
2405
|
+
],
|
|
2406
|
+
"default": "default"
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
"required": [
|
|
2410
|
+
"component",
|
|
2411
|
+
"title",
|
|
2412
|
+
"children"
|
|
2413
|
+
],
|
|
2414
|
+
"allowedChildren": [
|
|
2415
|
+
"ActionBar",
|
|
2416
|
+
"Card",
|
|
2417
|
+
"Choice",
|
|
2418
|
+
"Code",
|
|
2419
|
+
"CodeInput",
|
|
2420
|
+
"Collection",
|
|
2421
|
+
"ColorInput",
|
|
2422
|
+
"DateInput",
|
|
2423
|
+
"DetailList",
|
|
2424
|
+
"Disclosure",
|
|
2425
|
+
"FileInput",
|
|
2426
|
+
"Form",
|
|
2427
|
+
"Group",
|
|
2428
|
+
"Identity",
|
|
2429
|
+
"Media",
|
|
2430
|
+
"Metric",
|
|
2431
|
+
"Progress",
|
|
2432
|
+
"RangeInput",
|
|
2433
|
+
"Rating",
|
|
2434
|
+
"Section",
|
|
2435
|
+
"Status",
|
|
2436
|
+
"Table",
|
|
2437
|
+
"Tag",
|
|
2438
|
+
"Text",
|
|
2439
|
+
"TextInput",
|
|
2440
|
+
"Toggle",
|
|
2441
|
+
"Tree",
|
|
2442
|
+
"Views"
|
|
2443
|
+
],
|
|
2444
|
+
"metadata": {
|
|
2445
|
+
"extensions": {
|
|
2446
|
+
"com_polyxd": {
|
|
2447
|
+
"category": "structure",
|
|
2448
|
+
"target": "custom",
|
|
2449
|
+
"basicAnalog": "Modal",
|
|
2450
|
+
"why": "Modal has no kind (drawer, sheet, popover), no bound open state, no footer action bar and no dismissible flag."
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
},
|
|
2455
|
+
"Progress": {
|
|
2456
|
+
"type": "object",
|
|
2457
|
+
"description": "How far along something is, or how much of a bounded amount is used: a bar, a ring or a meter.",
|
|
2458
|
+
"properties": {
|
|
2459
|
+
"component": {
|
|
2460
|
+
"const": "Progress"
|
|
2461
|
+
},
|
|
2462
|
+
"visible": {
|
|
2463
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2464
|
+
"description": "Hide the component when false"
|
|
2465
|
+
},
|
|
2466
|
+
"label": {
|
|
2467
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2468
|
+
"description": "What is being measured: 'Storage used', 'Upload', 'Goal'"
|
|
2469
|
+
},
|
|
2470
|
+
"value": {
|
|
2471
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
2472
|
+
"description": "Bound to host data. A fraction from 0 to 1, or an amount when max is given"
|
|
2473
|
+
},
|
|
2474
|
+
"max": {
|
|
2475
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
2476
|
+
"description": "The whole, when value is an amount rather than a fraction: 200 for '180 of 200 GB'"
|
|
2477
|
+
},
|
|
2478
|
+
"kind": {
|
|
2479
|
+
"enum": [
|
|
2480
|
+
"bar",
|
|
2481
|
+
"ring",
|
|
2482
|
+
"meter"
|
|
2483
|
+
],
|
|
2484
|
+
"default": "bar",
|
|
2485
|
+
"description": "'bar' and 'ring' show progress towards done; 'meter' shows a measured amount within bounds, with tone by threshold"
|
|
2486
|
+
},
|
|
2487
|
+
"caption": {
|
|
2488
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2489
|
+
"description": "Text beside the readout: '180 of 200 GB', '3 days left'. The readout itself is derived from value"
|
|
2490
|
+
},
|
|
2491
|
+
"format": {
|
|
2492
|
+
"type": "object",
|
|
2493
|
+
"required": [
|
|
2494
|
+
"type"
|
|
2495
|
+
],
|
|
2496
|
+
"properties": {
|
|
2497
|
+
"type": {
|
|
2498
|
+
"enum": [
|
|
2499
|
+
"text",
|
|
2500
|
+
"number",
|
|
2501
|
+
"currency",
|
|
2502
|
+
"percent",
|
|
2503
|
+
"date",
|
|
2504
|
+
"time",
|
|
2505
|
+
"datetime",
|
|
2506
|
+
"relativeTime",
|
|
2507
|
+
"duration",
|
|
2508
|
+
"color",
|
|
2509
|
+
"bytes"
|
|
2510
|
+
]
|
|
2511
|
+
},
|
|
2512
|
+
"currency": {
|
|
2513
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2514
|
+
"description": "ISO 4217 code, required for type 'currency'"
|
|
2515
|
+
},
|
|
2516
|
+
"precision": {
|
|
2517
|
+
"type": "integer",
|
|
2518
|
+
"minimum": 0,
|
|
2519
|
+
"maximum": 6
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
"additionalProperties": false,
|
|
2523
|
+
"description": "How the readout is shown; percent without it"
|
|
2524
|
+
},
|
|
2525
|
+
"tone": {
|
|
2526
|
+
"enum": [
|
|
2527
|
+
"neutral",
|
|
2528
|
+
"info",
|
|
2529
|
+
"success",
|
|
2530
|
+
"warning",
|
|
2531
|
+
"danger"
|
|
2532
|
+
],
|
|
2533
|
+
"description": "Fixed tone; a meter without one takes warning past thresholds.warning and danger past thresholds.danger"
|
|
2534
|
+
},
|
|
2535
|
+
"thresholds": {
|
|
2536
|
+
"type": "object",
|
|
2537
|
+
"properties": {
|
|
2538
|
+
"warning": {
|
|
2539
|
+
"type": "number",
|
|
2540
|
+
"minimum": 0,
|
|
2541
|
+
"maximum": 1
|
|
2542
|
+
},
|
|
2543
|
+
"danger": {
|
|
2544
|
+
"type": "number",
|
|
2545
|
+
"minimum": 0,
|
|
2546
|
+
"maximum": 1
|
|
2547
|
+
}
|
|
2548
|
+
},
|
|
2549
|
+
"additionalProperties": false,
|
|
2550
|
+
"description": "Fractions at which a meter changes tone"
|
|
2551
|
+
},
|
|
2552
|
+
"indeterminate": {
|
|
2553
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2554
|
+
"description": "The task is running and how far along isn't known"
|
|
2555
|
+
}
|
|
2556
|
+
},
|
|
2557
|
+
"required": [
|
|
2558
|
+
"component",
|
|
2559
|
+
"label",
|
|
2560
|
+
"value"
|
|
2561
|
+
],
|
|
2562
|
+
"metadata": {
|
|
2563
|
+
"extensions": {
|
|
2564
|
+
"com_polyxd": {
|
|
2565
|
+
"category": "content",
|
|
2566
|
+
"target": "custom",
|
|
2567
|
+
"basicAnalog": "Text",
|
|
2568
|
+
"why": "Basic has no progress or meter; the fraction, bound and tone thresholds would be lost."
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
},
|
|
1672
2573
|
"RangeInput": {
|
|
1673
2574
|
"type": "object",
|
|
1674
2575
|
"description": "A number, or a range between two numbers, within known bounds.",
|
|
@@ -1724,7 +2625,9 @@
|
|
|
1724
2625
|
"time",
|
|
1725
2626
|
"datetime",
|
|
1726
2627
|
"relativeTime",
|
|
1727
|
-
"duration"
|
|
2628
|
+
"duration",
|
|
2629
|
+
"color",
|
|
2630
|
+
"bytes"
|
|
1728
2631
|
]
|
|
1729
2632
|
},
|
|
1730
2633
|
"currency": {
|
|
@@ -1767,6 +2670,79 @@
|
|
|
1767
2670
|
}
|
|
1768
2671
|
}
|
|
1769
2672
|
},
|
|
2673
|
+
"Rating": {
|
|
2674
|
+
"type": "object",
|
|
2675
|
+
"description": "A score out of N: given by the person, or shown as others gave it.",
|
|
2676
|
+
"properties": {
|
|
2677
|
+
"component": {
|
|
2678
|
+
"const": "Rating"
|
|
2679
|
+
},
|
|
2680
|
+
"visible": {
|
|
2681
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2682
|
+
"description": "Hide the component when false"
|
|
2683
|
+
},
|
|
2684
|
+
"label": {
|
|
2685
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2686
|
+
"description": "What is rated: 'Your rating', 'Average rating'"
|
|
2687
|
+
},
|
|
2688
|
+
"value": {
|
|
2689
|
+
"type": "object",
|
|
2690
|
+
"required": [
|
|
2691
|
+
"path"
|
|
2692
|
+
],
|
|
2693
|
+
"properties": {
|
|
2694
|
+
"path": {
|
|
2695
|
+
"type": "string",
|
|
2696
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
2697
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
2698
|
+
}
|
|
2699
|
+
},
|
|
2700
|
+
"additionalProperties": false,
|
|
2701
|
+
"description": "The score in host data; written when the person can rate"
|
|
2702
|
+
},
|
|
2703
|
+
"max": {
|
|
2704
|
+
"type": "integer",
|
|
2705
|
+
"minimum": 2,
|
|
2706
|
+
"maximum": 10,
|
|
2707
|
+
"default": 5
|
|
2708
|
+
},
|
|
2709
|
+
"readOnly": {
|
|
2710
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2711
|
+
"default": false,
|
|
2712
|
+
"description": "Show a score rather than take one"
|
|
2713
|
+
},
|
|
2714
|
+
"count": {
|
|
2715
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
2716
|
+
"description": "How many ratings the score is from, shown after it: '4.6 (212)'"
|
|
2717
|
+
},
|
|
2718
|
+
"help": {
|
|
2719
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
2720
|
+
},
|
|
2721
|
+
"required": {
|
|
2722
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
2723
|
+
"default": false
|
|
2724
|
+
},
|
|
2725
|
+
"action": {
|
|
2726
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
2727
|
+
"description": "Runs when a rating is given, with context bound to value"
|
|
2728
|
+
}
|
|
2729
|
+
},
|
|
2730
|
+
"required": [
|
|
2731
|
+
"component",
|
|
2732
|
+
"label",
|
|
2733
|
+
"value"
|
|
2734
|
+
],
|
|
2735
|
+
"metadata": {
|
|
2736
|
+
"extensions": {
|
|
2737
|
+
"com_polyxd": {
|
|
2738
|
+
"category": "input",
|
|
2739
|
+
"target": "custom",
|
|
2740
|
+
"basicAnalog": "Row of Icon",
|
|
2741
|
+
"why": "Icons can't be a radiogroup that writes a value, and lose the count and read-only distinction."
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
},
|
|
1770
2746
|
"Section": {
|
|
1771
2747
|
"type": "object",
|
|
1772
2748
|
"description": "A titled region of the surface that groups related content under a heading.",
|
|
@@ -1920,11 +2896,24 @@
|
|
|
1920
2896
|
},
|
|
1921
2897
|
"content": {
|
|
1922
2898
|
"$ref": "common_types.json#/$defs/ComponentId"
|
|
2899
|
+
},
|
|
2900
|
+
"status": {
|
|
2901
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
2902
|
+
"description": "For 'tasklist': 'todo', 'inProgress', 'done' or 'blocked', usually bound to host data"
|
|
1923
2903
|
}
|
|
1924
2904
|
},
|
|
1925
2905
|
"additionalProperties": false
|
|
1926
2906
|
}
|
|
1927
2907
|
},
|
|
2908
|
+
"kind": {
|
|
2909
|
+
"enum": [
|
|
2910
|
+
"wizard",
|
|
2911
|
+
"tasklist",
|
|
2912
|
+
"guide"
|
|
2913
|
+
],
|
|
2914
|
+
"default": "wizard",
|
|
2915
|
+
"description": "'wizard' shows one step at a time in order; 'tasklist' lists tasks people do in any order, each with its status; 'guide' is numbered instructions with no state"
|
|
2916
|
+
},
|
|
1928
2917
|
"current": {
|
|
1929
2918
|
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
1930
2919
|
"description": "Index of the current step (default 0)"
|
|
@@ -2033,7 +3022,9 @@
|
|
|
2033
3022
|
"time",
|
|
2034
3023
|
"datetime",
|
|
2035
3024
|
"relativeTime",
|
|
2036
|
-
"duration"
|
|
3025
|
+
"duration",
|
|
3026
|
+
"color",
|
|
3027
|
+
"bytes"
|
|
2037
3028
|
]
|
|
2038
3029
|
},
|
|
2039
3030
|
"currency": {
|
|
@@ -2188,6 +3179,15 @@
|
|
|
2188
3179
|
"$ref": "common_types.json#/$defs/ComponentId",
|
|
2189
3180
|
"description": "ActionBar offered per row, in a menu named after the row"
|
|
2190
3181
|
},
|
|
3182
|
+
"expandable": {
|
|
3183
|
+
"type": "boolean",
|
|
3184
|
+
"default": false,
|
|
3185
|
+
"description": "Rows open to show 'detail' beneath them"
|
|
3186
|
+
},
|
|
3187
|
+
"detail": {
|
|
3188
|
+
"$ref": "common_types.json#/$defs/ComponentId",
|
|
3189
|
+
"description": "Component rendered under an expanded row; relative paths inside it resolve against the row"
|
|
3190
|
+
},
|
|
2191
3191
|
"toolbar": {
|
|
2192
3192
|
"$ref": "common_types.json#/$defs/ComponentId",
|
|
2193
3193
|
"description": "ActionBar above the table (e.g. New, Import, Export)"
|
|
@@ -2312,22 +3312,88 @@
|
|
|
2312
3312
|
},
|
|
2313
3313
|
"required": [
|
|
2314
3314
|
"component",
|
|
2315
|
-
"rows",
|
|
2316
|
-
"caption",
|
|
2317
|
-
"columns"
|
|
2318
|
-
],
|
|
2319
|
-
"allowedChildren": [
|
|
2320
|
-
"ActionBar",
|
|
2321
|
-
"
|
|
2322
|
-
"
|
|
3315
|
+
"rows",
|
|
3316
|
+
"caption",
|
|
3317
|
+
"columns"
|
|
3318
|
+
],
|
|
3319
|
+
"allowedChildren": [
|
|
3320
|
+
"ActionBar",
|
|
3321
|
+
"Card",
|
|
3322
|
+
"Collection",
|
|
3323
|
+
"DetailList",
|
|
3324
|
+
"Group",
|
|
3325
|
+
"Media",
|
|
3326
|
+
"Metric",
|
|
3327
|
+
"Status",
|
|
3328
|
+
"Text",
|
|
3329
|
+
"TextInput"
|
|
3330
|
+
],
|
|
3331
|
+
"metadata": {
|
|
3332
|
+
"extensions": {
|
|
3333
|
+
"com_polyxd": {
|
|
3334
|
+
"category": "content",
|
|
3335
|
+
"target": "custom",
|
|
3336
|
+
"basicAnalog": "List of Row",
|
|
3337
|
+
"why": "Basic has no table. Caption, column headers, formats, row action and empty state would be lost."
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
},
|
|
3342
|
+
"Tag": {
|
|
3343
|
+
"type": "object",
|
|
3344
|
+
"description": "A short label, status or count attached to something else.",
|
|
3345
|
+
"properties": {
|
|
3346
|
+
"component": {
|
|
3347
|
+
"const": "Tag"
|
|
3348
|
+
},
|
|
3349
|
+
"visible": {
|
|
3350
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
3351
|
+
"description": "Hide the component when false"
|
|
3352
|
+
},
|
|
3353
|
+
"label": {
|
|
3354
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
3355
|
+
"description": "The word or two it shows: 'Past due', 'Beta', 'Design'"
|
|
3356
|
+
},
|
|
3357
|
+
"kind": {
|
|
3358
|
+
"enum": [
|
|
3359
|
+
"label",
|
|
3360
|
+
"status",
|
|
3361
|
+
"count"
|
|
3362
|
+
],
|
|
3363
|
+
"default": "label",
|
|
3364
|
+
"description": "'status' is the state of the thing it sits on and is coloured by tone; 'count' is a number, with the label as its accessible name"
|
|
3365
|
+
},
|
|
3366
|
+
"tone": {
|
|
3367
|
+
"enum": [
|
|
3368
|
+
"neutral",
|
|
3369
|
+
"info",
|
|
3370
|
+
"success",
|
|
3371
|
+
"warning",
|
|
3372
|
+
"danger"
|
|
3373
|
+
],
|
|
3374
|
+
"default": "neutral",
|
|
3375
|
+
"description": "Meaning, not decoration: a status tag's tone says whether the state is fine, a warning or a problem"
|
|
3376
|
+
},
|
|
3377
|
+
"count": {
|
|
3378
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
3379
|
+
"description": "For kind 'count': the number, bound to host data"
|
|
3380
|
+
},
|
|
3381
|
+
"remove": {
|
|
3382
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
3383
|
+
"description": "Present when the person can take the tag off (a filter chip, a chosen recipient): the capability that removes it"
|
|
3384
|
+
}
|
|
3385
|
+
},
|
|
3386
|
+
"required": [
|
|
3387
|
+
"component",
|
|
3388
|
+
"label"
|
|
2323
3389
|
],
|
|
2324
3390
|
"metadata": {
|
|
2325
3391
|
"extensions": {
|
|
2326
3392
|
"com_polyxd": {
|
|
2327
3393
|
"category": "content",
|
|
2328
3394
|
"target": "custom",
|
|
2329
|
-
"basicAnalog": "
|
|
2330
|
-
"why": "
|
|
3395
|
+
"basicAnalog": "Text",
|
|
3396
|
+
"why": "Text has no tone, no count and no remove control; a status tag's meaning is its tone."
|
|
2331
3397
|
}
|
|
2332
3398
|
}
|
|
2333
3399
|
}
|
|
@@ -2350,9 +3416,13 @@
|
|
|
2350
3416
|
"enum": [
|
|
2351
3417
|
"body",
|
|
2352
3418
|
"supporting",
|
|
2353
|
-
"caption"
|
|
3419
|
+
"caption",
|
|
3420
|
+
"rich",
|
|
3421
|
+
"list",
|
|
3422
|
+
"quote"
|
|
2354
3423
|
],
|
|
2355
|
-
"default": "body"
|
|
3424
|
+
"default": "body",
|
|
3425
|
+
"description": "'rich' allows **bold**, *italic*, `code` and [links](href) in the text; 'list' is a bulleted or numbered list of 'items'; 'quote' is a quotation with an optional 'cite'"
|
|
2356
3426
|
},
|
|
2357
3427
|
"format": {
|
|
2358
3428
|
"type": "object",
|
|
@@ -2370,7 +3440,9 @@
|
|
|
2370
3440
|
"time",
|
|
2371
3441
|
"datetime",
|
|
2372
3442
|
"relativeTime",
|
|
2373
|
-
"duration"
|
|
3443
|
+
"duration",
|
|
3444
|
+
"color",
|
|
3445
|
+
"bytes"
|
|
2374
3446
|
]
|
|
2375
3447
|
},
|
|
2376
3448
|
"currency": {
|
|
@@ -2385,6 +3457,35 @@
|
|
|
2385
3457
|
},
|
|
2386
3458
|
"additionalProperties": false,
|
|
2387
3459
|
"description": "Only when 'text' is bound to a non-string value"
|
|
3460
|
+
},
|
|
3461
|
+
"items": {
|
|
3462
|
+
"type": "object",
|
|
3463
|
+
"required": [
|
|
3464
|
+
"path"
|
|
3465
|
+
],
|
|
3466
|
+
"properties": {
|
|
3467
|
+
"path": {
|
|
3468
|
+
"type": "string",
|
|
3469
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3470
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3471
|
+
}
|
|
3472
|
+
},
|
|
3473
|
+
"additionalProperties": false,
|
|
3474
|
+
"description": "For 'list': array in host data, one entry per item; 'text' introduces the list"
|
|
3475
|
+
},
|
|
3476
|
+
"itemPath": {
|
|
3477
|
+
"type": "string",
|
|
3478
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3479
|
+
"description": "For 'list': relative path in each entry to the text shown, when the entries are objects"
|
|
3480
|
+
},
|
|
3481
|
+
"ordered": {
|
|
3482
|
+
"type": "boolean",
|
|
3483
|
+
"default": false,
|
|
3484
|
+
"description": "For 'list': numbered rather than bulleted"
|
|
3485
|
+
},
|
|
3486
|
+
"cite": {
|
|
3487
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
3488
|
+
"description": "For 'quote': who or what is quoted"
|
|
2388
3489
|
}
|
|
2389
3490
|
},
|
|
2390
3491
|
"required": [
|
|
@@ -2440,9 +3541,99 @@
|
|
|
2440
3541
|
"email",
|
|
2441
3542
|
"phone",
|
|
2442
3543
|
"url",
|
|
2443
|
-
"search"
|
|
3544
|
+
"search",
|
|
3545
|
+
"suggestions",
|
|
3546
|
+
"richtext",
|
|
3547
|
+
"tags",
|
|
3548
|
+
"mentions",
|
|
3549
|
+
"code",
|
|
3550
|
+
"masked",
|
|
3551
|
+
"inline"
|
|
3552
|
+
],
|
|
3553
|
+
"default": "text",
|
|
3554
|
+
"description": "'suggestions' offers completions from 'options' while leaving any text allowed; 'richtext' is short formatted text (bold, italic, lists) stored as markdown-ish text; 'tags' is a list of short values entered one at a time; 'mentions' offers 'options' after an @; 'code' is monospace with no autocorrection; 'masked' follows 'mask'; 'inline' reads as text until it is clicked"
|
|
3555
|
+
},
|
|
3556
|
+
"options": {
|
|
3557
|
+
"oneOf": [
|
|
3558
|
+
{
|
|
3559
|
+
"type": "array",
|
|
3560
|
+
"minItems": 2,
|
|
3561
|
+
"items": {
|
|
3562
|
+
"type": "object",
|
|
3563
|
+
"required": [
|
|
3564
|
+
"value",
|
|
3565
|
+
"label"
|
|
3566
|
+
],
|
|
3567
|
+
"properties": {
|
|
3568
|
+
"value": {
|
|
3569
|
+
"type": [
|
|
3570
|
+
"string",
|
|
3571
|
+
"number",
|
|
3572
|
+
"boolean"
|
|
3573
|
+
]
|
|
3574
|
+
},
|
|
3575
|
+
"label": {
|
|
3576
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
3577
|
+
},
|
|
3578
|
+
"description": {
|
|
3579
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
3580
|
+
}
|
|
3581
|
+
},
|
|
3582
|
+
"additionalProperties": false
|
|
3583
|
+
}
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
"type": "object",
|
|
3587
|
+
"required": [
|
|
3588
|
+
"path",
|
|
3589
|
+
"valuePath",
|
|
3590
|
+
"labelPath"
|
|
3591
|
+
],
|
|
3592
|
+
"properties": {
|
|
3593
|
+
"path": {
|
|
3594
|
+
"type": "string",
|
|
3595
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3596
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3597
|
+
},
|
|
3598
|
+
"valuePath": {
|
|
3599
|
+
"type": "string",
|
|
3600
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3601
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3602
|
+
},
|
|
3603
|
+
"labelPath": {
|
|
3604
|
+
"type": "string",
|
|
3605
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3606
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3607
|
+
},
|
|
3608
|
+
"descriptionPath": {
|
|
3609
|
+
"type": "string",
|
|
3610
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3611
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3612
|
+
},
|
|
3613
|
+
"avatarPath": {
|
|
3614
|
+
"type": "string",
|
|
3615
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3616
|
+
"description": "Initials or a media reference per option: renders people and places with a face"
|
|
3617
|
+
},
|
|
3618
|
+
"imagePath": {
|
|
3619
|
+
"type": "string",
|
|
3620
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3621
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3622
|
+
},
|
|
3623
|
+
"recentPath": {
|
|
3624
|
+
"type": "string",
|
|
3625
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3626
|
+
"description": "Boolean per option: shown in a 'Recent' row above the full list"
|
|
3627
|
+
}
|
|
3628
|
+
},
|
|
3629
|
+
"additionalProperties": false
|
|
3630
|
+
}
|
|
2444
3631
|
],
|
|
2445
|
-
"
|
|
3632
|
+
"description": "For 'suggestions' and 'mentions': the completions offered"
|
|
3633
|
+
},
|
|
3634
|
+
"mask": {
|
|
3635
|
+
"type": "string",
|
|
3636
|
+
"description": "For 'masked': # for a digit, A for a letter, * for either, anything else typed for you, e.g. '#### #### #### ####'"
|
|
2446
3637
|
},
|
|
2447
3638
|
"currency": {
|
|
2448
3639
|
"$ref": "common_types.json#/$defs/DynamicString",
|
|
@@ -2566,6 +3757,117 @@
|
|
|
2566
3757
|
}
|
|
2567
3758
|
}
|
|
2568
3759
|
},
|
|
3760
|
+
"Tree": {
|
|
3761
|
+
"type": "object",
|
|
3762
|
+
"description": "A hierarchy people expand, browse and pick from: folders, an org chart, nested categories.",
|
|
3763
|
+
"properties": {
|
|
3764
|
+
"component": {
|
|
3765
|
+
"const": "Tree"
|
|
3766
|
+
},
|
|
3767
|
+
"visible": {
|
|
3768
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
3769
|
+
"description": "Hide the component when false"
|
|
3770
|
+
},
|
|
3771
|
+
"label": {
|
|
3772
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
3773
|
+
"description": "What the tree holds, e.g. 'Folders'"
|
|
3774
|
+
},
|
|
3775
|
+
"items": {
|
|
3776
|
+
"type": "object",
|
|
3777
|
+
"required": [
|
|
3778
|
+
"path"
|
|
3779
|
+
],
|
|
3780
|
+
"properties": {
|
|
3781
|
+
"path": {
|
|
3782
|
+
"type": "string",
|
|
3783
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3784
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3785
|
+
}
|
|
3786
|
+
},
|
|
3787
|
+
"additionalProperties": false,
|
|
3788
|
+
"description": "The top-level nodes in host data: a list"
|
|
3789
|
+
},
|
|
3790
|
+
"labelPath": {
|
|
3791
|
+
"type": "string",
|
|
3792
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3793
|
+
"description": "Relative to each node: the text shown"
|
|
3794
|
+
},
|
|
3795
|
+
"childrenPath": {
|
|
3796
|
+
"type": "string",
|
|
3797
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3798
|
+
"description": "Relative to each node: its list of child nodes, absent or empty for a leaf"
|
|
3799
|
+
},
|
|
3800
|
+
"valuePath": {
|
|
3801
|
+
"type": "string",
|
|
3802
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3803
|
+
"description": "Relative to each node: what selection writes; the label when absent"
|
|
3804
|
+
},
|
|
3805
|
+
"detailPath": {
|
|
3806
|
+
"type": "string",
|
|
3807
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3808
|
+
"description": "Relative to each node: a count or note shown after the label"
|
|
3809
|
+
},
|
|
3810
|
+
"selection": {
|
|
3811
|
+
"enum": [
|
|
3812
|
+
"none",
|
|
3813
|
+
"single",
|
|
3814
|
+
"multiple"
|
|
3815
|
+
],
|
|
3816
|
+
"default": "none"
|
|
3817
|
+
},
|
|
3818
|
+
"selected": {
|
|
3819
|
+
"type": "object",
|
|
3820
|
+
"required": [
|
|
3821
|
+
"path"
|
|
3822
|
+
],
|
|
3823
|
+
"properties": {
|
|
3824
|
+
"path": {
|
|
3825
|
+
"type": "string",
|
|
3826
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3827
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3828
|
+
}
|
|
3829
|
+
},
|
|
3830
|
+
"additionalProperties": false,
|
|
3831
|
+
"description": "Selected node value(s) in host data when selection is not 'none'"
|
|
3832
|
+
},
|
|
3833
|
+
"expanded": {
|
|
3834
|
+
"type": "object",
|
|
3835
|
+
"required": [
|
|
3836
|
+
"path"
|
|
3837
|
+
],
|
|
3838
|
+
"properties": {
|
|
3839
|
+
"path": {
|
|
3840
|
+
"type": "string",
|
|
3841
|
+
"pattern": "^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",
|
|
3842
|
+
"description": "RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."
|
|
3843
|
+
}
|
|
3844
|
+
},
|
|
3845
|
+
"additionalProperties": false,
|
|
3846
|
+
"description": "Values of the nodes shown open; the first level is open without it"
|
|
3847
|
+
},
|
|
3848
|
+
"action": {
|
|
3849
|
+
"$ref": "common_types.json#/$defs/Action",
|
|
3850
|
+
"description": "Activating a node, e.g. open that folder; context may bind to the node's fields"
|
|
3851
|
+
}
|
|
3852
|
+
},
|
|
3853
|
+
"required": [
|
|
3854
|
+
"component",
|
|
3855
|
+
"label",
|
|
3856
|
+
"items",
|
|
3857
|
+
"labelPath",
|
|
3858
|
+
"childrenPath"
|
|
3859
|
+
],
|
|
3860
|
+
"metadata": {
|
|
3861
|
+
"extensions": {
|
|
3862
|
+
"com_polyxd": {
|
|
3863
|
+
"category": "content",
|
|
3864
|
+
"target": "custom",
|
|
3865
|
+
"basicAnalog": "Nested Column of Text",
|
|
3866
|
+
"why": "Column can't express expand/collapse, levels, selection or the per-node action."
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3870
|
+
},
|
|
2569
3871
|
"Views": {
|
|
2570
3872
|
"type": "object",
|
|
2571
3873
|
"description": "Switch between alternative views of the same subject (tabs).",
|
|
@@ -2712,6 +4014,9 @@
|
|
|
2712
4014
|
{
|
|
2713
4015
|
"$ref": "#/components/ActionBar"
|
|
2714
4016
|
},
|
|
4017
|
+
{
|
|
4018
|
+
"$ref": "#/components/ActionMenu"
|
|
4019
|
+
},
|
|
2715
4020
|
{
|
|
2716
4021
|
"$ref": "#/components/Card"
|
|
2717
4022
|
},
|
|
@@ -2721,9 +4026,18 @@
|
|
|
2721
4026
|
{
|
|
2722
4027
|
"$ref": "#/components/Choice"
|
|
2723
4028
|
},
|
|
4029
|
+
{
|
|
4030
|
+
"$ref": "#/components/Code"
|
|
4031
|
+
},
|
|
4032
|
+
{
|
|
4033
|
+
"$ref": "#/components/CodeInput"
|
|
4034
|
+
},
|
|
2724
4035
|
{
|
|
2725
4036
|
"$ref": "#/components/Collection"
|
|
2726
4037
|
},
|
|
4038
|
+
{
|
|
4039
|
+
"$ref": "#/components/ColorInput"
|
|
4040
|
+
},
|
|
2727
4041
|
{
|
|
2728
4042
|
"$ref": "#/components/Comparison"
|
|
2729
4043
|
},
|
|
@@ -2739,6 +4053,9 @@
|
|
|
2739
4053
|
{
|
|
2740
4054
|
"$ref": "#/components/Disclosure"
|
|
2741
4055
|
},
|
|
4056
|
+
{
|
|
4057
|
+
"$ref": "#/components/FileInput"
|
|
4058
|
+
},
|
|
2742
4059
|
{
|
|
2743
4060
|
"$ref": "#/components/FilterPanel"
|
|
2744
4061
|
},
|
|
@@ -2748,6 +4065,9 @@
|
|
|
2748
4065
|
{
|
|
2749
4066
|
"$ref": "#/components/Group"
|
|
2750
4067
|
},
|
|
4068
|
+
{
|
|
4069
|
+
"$ref": "#/components/Identity"
|
|
4070
|
+
},
|
|
2751
4071
|
{
|
|
2752
4072
|
"$ref": "#/components/Media"
|
|
2753
4073
|
},
|
|
@@ -2757,9 +4077,18 @@
|
|
|
2757
4077
|
{
|
|
2758
4078
|
"$ref": "#/components/Navigation"
|
|
2759
4079
|
},
|
|
4080
|
+
{
|
|
4081
|
+
"$ref": "#/components/Panel"
|
|
4082
|
+
},
|
|
4083
|
+
{
|
|
4084
|
+
"$ref": "#/components/Progress"
|
|
4085
|
+
},
|
|
2760
4086
|
{
|
|
2761
4087
|
"$ref": "#/components/RangeInput"
|
|
2762
4088
|
},
|
|
4089
|
+
{
|
|
4090
|
+
"$ref": "#/components/Rating"
|
|
4091
|
+
},
|
|
2763
4092
|
{
|
|
2764
4093
|
"$ref": "#/components/Section"
|
|
2765
4094
|
},
|
|
@@ -2772,6 +4101,9 @@
|
|
|
2772
4101
|
{
|
|
2773
4102
|
"$ref": "#/components/Table"
|
|
2774
4103
|
},
|
|
4104
|
+
{
|
|
4105
|
+
"$ref": "#/components/Tag"
|
|
4106
|
+
},
|
|
2775
4107
|
{
|
|
2776
4108
|
"$ref": "#/components/Text"
|
|
2777
4109
|
},
|
|
@@ -2781,6 +4113,9 @@
|
|
|
2781
4113
|
{
|
|
2782
4114
|
"$ref": "#/components/Toggle"
|
|
2783
4115
|
},
|
|
4116
|
+
{
|
|
4117
|
+
"$ref": "#/components/Tree"
|
|
4118
|
+
},
|
|
2784
4119
|
{
|
|
2785
4120
|
"$ref": "#/components/Views"
|
|
2786
4121
|
}
|