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.
- package/INTEGRATION.md +6 -0
- package/LICENSE +65 -0
- package/README.md +166 -21
- package/docs/ReportViewer.md +581 -0
- package/docs/fetchReportData.md +379 -0
- package/docs/printLayout.md +405 -0
- package/package.json +29 -1
- package/src/lib/index.js +14 -0
- package/src/lib/muiTheme.js +655 -0
- package/src/lib/providers/RoboByteFrontBuilderProvider.jsx +45 -1
- package/src/pages/_app.js +1 -0
- package/src/pages/printBuilder/index.jsx +26 -19
- package/src/pages/viewBuilder/index.jsx +29 -19
- package/training/00-index.md +168 -0
- package/training/01-input.md +144 -0
- package/training/02-checkbox.md +107 -0
- package/training/03-dropdown.md +135 -0
- package/training/04-datepicker.md +139 -0
- package/training/05-radio.md +123 -0
- package/training/06-number.md +133 -0
- package/training/07-textarea.md +114 -0
- package/training/08-richtext.md +112 -0
- package/training/09-tag.md +110 -0
- package/training/10-time.md +107 -0
- package/training/11-toggle.md +108 -0
- package/training/12-signature.md +107 -0
- package/training/13-autocomplete.md +134 -0
- package/training/14-button.md +168 -0
- package/training/15-label.md +138 -0
- package/training/16-header.md +128 -0
- package/training/17-divider.md +96 -0
- package/training/18-image.md +105 -0
- package/training/19-link.md +108 -0
- package/training/20-banner.md +122 -0
- package/training/21-progress-circle.md +101 -0
- package/training/22-progress-line.md +93 -0
- package/training/23-menu.md +139 -0
- package/training/24-popover.md +114 -0
- package/training/25-layout.md +116 -0
- package/training/26-layout-cell.md +143 -0
- package/training/27-card.md +87 -0
- package/training/28-wizard.md +126 -0
- package/training/29-wizard-step.md +92 -0
- package/training/30-repeater.md +123 -0
- package/training/31-dialog.md +131 -0
- package/training/32-breadcrumb.md +121 -0
- package/training/33-dataGrid.md +129 -0
- package/training/34-dataTableViewer.md +115 -0
- package/training/35-reportViewer.md +673 -0
- package/training/36-viewRenderer.md +110 -0
- package/training/37-treeView.md +170 -0
- package/training/38-kpi-metric.md +148 -0
- package/training/39-kpi-trend.md +105 -0
- package/training/40-kpi-badge.md +112 -0
- package/training/41-kpi-statusDot.md +118 -0
- package/training/42-kpi-iconBox.md +114 -0
- package/training/43-kpi-gauge.md +143 -0
- package/training/44-kpi-bulletChart.md +126 -0
- package/training/45-kpi-colorScale.md +143 -0
- package/training/46-kpi-rating.md +125 -0
- package/training/47-kpi-countdown.md +151 -0
- package/training/48-fetchReportData.md +276 -0
- package/training/49-printLayout.md +215 -0
- package/training/examples/01-login-form.json +176 -0
- package/training/examples/02-contact-form.json +141 -0
- package/training/examples/03-kpi-cards-row.json +123 -0
- package/training/examples/04-settings-toggles.json +153 -0
- package/training/examples/05-user-profile-card.json +136 -0
- package/training/examples/06-date-range-filter.json +108 -0
- package/training/examples/07-search-bar-results.json +130 -0
- package/training/examples/08-notification-settings.json +131 -0
- package/training/examples/09-employee-profile-form.json +259 -0
- package/training/examples/10-invoice-form.json +241 -0
- package/training/examples/11-dashboard-overview.json +251 -0
- package/training/examples/12-registration-wizard.json +154 -0
- package/training/examples/13-product-catalog.json +168 -0
- package/training/examples/14-data-table-with-filters.json +180 -0
- package/training/examples/15-tabbed-profile.json +92 -0
- package/training/examples/16-kpi-full-row.json +203 -0
- package/training/examples/17-tree-detail-view.json +139 -0
- package/training/examples/18-employee-management.json +233 -0
- package/training/examples/19-sales-dashboard.json +272 -0
- package/training/examples/20-checkout-wizard.json +225 -0
- package/training/examples/21-analytics-page.json +222 -0
- package/training/examples/22-hr-onboarding.json +222 -0
- package/training/examples/23-document-browser.json +241 -0
- package/training/examples/24-order-management.json +290 -0
- package/training/examples/25-crm-contact-page.json +272 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Component: button
|
|
2
|
+
|
|
3
|
+
A clickable action button. Supports form submission, reset, custom code, icons, and tooltip.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `key` | expression | Optional identifier for targeting or referencing. |
|
|
12
|
+
| `label` | expression | Button text. Can be any expression returning a string. |
|
|
13
|
+
| `variant` | select | `text` — no background. `outlined` — border only. `contained` — filled background. |
|
|
14
|
+
| `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` · `inherit` |
|
|
15
|
+
| `size` | select | `small` · `medium` · `large` |
|
|
16
|
+
| `prefix` | icon | Icon shown before the label (left icon). |
|
|
17
|
+
| `suffix` | icon | Icon shown after the label (right icon). |
|
|
18
|
+
| `tooltip` | expression | Tooltip text shown on hover. |
|
|
19
|
+
| `iconButton` | boolean | `true` renders as a circular icon-only button (no label). Pair with `prefix`. |
|
|
20
|
+
| `disabled` | boolean | Makes the button non-clickable. |
|
|
21
|
+
| `fullWidth` | boolean | Stretches button to 100% of its container. |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Props — Style Tab
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Options / Notes |
|
|
28
|
+
|------|------|-----------------|
|
|
29
|
+
| `background` | expression | CSS background shorthand, e.g. `"linear-gradient(45deg, #FE6B8B, #FF8E53)"`. |
|
|
30
|
+
| `backgroundColor` | expression | Solid background color, e.g. `"#1976d2"`. |
|
|
31
|
+
| `color` | expression | Text/icon color, e.g. `"#ffffff"`. |
|
|
32
|
+
| `borderRadius` | expression | Border radius, e.g. `"8px"` or `"50%"`. |
|
|
33
|
+
| `boxShadow` | expression | Box shadow, e.g. `"0 4px 12px rgba(0,0,0,0.2)"`. |
|
|
34
|
+
| `border` | expression | Full border shorthand, e.g. `"2px solid #1976d2"`. |
|
|
35
|
+
| `borderColor` | expression | Border color only. |
|
|
36
|
+
| `textTransform` | select | `none` · `uppercase` · `lowercase` · `capitalize` |
|
|
37
|
+
| `fontWeight` | expression | Font weight, e.g. `"600"`. |
|
|
38
|
+
| `fontSize` | expression | Font size, e.g. `"14px"`. |
|
|
39
|
+
| `letterSpacing` | expression | Letter spacing, e.g. `"0.05em"`. |
|
|
40
|
+
| `width` | expression | Button width, e.g. `"160px"`. |
|
|
41
|
+
| `height` | expression | Button height. |
|
|
42
|
+
| `padding` | expression | Inner padding override. |
|
|
43
|
+
| `margin` | expression | Outer margin. |
|
|
44
|
+
| `display` | expression | CSS display. |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Props — Actions Tab
|
|
49
|
+
|
|
50
|
+
| Event | Type | Notes |
|
|
51
|
+
|-------|------|-------|
|
|
52
|
+
| `onClick` | action | `submit` — submits the parent form. `reset` — resets all form fields. `custom` — runs custom code. |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Use Cases
|
|
57
|
+
|
|
58
|
+
**When to use:**
|
|
59
|
+
- Form submit/save buttons (`onClick: submit`).
|
|
60
|
+
- Form reset/clear buttons (`onClick: reset`).
|
|
61
|
+
- Navigation triggers: go to next step, open dialog, navigate to another view.
|
|
62
|
+
- API calls: save record, delete, approve.
|
|
63
|
+
- Icon-only action buttons in toolbars (`iconButton: true`).
|
|
64
|
+
|
|
65
|
+
**When NOT to use:**
|
|
66
|
+
- Navigation links → use `link`.
|
|
67
|
+
- Tab switching → use `menu`.
|
|
68
|
+
- Toggle state → use `toggle`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Schema Examples
|
|
73
|
+
|
|
74
|
+
### Primary submit button
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"type": "button",
|
|
78
|
+
"props": {
|
|
79
|
+
"key": "submitBtn",
|
|
80
|
+
"label": "Save",
|
|
81
|
+
"variant": "contained",
|
|
82
|
+
"color": "primary",
|
|
83
|
+
"fullWidth": true,
|
|
84
|
+
"prefix": "SaveOutlined"
|
|
85
|
+
},
|
|
86
|
+
"actions": {
|
|
87
|
+
"onClick": { "type": "submit" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Custom action button
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"type": "button",
|
|
96
|
+
"props": {
|
|
97
|
+
"label": "Approve",
|
|
98
|
+
"variant": "contained",
|
|
99
|
+
"color": "success",
|
|
100
|
+
"prefix": "CheckCircleOutlined",
|
|
101
|
+
"tooltip": "Approve this request"
|
|
102
|
+
},
|
|
103
|
+
"actions": {
|
|
104
|
+
"onClick": {
|
|
105
|
+
"type": "custom",
|
|
106
|
+
"code": "approveRequest({ id: data.request.id }); setData({ approved: true })"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Icon-only button
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"type": "button",
|
|
116
|
+
"props": {
|
|
117
|
+
"key": "refreshBtn",
|
|
118
|
+
"iconButton": true,
|
|
119
|
+
"prefix": "RefreshOutlined",
|
|
120
|
+
"tooltip": "Refresh data",
|
|
121
|
+
"color": "primary",
|
|
122
|
+
"size": "small"
|
|
123
|
+
},
|
|
124
|
+
"actions": {
|
|
125
|
+
"onClick": {
|
|
126
|
+
"type": "custom",
|
|
127
|
+
"code": "refreshData()"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Danger / destructive button
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"type": "button",
|
|
137
|
+
"props": {
|
|
138
|
+
"label": "Delete",
|
|
139
|
+
"variant": "outlined",
|
|
140
|
+
"color": "error",
|
|
141
|
+
"prefix": "DeleteOutlined"
|
|
142
|
+
},
|
|
143
|
+
"style": {
|
|
144
|
+
"borderRadius": "4px"
|
|
145
|
+
},
|
|
146
|
+
"actions": {
|
|
147
|
+
"onClick": {
|
|
148
|
+
"type": "custom",
|
|
149
|
+
"code": "openDialog('confirmDelete')"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Reset form button
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"type": "button",
|
|
159
|
+
"props": {
|
|
160
|
+
"label": "Reset",
|
|
161
|
+
"variant": "text",
|
|
162
|
+
"color": "inherit"
|
|
163
|
+
},
|
|
164
|
+
"actions": {
|
|
165
|
+
"onClick": { "type": "reset" }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Component: label
|
|
2
|
+
|
|
3
|
+
A text display element using MUI Typography. Use for body text, captions, subtitles, and data display. Not interactive.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `text` | expression | The text to display. Can be any expression: `data.userName`, `"Static text"`, `data.count + " items"`. |
|
|
12
|
+
| `prefix` | icon | Icon shown before the text. |
|
|
13
|
+
| `suffix` | icon | Icon shown after the text. |
|
|
14
|
+
| `iconSize` | expression | Size of both prefix and suffix icons when `prefix`/`suffix` share a size, e.g. `"20px"`. |
|
|
15
|
+
| `iconColor` | expression | Color of both icons, e.g. `"primary.main"`. |
|
|
16
|
+
| `prefixSize` | expression | Size of prefix icon specifically. |
|
|
17
|
+
| `prefixColor` | expression | Color of prefix icon specifically. |
|
|
18
|
+
| `suffixSize` | expression | Size of suffix icon specifically. |
|
|
19
|
+
| `suffixColor` | expression | Color of suffix icon specifically. |
|
|
20
|
+
| `iconGap` | expression | Gap between icon and text, e.g. `"8px"`. |
|
|
21
|
+
| `variant` | select | `body1` · `body2` · `caption` · `overline` · `subtitle1` · `subtitle2` — MUI Typography variant controlling font size/weight. |
|
|
22
|
+
| `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` · `textPrimary` · `textSecondary` |
|
|
23
|
+
| `align` | select | `left` · `center` · `right` · `justify` |
|
|
24
|
+
| `gutterBottom` | boolean | Adds bottom margin equal to one line-height. |
|
|
25
|
+
| `noWrap` | boolean | Prevents text wrapping; shows ellipsis on overflow. |
|
|
26
|
+
| `paragraph` | boolean | Renders as a `<p>` element with paragraph margins. |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Props — Style Tab
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Options / Notes |
|
|
33
|
+
|------|------|-----------------|
|
|
34
|
+
| `elementStyle` | expression | CSS object override applied to the wrapper element. |
|
|
35
|
+
| `elementCss` | expression | CSS string override applied to the wrapper element. |
|
|
36
|
+
| `display` | expression | CSS display. |
|
|
37
|
+
| `width` | expression | Wrapper width. |
|
|
38
|
+
| `height` | expression | Wrapper height. |
|
|
39
|
+
| `margin` | expression | Outer spacing. |
|
|
40
|
+
| `padding` | expression | Inner padding. |
|
|
41
|
+
| `fontSize` | expression | Font size override, e.g. `"16px"`. |
|
|
42
|
+
| `fontWeight` | expression | Font weight, e.g. `"600"`. |
|
|
43
|
+
| `lineHeight` | expression | Line height, e.g. `"1.5"`. |
|
|
44
|
+
| `letterSpacing` | expression | Letter spacing, e.g. `"0.05em"`. |
|
|
45
|
+
| `textTransform` | expression | CSS text-transform, e.g. `"uppercase"`. |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Props — Actions Tab
|
|
50
|
+
|
|
51
|
+
No actions. Label is display-only. Use `link` or `button` for clickable text.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Use Cases
|
|
56
|
+
|
|
57
|
+
**When to use:**
|
|
58
|
+
- Displaying field values in read-only detail views.
|
|
59
|
+
- Body text, descriptions, helper text.
|
|
60
|
+
- Captions below images or charts.
|
|
61
|
+
- Metadata display: created at, updated by, status text.
|
|
62
|
+
- Small labels with icons (e.g. status indicators).
|
|
63
|
+
|
|
64
|
+
**When NOT to use:**
|
|
65
|
+
- Page/section titles → use `header`.
|
|
66
|
+
- Clickable text → use `link` or `button`.
|
|
67
|
+
- Data that needs formatting (currency, dates) → display through KPI components.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Schema Examples
|
|
72
|
+
|
|
73
|
+
### Simple body text
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"type": "label",
|
|
77
|
+
"props": {
|
|
78
|
+
"text": "Welcome to the dashboard",
|
|
79
|
+
"variant": "body1",
|
|
80
|
+
"color": "textPrimary"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Dynamic value display
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"type": "label",
|
|
89
|
+
"props": {
|
|
90
|
+
"text": "data.user.fullName",
|
|
91
|
+
"variant": "subtitle1",
|
|
92
|
+
"color": "primary",
|
|
93
|
+
"align": "left"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### With prefix icon
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"type": "label",
|
|
102
|
+
"props": {
|
|
103
|
+
"text": "data.record.status",
|
|
104
|
+
"prefix": "CircleOutlined",
|
|
105
|
+
"prefixColor": "success.main",
|
|
106
|
+
"prefixSize": "12px",
|
|
107
|
+
"iconGap": "6px",
|
|
108
|
+
"variant": "body2",
|
|
109
|
+
"color": "textSecondary"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Caption text
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"type": "label",
|
|
118
|
+
"props": {
|
|
119
|
+
"text": "Last updated: data.lastUpdated",
|
|
120
|
+
"variant": "caption",
|
|
121
|
+
"color": "textSecondary",
|
|
122
|
+
"align": "right"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Truncated single line
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"type": "label",
|
|
131
|
+
"props": {
|
|
132
|
+
"text": "data.item.description",
|
|
133
|
+
"variant": "body2",
|
|
134
|
+
"noWrap": true,
|
|
135
|
+
"color": "textSecondary"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Component: header
|
|
2
|
+
|
|
3
|
+
A heading text element using MUI Typography h1–h6 variants. Use for page titles, section headings, and card titles.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `text` | expression | The heading text. Can be an expression or static string. |
|
|
12
|
+
| `prefix` | icon | Icon shown before the heading text. |
|
|
13
|
+
| `suffix` | icon | Icon shown after the heading text. |
|
|
14
|
+
| `iconSize` | expression | Size of both icons, e.g. `"24px"`. |
|
|
15
|
+
| `iconColor` | expression | Color of both icons, e.g. `"primary.main"`. |
|
|
16
|
+
| `prefixSize` | expression | Size of prefix icon specifically. |
|
|
17
|
+
| `prefixColor` | expression | Color of prefix icon. |
|
|
18
|
+
| `suffixSize` | expression | Size of suffix icon specifically. |
|
|
19
|
+
| `suffixColor` | expression | Color of suffix icon. |
|
|
20
|
+
| `iconGap` | expression | Gap between icon and text, e.g. `"8px"`. |
|
|
21
|
+
| `variant` | select | `h1` · `h2` · `h3` · `h4` · `h5` · `h6` — Controls visual size/weight. |
|
|
22
|
+
| `component` | select | `h1` · `h2` · `h3` · `h4` · `h5` · `h6` · `div` · `span` — Actual HTML tag rendered. Set independently from `variant` for SEO control. |
|
|
23
|
+
| `color` | select | `default` · `primary` · `secondary` · `error` · `warning` · `info` · `success` · `textPrimary` · `textSecondary` |
|
|
24
|
+
| `align` | select | `left` · `center` · `right` · `justify` |
|
|
25
|
+
| `gutterBottom` | boolean | Adds bottom margin equal to one line-height. |
|
|
26
|
+
| `noWrap` | boolean | Prevents wrapping; shows ellipsis on overflow. |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Props — Style Tab
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Options / Notes |
|
|
33
|
+
|------|------|-----------------|
|
|
34
|
+
| `elementStyle` | expression | CSS object override applied to the wrapper element. |
|
|
35
|
+
| `elementCss` | expression | CSS string override applied to the wrapper element. |
|
|
36
|
+
| `display` | expression | CSS display. |
|
|
37
|
+
| `width` | expression | Wrapper width. |
|
|
38
|
+
| `height` | expression | Wrapper height. |
|
|
39
|
+
| `margin` | expression | Outer spacing. |
|
|
40
|
+
| `padding` | expression | Inner padding. |
|
|
41
|
+
| `fontSize` | expression | Font size override, e.g. `"28px"`. |
|
|
42
|
+
| `fontWeight` | expression | Font weight override, e.g. `"800"`. |
|
|
43
|
+
| `lineHeight` | expression | Line height. |
|
|
44
|
+
| `letterSpacing` | expression | Letter spacing, e.g. `"-0.02em"`. |
|
|
45
|
+
| `textTransform` | expression | CSS text-transform, e.g. `"uppercase"`. |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Props — Actions Tab
|
|
50
|
+
|
|
51
|
+
No actions. Header is display-only.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Use Cases
|
|
56
|
+
|
|
57
|
+
**When to use:**
|
|
58
|
+
- Page title at the top of a view.
|
|
59
|
+
- Section headings to divide content areas.
|
|
60
|
+
- Card/panel titles.
|
|
61
|
+
- Any prominent text that needs h1–h6 semantic weight.
|
|
62
|
+
|
|
63
|
+
**When NOT to use:**
|
|
64
|
+
- Body text or descriptions → use `label`.
|
|
65
|
+
- Clickable heading → use `link` styled with a heading variant.
|
|
66
|
+
- Metric values → use KPI components.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Schema Examples
|
|
71
|
+
|
|
72
|
+
### Page title
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"type": "header",
|
|
76
|
+
"props": {
|
|
77
|
+
"text": "Employee Profile",
|
|
78
|
+
"variant": "h4",
|
|
79
|
+
"component": "h1",
|
|
80
|
+
"color": "textPrimary",
|
|
81
|
+
"gutterBottom": true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Section heading with icon
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"type": "header",
|
|
90
|
+
"props": {
|
|
91
|
+
"text": "Contact Information",
|
|
92
|
+
"variant": "h6",
|
|
93
|
+
"component": "h2",
|
|
94
|
+
"prefix": "ContactMailOutlined",
|
|
95
|
+
"prefixColor": "primary.main",
|
|
96
|
+
"iconGap": "8px",
|
|
97
|
+
"color": "primary"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Dynamic heading from data
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"type": "header",
|
|
106
|
+
"props": {
|
|
107
|
+
"text": "data.project.name",
|
|
108
|
+
"variant": "h5",
|
|
109
|
+
"component": "h2",
|
|
110
|
+
"align": "center",
|
|
111
|
+
"color": "textPrimary"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Centered dashboard title
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"type": "header",
|
|
120
|
+
"props": {
|
|
121
|
+
"text": "Sales Dashboard",
|
|
122
|
+
"variant": "h3",
|
|
123
|
+
"component": "h1",
|
|
124
|
+
"align": "center",
|
|
125
|
+
"color": "primary"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Component: divider
|
|
2
|
+
|
|
3
|
+
A thin horizontal or vertical line used to visually separate sections. Can include optional center text.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `text` | expression | Optional label text displayed in the middle of the divider line. Leave blank for a plain line. |
|
|
12
|
+
| `orientation` | select | `horizontal` · `vertical` — Direction of the divider line. |
|
|
13
|
+
| `variant` | select | `fullWidth` — spans full width. `inset` — indented on the left. `middle` — indented on both sides. |
|
|
14
|
+
| `textAlign` | select | `center` · `left` · `right` — Position of the text label on the line. |
|
|
15
|
+
| `flexItem` | boolean | `true` when the divider is inside a flex container and acts as a flex child (needed for vertical dividers in flex rows). |
|
|
16
|
+
| `light` | boolean | Renders with lighter opacity (faded). |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Props — Style Tab
|
|
21
|
+
|
|
22
|
+
No dedicated style tab. Control wrapper spacing with parent layout-cell style.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Props — Actions Tab
|
|
27
|
+
|
|
28
|
+
No actions. Divider is purely decorative.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Use Cases
|
|
33
|
+
|
|
34
|
+
**When to use:**
|
|
35
|
+
- Visually separating form sections (e.g. "Personal Info" vs "Contact Info").
|
|
36
|
+
- Dividing cards or panels into distinct areas.
|
|
37
|
+
- Labelled sections: a horizontal line with text "OR" between login options.
|
|
38
|
+
- Vertical separator between two side-by-side elements (set `orientation: vertical`, `flexItem: true`).
|
|
39
|
+
|
|
40
|
+
**When NOT to use:**
|
|
41
|
+
- Complex multi-column separation → use layout with borders on cells.
|
|
42
|
+
- Spacing alone → use layout cell padding/gap instead.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Schema Examples
|
|
47
|
+
|
|
48
|
+
### Plain horizontal divider
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"type": "divider",
|
|
52
|
+
"props": {
|
|
53
|
+
"orientation": "horizontal",
|
|
54
|
+
"variant": "fullWidth"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Labelled section divider
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"type": "divider",
|
|
63
|
+
"props": {
|
|
64
|
+
"text": "Personal Information",
|
|
65
|
+
"orientation": "horizontal",
|
|
66
|
+
"variant": "fullWidth",
|
|
67
|
+
"textAlign": "left"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### "OR" divider between login options
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"type": "divider",
|
|
76
|
+
"props": {
|
|
77
|
+
"text": "OR",
|
|
78
|
+
"orientation": "horizontal",
|
|
79
|
+
"variant": "middle",
|
|
80
|
+
"textAlign": "center",
|
|
81
|
+
"light": true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Vertical separator in flex row
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"type": "divider",
|
|
90
|
+
"props": {
|
|
91
|
+
"orientation": "vertical",
|
|
92
|
+
"flexItem": true,
|
|
93
|
+
"variant": "fullWidth"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Component: image
|
|
2
|
+
|
|
3
|
+
Renders an image from a URL. Supports sizing, object-fit, and border-radius for various display contexts.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `src` | expression | Image URL. Can be a static URL string or a data-bound expression: `data.user.avatar`. |
|
|
12
|
+
| `alt` | expression | Alternative text for accessibility. |
|
|
13
|
+
| `width` | expression | Image display width, e.g. `"100%"`, `"200px"`, `"auto"`. |
|
|
14
|
+
| `height` | expression | Image display height, e.g. `"150px"`, `"auto"`. |
|
|
15
|
+
| `objectFit` | select | `cover` — scales to fill box, crops edges. `contain` — scales to fit within box, adds letterbox. `fill` — stretches to fill (may distort). `none` — original size. `scale-down` — smallest of `contain` or `none`. |
|
|
16
|
+
| `borderRadius` | expression | Rounds the corners, e.g. `"8px"`, `"50%"` for a circle/avatar. |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Props — Style Tab
|
|
21
|
+
|
|
22
|
+
No dedicated style tab. Control wrapper through parent layout-cell style.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Props — Actions Tab
|
|
27
|
+
|
|
28
|
+
No dedicated action events for image.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Use Cases
|
|
33
|
+
|
|
34
|
+
**When to use:**
|
|
35
|
+
- User avatars (circular with `borderRadius: "50%"`).
|
|
36
|
+
- Product images in cards.
|
|
37
|
+
- Logo display in headers.
|
|
38
|
+
- Background-style decorative images within a card.
|
|
39
|
+
- Thumbnails in a repeater list.
|
|
40
|
+
|
|
41
|
+
**When NOT to use:**
|
|
42
|
+
- SVG icons → use the `icon` type in prefix/suffix or `kpi-icon-box`.
|
|
43
|
+
- Background color/pattern → use layout-cell `backgroundImage` style prop.
|
|
44
|
+
- Charts/visualizations → use KPI components.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Schema Examples
|
|
49
|
+
|
|
50
|
+
### Basic image
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"type": "image",
|
|
54
|
+
"props": {
|
|
55
|
+
"src": "data.product.imageUrl",
|
|
56
|
+
"alt": "Product image",
|
|
57
|
+
"width": "100%",
|
|
58
|
+
"height": "200px",
|
|
59
|
+
"objectFit": "cover"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Circular avatar
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"type": "image",
|
|
68
|
+
"props": {
|
|
69
|
+
"src": "data.user.avatarUrl",
|
|
70
|
+
"alt": "data.user.name",
|
|
71
|
+
"width": "80px",
|
|
72
|
+
"height": "80px",
|
|
73
|
+
"objectFit": "cover",
|
|
74
|
+
"borderRadius": "50%"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Logo in header
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"type": "image",
|
|
83
|
+
"props": {
|
|
84
|
+
"src": "/images/logo.png",
|
|
85
|
+
"alt": "Company Logo",
|
|
86
|
+
"height": "40px",
|
|
87
|
+
"objectFit": "contain"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Thumbnail with rounded corners
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"type": "image",
|
|
96
|
+
"props": {
|
|
97
|
+
"src": "data.item.thumbnail",
|
|
98
|
+
"alt": "data.item.title",
|
|
99
|
+
"width": "120px",
|
|
100
|
+
"height": "90px",
|
|
101
|
+
"objectFit": "cover",
|
|
102
|
+
"borderRadius": "8px"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|