mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-06 19:49:36 +00:00
c406b8df96
Move FakeMUI content to appropriate root-level folders by implementation:
**React Components → components/fakemui/**
- 537 components (inputs, surfaces, layout, data-display, feedback,
navigation, utils, atoms, lab, x, email, workflows)
- 416 SVG icons
- Full barrel exports in components/fakemui/index.ts
**QML Components → qml/**
- 104 Material Design 3 components (11 categories)
- 7 hybrid application views
- 8 desktop widgets
- qmldir module registration
**Python Bindings → python/fakemui/**
- 15 PyQt6 modules (120+ components)
- Full Python package structure with pyproject.toml
**SCSS/Styles → fakemui/** (renamed purpose)
- scss/ - Material Design 3 stylesheets
- styles/ - Component SCSS modules
- src/utils/ - Accessibility utilities
- index.ts now re-exports from components/fakemui/
This separation allows:
- React: import { Button } from '@metabuilder/components/fakemui'
- QML: import QmlComponents 1.0
- Python: from fakemui import Button, Card
- Backward compat: import { Button } from '@metabuilder/fakemui'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
60 lines
1.5 KiB
QML
60 lines
1.5 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
/**
|
|
* CFormGroup.qml - Form field container (mirrors _form.scss)
|
|
* Groups label, input, and helper/error text
|
|
*/
|
|
ColumnLayout {
|
|
id: root
|
|
|
|
property string label: ""
|
|
property string helperText: ""
|
|
property string errorText: ""
|
|
property bool required: false
|
|
property bool disabled: false
|
|
|
|
default property alias content: contentArea.data
|
|
|
|
spacing: StyleVariables.spacingXs
|
|
|
|
// Label
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 2
|
|
visible: root.label !== ""
|
|
|
|
Text {
|
|
text: root.label
|
|
color: root.disabled ? Theme.onSurfaceVariant : Theme.onSurface
|
|
font.pixelSize: StyleVariables.fontSizeSm
|
|
font.weight: Font.Medium
|
|
opacity: root.disabled ? 0.6 : 1
|
|
}
|
|
|
|
Text {
|
|
text: "*"
|
|
color: Theme.error
|
|
font.pixelSize: StyleVariables.fontSizeSm
|
|
visible: root.required
|
|
}
|
|
}
|
|
|
|
// Content slot (for input)
|
|
Item {
|
|
id: contentArea
|
|
Layout.fillWidth: true
|
|
implicitHeight: childrenRect.height
|
|
}
|
|
|
|
// Helper or error text
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: root.errorText || root.helperText
|
|
color: root.errorText ? Theme.error : Theme.onSurfaceVariant
|
|
font.pixelSize: StyleVariables.fontSizeXs
|
|
visible: text !== ""
|
|
wrapMode: Text.Wrap
|
|
}
|
|
}
|