robobyte-front-builder 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/LICENSE +65 -0
  2. package/README.md +57 -0
  3. package/docs/ReportViewer.md +581 -0
  4. package/docs/fetchReportData.md +379 -0
  5. package/docs/printLayout.md +405 -0
  6. package/package.json +29 -1
  7. package/training/00-index.md +168 -0
  8. package/training/01-input.md +144 -0
  9. package/training/02-checkbox.md +107 -0
  10. package/training/03-dropdown.md +135 -0
  11. package/training/04-datepicker.md +139 -0
  12. package/training/05-radio.md +123 -0
  13. package/training/06-number.md +133 -0
  14. package/training/07-textarea.md +114 -0
  15. package/training/08-richtext.md +112 -0
  16. package/training/09-tag.md +110 -0
  17. package/training/10-time.md +107 -0
  18. package/training/11-toggle.md +108 -0
  19. package/training/12-signature.md +107 -0
  20. package/training/13-autocomplete.md +134 -0
  21. package/training/14-button.md +168 -0
  22. package/training/15-label.md +138 -0
  23. package/training/16-header.md +128 -0
  24. package/training/17-divider.md +96 -0
  25. package/training/18-image.md +105 -0
  26. package/training/19-link.md +108 -0
  27. package/training/20-banner.md +122 -0
  28. package/training/21-progress-circle.md +101 -0
  29. package/training/22-progress-line.md +93 -0
  30. package/training/23-menu.md +139 -0
  31. package/training/24-popover.md +114 -0
  32. package/training/25-layout.md +116 -0
  33. package/training/26-layout-cell.md +143 -0
  34. package/training/27-card.md +87 -0
  35. package/training/28-wizard.md +126 -0
  36. package/training/29-wizard-step.md +92 -0
  37. package/training/30-repeater.md +123 -0
  38. package/training/31-dialog.md +131 -0
  39. package/training/32-breadcrumb.md +121 -0
  40. package/training/33-dataGrid.md +129 -0
  41. package/training/34-dataTableViewer.md +115 -0
  42. package/training/35-reportViewer.md +673 -0
  43. package/training/36-viewRenderer.md +110 -0
  44. package/training/37-treeView.md +170 -0
  45. package/training/38-kpi-metric.md +148 -0
  46. package/training/39-kpi-trend.md +105 -0
  47. package/training/40-kpi-badge.md +112 -0
  48. package/training/41-kpi-statusDot.md +118 -0
  49. package/training/42-kpi-iconBox.md +114 -0
  50. package/training/43-kpi-gauge.md +143 -0
  51. package/training/44-kpi-bulletChart.md +126 -0
  52. package/training/45-kpi-colorScale.md +143 -0
  53. package/training/46-kpi-rating.md +125 -0
  54. package/training/47-kpi-countdown.md +151 -0
  55. package/training/48-fetchReportData.md +276 -0
  56. package/training/49-printLayout.md +215 -0
  57. package/training/examples/01-login-form.json +176 -0
  58. package/training/examples/02-contact-form.json +141 -0
  59. package/training/examples/03-kpi-cards-row.json +123 -0
  60. package/training/examples/04-settings-toggles.json +153 -0
  61. package/training/examples/05-user-profile-card.json +136 -0
  62. package/training/examples/06-date-range-filter.json +108 -0
  63. package/training/examples/07-search-bar-results.json +130 -0
  64. package/training/examples/08-notification-settings.json +131 -0
  65. package/training/examples/09-employee-profile-form.json +259 -0
  66. package/training/examples/10-invoice-form.json +241 -0
  67. package/training/examples/11-dashboard-overview.json +251 -0
  68. package/training/examples/12-registration-wizard.json +154 -0
  69. package/training/examples/13-product-catalog.json +168 -0
  70. package/training/examples/14-data-table-with-filters.json +180 -0
  71. package/training/examples/15-tabbed-profile.json +92 -0
  72. package/training/examples/16-kpi-full-row.json +203 -0
  73. package/training/examples/17-tree-detail-view.json +139 -0
  74. package/training/examples/18-employee-management.json +233 -0
  75. package/training/examples/19-sales-dashboard.json +272 -0
  76. package/training/examples/20-checkout-wizard.json +225 -0
  77. package/training/examples/21-analytics-page.json +222 -0
  78. package/training/examples/22-hr-onboarding.json +222 -0
  79. package/training/examples/23-document-browser.json +241 -0
  80. package/training/examples/24-order-management.json +290 -0
  81. package/training/examples/25-crm-contact-page.json +272 -0
@@ -0,0 +1,139 @@
1
+ # Component: menu
2
+
3
+ A tab/navigation bar component. Children (wizard-steps or panels) are shown based on the active tab. Supports horizontal tabs, vertical tabs, and nav-style menus.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. Active tab key is stored in `data[key]`. |
12
+ | `activeKey` | expression | Controlled active tab key. Bind to `data.activeTab` to drive active tab externally. |
13
+ | `appearance` | select | `default` — standard MUI Tabs. `subtle` — minimal underline style. `tabs` — standard tab appearance. |
14
+ | `items` | items-editor | Static list of `{ key, label, icon? }` tab definitions. |
15
+ | `justified` | boolean | Tabs stretch to fill the full width equally. |
16
+ | `reversed` | boolean | Reverses the order of tabs. |
17
+ | `vertical` | boolean | Renders tabs in a vertical column on the left side. |
18
+ | `itemsAs` | expression | Expression driving dynamic tab list from data. |
19
+ | `tabs` | tabs-editor | Advanced tab configuration with panel content per tab. |
20
+
21
+ ---
22
+
23
+ ## Props — Style Tab
24
+
25
+ | Prop | Type | Options / Notes |
26
+ |------|------|-----------------|
27
+ | `variant` | select | `standard` · `scrollable` · `fullWidth` — Controls how tabs distribute horizontally. |
28
+ | `textColor` | select | `primary` · `secondary` · `inherit` — Color of tab label text. |
29
+ | `indicatorColor` | select | `primary` · `secondary` — Color of the active tab underline indicator. |
30
+ | `scrollButtons` | select | `auto` · `desktop` · `on` · `off` — When to show scroll arrows for overflowing tabs. |
31
+ | `centered` | boolean | Centers the tabs in the tab bar (only for `standard` variant). |
32
+ | `gap` | expression | Gap between tab panel content and next element. |
33
+ | `display` | expression | CSS display. |
34
+ | `width` | expression | Tab bar width. |
35
+ | `height` | expression | Tab bar height. |
36
+ | `margin` | expression | Outer margin. |
37
+ | `padding` | expression | Inner padding. |
38
+
39
+ ---
40
+
41
+ ## Props — Actions Tab
42
+
43
+ | Event | Type | Notes |
44
+ |-------|------|-------|
45
+ | `onTabChange` | expression | Expression/code run when the active tab changes. Receives the new tab key. |
46
+
47
+ ---
48
+
49
+ ## Use Cases
50
+
51
+ **When to use:**
52
+ - Multi-section forms where each section is on a tab (Personal Info, Contact, Documents).
53
+ - Dashboard views with multiple data areas accessible by tab.
54
+ - Settings pages with categories (General, Security, Notifications).
55
+ - Navigation within a page without URL change.
56
+
57
+ **When NOT to use:**
58
+ - Step-by-step forms with validation per step → use `wizard`.
59
+ - Simple show/hide toggle → use conditional rendering via `enabled`/`disabled`.
60
+ - Breadcrumb or wizard-style flow → use `breadcrumb` or `wizard`.
61
+
62
+ ---
63
+
64
+ ## Schema Examples
65
+
66
+ ### Basic tab menu
67
+ ```json
68
+ {
69
+ "type": "menu",
70
+ "props": {
71
+ "key": "mainTabs",
72
+ "appearance": "default",
73
+ "items": [
74
+ { "key": "overview", "label": "Overview" },
75
+ { "key": "details", "label": "Details" },
76
+ { "key": "history", "label": "History" }
77
+ ]
78
+ },
79
+ "style": {
80
+ "variant": "standard",
81
+ "textColor": "primary",
82
+ "indicatorColor": "primary"
83
+ }
84
+ }
85
+ ```
86
+
87
+ ### Full-width justified tabs
88
+ ```json
89
+ {
90
+ "type": "menu",
91
+ "props": {
92
+ "key": "settingsTabs",
93
+ "appearance": "tabs",
94
+ "justified": true,
95
+ "items": [
96
+ { "key": "general", "label": "General" },
97
+ { "key": "security", "label": "Security" },
98
+ { "key": "notifications", "label": "Notifications" }
99
+ ]
100
+ },
101
+ "style": {
102
+ "variant": "fullWidth",
103
+ "textColor": "primary",
104
+ "indicatorColor": "secondary"
105
+ }
106
+ }
107
+ ```
108
+
109
+ ### Vertical tabs
110
+ ```json
111
+ {
112
+ "type": "menu",
113
+ "props": {
114
+ "key": "sideNav",
115
+ "vertical": true,
116
+ "appearance": "subtle",
117
+ "items": [
118
+ { "key": "profile", "label": "Profile" },
119
+ { "key": "billing", "label": "Billing" },
120
+ { "key": "api", "label": "API Keys" }
121
+ ]
122
+ }
123
+ }
124
+ ```
125
+
126
+ ### Controlled by data with onTabChange
127
+ ```json
128
+ {
129
+ "type": "menu",
130
+ "props": {
131
+ "key": "reportTabs",
132
+ "activeKey": "data.activeReport",
133
+ "items": "data.reportTabs"
134
+ },
135
+ "actions": {
136
+ "onTabChange": "setData({ activeReport: newKey }); loadReport(newKey)"
137
+ }
138
+ }
139
+ ```
@@ -0,0 +1,114 @@
1
+ # Component: popover
2
+
3
+ A floating panel triggered by a button, icon-button, or text. Contains arbitrary child components dropped into it. Useful for contextual actions, filters, or detail panels.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier for referencing with `openPopover(key)` / `closePopover(key)`. |
12
+ | `triggerType` | select | `button` · `icon-button` · `text` — The type of trigger element. |
13
+ | `triggerLabel` | expression | Label shown on the trigger button/text. |
14
+ | `triggerVariant` | select | `text` · `outlined` · `contained` — Button variant (applies to `button` trigger). |
15
+ | `triggerColor` | select | `primary` · `secondary` · `success` · `error` · `warning` · `info` · `inherit` |
16
+ | `triggerSize` | select | `small` · `medium` · `large` |
17
+ | `triggerIcon` | select | One of: `MoreVertOutlined` · `SettingsOutlined` · `TuneOutlined` · `FilterListOutlined` · `SearchOutlined` · `InfoOutlined` · `AddOutlined` · `EditOutlined` · `DeleteOutlined` · `DownloadOutlined` · `ExpandMoreOutlined` · `CheckOutlined` · `CloseOutlined` · `RefreshOutlined` · `StarOutlined` · `LockOutlined` · `LockOpenOutlined` · _(empty)_ |
18
+ | `triggerFullWidth` | boolean | Makes the trigger stretch to full width. |
19
+ | `title` | expression | Optional title shown at the top of the popover panel. |
20
+ | `placement` | select | `bottom-start` · `bottom` · `bottom-end` · `top-start` · `top` · `top-end` · `left` · `right` |
21
+ | `triggerOn` | select | `click` · `hover` — How the popover opens. |
22
+ | `open` | expression | Controlled open state. Bind to `data.popoverOpen` for programmatic control. |
23
+ | `maxWidth` | expression | Max width of the popover panel, e.g. `"320px"`. |
24
+ | `maxHeight` | expression | Max height, e.g. `"400px"` (panel scrolls if content is taller). |
25
+ | `contentPadding` | expression | Padding inside the popover panel, e.g. `"16px"`. |
26
+ | `closeOnContentClick` | boolean | Closes the popover when a child inside it is clicked. |
27
+
28
+ ---
29
+
30
+ ## Props — Style Tab
31
+
32
+ No dedicated style tab.
33
+
34
+ ---
35
+
36
+ ## Props — Actions Tab
37
+
38
+ No dedicated action events. Child components inside the popover handle their own actions.
39
+
40
+ ---
41
+
42
+ ## Use Cases
43
+
44
+ **When to use:**
45
+ - "More options" menus triggered by a `MoreVertOutlined` icon-button.
46
+ - Filter panels triggered by a `FilterListOutlined` button.
47
+ - Quick-edit forms that pop up alongside a row/item.
48
+ - Info tooltips with rich content (not just text).
49
+ - Color pickers, date range filters, column selectors.
50
+
51
+ **When NOT to use:**
52
+ - Full-screen or large content → use `dialog`.
53
+ - Simple text tooltip → use button's `tooltip` prop.
54
+ - Permanent side panel → use a layout with a sidebar cell.
55
+
56
+ ---
57
+
58
+ ## Schema Examples
59
+
60
+ ### "More options" icon popover
61
+ ```json
62
+ {
63
+ "type": "popover",
64
+ "props": {
65
+ "key": "rowActions",
66
+ "triggerType": "icon-button",
67
+ "triggerIcon": "MoreVertOutlined",
68
+ "triggerColor": "inherit",
69
+ "placement": "bottom-end",
70
+ "triggerOn": "click",
71
+ "maxWidth": "200px",
72
+ "contentPadding": "8px",
73
+ "closeOnContentClick": true
74
+ }
75
+ }
76
+ ```
77
+
78
+ ### Filter panel button
79
+ ```json
80
+ {
81
+ "type": "popover",
82
+ "props": {
83
+ "key": "filterPanel",
84
+ "triggerType": "button",
85
+ "triggerLabel": "Filters",
86
+ "triggerIcon": "FilterListOutlined",
87
+ "triggerVariant": "outlined",
88
+ "triggerColor": "primary",
89
+ "placement": "bottom-start",
90
+ "triggerOn": "click",
91
+ "title": "Filter Options",
92
+ "maxWidth": "320px",
93
+ "contentPadding": "16px"
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### Hover info popover
99
+ ```json
100
+ {
101
+ "type": "popover",
102
+ "props": {
103
+ "key": "helpInfo",
104
+ "triggerType": "icon-button",
105
+ "triggerIcon": "InfoOutlined",
106
+ "triggerColor": "info",
107
+ "triggerSize": "small",
108
+ "triggerOn": "hover",
109
+ "placement": "top",
110
+ "maxWidth": "280px",
111
+ "contentPadding": "12px"
112
+ }
113
+ }
114
+ ```
@@ -0,0 +1,116 @@
1
+ # Component: layout
2
+
3
+ A CSS Grid container that holds `layout-cell` children. The primary structural building block for page layouts.
4
+
5
+ > ⚠️ CRITICAL RULES:
6
+ > - NEVER use the `container` component — it is banned. Always use `layout` instead.
7
+ > - Direct children of `layout` MUST be `layout-cell` nodes. Do not put other components directly inside layout.
8
+ > - The root of every schema should be a `layout` with `cols: 1`.
9
+ > - One component per layout-cell for cols ≥ 2 (unless the cell itself contains a nested layout).
10
+
11
+ ---
12
+
13
+ ## Props — Main Tab
14
+
15
+ | Prop | Type | Options / Notes |
16
+ |------|------|-----------------|
17
+ | `key` | expression | Optional identifier. |
18
+ | `cols` | number | Number of grid columns. `1` = single column stack. `2` = two equal columns. `3`, `4`, etc. |
19
+ | `gap` | number | Column gap in pixels between cells. Default: `0`. |
20
+ | `rowGap` | number | Row gap in pixels between rows. Default: `0`. |
21
+ | `cellMinHeight` | expression | Default minimum height for every cell, e.g. `"48px"`. Overridden per cell via layout-cell style. |
22
+ | `cellPadding` | expression | Default padding applied to every cell, e.g. `"16px"`. Overridden per cell. |
23
+ | `cellBackgroundColor` | expression | Default background color for all cells, e.g. `"#f5f5f5"`. |
24
+ | `cellBorder` | expression | Default border for all cells, e.g. `"1px solid #e0e0e0"`. |
25
+ | `cellBorderRadius` | expression | Default border-radius for all cells. |
26
+ | `cellBoxShadow` | expression | Default box-shadow for all cells. |
27
+ | `cellJustifyContent` | select | Default horizontal alignment of content within each cell: `flex-start` · `center` · `flex-end` · `space-between` · `space-around` · `space-evenly` |
28
+ | `cellAlignItems` | select | Default vertical alignment within each cell: `flex-start` · `center` · `flex-end` · `stretch` · `baseline` |
29
+ | `cellElementStyle` | expression | CSS object expression applied as overrides to all cells (highest priority among grid defaults). |
30
+ | `cellElementCss` | expression | Additional CSS string applied to all cells. |
31
+
32
+ ---
33
+
34
+ ## Props — Style Tab
35
+
36
+ No dedicated style tab for the layout container itself. Control the layout wrapper through its parent layout-cell style.
37
+
38
+ ---
39
+
40
+ ## Props — Actions Tab
41
+
42
+ No actions.
43
+
44
+ ---
45
+
46
+ ## Cell Positioning (on layout-cell, not layout)
47
+
48
+ When `cols > 1`, cells auto-flow into columns left-to-right. To manually position a cell:
49
+ - Set `colStart` (1-indexed) and `colSpan` on the cell.
50
+ - Set `rowStart` and `rowSpan` for cross-row spanning.
51
+ - Leave these blank to use CSS auto-placement.
52
+
53
+ ---
54
+
55
+ ## Use Cases
56
+
57
+ **When to use:**
58
+ - Every page/screen should start with `layout cols:1` as root.
59
+ - Two-column form layout: `cols: 2`.
60
+ - Three-column dashboard cards: `cols: 3`.
61
+ - Mixed widths: use `colSpan` on individual cells (e.g. a cell spanning all 3 columns).
62
+ - Nested sections: put a `layout cols:2` inside a cell of a `layout cols:1`.
63
+
64
+ **When NOT to use:**
65
+ - Do not nest layouts more than 2–3 deep for performance.
66
+ - For a single-column stack, `cols: 1` is correct (don't nest unnecessarily).
67
+
68
+ ---
69
+
70
+ ## Schema Examples
71
+
72
+ ### Single column (page root)
73
+ ```json
74
+ {
75
+ "type": "layout",
76
+ "props": { "cols": 1, "gap": 0, "rowGap": 16 },
77
+ "children": [
78
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "header", "props": { "text": "Page Title", "variant": "h4" } }] },
79
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "input", "props": { "key": "name", "label": "Name" } }] }
80
+ ]
81
+ }
82
+ ```
83
+
84
+ ### Two-column form
85
+ ```json
86
+ {
87
+ "type": "layout",
88
+ "props": { "cols": 2, "gap": 16, "rowGap": 16 },
89
+ "children": [
90
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "input", "props": { "key": "firstName", "label": "First Name" } }] },
91
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "input", "props": { "key": "lastName", "label": "Last Name" } }] },
92
+ { "type": "layout-cell", "props": { "colSpan": 2 }, "children": [{ "type": "textarea", "props": { "key": "bio", "label": "Bio" } }] }
93
+ ]
94
+ }
95
+ ```
96
+
97
+ ### Three-column KPI cards
98
+ ```json
99
+ {
100
+ "type": "layout",
101
+ "props": {
102
+ "cols": 3,
103
+ "gap": 16,
104
+ "rowGap": 16,
105
+ "cellPadding": "20px",
106
+ "cellBackgroundColor": "#ffffff",
107
+ "cellBorderRadius": "8px",
108
+ "cellBoxShadow": "0 2px 8px rgba(0,0,0,0.08)"
109
+ },
110
+ "children": [
111
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "kpi-metric", "props": { "valueKey": "data.revenue", "label": "Revenue", "format": "currency" } }] },
112
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "kpi-metric", "props": { "valueKey": "data.orders", "label": "Orders", "format": "number" } }] },
113
+ { "type": "layout-cell", "props": {}, "children": [{ "type": "kpi-metric", "props": { "valueKey": "data.growth", "label": "Growth", "format": "percent" } }] }
114
+ ]
115
+ }
116
+ ```
@@ -0,0 +1,143 @@
1
+ # Component: layout-cell
2
+
3
+ A single cell inside a `layout` grid container. Controls grid positioning and individual cell styling. Must be a direct child of `layout`.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab (Grid Positioning)
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Optional identifier. |
12
+ | `colStart` | number | Which grid column this cell starts at (1-indexed). Leave blank for auto-placement. |
13
+ | `rowStart` | number | Which grid row this cell starts at (1-indexed). Leave blank for auto-placement. |
14
+ | `colSpan` | number | How many columns this cell spans. Default: `1`. Set to total cols to span full width. |
15
+ | `rowSpan` | number | How many rows this cell spans. Default: `1`. |
16
+
17
+ > NOTE: Only set `colStart`/`rowStart` when you need explicit positioning. For most layouts, leave them blank and let CSS auto-placement distribute cells.
18
+
19
+ ---
20
+
21
+ ## Props — Style Tab (Cell Visual Styling)
22
+
23
+ These control the visual appearance of the individual cell. They override the parent layout's `cell*` defaults.
24
+
25
+ | Prop | Type | Options / Notes |
26
+ |------|------|-----------------|
27
+ | `elementStyle` | expression | CSS object expression merged last (highest priority), e.g. `{ background: 'linear-gradient(...)' }`. |
28
+ | `elementCss` | expression | CSS string expression merged last, e.g. `"background: linear-gradient(...)"`. |
29
+ | `padding` | expression | Cell inner padding, e.g. `"16px"` or `"8px 16px"`. |
30
+ | `paddingTop` | expression | Top padding only. |
31
+ | `paddingBottom` | expression | Bottom padding only. |
32
+ | `paddingLeft` | expression | Left padding only. |
33
+ | `paddingRight` | expression | Right padding only. |
34
+ | `width` | expression | Cell width override. Usually auto from grid. |
35
+ | `minHeight` | expression | Minimum height, e.g. `"200px"`. |
36
+ | `maxHeight` | expression | Maximum height; content scrolls if taller. |
37
+ | `backgroundColor` | expression | Background color, e.g. `"#ffffff"`, `"primary.light"`. |
38
+ | `backgroundImage` | expression | CSS background-image, e.g. `"url('/img/bg.jpg')"`. |
39
+ | `backgroundSize` | expression | CSS background-size, e.g. `"cover"`, `"contain"`. |
40
+ | `border` | expression | Full border shorthand, e.g. `"1px solid #e0e0e0"`. |
41
+ | `borderTop` | expression | Top border only. |
42
+ | `borderBottom` | expression | Bottom border only. |
43
+ | `borderLeft` | expression | Left border only. |
44
+ | `borderRight` | expression | Right border only. |
45
+ | `borderRadius` | expression | Rounded corners, e.g. `"8px"`, `"12px 12px 0 0"`. |
46
+ | `borderColor` | expression | Border color (used with border shorthand). |
47
+ | `justifyContent` | select | Horizontal alignment of content: `flex-start` · `center` · `flex-end` · `space-between` · `space-around` · `space-evenly` |
48
+ | `alignItems` | select | Vertical alignment of content: `flex-start` · `center` · `flex-end` · `stretch` · `baseline` |
49
+ | `gap` | expression | Gap between children inside the cell, e.g. `"8px"`. |
50
+ | `boxShadow` | expression | Box shadow, e.g. `"0 2px 8px rgba(0,0,0,0.1)"`. |
51
+ | `opacity` | expression | Cell opacity, e.g. `"0.8"`. |
52
+ | `overflow` | expression | CSS overflow: `"hidden"`, `"auto"`, `"visible"`. |
53
+
54
+ ---
55
+
56
+ ## Props — Actions Tab
57
+
58
+ No actions.
59
+
60
+ ---
61
+
62
+ ## Use Cases
63
+
64
+ **Always use layout-cell as the direct child of layout.**
65
+
66
+ - A cell with only `justifyContent: center` and `alignItems: center` centers its content.
67
+ - A card-style cell: `backgroundColor: "#fff"`, `borderRadius: "8px"`, `boxShadow: "0 2px 8px rgba(0,0,0,0.08)"`, `padding: "20px"`.
68
+ - A highlighted header cell: `backgroundColor: "primary.main"`, `padding: "16px"`.
69
+ - `colSpan: 2` in a `cols: 2` layout spans the full width.
70
+ - `minHeight: "300px"` ensures a cell has a minimum size for visual balance.
71
+
72
+ ---
73
+
74
+ ## Schema Examples
75
+
76
+ ### Plain auto-placed cell
77
+ ```json
78
+ {
79
+ "type": "layout-cell",
80
+ "props": {},
81
+ "style": { "padding": "16px" },
82
+ "children": [
83
+ { "type": "input", "props": { "key": "email", "label": "Email" } }
84
+ ]
85
+ }
86
+ ```
87
+
88
+ ### Card-style cell
89
+ ```json
90
+ {
91
+ "type": "layout-cell",
92
+ "props": {},
93
+ "style": {
94
+ "backgroundColor": "#ffffff",
95
+ "borderRadius": "8px",
96
+ "boxShadow": "0 2px 8px rgba(0,0,0,0.08)",
97
+ "padding": "20px"
98
+ },
99
+ "children": [
100
+ { "type": "kpi-metric", "props": { "valueKey": "data.revenue", "label": "Revenue", "format": "currency" } }
101
+ ]
102
+ }
103
+ ```
104
+
105
+ ### Full-width cell (spans all 3 columns in a cols:3 layout)
106
+ ```json
107
+ {
108
+ "type": "layout-cell",
109
+ "props": { "colSpan": 3 },
110
+ "style": { "padding": "0 0 16px 0" },
111
+ "children": [
112
+ { "type": "header", "props": { "text": "Section Title", "variant": "h5" } }
113
+ ]
114
+ }
115
+ ```
116
+
117
+ ### Centered content cell
118
+ ```json
119
+ {
120
+ "type": "layout-cell",
121
+ "props": {},
122
+ "style": {
123
+ "justifyContent": "center",
124
+ "alignItems": "center",
125
+ "minHeight": "200px",
126
+ "backgroundColor": "#f5f5f5",
127
+ "borderRadius": "8px"
128
+ },
129
+ "children": [
130
+ { "type": "progress-circle", "props": { "variant": "indeterminate", "color": "primary" } }
131
+ ]
132
+ }
133
+ ```
134
+
135
+ ### Explicit grid positioning (spans rows)
136
+ ```json
137
+ {
138
+ "type": "layout-cell",
139
+ "props": { "colStart": 2, "rowStart": 1, "rowSpan": 2 },
140
+ "style": { "padding": "20px", "backgroundColor": "#fff" },
141
+ "children": []
142
+ }
143
+ ```
@@ -0,0 +1,87 @@
1
+ # Component: card
2
+
3
+ A MUI Card container with an optional title and subheader. Contains arbitrary child components.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Optional identifier. |
12
+ | `title` | expression | Card header title text, e.g. `"User Details"` or `data.project.name`. Leave blank for no header. |
13
+ | `subheader` | expression | Secondary text below the title, e.g. a date or role. |
14
+ | `variant` | select | `elevation` — floating card with shadow. `outlined` — flat card with border, no shadow. |
15
+
16
+ ---
17
+
18
+ ## Props — Style Tab
19
+
20
+ No dedicated style tab. Use the parent layout-cell style for spacing/shadow. The card itself uses MUI's default elevation/border.
21
+
22
+ ---
23
+
24
+ ## Props — Actions Tab
25
+
26
+ No actions. Card is a container component.
27
+
28
+ ---
29
+
30
+ ## Use Cases
31
+
32
+ **When to use:**
33
+ - Grouping related content with a visual card boundary (user profile, product, post).
34
+ - Dashboard panels with a labeled title area.
35
+ - List items rendered via a `repeater` — each repeater item is a card.
36
+
37
+ **When NOT to use:**
38
+ - When you want full control of the outer styling → use a `layout-cell` with `backgroundColor`, `borderRadius`, `boxShadow`.
39
+ - When the card border/shadow would conflict with a custom design → style via layout-cell instead.
40
+ - Tabs with panel switching → use `menu`.
41
+
42
+ ---
43
+
44
+ ## Schema Examples
45
+
46
+ ### Basic card with title
47
+ ```json
48
+ {
49
+ "type": "card",
50
+ "props": {
51
+ "title": "Personal Information",
52
+ "variant": "elevation"
53
+ },
54
+ "children": [
55
+ { "type": "input", "props": { "key": "name", "label": "Name" } },
56
+ { "type": "input", "props": { "key": "email", "label": "Email" } }
57
+ ]
58
+ }
59
+ ```
60
+
61
+ ### Outlined card with subheader
62
+ ```json
63
+ {
64
+ "type": "card",
65
+ "props": {
66
+ "title": "data.project.name",
67
+ "subheader": "data.project.createdAt",
68
+ "variant": "outlined"
69
+ },
70
+ "children": [
71
+ { "type": "label", "props": { "text": "data.project.description", "variant": "body2" } }
72
+ ]
73
+ }
74
+ ```
75
+
76
+ ### Card without header (container only)
77
+ ```json
78
+ {
79
+ "type": "card",
80
+ "props": {
81
+ "variant": "elevation"
82
+ },
83
+ "children": [
84
+ { "type": "kpi-metric", "props": { "valueKey": "data.total", "label": "Total Sales", "format": "currency" } }
85
+ ]
86
+ }
87
+ ```