robobyte-front-builder 1.0.26 → 1.0.28

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 (88) hide show
  1. package/INTEGRATION.md +6 -0
  2. package/LICENSE +65 -0
  3. package/README.md +166 -21
  4. package/docs/ReportViewer.md +581 -0
  5. package/docs/fetchReportData.md +379 -0
  6. package/docs/printLayout.md +405 -0
  7. package/package.json +29 -1
  8. package/src/lib/index.js +14 -0
  9. package/src/lib/muiTheme.js +655 -0
  10. package/src/lib/providers/RoboByteFrontBuilderProvider.jsx +45 -1
  11. package/src/pages/_app.js +1 -0
  12. package/src/pages/printBuilder/index.jsx +26 -19
  13. package/src/pages/viewBuilder/index.jsx +29 -19
  14. package/training/00-index.md +168 -0
  15. package/training/01-input.md +144 -0
  16. package/training/02-checkbox.md +107 -0
  17. package/training/03-dropdown.md +135 -0
  18. package/training/04-datepicker.md +139 -0
  19. package/training/05-radio.md +123 -0
  20. package/training/06-number.md +133 -0
  21. package/training/07-textarea.md +114 -0
  22. package/training/08-richtext.md +112 -0
  23. package/training/09-tag.md +110 -0
  24. package/training/10-time.md +107 -0
  25. package/training/11-toggle.md +108 -0
  26. package/training/12-signature.md +107 -0
  27. package/training/13-autocomplete.md +134 -0
  28. package/training/14-button.md +168 -0
  29. package/training/15-label.md +138 -0
  30. package/training/16-header.md +128 -0
  31. package/training/17-divider.md +96 -0
  32. package/training/18-image.md +105 -0
  33. package/training/19-link.md +108 -0
  34. package/training/20-banner.md +122 -0
  35. package/training/21-progress-circle.md +101 -0
  36. package/training/22-progress-line.md +93 -0
  37. package/training/23-menu.md +139 -0
  38. package/training/24-popover.md +114 -0
  39. package/training/25-layout.md +116 -0
  40. package/training/26-layout-cell.md +143 -0
  41. package/training/27-card.md +87 -0
  42. package/training/28-wizard.md +126 -0
  43. package/training/29-wizard-step.md +92 -0
  44. package/training/30-repeater.md +123 -0
  45. package/training/31-dialog.md +131 -0
  46. package/training/32-breadcrumb.md +121 -0
  47. package/training/33-dataGrid.md +129 -0
  48. package/training/34-dataTableViewer.md +115 -0
  49. package/training/35-reportViewer.md +673 -0
  50. package/training/36-viewRenderer.md +110 -0
  51. package/training/37-treeView.md +170 -0
  52. package/training/38-kpi-metric.md +148 -0
  53. package/training/39-kpi-trend.md +105 -0
  54. package/training/40-kpi-badge.md +112 -0
  55. package/training/41-kpi-statusDot.md +118 -0
  56. package/training/42-kpi-iconBox.md +114 -0
  57. package/training/43-kpi-gauge.md +143 -0
  58. package/training/44-kpi-bulletChart.md +126 -0
  59. package/training/45-kpi-colorScale.md +143 -0
  60. package/training/46-kpi-rating.md +125 -0
  61. package/training/47-kpi-countdown.md +151 -0
  62. package/training/48-fetchReportData.md +276 -0
  63. package/training/49-printLayout.md +215 -0
  64. package/training/examples/01-login-form.json +176 -0
  65. package/training/examples/02-contact-form.json +141 -0
  66. package/training/examples/03-kpi-cards-row.json +123 -0
  67. package/training/examples/04-settings-toggles.json +153 -0
  68. package/training/examples/05-user-profile-card.json +136 -0
  69. package/training/examples/06-date-range-filter.json +108 -0
  70. package/training/examples/07-search-bar-results.json +130 -0
  71. package/training/examples/08-notification-settings.json +131 -0
  72. package/training/examples/09-employee-profile-form.json +259 -0
  73. package/training/examples/10-invoice-form.json +241 -0
  74. package/training/examples/11-dashboard-overview.json +251 -0
  75. package/training/examples/12-registration-wizard.json +154 -0
  76. package/training/examples/13-product-catalog.json +168 -0
  77. package/training/examples/14-data-table-with-filters.json +180 -0
  78. package/training/examples/15-tabbed-profile.json +92 -0
  79. package/training/examples/16-kpi-full-row.json +203 -0
  80. package/training/examples/17-tree-detail-view.json +139 -0
  81. package/training/examples/18-employee-management.json +233 -0
  82. package/training/examples/19-sales-dashboard.json +272 -0
  83. package/training/examples/20-checkout-wizard.json +225 -0
  84. package/training/examples/21-analytics-page.json +222 -0
  85. package/training/examples/22-hr-onboarding.json +222 -0
  86. package/training/examples/23-document-browser.json +241 -0
  87. package/training/examples/24-order-management.json +290 -0
  88. package/training/examples/25-crm-contact-page.json +272 -0
@@ -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
+ ```
@@ -0,0 +1,126 @@
1
+ # Component: wizard
2
+
3
+ A multi-step stepper form. Contains `wizard-step` children. Handles navigation (Back/Next/Finish) with optional linear enforcement and lifecycle hooks.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier for the wizard. |
12
+ | `orientation` | select | `horizontal` — stepper bar across the top. `vertical` — stepper on the left side. |
13
+ | `variant` | select | `standard` — step numbers above connector lines. `alternativeLabel` — step labels below the circles. |
14
+ | `linear` | boolean | `true` (default) forces sequential completion — user cannot jump to a later step without completing previous. `false` allows clicking any step. |
15
+ | `hideNavigation` | boolean | `true` hides Back/Next/Finish buttons. Use when you control navigation via custom buttons in step content. |
16
+ | `activeStep` | expression | Controlled active step index. When set, wizard is fully controlled from external state. |
17
+ | `backLabel` | expression | Label for the Back button. Default: `"Back"`. |
18
+ | `nextLabel` | expression | Label for the Next button. Default: `"Next"`. |
19
+ | `finishLabel` | expression | Label for the Finish button on the last step. Default: `"Finish"`. |
20
+ | `nextColor` | select | `primary` · `secondary` · `success` · `error` · `warning` · `info` · `inherit` |
21
+ | `nextVariant` | select | `text` · `outlined` · `contained` |
22
+ | `backColor` | select | Same options as nextColor. |
23
+ | `backVariant` | select | Same options as nextVariant. |
24
+ | `onStepChange` | code | Runs when the active step changes. Available variables: `from`, `to`, `direction` (`"next"` / `"back"` / `"jump"`), `goToStep`, `nextStep`, `prevStep`. |
25
+ | `onFinish` | code | Runs when the user clicks Finish on the last step. Available variables: `goToStep`, `nextStep`, `prevStep`. |
26
+
27
+ ---
28
+
29
+ ## Props — Style Tab
30
+
31
+ No dedicated style tab. Layout via parent cell.
32
+
33
+ ---
34
+
35
+ ## Props — Actions Tab
36
+
37
+ No action tab — use `onStepChange` and `onFinish` code fields in Main.
38
+
39
+ ---
40
+
41
+ ## Use Cases
42
+
43
+ **When to use:**
44
+ - Multi-step registration/onboarding forms.
45
+ - Checkout flows: Cart → Shipping → Payment → Review.
46
+ - Guided configuration wizards.
47
+ - Any process where steps have dependencies and need validation before proceeding.
48
+
49
+ **When NOT to use:**
50
+ - Simple tabbed content without sequential logic → use `menu`.
51
+ - Unlimited, non-linear navigation → use `menu`.
52
+ - Single form that doesn't need step structure.
53
+
54
+ ---
55
+
56
+ ## Schema Examples
57
+
58
+ ### Basic 3-step wizard
59
+ ```json
60
+ {
61
+ "type": "wizard",
62
+ "props": {
63
+ "key": "registrationWizard",
64
+ "orientation": "horizontal",
65
+ "variant": "standard",
66
+ "linear": true,
67
+ "nextLabel": "Continue",
68
+ "finishLabel": "Submit Registration",
69
+ "nextColor": "primary",
70
+ "nextVariant": "contained"
71
+ },
72
+ "children": [
73
+ {
74
+ "type": "wizard-step",
75
+ "props": {
76
+ "key": "personal",
77
+ "label": "Personal Info",
78
+ "description": "Your basic details"
79
+ },
80
+ "children": [
81
+ { "type": "input", "props": { "key": "firstName", "label": "First Name", "required": true } },
82
+ { "type": "input", "props": { "key": "lastName", "label": "Last Name", "required": true } }
83
+ ]
84
+ },
85
+ {
86
+ "type": "wizard-step",
87
+ "props": {
88
+ "key": "contact",
89
+ "label": "Contact",
90
+ "description": "How to reach you"
91
+ },
92
+ "children": [
93
+ { "type": "input", "props": { "key": "email", "label": "Email", "required": true } },
94
+ { "type": "input", "props": { "key": "phone", "label": "Phone" } }
95
+ ]
96
+ },
97
+ {
98
+ "type": "wizard-step",
99
+ "props": {
100
+ "key": "confirm",
101
+ "label": "Review & Submit"
102
+ },
103
+ "children": [
104
+ { "type": "label", "props": { "text": "Please review your details before submitting.", "variant": "body2" } }
105
+ ]
106
+ }
107
+ ]
108
+ }
109
+ ```
110
+
111
+ ### Wizard with onFinish submission
112
+ ```json
113
+ {
114
+ "type": "wizard",
115
+ "props": {
116
+ "key": "checkoutWizard",
117
+ "orientation": "horizontal",
118
+ "linear": true,
119
+ "finishLabel": "Place Order",
120
+ "nextColor": "primary",
121
+ "nextVariant": "contained",
122
+ "onFinish": "submitOrder({ cart: data.cart, shipping: form })"
123
+ },
124
+ "children": []
125
+ }
126
+ ```
@@ -0,0 +1,92 @@
1
+ # Component: wizard-step
2
+
3
+ A single step inside a `wizard`. Must be a direct child of `wizard`. Contains the form fields or content for that step.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Step identifier. Used in navigation logic. |
12
+ | `label` | expression | Step label shown in the stepper header, e.g. `"Personal Info"`. |
13
+ | `description` | expression | Short subtitle shown below the step label in the stepper. |
14
+ | `optional` | boolean | `true` shows `"(Optional)"` below the step label. |
15
+ | `completed` | expression | Expression returning `true` marks the step with a checkmark icon. |
16
+ | `error` | expression | Expression returning `true` marks the step in error state (red). |
17
+ | `onEnter` | code | Runs when this step becomes active. Available: `stepIndex`, `goToStep`, `nextStep`, `prevStep`. Use to load data or reset form state. |
18
+ | `onNext` | code | Runs before leaving this step when clicking Next. Return `true`/`undefined` to allow navigation. Return `false` to silently block. Return a string to block and display as an error message. Available: `stepIndex`, `goToStep`, `nextStep`, `prevStep`. |
19
+
20
+ ---
21
+
22
+ ## Props — Style Tab
23
+
24
+ No dedicated style tab.
25
+
26
+ ---
27
+
28
+ ## Props — Actions Tab
29
+
30
+ No action tab — lifecycle code is in the Main tab via `onEnter` and `onNext`.
31
+
32
+ ---
33
+
34
+ ## Use Cases
35
+
36
+ - Each step in a `wizard` flow.
37
+ - `onNext` for step validation: return `"Email is required"` if `!form.email`.
38
+ - `onEnter` to pre-load data for the step: fetch the user's address when entering the shipping step.
39
+ - `completed` expression to show a green checkmark when step data is valid.
40
+ - `error` expression to highlight a step that failed server-side validation.
41
+
42
+ ---
43
+
44
+ ## Schema Examples
45
+
46
+ ### Step with validation
47
+ ```json
48
+ {
49
+ "type": "wizard-step",
50
+ "props": {
51
+ "key": "personalInfo",
52
+ "label": "Personal Info",
53
+ "description": "Your basic details",
54
+ "required": false,
55
+ "onNext": "if (!form.firstName || !form.email) return 'Please fill in all required fields.'"
56
+ },
57
+ "children": [
58
+ { "type": "input", "props": { "key": "firstName", "label": "First Name", "required": true } },
59
+ { "type": "input", "props": { "key": "email", "label": "Email", "required": true } }
60
+ ]
61
+ }
62
+ ```
63
+
64
+ ### Step with data load on enter
65
+ ```json
66
+ {
67
+ "type": "wizard-step",
68
+ "props": {
69
+ "key": "shipping",
70
+ "label": "Shipping",
71
+ "onEnter": "fetchAddresses({ userId: data.userId })"
72
+ },
73
+ "children": [
74
+ { "type": "dropdown", "props": { "key": "addressId", "label": "Select Address", "options": "data.addresses" } }
75
+ ]
76
+ }
77
+ ```
78
+
79
+ ### Optional step with completion indicator
80
+ ```json
81
+ {
82
+ "type": "wizard-step",
83
+ "props": {
84
+ "key": "documents",
85
+ "label": "Documents",
86
+ "optional": true,
87
+ "completed": "data.documentsUploaded",
88
+ "error": "data.documentError"
89
+ },
90
+ "children": []
91
+ }
92
+ ```
@@ -0,0 +1,123 @@
1
+ # Component: repeater
2
+
3
+ Renders a template multiple times — once per item in an array (or a fixed count). Each repetition has its own scoped `dataItem` and `itemIndex` available in expressions.
4
+
5
+ ---
6
+
7
+ ## Props — Main Tab
8
+
9
+ | Prop | Type | Options / Notes |
10
+ |------|------|-----------------|
11
+ | `key` | expression | Unique identifier. When combined with `dataKey`, the complete array is accessible at `data[key]`. |
12
+ | `items` | expression | Array of objects to iterate, e.g. `data.employees`. Each item is exposed as `dataItem` in child expressions. |
13
+ | `count` | expression | Fixed number of repetitions when `items` is not set. The repeater generates `count` empty slots. |
14
+ | `dataKey` | expression | Parent data key where item values are stored/read back. When set, each item's inputs write to `data[dataKey][index]`, and the full array is readable at `data[dataKey]`. |
15
+ | `itemKey` | expression | Property on each item to use as the React key for stable rendering, e.g. `"id"`. Falls back to index. |
16
+ | `widgetId` | expression | ID of a saved widget to render as the item template. When set, the repeater fetches that widget and renders it instead of inline children. |
17
+ | `direction` | select | `vertical` — items stack top-to-bottom. `horizontal` — items flow left-to-right. `wrap` — horizontal flow that wraps to next line. |
18
+ | `gap` | expression | Spacing between items, e.g. `"16px"`. |
19
+
20
+ ---
21
+
22
+ ## Props — Style Tab
23
+
24
+ No dedicated style tab. Control via parent layout-cell.
25
+
26
+ ---
27
+
28
+ ## Props — Actions Tab
29
+
30
+ No actions. Each child component inside the repeater handles its own events.
31
+
32
+ ---
33
+
34
+ ## Available Variables Inside Repeater Children
35
+
36
+ - `dataItem` — the current item object from `items` array.
37
+ - `itemIndex` — the zero-based index of the current item.
38
+ - `data[dataKey][itemIndex]` — scoped form data for this item's inputs.
39
+
40
+ ---
41
+
42
+ ## Use Cases
43
+
44
+ **When to use:**
45
+ - Rendering a list of cards: employee cards, product tiles.
46
+ - Line-item entry: invoice lines, order items (with `dataKey` for editable rows).
47
+ - Dynamic form: "Add another contact" pattern.
48
+ - Grid of similar items: photo gallery, tag list.
49
+
50
+ **When NOT to use:**
51
+ - Tabular data with sorting/filtering → use `dataGrid`.
52
+ - Static content that doesn't repeat → use `layout` cells.
53
+ - Server-paged large datasets → use `reportViewer`.
54
+
55
+ ---
56
+
57
+ ## Schema Examples
58
+
59
+ ### Read-only list of employee cards
60
+ ```json
61
+ {
62
+ "type": "repeater",
63
+ "props": {
64
+ "key": "employeeList",
65
+ "items": "data.employees",
66
+ "itemKey": "id",
67
+ "direction": "vertical",
68
+ "gap": "12px"
69
+ },
70
+ "children": [
71
+ {
72
+ "type": "layout-cell",
73
+ "style": { "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 1px 4px rgba(0,0,0,0.08)" },
74
+ "children": [
75
+ { "type": "header", "props": { "text": "dataItem.name", "variant": "h6" } },
76
+ { "type": "label", "props": { "text": "dataItem.role", "variant": "body2", "color": "textSecondary" } }
77
+ ]
78
+ }
79
+ ]
80
+ }
81
+ ```
82
+
83
+ ### Editable line items (with dataKey)
84
+ ```json
85
+ {
86
+ "type": "repeater",
87
+ "props": {
88
+ "key": "invoiceLines",
89
+ "items": "data.lines",
90
+ "dataKey": "lines",
91
+ "itemKey": "id",
92
+ "direction": "vertical",
93
+ "gap": "8px"
94
+ },
95
+ "children": [
96
+ {
97
+ "type": "layout",
98
+ "props": { "cols": 3, "gap": 8 },
99
+ "children": [
100
+ { "type": "layout-cell", "children": [{ "type": "input", "props": { "key": "description", "label": "Description", "value": "dataItem.description" } }] },
101
+ { "type": "layout-cell", "children": [{ "type": "number", "props": { "key": "qty", "label": "Qty", "value": "dataItem.qty" } }] },
102
+ { "type": "layout-cell", "children": [{ "type": "number", "props": { "key": "price", "label": "Price", "value": "dataItem.price", "formatType": "currency", "currencySymbol": "$" } }] }
103
+ ]
104
+ }
105
+ ]
106
+ }
107
+ ```
108
+
109
+ ### Fixed count (no data)
110
+ ```json
111
+ {
112
+ "type": "repeater",
113
+ "props": {
114
+ "key": "ratings",
115
+ "count": 5,
116
+ "direction": "horizontal",
117
+ "gap": "8px"
118
+ },
119
+ "children": [
120
+ { "type": "label", "props": { "text": "itemIndex + 1 + ' - Rating slot'", "variant": "caption" } }
121
+ ]
122
+ }
123
+ ```