@@ -25,7 +25,7 @@ import {
2525} from "../../generators/withExposing" ;
2626import { formDataChildren , FormDataPropertyView } from "../formComp/formDataConstants" ;
2727import { styleControl } from "comps/controls/styleControl" ;
28- import { DateTimeStyle , DateTimeStyleType } from "comps/controls/styleControlConstants" ;
28+ import { AnimationStyle , DateTimeStyle , DateTimeStyleType , InputFieldStyle , LabelStyle } from "comps/controls/styleControlConstants" ;
2929import { withMethodExposing } from "../../generators/withMethodExposing" ;
3030import {
3131 disabledPropertyView ,
@@ -76,7 +76,13 @@ const commonChildren = {
7676 hourStep : RangeControl . closed ( 1 , 24 , 1 ) ,
7777 minuteStep : RangeControl . closed ( 1 , 60 , 1 ) ,
7878 secondStep : RangeControl . closed ( 1 , 60 , 1 ) ,
79- style : styleControl ( DateTimeStyle , 'style' ) ,
79+ style : styleControl ( InputFieldStyle , 'style' ) ,
80+ animationStyle : styleControl ( AnimationStyle , 'animationStyle' ) ,
81+ labelStyle : styleControl (
82+ LabelStyle . filter ( ( style ) => [ 'accent' , 'validate' ] . includes ( style . name ) === false ) ,
83+ 'labelStyle' ,
84+ ) ,
85+ inputFieldStyle : styleControl ( DateTimeStyle , 'inputFieldStyle' ) ,
8086 suffixIcon : withDefault ( IconControl , "/icon:regular/clock" ) ,
8187 viewRef : RefControl < CommonPickerMethods > ,
8288 ...validationChildren ,
@@ -144,7 +150,7 @@ export const timePickerControl = new UICompBuilder(childrenMap, (props, dispatch
144150 const compType = useContext ( CompTypeContext ) ;
145151 const compTheme = theme ?. theme ?. components ?. [ compType ] ;
146152 const styleProps : Record < string , any > = { } ;
147- [ 'style' ] . forEach ( ( key : string ) => {
153+ [ 'style' , 'labelStyle' , 'inputFieldStyle' , 'animationStyle' ] . forEach ( ( key : string ) => {
148154 styleProps [ key ] = ( props as any ) [ key ] ;
149155 } ) ;
150156
@@ -164,10 +170,13 @@ export const timePickerControl = new UICompBuilder(childrenMap, (props, dispatch
164170 return props . label ( {
165171 required : props . required ,
166172 style : props . style ,
173+ labelStyle : props . labelStyle ,
174+ inputFieldStyle :props . inputFieldStyle ,
175+ animationStyle :props . animationStyle ,
167176 children : (
168177 < TimeUIView
169178 viewRef = { props . viewRef }
170- $style = { props . style }
179+ $style = { props . inputFieldStyle }
171180 disabled = { props . disabled }
172181 value = { time ?. isValid ( ) ? time : null }
173182 disabledTime = { ( ) => disabledTime ( props . minTime , props . maxTime ) }
@@ -234,9 +243,20 @@ export const timePickerControl = new UICompBuilder(childrenMap, (props, dispatch
234243 ) }
235244
236245 { ( useContext ( EditorContext ) . editorModeStatus === "layout" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
237- < Section name = { sectionNames . style } >
238- { children . style . getPropertyView ( ) }
239- </ Section >
246+ < >
247+ < Section name = { sectionNames . style } >
248+ { children . style . getPropertyView ( ) }
249+ </ Section >
250+ < Section name = { sectionNames . labelStyle } >
251+ { children . labelStyle . getPropertyView ( ) }
252+ </ Section >
253+ < Section name = { sectionNames . inputFieldStyle } >
254+ { children . inputFieldStyle . getPropertyView ( ) }
255+ </ Section >
256+ < Section name = { sectionNames . animationStyle } hasTooltip = { true } >
257+ { children . animationStyle . getPropertyView ( ) }
258+ </ Section >
259+ </ >
240260 ) }
241261 </ >
242262 ) )
@@ -255,7 +275,7 @@ export const timeRangeControl = (function () {
255275 const compType = useContext ( CompTypeContext ) ;
256276 const compTheme = theme ?. theme ?. components ?. [ compType ] ;
257277 const styleProps : Record < string , any > = { } ;
258- [ 'style' ] . forEach ( ( key : string ) => {
278+ [ 'style' , 'labelStyle' , 'inputFieldStyle' , 'animationStyle' ] . forEach ( ( key : string ) => {
259279 styleProps [ key ] = ( props as any ) [ key ] ;
260280 } ) ;
261281
@@ -280,7 +300,7 @@ export const timeRangeControl = (function () {
280300 const children = (
281301 < TimeRangeUIView
282302 viewRef = { props . viewRef }
283- $style = { props . style }
303+ $style = { props . inputFieldStyle }
284304 disabled = { props . disabled }
285305 start = { start ?. isValid ( ) ? start : null }
286306 end = { end ?. isValid ( ) ? end : null }
@@ -307,6 +327,9 @@ export const timeRangeControl = (function () {
307327 return props . label ( {
308328 required : props . required ,
309329 style : props . style ,
330+ labelStyle : props . labelStyle ,
331+ inputFieldStyle :props . inputFieldStyle ,
332+ animationStyle :props . animationStyle ,
310333 children : children ,
311334 ...( startResult . validateStatus !== "success"
312335 ? startResult
@@ -359,9 +382,20 @@ export const timeRangeControl = (function () {
359382 ) }
360383
361384 { ( useContext ( EditorContext ) . editorModeStatus === "layout" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
362- < Section name = { sectionNames . style } >
363- { children . style . getPropertyView ( ) }
364- </ Section >
385+ < >
386+ < Section name = { sectionNames . style } >
387+ { children . style . getPropertyView ( ) }
388+ </ Section >
389+ < Section name = { sectionNames . labelStyle } >
390+ { children . labelStyle . getPropertyView ( ) }
391+ </ Section >
392+ < Section name = { sectionNames . inputFieldStyle } >
393+ { children . inputFieldStyle . getPropertyView ( ) }
394+ </ Section >
395+ < Section name = { sectionNames . animationStyle } hasTooltip = { true } >
396+ { children . animationStyle . getPropertyView ( ) }
397+ </ Section >
398+ </ >
365399 ) }
366400 </ >
367401 ) )
0 commit comments