mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-25 14:14:57 +00:00
Merge pull request #57 from johndoe6345789/codex/refactor-large-components-into-subcomponents
Refactor schema editor views and move UI copy/options to JSON
This commit is contained in:
16
src/data/schema-editor/component-tree.json
Normal file
16
src/data/schema-editor/component-tree.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"icon": "tree",
|
||||
"title": "Component Tree",
|
||||
"subtitle": {
|
||||
"singular": "component",
|
||||
"plural": "components"
|
||||
},
|
||||
"tooltips": {
|
||||
"expandAll": "Expand All",
|
||||
"collapseAll": "Collapse All"
|
||||
},
|
||||
"emptyState": {
|
||||
"title": "No components yet",
|
||||
"description": "Drag components from the palette"
|
||||
}
|
||||
}
|
||||
91
src/data/schema-editor/property-editor.json
Normal file
91
src/data/schema-editor/property-editor.json
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"icon": "sliders",
|
||||
"title": "Properties",
|
||||
"emptyState": {
|
||||
"title": "No component selected",
|
||||
"description": "Select a component to edit its properties"
|
||||
},
|
||||
"sections": {
|
||||
"componentProps": "Component Properties",
|
||||
"commonProps": "Common Properties"
|
||||
},
|
||||
"commonProps": [
|
||||
{
|
||||
"name": "className",
|
||||
"label": "CSS Classes",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"typeSpecificProps": {
|
||||
"Button": [
|
||||
{
|
||||
"name": "variant",
|
||||
"label": "Variant",
|
||||
"type": "select",
|
||||
"options": [
|
||||
{ "label": "Default", "value": "default" },
|
||||
{ "label": "Destructive", "value": "destructive" },
|
||||
{ "label": "Outline", "value": "outline" },
|
||||
{ "label": "Secondary", "value": "secondary" },
|
||||
{ "label": "Ghost", "value": "ghost" },
|
||||
{ "label": "Link", "value": "link" }
|
||||
]
|
||||
},
|
||||
{ "name": "children", "label": "Text", "type": "text" },
|
||||
{ "name": "disabled", "label": "Disabled", "type": "boolean" }
|
||||
],
|
||||
"Input": [
|
||||
{ "name": "placeholder", "label": "Placeholder", "type": "text" },
|
||||
{
|
||||
"name": "type",
|
||||
"label": "Type",
|
||||
"type": "select",
|
||||
"options": [
|
||||
{ "label": "Text", "value": "text" },
|
||||
{ "label": "Password", "value": "password" },
|
||||
{ "label": "Email", "value": "email" },
|
||||
{ "label": "Number", "value": "number" }
|
||||
]
|
||||
},
|
||||
{ "name": "disabled", "label": "Disabled", "type": "boolean" }
|
||||
],
|
||||
"Heading": [
|
||||
{
|
||||
"name": "level",
|
||||
"label": "Level",
|
||||
"type": "select",
|
||||
"options": [
|
||||
{ "label": "H1", "value": "1" },
|
||||
{ "label": "H2", "value": "2" },
|
||||
{ "label": "H3", "value": "3" },
|
||||
{ "label": "H4", "value": "4" }
|
||||
]
|
||||
},
|
||||
{ "name": "children", "label": "Text", "type": "text" }
|
||||
],
|
||||
"Text": [
|
||||
{ "name": "children", "label": "Content", "type": "textarea" }
|
||||
],
|
||||
"Badge": [
|
||||
{
|
||||
"name": "variant",
|
||||
"label": "Variant",
|
||||
"type": "select",
|
||||
"options": [
|
||||
{ "label": "Default", "value": "default" },
|
||||
{ "label": "Secondary", "value": "secondary" },
|
||||
{ "label": "Destructive", "value": "destructive" },
|
||||
{ "label": "Outline", "value": "outline" }
|
||||
]
|
||||
},
|
||||
{ "name": "children", "label": "Text", "type": "text" }
|
||||
],
|
||||
"Progress": [
|
||||
{ "name": "value", "label": "Value", "type": "number" }
|
||||
],
|
||||
"Grid": [
|
||||
{ "name": "columns", "label": "Columns", "type": "number" },
|
||||
{ "name": "gap", "label": "Gap", "type": "number" }
|
||||
]
|
||||
}
|
||||
}
|
||||
18
src/data/schema-editor/schema-editor-page.json
Normal file
18
src/data/schema-editor/schema-editor-page.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"schema": {
|
||||
"id": "custom-page",
|
||||
"name": "Custom Page",
|
||||
"layout": {
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"export": {
|
||||
"fileName": "schema.json"
|
||||
},
|
||||
"import": {
|
||||
"accept": ".json"
|
||||
},
|
||||
"preview": {
|
||||
"message": "Preview mode coming soon"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user