mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
feat(styles): create global styles entry point and organize global styles feat(styles): implement base HTML element styles and utility classes for flexbox feat(styles): establish layout, position, spacing, and text utility classes feat(styles): introduce mixins for animations, cards, dialogs, flexbox, grid, and responsive design test(quick_guide): add component and metadata validation tests for quick_guide package test(ui_level6): implement metadata validation tests for ui_level6 package
29 lines
705 B
QML
29 lines
705 B
QML
import QtQuick
|
|
|
|
/**
|
|
* CLabel.qml - Form label (mirrors _label.scss)
|
|
* Styled label for form inputs
|
|
*/
|
|
Text {
|
|
id: root
|
|
|
|
property string size: "md" // sm, md, lg
|
|
property bool required: false
|
|
property bool disabled: false
|
|
|
|
color: disabled ? Theme.onSurfaceVariant : Theme.onSurface
|
|
opacity: disabled ? 0.6 : 1
|
|
|
|
font.pixelSize: {
|
|
switch (size) {
|
|
case "sm": return StyleVariables.fontSizeXs
|
|
case "lg": return StyleVariables.fontSizeMd
|
|
default: return StyleVariables.fontSizeSm
|
|
}
|
|
}
|
|
font.weight: Font.Medium
|
|
|
|
// Append asterisk for required fields
|
|
text: text + (required ? " *" : "")
|
|
}
|