diff --git a/README.md b/README.md index 65fae9bac5..e11d7bb8bc 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,6 @@ published is not an error: the expression is returned as its own source text. ```json { "type": "form", - "title": "Contact Us", "fields": [ { "name": "name", "type": "text", "label": "Full Name", "required": true }, { "name": "email", "type": "email", "label": "Email", "required": true }, @@ -231,17 +230,18 @@ published is not an error: the expression is returned as its own source text. #### 📈 Dashboard +A row of live KPI tiles. A `dashboard` node's `widgets[]` takes `metric-card` entries and +dataset-bound charts instead; see the [`@object-ui/plugin-dashboard` README](packages/plugin-dashboard/README.md). + ```json { - "type": "dashboard", - "title": "Sales Dashboard", - "widgets": [ - { "type": "statistic", "label": "Revenue", "value": "${stats.revenue}", "trend": "up", "description": "+12%", "w": 3, "h": 1 }, - { "type": "statistic", "label": "Orders", "value": "${stats.orders}", "trend": "up", "description": "+8%", "w": 3, "h": 1 }, - { "type": "statistic", "label": "Customers", "value": "${stats.customers}", "trend": "up", "description": "+5%", "w": 3, "h": 1 }, - { "type": "statistic", "label": "Conversion", "value": "${stats.conversion}", "trend": "down", "description": "-2%", "w": 3, "h": 1 }, - { "type": "chart", "chartType": "line", "title": "Revenue Over Time", "w": 8, "h": 3 }, - { "type": "chart", "chartType": "pie", "title": "Sales by Region", "w": 4, "h": 3 } + "type": "grid", + "columns": 4, + "children": [ + { "type": "statistic", "label": "Revenue", "value": "${stats.revenue}", "trend": "up", "description": "+12%" }, + { "type": "statistic", "label": "Orders", "value": "${stats.orders}", "trend": "up", "description": "+8%" }, + { "type": "statistic", "label": "Customers", "value": "${stats.customers}", "trend": "up", "description": "+5%" }, + { "type": "statistic", "label": "Conversion", "value": "${stats.conversion}", "trend": "down", "description": "-2%" } ] } ``` diff --git a/content/docs/components/form/button.mdx b/content/docs/components/form/button.mdx index 834961fa03..e07539bf7c 100644 --- a/content/docs/components/form/button.mdx +++ b/content/docs/components/form/button.mdx @@ -64,11 +64,9 @@ interface ButtonSchema { // RUNTIME SLOT (objectui#6124): a React host supplies it; JSON refuses it // by name. Author behaviour as a node type, e.g. an action:button node. onClick?: () => void | Promise; // Click handler - href?: string; // Link URL (renders as link) // Styling - className?: string; - fullWidth?: boolean; + className?: string; // Tailwind classes, e.g. "w-full" for a full-width button } ``` diff --git a/content/docs/components/form/form.mdx b/content/docs/components/form/form.mdx index b10424ec63..da3fc03c16 100644 --- a/content/docs/components/form/form.mdx +++ b/content/docs/components/form/form.mdx @@ -41,10 +41,8 @@ interface FormField { interface FormSchema { type: 'form'; fields: FormField[]; // Form fields - submitButton?: { - label: string; - variant?: string; - }; + defaultValues?: Record; // Initial values, keyed by field name + submitLabel?: string; // Submit button text (default 'Submit') // Events // RUNTIME SLOT (objectui#6124): a React host supplies it; JSON refuses it diff --git a/content/docs/components/form/label.mdx b/content/docs/components/form/label.mdx index 8e8e342825..33e02ff4cb 100644 --- a/content/docs/components/form/label.mdx +++ b/content/docs/components/form/label.mdx @@ -9,9 +9,9 @@ The Label component renders accessible labels for form fields. -## Required Field +## With a Password Input - + ## Schema @@ -20,7 +20,6 @@ interface LabelSchema { type: 'label'; text: string; // Label text htmlFor?: string; // Associated input ID - required?: boolean; // Show required indicator className?: string; } ``` diff --git a/examples/schema-catalog/src/index.ts b/examples/schema-catalog/src/index.ts index bc176d0945..cfd9381c4b 100644 --- a/examples/schema-catalog/src/index.ts +++ b/examples/schema-catalog/src/index.ts @@ -223,7 +223,7 @@ import components_form_input_otp_8_digit from './schemas/components-form-input-o import components_form_input_otp_verification_form from './schemas/components-form-input-otp/verification-form.json' with { type: 'json' }; import components_form_input_otp_with_visual_separator from './schemas/components-form-input-otp/with-visual-separator.json' with { type: 'json' }; import components_form_label_form_label from './schemas/components-form-label/form-label.json' with { type: 'json' }; -import components_form_label_required_label from './schemas/components-form-label/required-label.json' with { type: 'json' }; +import components_form_label_password_label from './schemas/components-form-label/password-label.json' with { type: 'json' }; import components_form_radio_group_basic_radio_group from './schemas/components-form-radio-group/basic-radio-group.json' with { type: 'json' }; import components_form_radio_group_disabled from './schemas/components-form-radio-group/disabled.json' with { type: 'json' }; import components_form_radio_group_form_field from './schemas/components-form-radio-group/form-field.json' with { type: 'json' }; @@ -2370,14 +2370,14 @@ const REGISTRY: Record = { }, schema: components_form_label_form_label, }, - 'components-form-label/required-label': { - id: 'components-form-label/required-label', + 'components-form-label/password-label': { + id: 'components-form-label/password-label', meta: { - title: "Required Label", + title: "Password Label", description: "", category: 'components-form-label', }, - schema: components_form_label_required_label, + schema: components_form_label_password_label, }, 'components-form-radio-group/basic-radio-group': { id: 'components-form-radio-group/basic-radio-group', diff --git a/examples/schema-catalog/src/schemas/components-form-label/required-label.json b/examples/schema-catalog/src/schemas/components-form-label/password-label.json similarity index 100% rename from examples/schema-catalog/src/schemas/components-form-label/required-label.json rename to examples/schema-catalog/src/schemas/components-form-label/password-label.json diff --git a/examples/schema-catalog/test/flex-direction-col-8761.test.tsx b/examples/schema-catalog/test/flex-direction-col-8761.test.tsx index 108c87b1fa..04d03c1051 100644 --- a/examples/schema-catalog/test/flex-direction-col-8761.test.tsx +++ b/examples/schema-catalog/test/flex-direction-col-8761.test.tsx @@ -57,7 +57,7 @@ import { getExample } from '../src/index.js'; const IDS = [ 'components-form-label/form-label', - 'components-form-label/required-label', + 'components-form-label/password-label', 'components-form-date-picker/form-field', 'components-form-input-otp/verification-form', 'components-form-radio-group/form-field', diff --git a/packages/plugin-dashboard/README.md b/packages/plugin-dashboard/README.md index 8156509aa5..7b64b9f5db 100644 --- a/packages/plugin-dashboard/README.md +++ b/packages/plugin-dashboard/README.md @@ -797,9 +797,13 @@ the schema arrives, or for good when the read failed (objectui#10657). A column that authors its `type` draws from it meanwhile. The record drawer a row opens (record drill-down) draws every value as the mask in that window too. +Authored as a node, the object-bound table is `object-data-table`. A bare `table` +is the static component: it takes its rows in `data` and declares neither +`objectName` nor a column `format`. + ```jsonc { - "type": "table", + "type": "object-data-table", "objectName": "opportunity", "columns": [ { "accessorKey": "name", "header": "Opportunity" },