Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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%" }
]
}
```
Expand Down
4 changes: 1 addition & 3 deletions content/docs/components/form/button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>; // 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
}
```

Expand Down
6 changes: 2 additions & 4 deletions content/docs/components/form/form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ interface FormField {
interface FormSchema {
type: 'form';
fields: FormField[]; // Form fields
submitButton?: {
label: string;
variant?: string;
};
defaultValues?: Record<string, any>; // 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
Expand Down
5 changes: 2 additions & 3 deletions content/docs/components/form/label.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The Label component renders accessible labels for form fields.

<SchemaExample id="components-form-label/form-label" />

## Required Field
## With a Password Input

<SchemaExample id="components-form-label/required-label" />
<SchemaExample id="components-form-label/password-label" />

## Schema

Expand All @@ -20,7 +20,6 @@ interface LabelSchema {
type: 'label';
text: string; // Label text
htmlFor?: string; // Associated input ID
required?: boolean; // Show required indicator
className?: string;
}
```
10 changes: 5 additions & 5 deletions examples/schema-catalog/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
Expand Down Expand Up @@ -2370,14 +2370,14 @@ const REGISTRY: Record<string, Example> = {
},
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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 5 additions & 1 deletion packages/plugin-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
Loading