Files
low-code-react-app-b/src/components/json-definitions/label.json
johndoe6345789 eb8a8689fb feat: migrate Tier 3 atoms batch 6 - Slider through Tooltip (17 components)
Migrate the following components from TSX to JSON-driven architecture:
- Slider - range input control with label and value display
- Spinner - rotating loading indicator with Phosphor icons
- StatusIcon - saved/synced status indicators
- StepIndicator - step-by-step progress display
- Stepper - numbered step progression indicator
- Switch - toggle control with optional label
- Table - data table with columns and row handling
- Tabs - tabbed navigation with active state
- Tag - inline tag/badge with optional remove button
- TextArea - multiline text input with error state
- TextGradient - gradient text effect component
- TextHighlight - highlighted/emphasized text span
- Timeline - vertical timeline with status indicators
- Timestamp - date/time display with relative formatting
- Toggle - simple toggle switch control
- Tooltip - popover tooltip with positioning

Created:
- 17 TypeScript interface files in src/lib/json-ui/interfaces/
- 17 JSON definition files in src/components/json-definitions/
- Updated json-components.ts with imports and exports
- Updated json-components-registry.json to mark components as jsonCompatible

All components are pure JSON with no custom hooks required (stateless rendering).
Build successfully completes with no errors.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-21 01:43:09 +00:00

45 lines
1.1 KiB
JSON

{
"id": "label-wrapper",
"type": "label",
"bindings": {
"htmlFor": {
"source": "htmlFor",
"transform": "data"
},
"className": {
"source": ["required", "className"],
"transform": "const required = data[0]; const className = data[1] || ''; const baseClasses = 'text-sm font-medium text-foreground leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'; return required ? `${baseClasses} ${className}`.trim() : `${baseClasses} ${className}`.trim()"
},
"children": [
{
"id": "label-content",
"type": "span",
"bindings": {
"children": {
"source": "children",
"transform": "data"
}
}
},
{
"id": "label-required-indicator",
"type": "span",
"bindings": {
"className": {
"source": null,
"transform": "'text-destructive ml-1'"
},
"children": {
"source": null,
"transform": "'*'"
},
"_if": {
"source": "required",
"transform": "data"
}
}
}
]
}
}