@@ -25,7 +25,7 @@ import {
25
25
} from "../../generators/withExposing" ;
26
26
import { formDataChildren , FormDataPropertyView } from "../formComp/formDataConstants" ;
27
27
import { styleControl } from "comps/controls/styleControl" ;
28
- import { DateTimeStyle , DateTimeStyleType } from "comps/controls/styleControlConstants" ;
28
+ import { AnimationStyle , DateTimeStyle , DateTimeStyleType , InputFieldStyle , LabelStyle } from "comps/controls/styleControlConstants" ;
29
29
import { withMethodExposing } from "../../generators/withMethodExposing" ;
30
30
import {
31
31
disabledPropertyView ,
@@ -76,7 +76,13 @@ const commonChildren = {
76
76
hourStep : RangeControl . closed ( 1 , 24 , 1 ) ,
77
77
minuteStep : RangeControl . closed ( 1 , 60 , 1 ) ,
78
78
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' ) ,
80
86
suffixIcon : withDefault ( IconControl , "/icon:regular/clock" ) ,
81
87
viewRef : RefControl < CommonPickerMethods > ,
82
88
...validationChildren ,
@@ -144,7 +150,7 @@ export const timePickerControl = new UICompBuilder(childrenMap, (props, dispatch
144
150
const compType = useContext ( CompTypeContext ) ;
145
151
const compTheme = theme ?. theme ?. components ?. [ compType ] ;
146
152
const styleProps : Record < string , any > = { } ;
147
- [ 'style' ] . forEach ( ( key : string ) => {
153
+ [ 'style' , 'labelStyle' , 'inputFieldStyle' , 'animationStyle' ] . forEach ( ( key : string ) => {
148
154
styleProps [ key ] = ( props as any ) [ key ] ;
149
155
} ) ;
150
156
@@ -164,10 +170,13 @@ export const timePickerControl = new UICompBuilder(childrenMap, (props, dispatch
164
170
return props . label ( {
165
171
required : props . required ,
166
172
style : props . style ,
173
+ labelStyle : props . labelStyle ,
174
+ inputFieldStyle :props . inputFieldStyle ,
175
+ animationStyle :props . animationStyle ,
167
176
children : (
168
177
< TimeUIView
169
178
viewRef = { props . viewRef }
170
- $style = { props . style }
179
+ $style = { props . inputFieldStyle }
171
180
disabled = { props . disabled }
172
181
value = { time ?. isValid ( ) ? time : null }
173
182
disabledTime = { ( ) => disabledTime ( props . minTime , props . maxTime ) }
@@ -234,9 +243,20 @@ export const timePickerControl = new UICompBuilder(childrenMap, (props, dispatch
234
243
) }
235
244
236
245
{ ( 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
+ </ >
240
260
) }
241
261
</ >
242
262
) )
@@ -255,7 +275,7 @@ export const timeRangeControl = (function () {
255
275
const compType = useContext ( CompTypeContext ) ;
256
276
const compTheme = theme ?. theme ?. components ?. [ compType ] ;
257
277
const styleProps : Record < string , any > = { } ;
258
- [ 'style' ] . forEach ( ( key : string ) => {
278
+ [ 'style' , 'labelStyle' , 'inputFieldStyle' , 'animationStyle' ] . forEach ( ( key : string ) => {
259
279
styleProps [ key ] = ( props as any ) [ key ] ;
260
280
} ) ;
261
281
@@ -280,7 +300,7 @@ export const timeRangeControl = (function () {
280
300
const children = (
281
301
< TimeRangeUIView
282
302
viewRef = { props . viewRef }
283
- $style = { props . style }
303
+ $style = { props . inputFieldStyle }
284
304
disabled = { props . disabled }
285
305
start = { start ?. isValid ( ) ? start : null }
286
306
end = { end ?. isValid ( ) ? end : null }
@@ -307,6 +327,9 @@ export const timeRangeControl = (function () {
307
327
return props . label ( {
308
328
required : props . required ,
309
329
style : props . style ,
330
+ labelStyle : props . labelStyle ,
331
+ inputFieldStyle :props . inputFieldStyle ,
332
+ animationStyle :props . animationStyle ,
310
333
children : children ,
311
334
...( startResult . validateStatus !== "success"
312
335
? startResult
@@ -359,9 +382,20 @@ export const timeRangeControl = (function () {
359
382
) }
360
383
361
384
{ ( 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
+ </ >
365
399
) }
366
400
</ >
367
401
) )
0 commit comments