mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-01 17:24:57 +00:00
ORGANIZED INTO 4 MAIN CATEGORIES: - react/ React TypeScript components (145 components + Python bindings) - qml/ QML desktop components (104+ QML components) - python/ Python package implementations - legacy/ Utilities, contexts, and migration-in-progress code SUPPORTING FOLDERS (kept as-is): - icons/ 421 SVG icons - theming/ Material Design 3 theme system - styles/ SCSS modules and utilities - scss/ SCSS preprocessor files - docs/ Documentation files STRUCTURE IMPROVEMENTS: ✅ All code preserved (nothing deleted) ✅ Clear separation by implementation type ✅ Better navigation and discoverability ✅ Easy to find what you need ✅ Professional organization DOCUMENTATION: - Added STRUCTURE.md explaining the new layout - Updated folder organization with clear purpose - Maintained all original functionality All files reorganized while keeping full functionality intact. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
68 lines
1.5 KiB
TypeScript
68 lines
1.5 KiB
TypeScript
import React, { forwardRef } from 'react'
|
|
import { FormLabel } from './FormLabel'
|
|
import { FormHelperText } from './FormHelperText'
|
|
import { Input } from './Input'
|
|
|
|
export interface TimePickerProps {
|
|
label?: React.ReactNode
|
|
helperText?: React.ReactNode
|
|
error?: boolean
|
|
value?: string
|
|
onChange?: (value: string) => void
|
|
min?: string
|
|
max?: string
|
|
disabled?: boolean
|
|
required?: boolean
|
|
className?: string
|
|
step?: number
|
|
placeholder?: string
|
|
}
|
|
|
|
export const TimePicker = forwardRef<HTMLInputElement, TimePickerProps>(
|
|
(
|
|
{
|
|
label,
|
|
helperText,
|
|
error,
|
|
value,
|
|
onChange,
|
|
min,
|
|
max,
|
|
disabled,
|
|
required,
|
|
className = '',
|
|
step,
|
|
placeholder,
|
|
...props
|
|
},
|
|
ref
|
|
) => {
|
|
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
onChange?.(e.target.value)
|
|
}
|
|
|
|
return (
|
|
<div className={`time-picker ${error ? 'time-picker--error' : ''} ${className}`}>
|
|
{label && <FormLabel required={required}>{label}</FormLabel>}
|
|
<Input
|
|
ref={ref}
|
|
type="time"
|
|
value={value}
|
|
onChange={handleChange}
|
|
min={min}
|
|
max={max}
|
|
disabled={disabled}
|
|
required={required}
|
|
error={error}
|
|
step={step}
|
|
placeholder={placeholder}
|
|
{...props}
|
|
/>
|
|
{helperText && <FormHelperText error={error}>{helperText}</FormHelperText>}
|
|
</div>
|
|
)
|
|
}
|
|
)
|
|
|
|
TimePicker.displayName = 'TimePicker'
|