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.
- package/LICENSE +65 -0
- package/README.md +57 -0
- package/docs/ReportViewer.md +581 -0
- package/docs/fetchReportData.md +379 -0
- package/docs/printLayout.md +405 -0
- package/package.json +29 -1
- 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,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
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Component: link
|
|
2
|
+
|
|
3
|
+
A styled clickable hyperlink using MUI's Link component. Can navigate externally or trigger in-app navigation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `text` | expression | Link display text, e.g. `"View Details"` or `data.label`. |
|
|
12
|
+
| `href` | expression | Target URL, e.g. `"/users/data.id"` or `"https://example.com"`. |
|
|
13
|
+
| `target` | select | `_self` — current tab. `_blank` — new tab. `_parent` · `_top` — frame contexts. |
|
|
14
|
+
| `rel` | text | `rel` attribute for security, e.g. `"noopener noreferrer"` when using `_blank`. |
|
|
15
|
+
| `variant` | select | Typography variant: `body1` · `body2` · `button` · `caption` · `h1` · `h2` · `h3` · `h4` · `h5` · `h6` |
|
|
16
|
+
| `color` | select | `primary` · `secondary` · `error` · `warning` · `info` · `success` · `inherit` · `textPrimary` · `textSecondary` |
|
|
17
|
+
| `underline` | select | `none` — never underlined. `hover` — underline on hover. `always` — always underlined. |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Props — Style Tab
|
|
22
|
+
|
|
23
|
+
No dedicated style tab. Use parent layout-cell style for spacing.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Props — Actions Tab
|
|
28
|
+
|
|
29
|
+
No action events. Use `href` for navigation. For click-handler behavior use `button` instead.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Use Cases
|
|
34
|
+
|
|
35
|
+
**When to use:**
|
|
36
|
+
- Navigating to an external URL.
|
|
37
|
+
- In-app navigation using a URL path.
|
|
38
|
+
- Inline hyperlinks within text content.
|
|
39
|
+
- "View more", "See details", "Download" type text links.
|
|
40
|
+
|
|
41
|
+
**When NOT to use:**
|
|
42
|
+
- Click triggers without navigation (open dialog, call API) → use `button`.
|
|
43
|
+
- Navigation that requires passing state → use `button` with custom action.
|
|
44
|
+
- Tab navigation → use `menu`.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Schema Examples
|
|
49
|
+
|
|
50
|
+
### External link opening in new tab
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"type": "link",
|
|
54
|
+
"props": {
|
|
55
|
+
"text": "Visit Website",
|
|
56
|
+
"href": "data.company.website",
|
|
57
|
+
"target": "_blank",
|
|
58
|
+
"rel": "noopener noreferrer",
|
|
59
|
+
"color": "primary",
|
|
60
|
+
"underline": "hover"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### In-app navigation link
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"type": "link",
|
|
69
|
+
"props": {
|
|
70
|
+
"text": "View Profile",
|
|
71
|
+
"href": "'/users/' + data.user.id",
|
|
72
|
+
"target": "_self",
|
|
73
|
+
"color": "primary",
|
|
74
|
+
"variant": "body2",
|
|
75
|
+
"underline": "none"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Download link
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"type": "link",
|
|
84
|
+
"props": {
|
|
85
|
+
"text": "Download Report",
|
|
86
|
+
"href": "data.report.downloadUrl",
|
|
87
|
+
"target": "_blank",
|
|
88
|
+
"color": "secondary",
|
|
89
|
+
"variant": "button",
|
|
90
|
+
"underline": "hover"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Inline caption link
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"type": "link",
|
|
99
|
+
"props": {
|
|
100
|
+
"text": "Terms & Conditions",
|
|
101
|
+
"href": "/terms",
|
|
102
|
+
"target": "_blank",
|
|
103
|
+
"variant": "caption",
|
|
104
|
+
"color": "textSecondary",
|
|
105
|
+
"underline": "always"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Component: banner
|
|
2
|
+
|
|
3
|
+
An alert/notification banner (MUI Alert). Displays informational, success, warning, or error messages. Can be dismissed.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `key` | expression | Unique identifier, used to reference the banner's open state. |
|
|
12
|
+
| `message` | expression | Primary message text shown in the banner. |
|
|
13
|
+
| `title` | expression | Optional bold title above the message. |
|
|
14
|
+
| `severity` | select | `info` · `success` · `warning` · `error` — Sets color scheme and default icon. |
|
|
15
|
+
| `variant` | select | `standard` — colored text on light tinted background. `filled` — solid color background with white text. `outlined` — bordered with colored text. |
|
|
16
|
+
| `open` | expression | Controlled visibility. Bind to `data.showBanner` to show/hide programmatically. Leave blank for the component to manage its own state. |
|
|
17
|
+
| `dismissible` | boolean | Shows an × close button so the user can dismiss the banner. |
|
|
18
|
+
| `icon` | boolean | `true` shows the default severity icon (info/check/warning/error). `false` hides it. |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Props — Style Tab
|
|
23
|
+
|
|
24
|
+
No dedicated style tab. Control wrapper through parent layout-cell style.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Props — Actions Tab
|
|
29
|
+
|
|
30
|
+
| Event | Type | Notes |
|
|
31
|
+
|-------|------|-------|
|
|
32
|
+
| `onClose` | action | Fires when the user clicks the dismiss (×) button. Use to reset `data.showBanner` or clear error state. |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Use Cases
|
|
37
|
+
|
|
38
|
+
**When to use:**
|
|
39
|
+
- System notifications: success after saving, errors from APIs.
|
|
40
|
+
- Form-level validation errors (e.g. "Please fix the errors below").
|
|
41
|
+
- Contextual information banners: "This record is in read-only mode".
|
|
42
|
+
- Dismissible alerts that the user can close.
|
|
43
|
+
|
|
44
|
+
**When NOT to use:**
|
|
45
|
+
- Toast/snackbar messages (ephemeral, auto-dismiss) → handle via action code.
|
|
46
|
+
- Single-field validation → use field-level error states.
|
|
47
|
+
- Status indicators → use `kpi-badge` or `kpi-status-dot`.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Schema Examples
|
|
52
|
+
|
|
53
|
+
### Always-visible info banner
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"type": "banner",
|
|
57
|
+
"props": {
|
|
58
|
+
"message": "This form is in draft mode. Changes are not saved automatically.",
|
|
59
|
+
"severity": "info",
|
|
60
|
+
"variant": "standard",
|
|
61
|
+
"icon": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Dismissible error banner controlled by data
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"type": "banner",
|
|
70
|
+
"props": {
|
|
71
|
+
"key": "errorBanner",
|
|
72
|
+
"title": "Error",
|
|
73
|
+
"message": "data.apiError",
|
|
74
|
+
"severity": "error",
|
|
75
|
+
"variant": "filled",
|
|
76
|
+
"open": "!!data.apiError",
|
|
77
|
+
"dismissible": true
|
|
78
|
+
},
|
|
79
|
+
"actions": {
|
|
80
|
+
"onClose": {
|
|
81
|
+
"type": "custom",
|
|
82
|
+
"code": "setData({ apiError: null })"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Success confirmation
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"type": "banner",
|
|
92
|
+
"props": {
|
|
93
|
+
"key": "successBanner",
|
|
94
|
+
"title": "Saved",
|
|
95
|
+
"message": "Your changes have been saved successfully.",
|
|
96
|
+
"severity": "success",
|
|
97
|
+
"variant": "outlined",
|
|
98
|
+
"open": "data.saved",
|
|
99
|
+
"dismissible": true
|
|
100
|
+
},
|
|
101
|
+
"actions": {
|
|
102
|
+
"onClose": {
|
|
103
|
+
"type": "custom",
|
|
104
|
+
"code": "setData({ saved: false })"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Warning about missing data
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"type": "banner",
|
|
114
|
+
"props": {
|
|
115
|
+
"message": "Some required fields are incomplete.",
|
|
116
|
+
"severity": "warning",
|
|
117
|
+
"variant": "standard",
|
|
118
|
+
"open": "data.hasValidationErrors",
|
|
119
|
+
"icon": true
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Component: progress-circle
|
|
2
|
+
|
|
3
|
+
A circular progress indicator. Determinate (shows a specific % value) or indeterminate (spinning animation).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `value` | expression | Progress value from `0` to `100`. Only used when `variant: determinate`. Can be bound to data: `data.uploadProgress`. |
|
|
12
|
+
| `variant` | select | `determinate` — fills arc based on `value`. `indeterminate` — continuous spinning animation. |
|
|
13
|
+
| `color` | select | `primary` · `secondary` · `error` · `info` · `success` · `warning` · `inherit` |
|
|
14
|
+
| `size` | number | Diameter of the circle in pixels. Default: `40`. |
|
|
15
|
+
| `thickness` | number | Stroke thickness of the arc. Default: `3.6`. |
|
|
16
|
+
| `showValue` | boolean | `true` displays the numeric percentage in the center of the circle. |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Props — Style Tab
|
|
21
|
+
|
|
22
|
+
No dedicated style tab. Position/spacing via parent layout-cell style.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Props — Actions Tab
|
|
27
|
+
|
|
28
|
+
No actions. Progress circle is display-only.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Use Cases
|
|
33
|
+
|
|
34
|
+
**When to use:**
|
|
35
|
+
- Loading indicators while waiting for an API call.
|
|
36
|
+
- File upload progress (bind `value` to `data.uploadPercent`).
|
|
37
|
+
- Task completion percentage in a card.
|
|
38
|
+
- Score or rating displayed as a filled arc (e.g. 75% completion).
|
|
39
|
+
|
|
40
|
+
**When NOT to use:**
|
|
41
|
+
- Horizontal progress bar → use `progress-line`.
|
|
42
|
+
- Numeric-only value display → use `kpi-metric`.
|
|
43
|
+
- Complex gauge with min/max → use `kpi-gauge`.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Schema Examples
|
|
48
|
+
|
|
49
|
+
### Indeterminate loading spinner
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"type": "progress-circle",
|
|
53
|
+
"props": {
|
|
54
|
+
"variant": "indeterminate",
|
|
55
|
+
"color": "primary",
|
|
56
|
+
"size": 48
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Upload progress with percentage label
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"type": "progress-circle",
|
|
65
|
+
"props": {
|
|
66
|
+
"value": "data.uploadProgress",
|
|
67
|
+
"variant": "determinate",
|
|
68
|
+
"color": "success",
|
|
69
|
+
"size": 80,
|
|
70
|
+
"thickness": 5,
|
|
71
|
+
"showValue": true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Completion indicator in a card
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"type": "progress-circle",
|
|
80
|
+
"props": {
|
|
81
|
+
"value": "data.task.completionPercent",
|
|
82
|
+
"variant": "determinate",
|
|
83
|
+
"color": "primary",
|
|
84
|
+
"size": 60,
|
|
85
|
+
"showValue": true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Small inline loading
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"type": "progress-circle",
|
|
94
|
+
"props": {
|
|
95
|
+
"variant": "indeterminate",
|
|
96
|
+
"color": "inherit",
|
|
97
|
+
"size": 20,
|
|
98
|
+
"thickness": 4
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Component: progress-line
|
|
2
|
+
|
|
3
|
+
A horizontal progress bar. Determinate (value-driven), indeterminate (animation), buffer, or query variants.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Props — Main Tab
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Options / Notes |
|
|
10
|
+
|------|------|-----------------|
|
|
11
|
+
| `value` | expression | Progress value from `0` to `100`. Used for `determinate` and `buffer` variants. |
|
|
12
|
+
| `variant` | select | `determinate` — fills based on `value`. `indeterminate` — continuous moving animation. `buffer` — shows primary fill + secondary buffer fill. `query` — reverse animation (for query in progress). |
|
|
13
|
+
| `color` | select | `primary` · `secondary` · `error` · `info` · `success` · `warning` · `inherit` |
|
|
14
|
+
| `showValue` | boolean | `true` displays the percentage as text above/below the bar. |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Props — Style Tab
|
|
19
|
+
|
|
20
|
+
No dedicated style tab. Control wrapper through parent layout-cell style.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Props — Actions Tab
|
|
25
|
+
|
|
26
|
+
No actions. Progress-line is display-only.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Use Cases
|
|
31
|
+
|
|
32
|
+
**When to use:**
|
|
33
|
+
- File upload progress bar.
|
|
34
|
+
- Form step completion indicator.
|
|
35
|
+
- Loading state for a data fetch.
|
|
36
|
+
- Skill/proficiency level bars in a profile.
|
|
37
|
+
|
|
38
|
+
**When NOT to use:**
|
|
39
|
+
- Circular loading → use `progress-circle`.
|
|
40
|
+
- Complex gauge with min/max labels → use `kpi-gauge` or `kpi-bullet`.
|
|
41
|
+
- Horizontal bar chart → use `kpi-bullet` or a chart component.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Schema Examples
|
|
46
|
+
|
|
47
|
+
### Simple upload progress bar
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"type": "progress-line",
|
|
51
|
+
"props": {
|
|
52
|
+
"value": "data.uploadPercent",
|
|
53
|
+
"variant": "determinate",
|
|
54
|
+
"color": "primary",
|
|
55
|
+
"showValue": true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Indeterminate loading
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"type": "progress-line",
|
|
64
|
+
"props": {
|
|
65
|
+
"variant": "indeterminate",
|
|
66
|
+
"color": "primary"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Skill level bar (static or data-driven)
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"type": "progress-line",
|
|
75
|
+
"props": {
|
|
76
|
+
"value": "data.skill.level",
|
|
77
|
+
"variant": "determinate",
|
|
78
|
+
"color": "success"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Buffer variant
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"type": "progress-line",
|
|
87
|
+
"props": {
|
|
88
|
+
"value": "data.downloaded",
|
|
89
|
+
"variant": "buffer",
|
|
90
|
+
"color": "secondary"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|